if (manager == null) {
throw new IllegalStateException();
}
IMemento[] workingSetReferences = workingSetMemento
.getChildren(IWorkbenchConstants.TAG_WORKING_SET);
<BUG>ArrayList list = new ArrayList(workingSetReferences.length);
for (int i = 0; i < workingSetReferences.length; i++) {
IMemento setReference = workingSetReferences[i];
String setId = setReference.getID();
</BUG>
IWorkingSet set = manager.getWorkingSet(setId);

if (manager == null) {
throw new IllegalStateException();
}
IMemento[] workingSetReferences = workingSetMemento
.getChildren(IWorkbenchConstants.TAG_WORKING_SET);
ArrayList list = new ArrayList(workingSetReferences.length);
for (IMemento memento : workingSetReferences) {
String setId = memento.getID();
IWorkingSet set = manager.getWorkingSet(setId);
