Program: 93647
Project: 93647
Buggy source:
/** 
 * This will be called from   {@link #checkConflict(Comparison,Diff,Iterable)} in order to detectconflicts on a Diff that is of type "DELETE" and which is <b>not</b> a containment reference change. <p> The only potential conflict for such a diff is a "MOVE" of that same value on the opposite side. </p>
 * @param comparison The originating comparison of those diffs.
 * @param diff The diff which we are to check for conflicts.
 * @param candidates The list of candidates for a conflict. This list only contains Diff from the side opposite to  {@code diff}.
 */
protected void checkFeatureDeleteConflict(Comparison comparison,Diff diff,Iterable<Diff> candidates){
  final Object deletedValue;
  final EStructuralFeature feature;
  if (diff instanceof ReferenceChange) {
    deletedValue=((ReferenceChange)diff).getValue();
    feature=((ReferenceChange)diff).getReference();
  }
 else {
    deletedValue=((AttributeChange)diff).getValue();
    feature=((AttributeChange)diff).getAttribute();
  }
  final Iterable<Diff> refinedCandidates=Iterables.filter(candidates,new Predicate<Diff>(){
    public boolean apply(    Diff input){
      boolean apply=false;
      if (input != null && (input.getKind() == DifferenceKind.MOVE || input.getKind() == DifferenceKind.DELETE)) {
        if (input instanceof ReferenceChange) {
          apply=((ReferenceChange)input).getReference() == feature;
        }
 else         if (input instanceof AttributeChange) {
          apply=((AttributeChange)input).getAttribute() == feature;
        }
      }
      return apply;
    }
  }
);
  for (  Diff candidate : refinedCandidates) {
    final Object movedValue;
    if (candidate instanceof ReferenceChange) {
      movedValue=((ReferenceChange)candidate).getValue();
    }
 else {
      movedValue=((AttributeChange)candidate).getValue();
    }
    if (helper.matchingValues(comparison,deletedValue,movedValue)) {
      if (candidate.getKind() == DifferenceKind.MOVE) {
        conflictOn(comparison,diff,candidate,ConflictKind.REAL);
      }
 else {
        conflictOn(comparison,diff,candidate,ConflictKind.PSEUDO);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * This will be called from   {@link #checkConflict(Comparison,Diff,Iterable)} in order to detectconflicts on a Diff that is of type "DELETE" and which is <b>not</b> a containment reference change. <p> The only potential conflict for such a diff is a "MOVE" of that same value on the opposite side. </p>
 * @param comparison The originating comparison of those diffs.
 * @param diff The diff which we are to check for conflicts.
 * @param candidates The list of candidates for a conflict. This list only contains Diff from the side opposite to  {@code diff}.
 */
protected void checkFeatureDeleteConflict(Comparison comparison,Diff diff,Iterable<Diff> candidates){
  final Object deletedValue;
  final EStructuralFeature feature;
  if (diff instanceof ReferenceChange) {
    deletedValue=((ReferenceChange)diff).getValue();
    feature=((ReferenceChange)diff).getReference();
  }
 else   if (diff instanceof AttributeChange) {
    deletedValue=((AttributeChange)diff).getValue();
    feature=((AttributeChange)diff).getAttribute();
  }
 else {
    return;
  }
  final Iterable<Diff> refinedCandidates=Iterables.filter(candidates,new Predicate<Diff>(){
    public boolean apply(    Diff input){
      boolean apply=false;
      if (input != null && (input.getKind() == DifferenceKind.MOVE || input.getKind() == DifferenceKind.DELETE)) {
        if (input instanceof ReferenceChange) {
          apply=((ReferenceChange)input).getReference() == feature;
        }
 else         if (input instanceof AttributeChange) {
          apply=((AttributeChange)input).getAttribute() == feature;
        }
      }
      return apply;
    }
  }
);
  for (  Diff candidate : refinedCandidates) {
    final Object movedValue;
    if (candidate instanceof ReferenceChange) {
      movedValue=((ReferenceChange)candidate).getValue();
    }
 else {
      movedValue=((AttributeChange)candidate).getValue();
    }
    if (helper.matchingValues(comparison,deletedValue,movedValue)) {
      if (candidate.getKind() == DifferenceKind.MOVE) {
        conflictOn(comparison,diff,candidate,ConflictKind.REAL);
      }
 else {
        conflictOn(comparison,diff,candidate,ConflictKind.PSEUDO);
      }
    }
  }
}