Program: 97621
Project: 97621
Buggy source:
private void handleChildrenCoverageItems(List<IMergeItem> mergeItems,Collection<? extends ICoverage> packageItemChildren,ICoverage importCoverage,Collection<? extends ICoverage> importItemChildren,Map<ICoverage,MatchItem> importItemToMatchItem) throws OseeCoreException {
  List<IMergeItem> groupMergeItems=new ArrayList<IMergeItem>();
  boolean unMergeableExists=false;
  Entry<List<ICoverage>,List<ICoverage>> matchedUnMatchedEntry=getMatchedAndUnMatchedImportCoverageItems(importItemToMatchItem);
  List<ICoverage> unMatchedImportCoverageItems=matchedUnMatchedEntry.getValue();
  List<ICoverage> matchedImportCoverageItems=matchedUnMatchedEntry.getKey();
  List<ICoverage> packageItemsProcessed=getMatchedPackageCoverageItems(importItemToMatchItem);
  for (  ICoverage childICoverage : new CopyOnWriteArrayList<ICoverage>(unMatchedImportCoverageItems)) {
    MatchItem childMatchItem=importItemToMatchItem.get(childICoverage);
    if (childMatchItem.isMatch()) {
      throw new OseeStateException("String_Node_Str");
    }
    ICoverage packageMatch=isCoverageItemRenamed(packageItemChildren,childICoverage);
    if (packageMatch != null) {
      groupMergeItems.add(new MergeItem(MergeType.CI_Renamed,packageMatch,childICoverage,false));
      packageItemsProcessed.add(packageMatch);
      unMatchedImportCoverageItems.remove(childICoverage);
    }
 else     if (isCoverageItemAdded(packageItemChildren,childICoverage)) {
      groupMergeItems.add(new MergeItem(MergeType.CI_Add,null,childICoverage,false));
      unMatchedImportCoverageItems.remove(childICoverage);
    }
  }
  for (  ICoverage childICoverage : new CopyOnWriteArrayList<ICoverage>(matchedImportCoverageItems)) {
    MatchItem childMatchItem=importItemToMatchItem.get(childICoverage);
    if (childMatchItem != null && isCoverageItemMethodUpdate(childMatchItem)) {
      groupMergeItems.add(new MergeItem(MergeType.CI_Method_Update,childMatchItem.getPackageItem(),childICoverage,false));
      unMatchedImportCoverageItems.remove(childICoverage);
    }
    System.err.println("String_Node_Str");
  }
  for (  ICoverage childICoverage : new CopyOnWriteArrayList<ICoverage>(unMatchedImportCoverageItems)) {
    for (    ICoverage packageItemChild : packageItemChildren) {
      if (!packageItemsProcessed.contains(packageItemChild) && packageItemChild.getName().equals(childICoverage.getName())) {
        groupMergeItems.add(new MergeItem(MergeType.CI_Moved,packageItemChild,childICoverage,false));
        packageItemsProcessed.add(packageItemChild);
        unMatchedImportCoverageItems.add(childICoverage);
      }
    }
  }
  for (  ICoverage packageItemChild : packageItemChildren) {
    if (!packageItemsProcessed.contains(packageItemChild)) {
      groupMergeItems.add(new MergeItem(MergeType.CI_Delete,packageItemChild,null,false));
      packageItemsProcessed.add(packageItemChild);
    }
  }
  for (  ICoverage coverage : unMatchedImportCoverageItems) {
    groupMergeItems.add(new MergeItem(MergeType.Error__UnMergable,null,coverage,false));
  }
  for (  ICoverage packageItemChild : packageItemChildren) {
    if (!packageItemsProcessed.contains(packageItemChild)) {
      groupMergeItems.add(new MergeItem(MergeType.Error__UnMergable,packageItemChild,null,false));
    }
  }
  if (groupMergeItems.size() > 0) {
    mergeItems.add(new MergeItemGroup(MergeType.CI_Changes,importCoverage,groupMergeItems,!unMergeableExists));
  }
}

Fixed version (ground truth):
private void handleChildrenCoverageItems(List<IMergeItem> mergeItems,Collection<? extends ICoverage> packageItemChildren,ICoverage importCoverage,Collection<? extends ICoverage> importItemChildren,Map<ICoverage,MatchItem> importItemToMatchItem) throws OseeCoreException {
  List<IMergeItem> groupMergeItems=new ArrayList<IMergeItem>();
  boolean unMergeableExists=false;
  Entry<List<ICoverage>,List<ICoverage>> matchedUnMatchedEntry=getMatchedAndUnMatchedImportCoverageItems(importItemToMatchItem);
  List<ICoverage> unMatchedImportCoverageItems=matchedUnMatchedEntry.getValue();
  List<ICoverage> matchedImportCoverageItems=matchedUnMatchedEntry.getKey();
  List<ICoverage> packageItemsProcessed=getMatchedPackageCoverageItems(importItemToMatchItem);
  for (  ICoverage childICoverage : new CopyOnWriteArrayList<ICoverage>(unMatchedImportCoverageItems)) {
    MatchItem childMatchItem=importItemToMatchItem.get(childICoverage);
    if (childMatchItem.isMatch()) {
      throw new OseeStateException("String_Node_Str");
    }
    ICoverage packageMatch=isCoverageItemRenamed(packageItemChildren,childICoverage);
    if (packageMatch != null) {
      groupMergeItems.add(new MergeItem(MergeType.CI_Renamed,packageMatch,childICoverage,false));
      packageItemsProcessed.add(packageMatch);
      unMatchedImportCoverageItems.remove(childICoverage);
    }
 else     if (isCoverageItemAdded(packageItemChildren,childICoverage)) {
      groupMergeItems.add(new MergeItem(MergeType.CI_Add,null,childICoverage,false));
      unMatchedImportCoverageItems.remove(childICoverage);
    }
  }
  for (  ICoverage childICoverage : new CopyOnWriteArrayList<ICoverage>(matchedImportCoverageItems)) {
    MatchItem childMatchItem=importItemToMatchItem.get(childICoverage);
    if (childMatchItem != null && isCoverageItemMethodUpdate(childMatchItem)) {
      groupMergeItems.add(new MergeItem(MergeType.CI_Method_Update,childMatchItem.getPackageItem(),childICoverage,false));
      unMatchedImportCoverageItems.remove(childICoverage);
    }
 else     if (childMatchItem != null && isCoverageItemTestUnitsUpdate(childMatchItem)) {
      groupMergeItems.add(new MergeItem(MergeType.CI_Test_Units_Update,childMatchItem.getPackageItem(),childICoverage,false));
      unMatchedImportCoverageItems.remove(childICoverage);
    }
  }
  for (  ICoverage childICoverage : new CopyOnWriteArrayList<ICoverage>(unMatchedImportCoverageItems)) {
    for (    ICoverage packageItemChild : packageItemChildren) {
      if (!packageItemsProcessed.contains(packageItemChild) && packageItemChild.getName().equals(childICoverage.getName())) {
        groupMergeItems.add(new MergeItem(MergeType.CI_Moved,packageItemChild,childICoverage,false));
        packageItemsProcessed.add(packageItemChild);
        unMatchedImportCoverageItems.add(childICoverage);
      }
    }
  }
  for (  ICoverage packageItemChild : packageItemChildren) {
    if (!packageItemsProcessed.contains(packageItemChild)) {
      groupMergeItems.add(new MergeItem(MergeType.CI_Delete,packageItemChild,null,false));
      packageItemsProcessed.add(packageItemChild);
    }
  }
  for (  ICoverage coverage : unMatchedImportCoverageItems) {
    groupMergeItems.add(new MergeItem(MergeType.Error__UnMergable,null,coverage,false));
  }
  for (  ICoverage packageItemChild : packageItemChildren) {
    if (!packageItemsProcessed.contains(packageItemChild)) {
      groupMergeItems.add(new MergeItem(MergeType.Error__UnMergable,packageItemChild,null,false));
    }
  }
  if (groupMergeItems.size() > 0) {
    mergeItems.add(new MergeItemGroup(MergeType.CI_Changes,importCoverage,groupMergeItems,!unMergeableExists));
  }
}