nus-yam/ex-repair huggingface dataset:
Program: 121628
Project: 121628
Buggy source:
private void refreshNodes(){
  boolean isRed=new JobletUtil().isRed(this.jobletContainer);
  if (isRed && rectFig != null) {
    rectFig.setBackgroundColor(new Color(Display.getDefault(),red));
  }
 else   if (rectFig != null) {
    rectFig.setBackgroundColor(new Color(Display.getDefault(),green));
  }
  if (isRed && outlineFigure != null) {
    outlineFigure.setBackgroundColor(new Color(Display.getDefault(),red));
  }
 else   if (outlineFigure != null) {
    outlineFigure.setBackgroundColor(new Color(Display.getDefault(),green));
  }
  if (!jobletContainer.isCollapsed()) {
    for (    Object ele : jobletContainer.getElements()) {
      if (ele instanceof Node) {
        ((Node)ele).setReadOnly(isRed);
      }
    }
  }
}

Fixed version (ground truth):
private void refreshNodes(){
  boolean isRed=new JobletUtil().isRed(this.jobletContainer);
  if (lastJobletRedState == isRed) {
    return;
  }
  lastJobletRedState=isRed;
  if (isRed && rectFig != null) {
    rectFig.setBackgroundColor(new Color(Display.getDefault(),red));
  }
 else   if (rectFig != null) {
    rectFig.setBackgroundColor(new Color(Display.getDefault(),green));
  }
  if (isRed && outlineFigure != null) {
    outlineFigure.setBackgroundColor(new Color(Display.getDefault(),red));
  }
 else   if (outlineFigure != null) {
    outlineFigure.setBackgroundColor(new Color(Display.getDefault(),green));
  }
  if (!jobletContainer.isCollapsed()) {
    for (    Object ele : jobletContainer.getElements()) {
      if (ele instanceof Node) {
        ((Node)ele).setReadOnly(isRed);
      }
    }
  }
}
Program: 121629
Project: 121629
Buggy source:
public void makeSureUnlockJoblet(IProcess2 process){
  List<? extends INode> nodeList=process.getGraphicalNodes();
  for (  INode node : nodeList) {
    if (((Node)node).isJoblet()) {
      IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
      if (service != null) {
        service.reloadJobletProcess(node);
        service.unlockJoblet(node,false);
      }
    }
  }
}

Fixed version (ground truth):
public void makeSureUnlockJoblet(IProcess2 process){
  List<? extends INode> nodeList=process.getGraphicalNodes();
  for (  INode node : nodeList) {
    if (((Node)node).isJoblet()) {
      IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
      if (service != null) {
        service.unlockJoblet(node,false);
      }
    }
  }
}
Program: 121632
Project: 121632
Buggy source:
public boolean isRed(JobletContainer jobletContainer){
  IProcess2 jobletProcess=(IProcess2)jobletContainer.getNode().getComponent().getProcess();
  ERepositoryStatus status=ProxyRepositoryFactory.getInstance().getStatus(jobletProcess.getProperty().getItem());
  if (status == ERepositoryStatus.LOCK_BY_OTHER) {
    return true;
  }
  IEditorPart[] editors=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getDirtyEditors();
  if (editors.length <= 0) {
    return false;
  }
  for (int i=0; i < editors.length; i++) {
    IEditorPart editor=editors[i];
    RepositoryEditorInput editorInput=(RepositoryEditorInput)editor.getEditorInput();
    String jobletId=editorInput.getId();
    if (jobletId.equals(jobletProcess.getId())) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean isRed(JobletContainer jobletContainer){
  if (true) {
    return false;
  }
  IProcess2 jobletProcess=(IProcess2)jobletContainer.getNode().getComponent().getProcess();
  ERepositoryStatus status=ProxyRepositoryFactory.getInstance().getStatus(jobletProcess.getProperty().getItem());
  if (status == ERepositoryStatus.LOCK_BY_OTHER) {
    return true;
  }
  IEditorPart[] editors=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getDirtyEditors();
  if (editors.length <= 0) {
    return false;
  }
  for (  IEditorPart editor : editors) {
    RepositoryEditorInput editorInput=(RepositoryEditorInput)editor.getEditorInput();
    String jobletId=editorInput.getId();
    if (jobletId.equals(jobletProcess.getId())) {
      return true;
    }
  }
  return false;
}
Program: 121637
Project: 121637
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public void setSource(AbstractNode newSource){
  AbstractNode oldSource=source;
  source=newSource;
  if (eNotificationRequired())   eNotify(new ENotificationImpl(this,Notification.SET,XmlmapPackage.CONNECTION__SOURCE,oldSource,source));
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override public void setSource(AbstractNode newSource){
  AbstractNode oldSource=source;
  source=newSource;
  if (eNotificationRequired())   eNotify(new ENotificationImpl(this,Notification.SET,XmlmapPackage.CONNECTION__SOURCE,oldSource,source));
}
Program: 121638
Project: 121638
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public AbstractNode getTarget(){
  return target;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override public AbstractNode getTarget(){
  return target;
}
Program: 121639
Project: 121639
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public String getName(){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
@Override public String getName(){
  if (eContainer() != null && eContainer() instanceof XmlMapData) {
    return "String_Node_Str" + ((XmlMapData)eContainer()).getConnections().indexOf(this);
  }
  return null;
}
Program: 121640
Project: 121640
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public AbstractNode getSource(){
  return source;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override public AbstractNode getSource(){
  return source;
}
Program: 121641
Project: 121641
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public void setTarget(AbstractNode newTarget){
  AbstractNode oldTarget=target;
  target=newTarget;
  if (eNotificationRequired())   eNotify(new ENotificationImpl(this,Notification.SET,XmlmapPackage.CONNECTION__TARGET,oldTarget,target));
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override public void setTarget(AbstractNode newTarget){
  AbstractNode oldTarget=target;
  target=newTarget;
  if (eNotificationRequired())   eNotify(new ENotificationImpl(this,Notification.SET,XmlmapPackage.CONNECTION__TARGET,oldTarget,target));
}
Program: 121646
Project: 121646
Buggy source:
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  if (unloadedNode != null && !unloadedNode.isEmpty()) {
    String unloadedComponents="String_Node_Str";
    for (int i=0; i < unloadedNode.size(); i++) {
      unloadedComponents=unloadedComponents + unloadedNode.get(i).getComponentName() + "String_Node_Str";
    }
    Problem problem=new Problem();
    problem.setElement(this);
    problem.setStatus(ProblemStatus.ERROR);
    problem.setDescription(Messages.getString("String_Node_Str",unloadedComponents));
    Problems.add(problem);
  }
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}

Fixed version (ground truth):
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}
Program: 121647
Project: 121647
Buggy source:
public void stop(BundleContext context) throws Exception {
  plugin=null;
  super.stop(context);
}

Fixed version (ground truth):
@Override public void stop(BundleContext context) throws Exception {
  plugin=null;
  super.stop(context);
}
Program: 121648
Project: 121648
Buggy source:
public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
  Properties prop=new Properties();
  try {
    prop.load(ComponentDesigenerPlugin.class.getResourceAsStream("String_Node_Str"));
  }
 catch (  IOException e) {
    org.talend.componentdesigner.exception.ExceptionHandler.process(e);
  }
  PropertyConfigurator.configure(prop);
}

Fixed version (ground truth):
@Override public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
}
Program: 121649
Project: 121649
Buggy source:
public void stop(BundleContext context) throws Exception {
  plugin=null;
  super.stop(context);
}

Fixed version (ground truth):
@Override public void stop(BundleContext context) throws Exception {
  plugin=null;
  super.stop(context);
}
Program: 121650
Project: 121650
Buggy source:
public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
  Properties prop=new Properties();
  try {
    prop.load(ComponentDesigenerPlugin.class.getResourceAsStream("String_Node_Str"));
  }
 catch (  IOException e) {
    org.talend.componentdesigner.exception.ExceptionHandler.process(e);
  }
  PropertyConfigurator.configure(prop);
}

Fixed version (ground truth):
@Override public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
}
Program: 121651
Project: 121651
Buggy source:
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  if (unloadedNode != null && !unloadedNode.isEmpty()) {
    String unloadedComponents="String_Node_Str";
    for (int i=0; i < unloadedNode.size(); i++) {
      unloadedComponents=unloadedComponents + unloadedNode.get(i).getComponentName() + "String_Node_Str";
    }
    Problem problem=new Problem();
    problem.setElement(this);
    problem.setStatus(ProblemStatus.ERROR);
    problem.setDescription(Messages.getString("String_Node_Str",unloadedComponents));
    Problems.add(problem);
  }
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}

Fixed version (ground truth):
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}
Program: 121652
Project: 121652
Buggy source:
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  if (unloadedNode != null && !unloadedNode.isEmpty()) {
    String unloadedComponents="String_Node_Str";
    for (int i=0; i < unloadedNode.size(); i++) {
      unloadedComponents=unloadedComponents + unloadedNode.get(i).getComponentName() + "String_Node_Str";
    }
    Problem problem=new Problem();
    problem.setElement(this);
    problem.setStatus(ProblemStatus.ERROR);
    problem.setDescription(Messages.getString("String_Node_Str",unloadedComponents));
    Problems.add(problem);
  }
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}

Fixed version (ground truth):
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}
Program: 121653
Project: 121653
Buggy source:
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  if (!unloadedNode.isEmpty()) {
    String unloadedComponents="String_Node_Str";
    for (int i=0; i < unloadedNode.size(); i++) {
      unloadedComponents=unloadedComponents + unloadedNode.get(i).getComponentName() + "String_Node_Str";
    }
    Problem problem=new Problem();
    problem.setElement(this);
    problem.setStatus(ProblemStatus.ERROR);
    problem.setDescription(Messages.getString("String_Node_Str",unloadedComponents));
    Problems.add(problem);
  }
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}

Fixed version (ground truth):
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  if (unloadedNode != null && !unloadedNode.isEmpty()) {
    String unloadedComponents="String_Node_Str";
    for (int i=0; i < unloadedNode.size(); i++) {
      unloadedComponents=unloadedComponents + unloadedNode.get(i).getComponentName() + "String_Node_Str";
    }
    Problem problem=new Problem();
    problem.setElement(this);
    problem.setStatus(ProblemStatus.ERROR);
    problem.setDescription(Messages.getString("String_Node_Str",unloadedComponents));
    Problems.add(problem);
  }
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}
Program: 121655
Project: 121655
Buggy source:
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  if (!unloadedNode.isEmpty()) {
    String unloadedComponents="String_Node_Str";
    for (int i=0; i < unloadedNode.size(); i++) {
      unloadedComponents=unloadedComponents + unloadedNode.get(i).getComponentName() + "String_Node_Str";
    }
    Problem problem=new Problem();
    problem.setElement(this);
    problem.setStatus(ProblemStatus.ERROR);
    problem.setDescription(Messages.getString("String_Node_Str",unloadedComponents));
    Problems.add(problem);
  }
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}

Fixed version (ground truth):
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  if (unloadedNode != null && !unloadedNode.isEmpty()) {
    String unloadedComponents="String_Node_Str";
    for (int i=0; i < unloadedNode.size(); i++) {
      unloadedComponents=unloadedComponents + unloadedNode.get(i).getComponentName() + "String_Node_Str";
    }
    Problem problem=new Problem();
    problem.setElement(this);
    problem.setStatus(ProblemStatus.ERROR);
    problem.setDescription(Messages.getString("String_Node_Str",unloadedComponents));
    Problems.add(problem);
  }
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}
Program: 121659
Project: 121659
Buggy source:
public void drop(DropTargetEvent event){
  setCurrentEvent(event);
  eraseTargetFeedback();
  handleDrop();
  unload();
}

Fixed version (ground truth):
@Override public void drop(DropTargetEvent event){
  setCurrentEvent(event);
  eraseTargetFeedback();
  handleDrop();
  unload();
}
Program: 121660
Project: 121660
Buggy source:
public void dragEnter(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragEnter(DropTargetEvent event){
}
Program: 121661
Project: 121661
Buggy source:
public void dragOperationChanged(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragOperationChanged(DropTargetEvent event){
}
Program: 121663
Project: 121663
Buggy source:
public void dragLeave(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragLeave(DropTargetEvent event){
}
Program: 121664
Project: 121664
Buggy source:
private void selectAddedObject(){
  List newObjects=getCreateRequest().getNewObjects();
  for (int i=0; i < newObjects.size(); i++) {
    Object model=newObjects.get(i);
    EditPartViewer viewer=getViewer();
    viewer.getControl().forceFocus();
    Object editpart=viewer.getEditPartRegistry().get(model);
    boolean added=false;
    if (editpart instanceof EditPart) {
      if (!added) {
        getViewer().flush();
        viewer.select((EditPart)editpart);
        added=true;
      }
 else {
        viewer.appendSelection((EditPart)editpart);
      }
    }
  }
}

Fixed version (ground truth):
private void selectAddedObject(){
  boolean added=false;
  List newObjects=getCreateRequest().getNewObjects();
  for (int i=0; i < newObjects.size(); i++) {
    Object model=newObjects.get(i);
    EditPartViewer viewer=getViewer();
    viewer.getControl().forceFocus();
    Object editpart=viewer.getEditPartRegistry().get(model);
    if (editpart instanceof EditPart) {
      if (!added) {
        getViewer().flush();
        viewer.select((EditPart)editpart);
        added=true;
      }
 else {
        viewer.appendSelection((EditPart)editpart);
      }
    }
  }
}
Program: 121665
Project: 121665
Buggy source:
/** 
 * @see org.eclipse.gef.ui.parts.GraphicalEditor#initializeGraphicalViewer()
 */
protected void initializeGraphicalViewer(){
  getGraphicalViewer().addDragSourceListener(new XmlDragSourceListener(getGraphicalViewer()));
  getGraphicalViewer().addDropTargetListener(new XmlDropTargetListener(getGraphicalViewer()));
  getGraphicalViewer().addSelectionChangedListener(mapperManager);
  getGraphicalViewer().setContextMenu(new MenueProvider(getGraphicalViewer()));
  initializeActionRegistry();
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.gef.ui.parts.GraphicalEditor#initializeGraphicalViewer()
 */
@Override protected void initializeGraphicalViewer(){
  getGraphicalViewer().addDragSourceListener(new XmlDragSourceListener(getGraphicalViewer()));
  getGraphicalViewer().addDropTargetListener(new XmlDropTargetListener(getGraphicalViewer()));
  getGraphicalViewer().setContextMenu(new MenueProvider(getGraphicalViewer()));
  initializeActionRegistry();
}
Program: 121667
Project: 121667
Buggy source:
/** 
 * @see org.eclipse.gef.ui.parts.GraphicalEditor#configureGraphicalViewer()
 */
protected void configureGraphicalViewer(){
  super.configureGraphicalViewer();
  getGraphicalViewer().setRootEditPart(new XmlMapScalableRootEditPart());
  getGraphicalViewer().setEditPartFactory(new XmlMapPartFactory());
  getGraphicalViewer().setKeyHandler(new GraphicalViewerKeyHandler(getGraphicalViewer()).setParent(getCommonKeyHandler()));
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.gef.ui.parts.GraphicalEditor#configureGraphicalViewer()
 */
@Override protected void configureGraphicalViewer(){
  super.configureGraphicalViewer();
  getGraphicalViewer().setRootEditPart(new XmlMapScalableRootEditPart());
  getGraphicalViewer().setEditPartFactory(new XmlMapPartFactory());
  getGraphicalViewer().setKeyHandler(new GraphicalViewerKeyHandler(getGraphicalViewer()).setParent(getCommonKeyHandler()));
}
Program: 121668
Project: 121668
Buggy source:
protected void createGraphicalViewer(final Composite parent){
  XmlMapGraphicViewer viewer=new XmlMapGraphicViewer();
  viewer.setMapperManager(mapperManager);
  viewer.createControl(parent);
  setGraphicalViewer(viewer);
  configureGraphicalViewer();
  hookGraphicalViewer();
  initializeGraphicalViewer();
}

Fixed version (ground truth):
@Override protected void createGraphicalViewer(final Composite parent){
  XmlMapGraphicViewer viewer=new XmlMapGraphicViewer();
  viewer.setMapperManager(mapperManager);
  viewer.createControl(parent);
  setGraphicalViewer(viewer);
  configureGraphicalViewer();
  hookGraphicalViewer();
  initializeGraphicalViewer();
}
Program: 121669
Project: 121669
Buggy source:
/** 
 * @see org.eclipse.gef.commands.CommandStackListener#commandStackChanged(java.util.EventObject)
 */
public void commandStackChanged(EventObject event){
  firePropertyChange(IEditorPart.PROP_DIRTY);
  super.commandStackChanged(event);
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.gef.commands.CommandStackListener#commandStackChanged(java.util.EventObject)
 */
@Override public void commandStackChanged(EventObject event){
  firePropertyChange(IEditorPart.PROP_DIRTY);
  super.commandStackChanged(event);
}
Program: 121670
Project: 121670
Buggy source:
public void select(EditPart editpart){
  if (editpart instanceof VarTableEditPart) {
    return;
  }
  if (editpart instanceof XmlMapDataEditPart) {
    return;
  }
  if ((getSelectedEditParts().size() == 1) && (getSelectedEditParts().get(0) == editpart))   return;
  primDeselectAll(editpart);
  appendSelection(editpart);
}

Fixed version (ground truth):
@Override public void select(EditPart editpart){
  if (editpart instanceof VarTableEditPart) {
    return;
  }
  if (editpart instanceof XmlMapDataEditPart) {
    return;
  }
  if ((getSelectedEditParts().size() == 1) && (getSelectedEditParts().get(0) == editpart)) {
    return;
  }
  primDeselectAll(editpart);
  appendSelection(editpart);
}
Program: 121671
Project: 121671
Buggy source:
public IFigure findFigureAt(int x,int y,Collection exclude,final Conditional condition){
class ConditionalTreeSearch extends ExclusionSearch {
    ConditionalTreeSearch(    Collection coll){
      super(coll);
    }
    public boolean accept(    IFigure figure){
      EditPart editpart=null;
      while (editpart == null && figure != null) {
        editpart=(EditPart)getVisualPartMap().get(figure);
        figure=figure.getParent();
      }
      return editpart != null && (condition == null || condition.evaluate(editpart));
    }
  }
  return getLightweightSystem().getRootFigure().findFigureAt(x,y,new ConditionalTreeSearch(exclude));
}

Fixed version (ground truth):
public IFigure findFigureAt(int x,int y,Collection exclude,final Conditional condition){
class ConditionalTreeSearch extends ExclusionSearch {
    ConditionalTreeSearch(    Collection coll){
      super(coll);
    }
    @Override public boolean accept(    IFigure figure){
      EditPart editpart=null;
      while (editpart == null && figure != null) {
        editpart=(EditPart)getVisualPartMap().get(figure);
        figure=figure.getParent();
      }
      return editpart != null && (condition == null || condition.evaluate(editpart));
    }
  }
  return getLightweightSystem().getRootFigure().findFigureAt(x,y,new ConditionalTreeSearch(exclude));
}
Program: 121672
Project: 121672
Buggy source:
public void setMapperManager(MapperManager mapperManager){
  this.mapperManager=mapperManager;
}

Fixed version (ground truth):
public void setMapperManager(MapperManager mapperManager){
  this.mapperManager=mapperManager;
  if (!selectionListeners.contains(mapperManager)) {
    mapperManager.setGraphicalViewer(this);
    addSelectionChangedListener(mapperManager);
  }
}
Program: 121673
Project: 121673
Buggy source:
public boolean accept(IFigure figure){
  EditPart editpart=null;
  while (editpart == null && figure != null) {
    editpart=(EditPart)getVisualPartMap().get(figure);
    figure=figure.getParent();
  }
  return editpart != null && (condition == null || condition.evaluate(editpart));
}

Fixed version (ground truth):
@Override public boolean accept(IFigure figure){
  EditPart editpart=null;
  while (editpart == null && figure != null) {
    editpart=(EditPart)getVisualPartMap().get(figure);
    figure=figure.getParent();
  }
  return editpart != null && (condition == null || condition.evaluate(editpart));
}
Program: 121674
Project: 121674
Buggy source:
public CreateAttributeAction(IWorkbenchPart part){
  super(part);
  setId(ID);
  setText("String_Node_Str");
}

Fixed version (ground truth):
public CreateAttributeAction(IWorkbenchPart part,GraphicalViewer graphicViewer){
  super(part);
  this.graphicViewer=graphicViewer;
  setId(ID);
  setText("String_Node_Str");
}
Program: 121676
Project: 121676
Buggy source:
public CreateElementAction(IWorkbenchPart part){
  super(part);
  setId(ID);
  setText("String_Node_Str");
}

Fixed version (ground truth):
public CreateElementAction(IWorkbenchPart part,GraphicalViewer graphicViewer){
  super(part);
  this.graphicViewer=graphicViewer;
  setId(ID);
  setText("String_Node_Str");
}
Program: 121678
Project: 121678
Buggy source:
public CreateNameSpaceAction(IWorkbenchPart part){
  super(part);
  setText("String_Node_Str");
  setId(ID);
}

Fixed version (ground truth):
public CreateNameSpaceAction(IWorkbenchPart part,GraphicalViewer graphicViewer){
  super(part);
  this.graphicViewer=graphicViewer;
  setText("String_Node_Str");
  setId(ID);
}
Program: 121681
Project: 121681
Buggy source:
private void setActivate(boolean activate){
  this.activate=activate;
  firePropertyChange(EParameterName.ACTIVATE.getName(),null,null);
}

Fixed version (ground truth):
public void setActivate(boolean activate){
  this.activate=activate;
  firePropertyChange(EParameterName.ACTIVATE.getName(),null,null);
}
Program: 121684
Project: 121684
Buggy source:
public Connection cloneConnection(IConnection conn,INode source,INode target){
  Connection cloneConn=new Connection(source,target,conn.getLineStyle(),conn.getConnectorName(),conn.getMetaName(),conn.getName(),conn.isMonitorConnection());
  return cloneConn;
}

Fixed version (ground truth):
public Connection cloneConnection(IConnection conn,INode source,INode target){
  Connection cloneConn=new Connection(source,target,conn.getLineStyle(),conn.getConnectorName(),conn.getMetaName(),conn.getName(),conn.isMonitorConnection());
  if (!source.isActivate() || !target.isActivate()) {
    cloneConn.setActivate(false);
  }
  return cloneConn;
}
Program: 121686
Project: 121686
Buggy source:
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}

Fixed version (ground truth):
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  if (!unloadedNode.isEmpty()) {
    String unloadedComponents="String_Node_Str";
    for (int i=0; i < unloadedNode.size(); i++) {
      unloadedComponents=unloadedComponents + unloadedNode.get(i).getComponentName() + "String_Node_Str";
    }
    Problem problem=new Problem();
    problem.setElement(this);
    problem.setStatus(ProblemStatus.ERROR);
    problem.setDescription(Messages.getString("String_Node_Str",unloadedComponents));
    Problems.add(problem);
  }
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}
Program: 121687
Project: 121687
Buggy source:
protected void loadNodes(ProcessType process,Hashtable<String,Node> nodesHashtable) throws PersistenceException {
  EList nodeList;
  NodeType nType;
  nodeList=process.getNode();
  Node nc;
  EList listParamType;
  unloadedNode=new ArrayList<NodeType>();
  for (int i=0; i < nodeList.size(); i++) {
    nType=(NodeType)nodeList.get(i);
    listParamType=nType.getElementParameter();
    IComponent component=ComponentsFactoryProvider.getInstance().get(nType.getComponentName());
    if (component == null) {
      unloadedNode.add(nType);
      continue;
    }
    nc=loadNode(nType,component,nodesHashtable,listParamType);
  }
  for (int i=0; i < unloadedNode.size(); i++) {
    createDummyNode(unloadedNode.get(i),nodesHashtable);
  }
}

Fixed version (ground truth):
protected void loadNodes(ProcessType process,Hashtable<String,Node> nodesHashtable) throws PersistenceException {
  EList nodeList;
  NodeType nType;
  nodeList=process.getNode();
  Node nc;
  EList listParamType;
  unloadedNode=new ArrayList<NodeType>();
  for (int i=0; i < nodeList.size(); i++) {
    nType=(NodeType)nodeList.get(i);
    listParamType=nType.getElementParameter();
    IComponent component=ComponentsFactoryProvider.getInstance().get(nType.getComponentName());
    if (component == null) {
      unloadedNode.add(nType);
      continue;
    }
    nc=loadNode(nType,component,nodesHashtable,listParamType);
  }
  if (!unloadedNode.isEmpty()) {
    for (int i=0; i < unloadedNode.size(); i++) {
      createDummyNode(unloadedNode.get(i),nodesHashtable);
    }
  }
}
Program: 121689
Project: 121689
Buggy source:
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}

Fixed version (ground truth):
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  if (!unloadedNode.isEmpty()) {
    String unloadedComponents="String_Node_Str";
    for (int i=0; i < unloadedNode.size(); i++) {
      unloadedComponents=unloadedComponents + unloadedNode.get(i).getComponentName() + "String_Node_Str";
    }
    Problem problem=new Problem();
    problem.setElement(this);
    problem.setStatus(ProblemStatus.ERROR);
    problem.setDescription(Messages.getString("String_Node_Str",unloadedComponents));
    Problems.add(problem);
  }
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}
Program: 121690
Project: 121690
Buggy source:
protected void loadNodes(ProcessType process,Hashtable<String,Node> nodesHashtable) throws PersistenceException {
  EList nodeList;
  NodeType nType;
  nodeList=process.getNode();
  Node nc;
  EList listParamType;
  unloadedNode=new ArrayList<NodeType>();
  for (int i=0; i < nodeList.size(); i++) {
    nType=(NodeType)nodeList.get(i);
    listParamType=nType.getElementParameter();
    IComponent component=ComponentsFactoryProvider.getInstance().get(nType.getComponentName());
    if (component == null) {
      unloadedNode.add(nType);
      continue;
    }
    nc=loadNode(nType,component,nodesHashtable,listParamType);
  }
  for (int i=0; i < unloadedNode.size(); i++) {
    createDummyNode(unloadedNode.get(i),nodesHashtable);
  }
}

Fixed version (ground truth):
protected void loadNodes(ProcessType process,Hashtable<String,Node> nodesHashtable) throws PersistenceException {
  EList nodeList;
  NodeType nType;
  nodeList=process.getNode();
  Node nc;
  EList listParamType;
  unloadedNode=new ArrayList<NodeType>();
  for (int i=0; i < nodeList.size(); i++) {
    nType=(NodeType)nodeList.get(i);
    listParamType=nType.getElementParameter();
    IComponent component=ComponentsFactoryProvider.getInstance().get(nType.getComponentName());
    if (component == null) {
      unloadedNode.add(nType);
      continue;
    }
    nc=loadNode(nType,component,nodesHashtable,listParamType);
  }
  if (!unloadedNode.isEmpty()) {
    for (int i=0; i < unloadedNode.size(); i++) {
      createDummyNode(unloadedNode.get(i),nodesHashtable);
    }
  }
}
Program: 121691
Project: 121691
Buggy source:
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}

Fixed version (ground truth):
private void checkProblems(){
  Problems.removeProblemsByProcess(this);
  if (!unloadedNode.isEmpty()) {
    String unloadedComponents="String_Node_Str";
    for (int i=0; i < unloadedNode.size(); i++) {
      unloadedComponents=unloadedComponents + unloadedNode.get(i).getComponentName() + "String_Node_Str";
    }
    Problem problem=new Problem();
    problem.setElement(this);
    problem.setStatus(ProblemStatus.ERROR);
    problem.setDescription(Messages.getString("String_Node_Str",unloadedComponents));
    Problems.add(problem);
  }
  for (  INode node : nodes) {
    if (node.isActivate()) {
      node.checkNode();
    }
  }
  Problems.refreshProcessAllNodesStatus(this);
  Problems.refreshProblemTreeView();
}
Program: 121692
Project: 121692
Buggy source:
protected void loadNodes(ProcessType process,Hashtable<String,Node> nodesHashtable) throws PersistenceException {
  EList nodeList;
  NodeType nType;
  nodeList=process.getNode();
  Node nc;
  EList listParamType;
  unloadedNode=new ArrayList<NodeType>();
  for (int i=0; i < nodeList.size(); i++) {
    nType=(NodeType)nodeList.get(i);
    listParamType=nType.getElementParameter();
    IComponent component=ComponentsFactoryProvider.getInstance().get(nType.getComponentName(),componentsType);
    if (component == null) {
      unloadedNode.add(nType);
      continue;
    }
    nc=loadNode(nType,component,nodesHashtable,listParamType);
  }
  for (int i=0; i < unloadedNode.size(); i++) {
    createDummyNode(unloadedNode.get(i),nodesHashtable);
  }
}

Fixed version (ground truth):
protected void loadNodes(ProcessType process,Hashtable<String,Node> nodesHashtable) throws PersistenceException {
  EList nodeList;
  NodeType nType;
  nodeList=process.getNode();
  Node nc;
  EList listParamType;
  unloadedNode=new ArrayList<NodeType>();
  for (int i=0; i < nodeList.size(); i++) {
    nType=(NodeType)nodeList.get(i);
    listParamType=nType.getElementParameter();
    IComponent component=ComponentsFactoryProvider.getInstance().get(nType.getComponentName(),componentsType);
    if (component == null) {
      unloadedNode.add(nType);
      continue;
    }
    nc=loadNode(nType,component,nodesHashtable,listParamType);
  }
  if (!unloadedNode.isEmpty()) {
    for (int i=0; i < unloadedNode.size(); i++) {
      createDummyNode(unloadedNode.get(i),nodesHashtable);
    }
  }
}
Program: 121694
Project: 121694
Buggy source:
private void setActivate(boolean activate){
  this.activate=activate;
  firePropertyChange(EParameterName.ACTIVATE.getName(),null,null);
}

Fixed version (ground truth):
public void setActivate(boolean activate){
  this.activate=activate;
  firePropertyChange(EParameterName.ACTIVATE.getName(),null,null);
}
Program: 121697
Project: 121697
Buggy source:
public Connection cloneConnection(IConnection conn,INode source,INode target){
  Connection cloneConn=new Connection(source,target,conn.getLineStyle(),conn.getConnectorName(),conn.getMetaName(),conn.getName(),conn.isMonitorConnection());
  return cloneConn;
}

Fixed version (ground truth):
public Connection cloneConnection(IConnection conn,INode source,INode target){
  Connection cloneConn=new Connection(source,target,conn.getLineStyle(),conn.getConnectorName(),conn.getMetaName(),conn.getName(),conn.isMonitorConnection());
  if (!source.isActivate() || !target.isActivate()) {
    cloneConn.setActivate(false);
  }
  return cloneConn;
}
Program: 121699
Project: 121699
Buggy source:
private void selectAddedObject(){
  List newObjects=getCreateRequest().getNewObjects();
  for (int i=0; i < newObjects.size(); i++) {
    Object model=newObjects.get(i);
    EditPartViewer viewer=getViewer();
    viewer.getControl().forceFocus();
    Object editpart=viewer.getEditPartRegistry().get(model);
    boolean added=false;
    if (editpart instanceof EditPart) {
      if (!added) {
        getViewer().flush();
        viewer.select((EditPart)editpart);
        added=true;
      }
 else {
        viewer.appendSelection((EditPart)editpart);
      }
    }
  }
}

Fixed version (ground truth):
private void selectAddedObject(){
  boolean added=false;
  List newObjects=getCreateRequest().getNewObjects();
  for (int i=0; i < newObjects.size(); i++) {
    Object model=newObjects.get(i);
    EditPartViewer viewer=getViewer();
    viewer.getControl().forceFocus();
    Object editpart=viewer.getEditPartRegistry().get(model);
    if (editpart instanceof EditPart) {
      if (!added) {
        getViewer().flush();
        viewer.select((EditPart)editpart);
        added=true;
      }
 else {
        viewer.appendSelection((EditPart)editpart);
      }
    }
  }
}
Program: 121702
Project: 121702
Buggy source:
public CreateAttributeAction(IWorkbenchPart part){
  super(part);
  setId(ID);
  setText("String_Node_Str");
}

Fixed version (ground truth):
public CreateAttributeAction(IWorkbenchPart part,GraphicalViewer graphicViewer){
  super(part);
  this.graphicViewer=graphicViewer;
  setId(ID);
  setText("String_Node_Str");
}
Program: 121704
Project: 121704
Buggy source:
public CreateElementAction(IWorkbenchPart part){
  super(part);
  setId(ID);
  setText("String_Node_Str");
}

Fixed version (ground truth):
public CreateElementAction(IWorkbenchPart part,GraphicalViewer graphicViewer){
  super(part);
  this.graphicViewer=graphicViewer;
  setId(ID);
  setText("String_Node_Str");
}
Program: 121706
Project: 121706
Buggy source:
public CreateNameSpaceAction(IWorkbenchPart part){
  super(part);
  setText("String_Node_Str");
  setId(ID);
}

Fixed version (ground truth):
public CreateNameSpaceAction(IWorkbenchPart part,GraphicalViewer graphicViewer){
  super(part);
  this.graphicViewer=graphicViewer;
  setText("String_Node_Str");
  setId(ID);
}
Program: 121711
Project: 121711
Buggy source:
@Override protected void createEditPolicies(){
  installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE,new NonResizableEditPolicy());
  installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE,new XmlDirectEditPolicy());
  installEditPolicy("String_Node_Str",new DragAndDropEditPolicy());
}

Fixed version (ground truth):
@Override protected void createEditPolicies(){
  installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE,new XmlDirectEditPolicy());
  installEditPolicy("String_Node_Str",new DragAndDropEditPolicy());
}
Program: 121713
Project: 121713
Buggy source:
private void deployJarToDesForArchive(final ResourcesManager manager,Set<String> extRoutines){
  if (extRoutines.isEmpty()) {
    return;
  }
  IPath tmpDir=new Path(System.getProperty("String_Node_Str") + File.separatorChar + "String_Node_Str");
  File dirFile=tmpDir.toFile();
  for (Iterator<IPath> iterator=manager.getPaths().iterator(); iterator.hasNext(); ) {
    IPath path=iterator.next();
    String fileName=path.lastSegment();
    if (extRoutines.contains(fileName)) {
      try {
        InputStream is=manager.getStream(path);
        if (!dirFile.exists()) {
          dirFile.mkdirs();
        }
        File temFile=tmpDir.append(fileName).toFile();
        if (temFile.exists()) {
          temFile.delete();
        }
        byte[] b=new byte[1024];
        int length=0;
        BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(temFile,true));
        while ((length=is.read(b)) != -1) {
          fos.write(b,0,length);
        }
        fos.close();
        CorePlugin.getDefault().getLibrariesService().deployLibrary(temFile.toURI().toURL());
        temFile.delete();
      }
 catch (      MalformedURLException e) {
        ExceptionHandler.process(e);
      }
catch (      IOException e) {
        ExceptionHandler.process(e);
      }
    }
  }
  dirFile.delete();
}

Fixed version (ground truth):
private void deployJarToDesForArchive(final ResourcesManager manager,Set<String> extRoutines){
  if (extRoutines.isEmpty()) {
    return;
  }
  IPath tmpDir=new Path(System.getProperty("String_Node_Str") + File.separatorChar + "String_Node_Str");
  File dirFile=tmpDir.toFile();
  for (  IPath path : manager.getPaths()) {
    String fileName=path.lastSegment();
    if (extRoutines.contains(fileName)) {
      try {
        InputStream is=manager.getStream(path);
        if (!dirFile.exists()) {
          dirFile.mkdirs();
        }
        File temFile=tmpDir.append(fileName).toFile();
        if (temFile.exists()) {
          temFile.delete();
        }
        byte[] b=new byte[1024];
        int length=0;
        BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(temFile,true));
        while ((length=is.read(b)) != -1) {
          fos.write(b,0,length);
        }
        fos.close();
        CorePlugin.getDefault().getLibrariesService().deployLibrary(temFile.toURI().toURL());
        temFile.delete();
      }
 catch (      MalformedURLException e) {
        ExceptionHandler.process(e);
      }
catch (      IOException e) {
        ExceptionHandler.process(e);
      }
    }
  }
  dirFile.delete();
}
Program: 121714
Project: 121714
Buggy source:
@SuppressWarnings("String_Node_Str") private void deployJarToDes(final ResourcesManager manager,Set<String> extRoutines){
  File file=null;
  if (extRoutines.isEmpty()) {
    return;
  }
  for (Iterator iterator=manager.getPaths().iterator(); iterator.hasNext(); ) {
    String value=iterator.next().toString();
    file=new File(value);
    if (extRoutines.contains(file.getName())) {
      try {
        CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
      }
 catch (      MalformedURLException e) {
        ExceptionHandler.process(e);
      }
catch (      IOException e) {
        ExceptionHandler.process(e);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void deployJarToDes(final ResourcesManager manager,Set<String> extRoutines){
  File file=null;
  if (extRoutines.isEmpty()) {
    return;
  }
  for (  Object element : manager.getPaths()) {
    String value=element.toString();
    file=new File(value);
    if (extRoutines.contains(file.getName())) {
      try {
        CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
      }
 catch (      MalformedURLException e) {
        ExceptionHandler.process(e);
      }
catch (      IOException e) {
        ExceptionHandler.process(e);
      }
    }
  }
}
Program: 121715
Project: 121715
Buggy source:
public void resolveItem(ResourcesManager manager,ItemRecord itemRecord){
  if (itemRecord.isResolved()) {
    return;
  }
  InputStream stream=null;
  try {
    final Item item=itemRecord.getItem();
    boolean byteArray=(item instanceof FileItem);
    IPath itemPath=getItemPath(itemRecord.getPath());
    stream=manager.getStream(itemPath);
    Resource resource=createResource(itemRecord.getResourceSet(),itemPath,byteArray);
    resource.load(stream,null);
    for (    ReferenceFileItem rfItem : (List<ReferenceFileItem>)item.getReferenceResources()) {
      itemPath=getReferenceItemPath(itemRecord.getPath(),rfItem.getExtension());
      stream=manager.getStream(itemPath);
      Resource rfResource=createResource(itemRecord.getResourceSet(),itemPath,true);
      rfResource.load(stream,null);
    }
    resetItemReference(itemRecord,resource);
  }
 catch (  IOException e) {
  }
 finally {
    if (stream != null) {
      try {
        stream.close();
      }
 catch (      IOException e) {
      }
    }
  }
  itemRecord.setResolved(true);
}

Fixed version (ground truth):
public void resolveItem(ResourcesManager manager,ItemRecord itemRecord){
  if (itemRecord.isResolved()) {
    return;
  }
  InputStream stream=null;
  try {
    final Item item=itemRecord.getItem();
    boolean byteArray=(item instanceof FileItem);
    IPath itemPath=getItemPath(itemRecord.getPath());
    stream=manager.getStream(itemPath);
    Resource resource=createResource(itemRecord.getResourceSet(),itemPath,byteArray);
    if (byteArray) {
      ByteArrayOutputStream baos=new ByteArrayOutputStream();
      byte[] buf=new byte[1024];
      int i=0;
      while ((i=stream.read(buf)) != -1) {
        baos.write(buf,0,i);
      }
      ByteArrayInputStream bais=new ByteArrayInputStream(baos.toByteArray());
      resource.load(bais,null);
    }
 else {
      resource.load(stream,null);
    }
    for (    ReferenceFileItem rfItem : (List<ReferenceFileItem>)item.getReferenceResources()) {
      itemPath=getReferenceItemPath(itemRecord.getPath(),rfItem.getExtension());
      stream=manager.getStream(itemPath);
      Resource rfResource=createResource(itemRecord.getResourceSet(),itemPath,true);
      rfResource.load(stream,null);
    }
    resetItemReference(itemRecord,resource);
  }
 catch (  IOException e) {
  }
 finally {
    if (stream != null) {
      try {
        stream.close();
      }
 catch (      IOException e) {
      }
    }
  }
  itemRecord.setResolved(true);
}
Program: 121717
Project: 121717
Buggy source:
/** 
 * @see org.eclipse.gef.ui.parts.GraphicalEditor#initializeGraphicalViewer()
 */
@Override protected void initializeGraphicalViewer(){
  getGraphicalViewer().addDragSourceListener(createDragSourceListener());
  getGraphicalViewer().addDropTargetListener(createDropTargetListener());
  getGraphicalViewer().addSelectionChangedListener(mapperManager);
  getGraphicalViewer().setContextMenu(new MenueProvider(getGraphicalViewer()));
  initializeActionRegistry();
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.gef.ui.parts.GraphicalEditor#initializeGraphicalViewer()
 */
@Override protected void initializeGraphicalViewer(){
  getGraphicalViewer().addDragSourceListener(createDragSourceListener());
  getGraphicalViewer().addDropTargetListener(createDropTargetListener());
  getGraphicalViewer().setContextMenu(new MenueProvider(getGraphicalViewer()));
  initializeActionRegistry();
}
Program: 121718
Project: 121718
Buggy source:
public void setMapperManager(AbstractMapperManager mapperManager){
  this.mapperManager=mapperManager;
}

Fixed version (ground truth):
public void setMapperManager(AbstractMapperManager mapperManager){
  this.mapperManager=mapperManager;
  if (!selectionListeners.contains(mapperManager)) {
    mapperManager.setGraphicalViewer(this);
    addSelectionChangedListener(mapperManager);
  }
}
Program: 121719
Project: 121719
Buggy source:
public ToolBarButtonImageFigure(Image image){
  setImage(image);
  setOpaque(true);
  initlistener();
  setBorder(new MarginBorder(2));
  if (image != null) {
    this.enabledImage=image;
    this.disabledImage=new Image(image.getDevice(),image,SWT.IMAGE_DISABLE);
    ImageProviderMapper.cacheDisabledImage(disabledImage);
  }
}

Fixed version (ground truth):
public ToolBarButtonImageFigure(Image image){
  setImage(image);
  setOpaque(true);
  initlistener();
  setBorder(new MarginBorder(2));
  if (image != null) {
    this.enabledImage=image;
  }
}
Program: 121720
Project: 121720
Buggy source:
private void changeImage(){
  if (isEnabled()) {
    if (getImage() != enabledImage) {
      setImage(enabledImage);
    }
  }
 else {
    if (getImage() != disabledImage) {
      setImage(disabledImage);
    }
  }
}

Fixed version (ground truth):
private void changeImage(){
  if (isEnabled()) {
    if (getImage() != enabledImage) {
      setImage(enabledImage);
    }
  }
 else {
    this.disabledImage=ImageProviderMapper.getDisabledImage(enabledImage);
    if (getImage() != disabledImage) {
      setImage(disabledImage);
    }
  }
}
Program: 121721
Project: 121721
Buggy source:
/** 
 * You can continue to use the provider after call this method.
 */
public static void releaseImages(){
  Collection<Image> images=imageCache.values();
  for (  Image image : images) {
    if (!image.isDisposed()) {
      image.dispose();
    }
  }
  imageCache.clear();
  for (  Image image : disabledImageCache) {
    if (!image.isDisposed()) {
      image.dispose();
    }
  }
  disabledImageCache.clear();
}

Fixed version (ground truth):
/** 
 * You can continue to use the provider after call this method.
 */
public static void releaseImages(){
  for (  Image image : disabledImageCache.values()) {
    if (!image.isDisposed()) {
      image.dispose();
    }
  }
  disabledImageCache.clear();
  Collection<Image> images=imageCache.values();
  for (  Image image : images) {
    if (!image.isDisposed()) {
      image.dispose();
    }
  }
  imageCache.clear();
}
Program: 121722
Project: 121722
Buggy source:
public static void dispose(ImageInfo imageInfo){
  Image image=imageCache.get(imageInfo);
  if (!image.isDisposed()) {
    image.dispose();
  }
  imageCache.remove(imageInfo);
}

Fixed version (ground truth):
public static void dispose(ImageInfo imageInfo){
  Image image=imageCache.get(imageInfo);
  Image disabledImage=disabledImageCache.get(image);
  if (disabledImage != null && !disabledImage.isDisposed()) {
    disabledImage.dispose();
  }
  disabledImageCache.remove(image);
  if (!image.isDisposed()) {
    image.dispose();
  }
  imageCache.remove(imageInfo);
}