nus-yam/ex-repair huggingface dataset:
Program: 121207
Project: 121207
Buggy source:
public void prepareXlsxFile(String fileName) throws Exception {
  File xlsxFile=new File(fileName);
  if (xlsxFile.exists()) {
    if (isAbsY && keepCellFormat) {
      initPreXlsx(fileName);
    }
    if (appendWorkbook) {
      InputStream inp=new FileInputStream(fileName);
      wb=WorkbookFactory.create(inp);
      sheet=wb.getSheet(sheetName);
      if (sheet != null) {
        if (appendSheet) {
          if (sheet.getLastRowNum() != 0 || sheet.getRow(0) != null) {
            curY=sheet.getLastRowNum() + 1;
          }
        }
 else {
          wb.removeSheetAt(wb.getSheetIndex(sheetName));
          sheet=wb.createSheet(sheetName);
        }
      }
 else {
        sheet=wb.createSheet(sheetName);
      }
    }
 else {
      xlsxFile.delete();
      wb=new SXSSFWorkbook(rowAccessWindowSize);
      sheet=wb.createSheet(sheetName);
    }
  }
 else {
    wb=new SXSSFWorkbook(rowAccessWindowSize);
    sheet=wb.createSheet(sheetName);
  }
  if (isAbsY) {
    startX=absX;
    curY=absY;
  }
}

Fixed version (ground truth):
public void prepareXlsxFile(String fileName) throws Exception {
  File xlsxFile=new File(fileName);
  if (xlsxFile.exists()) {
    if (isAbsY && keepCellFormat) {
      initPreXlsx(fileName);
    }
    if (appendWorkbook) {
      InputStream inp=new FileInputStream(fileName);
      wb=WorkbookFactory.create(inp);
      sheet=wb.getSheet(sheetName);
      if (sheet != null) {
        if (appendSheet) {
          if (sheet.getLastRowNum() != 0 || sheet.getRow(0) != null) {
            curY=sheet.getLastRowNum() + 1;
          }
          ((XSSFSheet)sheet).setForceFormulaRecalculation(true);
        }
 else {
          wb.removeSheetAt(wb.getSheetIndex(sheetName));
          sheet=wb.createSheet(sheetName);
        }
      }
 else {
        sheet=wb.createSheet(sheetName);
      }
    }
 else {
      xlsxFile.delete();
      wb=new SXSSFWorkbook(rowAccessWindowSize);
      sheet=wb.createSheet(sheetName);
    }
  }
 else {
    wb=new SXSSFWorkbook(rowAccessWindowSize);
    sheet=wb.createSheet(sheetName);
  }
  if (isAbsY) {
    startX=absX;
    curY=absY;
  }
}
Program: 121208
Project: 121208
Buggy source:
public static boolean isDragable(TreeNode treeNode){
  if (treeNode.getChildren().isEmpty()) {
    return true;
  }
 else {
    for (    TreeNode child : treeNode.getChildren()) {
      if (!NodeType.ATTRIBUT.equals(child.getNodeType()) && !NodeType.NAME_SPACE.equals(child.getNodeType())) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
public static boolean isDragable(TreeNode treeNode){
  if (treeNode.isChoice() || treeNode.isSubstitution()) {
    return false;
  }
  if (treeNode.getChildren().isEmpty()) {
    return true;
  }
 else {
    for (    TreeNode child : treeNode.getChildren()) {
      if (!NodeType.ATTRIBUT.equals(child.getNodeType()) && !NodeType.NAME_SPACE.equals(child.getNodeType())) {
        return false;
      }
    }
  }
  return true;
}
Program: 121209
Project: 121209
Buggy source:
private void disableParallelization(INode node){
  if (node.getOutgoingConnections().size() > 0) {
    for (    IConnection con : node.getOutgoingConnections()) {
      EConnectionType lineStyle=con.getLineStyle();
      if (lineStyle.hasConnectionCategory(IConnectionCategory.MAIN) || lineStyle.hasConnectionCategory(IConnectionCategory.MERGE)) {
        con.getElementParameter(EParameterName.REPARTITIONER.getName()).setValue(Boolean.FALSE);
        con.getElementParameter(EParameterName.DEPARTITIONER.getName()).setValue(Boolean.FALSE);
        con.getElementParameter(EParameterName.PARTITIONER.getName()).setValue(Boolean.FALSE);
        con.setPropertyValue(EParameterName.NONE.getName(),Boolean.TRUE);
        if (con.getTarget() != null) {
          disableParallelization(con.getTarget());
        }
      }
 else {
        node=con.getTarget();
        disableParallelization(node);
      }
    }
  }
}

Fixed version (ground truth):
private void disableParallelization(INode node){
  if (node.getOutgoingConnections().size() > 0) {
    for (    IConnection con : node.getOutgoingConnections()) {
      EConnectionType lineStyle=con.getLineStyle();
      if (lineStyle.hasConnectionCategory(IConnectionCategory.DATA)) {
        con.getElementParameter(EParameterName.REPARTITIONER.getName()).setValue(Boolean.FALSE);
        con.getElementParameter(EParameterName.DEPARTITIONER.getName()).setValue(Boolean.FALSE);
        con.getElementParameter(EParameterName.PARTITIONER.getName()).setValue(Boolean.FALSE);
        con.setPropertyValue(EParameterName.NONE.getName(),Boolean.TRUE);
        if (con.getTarget() != null) {
          disableParallelization(con.getTarget());
        }
      }
 else {
        node=con.getTarget();
        disableParallelization(node);
      }
    }
  }
}
Program: 121211
Project: 121211
Buggy source:
private void setDeparallelization(INode node){
  if (node.isActivate()) {
    for (    IConnection con : node.getIncomingConnections()) {
      if (con.isActivate()) {
        EConnectionType lineStyle=con.getLineStyle();
        if (lineStyle.hasConnectionCategory(IConnectionCategory.MAIN) || lineStyle.hasConnectionCategory(IConnectionCategory.MERGE)) {
          IElementParameter parElem=con.getElementParameter(EParameterName.PARTITIONER.getName());
          parElem.setValue(Boolean.FALSE);
          con.getElementParameter(EParameterName.REPARTITIONER.getName()).setValue(Boolean.FALSE);
          con.getElementParameter(EParameterName.NONE.getName()).setValue(Boolean.FALSE);
          con.setPropertyValue(EParameterName.DEPARTITIONER.getName(),Boolean.TRUE);
        }
      }
    }
    if (node.getOutgoingConnections().size() > 0) {
      setParallelization(node);
    }
  }
}

Fixed version (ground truth):
private void setDeparallelization(INode node){
  if (node.isActivate()) {
    for (    IConnection con : node.getIncomingConnections()) {
      if (con.isActivate()) {
        EConnectionType lineStyle=con.getLineStyle();
        if (lineStyle.hasConnectionCategory(IConnectionCategory.DATA)) {
          IElementParameter parElem=con.getElementParameter(EParameterName.PARTITIONER.getName());
          parElem.setValue(Boolean.FALSE);
          con.getElementParameter(EParameterName.REPARTITIONER.getName()).setValue(Boolean.FALSE);
          con.getElementParameter(EParameterName.NONE.getName()).setValue(Boolean.FALSE);
          con.setPropertyValue(EParameterName.DEPARTITIONER.getName(),Boolean.TRUE);
        }
      }
    }
    if (node.getOutgoingConnections().size() > 0) {
      setParallelization(node);
    }
  }
}
Program: 121213
Project: 121213
Buggy source:
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);
      }
    }
  }
}

Fixed version (ground truth):
private void refreshNodes(){
  boolean isRed=new JobletUtil().isRed(this.jobletContainer);
  Project refProject=ProjectManager.getInstance().getProject(this.jobletContainer.getProcess().getProperty().getItem());
  if (!ProjectManager.getInstance().getCurrentProject().equals(refProject) && refProject.isReference()) {
    if (!this.jobletContainer.isCollapsed()) {
      isRed=true;
    }
  }
  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: 121216
Project: 121216
Buggy source:
@Override public void init(IDynamicProperty dp){
  super.init(dp);
  if (elem instanceof Node) {
    Node node=(Node)elem;
    String compName=node.getComponent().getName();
    compName=compName.substring(1).toUpperCase();
    ECustomVersionType[] versions=ECustomVersionType.values();
    for (    ECustomVersionType version : versions) {
      if (compName.startsWith(version.getName())) {
        versionType=version;
        break;
      }
    }
  }
  if (versionType == null) {
    versionType=ECustomVersionType.HDFS;
  }
}

Fixed version (ground truth):
@Override public void init(IDynamicProperty dp){
  super.init(dp);
  initHadoopVersionType();
}
Program: 121217
Project: 121217
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  boolean readonly=false;
  IElementParameter propertyParameter=elem.getElementParameter(EParameterName.PROPERTY_TYPE.getName());
  if (propertyParameter != null) {
    if (EmfComponent.REPOSITORY.equals(propertyParameter.getValue())) {
      readonly=true;
    }
  }
  HadoopCustomVersionDefineDialog customVersionDialog=new HadoopCustomVersionDefineDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),getCustomVersionMap()){
    @Override protected ECustomVersionType[] getDisplayTypes(){
      return new ECustomVersionType[]{versionType};
    }
  }
;
  customVersionDialog.setReadonly(readonly);
  if (customVersionDialog.open() == Window.OK) {
    String customJars=customVersionDialog.getLibListStr(versionType.getGroup());
    executeCommand(new PropertyChangeCommand(elem,EParameterName.HADOOP_CUSTOM_JARS.getName(),StringUtils.trimToEmpty(customJars)));
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  initHadoopVersionType();
  boolean readonly=false;
  IElementParameter propertyParameter=elem.getElementParameter(EParameterName.PROPERTY_TYPE.getName());
  if (propertyParameter != null) {
    if (EmfComponent.REPOSITORY.equals(propertyParameter.getValue())) {
      readonly=true;
    }
  }
  HadoopCustomVersionDefineDialog customVersionDialog=new HadoopCustomVersionDefineDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),getCustomVersionMap()){
    @Override protected ECustomVersionType[] getDisplayTypes(){
      return new ECustomVersionType[]{versionType};
    }
  }
;
  customVersionDialog.setReadonly(readonly);
  if (customVersionDialog.open() == Window.OK) {
    String customJars=customVersionDialog.getLibListStr(versionType.getGroup());
    executeCommand(new PropertyChangeCommand(elem,EParameterName.HADOOP_CUSTOM_JARS.getName(),StringUtils.trimToEmpty(customJars)));
  }
}
Program: 121219
Project: 121219
Buggy source:
@Override public Object getComponentValue(Connection connection,String value,IMetadataTable table){
  if (value != null && canHandle(connection)) {
    return getJSONRepositoryValue((JSONFileConnection)connection,value,table);
  }
  return null;
}

Fixed version (ground truth):
@Override public Object getComponentValue(Connection connection,String value,IMetadataTable table,String targetComponent){
  if (value != null && canHandle(connection)) {
    return getJSONRepositoryValue((JSONFileConnection)connection,value,table);
  }
  return null;
}
Program: 121220
Project: 121220
Buggy source:
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);
      }
    }
  }
}

Fixed version (ground truth):
private void refreshNodes(){
  boolean isRed=new JobletUtil().isRed(this.jobletContainer);
  Project refProject=ProjectManager.getInstance().getProject(this.jobletContainer.getProcess().getProperty().getItem());
  if (!ProjectManager.getInstance().getCurrentProject().equals(refProject) && refProject.isReference()) {
    if (!this.jobletContainer.isCollapsed()) {
      isRed=true;
    }
  }
  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: 121221
Project: 121221
Buggy source:
public void removeDragItems(String data){
  TableItem[] items=table.getItems();
  String[] toRemove=data.split("String_Node_Str");
  for (  TableItem item : items) {
    TableItem itemToRemove=null;
    for (int i=1; i < toRemove.length; i++) {
      if (toRemove[i].equals(item.getText())) {
        itemToRemove=item;
        break;
      }
    }
    if (itemToRemove != null) {
      tableModel.remove((Type3Field)itemToRemove.getData());
      editorManager.removeEditors(itemToRemove);
    }
  }
  table.remove(table.getSelectionIndices());
  tableViewer.refresh();
}

Fixed version (ground truth):
public void removeDragItems(String data){
  TableItem[] items=table.getItems();
  String[] toRemove=data.split("String_Node_Str");
  for (int i=1; i < toRemove.length; i++) {
    TableItem itemToRemove=null;
    for (    TableItem item : items) {
      if (toRemove[i].equals(item.getText())) {
        itemToRemove=item;
        break;
      }
    }
    if (itemToRemove != null) {
      tableModel.remove((Type3Field)itemToRemove.getData());
      editorManager.removeEditors(itemToRemove);
    }
  }
  table.remove(table.getSelectionIndices());
  tableViewer.refresh();
}
Program: 121223
Project: 121223
Buggy source:
public void removeDragItems(String data){
  TableItem[] items=table.getItems();
  String[] toRemove=data.split("String_Node_Str");
  for (  TableItem item : items) {
    TableItem itemToRemove=null;
    for (int i=1; i < toRemove.length; i++) {
      if (toRemove[i].equals(item.getText())) {
        itemToRemove=item;
        break;
      }
    }
    if (itemToRemove != null) {
      tableModel.remove((Type3Field)itemToRemove.getData());
      editorManager.removeEditors(itemToRemove);
    }
  }
  table.remove(table.getSelectionIndices());
  tableViewer.refresh();
}

Fixed version (ground truth):
public void removeDragItems(String data){
  TableItem[] items=table.getItems();
  String[] toRemove=data.split("String_Node_Str");
  for (int i=1; i < toRemove.length; i++) {
    TableItem itemToRemove=null;
    for (    TableItem item : items) {
      if (toRemove[i].equals(item.getText())) {
        itemToRemove=item;
        break;
      }
    }
    if (itemToRemove != null) {
      tableModel.remove((Type3Field)itemToRemove.getData());
      editorManager.removeEditors(itemToRemove);
    }
  }
  table.remove(table.getSelectionIndices());
  tableViewer.refresh();
}
Program: 121226
Project: 121226
Buggy source:
public void prepareXlsxFile(String fileName) throws Exception {
  File xlsxFile=new File(fileName);
  if (xlsxFile.exists()) {
    if (isAbsY && keepCellFormat) {
      initPreXlsx(fileName);
    }
    if (appendWorkbook) {
      InputStream inp=new FileInputStream(fileName);
      wb=WorkbookFactory.create(inp);
      sheet=wb.getSheet(sheetName);
      if (sheet != null) {
        if (appendSheet) {
          if (sheet.getLastRowNum() != 0 || sheet.getRow(0) != null) {
            curY=sheet.getLastRowNum() + 1;
          }
        }
 else {
          wb.removeSheetAt(wb.getSheetIndex(sheetName));
          sheet=wb.createSheet(sheetName);
        }
      }
 else {
        sheet=wb.createSheet(sheetName);
      }
    }
 else {
      xlsxFile.delete();
      wb=new SXSSFWorkbook(rowAccessWindowSize);
      sheet=wb.createSheet(sheetName);
    }
  }
 else {
    wb=new SXSSFWorkbook(rowAccessWindowSize);
    sheet=wb.createSheet(sheetName);
  }
  if (isAbsY) {
    startX=absX;
    curY=absY;
  }
}

Fixed version (ground truth):
public void prepareXlsxFile(String fileName) throws Exception {
  File xlsxFile=new File(fileName);
  if (xlsxFile.exists()) {
    if (isAbsY && keepCellFormat) {
      initPreXlsx(fileName);
    }
    if (appendWorkbook) {
      InputStream inp=new FileInputStream(fileName);
      wb=WorkbookFactory.create(inp);
      sheet=wb.getSheet(sheetName);
      if (sheet != null) {
        if (appendSheet) {
          if (sheet.getLastRowNum() != 0 || sheet.getRow(0) != null) {
            curY=sheet.getLastRowNum() + 1;
          }
          ((XSSFSheet)sheet).setForceFormulaRecalculation(true);
        }
 else {
          wb.removeSheetAt(wb.getSheetIndex(sheetName));
          sheet=wb.createSheet(sheetName);
        }
      }
 else {
        sheet=wb.createSheet(sheetName);
      }
    }
 else {
      xlsxFile.delete();
      wb=new SXSSFWorkbook(rowAccessWindowSize);
      sheet=wb.createSheet(sheetName);
    }
  }
 else {
    wb=new SXSSFWorkbook(rowAccessWindowSize);
    sheet=wb.createSheet(sheetName);
  }
  if (isAbsY) {
    startX=absX;
    curY=absY;
  }
}
Program: 121228
Project: 121228
Buggy source:
public TreeItem getTreeItem(FOXTreeNode foxTreeNode){
  String path=getAbsoluteXPath(foxTreeNode);
  TreeItem[] items=xmlViewer.getTree().getItems();
  TreeItem item=null;
  while (!path.isEmpty()) {
    for (    TreeItem curItem : items) {
      if (path.startsWith("String_Node_Str" + curItem.getText())) {
        item=curItem;
        path=path.replaceFirst("String_Node_Str" + curItem.getText(),"String_Node_Str");
        break;
      }
    }
    if (!path.isEmpty()) {
      items=item.getItems();
    }
  }
  return item;
}

Fixed version (ground truth):
public TreeItem getTreeItem(FOXTreeNode foxTreeNode){
  String path=getAbsoluteXPath(foxTreeNode);
  TreeItem[] items=xmlViewer.getTree().getItems();
  TreeItem item=null;
  while (!path.isEmpty()) {
    for (    TreeItem curItem : items) {
      if (path.equals("String_Node_Str" + curItem.getText()) || path.startsWith("String_Node_Str" + curItem.getText() + "String_Node_Str")) {
        item=curItem;
        path=path.replaceFirst("String_Node_Str" + curItem.getText(),"String_Node_Str");
        break;
      }
    }
    if (!path.isEmpty()) {
      items=item.getItems();
    }
  }
  return item;
}
Program: 121229
Project: 121229
Buggy source:
/** 
 * DOC hcw Comment method "search".
 * @param monitor
 * @param nodeName
 * @param found
 */
protected void search(IProgressMonitor monitor,String nodeName,List<IRepositoryViewObject> found){
  IProxyRepositoryFactory factory=DesignerPlugin.getDefault().getProxyRepositoryFactory();
  IDesignerCoreService designerCoreService=CorePlugin.getDefault().getDesignerCoreService();
  try {
    List<IRepositoryViewObject> repositoryObjectList=factory.getAll(ERepositoryObjectType.PROCESS,false);
    monitor.beginTask("String_Node_Str",repositoryObjectList.size());
    for (    IRepositoryViewObject rObject : repositoryObjectList) {
      if (monitor.isCanceled()) {
        break;
      }
      monitor.setTaskName("String_Node_Str" + rObject.getLabel());
      monitor.worked(1);
      Item item=rObject.getProperty().getItem();
      if (item instanceof ProcessItem) {
        ProcessItem processItem=(ProcessItem)item;
        IProcess process=designerCoreService.getProcessFromProcessItem(processItem);
        List<INode> nodes=(List<INode>)process.getGraphicalNodes();
        for (        INode node : nodes) {
          if (node.getComponent().getName().equals(nodeName)) {
            found.add(rObject);
            break;
          }
        }
      }
    }
    monitor.done();
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
/** 
 * DOC hcw Comment method "search".
 * @param monitor
 * @param nodeName
 * @param found
 */
protected void search(IProgressMonitor monitor,String nodeName,List<IRepositoryViewObject> found){
  IProxyRepositoryFactory factory=DesignerPlugin.getDefault().getProxyRepositoryFactory();
  IDesignerCoreService designerCoreService=CorePlugin.getDefault().getDesignerCoreService();
  try {
    List<IRepositoryViewObject> repositoryObjectList=factory.getAll(ERepositoryObjectType.PROCESS,false);
    repositoryObjectList.addAll(factory.getAll(ERepositoryObjectType.PROCESS_MR,false));
    monitor.beginTask("String_Node_Str",repositoryObjectList.size());
    for (    IRepositoryViewObject rObject : repositoryObjectList) {
      if (monitor.isCanceled()) {
        break;
      }
      monitor.setTaskName("String_Node_Str" + rObject.getLabel());
      monitor.worked(1);
      Item item=rObject.getProperty().getItem();
      if (item instanceof ProcessItem) {
        ProcessItem processItem=(ProcessItem)item;
        IProcess process=designerCoreService.getProcessFromProcessItem(processItem);
        List<INode> nodes=(List<INode>)process.getGraphicalNodes();
        for (        INode node : nodes) {
          if (node.getComponent().getName().equals(nodeName)) {
            found.add(rObject);
            break;
          }
        }
      }
    }
    monitor.done();
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
}
Program: 121230
Project: 121230
Buggy source:
public void run(){
  final RepositoryReviewDialog dialog=new RepositoryReviewDialog(shell,new JobSearchResultProcessor(found),ERepositoryObjectType.PROCESS);
  if (dialog.open() == RepositoryReviewDialog.OK) {
    EditProcess editProcess=new EditProcess(){
      @Override public ISelection getSelection(){
        return new StructuredSelection(dialog.getResult());
      }
    }
;
    editProcess.run();
  }
}

Fixed version (ground truth):
@Override public void run(){
  final RepositoryReviewDialog dialog=new RepositoryReviewDialog(shell,new JobSearchResultProcessor(found),ERepositoryObjectType.PROCESS);
  if (dialog.open() == RepositoryReviewDialog.OK) {
    EditProcess editProcess=new EditProcess(){
      @Override public ISelection getSelection(){
        return new StructuredSelection(dialog.getResult());
      }
    }
;
    editProcess.run();
  }
}
Program: 121231
Project: 121231
Buggy source:
@Override protected boolean selectRepositoryNode(Viewer viewer,RepositoryNode parentNode,RepositoryNode node){
  if (node.getType() == ENodeType.SYSTEM_FOLDER || node.getType() == ENodeType.STABLE_SYSTEM_FOLDER) {
    try {
      if (node.getContentType().equals(ERepositoryObjectType.PROCESS)) {
        return true;
      }
    }
 catch (    Exception e) {
    }
    return false;
  }
 else   if (node.getType() == ENodeType.SIMPLE_FOLDER) {
    try {
      String path=RepositoryNodeUtilities.getPath(node).toString();
      return folders.contains(path);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if (node.getObject() != null) {
    String id=node.getObject().getId();
    return jobIds.contains(id);
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean selectRepositoryNode(Viewer viewer,RepositoryNode parentNode,RepositoryNode node){
  if (node.getType() == ENodeType.SYSTEM_FOLDER || node.getType() == ENodeType.STABLE_SYSTEM_FOLDER) {
    try {
      if (node.getContentType().equals(ERepositoryObjectType.PROCESS) || node.getContentType().equals(ERepositoryObjectType.PROCESS_MR)) {
        return true;
      }
    }
 catch (    Exception e) {
    }
    return false;
  }
 else   if (node.getType() == ENodeType.SIMPLE_FOLDER) {
    try {
      String path=RepositoryNodeUtilities.getPath(node).toString();
      return folders.contains(path);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if (node.getObject() != null) {
    String id=node.getObject().getId();
    return jobIds.contains(id);
  }
  return false;
}
Program: 121233
Project: 121233
Buggy source:
@Override protected boolean calculateEnabled(){
  RepositoryNode rootNode=((ProjectRepositoryNode)ProjectRepositoryNode.getInstance()).getRootRepositoryNode(ERepositoryObjectType.METADATA_MDMCONNECTION);
  if (getSelectedObjects().isEmpty() || rootNode == null) {
    return false;
  }
 else {
    Object s=getSelectedObjects().get(0);
    if (s instanceof List && !((List)s).isEmpty()) {
      List selectedarts=(List)s;
      Object object=selectedarts.get(selectedarts.size() - 1);
      if (object instanceof TreeNodeEditPart) {
        TreeNodeEditPart parentPart=(TreeNodeEditPart)object;
        schemaNode=(TreeNode)parentPart.getModel();
        if (schemaNode.eContainer() instanceof AbstractInOutTree && XmlMapUtil.DOCUMENT.equals(schemaNode.getType())) {
          return true;
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean calculateEnabled(){
  RepositoryNode rootNode=((ProjectRepositoryNode)ProjectRepositoryNode.getInstance()).getRootRepositoryNode(ERepositoryObjectType.METADATA);
  if (getSelectedObjects().isEmpty() || rootNode == null) {
    return false;
  }
 else {
    Object s=getSelectedObjects().get(0);
    if (s instanceof List && !((List)s).isEmpty()) {
      List selectedarts=(List)s;
      Object object=selectedarts.get(selectedarts.size() - 1);
      if (object instanceof TreeNodeEditPart) {
        TreeNodeEditPart parentPart=(TreeNodeEditPart)object;
        schemaNode=(TreeNode)parentPart.getModel();
        if (schemaNode.eContainer() instanceof AbstractInOutTree && XmlMapUtil.DOCUMENT.equals(schemaNode.getType())) {
          return true;
        }
      }
    }
  }
  return false;
}
Program: 121234
Project: 121234
Buggy source:
@Override public boolean checkReadOnly(){
  IProxyRepositoryFactory repFactory=DesignerPlugin.getDefault().getProxyRepositoryFactory();
  boolean readOnlyLocal=!repFactory.isEditableAndLockIfPossible(property.getItem()) || !isLastVersion(property.getItem());
  this.setReadOnly(readOnlyLocal);
  return readOnlyLocal;
}

Fixed version (ground truth):
@Override public boolean checkReadOnly(){
  IProxyRepositoryFactory repFactory=DesignerPlugin.getDefault().getProxyRepositoryFactory();
  boolean readOnlyLocal=!isLastVersion(property.getItem()) || !repFactory.isEditableAndLockIfPossible(property.getItem());
  this.setReadOnly(readOnlyLocal);
  return readOnlyLocal;
}
Program: 121237
Project: 121237
Buggy source:
public void mouseDown(MouseEvent e){
  if (inUseProjectSettingMode(elem,section,EParameterName.STATANDLOG_USE_PROJECT_SETTINGS) || inUseProjectSettingMode(elem,section,EParameterName.IMPLICITCONTEXT_USE_PROJECT_SETTINGS)) {
    UseProjectSettingDialog modelSelect=new UseProjectSettingDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
    if (modelSelect.open() == UseProjectSettingDialog.OK) {
      if (modelSelect.getOptionValue().equals("String_Node_Str")) {
        useProjectSetting.setSelection(false);
        useProjectSettingButtonClick();
      }
      if (modelSelect.getOptionValue().equals("String_Node_Str")) {
        useProjectSetting.setSelection(true);
        useProjectSettingButtonClick();
        ProjectSettingDialog dialog=new ProjectSettingDialog();
        dialog.open();
      }
    }
  }
}

Fixed version (ground truth):
@Override public void mouseDown(MouseEvent e){
  if (inUseProjectSettingMode(elem,section,EParameterName.STATANDLOG_USE_PROJECT_SETTINGS) || inUseProjectSettingMode(elem,section,EParameterName.IMPLICITCONTEXT_USE_PROJECT_SETTINGS)) {
    UseProjectSettingDialog modelSelect=new UseProjectSettingDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
    if (modelSelect.open() == UseProjectSettingDialog.OK) {
      if (modelSelect.getOptionValue().equals("String_Node_Str")) {
        useProjectSetting.setSelection(false);
        useProjectSettingButtonClick();
      }
      if (modelSelect.getOptionValue().equals("String_Node_Str")) {
        useProjectSetting.setSelection(true);
        useProjectSettingButtonClick();
        ProjectSettingDialog dialog=new ProjectSettingDialog();
        dialog.open();
      }
    }
  }
}
Program: 121238
Project: 121238
Buggy source:
public void widgetDefaultSelected(SelectionEvent e){
}

Fixed version (ground truth):
@Override public void widgetDefaultSelected(SelectionEvent e){
}
Program: 121239
Project: 121239
Buggy source:
/** 
 * wchen Comment method "setTextEnable".
 */
private void setTextEnable(Control control,boolean enabled,boolean flag){
  if (control instanceof Text) {
    Text t=(Text)control;
    Object data=t.getData(TypedTextCommandExecutor.PARAMETER_NAME);
    if (useRepository((String)data)) {
      t.setEditable(false);
    }
 else {
      t.setEditable(enabled);
    }
    if (!t.getEditable()) {
      t.removeMouseListener(listenerSelection);
      t.addMouseListener(listenerSelection);
    }
 else {
      t.removeMouseListener(listenerSelection);
    }
  }
 else   if (control instanceof Button) {
    Object p=control.getData(TypedTextCommandExecutor.PARAMETER_NAME);
    Object n=control.getData("String_Node_Str");
    if (p != null && n != null && p instanceof String && n instanceof String) {
      if (((String)p).equals("String_Node_Str") && ((String)n).equals("String_Node_Str")) {
        return;
      }
    }
  }
 else {
    control.setEnabled(flag);
  }
}

Fixed version (ground truth):
/** 
 * wchen Comment method "setTextEnable".
 */
private void setTextEnable(Control control,boolean enabled,boolean flag){
  if (control instanceof Text) {
    Text t=(Text)control;
    Object data=t.getData(TypedTextCommandExecutor.PARAMETER_NAME);
    if (useRepository((String)data)) {
      t.setEditable(false);
    }
 else {
      t.setEditable(enabled);
    }
    if (!t.getEditable()) {
      t.removeMouseListener(listenerSelection);
      t.addMouseListener(listenerSelection);
    }
 else {
      t.removeMouseListener(listenerSelection);
    }
  }
 else   if (control instanceof Button) {
    Button b=(Button)control;
    Object p=control.getData(TypedTextCommandExecutor.PARAMETER_NAME);
    Object n=control.getData("String_Node_Str");
    if (p != null && n != null && p instanceof String && n instanceof String) {
      if (((String)p).equals("String_Node_Str") && ((String)n).equals("String_Node_Str")) {
        return;
      }
    }
    b.setEnabled(flag);
  }
 else {
    control.setEnabled(flag);
  }
}
Program: 121242
Project: 121242
Buggy source:
/** 
 * DOC aimingchen Comment method "setMainCompositeEnable".
 * @param enabled
 */
protected void setMainCompositeEnable(boolean enabled){
  Control[] controls=getComposite().getChildren();
  for (int i=0; i < controls.length; i++) {
    Control control=controls[i];
    if (control != topComposite) {
      if (control instanceof Composite) {
        setEditable((Composite)control,enabled);
      }
 else {
        setTextEnable(control,enabled,enabled);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC aimingchen Comment method "setMainCompositeEnable".
 * @param enabled
 */
protected void setMainCompositeEnable(boolean enabled){
  Control[] controls=getComposite().getChildren();
  for (  Control control : controls) {
    if (control != topComposite) {
      if (control instanceof Composite) {
        if (control instanceof CCombo) {
          setTextEnable(control,enabled,enabled);
        }
        setEditable((Composite)control,enabled);
      }
 else {
        setTextEnable(control,enabled,enabled);
      }
    }
  }
}
Program: 121243
Project: 121243
Buggy source:
@Override protected void okPressed(){
  if (noUseProjectSettingsButton.getSelection())   setOptionValue("String_Node_Str");
  if (updateProjectSettingsButton.getSelection())   setOptionValue("String_Node_Str");
  super.okPressed();
}

Fixed version (ground truth):
@Override protected void okPressed(){
  if (noUseProjectSettingsButton.getSelection()) {
    setOptionValue("String_Node_Str");
  }
  if (updateProjectSettingsButton.getSelection()) {
    setOptionValue("String_Node_Str");
  }
  super.okPressed();
}
Program: 121244
Project: 121244
Buggy source:
private void setEditable(Composite parent,boolean editable){
  Control[] children=parent.getChildren();
  for (int i=0; i < children.length; i++) {
    if (children[i] instanceof Composite) {
      setEditable((Composite)children[i],editable);
    }
 else {
      setTextEnable(children[i],editable,true);
    }
  }
}

Fixed version (ground truth):
private void setEditable(Composite parent,boolean editable){
  Control[] children=parent.getChildren();
  for (  Control element : children) {
    if (element instanceof Composite) {
      if (element instanceof CCombo) {
        setTextEnable(element,editable,editable);
      }
      setEditable((Composite)element,editable);
    }
 else     if (element instanceof Button) {
      setTextEnable(element,editable,editable);
    }
 else {
      setTextEnable(element,editable,true);
    }
  }
}
Program: 121249
Project: 121249
Buggy source:
/** 
 * wchen Comment method "setTextEnable".
 */
private void setTextEnable(Control control,boolean enabled,boolean flag){
  if (control instanceof Text) {
    Text t=(Text)control;
    Object data=t.getData(TypedTextCommandExecutor.PARAMETER_NAME);
    if (useRepository((String)data)) {
      t.setEditable(false);
    }
 else {
      t.setEditable(enabled);
    }
    if (!t.getEditable()) {
      t.removeMouseListener(listenerSelection);
      t.addMouseListener(listenerSelection);
    }
 else {
      t.removeMouseListener(listenerSelection);
    }
  }
 else   if (control instanceof Button) {
    Object p=control.getData(TypedTextCommandExecutor.PARAMETER_NAME);
    Object n=control.getData("String_Node_Str");
    if (p != null && n != null && p instanceof String && n instanceof String) {
      if (((String)p).equals("String_Node_Str") && ((String)n).equals("String_Node_Str")) {
        return;
      }
    }
  }
 else {
    control.setEnabled(flag);
  }
}

Fixed version (ground truth):
/** 
 * wchen Comment method "setTextEnable".
 */
private void setTextEnable(Control control,boolean enabled,boolean flag){
  if (control instanceof Text) {
    Text t=(Text)control;
    Object data=t.getData(TypedTextCommandExecutor.PARAMETER_NAME);
    if (useRepository((String)data)) {
      t.setEditable(false);
    }
 else {
      t.setEditable(enabled);
    }
    if (!t.getEditable()) {
      t.removeMouseListener(listenerSelection);
      t.addMouseListener(listenerSelection);
    }
 else {
      t.removeMouseListener(listenerSelection);
    }
  }
 else   if (control instanceof Button) {
    Button b=(Button)control;
    Object p=control.getData(TypedTextCommandExecutor.PARAMETER_NAME);
    Object n=control.getData("String_Node_Str");
    if (p != null && n != null && p instanceof String && n instanceof String) {
      if (((String)p).equals("String_Node_Str") && ((String)n).equals("String_Node_Str")) {
        return;
      }
    }
    b.setEnabled(flag);
  }
 else {
    control.setEnabled(flag);
  }
}
Program: 121250
Project: 121250
Buggy source:
/** 
 * DOC aimingchen Comment method "setMainCompositeEnable".
 * @param enabled
 */
protected void setMainCompositeEnable(boolean enabled){
  Control[] controls=getComposite().getChildren();
  for (int i=0; i < controls.length; i++) {
    Control control=controls[i];
    if (control != topComposite) {
      if (control instanceof Composite) {
        setEditable((Composite)control,enabled);
      }
 else {
        setTextEnable(control,enabled,enabled);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC aimingchen Comment method "setMainCompositeEnable".
 * @param enabled
 */
protected void setMainCompositeEnable(boolean enabled){
  Control[] controls=getComposite().getChildren();
  for (int i=0; i < controls.length; i++) {
    Control control=controls[i];
    if (control != topComposite) {
      if (control instanceof Composite) {
        if (control instanceof CCombo) {
          setTextEnable(control,enabled,enabled);
        }
        setEditable((Composite)control,enabled);
      }
 else {
        setTextEnable(control,enabled,enabled);
      }
    }
  }
}
Program: 121251
Project: 121251
Buggy source:
private void setEditable(Composite parent,boolean editable){
  Control[] children=parent.getChildren();
  for (int i=0; i < children.length; i++) {
    if (children[i] instanceof Composite) {
      setEditable((Composite)children[i],editable);
    }
 else {
      setTextEnable(children[i],editable,true);
    }
  }
}

Fixed version (ground truth):
private void setEditable(Composite parent,boolean editable){
  Control[] children=parent.getChildren();
  for (int i=0; i < children.length; i++) {
    if (children[i] instanceof Composite) {
      if (children[i] instanceof CCombo) {
        setTextEnable(children[i],editable,editable);
      }
      setEditable((Composite)children[i],editable);
    }
 else     if (children[i] instanceof Button) {
      setTextEnable(children[i],editable,editable);
    }
 else {
      setTextEnable(children[i],editable,true);
    }
  }
}
Program: 121252
Project: 121252
Buggy source:
public AutoMapButton(){
  super(null);
  setText("String_Node_Str");
}

Fixed version (ground truth):
public AutoMapButton(){
  super(ImageProvider.getImage(EImage.AUTOMAP_ICON));
}
Program: 121253
Project: 121253
Buggy source:
@Override public void createZoneContent(){
  super.createZoneContent();
  add_btn=new AddButton();
  this.add(add_btn);
  remove_btn=new RemoveButton();
  remove_btn.setEnabled(false);
  this.add(remove_btn);
  this.add(move_up);
  this.add(move_down);
  add(new Label("String_Node_Str"));
  Image image=null;
  minimized=getMinSizeStatus();
  if (minimized) {
    image=restorImage;
  }
 else {
    image=miniImage;
  }
  min_size=new MinSizeButton(image);
  min_size.setEnabled(!isMinSizeEnable());
  this.add(min_size);
  auto_map=new AutoMapButton();
  this.add(auto_map);
  setTooltips();
}

Fixed version (ground truth):
@Override public void createZoneContent(){
  super.createZoneContent();
  add_btn=new AddButton();
  this.add(add_btn);
  remove_btn=new RemoveButton();
  remove_btn.setEnabled(false);
  this.add(remove_btn);
  this.add(move_up);
  this.add(move_down);
  add(new Label("String_Node_Str"));
  Image image=null;
  minimized=getMinSizeStatus();
  if (minimized) {
    image=restorImage;
  }
 else {
    image=miniImage;
  }
  min_size=new MinSizeButton(image);
  min_size.setEnabled(!isMinSizeEnable());
  this.add(min_size);
  auto_map=new AutoMapButton();
  auto_map.setEnabled(!isAutoMapEnable());
  this.add(auto_map);
  setTooltips();
}
Program: 121257
Project: 121257
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()) {
    nodec=new JobletContainer(nc);
  }
 else {
    nodec=new NodeContainer(nc);
  }
  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()));
  }
  NodeContainer nodec=null;
  if (nc.isJoblet()) {
    nodec=new JobletContainer(nc);
  }
 else {
    nodec=new NodeContainer(nc);
  }
  loadSchema(nc,nType);
  addNodeContainer(nodec);
  nodesHashtable.put(nc.getUniqueName(),nc);
  return nc;
}
Program: 121260
Project: 121260
Buggy source:
private Command createCommand(SelectionEvent event){
  Control ctrl=(Control)event.getSource();
  String paramName=(String)ctrl.getData(PARAMETER_NAME);
  Command cmd=null;
  Boolean value=new Boolean(((Button)ctrl).getSelection());
  if (paramName.equals(EParameterName.ACTIVATE.getName())) {
    if (elem instanceof Node) {
      List<Node> nodeList=new ArrayList<Node>();
      nodeList.add((Node)elem);
      List<Connection> connList=new ArrayList<Connection>();
      cmd=new ChangeActivateStatusElementCommand(value,nodeList,connList);
    }
  }
 else {
    cmd=new PropertyChangeCommand(elem,paramName,value);
  }
  return cmd;
}

Fixed version (ground truth):
private Command createCommand(SelectionEvent event){
  Control ctrl=(Control)event.getSource();
  String paramName=(String)ctrl.getData(PARAMETER_NAME);
  Command cmd=null;
  Boolean value=new Boolean(((Button)ctrl).getSelection());
  if (value && paramName.equals(EParameterName.USE_DYNAMIC_JOB.getName())) {
    if (elem instanceof Node) {
      String processParamName=EParameterName.PROCESS_TYPE_PROCESS.getName();
      IElementParameter processParameter=elem.getElementParameter(processParamName);
      if (processParameter != null) {
        String processId=String.valueOf(processParameter.getValue());
        IRepositoryNode repNode=null;
        if (StringUtils.isNotEmpty(processId)) {
          repNode=RepositorySeekerManager.getInstance().searchRepoViewNode(processId);
        }
        if (repNode != null && ERepositoryObjectType.PROCESS_MR.equals(repNode.getObjectType())) {
          cmd=new PropertyChangeCommand(elem,processParamName,"String_Node_Str");
          executeCommand(cmd);
        }
      }
    }
  }
  if (paramName.equals(EParameterName.ACTIVATE.getName())) {
    if (elem instanceof Node) {
      List<Node> nodeList=new ArrayList<Node>();
      nodeList.add((Node)elem);
      List<Connection> connList=new ArrayList<Connection>();
      cmd=new ChangeActivateStatusElementCommand(value,nodeList,connList);
    }
  }
 else {
    cmd=new PropertyChangeCommand(elem,paramName,value);
  }
  return cmd;
}
Program: 121261
Project: 121261
Buggy source:
/** 
 * DOC root Comment method "getOriginalValue".
 * @param contextProperties
 * @param dbmsId
 * @return
 */
private static String getOriginalValue(Properties contextProperties,String value){
  if (value != null && ContextParameterUtils.containContextVariables(value)) {
    String var=ContextParameterUtils.getVariableFromCode(value);
    String res=contextProperties.getProperty(var);
    return res != null ? res : PluginConstant.EMPTY_STRING;
  }
  return value;
}

Fixed version (ground truth):
/** 
 * DOC sizhaoliu Comment method "getOriginalValue".
 * @param contextProperties
 * @param dbmsId
 * @return
 */
private static String getOriginalValue(Properties contextProperties,String value){
  if (value != null && ContextParameterUtils.containContextVariables(value)) {
    String var=ContextParameterUtils.getVariableFromCode(value);
    String res=contextProperties.getProperty(var);
    return res != null ? res : PluginConstant.EMPTY_STRING;
  }
  return value;
}
Program: 121264
Project: 121264
Buggy source:
/** 
 * DOC root Comment method "getContextTypeForContextMode".
 * @param conn
 * @param contextName
 * @return
 */
private static ContextType getContextTypeForContextMode(DatabaseConnection conn,String contextName){
  return null;
}

Fixed version (ground truth):
private static ContextType getContextTypeForContextMode(DatabaseConnection conn,String contextName){
  return null;
}
Program: 121269
Project: 121269
Buggy source:
@Override protected boolean calculateEnabled(){
  List parts=getSelectedObjects();
  if (parts.isEmpty()) {
    return false;
  }
  if (parts.size() == 1) {
    Object o=parts.get(0);
    if (o instanceof SubjobContainerPart) {
      SubjobContainerPart part=(SubjobContainerPart)o;
      SubjobContainer subjob=(SubjobContainer)part.getModel();
      if (subjob.getProcess().getComponentsType().equals(ComponentCategory.CATEGORY_4_DI.getName())) {
        if (subjob.isDisplayed()) {
          return true;
        }
 else {
          return false;
        }
      }
 else {
        return false;
      }
    }
 else     if (o instanceof NodePart) {
      NodePart part=(NodePart)o;
      Node node=(Node)part.getModel();
      if (node.getProcess().getComponentsType().equals(ComponentCategory.CATEGORY_4_DI.getName())) {
        if (node.isStart()) {
          return true;
        }
 else {
          return false;
        }
      }
 else {
        return false;
      }
    }
 else {
      return false;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean calculateEnabled(){
  List parts=getSelectedObjects();
  if (parts.isEmpty()) {
    return false;
  }
  if (parts.size() == 1) {
    Object o=parts.get(0);
    if (o instanceof SubjobContainerPart) {
      SubjobContainerPart part=(SubjobContainerPart)o;
      SubjobContainer subjob=(SubjobContainer)part.getModel();
      Node subStartNode=subjob.getSubjobStartNode();
      if (subjob.getProcess().getComponentsType().equals(ComponentCategory.CATEGORY_4_DI.getName())) {
        if (subjob.isDisplayed() && ParallelExecutionUtils.isExistPartitioningCon(subStartNode)) {
          return true;
        }
 else {
          return false;
        }
      }
 else {
        return false;
      }
    }
 else     if (o instanceof NodePart) {
      NodePart part=(NodePart)o;
      Node node=(Node)part.getModel();
      if (node.getProcess().getComponentsType().equals(ComponentCategory.CATEGORY_4_DI.getName())) {
        if (node.isStart() && ParallelExecutionUtils.isExistPartitioningCon(node)) {
          return true;
        }
 else {
          return false;
        }
      }
 else {
        return false;
      }
    }
 else {
      return false;
    }
  }
  return false;
}
Program: 121271
Project: 121271
Buggy source:
@Override public void execute(){
  setParallelization(this.node);
}

Fixed version (ground truth):
@Override public void execute(){
  setParallelization(this.node);
  if (!parallelForCon) {
    MessageDialog.openInformation(new Shell(),"String_Node_Str","String_Node_Str");
  }
}