nus-yam/ex-repair huggingface dataset:
Program: 93551
Project: 93551
Buggy source:
private void refreshTitle(){
  if (!getControl().isDisposed()) {
    Composite parent=getControl().getParent();
    Comparison comparison=getCompareConfiguration().getComparison();
    if (parent instanceof CompareViewerSwitchingPane && comparison != null) {
      final Predicate<? super TreeNode> unfilteredNode=new Predicate<TreeNode>(){
        public boolean apply(        TreeNode input){
          return input != null && !JFaceUtil.isFiltered(getViewer(),input,null);
        }
      }
;
      final IDifferenceGroupProvider groupProvider=getCompareConfiguration().getStructureMergeViewerGrouper().getProvider();
      final Set<Diff> differences=new LinkedHashSet<Diff>();
      final List<Iterable<TreeNode>> allTreeNodes=new ArrayList<Iterable<TreeNode>>();
      for (      Diff diff : comparison.getDifferences()) {
        differences.add(diff);
        allTreeNodes.add(groupProvider.getTreeNodes(diff));
      }
      final Iterable<TreeNode> treeNodes=Iterables.concat(allTreeNodes);
      final Set<TreeNode> visibleNodes=ImmutableSet.copyOf(Iterables.filter(treeNodes,unfilteredNode));
      final Set<Diff> visibleDiffs=ImmutableSet.copyOf(Iterables.filter(Iterables.transform(visibleNodes,TREE_NODE_AS_DIFF),Diff.class));
      final int filteredDiff=Sets.difference(differences,visibleDiffs).size();
      final int differencesToMerge=size(Iterables.filter(visibleDiffs,hasState(DifferenceState.UNRESOLVED)));
      ((CompareViewerSwitchingPane)parent).setTitleArgument(EMFCompareIDEUIMessages.getString("String_Node_Str",differencesToMerge,visibleNodes.size(),filteredDiff));
    }
  }
}

Fixed version (ground truth):
private void refreshTitle(){
  if (getControl().isDisposed() || !(getControl().getParent() instanceof CompareViewerSwitchingPane)) {
    return;
  }
  if (getCompareConfiguration().getComparison() == null) {
    return;
  }
  Set<Diff> allDiffs=getAllDiffs();
  Set<Diff> visibleDiffs=getVisibleDiffs();
  int visibleDiffCount=visibleDiffs.size();
  int filteredDiffCount=Sets.difference(allDiffs,visibleDiffs).size();
  int diffsToMergeCount=Iterables.size(Iterables.filter(visibleDiffs,hasState(DifferenceState.UNRESOLVED)));
  String titleArgument=EMFCompareIDEUIMessages.getString("String_Node_Str",diffsToMergeCount,visibleDiffCount,filteredDiffCount);
  ((CompareViewerSwitchingPane)getControl().getParent()).setTitleArgument(titleArgument);
}
Program: 93552
Project: 93552
Buggy source:
public boolean apply(TreeNode input){
  return input != null && !JFaceUtil.isFiltered(getViewer(),input,null);
}

Fixed version (ground truth):
public boolean apply(TreeNode input){
  return input != null && JFaceUtil.isFiltered(getViewer(),input,input.getParent());
}
Program: 93553
Project: 93553
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override public synchronized XMLDefaultHandler getDefaultHandler(XMLResource resource,XMLLoad xmlLoad,XMLHelper helper,Map<?,?> options){
  final NotifyingXMLHelper wrapper=new NotifyingXMLHelper(helper,containmentOnly);
  for (  Object listener : proxyListeners.getListeners()) {
    wrapper.addProxyListener((IProxyCreationListener)listener);
  }
  final XMLDefaultHandler handler=createDefaultHandler(resource,xmlLoad,wrapper,options);
  final NamespaceDeclarationNotifyingXMLDefaultHandler handlerWrapper=new NamespaceDeclarationNotifyingXMLDefaultHandler(handler);
  for (  Object listener : namespaceDeclarationListeners.getListeners()) {
    handlerWrapper.addNamespaceDeclarationListener((INamespaceDeclarationListener)listener);
  }
  handlerWrapper.prepare(resource,wrapper,options);
  return handlerWrapper;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public synchronized XMLDefaultHandler getDefaultHandler(XMLResource resource,XMLLoad xmlLoad,XMLHelper helper,Map<?,?> options){
  final NotifyingXMLHelper wrapper=new NotifyingXMLHelper(helper,containmentOnly);
  for (  Object listener : proxyListeners.getListeners()) {
    wrapper.addProxyListener((IProxyCreationListener)listener);
  }
  final XMLDefaultHandler handler=createDefaultHandler(resource,xmlLoad,wrapper,options);
  final NamespaceDeclarationNotifyingXMLDefaultHandler handlerWrapper=new NamespaceDeclarationNotifyingXMLDefaultHandler(handler);
  for (  Object listener : namespaceDeclarationListeners.getListeners()) {
    handlerWrapper.addNamespaceDeclarationListener((INamespaceDeclarationListener)listener);
  }
  Map<Object,Object> tmpMap=new HashMap<Object,Object>();
  tmpMap.putAll(options);
  ExtendedMetaData extendedMetaData=helper.getExtendedMetaData();
  if (extendedMetaData != null && !options.containsKey(XMLResource.OPTION_EXTENDED_META_DATA)) {
    tmpMap.put(XMLResource.OPTION_EXTENDED_META_DATA,extendedMetaData);
  }
  handlerWrapper.prepare(resource,wrapper,tmpMap);
  return handlerWrapper;
}
Program: 93554
Project: 93554
Buggy source:
protected void compareBothDirectionsAndCheck(IFile file,String source,String destination,int expectedConflicts,int diffsInSource,int diffsInDestination) throws Exception {
  repository.checkoutBranch(source);
  Comparison compareResult=compare(source,destination,file);
  assertEquals(expectedConflicts,compareResult.getConflicts().size());
  assertDiffCount(compareResult.getDifferences(),diffsInSource,diffsInDestination);
  repository.checkoutBranch(destination);
  compareResult=compare(destination,source,file);
  assertEquals(expectedConflicts,compareResult.getConflicts().size());
  assertDiffCount(compareResult.getDifferences(),diffsInDestination,diffsInSource);
}

Fixed version (ground truth):
protected void compareBothDirectionsAndCheck(IFile file,String source,String destination,int expectedConflicts,int diffsInSource,int diffsInDestination) throws Exception {
  repository.checkoutBranch(source);
  Comparison compareResult=compare(source,destination,file);
  assertEquals(expectedConflicts,compareResult.getConflicts().size());
  assertDiffCount(compareResult.getDifferences(),diffsInSource,diffsInDestination);
  repository.checkoutBranch(destination);
  compareResult=compare(destination,source,file);
  assertEquals(expectedConflicts,compareResult.getConflicts().size());
  assertDiffCount(compareResult.getDifferences(),diffsInDestination,diffsInSource);
  repository.checkoutBranch(source);
}
Program: 93561
Project: 93561
Buggy source:
protected void compareBothDirectionsAndCheck(IFile file,String source,String destination,int expectedConflicts,int diffsInSource,int diffsInDestination) throws Exception {
  Comparison compareResult=compare(source,destination,file);
  assertEquals(expectedConflicts,compareResult.getConflicts().size());
  assertDiffCount(compareResult.getDifferences(),diffsInSource,diffsInDestination);
  compareResult=compare(destination,source,file);
  assertEquals(expectedConflicts,compareResult.getConflicts().size());
  assertDiffCount(compareResult.getDifferences(),diffsInDestination,diffsInSource);
}

Fixed version (ground truth):
protected void compareBothDirectionsAndCheck(IFile file,String source,String destination,int expectedConflicts,int diffsInSource,int diffsInDestination) throws Exception {
  repository.checkoutBranch(source);
  Comparison compareResult=compare(source,destination,file);
  assertEquals(expectedConflicts,compareResult.getConflicts().size());
  assertDiffCount(compareResult.getDifferences(),diffsInSource,diffsInDestination);
  repository.checkoutBranch(destination);
  compareResult=compare(destination,source,file);
  assertEquals(expectedConflicts,compareResult.getConflicts().size());
  assertDiffCount(compareResult.getDifferences(),diffsInDestination,diffsInSource);
}
Program: 93563
Project: 93563
Buggy source:
private void updateProblemIndication(Diagnostic diagnostic){
  Assert.isNotNull(diagnostic);
  int lastEditorPage=getPageCount() - 1;
  if (lastEditorPage >= 0 && getItemControl(lastEditorPage) instanceof ProblemIndicationComposite) {
    ((ProblemIndicationComposite)getItemControl(lastEditorPage)).setDiagnostic(diagnostic);
    if (diagnostic.getSeverity() != Diagnostic.OK) {
      setActivePage(lastEditorPage);
      updateLayout(false,true);
    }
  }
 else   if (diagnostic.getSeverity() != Diagnostic.OK) {
    ProblemIndicationComposite problemIndicationComposite=new ProblemIndicationComposite(getControl(),SWT.NONE);
    problemIndicationComposite.setDiagnostic(diagnostic);
    createItem(++lastEditorPage,problemIndicationComposite);
    getControl().getItem(lastEditorPage).setText(CommonUIPlugin.getPlugin().getString("String_Node_Str"));
    setActivePage(lastEditorPage);
    updateLayout(false,true);
    showTabs();
  }
}

Fixed version (ground truth):
private void updateProblemIndication(Diagnostic diagnostic){
  Assert.isNotNull(diagnostic);
  int lastEditorPage=getPageCount() - 1;
  if (lastEditorPage >= 0 && getItemControl(lastEditorPage) instanceof ProblemIndicationComposite) {
    ((ProblemIndicationComposite)getItemControl(lastEditorPage)).setDiagnostic(diagnostic);
    if (diagnostic.getSeverity() != Diagnostic.OK) {
      setActivePage(lastEditorPage);
      updateLayout(false,true);
    }
  }
 else   if (diagnostic.getSeverity() != Diagnostic.OK && !getControl().isDisposed()) {
    ProblemIndicationComposite problemIndicationComposite=new ProblemIndicationComposite(getControl(),SWT.NONE);
    problemIndicationComposite.setDiagnostic(diagnostic);
    createItem(++lastEditorPage,problemIndicationComposite);
    getControl().getItem(lastEditorPage).setText(CommonUIPlugin.getPlugin().getString("String_Node_Str"));
    setActivePage(lastEditorPage);
    updateLayout(false,true);
    showTabs();
  }
}
Program: 93565
Project: 93565
Buggy source:
/** 
 * {@inheritDoc}
 * @see IStoragePathAdapterProvider#createStoragePathAdapter()
 */
public Adapter createStoragePathAdapter(String path,boolean isLocal){
  IFileRevision findFileRevision=findFileRevision((ITypedElement)accessor);
  if (findFileRevision != null) {
    return new StoragePathAdapter(path,isLocal,findFileRevision.getContentIdentifier(),findFileRevision.getAuthor());
  }
 else {
    return new StoragePathAdapter(path,isLocal);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see IStoragePathAdapterProvider#createStoragePathAdapter()
 */
public Adapter createStoragePathAdapter(String path,boolean isLocal){
  IFileRevision findFileRevision=findFileRevision((ITypedElement)accessor);
  IFile file=findFile((ITypedElement)accessor);
  boolean local=file != null;
  if (!isLocal && findFileRevision != null) {
    return new StoragePathAdapter(path,local,findFileRevision.getContentIdentifier(),findFileRevision.getAuthor());
  }
 else {
    return new StoragePathAdapter(path,local);
  }
}
Program: 93566
Project: 93566
Buggy source:
/** 
 * Compute the label used as title in the ContentMergeViewer.
 * @param adapter The adapter containing file informations
 * @return the label
 */
private String computeLabel(StoragePathAdapter adapter){
  String commitId=adapter.getCommitId();
  String username=adapter.getUsername();
  String computedLabel;
  if (adapter.isLocal()) {
    computedLabel="String_Node_Str" + adapter.getStoragePath();
  }
 else {
    computedLabel=adapter.getStoragePath();
  }
  if (commitId != null && !"String_Node_Str".equals(commitId)) {
    computedLabel+="String_Node_Str" + commitId.substring(0,7);
  }
  if (username != null && !"String_Node_Str".equals(username)) {
    computedLabel+="String_Node_Str" + username + "String_Node_Str";
  }
  return computedLabel;
}

Fixed version (ground truth):
/** 
 * Compute the label used as title in the ContentMergeViewer.
 * @param adapter The adapter containing file informations
 * @return the label
 */
private String computeLabel(StoragePathAdapter adapter){
  String computedLabel="String_Node_Str";
  if (adapter != null) {
    String commitId=adapter.getCommitId();
    String username=adapter.getUsername();
    if (adapter.isLocal()) {
      computedLabel="String_Node_Str" + adapter.getStoragePath();
    }
 else {
      computedLabel=adapter.getStoragePath();
    }
    if (commitId != null) {
      if (commitId.length() > 7) {
        commitId=commitId.substring(0,7);
      }
      computedLabel=String.format("String_Node_Str",computedLabel,commitId).trim();
    }
    if (username != null && !"String_Node_Str".equals(username)) {
      computedLabel+="String_Node_Str" + username + "String_Node_Str";
    }
  }
  return computedLabel;
}
Program: 93569
Project: 93569
Buggy source:
public static IResource getResourceHandleForLocation(Repository repository,String repoRelativePath,boolean isFolder){
  final String workDir=repository.getWorkTree().getAbsolutePath();
  final IPath path=new Path(workDir + '/' + repoRelativePath);
  final File file=path.toFile();
  if (file.exists()) {
    if (isFolder) {
      return ResourceUtil.getContainerForLocation(path);
    }
    return ResourceUtil.getFileForLocation(path);
  }
  final IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  for (  IProject project : root.getProjects()) {
    if (RepositoryProvider.getProvider(project,GitProvider.ID) != null) {
      final IPath projectLocation=project.getLocation();
      if (projectLocation != null && projectLocation.isPrefixOf(path)) {
        final IPath projectRelativePath=path.makeRelativeTo(projectLocation);
        if (isFolder) {
          return project.getFolder(projectRelativePath);
        }
 else {
          return project.getFile(projectRelativePath);
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public static IResource getResourceHandleForLocation(Repository repository,String repoRelativePath,boolean isFolder){
  final String workDir=repository.getWorkTree().getAbsolutePath();
  final IPath path=new Path(workDir + '/' + repoRelativePath);
  final File file=path.toFile();
  if (file.exists()) {
    if (isFolder) {
      return ResourceUtil.getContainerForLocation(path,false);
    }
    return ResourceUtil.getFileForLocation(path,false);
  }
  final IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  for (  IProject project : root.getProjects()) {
    if (RepositoryProvider.getProvider(project,GitProvider.ID) != null) {
      final IPath projectLocation=project.getLocation();
      if (projectLocation != null && projectLocation.isPrefixOf(path)) {
        final IPath projectRelativePath=path.makeRelativeTo(projectLocation);
        if (isFolder) {
          return project.getFolder(projectRelativePath);
        }
 else {
          return project.getFile(projectRelativePath);
        }
      }
    }
  }
  return null;
}
Program: 93571
Project: 93571
Buggy source:
/** 
 * It creates a new marker from the given difference, view and figure.
 * @param diff The related difference used as index for the main marker.
 * @param referenceView The reference view as base for creation of the marker.
 * @param referenceFigure The reference figure as base for creation of the marker.
 * @param side The side where the marker has to be created.
 * @return The phantom or null if the target layer is not found.
 */
private Marker createMarker(Diff diff,View referenceView,IFigure referenceFigure,MergeViewerSide side){
  IFigure referenceLayer=getLayer(referenceView,side);
  if (referenceLayer != null) {
    Rectangle referenceBounds=referenceFigure.getBounds().getCopy();
    translateCoordinates(referenceFigure,referenceLayer,referenceBounds);
    DecoratorFigure markerFigure=null;
    Marker marker=new Marker(referenceLayer,side,referenceView,referenceFigure,diff);
    if (isNodeList(referenceView)) {
      markerFigure=new NodeListFigure(diff,isThreeWay(),getCompareColor(),referenceFigure,referenceBounds,false);
    }
 else     if (referenceView instanceof Edge) {
      if (referenceFigure instanceof PolylineConnection) {
        markerFigure=new EdgeFigure(diff,isThreeWay(),getCompareColor(),referenceFigure,referenceBounds,false);
      }
    }
    if (markerFigure == null) {
      markerFigure=new NodeFigure(diff,isThreeWay(),getCompareColor(),referenceFigure,referenceBounds,false);
    }
    marker.setDecoratorFigure(markerFigure);
    return marker;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * It creates a new marker from the given difference, view and figure.
 * @param diff The related difference used as index for the main marker.
 * @param referenceView The reference view as base for creation of the marker.
 * @param referenceFigure The reference figure as base for creation of the marker.
 * @param side The side where the marker has to be created.
 * @return The phantom or null if the target layer is not found.
 */
private Marker createMarker(Diff diff,View referenceView,IFigure referenceFigure,MergeViewerSide side){
  IFigure referenceLayer=getLayer(referenceView,side);
  if (referenceLayer != null) {
    Rectangle referenceBounds=referenceFigure.getBounds().getCopy();
    translateCoordinates(referenceFigure,referenceLayer,referenceBounds);
    DecoratorFigure markerFigure=null;
    Marker marker=new Marker(referenceLayer,side,referenceView,referenceFigure,diff);
    if (isNodeList(referenceView)) {
      markerFigure=new NodeListFigure(diff,isThreeWay(),getCompareColor(),referenceFigure,referenceBounds,false);
    }
 else     if (referenceView instanceof Edge && referenceFigure instanceof PolylineConnection) {
      markerFigure=new EdgeFigure(diff,isThreeWay(),getCompareColor(),referenceFigure,referenceBounds,false);
    }
    if (markerFigure == null) {
      markerFigure=new NodeFigure(diff,isThreeWay(),getCompareColor(),referenceFigure,referenceBounds,false);
    }
    marker.setDecoratorFigure(markerFigure);
    return marker;
  }
  return null;
}
Program: 93572
Project: 93572
Buggy source:
/** 
 * It creates and returns a new edit part from the given edge. This edit part listens to the reference edge but is attached to the controllers of the target (phantom) side.
 * @param referenceEdge The edge as base of the edit part.
 * @param referenceSide The side of this edge.
 * @param targetSide The side where the edit part has to be created to draw the related phantom.
 * @return The new edit part.
 */
private EditPart createEdgeEditPart(Edge referenceEdge,MergeViewerSide referenceSide,MergeViewerSide targetSide){
  EditPart edgeEditPartReference=getViewer(referenceSide).getEditPart(referenceEdge);
  EditPart edgeEditPart=null;
  if (edgeEditPartReference instanceof ConnectionEditPart) {
    edgeEditPart=getOrCreatePhantomEditPart(referenceEdge,referenceSide,targetSide);
    if (edgeEditPart instanceof ConnectionEditPart) {
      View edgeSourceReference=(View)((ConnectionEditPart)edgeEditPartReference).getSource().getModel();
      if (edgeSourceReference == null) {
        edgeSourceReference=referenceEdge.getSource();
      }
      View edgeTargetReference=(View)((ConnectionEditPart)edgeEditPartReference).getTarget().getModel();
      if (edgeTargetReference == null) {
        edgeTargetReference=referenceEdge.getTarget();
      }
      EditPart edgeSourceEp=getOrCreateExtremityPhantomEditPart(((ConnectionEditPart)edgeEditPartReference).getSource(),referenceSide,targetSide);
      ((ConnectionEditPart)edgeEditPart).setSource(edgeSourceEp);
      EditPart edgeTargetEp=getOrCreateExtremityPhantomEditPart(((ConnectionEditPart)edgeEditPartReference).getTarget(),referenceSide,targetSide);
      ((ConnectionEditPart)edgeEditPart).setTarget(edgeTargetEp);
    }
  }
  return edgeEditPart;
}

Fixed version (ground truth):
/** 
 * It creates and returns a new edit part from the given edge. This edit part listens to the reference edge but is attached to the controllers of the target (phantom) side.
 * @param referenceEdge The edge as base of the edit part.
 * @param referenceSide The side of this edge.
 * @param targetSide The side where the edit part has to be created to draw the related phantom.
 * @return The new edit part.
 */
private EditPart createEdgeEditPart(Edge referenceEdge,MergeViewerSide referenceSide,MergeViewerSide targetSide){
  EditPart edgeEditPartReference=getViewer(referenceSide).getEditPart(referenceEdge);
  EditPart edgeEditPart=null;
  if (edgeEditPartReference instanceof ConnectionEditPart) {
    edgeEditPart=getOrCreatePhantomEditPart(referenceEdge,referenceSide,targetSide);
    if (edgeEditPart instanceof ConnectionEditPart) {
      EditPart edgeSourceEp=getOrCreateExtremityPhantomEditPart(((ConnectionEditPart)edgeEditPartReference).getSource(),referenceSide,targetSide);
      ((ConnectionEditPart)edgeEditPart).setSource(edgeSourceEp);
      EditPart edgeTargetEp=getOrCreateExtremityPhantomEditPart(((ConnectionEditPart)edgeEditPartReference).getTarget(),referenceSide,targetSide);
      ((ConnectionEditPart)edgeEditPart).setTarget(edgeTargetEp);
    }
  }
  return edgeEditPart;
}
Program: 93573
Project: 93573
Buggy source:
/** 
 * It checks that the coordinates of the given view changed between left and right, from the given side.
 * @param referenceView The view to check.
 * @param targetSide The side to focus.
 * @return True if the view changed its location, False otherwise.
 */
private boolean hasChange(View referenceView,MergeViewerSide targetSide){
  DifferenceKind lookup=DifferenceKind.CHANGE;
  View extremity=(View)getMatchView(referenceView,targetSide);
  Collection<Diff> diffs=Collections2.filter(getCompareConfiguration().getComparison().getDifferences(referenceView),CoordinatesChangeFactory.isCoordinatesChangeExtension());
  if (diffs.isEmpty()) {
    diffs=Collections2.filter(getCompareConfiguration().getComparison().getDifferences(extremity),CoordinatesChangeFactory.isCoordinatesChangeExtension());
  }
  return !diffs.isEmpty();
}

Fixed version (ground truth):
/** 
 * It checks that the coordinates of the given view changed between left and right, from the given side.
 * @param referenceView The view to check.
 * @param targetSide The side to focus.
 * @return True if the view changed its location, False otherwise.
 */
private boolean hasChange(View referenceView,MergeViewerSide targetSide){
  View extremity=(View)getMatchView(referenceView,targetSide);
  Collection<Diff> diffs=Collections2.filter(getCompareConfiguration().getComparison().getDifferences(referenceView),CoordinatesChangeFactory.isCoordinatesChangeExtension());
  if (diffs.isEmpty()) {
    diffs=Collections2.filter(getCompareConfiguration().getComparison().getDifferences(extremity),CoordinatesChangeFactory.isCoordinatesChangeExtension());
  }
  return !diffs.isEmpty();
}
Program: 93574
Project: 93574
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#commandStackChanged(java.util.EventObject)
 */
@Override public void commandStackChanged(EventObject event){
  super.commandStackChanged(event);
  Object source=event.getSource();
  if (source instanceof CommandStack) {
    Command command=((CommandStack)source).getMostRecentCommand();
    if (command instanceof CopyCommand) {
      Iterator<DiagramDiff> diffs=Iterators.filter(command.getAffectedObjects().iterator(),DiagramDiff.class);
      while (diffs.hasNext()) {
        DiagramDiff diagramDiff=diffs.next();
        fDecoratorsManager.hideAll();
        fDecoratorsManager.removeAll();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#commandStackChanged(java.util.EventObject)
 */
@Override public void commandStackChanged(EventObject event){
  super.commandStackChanged(event);
  Object source=event.getSource();
  if (source instanceof CommandStack) {
    Command command=((CommandStack)source).getMostRecentCommand();
    if (command instanceof CopyCommand) {
      Iterator<DiagramDiff> diffs=Iterators.filter(command.getAffectedObjects().iterator(),DiagramDiff.class);
      if (diffs.hasNext()) {
        fDecoratorsManager.hideAll();
        fDecoratorsManager.removeAll();
      }
    }
  }
}
Program: 93575
Project: 93575
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.ICompareAccessor.#getItems()
 */
public ImmutableList<? extends IMergeViewerItem> getItems(){
  Object thisSideValue=getValue(getSide());
  if (thisSideValue == null && getSide() == MergeViewerSide.ANCESTOR) {
    return ImmutableList.of();
  }
  Object leftValue=getValue(MergeViewerSide.LEFT);
  Object rightValue=getValue(MergeViewerSide.RIGHT);
  Object ancestorValue=getValue(MergeViewerSide.ANCESTOR);
  Diff diff=getInitialDiff();
  final ImmutableList<? extends IMergeViewerItem> ret;
  if (thisSideValue == null) {
    IMergeViewerItem insertionPoint=new MergeViewerItem(getComparison(),diff,leftValue,rightValue,ancestorValue,getSide(),getRootAdapterFactory());
    ret=ImmutableList.of(insertionPoint);
  }
 else {
    IMergeViewerItem matchedObject=new MergeViewerItem(getComparison(),diff,leftValue,rightValue,ancestorValue,getSide(),getRootAdapterFactory());
    ret=ImmutableList.of(matchedObject);
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.ICompareAccessor.#getItems()
 */
public ImmutableList<? extends IMergeViewerItem> getItems(){
  Object thisSideValue=getValue(getSide());
  if (thisSideValue == null && getSide() == MergeViewerSide.ANCESTOR) {
    return ImmutableList.of();
  }
  Object leftValue=getValue(MergeViewerSide.LEFT);
  Object rightValue=getValue(MergeViewerSide.RIGHT);
  Object ancestorValue=getValue(MergeViewerSide.ANCESTOR);
  Diff diff=getInitialDiff();
  IMergeViewerItem insertionPoint=new MergeViewerItem(getComparison(),diff,leftValue,rightValue,ancestorValue,getSide(),getRootAdapterFactory());
  return ImmutableList.of(insertionPoint);
}
Program: 93576
Project: 93576
Buggy source:
/** 
 * Set an engine preferences into the preferences (for a collection).
 * @param preferenceKey
 * @param currentSelectedEngine
 * @param defaultConf
 */
private <T>void setEnginePreferences(String preferenceKey,Set<IItemDescriptor<T>> currentSelectedEngine,Collection<IItemDescriptor<T>> defaultConf){
  if (currentSelectedEngine != null && !currentSelectedEngine.contains(defaultConf)) {
    StringBuilder descriptorsKey=new StringBuilder();
    for (Iterator<IItemDescriptor<T>> iterator=currentSelectedEngine.iterator(); iterator.hasNext(); ) {
      IItemDescriptor<T> iItemDescriptor=iterator.next();
      descriptorsKey.append(iItemDescriptor.getID());
      if (iterator.hasNext()) {
        descriptorsKey.append(ItemUtil.PREFERENCE_DELIMITER);
      }
    }
    getPreferenceStore().setValue(preferenceKey,descriptorsKey.toString());
  }
 else {
    getPreferenceStore().setToDefault(preferenceKey);
  }
}

Fixed version (ground truth):
/** 
 * Set an engine preferences into the preferences (for a collection).
 * @param preferenceKey
 * @param currentSelectedEngine
 * @param defaultConf
 */
private <T>void setEnginePreferences(String preferenceKey,Set<IItemDescriptor<T>> currentSelectedEngine,Collection<IItemDescriptor<T>> defaultConf){
  if (currentSelectedEngine != null && !currentSelectedEngine.containsAll(defaultConf)) {
    StringBuilder descriptorsKey=new StringBuilder();
    for (Iterator<IItemDescriptor<T>> iterator=currentSelectedEngine.iterator(); iterator.hasNext(); ) {
      IItemDescriptor<T> iItemDescriptor=iterator.next();
      descriptorsKey.append(iItemDescriptor.getID());
      if (iterator.hasNext()) {
        descriptorsKey.append(ItemUtil.PREFERENCE_DELIMITER);
      }
    }
    getPreferenceStore().setValue(preferenceKey,descriptorsKey.toString());
  }
 else {
    getPreferenceStore().setToDefault(preferenceKey);
  }
}
Program: 93577
Project: 93577
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.ecore.resource.impl.ResourceSetImpl#getResource(org.eclipse.emf.common.util.URI,boolean)
 */
@Override public Resource getResource(URI uri,boolean loadOnDemand){
  Resource demanded=uriCache.get(uri);
  if (demanded == null) {
    final EPackage ePackage=getPackageRegistry().getEPackage(uri.toString());
    if (ePackage != null) {
      demanded=ePackage.eResource();
      demanded=uriCache.putIfAbsent(uri,demanded);
    }
 else {
    }
  }
  return demanded;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.ecore.resource.impl.ResourceSetImpl#getResource(org.eclipse.emf.common.util.URI,boolean)
 */
@Override public Resource getResource(URI uri,boolean loadOnDemand){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + Integer.toHexString(hashCode()) + "String_Node_Str"+ uri);
  }
  Resource demanded=uriCache.get(uri);
  if (demanded == null) {
    final EPackage ePackage=getPackageRegistry().getEPackage(uri.toString());
    if (ePackage != null) {
      demanded=ePackage.eResource();
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("String_Node_Str" + Integer.toHexString(hashCode()) + "String_Node_Str"+ uri);
      }
      Resource former=uriCache.putIfAbsent(uri,demanded);
      if (former != null) {
        demanded=former;
      }
    }
 else {
    }
  }
 else   if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + Integer.toHexString(hashCode()) + "String_Node_Str"+ uri);
  }
  return demanded;
}
Program: 93578
Project: 93578
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.ecore.resource.impl.ResourceSetImpl#createResource(org.eclipse.emf.common.util.URI,java.lang.String)
 */
@Override public synchronized Resource createResource(URI uri,String contentType){
  final Resource created=super.createResource(uri,contentType);
  return created;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.ecore.resource.impl.ResourceSetImpl#createResource(org.eclipse.emf.common.util.URI,java.lang.String)
 */
@Override public synchronized Resource createResource(URI uri,String contentType){
  final URI normalizedURI=getURIConverter().normalize(uri);
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + Integer.toHexString(hashCode()) + "String_Node_Str"+ uri);
  }
  if (uriCache.containsKey(normalizedURI)) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + Integer.toHexString(hashCode()) + "String_Node_Str"+ uri);
    }
    return uriCache.get(normalizedURI);
  }
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + Integer.toHexString(hashCode()) + "String_Node_Str"+ uri);
  }
  Resource created=super.createResource(uri,contentType);
  Resource former=uriCache.putIfAbsent(normalizedURI,created);
  if (former != null) {
    created=former;
  }
  return created;
}
Program: 93579
Project: 93579
Buggy source:
/** 
 * Unload the given resource.
 * @param resource Resource to unlod
 * @param monitor Progress monito to use (currently unused)
 */
public void unload(Resource resource,IProgressMonitor monitor){
  final URI uri=resource.getURI();
  uriCache.remove(uri);
  getResources().remove(resource);
  resource.eAdapters().clear();
}

Fixed version (ground truth):
/** 
 * Unload the given resource.
 * @param resource Resource to unlod
 * @param monitor Progress monito to use (currently unused)
 */
public void unload(Resource resource,IProgressMonitor monitor){
  final URI uri=resource.getURI();
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + Integer.toHexString(hashCode()) + "String_Node_Str"+ uri);
  }
  uriCache.remove(uri);
  getResources().remove(resource);
  resource.eAdapters().clear();
}
Program: 93580
Project: 93580
Buggy source:
/** 
 * This will load the given URI as an EMF Resource. <p> This is the only entry point within this resource set to load an EMF resource, and it will _only_ load the resource pointed at by <code>uri</code>, ignoring all cross-referenced resources (including containment proxies). </p>
 * @param uri The URI to load as a resource.
 * @return The loaded Resource.
 */
public Resource loadResource(URI uri){
  final URIConverter theURIConverter=getURIConverter();
  final URI normalizedURI=theURIConverter.normalize(uri);
  Resource result=null;
  result=uriCache.get(normalizedURI);
  if (result == null) {
    result=delegatedGetResource(uri,true);
    if (result != null) {
      result=uriCache.putIfAbsent(uri,result);
    }
  }
  if (result == null) {
    result=demandCreateResource(uri);
    if (getURIConverter() instanceof RevisionedURIConverter) {
      try {
        if (!((RevisionedURIConverter)getURIConverter()).prefetchStream(uri,getLoadOptions())) {
          return result;
        }
      }
 catch (      IOException e) {
      }
    }
    if (result == null) {
      throw new RuntimeException("String_Node_Str" + uri + "String_Node_Str");
    }
    demandLoadHelper(result);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * This will load the given URI as an EMF Resource. <p> This is the only entry point within this resource set to load an EMF resource, and it will _only_ load the resource pointed at by <code>uri</code>, ignoring all cross-referenced resources (including containment proxies). </p>
 * @param uri The URI to load as a resource.
 * @return The loaded Resource.
 */
public Resource loadResource(URI uri){
  final URIConverter theURIConverter=getURIConverter();
  final URI normalizedURI=theURIConverter.normalize(uri);
  Resource result=null;
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + Integer.toHexString(hashCode()) + "String_Node_Str"+ normalizedURI);
  }
  result=uriCache.get(normalizedURI);
  if (result == null) {
    result=delegatedGetResource(uri,true);
    if (result != null) {
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("String_Node_Str" + Integer.toHexString(hashCode()) + "String_Node_Str"+ normalizedURI);
      }
      Resource former=uriCache.putIfAbsent(normalizedURI,result);
      if (former != null) {
        result=former;
      }
    }
  }
  if (result == null) {
    result=demandCreateResource(uri);
    if (getURIConverter() instanceof RevisionedURIConverter) {
      try {
        if (!((RevisionedURIConverter)getURIConverter()).prefetchStream(uri,getLoadOptions())) {
          return result;
        }
      }
 catch (      IOException e) {
      }
    }
    if (result == null) {
      throw new RuntimeException("String_Node_Str" + uri + "String_Node_Str");
    }
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + Integer.toHexString(hashCode()) + "String_Node_Str"+ normalizedURI);
    }
    demandLoadHelper(result);
  }
  return result;
}
Program: 93581
Project: 93581
Buggy source:
protected Item getNextItem(Item previousItem){
  final Item result;
  TreeItem firstChild=getFirstChild(previousItem);
  if (firstChild != null) {
    result=firstChild;
  }
 else {
    TreeItem sibling=getSibling(previousItem);
    if (sibling != null) {
      result=sibling;
    }
 else {
      result=getAncestorSibling(previousItem);
    }
  }
  if (result instanceof TreeItem && result.getData() == null) {
    final TreeItem parentItem=((TreeItem)result).getParentItem();
    if (parentItem != null) {
      viewer.createChildren(parentItem);
    }
 else {
      viewer.createChildren(viewer.getTree());
    }
    return getNextItem(previousItem);
  }
  return result;
}

Fixed version (ground truth):
protected Item getNextItem(Item previousItem){
  final TreeItem result;
  TreeItem firstChild=getFirstChild(previousItem);
  if (firstChild != null) {
    result=firstChild;
  }
 else {
    TreeItem sibling=getSibling(previousItem);
    if (sibling != null) {
      result=sibling;
    }
 else {
      result=getAncestorSibling(previousItem);
    }
  }
  if (result != null && result.getData() == null) {
    final TreeItem parentItem=result.getParentItem();
    if (parentItem != null) {
      viewer.createChildren(parentItem);
    }
 else {
      viewer.createChildren(viewer.getTree());
    }
    return getNextItem(previousItem);
  }
  return result;
}
Program: 93582
Project: 93582
Buggy source:
protected Item getPreviousItem(Item previousItem){
  final Item result;
  TreeItem previousSibling=getPreviousSibling(previousItem);
  if (previousSibling != null) {
    result=getDeepestChild(previousSibling);
  }
 else {
    Object parent=getParent(previousItem);
    if (parent instanceof TreeItem) {
      result=(TreeItem)parent;
    }
 else {
      result=null;
    }
  }
  if (result instanceof TreeItem && result.getData() == null) {
    final TreeItem parentItem=((TreeItem)result).getParentItem();
    if (parentItem != null) {
      viewer.createChildren(parentItem);
    }
 else {
      viewer.createChildren(viewer.getTree());
    }
    return getPreviousItem(previousItem);
  }
  return result;
}

Fixed version (ground truth):
protected Item getPreviousItem(Item previousItem){
  final TreeItem result;
  TreeItem previousSibling=getPreviousSibling(previousItem);
  if (previousSibling != null) {
    result=getDeepestChild(previousSibling);
  }
 else {
    Object parent=getParent(previousItem);
    if (parent instanceof TreeItem) {
      result=(TreeItem)parent;
    }
 else {
      result=null;
    }
  }
  if (result != null && result.getData() == null) {
    final TreeItem parentItem=result.getParentItem();
    if (parentItem != null) {
      viewer.createChildren(parentItem);
    }
 else {
      viewer.createChildren(viewer.getTree());
    }
    return getPreviousItem(previousItem);
  }
  return result;
}
Program: 93583
Project: 93583
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.ICompareAccessor#getItems()
 */
public ImmutableList<? extends IMergeViewerItem> getItems(){
  final ImmutableList.Builder<IMergeViewerItem> ret=ImmutableList.builder();
  final Collection<IMergeViewerItem> items=Lists.newArrayList();
  final Collection<Match> matches=getComparison().getMatches();
  for (  Match match : matches) {
    MergeViewerItem.Container container=null;
    if (ResourceUIUtil.isFragment(match,getSide())) {
      IMergeViewerItem item=createItemForNotLoadedFragmentMatch(match);
      if (item != null) {
        items.add(item);
      }
    }
 else     if (getSide() != MergeViewerSide.ANCESTOR || (getSide() == MergeViewerSide.ANCESTOR && match.getOrigin() != null)) {
      ResourceAttachmentChange diff=getFirst(filter(match.getDifferences(),ResourceAttachmentChange.class),null);
      container=new MergeViewerItem.Container(getComparison(),diff,match.getLeft(),match.getRight(),match.getOrigin(),getSide(),getRootAdapterFactory());
      items.add(container);
    }
  }
  final IMergeViewerItem newContainer=addNewContainerForNotLoadedFragmentMatches(items);
  if (newContainer != null) {
    ret.add(newContainer);
  }
 else {
    ret.addAll(items);
  }
  return ret.build();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.ICompareAccessor#getItems()
 */
public ImmutableList<? extends IMergeViewerItem> getItems(){
  final ImmutableList.Builder<IMergeViewerItem> ret=ImmutableList.builder();
  final Collection<IMergeViewerItem> items=Lists.newArrayList();
  final Collection<Match> matches=getComparison().getMatches();
  for (  Match match : matches) {
    MergeViewerItem.Container container=null;
    if (ResourceUIUtil.isFragment(match,getSide())) {
      IMergeViewerItem item=ResourceUIUtil.createItemForNotLoadedFragmentMatch(match,getSide(),getComparison(),getRootAdapterFactory());
      if (item != null) {
        items.add(item);
      }
    }
 else     if (getSide() != MergeViewerSide.ANCESTOR || (getSide() == MergeViewerSide.ANCESTOR && match.getOrigin() != null)) {
      ResourceAttachmentChange diff=getFirst(filter(match.getDifferences(),ResourceAttachmentChange.class),null);
      container=new MergeViewerItem.Container(getComparison(),diff,match.getLeft(),match.getRight(),match.getOrigin(),getSide(),getRootAdapterFactory());
      items.add(container);
    }
  }
  final IMergeViewerItem newContainer=ResourceUIUtil.addNewContainerForNotLoadedFragmentMatches(items,getSide(),getComparison(),getRootAdapterFactory());
  if (newContainer != null) {
    ret.add(newContainer);
  }
 else {
    ret.addAll(items);
  }
  return ret.build();
}
Program: 93584
Project: 93584
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.ICompareAccessor#getItems()
 */
public ImmutableList<? extends IMergeViewerItem> getItems(){
  final ImmutableList.Builder<IMergeViewerItem> ret=ImmutableList.builder();
  final Collection<IMergeViewerItem> items=Lists.newArrayList();
  final Collection<Match> matches=getComparison().getMatches();
  for (  Match match : matches) {
    MergeViewerItem.Container container=null;
    if (ResourceUIUtil.isFragment(match,getSide())) {
      IMergeViewerItem item=createItemForNotLoadedFragmentMatch(match);
      if (item != null) {
        items.add(item);
      }
    }
 else     if (getSide() != MergeViewerSide.ANCESTOR || (getSide() == MergeViewerSide.ANCESTOR && match.getOrigin() != null)) {
      ResourceAttachmentChange diff=getFirst(filter(match.getDifferences(),ResourceAttachmentChange.class),null);
      container=new MergeViewerItem.Container(getComparison(),diff,match.getLeft(),match.getRight(),match.getOrigin(),getSide(),getRootAdapterFactory());
      items.add(container);
    }
  }
  final IMergeViewerItem newContainer=addNewContainerForNotLoadedFragmentMatches(items);
  if (newContainer != null) {
    ret.add(newContainer);
  }
 else {
    ret.addAll(items);
  }
  return ret.build();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.ICompareAccessor#getItems()
 */
public ImmutableList<? extends IMergeViewerItem> getItems(){
  final ImmutableList.Builder<IMergeViewerItem> ret=ImmutableList.builder();
  final Collection<IMergeViewerItem> items=Lists.newArrayList();
  final Collection<Match> matches=getComparison().getMatches();
  for (  Match match : matches) {
    MergeViewerItem.Container container=null;
    if (ResourceUIUtil.isFragment(match,getSide())) {
      IMergeViewerItem item=ResourceUIUtil.createItemForNotLoadedFragmentMatch(match,getSide(),getComparison(),getRootAdapterFactory());
      if (item != null) {
        items.add(item);
      }
    }
 else     if (getSide() != MergeViewerSide.ANCESTOR || (getSide() == MergeViewerSide.ANCESTOR && match.getOrigin() != null)) {
      ResourceAttachmentChange diff=getFirst(filter(match.getDifferences(),ResourceAttachmentChange.class),null);
      container=new MergeViewerItem.Container(getComparison(),diff,match.getLeft(),match.getRight(),match.getOrigin(),getSide(),getRootAdapterFactory());
      items.add(container);
    }
  }
  final IMergeViewerItem newContainer=ResourceUIUtil.addNewContainerForNotLoadedFragmentMatches(items,getSide(),getComparison(),getRootAdapterFactory());
  if (newContainer != null) {
    ret.add(newContainer);
  }
 else {
    ret.addAll(items);
  }
  return ret.build();
}
Program: 93585
Project: 93585
Buggy source:
protected void attachListeners(final MergeSourceViewer viewer){
  final StyledText textWidget=viewer.getSourceViewer().getTextWidget();
  textWidget.addFocusListener(new FocusListener(){
    public void focusLost(    FocusEvent e){
      getHandlerService().setGlobalActionHandler(ActionFactory.UNDO.getId(),null);
      getHandlerService().setGlobalActionHandler(ActionFactory.REDO.getId(),null);
    }
    public void focusGained(    FocusEvent e){
      getHandlerService().setGlobalActionHandler(ActionFactory.UNDO.getId(),fUndoAction);
      getHandlerService().setGlobalActionHandler(ActionFactory.REDO.getId(),fRedoAction);
    }
  }
);
  viewer.getSourceViewer().addTextListener(new ITextListener(){
    public void textChanged(    TextEvent event){
      final Object oldInput=getInput();
      if (event.getDocumentEvent() != null && oldInput instanceof CompareInputAdapter) {
        if (oldInput instanceof CompareInputAdapter) {
          final AttributeChange diff=(AttributeChange)((CompareInputAdapter)oldInput).getComparisonObject();
          final EAttribute eAttribute=diff.getAttribute();
          final Match match=diff.getMatch();
          final IEqualityHelper equalityHelper=match.getComparison().getEqualityHelper();
          updateModel(diff,eAttribute,equalityHelper,match.getLeft(),true);
          updateModel(diff,eAttribute,equalityHelper,match.getRight(),false);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
protected void attachListeners(final MergeSourceViewer viewer){
  final StyledText textWidget=viewer.getSourceViewer().getTextWidget();
  textWidget.addFocusListener(new FocusListener(){
    public void focusLost(    FocusEvent e){
      getHandlerService().setGlobalActionHandler(ActionFactory.UNDO.getId(),null);
      getHandlerService().setGlobalActionHandler(ActionFactory.REDO.getId(),null);
    }
    public void focusGained(    FocusEvent e){
      getHandlerService().setGlobalActionHandler(ActionFactory.UNDO.getId(),fUndoAction);
      getHandlerService().setGlobalActionHandler(ActionFactory.REDO.getId(),fRedoAction);
    }
  }
);
  viewer.getSourceViewer().addTextListener(new ITextListener(){
    public void textChanged(    TextEvent event){
      final Object oldInput=getInput();
      if (event.getDocumentEvent() != null && oldInput instanceof CompareInputAdapter) {
        final AttributeChange diff=(AttributeChange)((CompareInputAdapter)oldInput).getComparisonObject();
        final EAttribute eAttribute=diff.getAttribute();
        final Match match=diff.getMatch();
        final IEqualityHelper equalityHelper=match.getComparison().getEqualityHelper();
        updateModel(diff,eAttribute,equalityHelper,match.getLeft(),true);
        updateModel(diff,eAttribute,equalityHelper,match.getRight(),false);
      }
    }
  }
);
}
Program: 93586
Project: 93586
Buggy source:
public void textChanged(TextEvent event){
  final Object oldInput=getInput();
  if (event.getDocumentEvent() != null && oldInput instanceof CompareInputAdapter) {
    if (oldInput instanceof CompareInputAdapter) {
      final AttributeChange diff=(AttributeChange)((CompareInputAdapter)oldInput).getComparisonObject();
      final EAttribute eAttribute=diff.getAttribute();
      final Match match=diff.getMatch();
      final IEqualityHelper equalityHelper=match.getComparison().getEqualityHelper();
      updateModel(diff,eAttribute,equalityHelper,match.getLeft(),true);
      updateModel(diff,eAttribute,equalityHelper,match.getRight(),false);
    }
  }
}

Fixed version (ground truth):
public void textChanged(TextEvent event){
  final Object oldInput=getInput();
  if (event.getDocumentEvent() != null && oldInput instanceof CompareInputAdapter) {
    final AttributeChange diff=(AttributeChange)((CompareInputAdapter)oldInput).getComparisonObject();
    final EAttribute eAttribute=diff.getAttribute();
    final Match match=diff.getMatch();
    final IEqualityHelper equalityHelper=match.getComparison().getEqualityHelper();
    updateModel(diff,eAttribute,equalityHelper,match.getLeft(),true);
    updateModel(diff,eAttribute,equalityHelper,match.getRight(),false);
  }
}