nus-yam/ex-repair huggingface dataset:
Program: 119972
Project: 119972
Buggy source:
/** 
 * Ensures that fields are set.
 * @return
 */
@Override protected boolean checkFieldsValue(){
  String jsonFilePathText=fileFieldJSON.getText();
  if (jsonFilePathText == "String_Node_Str") {
    updateStatus(IStatus.ERROR,"String_Node_Str");
    return false;
  }
  if (!valid) {
    if (isContextMode()) {
      ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(connectionItem.getConnection());
      jsonFilePathText=TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType,jsonFilePathText));
    }
    updateStatus(IStatus.ERROR,"String_Node_Str");
    return false;
  }
  if (jsonFilePathText != null && !jsonFilePathText.equals("String_Node_Str")) {
    File file=new File(jsonFilePathText);
    if (!file.exists() || !isJSONFile(jsonFilePathText)) {
      updateStatus(IStatus.ERROR,"String_Node_Str");
      return false;
    }
  }
  updateStatus(IStatus.OK,null);
  return true;
}

Fixed version (ground truth):
/** 
 * Ensures that fields are set.
 * @return
 */
@Override protected boolean checkFieldsValue(){
  String jsonFilePathText=fileFieldJSON.getText();
  if (jsonFilePathText == "String_Node_Str") {
    updateStatus(IStatus.ERROR,"String_Node_Str");
    return false;
  }
  if (!valid) {
    if (isContextMode()) {
      ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(connectionItem.getConnection());
      jsonFilePathText=TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType,jsonFilePathText));
    }
    updateStatus(IStatus.ERROR,"String_Node_Str");
    return false;
  }
  updateStatus(IStatus.OK,null);
  return true;
}
Program: 119973
Project: 119973
Buggy source:
/** 
 * @param workArea
 */
public Composite createItemList(Composite workArea){
  Group itemComposite=new Group(workArea,0);
  GridLayoutFactory.swtDefaults().numColumns(2).applyTo(itemComposite);
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).hint(400,200).applyTo(itemComposite);
  Label label=new Label(itemComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridDataFactory.swtDefaults().span(2,1).applyTo(label);
  createTreeViewer(itemComposite);
  createSelectionButton(itemComposite);
  CheckboxTreeViewer exportItemsTreeViewer=getExportItemsTreeViewer();
  exportItemsTreeViewer.refresh();
  exportItemsTreeViewer.expandAll();
  exportItemsTreeViewer.collapseAll();
  exportItemsTreeViewer.expandToLevel(4);
  if (!repositoryNodes.isEmpty()) {
    exportItemsTreeViewer.setCheckedElements(repositoryNodes.toArray());
    for (    RepositoryNode node : repositoryNodes) {
      expandParent(exportItemsTreeViewer,node);
      exportItemsTreeViewer.refresh(node);
    }
    selectItems(exportItemsTreeViewer.getTree().getItems());
  }
  return itemComposite;
}

Fixed version (ground truth):
/** 
 * @param workArea
 */
public Composite createItemList(Composite workArea){
  Group itemComposite=new Group(workArea,0);
  GridLayoutFactory.swtDefaults().numColumns(2).applyTo(itemComposite);
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).hint(400,200).applyTo(itemComposite);
  Label label=new Label(itemComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridDataFactory.swtDefaults().grab(true,false).span(2,1).applyTo(label);
  createTreeViewer(itemComposite);
  createSelectionButton(itemComposite);
  CheckboxTreeViewer exportItemsTreeViewer=getExportItemsTreeViewer();
  exportItemsTreeViewer.refresh();
  exportItemsTreeViewer.expandAll();
  exportItemsTreeViewer.collapseAll();
  exportItemsTreeViewer.expandToLevel(4);
  if (!repositoryNodes.isEmpty()) {
    exportItemsTreeViewer.setCheckedElements(repositoryNodes.toArray());
    for (    RepositoryNode node : repositoryNodes) {
      expandParent(exportItemsTreeViewer,node);
      exportItemsTreeViewer.refresh(node);
    }
    selectItems(exportItemsTreeViewer.getTree().getItems());
  }
  return itemComposite;
}
Program: 119975
Project: 119975
Buggy source:
private void loadNotes(ProcessType process){
  for (Iterator iter=process.getNote().iterator(); iter.hasNext(); ) {
    NoteType noteType=(NoteType)iter.next();
    Note note=new Note();
    note.setLocation(new Point(noteType.getPosX(),noteType.getPosY()));
    note.setSize(new Dimension(noteType.getSizeWidth(),noteType.getSizeHeight()));
    note.setOpaque(noteType.isOpaque());
    note.setText(noteType.getText());
    note.setProcess(this);
    loadElementParameters(note,noteType.getElementParameter());
    addNote(note);
  }
}

Fixed version (ground truth):
private void loadNotes(ProcessType process){
  for (Iterator iter=process.getNote().iterator(); iter.hasNext(); ) {
    NoteType noteType=(NoteType)iter.next();
    Note note=new Note();
    note.setLocation(new Point(noteType.getPosX(),noteType.getPosY()));
    note.setSize(new Dimension(noteType.getSizeWidth(),noteType.getSizeHeight()));
    note.setOpaque(noteType.isOpaque());
    note.setText(noteType.getText());
    note.setProcess(this);
    loadElementParameters(note,noteType.getElementParameter());
    addNote(note,false);
  }
}
Program: 119976
Project: 119976
Buggy source:
public void addNote(Note note){
  elem.add(note);
  notes.add(note);
  fireStructureChange(NEED_UPDATE_JOB,elem);
}

Fixed version (ground truth):
public void addNote(Note note){
  addNote(note,true);
}
Program: 119977
Project: 119977
Buggy source:
private void loadNotes(ProcessType process){
  for (Iterator iter=process.getNote().iterator(); iter.hasNext(); ) {
    NoteType noteType=(NoteType)iter.next();
    Note note=new Note();
    note.setLocation(new Point(noteType.getPosX(),noteType.getPosY()));
    note.setSize(new Dimension(noteType.getSizeWidth(),noteType.getSizeHeight()));
    note.setOpaque(noteType.isOpaque());
    note.setText(noteType.getText());
    note.setProcess(this);
    loadElementParameters(note,noteType.getElementParameter());
    addNote(note);
  }
}

Fixed version (ground truth):
private void loadNotes(ProcessType process){
  for (Iterator iter=process.getNote().iterator(); iter.hasNext(); ) {
    NoteType noteType=(NoteType)iter.next();
    Note note=new Note();
    note.setLocation(new Point(noteType.getPosX(),noteType.getPosY()));
    note.setSize(new Dimension(noteType.getSizeWidth(),noteType.getSizeHeight()));
    note.setOpaque(noteType.isOpaque());
    note.setText(noteType.getText());
    note.setProcess(this);
    loadElementParameters(note,noteType.getElementParameter());
    addNote(note,false);
  }
}
Program: 119978
Project: 119978
Buggy source:
public void addNote(Note note){
  elem.add(note);
  notes.add(note);
  fireStructureChange(NEED_UPDATE_JOB,elem);
}

Fixed version (ground truth):
public void addNote(Note note){
  addNote(note,true);
}
Program: 119979
Project: 119979
Buggy source:
@Override public int compare(Node o1,Node o2){
  String s1=o1.getUniqueName().toLowerCase();
  String s2=o2.getUniqueName().toLowerCase();
  if (s1.charAt(0) > s2.charAt(0)) {
    return 1;
  }
 else   if (s1.charAt(0) < s2.charAt(0)) {
    return -1;
  }
 else {
    String alphabet1=s1.replaceAll("String_Node_Str","String_Node_Str");
    String alphabet2=s2.replaceAll("String_Node_Str","String_Node_Str");
    int cmpAlphabet=alphabet1.compareToIgnoreCase(alphabet2);
    if (cmpAlphabet != 0) {
      return cmpAlphabet;
    }
    String numeric1=s1.replaceAll("String_Node_Str","String_Node_Str");
    String numeric2=s2.replaceAll("String_Node_Str","String_Node_Str");
    if ("String_Node_Str".equals(numeric1)) {
      return -1;
    }
    if ("String_Node_Str".equals(numeric2)) {
      return 1;
    }
    int result=Integer.parseInt(numeric1) - Integer.parseInt(numeric2);
    return result;
  }
}

Fixed version (ground truth):
@Override public int compare(Node o1,Node o2){
  String s1=o1.getUniqueName().toLowerCase();
  String s2=o2.getUniqueName().toLowerCase();
  return s1.compareToIgnoreCase(s2);
}
Program: 119982
Project: 119982
Buggy source:
/** 
 * Ensures that fields are set.
 * @return
 */
@Override protected boolean checkFieldsValue(){
  String jsonFilePathText=fileFieldJSON.getText();
  if (jsonFilePathText == "String_Node_Str") {
    updateStatus(IStatus.ERROR,"String_Node_Str");
    return false;
  }
  if (!valid) {
    if (isContextMode()) {
      ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(connectionItem.getConnection());
      jsonFilePathText=TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType,jsonFilePathText));
    }
    updateStatus(IStatus.ERROR,"String_Node_Str");
    return false;
  }
  if (jsonFilePathText != null && !jsonFilePathText.equals("String_Node_Str")) {
    File file=new File(jsonFilePathText);
    if (!file.exists() || !isJSONFile(jsonFilePathText)) {
      updateStatus(IStatus.ERROR,"String_Node_Str");
      return false;
    }
  }
  updateStatus(IStatus.OK,null);
  return true;
}

Fixed version (ground truth):
/** 
 * Ensures that fields are set.
 * @return
 */
@Override protected boolean checkFieldsValue(){
  String jsonFilePathText=fileFieldJSON.getText();
  if (jsonFilePathText == "String_Node_Str") {
    updateStatus(IStatus.ERROR,"String_Node_Str");
    return false;
  }
  if (!valid) {
    if (isContextMode()) {
      ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(connectionItem.getConnection());
      jsonFilePathText=TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType,jsonFilePathText));
    }
    updateStatus(IStatus.ERROR,"String_Node_Str");
    return false;
  }
  updateStatus(IStatus.OK,null);
  return true;
}
Program: 119983
Project: 119983
Buggy source:
/** 
 * @param workArea
 */
public Composite createItemList(Composite workArea){
  Group itemComposite=new Group(workArea,0);
  GridLayoutFactory.swtDefaults().numColumns(2).applyTo(itemComposite);
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).hint(400,200).applyTo(itemComposite);
  Label label=new Label(itemComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridDataFactory.swtDefaults().span(2,1).applyTo(label);
  createTreeViewer(itemComposite);
  createSelectionButton(itemComposite);
  CheckboxTreeViewer exportItemsTreeViewer=getExportItemsTreeViewer();
  exportItemsTreeViewer.refresh();
  exportItemsTreeViewer.expandAll();
  exportItemsTreeViewer.collapseAll();
  exportItemsTreeViewer.expandToLevel(4);
  if (!repositoryNodes.isEmpty()) {
    exportItemsTreeViewer.setCheckedElements(repositoryNodes.toArray());
    for (    RepositoryNode node : repositoryNodes) {
      expandParent(exportItemsTreeViewer,node);
      exportItemsTreeViewer.refresh(node);
    }
    selectItems(exportItemsTreeViewer.getTree().getItems());
  }
  return itemComposite;
}

Fixed version (ground truth):
/** 
 * @param workArea
 */
public Composite createItemList(Composite workArea){
  Group itemComposite=new Group(workArea,0);
  GridLayoutFactory.swtDefaults().numColumns(2).applyTo(itemComposite);
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).hint(400,200).applyTo(itemComposite);
  Label label=new Label(itemComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridDataFactory.swtDefaults().grab(true,false).span(2,1).applyTo(label);
  createTreeViewer(itemComposite);
  createSelectionButton(itemComposite);
  CheckboxTreeViewer exportItemsTreeViewer=getExportItemsTreeViewer();
  exportItemsTreeViewer.refresh();
  exportItemsTreeViewer.expandAll();
  exportItemsTreeViewer.collapseAll();
  exportItemsTreeViewer.expandToLevel(4);
  if (!repositoryNodes.isEmpty()) {
    exportItemsTreeViewer.setCheckedElements(repositoryNodes.toArray());
    for (    RepositoryNode node : repositoryNodes) {
      expandParent(exportItemsTreeViewer,node);
      exportItemsTreeViewer.refresh(node);
    }
    selectItems(exportItemsTreeViewer.getTree().getItems());
  }
  return itemComposite;
}
Program: 119985
Project: 119985
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public void setSelected(final int value){
  if (value != SELECTED_NONE) {
    List<EditPart> listEditParts=this.getViewer().getSelectedEditParts();
    if (listEditParts.size() != 1) {
    }
 else {
      super.setSelected(value);
    }
  }
 else {
    getParent().removeEditPolicy(EditPolicy.LAYOUT_ROLE);
    super.setSelected(value);
  }
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public void setSelected(final int value){
  if (value != SELECTED_NONE) {
    List<EditPart> listEditParts=this.getViewer().getSelectedEditParts();
    if (listEditParts.size() != 1) {
    }
 else {
      super.setSelected(value);
    }
  }
 else {
    super.setSelected(value);
  }
}
Program: 119990
Project: 119990
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public void setSelected(final int value){
  if (value != SELECTED_NONE) {
    List<EditPart> listEditParts=this.getViewer().getSelectedEditParts();
    if (listEditParts.size() != 1) {
    }
 else {
      super.setSelected(value);
    }
  }
 else {
    getParent().removeEditPolicy(EditPolicy.LAYOUT_ROLE);
    super.setSelected(value);
  }
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public void setSelected(final int value){
  if (value != SELECTED_NONE) {
    List<EditPart> listEditParts=this.getViewer().getSelectedEditParts();
    if (listEditParts.size() != 1) {
    }
 else {
      super.setSelected(value);
    }
  }
 else {
    super.setSelected(value);
  }
}
Program: 119994
Project: 119994
Buggy source:
protected Node createDummyNode(NodeType nType,Hashtable<String,Node> nodesHashtable){
  DummyComponent component=new DummyComponent(nType);
  Node nc;
  nc=new Node(component,this);
  nc.setLocation(new Point(nType.getPosX(),nType.getPosY()));
  Point offset=new Point(nType.getOffsetLabelX(),nType.getOffsetLabelY());
  nc.getNodeLabel().setOffset(offset);
  if (nType.isSetSizeX()) {
    nc.setSize(new Dimension(nType.getSizeX(),nType.getSizeY()));
  }
  NodeContainer nodec=null;
  if (nc.isJoblet() || nc.isMapReduce()) {
    nodec=new JobletContainer(nc);
  }
 else {
    nodec=new NodeContainer(nc);
  }
  loadSchema(nc,nType);
  addNodeContainer(nodec);
  nodesHashtable.put(nc.getUniqueName(),nc);
  return nc;
}

Fixed version (ground truth):
protected Node createDummyNode(NodeType nType,Hashtable<String,Node> nodesHashtable){
  DummyComponent component=new DummyComponent(nType);
  Node nc;
  nc=new Node(component,this);
  nc.setLocation(new Point(nType.getPosX(),nType.getPosY()));
  Point offset=new Point(nType.getOffsetLabelX(),nType.getOffsetLabelY());
  nc.getNodeLabel().setOffset(offset);
  if (nType.isSetSizeX()) {
    nc.setSize(new Dimension(nType.getSizeX(),nType.getSizeY()));
  }
  loadElementParameters(nc,nType.getElementParameter());
  NodeContainer nodec=null;
  if (nc.isJoblet() || nc.isMapReduce()) {
    nodec=new JobletContainer(nc);
  }
 else {
    nodec=new NodeContainer(nc);
  }
  loadSchema(nc,nType);
  addNodeContainer(nodec);
  nodesHashtable.put(nc.getUniqueName(),nc);
  return nc;
}
Program: 119995
Project: 119995
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public void setSelected(final int value){
  if (value != SELECTED_NONE) {
    List<EditPart> listEditParts=this.getViewer().getSelectedEditParts();
    if (listEditParts.size() != 1) {
    }
 else {
      super.setSelected(value);
    }
  }
 else {
    getParent().removeEditPolicy(EditPolicy.LAYOUT_ROLE);
    super.setSelected(value);
  }
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public void setSelected(final int value){
  if (value != SELECTED_NONE) {
    List<EditPart> listEditParts=this.getViewer().getSelectedEditParts();
    if (listEditParts.size() != 1) {
    }
 else {
      super.setSelected(value);
    }
  }
 else {
    super.setSelected(value);
  }
}
Program: 119997
Project: 119997
Buggy source:
@Override public Job refreshTemplates(){
  Element oldComponent=null;
  IComponentSettingsView viewer=null;
  if (!CommonUIPlugin.isFullyHeadless()) {
    viewer=(IComponentSettingsView)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IComponentSettingsView.ID);
    if (viewer != null) {
      oldComponent=viewer.getElement();
      viewer.cleanDisplay();
    }
  }
  ComponentCompilations.deleteMarkers();
  ComponentsFactoryProvider.getInstance().resetCache();
  ILibraryManagerService librairesManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
  librairesManagerService.clearCache();
  CorePlugin.getDefault().getLibrariesService().syncLibraries();
  Job job=CodeGeneratorEmittersPoolFactory.initialize();
  IDesignerCoreService designerCoreService=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
  designerCoreService.getLastGeneratedJobsDateMap().clear();
  if (oldComponent != null) {
    viewer.setElement(oldComponent);
  }
  return job;
}

Fixed version (ground truth):
@Override public Job refreshTemplates(){
  Element oldComponent=null;
  IComponentSettingsView viewer=null;
  if (!CommonUIPlugin.isFullyHeadless()) {
    viewer=(IComponentSettingsView)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IComponentSettingsView.ID);
    if (viewer != null) {
      oldComponent=viewer.getElement();
      viewer.cleanDisplay();
    }
  }
  ComponentCompilations.deleteMarkers();
  ComponentsFactoryProvider.getInstance().resetCache();
  ILibraryManagerService librairesManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
  librairesManagerService.clearCache();
  CorePlugin.getDefault().getLibrariesService().syncLibraries();
  Job job=CodeGeneratorEmittersPoolFactory.initialize();
  IDesignerCoreService designerCoreService=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
  designerCoreService.getLastGeneratedJobsDateMap().clear();
  if (oldComponent != null) {
    viewer.setElement(oldComponent);
  }
  if (!CommonUIPlugin.isFullyHeadless()) {
    CorePlugin.getDefault().getDesignerCoreService().synchronizeDesignerUI(new PropertyChangeEvent(this,ComponentUtilities.NORMAL,null,null));
  }
  return job;
}
Program: 119998
Project: 119998
Buggy source:
@Override public void run(){
  CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
  monitor.worked(50);
  ICodeGeneratorService service=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  Job refreshTemplates=service.refreshTemplates();
  refreshTemplates.addJobChangeListener(new JobChangeAdapter(){
    @Override public void done(    org.eclipse.core.runtime.jobs.IJobChangeEvent event){
      ComponentUtilities.updatePalette();
      monitor.worked(100);
      monitor.done();
    }
  }
);
}

Fixed version (ground truth):
@Override public void run(){
  CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
  monitor.worked(50);
  ICodeGeneratorService service=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  Job refreshTemplates=service.refreshTemplates();
}
Program: 120000
Project: 120000
Buggy source:
public static Job initialize(){
  Job job=new Job(Messages.getString("String_Node_Str")){
    @Override protected IStatus run(    IProgressMonitor monitor){
synchronized (delegateMonitor) {
        if (jobRunnable == null) {
          jobRunnable=new JobRunnable(Messages.getString("String_Node_Str"));
          jobRunnable.start();
        }
      }
      delegateMonitor.addDelegate(monitor);
      while (jobRunnable != null && jobRunnable.isAlive()) {
        try {
          Thread.sleep(500);
        }
 catch (        InterruptedException e) {
        }
      }
      delegateMonitor.clearDelegate();
synchronized (delegateMonitor) {
        jobRunnable=null;
      }
      return status;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.LONG);
  job.schedule();
  job.wakeUp();
  return job;
}

Fixed version (ground truth):
public static Job initialize(){
  Job job=new Job(Messages.getString("String_Node_Str")){
    @Override protected IStatus run(    IProgressMonitor monitor){
synchronized (delegateMonitor) {
        if (jobRunnable == null) {
          jobRunnable=new JobRunnable(Messages.getString("String_Node_Str"));
          jobRunnable.start();
        }
      }
      delegateMonitor.addDelegate(monitor);
      while (jobRunnable != null && jobRunnable.isAlive()) {
        try {
          Thread.sleep(500);
        }
 catch (        InterruptedException e) {
        }
      }
      delegateMonitor.clearDelegate();
synchronized (delegateMonitor) {
        jobRunnable=null;
      }
      return status;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.LONG);
  job.schedule();
  job.wakeUp();
  job.addJobChangeListener(new JobChangeAdapter(){
    @Override public void done(    IJobChangeEvent event){
      new UIJob("String_Node_Str"){
        @Override public IStatus runInUIThread(        IProgressMonitor monitor){
          IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
          PerspectiveBarManager barManager=null;
          if (activeWorkbenchWindow != null) {
            barManager=((WorkbenchWindow)activeWorkbenchWindow).getPerspectiveBar();
            if (barManager != null) {
              barManager.getControl().setEnabled(true);
            }
          }
          return org.eclipse.core.runtime.Status.OK_STATUS;
        }
      }
.schedule();
    }
  }
);
  return job;
}
Program: 120003
Project: 120003
Buggy source:
public static Job initialize(){
  Job job=new Job(Messages.getString("String_Node_Str")){
    @Override protected IStatus run(    IProgressMonitor monitor){
synchronized (delegateMonitor) {
        if (jobRunnable == null) {
          jobRunnable=new JobRunnable(Messages.getString("String_Node_Str"));
          jobRunnable.start();
        }
      }
      delegateMonitor.addDelegate(monitor);
      while (jobRunnable != null && jobRunnable.isAlive()) {
        try {
          Thread.sleep(500);
        }
 catch (        InterruptedException e) {
        }
      }
      delegateMonitor.clearDelegate();
synchronized (delegateMonitor) {
        jobRunnable=null;
      }
      return status;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.LONG);
  job.schedule();
  job.wakeUp();
  return job;
}

Fixed version (ground truth):
public static Job initialize(){
  Job job=new Job(Messages.getString("String_Node_Str")){
    @Override protected IStatus run(    IProgressMonitor monitor){
synchronized (delegateMonitor) {
        if (jobRunnable == null) {
          jobRunnable=new JobRunnable(Messages.getString("String_Node_Str"));
          jobRunnable.start();
        }
      }
      delegateMonitor.addDelegate(monitor);
      while (jobRunnable != null && jobRunnable.isAlive()) {
        try {
          Thread.sleep(500);
        }
 catch (        InterruptedException e) {
        }
      }
      delegateMonitor.clearDelegate();
synchronized (delegateMonitor) {
        jobRunnable=null;
      }
      return status;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.LONG);
  job.schedule();
  job.wakeUp();
  job.addJobChangeListener(new JobChangeAdapter(){
    @Override public void done(    IJobChangeEvent event){
      new UIJob("String_Node_Str"){
        @Override public IStatus runInUIThread(        IProgressMonitor monitor){
          IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
          PerspectiveBarManager barManager=null;
          if (activeWorkbenchWindow != null) {
            barManager=((WorkbenchWindow)activeWorkbenchWindow).getPerspectiveBar();
            if (barManager != null) {
              barManager.getControl().setEnabled(true);
            }
          }
          return org.eclipse.core.runtime.Status.OK_STATUS;
        }
      }
.schedule();
    }
  }
);
  return job;
}
Program: 120005
Project: 120005
Buggy source:
@Override public Job refreshTemplates(){
  Element oldComponent=null;
  IComponentSettingsView viewer=null;
  if (!CommonUIPlugin.isFullyHeadless()) {
    viewer=(IComponentSettingsView)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IComponentSettingsView.ID);
    if (viewer != null) {
      oldComponent=viewer.getElement();
      viewer.cleanDisplay();
    }
  }
  ComponentCompilations.deleteMarkers();
  ComponentsFactoryProvider.getInstance().resetCache();
  ILibraryManagerService librairesManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
  librairesManagerService.clearCache();
  CorePlugin.getDefault().getLibrariesService().syncLibraries();
  Job job=CodeGeneratorEmittersPoolFactory.initialize();
  IDesignerCoreService designerCoreService=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
  designerCoreService.getLastGeneratedJobsDateMap().clear();
  if (oldComponent != null) {
    viewer.setElement(oldComponent);
  }
  return job;
}

Fixed version (ground truth):
@Override public Job refreshTemplates(){
  Element oldComponent=null;
  IComponentSettingsView viewer=null;
  if (!CommonUIPlugin.isFullyHeadless()) {
    viewer=(IComponentSettingsView)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IComponentSettingsView.ID);
    if (viewer != null) {
      oldComponent=viewer.getElement();
      viewer.cleanDisplay();
    }
  }
  ComponentCompilations.deleteMarkers();
  ComponentsFactoryProvider.getInstance().resetCache();
  ILibraryManagerService librairesManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
  librairesManagerService.clearCache();
  CorePlugin.getDefault().getLibrariesService().syncLibraries();
  Job job=CodeGeneratorEmittersPoolFactory.initialize();
  IDesignerCoreService designerCoreService=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
  designerCoreService.getLastGeneratedJobsDateMap().clear();
  if (oldComponent != null) {
    viewer.setElement(oldComponent);
  }
  if (!CommonUIPlugin.isFullyHeadless()) {
    CorePlugin.getDefault().getDesignerCoreService().synchronizeDesignerUI(new PropertyChangeEvent(this,IComponentConstants.NORMAL,null,null));
  }
  return job;
}
Program: 120006
Project: 120006
Buggy source:
@Override public void run(){
  CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
  monitor.worked(50);
  ICodeGeneratorService service=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  Job refreshTemplates=service.refreshTemplates();
  refreshTemplates.addJobChangeListener(new JobChangeAdapter(){
    @Override public void done(    org.eclipse.core.runtime.jobs.IJobChangeEvent event){
      ComponentPaletteUtilities.updatePalette();
      monitor.worked(100);
      monitor.done();
    }
  }
);
}

Fixed version (ground truth):
@Override public void run(){
  CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
  monitor.worked(50);
  ICodeGeneratorService service=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  Job refreshTemplates=service.refreshTemplates();
}
Program: 120009
Project: 120009
Buggy source:
public static Job initialize(){
  Job job=new Job(Messages.getString("String_Node_Str")){
    @Override protected IStatus run(    IProgressMonitor monitor){
synchronized (delegateMonitor) {
        if (jobRunnable == null) {
          jobRunnable=new JobRunnable(Messages.getString("String_Node_Str"));
          jobRunnable.start();
        }
      }
      delegateMonitor.addDelegate(monitor);
      while (jobRunnable != null && jobRunnable.isAlive()) {
        try {
          Thread.sleep(500);
        }
 catch (        InterruptedException e) {
        }
      }
      delegateMonitor.clearDelegate();
synchronized (delegateMonitor) {
        jobRunnable=null;
      }
      return status;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.LONG);
  job.schedule();
  job.wakeUp();
  job.addJobChangeListener(new JobChangeAdapter(){
    @Override public void done(    IJobChangeEvent event){
      new UIJob("String_Node_Str"){
        @Override public IStatus runInUIThread(        IProgressMonitor monitor){
          IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
          PerspectiveBarManager barManager=null;
          if (activeWorkbenchWindow != null) {
            barManager=((WorkbenchWindow)activeWorkbenchWindow).getPerspectiveBar();
            if (barManager != null) {
              barManager.getControl().setEnabled(true);
            }
          }
          return org.eclipse.core.runtime.Status.OK_STATUS;
        }
      }
.schedule();
    }
  }
);
  return job;
}

Fixed version (ground truth):
public static Job initialize(){
  Job job=new Job(Messages.getString("String_Node_Str")){
    @Override protected IStatus run(    IProgressMonitor monitor){
synchronized (delegateMonitor) {
        if (jobRunnable == null) {
          jobRunnable=new JobRunnable(Messages.getString("String_Node_Str"));
          jobRunnable.start();
        }
      }
      delegateMonitor.addDelegate(monitor);
      while (jobRunnable != null && jobRunnable.isAlive()) {
        try {
          Thread.sleep(500);
        }
 catch (        InterruptedException e) {
        }
      }
      delegateMonitor.clearDelegate();
synchronized (delegateMonitor) {
        jobRunnable=null;
      }
      return status;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.LONG);
  job.schedule();
  job.wakeUp();
  return job;
}
Program: 120011
Project: 120011
Buggy source:
@Override public Job refreshTemplates(){
  Element oldComponent=null;
  IComponentSettingsView viewer=null;
  if (!CommonUIPlugin.isFullyHeadless()) {
    viewer=(IComponentSettingsView)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IComponentSettingsView.ID);
    if (viewer != null) {
      oldComponent=viewer.getElement();
      viewer.cleanDisplay();
    }
  }
  ComponentCompilations.deleteMarkers();
  ComponentsFactoryProvider.getInstance().resetCache();
  ILibraryManagerService librairesManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
  librairesManagerService.clearCache();
  CorePlugin.getDefault().getLibrariesService().syncLibraries();
  Job job=CodeGeneratorEmittersPoolFactory.initialize();
  IDesignerCoreService designerCoreService=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
  designerCoreService.getLastGeneratedJobsDateMap().clear();
  if (oldComponent != null) {
    viewer.setElement(oldComponent);
  }
  return job;
}

Fixed version (ground truth):
@Override public Job refreshTemplates(){
  Element oldComponent=null;
  IComponentSettingsView viewer=null;
  if (!CommonUIPlugin.isFullyHeadless()) {
    viewer=(IComponentSettingsView)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IComponentSettingsView.ID);
    if (viewer != null) {
      oldComponent=viewer.getElement();
      viewer.cleanDisplay();
    }
  }
  ComponentCompilations.deleteMarkers();
  ComponentsFactoryProvider.getInstance().resetCache();
  ILibraryManagerService librairesManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
  librairesManagerService.clearCache();
  CorePlugin.getDefault().getLibrariesService().syncLibraries();
  Job job=CodeGeneratorEmittersPoolFactory.initialize();
  IDesignerCoreService designerCoreService=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
  designerCoreService.getLastGeneratedJobsDateMap().clear();
  if (oldComponent != null) {
    viewer.setElement(oldComponent);
  }
  if (!CommonUIPlugin.isFullyHeadless()) {
    CorePlugin.getDefault().getDesignerCoreService().synchronizeDesignerUI(new PropertyChangeEvent(this,IComponentConstants.NORMAL,null,null));
  }
  return job;
}
Program: 120012
Project: 120012
Buggy source:
@Override public void run(){
  CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
  monitor.worked(50);
  ICodeGeneratorService service=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  Job refreshTemplates=service.refreshTemplates();
  refreshTemplates.addJobChangeListener(new JobChangeAdapter(){
    @Override public void done(    org.eclipse.core.runtime.jobs.IJobChangeEvent event){
      ComponentPaletteUtilities.updatePalette();
      monitor.worked(100);
      monitor.done();
    }
  }
);
}

Fixed version (ground truth):
@Override public void run(){
  CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
  monitor.worked(50);
  ICodeGeneratorService service=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  Job refreshTemplates=service.refreshTemplates();
}
Program: 120015
Project: 120015
Buggy source:
public static Job initialize(){
  Job job=new Job(Messages.getString("String_Node_Str")){
    @Override protected IStatus run(    IProgressMonitor monitor){
synchronized (delegateMonitor) {
        if (jobRunnable == null) {
          jobRunnable=new JobRunnable(Messages.getString("String_Node_Str"));
          jobRunnable.start();
        }
      }
      delegateMonitor.addDelegate(monitor);
      while (jobRunnable != null && jobRunnable.isAlive()) {
        try {
          Thread.sleep(500);
        }
 catch (        InterruptedException e) {
        }
      }
      delegateMonitor.clearDelegate();
synchronized (delegateMonitor) {
        jobRunnable=null;
      }
      return status;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.LONG);
  job.schedule();
  job.wakeUp();
  job.addJobChangeListener(new JobChangeAdapter(){
    @Override public void done(    IJobChangeEvent event){
      new UIJob("String_Node_Str"){
        @Override public IStatus runInUIThread(        IProgressMonitor monitor){
          IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
          PerspectiveBarManager barManager=null;
          if (activeWorkbenchWindow != null) {
            barManager=((WorkbenchWindow)activeWorkbenchWindow).getPerspectiveBar();
            if (barManager != null) {
              barManager.getControl().setEnabled(true);
            }
          }
          return org.eclipse.core.runtime.Status.OK_STATUS;
        }
      }
.schedule();
    }
  }
);
  return job;
}

Fixed version (ground truth):
public static Job initialize(){
  Job job=new Job(Messages.getString("String_Node_Str")){
    @Override protected IStatus run(    IProgressMonitor monitor){
synchronized (delegateMonitor) {
        if (jobRunnable == null) {
          jobRunnable=new JobRunnable(Messages.getString("String_Node_Str"));
          jobRunnable.start();
        }
      }
      delegateMonitor.addDelegate(monitor);
      while (jobRunnable != null && jobRunnable.isAlive()) {
        try {
          Thread.sleep(500);
        }
 catch (        InterruptedException e) {
        }
      }
      delegateMonitor.clearDelegate();
synchronized (delegateMonitor) {
        jobRunnable=null;
      }
      return status;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.LONG);
  job.schedule();
  job.wakeUp();
  return job;
}
Program: 120019
Project: 120019
Buggy source:
private void getConnFromNode(){
  DriverShim wapperDriver=null;
  ExtractMetaDataUtils extractMeta=ExtractMetaDataUtils.getInstance();
  try {
    List list=null;
    if (dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) {
      list=extractMeta.connect(trueDBTypeForJDBC,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
 else {
      driverJarPath="String_Node_Str";
      list=extractMeta.connect(dbType,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
    if (list != null && list.size() > 0) {
      for (int i=0; i < list.size(); i++) {
        if (list.get(i) instanceof Connection) {
          conn=(Connection)list.get(i);
        }
        if (list.get(i) instanceof DriverShim) {
          wapperDriver=(DriverShim)list.get(i);
        }
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
 finally {
    try {
      ConnectionUtils.closeConnection(conn);
      if (wapperDriver != null && isJavaDB()) {
        wapperDriver.connect("String_Node_Str",null);
      }
    }
 catch (    SQLException e) {
    }
  }
}

Fixed version (ground truth):
private void getConnFromNode(){
  DriverShim wapperDriver=null;
  ExtractMetaDataUtils extractMeta=ExtractMetaDataUtils.getInstance();
  try {
    List list=null;
    if (dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) {
      list=extractMeta.connect(trueDBTypeForJDBC,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
 else {
      driverJarPath="String_Node_Str";
      list=extractMeta.connect(dbType,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
    if (list != null && list.size() > 0) {
      for (int i=0; i < list.size(); i++) {
        if (list.get(i) instanceof Connection) {
          conn=(Connection)list.get(i);
        }
        if (list.get(i) instanceof DriverShim) {
          wapperDriver=(DriverShim)list.get(i);
        }
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
 finally {
    try {
      if (conn != null) {
        ConnectionUtils.closeConnection(conn);
      }
      if (wapperDriver != null && isJavaDB()) {
        wapperDriver.connect("String_Node_Str",null);
      }
    }
 catch (    SQLException e) {
    }
  }
}
Program: 120024
Project: 120024
Buggy source:
@Override public int compare(INode node1,INode node2){
  if (node1.getLinkedMergeInfo().get(mergeNode) > node2.getLinkedMergeInfo().get(mergeNode)) {
    return 1;
  }
 else {
    return -1;
  }
}

Fixed version (ground truth):
@Override public int compare(INode node1,INode node2){
  Map<INode,Integer> mergeInfo1=node1.getLinkedMergeInfo();
  Map<INode,Integer> mergeInfo2=node2.getLinkedMergeInfo();
  for (  INode mNode : mergeNodes) {
    if (mergeInfo1.get(mNode) != null && mergeInfo2.get(mNode) != null) {
      if (mergeInfo1.get(mNode) > mergeInfo2.get(mNode)) {
        return 1;
      }
 else {
        return -1;
      }
    }
    if (mergeInfo1.get(mNode) != null && mergeInfo2.get(mNode) == null) {
      return -1;
    }
    if (mergeInfo1.get(mNode) == null && mergeInfo2.get(mNode) != null) {
      return 1;
    }
  }
  return -1;
}
Program: 120025
Project: 120025
Buggy source:
/** 
 * sort method, make sure the first one is the real start of the merge job
 * @return
 */
public List<INode> getSortedMergeBranchStarts(){
  if (mergeBranchStarts != null) {
    Collections.sort(mergeBranchStarts,new Comparator<INode>(){
      @Override public int compare(      INode node1,      INode node2){
        if (node1.getLinkedMergeInfo().get(mergeNode) > node2.getLinkedMergeInfo().get(mergeNode)) {
          return 1;
        }
 else {
          return -1;
        }
      }
    }
);
  }
  return mergeBranchStarts;
}

Fixed version (ground truth):
/** 
 * sort method, make sure the first one is the real start of the merge job
 * @return
 */
public List<INode> getSortedMergeBranchStarts(){
  if (mergeBranchStarts != null) {
    Collections.sort(mergeBranchStarts,new Comparator<INode>(){
      @Override public int compare(      INode node1,      INode node2){
        Map<INode,Integer> mergeInfo1=node1.getLinkedMergeInfo();
        Map<INode,Integer> mergeInfo2=node2.getLinkedMergeInfo();
        for (        INode mNode : mergeNodes) {
          if (mergeInfo1.get(mNode) != null && mergeInfo2.get(mNode) != null) {
            if (mergeInfo1.get(mNode) > mergeInfo2.get(mNode)) {
              return 1;
            }
 else {
              return -1;
            }
          }
          if (mergeInfo1.get(mNode) != null && mergeInfo2.get(mNode) == null) {
            return -1;
          }
          if (mergeInfo1.get(mNode) == null && mergeInfo2.get(mNode) != null) {
            return 1;
          }
        }
        return -1;
      }
    }
);
  }
  return mergeBranchStarts;
}
Program: 120026
Project: 120026
Buggy source:
/** 
 * unite all the relative merge nodes to this subTree
 * @param node
 */
public void uniteMergeSubTree(List<? extends INode> nodes){
  for (  INode node : nodes) {
    if (node == rootNode) {
      continue;
    }
    if (node.isActivate() && node.isSubProcessStart() && node.getLinkedMergeInfo() != null && node.getLinkedMergeInfo().get(mergeNode) != null) {
      mergeBranchStarts.add(node);
      buildSubTree(node,true);
    }
  }
}

Fixed version (ground truth):
/** 
 * unite all the relative merge nodes to this subTree
 * @param node
 */
public void uniteMergeSubTree(List<? extends INode> nodes){
  for (  INode node : nodes) {
    if (node == rootNode) {
      continue;
    }
    for (    INode mNode : mergeNodes) {
      if (node.isActivate() && node.isSubProcessStart() && node.getLinkedMergeInfo() != null && node.getLinkedMergeInfo().get(mNode) != null) {
        mergeBranchStarts.add(node);
        buildSubTree(node,true);
      }
    }
  }
}
Program: 120027
Project: 120027
Buggy source:
@Test public void testSetTraceData(){
  Map<String,String> map=new HashMap<String,String>();
  map.put("String_Node_Str","String_Node_Str");
  connection.setTraceData(map);
  String value=connection.getTraceData().get("String_Node_Str");
  assertEquals(value,"String_Node_Str");
  connection.setTraceData(null);
  assertNull(connection.getTraceData());
}

Fixed version (ground truth):
@Test public void testSetTraceData(){
  Map<String,TraceData> map=new HashMap<String,TraceData>();
  TraceData data=new TraceData();
  map.put("String_Node_Str",data);
  connection.setTraceData(map);
  TraceData value=connection.getTraceData().get("String_Node_Str");
  assertEquals(data,value);
  connection.setTraceData(null);
  assertNull(connection.getTraceData());
}
Program: 120032
Project: 120032
Buggy source:
@Override public int compare(INode node1,INode node2){
  if (node1.getLinkedMergeInfo().get(mergeNode) > node2.getLinkedMergeInfo().get(mergeNode)) {
    return 1;
  }
 else {
    return -1;
  }
}

Fixed version (ground truth):
@Override public int compare(INode node1,INode node2){
  Map<INode,Integer> mergeInfo1=node1.getLinkedMergeInfo();
  Map<INode,Integer> mergeInfo2=node2.getLinkedMergeInfo();
  for (  INode mNode : mergeNodes) {
    if (mergeInfo1.get(mNode) != null && mergeInfo2.get(mNode) != null) {
      if (mergeInfo1.get(mNode) > mergeInfo2.get(mNode)) {
        return 1;
      }
 else {
        return -1;
      }
    }
    if (mergeInfo1.get(mNode) != null && mergeInfo2.get(mNode) == null) {
      return -1;
    }
    if (mergeInfo1.get(mNode) == null && mergeInfo2.get(mNode) != null) {
      return 1;
    }
  }
  return -1;
}
Program: 120033
Project: 120033
Buggy source:
/** 
 * sort method, make sure the first one is the real start of the merge job
 * @return
 */
public List<INode> getSortedMergeBranchStarts(){
  if (mergeBranchStarts != null) {
    Collections.sort(mergeBranchStarts,new Comparator<INode>(){
      @Override public int compare(      INode node1,      INode node2){
        if (node1.getLinkedMergeInfo().get(mergeNode) > node2.getLinkedMergeInfo().get(mergeNode)) {
          return 1;
        }
 else {
          return -1;
        }
      }
    }
);
  }
  return mergeBranchStarts;
}

Fixed version (ground truth):
/** 
 * sort method, make sure the first one is the real start of the merge job
 * @return
 */
public List<INode> getSortedMergeBranchStarts(){
  if (mergeBranchStarts != null) {
    Collections.sort(mergeBranchStarts,new Comparator<INode>(){
      @Override public int compare(      INode node1,      INode node2){
        Map<INode,Integer> mergeInfo1=node1.getLinkedMergeInfo();
        Map<INode,Integer> mergeInfo2=node2.getLinkedMergeInfo();
        for (        INode mNode : mergeNodes) {
          if (mergeInfo1.get(mNode) != null && mergeInfo2.get(mNode) != null) {
            if (mergeInfo1.get(mNode) > mergeInfo2.get(mNode)) {
              return 1;
            }
 else {
              return -1;
            }
          }
          if (mergeInfo1.get(mNode) != null && mergeInfo2.get(mNode) == null) {
            return -1;
          }
          if (mergeInfo1.get(mNode) == null && mergeInfo2.get(mNode) != null) {
            return 1;
          }
        }
        return -1;
      }
    }
);
  }
  return mergeBranchStarts;
}
Program: 120034
Project: 120034
Buggy source:
/** 
 * unite all the relative merge nodes to this subTree
 * @param node
 */
public void uniteMergeSubTree(List<? extends INode> nodes){
  for (  INode node : nodes) {
    if (node == rootNode) {
      continue;
    }
    if (node.isActivate() && node.isSubProcessStart() && node.getLinkedMergeInfo() != null && node.getLinkedMergeInfo().get(mergeNode) != null) {
      mergeBranchStarts.add(node);
      buildSubTree(node,true);
    }
  }
}

Fixed version (ground truth):
/** 
 * unite all the relative merge nodes to this subTree
 * @param node
 */
public void uniteMergeSubTree(List<? extends INode> nodes){
  for (  INode node : nodes) {
    if (node == rootNode) {
      continue;
    }
    for (    INode mNode : mergeNodes) {
      if (node.isActivate() && node.isSubProcessStart() && node.getLinkedMergeInfo() != null && node.getLinkedMergeInfo().get(mNode) != null) {
        mergeBranchStarts.add(node);
        buildSubTree(node,true);
      }
    }
  }
}
Program: 120040
Project: 120040
Buggy source:
public IExternalData getExternalData(){
  return null;
}

Fixed version (ground truth):
@Override public IExternalData getExternalData(){
  return null;
}
Program: 120041
Project: 120041
Buggy source:
public void renameInputConnection(String oldName,String newName){
  List<Map<String,String>> listRoot=(List<Map<String,String>>)this.getElementParameter(ROOT).getValue();
  boolean flagRoot=false;
  String schemaId=oldName + "String_Node_Str";
  for (  Map<String,String> map : listRoot) {
    String rowName=map.get(COLUMN);
    if (rowName == null) {
      continue;
    }
    if (rowName.equals(oldName)) {
      map.put(COLUMN,newName);
      flagRoot=true;
    }
 else     if (rowName.startsWith(schemaId)) {
      rowName=newName + rowName.substring(rowName.indexOf("String_Node_Str"));
      map.put(COLUMN,rowName);
      flagRoot=true;
    }
  }
  if (flagRoot) {
    this.getElementParameter(ROOT).setValue(listRoot);
  }
}

Fixed version (ground truth):
public void renameInputConnection(String oldName,String newName){
  INode node=getOriginalNode();
  if (oldName != null) {
    IElementParameter elementParameter=this.getElementParameter("String_Node_Str");
    if (elementParameter != null) {
      Object listItemsValue=elementParameter.getValue();
      if (listItemsValue instanceof List) {
        for (        Object obj : (List)listItemsValue) {
          if (obj instanceof Map) {
            Object row=((Map)obj).get("String_Node_Str");
            if (oldName.equals(row)) {
              ((Map)obj).put("String_Node_Str",newName);
            }
          }
        }
      }
    }
  }
  if (node != null && !EmfComponent.REPOSITORY.equals(node.getPropertyValue(EParameterName.PROPERTY_TYPE.getName()))) {
    List<Map<String,String>> listRoot=(List<Map<String,String>>)this.getElementParameter(ROOT).getValue();
    boolean flagRoot=false;
    String schemaId=oldName + "String_Node_Str";
    for (    Map<String,String> map : listRoot) {
      String rowName=map.get(COLUMN);
      if (rowName == null) {
        continue;
      }
      if (rowName.equals(oldName)) {
        map.put(COLUMN,newName);
        flagRoot=true;
      }
 else       if (rowName.startsWith(schemaId)) {
        rowName=newName + rowName.substring(rowName.indexOf("String_Node_Str"));
        map.put(COLUMN,rowName);
        flagRoot=true;
      }
    }
    if (flagRoot) {
      this.getElementParameter(ROOT).setValue(listRoot);
    }
  }
}