Program: 178592
Project: 178592
Buggy source:
/** 
 * <p> </p>
 * @param manifest
 * @param resolvedFeature
 * @throws BuildException
 */
private void resolvePlugins(FeatureManifest manifest,ResolvedFeature resolvedFeature) throws BuildException {
  final Map<BundleDescription,Plugin> map=new HashMap<BundleDescription,Plugin>();
  final List<BundleDescription> bundleDescriptions=new LinkedList<BundleDescription>();
  for (  Plugin plugin : manifest.getPlugins()) {
    BundleDescription bundleDescription=_state.getBundle(plugin.getId(),plugin.getVersion().equals(Version.emptyVersion) ? null : plugin.getVersion());
    if (bundleDescription == null) {
      throw new BuildException("String_Node_Str" + plugin.getId() + "String_Node_Str"+ plugin.getVersion()+ "String_Node_Str");
    }
    Assert.assertTrue(bundleDescription.isResolved(),"String_Node_Str");
    bundleDescriptions.add(bundleDescription);
    map.put(bundleDescription,plugin);
  }
  final BundleDescription[] sortedbundleDescriptions=(BundleDescription[])bundleDescriptions.toArray(new BundleDescription[0]);
  final Object[][] cycles=_state.getStateHelper().sortBundles(sortedbundleDescriptions);
  if ((cycles != null) && (cycles.length > 0)) {
    A4ELogging.warn("String_Node_Str");
    for (int i=0; i < cycles.length; i++) {
      A4ELogging.warn(Arrays.asList(cycles[i]).toString());
    }
  }
  final List<Pair<Plugin,BundleDescription>> result=new LinkedList<Pair<Plugin,BundleDescription>>();
  for (  BundleDescription bundleDescription : sortedbundleDescriptions) {
    final Pair<Plugin,BundleDescription> pair=new Pair<Plugin,BundleDescription>(map.get(bundleDescription),bundleDescription);
    result.add(pair);
  }
  resolvedFeature.setPluginToBundleDescptionList(result);
}

Fixed version (ground truth):
/** 
 * <p> </p>
 * @param manifest
 * @param resolvedFeature
 * @throws BuildException
 */
private void resolvePlugins(FeatureManifest manifest,ResolvedFeature resolvedFeature) throws BuildException {
  final Map<BundleDescription,Plugin> map=new HashMap<BundleDescription,Plugin>();
  final List<BundleDescription> bundleDescriptions=new LinkedList<BundleDescription>();
  for (  Plugin plugin : manifest.getPlugins()) {
    BundleDescription bundleDescription=_state.getBundle(plugin.getId(),plugin.getVersion().equals(Version.emptyVersion) ? null : plugin.getVersion());
    if (bundleDescription == null) {
      throw new BuildException("String_Node_Str" + plugin.getId() + "String_Node_Str"+ plugin.getVersion()+ "String_Node_Str");
    }
    if (!bundleDescription.isResolved()) {
      String resolverErrors=TargetPlatformImpl.dumpResolverErrors(bundleDescription);
      String bundleInfo=TargetPlatformImpl.getBundleInfo(bundleDescription);
      throw new RuntimeException(String.format("String_Node_Str",bundleInfo,resolverErrors));
    }
    bundleDescriptions.add(bundleDescription);
    map.put(bundleDescription,plugin);
  }
  final BundleDescription[] sortedbundleDescriptions=(BundleDescription[])bundleDescriptions.toArray(new BundleDescription[0]);
  final Object[][] cycles=_state.getStateHelper().sortBundles(sortedbundleDescriptions);
  if ((cycles != null) && (cycles.length > 0)) {
    A4ELogging.warn("String_Node_Str");
    for (int i=0; i < cycles.length; i++) {
      A4ELogging.warn(Arrays.asList(cycles[i]).toString());
    }
  }
  final List<Pair<Plugin,BundleDescription>> result=new LinkedList<Pair<Plugin,BundleDescription>>();
  for (  BundleDescription bundleDescription : sortedbundleDescriptions) {
    final Pair<Plugin,BundleDescription> pair=new Pair<Plugin,BundleDescription>(map.get(bundleDescription),bundleDescription);
    result.add(pair);
  }
  resolvedFeature.setPluginToBundleDescptionList(result);
}