Program: 93545
Project: 93545
Buggy source:
@SuppressWarnings("String_Node_Str") @Test public void testLeftAddRightAdd_LtR_2() throws IOException {
  final Resource left=input.getLeftAddRightAddLeftConflictScope();
  final Resource right=input.getLeftAddRightAddRightConflictScope();
  final Resource origin=input.getLeftAddRightAddOriginConflictScope();
  final IComparisonScope scope=new DefaultComparisonScope(left,right,origin);
  Comparison comparison=EMFCompare.builder().build().compare(scope);
  List<Diff> differences=comparison.getDifferences();
  assertEquals(6,differences.size());
  final String featureName="String_Node_Str";
  final Diff diffNodeCLeft=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.LEFT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  final Diff diffNodeCRight=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.RIGHT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  final Diff diffNodeDLeft=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.LEFT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  final Diff diffNodeDRight=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.RIGHT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  final Diff diffNodeELeft=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.LEFT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  final Diff diffNodeFRight=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.RIGHT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  mergerRegistry.getHighestRankingMerger(diffNodeCRight).copyLeftToRight(diffNodeCRight,new BasicMonitor());
  final EObject rightNodeC=getNodeNamed(right,"String_Node_Str");
  assertNull(rightNodeC);
  final EObject rightNodeA=getNodeNamed(right,"String_Node_Str");
  assertNotNull(rightNodeA);
  final EObject rightNodeB=getNodeNamed(right,"String_Node_Str");
  assertNotNull(rightNodeB);
  final EObject rightNodeD=getNodeNamed(right,"String_Node_Str");
  assertNull(rightNodeD);
  final EObject rightNodeF=getNodeNamed(right,"String_Node_Str");
  assertNull(rightNodeF);
  final EStructuralFeature feature=rightNodeA.eClass().getEStructuralFeature(featureName);
  assertNotNull(feature);
  final EList<Node> aContainmentRef1s=((Node)rightNodeA).getContainmentRef1();
  assertFalse(aContainmentRef1s.contains(rightNodeC));
  final EList<Node> bContainmentRef1s=((Node)rightNodeB).getContainmentRef1();
  assertFalse(bContainmentRef1s.contains(rightNodeC));
  assertEquals(DifferenceState.UNRESOLVED,diffNodeCLeft.getState());
  assertEquals(DifferenceState.MERGED,diffNodeCRight.getState());
  assertEquals(DifferenceState.UNRESOLVED,diffNodeDLeft.getState());
  assertEquals(DifferenceState.MERGED,diffNodeDRight.getState());
  assertEquals(DifferenceState.UNRESOLVED,diffNodeELeft.getState());
  assertEquals(DifferenceState.MERGED,diffNodeFRight.getState());
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Test public void testLeftAddRightAdd_LtR_2() throws IOException {
  final Resource left=input.getLeftAddRightAddLeftConflictScope();
  final Resource right=input.getLeftAddRightAddRightConflictScope();
  final Resource origin=input.getLeftAddRightAddOriginConflictScope();
  final IComparisonScope scope=new DefaultComparisonScope(left,right,origin);
  Comparison comparison=EMFCompare.builder().build().compare(scope);
  List<Diff> differences=comparison.getDifferences();
  assertEquals(6,differences.size());
  final String featureName="String_Node_Str";
  final Diff diffNodeCLeft=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.LEFT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  final Diff diffNodeCRight=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.RIGHT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  final Diff diffNodeDLeft=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.LEFT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  final Diff diffNodeDRight=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.RIGHT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  final Diff diffNodeELeft=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.LEFT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  final Diff diffNodeFRight=Iterators.find(differences.iterator(),and(fromSide(DifferenceSource.RIGHT),ofKind(DifferenceKind.ADD),referenceValueMatch(featureName,"String_Node_Str",true)));
  mergerRegistry.getHighestRankingMerger(diffNodeCRight).copyLeftToRight(diffNodeCRight,new BasicMonitor());
  final EObject rightNodeC=getNodeNamed(right,"String_Node_Str");
  assertNull(rightNodeC);
  final EObject rightNodeA=getNodeNamed(right,"String_Node_Str");
  assertNotNull(rightNodeA);
  final EObject rightNodeB=getNodeNamed(right,"String_Node_Str");
  assertNotNull(rightNodeB);
  final EObject rightNodeD=getNodeNamed(right,"String_Node_Str");
  assertNull(rightNodeD);
  final EObject rightNodeF=getNodeNamed(right,"String_Node_Str");
  assertNull(rightNodeF);
  final EStructuralFeature feature=rightNodeA.eClass().getEStructuralFeature(featureName);
  assertNotNull(feature);
  final EList<Node> aContainmentRef1s=((Node)rightNodeA).getContainmentRef1();
  assertFalse(aContainmentRef1s.contains(rightNodeC));
  final EList<Node> bContainmentRef1s=((Node)rightNodeB).getContainmentRef1();
  assertFalse(bContainmentRef1s.contains(rightNodeC));
  assertEquals(DifferenceState.UNRESOLVED,diffNodeCLeft.getState());
  assertEquals(DifferenceState.MERGED,diffNodeCRight.getState());
  assertEquals(DifferenceState.MERGED,diffNodeDLeft.getState());
  assertEquals(DifferenceState.MERGED,diffNodeDRight.getState());
  assertEquals(DifferenceState.UNRESOLVED,diffNodeELeft.getState());
  assertEquals(DifferenceState.MERGED,diffNodeFRight.getState());
}