nus-yam/ex-repair huggingface dataset:
Program: 121564
Project: 121564
Buggy source:
public String getColumnText(Object element,int columnIndex){
  if (element instanceof ParameterInfo) {
    ParameterInfo para=(ParameterInfo)element;
    if (columnIndex == 0) {
      if (para.getArraySize() != 0) {
        int size=para.getArraySize();
        if (size == -1) {
          return para.getName() + "String_Node_Str" + "String_Node_Str";
        }
 else {
          return para.getName() + "String_Node_Str" + size+ "String_Node_Str";
        }
      }
 else       if (para.getParameterInfos().size() > 0) {
        return para.getName() + "String_Node_Str";
      }
 else {
        return para.getName();
      }
    }
 else     if (columnIndex == 1) {
      if (para.getArraySize() != 0) {
        return para.getIndex() == null ? "String_Node_Str" : para.getIndex();
      }
 else {
        return null;
      }
    }
  }
  return super.getText(element);
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  if (element instanceof ParameterInfo) {
    ParameterInfo para=(ParameterInfo)element;
    if (columnIndex == 0) {
      if (para.getArraySize() != 0) {
        int size=para.getArraySize();
        if (size == -1) {
          return para.getName() + "String_Node_Str" + "String_Node_Str";
        }
 else {
          return para.getName() + "String_Node_Str" + size+ "String_Node_Str";
        }
      }
 else       if (para.getParameterInfos().size() > 0) {
        return para.getName() + "String_Node_Str";
      }
 else {
        return para.getName();
      }
    }
 else     if (columnIndex == 1) {
      if (para.getArraySize() != 0) {
        return para.getIndex() == null ? "String_Node_Str" : para.getIndex();
      }
 else       if (para.getParameterInfos().size() > 1) {
        String index=para.getIndex() == null ? "String_Node_Str" : para.getIndex();
        para.setArraySize(-1);
        para.setIndex("String_Node_Str");
        return index;
      }
 else {
        return null;
      }
    }
  }
  return super.getText(element);
}
Program: 121565
Project: 121565
Buggy source:
/** 
 * bqian create the correct TypeProcessor according to the type.
 * @return
 */
private IRepositoryTypeProcessor createTypeProcessor(){
  for (  IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
    IRepositoryTypeProcessor processor=handler.getRepositoryTypeProcessor(repositoryType);
    if (processor != null) {
      return processor;
    }
  }
  if (type == ERepositoryObjectType.PROCESS) {
    return new JobTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA) {
    return new RepositoryTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
    return new SchemaTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA_CON_QUERY) {
    return new QueryTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA_SAP_FUNCTION) {
    return new SAPFunctionProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.CONTEXT) {
    return new ContextTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA_HEADER_FOOTER) {
    return new HeaderFooterTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA_VALIDATION_RULES) {
    return new ValidationRuleTypeProcessor(repositoryType);
  }
  if (repositoryTypes != null) {
    return new MetadataMultiTypeProcessor(repositoryTypes);
  }
  throw new IllegalArgumentException(Messages.getString("String_Node_Str",type));
}

Fixed version (ground truth):
/** 
 * bqian create the correct TypeProcessor according to the type.
 * @return
 */
private IRepositoryTypeProcessor createTypeProcessor(){
  for (  IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
    IRepositoryTypeProcessor processor=handler.getRepositoryTypeProcessor(repositoryType);
    if (processor != null) {
      return processor;
    }
  }
  if (type == null && repositoryTypes != null) {
    return new MetadataMultiTypeProcessor(repositoryTypes);
  }
  if (type == ERepositoryObjectType.PROCESS) {
    return new JobTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA) {
    return new RepositoryTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
    return new SchemaTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA_CON_QUERY) {
    return new QueryTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA_SAP_FUNCTION) {
    return new SAPFunctionProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.CONTEXT) {
    return new ContextTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA_HEADER_FOOTER) {
    return new HeaderFooterTypeProcessor(repositoryType);
  }
  if (type == ERepositoryObjectType.METADATA_VALIDATION_RULES) {
    return new ValidationRuleTypeProcessor(repositoryType);
  }
  throw new IllegalArgumentException(Messages.getString("String_Node_Str",type));
}
Program: 121568
Project: 121568
Buggy source:
public void run(){
  if (data != null) {
    connection.setTraceData(connAndTraces.get(connection));
    connAndTraces.clear();
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (data != null) {
    connection.setTraceData(connAndTraces.get(connection));
    connAndTraces.clear();
  }
}
Program: 121570
Project: 121570
Buggy source:
/** 
 * Kill the process.
 * @return Exit code of the process.
 */
public synchronized int kill(){
  int exitCode;
  if (!killing && isRunning()) {
    killing=true;
    try {
      exitCode=killProcess();
      if (startingMessageWritten) {
        displayJobEndMessage(exitCode);
      }
    }
  finally {
      killing=false;
    }
  }
 else {
    exitCode=0;
  }
  setRunning(false);
  return exitCode;
}

Fixed version (ground truth):
/** 
 * Kill the process.
 * @return Exit code of the process.
 */
public synchronized int kill(Integer returnExitValue){
  int exitCode;
  if (!killing && isRunning()) {
    killing=true;
    try {
      exitCode=killProcess();
      if (startingMessageWritten) {
        displayJobEndMessage(returnExitValue == null ? exitCode : returnExitValue);
      }
    }
  finally {
      killing=false;
    }
  }
 else {
    exitCode=0;
  }
  setRunning(false);
  return exitCode;
}
Program: 121571
Project: 121571
Buggy source:
/** 
 * Sets the monitorTrace.
 * @param monitorTrace the monitorTraceto set
 */
public void setMonitorTrace(boolean monitorTrace){
  if (this.monitorTrace != monitorTrace) {
    this.monitorTrace=monitorTrace;
    if (process instanceof IProcess2) {
      ((IProcess2)process).setNeedRegenerateCode(true);
    }
    firePropertyChange(TRACE_MONITOR,Boolean.valueOf(!monitorTrace),Boolean.valueOf(monitorTrace));
  }
}

Fixed version (ground truth):
/** 
 * Sets the monitorTrace.
 * @param monitorTrace the monitorTraceto set
 */
public void setMonitorTrace(boolean monitorTrace){
  if (this.monitorTrace != monitorTrace) {
    this.monitorTrace=monitorTrace;
    if (process instanceof IProcess2) {
      process.setNeedRegenerateCode(true);
    }
    firePropertyChange(TRACE_MONITOR,Boolean.valueOf(!monitorTrace),Boolean.valueOf(monitorTrace));
  }
}
Program: 121574
Project: 121574
Buggy source:
private boolean existPreviousDeparCon(Node currentNode){
  boolean hasDeparInPreviousCon=false;
  for (  IConnection con : currentNode.getIncomingConnections()) {
    Node sourceNode=(Node)con.getSource();
    if (sourceNode.getIncomingConnections().size() > 0) {
      for (      IConnection con1 : sourceNode.getIncomingConnections()) {
        if (con1.getElementParameter(EParameterName.DEPARTITIONER.getName()) != null && con1.getElementParameter(EParameterName.DEPARTITIONER.getName()).getValue().equals(true)) {
          hasDeparInPreviousCon=true;
        }
      }
    }
  }
  return hasDeparInPreviousCon;
}

Fixed version (ground truth):
private boolean existPreviousDeparCon(Node currentNode){
  boolean hasDeparInPreviousCon=false;
  for (  IConnection con : currentNode.getIncomingConnections()) {
    Node sourceNode=(Node)con.getSource();
    hasDeparInPreviousCon=isExistPreviouDeparCon(sourceNode);
  }
  return hasDeparInPreviousCon;
}
Program: 121575
Project: 121575
Buggy source:
private boolean isExistPreviouDeparCon(Node previousNode){
  boolean hasParInPreviousCon=false;
  if (previousNode.getIncomingConnections().size() > 0) {
    for (    IConnection con : previousNode.getIncomingConnections()) {
      if (con.getElementParameter(EParameterName.DEPARTITIONER.getName()) != null && con.getElementParameter(EParameterName.DEPARTITIONER.getName()).getValue().equals(true)) {
        hasParInPreviousCon=true;
      }
 else {
        hasParInPreviousCon=isExistPreviousParCon((Node)con.getSource());
      }
    }
  }
  return hasParInPreviousCon;
}

Fixed version (ground truth):
private boolean isExistPreviouDeparCon(Node previousNode){
  boolean hasDeparInPreviousCon=false;
  if (previousNode.getIncomingConnections().size() > 0) {
    for (    IConnection con : previousNode.getIncomingConnections()) {
      if (con.getElementParameter(EParameterName.DEPARTITIONER.getName()) != null && con.getElementParameter(EParameterName.DEPARTITIONER.getName()).getValue().equals(true)) {
        hasDeparInPreviousCon=true;
      }
 else {
        hasDeparInPreviousCon=isExistPreviouDeparCon((Node)con.getSource());
      }
    }
  }
  return hasDeparInPreviousCon;
}
Program: 121577
Project: 121577
Buggy source:
public abstract void updateTitleImage();

Fixed version (ground truth):
protected void updateTitleImage(){
  if (getProcess() == null) {
    return;
  }
  Property property=getProcess().getProperty();
  updateTitleImage(property);
}
Program: 121578
Project: 121578
Buggy source:
@Override public void partClosed(IWorkbenchPart part){
  if (part == AbstractMultiPageTalendEditor.this) {
    restorePropertyInformation();
    IProject currentProject;
    try {
      currentProject=ResourceModelUtils.getProject(ProjectManager.getInstance().getCurrentProject());
      String jobScriptVersion="String_Node_Str";
      if (getEditorInput() != null && getEditorInput() instanceof RepositoryEditorInput) {
        Item item=((RepositoryEditorInput)getEditorInput()).getItem();
        if (item != null) {
          Property property=item.getProperty();
          if (property != null) {
            jobScriptVersion="String_Node_Str" + property.getVersion();
          }
        }
      }
      IFile file=currentProject.getFolder("String_Node_Str").getFile(getEditorInput().getName() + jobScriptVersion + "String_Node_Str"+ "String_Node_Str");
      if (file.exists()) {
        file.delete(true,null);
      }
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
catch (    CoreException e) {
      ExceptionHandler.process(e);
    }
    changeContextsViewStatus(true);
  }
}

Fixed version (ground truth):
@Override public void partClosed(IWorkbenchPart part){
  if (part == AbstractMultiPageTalendEditor.this) {
    savePropertyIfNeededForErrorStatus();
    IProject currentProject;
    try {
      currentProject=ResourceModelUtils.getProject(ProjectManager.getInstance().getCurrentProject());
      String jobScriptVersion="String_Node_Str";
      if (getEditorInput() != null && getEditorInput() instanceof RepositoryEditorInput) {
        Item item=((RepositoryEditorInput)getEditorInput()).getItem();
        if (item != null) {
          Property property=item.getProperty();
          if (property != null) {
            jobScriptVersion="String_Node_Str" + property.getVersion();
          }
        }
      }
      IFile file=currentProject.getFolder("String_Node_Str").getFile(getEditorInput().getName() + jobScriptVersion + "String_Node_Str"+ "String_Node_Str");
      if (file.exists()) {
        file.delete(true,null);
      }
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
catch (    CoreException e) {
      ExceptionHandler.process(e);
    }
    changeContextsViewStatus(true);
  }
}
Program: 121579
Project: 121579
Buggy source:
@Override public void notifyChanged(Notification notification){
  if (notification.getEventType() != Notification.REMOVING_ADAPTER) {
    int featureID=notification.getFeatureID(Properties.class);
    if (featureID == PropertiesPackage.PROPERTY__INFORMATIONS) {
      return;
    }
 else     if (featureID == PropertiesPackage.PROPERTY__MAX_INFORMATION_LEVEL) {
      updateTitleImage();
      return;
    }
    if (Display.getCurrent() != null) {
      propertyIsDirty=true;
      firePropertyChange(IEditorPart.PROP_DIRTY);
    }
  }
}

Fixed version (ground truth):
@Override public void notifyChanged(Notification notification){
  if (notification.getEventType() != Notification.REMOVING_ADAPTER) {
    int featureID=notification.getFeatureID(Properties.class);
    if (featureID == PropertiesPackage.PROPERTY__INFORMATIONS) {
      return;
    }
 else     if (featureID == PropertiesPackage.PROPERTY__MAX_INFORMATION_LEVEL) {
      if (notification.getOldValue() != null && notification.getOldValue().equals(notification.getNewValue())) {
        return;
      }
      Display.getDefault().syncExec(new Runnable(){
        @Override public void run(){
          updateTitleImage();
        }
      }
);
      return;
    }
    if (Display.getCurrent() != null) {
      propertyIsDirty=true;
      firePropertyChange(IEditorPart.PROP_DIRTY);
    }
  }
}
Program: 121581
Project: 121581
Buggy source:
/** 
 * Closes all project files on project close.
 */
@Override public void resourceChanged(final IResourceChangeEvent event){
  if (event.getType() == IResourceChangeEvent.PRE_CLOSE) {
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        IWorkbenchPage[] pages=getSite().getWorkbenchWindow().getPages();
        for (        IWorkbenchPage page : pages) {
          if (((FileEditorInput)designerEditor.getEditorInput()).getFile().getProject().equals(event.getResource())) {
            IEditorPart editorPart=page.findEditor(designerEditor.getEditorInput());
            page.closeEditor(editorPart,true);
          }
        }
      }
    }
);
  }
 else   if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
    updateTitleImage();
  }
}

Fixed version (ground truth):
/** 
 * Closes all project files on project close.
 */
@Override public void resourceChanged(final IResourceChangeEvent event){
  if (event.getType() == IResourceChangeEvent.PRE_CLOSE) {
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        IWorkbenchPage[] pages=getSite().getWorkbenchWindow().getPages();
        for (        IWorkbenchPage page : pages) {
          if (((FileEditorInput)designerEditor.getEditorInput()).getFile().getProject().equals(event.getResource())) {
            IEditorPart editorPart=page.findEditor(designerEditor.getEditorInput());
            page.closeEditor(editorPart,true);
          }
        }
      }
    }
);
  }
}
Program: 121583
Project: 121583
Buggy source:
@Override protected void doRun(){
  ISelection selection=getSelectedObject();
  if (selection == null) {
    return;
  }
  Object obj=((IStructuredSelection)selection).getFirstElement();
  if (obj == null) {
    return;
  }
  RepositoryNode node=(RepositoryNode)obj;
  Property property=node.getObject().getProperty();
  ProcessItem processItem=null;
  if (property != null) {
    ItemCacheManager.clearCache();
    Assert.isTrue(property.getItem() instanceof ProcessItem);
    processItem=(ProcessItem)property.getItem();
    IWorkbenchPage page=getActivePage();
    try {
      final ProcessEditorInput fileEditorInput=new ProcessEditorInput(processItem,true,true);
      checkUnLoadedNodeForProcess(fileEditorInput);
      IEditorPart editorPart=page.findEditor(fileEditorInput);
      if (editorPart == null) {
        fileEditorInput.setRepositoryNode(node);
        editorPart=page.openEditor(fileEditorInput,MultiPageTalendEditor.ID,true);
      }
 else {
        ((MultiPageTalendEditor)editorPart).setReadOnly(fileEditorInput.setForceReadOnly(false));
        page.activate(editorPart);
      }
      if (editorPart instanceof AbstractMultiPageTalendEditor) {
        ((AbstractMultiPageTalendEditor)editorPart).updateTitleImage();
      }
    }
 catch (    PartInitException e) {
      MessageBoxExceptionHandler.process(e);
    }
catch (    PersistenceException e) {
      MessageBoxExceptionHandler.process(e);
    }
  }
}

Fixed version (ground truth):
@Override protected void doRun(){
  ISelection selection=getSelectedObject();
  if (selection == null) {
    return;
  }
  Object obj=((IStructuredSelection)selection).getFirstElement();
  if (obj == null) {
    return;
  }
  RepositoryNode node=(RepositoryNode)obj;
  Property property=node.getObject().getProperty();
  ProcessItem processItem=null;
  if (property != null) {
    ItemCacheManager.clearCache();
    Assert.isTrue(property.getItem() instanceof ProcessItem);
    processItem=(ProcessItem)property.getItem();
    IWorkbenchPage page=getActivePage();
    try {
      final ProcessEditorInput fileEditorInput=new ProcessEditorInput(processItem,true,true);
      checkUnLoadedNodeForProcess(fileEditorInput);
      IEditorPart editorPart=page.findEditor(fileEditorInput);
      if (editorPart == null) {
        fileEditorInput.setRepositoryNode(node);
        editorPart=page.openEditor(fileEditorInput,MultiPageTalendEditor.ID,true);
      }
 else {
        ((MultiPageTalendEditor)editorPart).setReadOnly(fileEditorInput.setForceReadOnly(false));
        page.activate(editorPart);
      }
    }
 catch (    PartInitException e) {
      MessageBoxExceptionHandler.process(e);
    }
catch (    PersistenceException e) {
      MessageBoxExceptionHandler.process(e);
    }
  }
}
Program: 121584
Project: 121584
Buggy source:
@Override public void performRequest(Request req){
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    IFigure findFigureAt=getFigure().findFigureAt(figureLocation.x,figureLocation.y);
    if (findFigureAt instanceof IWidgetCell) {
      directEditManager=new XmlMapNodeDirectEditManager(this,new XmlMapNodeCellEditorLocator((Figure)findFigureAt));
      directEditManager.show();
    }
  }
}

Fixed version (ground truth):
@Override public void performRequest(Request req){
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    IFigure findFigureAt=getFigure().findFigureAt(figureLocation.x,figureLocation.y);
    if (findFigureAt != null && findFigureAt instanceof IWidgetCell) {
      directEditManager=new XmlMapNodeDirectEditManager(this,new XmlMapNodeCellEditorLocator((Figure)findFigureAt));
      directEditManager.show();
    }
    if (directEditManager != null) {
      if (findFigureAt != null && findFigureAt instanceof FilterTextArea) {
        if (figure.containsPoint(figureLocation)) {
          directEditManager.show();
          ((XmlMapGraphicViewer)getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
        }
      }
    }
  }
}
Program: 121585
Project: 121585
Buggy source:
@Override public void performRequest(Request req){
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    IFigure findFigureAt=getFigure().findFigureAt(figureLocation.x,figureLocation.y);
    if (findFigureAt instanceof IWidgetCell) {
      directEditManager=new XmlMapNodeDirectEditManager(this,new XmlMapNodeCellEditorLocator((Figure)findFigureAt));
      directEditManager.show();
    }
  }
}

Fixed version (ground truth):
@Override public void performRequest(Request req){
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    IFigure findFigureAt=getFigure().findFigureAt(figureLocation.x,figureLocation.y);
    if (findFigureAt != null && findFigureAt instanceof IWidgetCell) {
      directEditManager=new XmlMapNodeDirectEditManager(this,new XmlMapNodeCellEditorLocator((Figure)findFigureAt));
      directEditManager.show();
    }
    if (directEditManager != null) {
      if (findFigureAt != null && findFigureAt instanceof FilterTextArea) {
        if (figure.containsPoint(figureLocation)) {
          directEditManager.show();
          ((XmlMapGraphicViewer)getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
        }
      }
    }
  }
}
Program: 121587
Project: 121587
Buggy source:
private boolean existPreviousDeparCon(Node currentNode){
  boolean hasDeparInPreviousCon=false;
  for (  IConnection con : currentNode.getIncomingConnections()) {
    Node sourceNode=(Node)con.getSource();
    hasDeparInPreviousCon=isExistPreviouDeparCon(sourceNode);
  }
  return hasDeparInPreviousCon;
}

Fixed version (ground truth):
private boolean existPreviousDeparCon(Node currentNode){
  boolean hasDeparInPreviousCon=false;
  for (  IConnection con : currentNode.getIncomingConnections()) {
    Node sourceNode=(Node)con.getSource();
    if (sourceNode.getIncomingConnections().size() > 0) {
      for (      IConnection con1 : sourceNode.getIncomingConnections()) {
        if (con1.getElementParameter(EParameterName.DEPARTITIONER.getName()) != null && con1.getElementParameter(EParameterName.DEPARTITIONER.getName()).getValue().equals(true)) {
          hasDeparInPreviousCon=true;
        }
      }
    }
  }
  return hasDeparInPreviousCon;
}
Program: 121591
Project: 121591
Buggy source:
public void widgetSelected(SelectionEvent event){
  if (fileFieldJSON.getResult() == null) {
    return;
  }
  String text=fileFieldJSON.getText();
  if (isContextMode()) {
    ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(connectionItem.getConnection(),true);
    text=TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType,text));
  }
  File file=new File(text);
  if (file.exists()) {
    if (file.exists()) {
      String tempxml=null;
      if (JSONFileStep1Form.this.wizard.getTempJsonPath() == null || JSONFileStep1Form.this.wizard.getTempJsonPath().length() == 0) {
        tempxml=JSONUtil.changeJsonToXml(text);
        JSONFileStep1Form.this.wizard.setTempJsonPath(tempxml);
      }
 else {
        tempxml=JSONFileStep1Form.this.wizard.getTempJsonPath();
      }
      valid=treePopulator.populateTree(tempxml,treeNode);
    }
    checkFieldsValue();
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent event){
  if (fileFieldJSON.getResult() == null) {
    return;
  }
  String text=fileFieldJSON.getText();
  if (isContextMode()) {
    ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(connectionItem.getConnection(),true);
    text=TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType,text));
  }
  File file=new File(text);
  if (file.exists()) {
    if (file.exists()) {
      String tempxml=JSONUtil.changeJsonToXml(text);
      JSONFileStep1Form.this.wizard.setTempJsonPath(tempxml);
      valid=treePopulator.populateTree(tempxml,treeNode);
    }
    checkFieldsValue();
  }
}
Program: 121595
Project: 121595
Buggy source:
@Override public void updateLogFiles(IProject project){
  if (project == null) {
    return;
  }
  try {
    Path path=new Path(JavaUtils.JAVA_SRC_DIRECTORY);
    IFolder srcFolder=project.getFolder(path);
    if (srcFolder == null) {
      return;
    }
    IFile commonLogFile=srcFolder.getFile("String_Node_Str");
    String commonLogStr=getTemplateStrFromPreferenceStore(RunProcessPrefsConstants.COMMON_LOGGING_PROPERTIES_TEMPLATE);
    if (commonLogStr != null) {
      File clFile=new File(commonLogFile.getLocation().toOSString());
      if (!clFile.exists()) {
        FileOutputStream clFileFileOutputStream=null;
        try {
          clFileFileOutputStream=new FileOutputStream(clFile);
          clFileFileOutputStream.write(commonLogStr.getBytes());
        }
  finally {
          clFileFileOutputStream.close();
        }
      }
    }
    IFile log4jFile=srcFolder.getFile("String_Node_Str");
    String log4jStr=getTemplateStrFromPreferenceStore(RunProcessPrefsConstants.LOG4J_PROPERTIES_TEMPLATE);
    if (log4jStr != null) {
      File ljFile=new File(log4jFile.getLocation().toOSString());
      FileOutputStream ljFileOutputStream=null;
      try {
        ljFileOutputStream=new FileOutputStream(ljFile);
        ljFileOutputStream.write(log4jStr.getBytes());
      }
  finally {
        ljFileOutputStream.close();
      }
    }
    srcFolder.refreshLocal(IResource.DEPTH_ONE,null);
    project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD,null);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@Override public void updateLogFiles(IProject project){
  if (project == null) {
    return;
  }
  try {
    Path path=new Path(JavaUtils.JAVA_SRC_DIRECTORY);
    IFolder srcFolder=project.getFolder(path);
    if (srcFolder == null) {
      return;
    }
    IFile commonLogFile=srcFolder.getFile("String_Node_Str");
    String commonLogStr=getTemplateStrFromPreferenceStore(RunProcessPrefsConstants.COMMON_LOGGING_PROPERTIES_TEMPLATE);
    if (commonLogStr != null) {
      File clFile=new File(commonLogFile.getLocation().toOSString());
      if (!clFile.exists()) {
        FileOutputStream clFileFileOutputStream=null;
        try {
          clFileFileOutputStream=new FileOutputStream(clFile);
          clFileFileOutputStream.write(commonLogStr.getBytes());
        }
  finally {
          clFileFileOutputStream.close();
        }
      }
    }
    IFile log4jFile=srcFolder.getFile("String_Node_Str");
    String log4jStr=getTemplateStrFromPreferenceStore(RunProcessPrefsConstants.LOG4J_PROPERTIES_TEMPLATE);
    if (log4jStr != null) {
      File ljFile=new File(log4jFile.getLocation().toOSString());
      FileOutputStream ljFileOutputStream=null;
      try {
        ljFileOutputStream=new FileOutputStream(ljFile);
        ljFileOutputStream.write(log4jStr.getBytes());
      }
  finally {
        ljFileOutputStream.close();
      }
    }
    srcFolder.refreshLocal(IResource.DEPTH_ONE,null);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 121599
Project: 121599
Buggy source:
protected final Perl5Substitution getRenameSubstitution(String newName){
  return new Perl5Substitution(newName + "String_Node_Str",Perl5Substitution.INTERPOLATE_ALL);
}

Fixed version (ground truth):
protected final Perl5Substitution getRenameSubstitution(String newName){
  if (substitutionsCache.containsKey(newName)) {
    return substitutionsCache.get(newName);
  }
  Perl5Substitution ps=new Perl5Substitution(newName + "String_Node_Str",Perl5Substitution.INTERPOLATE_ALL);
  substitutionsCache.put(newName,ps);
  return ps;
}
Program: 121600
Project: 121600
Buggy source:
protected final Pattern getRenamePattern(String oldName){
  PatternCompiler compiler=new Perl5Compiler();
  Pattern pattern=null;
  try {
    pattern=compiler.compile("String_Node_Str" + UpdateContextVariablesHelper.replaceSpecialChar(oldName) + "String_Node_Str");
    return pattern;
  }
 catch (  MalformedPatternException e) {
    ExceptionHandler.process(e);
    return null;
  }
}

Fixed version (ground truth):
protected final Pattern getRenamePattern(String oldName){
  if (patternsCache.containsKey(oldName)) {
    return patternsCache.get(oldName);
  }
  PatternCompiler compiler=new Perl5Compiler();
  Pattern pattern=null;
  try {
    pattern=compiler.compile("String_Node_Str" + UpdateContextVariablesHelper.replaceSpecialChar(oldName) + "String_Node_Str");
    patternsCache.put(oldName,pattern);
    return pattern;
  }
 catch (  MalformedPatternException e) {
    ExceptionHandler.process(e);
    return null;
  }
}
Program: 121601
Project: 121601
Buggy source:
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;
}

Fixed version (ground truth):
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 (  IEditorPart editor : editors) {
    RepositoryEditorInput editorInput=(RepositoryEditorInput)editor.getEditorInput();
    String jobletId=editorInput.getId();
    if (jobletId.equals(jobletProcess.getId())) {
      return true;
    }
  }
  return false;
}
Program: 121602
Project: 121602
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: 121603
Project: 121603
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: 121606
Project: 121606
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){
  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: 121609
Project: 121609
Buggy source:
private IPath getItemPath(IPath path){
  return path.removeFileExtension().addFileExtension(FileConstants.ITEM_EXTENSION);
}

Fixed version (ground truth):
private IPath getItemPath(IPath path,Item item){
  if (item.getFileExtension() != null) {
    return path.removeFileExtension().addFileExtension(item.getFileExtension());
  }
 else {
    return path.removeFileExtension().addFileExtension(FileConstants.ITEM_EXTENSION);
  }
}
Program: 121610
Project: 121610
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);
    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);
}

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(),item);
    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: 121611
Project: 121611
Buggy source:
protected final Perl5Substitution getRenameSubstitution(String newName){
  return new Perl5Substitution(newName + "String_Node_Str",Perl5Substitution.INTERPOLATE_ALL);
}

Fixed version (ground truth):
protected final Perl5Substitution getRenameSubstitution(String newName){
  if (substitutionsCache.containsKey(newName)) {
    return substitutionsCache.get(newName);
  }
  Perl5Substitution ps=new Perl5Substitution(newName + "String_Node_Str",Perl5Substitution.INTERPOLATE_ALL);
  substitutionsCache.put(newName,ps);
  return ps;
}
Program: 121612
Project: 121612
Buggy source:
public boolean useData(String name){
  if (super.useData(name)) {
    return true;
  }
  if (hasOrRenameData(name,null,false)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean useData(String name){
  if (super.useData(name)) {
    return true;
  }
  if (hasOrRenameData(name,null,false)) {
    return true;
  }
  return false;
}
Program: 121613
Project: 121613
Buggy source:
public void renameData(String oldName,String newName){
  super.renameData(oldName,newName);
  hasOrRenameData(oldName,newName,true);
}

Fixed version (ground truth):
@Override public void renameData(String oldName,String newName){
  super.renameData(oldName,newName);
  hasOrRenameData(oldName,newName,true);
}
Program: 121614
Project: 121614
Buggy source:
public void initialize(){
  initElementParameters();
}

Fixed version (ground truth):
@Override public void initialize(){
  initElementParameters();
}
Program: 121615
Project: 121615
Buggy source:
protected final Pattern getRenamePattern(String oldName){
  PatternCompiler compiler=new Perl5Compiler();
  Pattern pattern=null;
  try {
    pattern=compiler.compile("String_Node_Str" + UpdateContextVariablesHelper.replaceSpecialChar(oldName) + "String_Node_Str");
    return pattern;
  }
 catch (  MalformedPatternException e) {
    ExceptionHandler.process(e);
    return null;
  }
}

Fixed version (ground truth):
protected final Pattern getRenamePattern(String oldName){
  if (patternsCache.containsKey(oldName)) {
    return patternsCache.get(oldName);
  }
  PatternCompiler compiler=new Perl5Compiler();
  Pattern pattern=null;
  try {
    pattern=compiler.compile("String_Node_Str" + UpdateContextVariablesHelper.replaceSpecialChar(oldName) + "String_Node_Str");
    patternsCache.put(oldName,pattern);
    return pattern;
  }
 catch (  MalformedPatternException e) {
    ExceptionHandler.process(e);
    return null;
  }
}
Program: 121616
Project: 121616
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: 121617
Project: 121617
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: 121619
Project: 121619
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){
  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: 121621
Project: 121621
Buggy source:
protected final Perl5Substitution getRenameSubstitution(String newName){
  return new Perl5Substitution(newName + "String_Node_Str",Perl5Substitution.INTERPOLATE_ALL);
}

Fixed version (ground truth):
protected final Perl5Substitution getRenameSubstitution(String newName){
  if (substitutionsCache.containsKey(newName)) {
    return substitutionsCache.get(newName);
  }
  Perl5Substitution ps=new Perl5Substitution(newName + "String_Node_Str",Perl5Substitution.INTERPOLATE_ALL);
  substitutionsCache.put(newName,ps);
  return ps;
}
Program: 121622
Project: 121622
Buggy source:
public boolean useData(String name){
  if (super.useData(name)) {
    return true;
  }
  if (hasOrRenameData(name,null,false)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean useData(String name){
  if (super.useData(name)) {
    return true;
  }
  if (hasOrRenameData(name,null,false)) {
    return true;
  }
  return false;
}
Program: 121623
Project: 121623
Buggy source:
public void renameData(String oldName,String newName){
  super.renameData(oldName,newName);
  hasOrRenameData(oldName,newName,true);
}

Fixed version (ground truth):
@Override public void renameData(String oldName,String newName){
  super.renameData(oldName,newName);
  hasOrRenameData(oldName,newName,true);
}
Program: 121624
Project: 121624
Buggy source:
public void initialize(){
  initElementParameters();
}

Fixed version (ground truth):
@Override public void initialize(){
  initElementParameters();
}
Program: 121625
Project: 121625
Buggy source:
protected final Pattern getRenamePattern(String oldName){
  PatternCompiler compiler=new Perl5Compiler();
  Pattern pattern=null;
  try {
    pattern=compiler.compile("String_Node_Str" + UpdateContextVariablesHelper.replaceSpecialChar(oldName) + "String_Node_Str");
    return pattern;
  }
 catch (  MalformedPatternException e) {
    ExceptionHandler.process(e);
    return null;
  }
}

Fixed version (ground truth):
protected final Pattern getRenamePattern(String oldName){
  if (patternsCache.containsKey(oldName)) {
    return patternsCache.get(oldName);
  }
  PatternCompiler compiler=new Perl5Compiler();
  Pattern pattern=null;
  try {
    pattern=compiler.compile("String_Node_Str" + UpdateContextVariablesHelper.replaceSpecialChar(oldName) + "String_Node_Str");
    patternsCache.put(oldName,pattern);
    return pattern;
  }
 catch (  MalformedPatternException e) {
    ExceptionHandler.process(e);
    return null;
  }
}
Program: 121626
Project: 121626
Buggy source:
public void actionPerformed(ActionEvent event){
  doCollapse();
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent event){
  doCollapse();
}
Program: 121627
Project: 121627
Buggy source:
/** 
 * DOC hwang JobletContainerFigure constructor comment.
 * @param model
 */
public JobletContainerFigure(final JobletContainer jobletContainer){
  setLayoutManager(new FreeformLayout());
  this.jobletContainer=jobletContainer;
  outlineFigure=new RoundedRectangle();
  rectFig=new RoundedRectangle();
  titleFigure=new SimpleHtmlFigure();
  titleFigure.setOpaque(true);
  collapseFigure=new JobletCollapseFigure();
  collapseFigure.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent event){
      doCollapse();
    }
  }
);
  errorFigure=new ImageFigure();
  errorFigure.setImage(ImageProvider.getImage(EImage.ERROR_SMALL));
  errorFigure.setVisible(false);
  errorFigure.setSize(errorFigure.getPreferredSize());
  this.add(errorFigure);
  htmlStatusHint=new SimpleHtmlFigure();
  initSubJobTitleColor();
  updateData();
  initializejobletContainer(jobletContainer.getJobletContainerRectangle());
}

Fixed version (ground truth):
/** 
 * DOC hwang JobletContainerFigure constructor comment.
 * @param model
 */
public JobletContainerFigure(final JobletContainer jobletContainer){
  setLayoutManager(new FreeformLayout());
  this.jobletContainer=jobletContainer;
  outlineFigure=new RoundedRectangle();
  rectFig=new RoundedRectangle();
  titleFigure=new SimpleHtmlFigure();
  titleFigure.setOpaque(true);
  collapseFigure=new JobletCollapseFigure();
  collapseFigure.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent event){
      doCollapse();
    }
  }
);
  errorFigure=new ImageFigure();
  errorFigure.setImage(ImageProvider.getImage(EImage.ERROR_SMALL));
  errorFigure.setVisible(false);
  errorFigure.setSize(errorFigure.getPreferredSize());
  this.add(errorFigure);
  htmlStatusHint=new SimpleHtmlFigure();
  initSubJobTitleColor();
  updateData();
  initializejobletContainer(jobletContainer.getJobletContainerRectangle());
}