if (capList != null)
{
capList.remove(caps[i]);</BUG>
}
}
<BUG>}
checkForConflicts(host, fragmentList);
fragments = (fragmentList.size() == 0)

? null
: (IModule[]) fragmentList.toArray(new IModule[fragmentList.size()]);</BUG>
try

index = listIdx;
}
}
fragmentList.add(
(index < 0) ? fragmentList.size() : index, bestFragment);
List<Capability> caps = host.getCapabilities();
for (int i = 0; (caps != null) && (i < caps.size()); i++)
