nus-yam/ex-repair huggingface dataset:
Program: 119649
Project: 119649
Buggy source:
private static ModuleNeeded getModuleValue(final IProcess process,String moduleValue){
  if (ContextParameterUtils.isContainContextParam(moduleValue)) {
    String var=ContextParameterUtils.getVariableFromCode(moduleValue);
    if (var != null) {
      IContext selectedContext=CorePlugin.getDefault().getRunProcessService().getSelectedContext();
      if (selectedContext == null) {
        selectedContext=process.getContextManager().getDefaultContext();
      }
      IContextParameter param=selectedContext.getContextParameter(var);
      if (param != null) {
        String paramvalue=param.getValue();
        int a=paramvalue.lastIndexOf("String_Node_Str");
        String filename=paramvalue.substring(a + 1,paramvalue.length());
        return new ModuleNeeded(null,filename,null,true);
      }
    }
  }
  return new ModuleNeeded(null,TalendTextUtils.removeQuotes(moduleValue),null,true);
}

Fixed version (ground truth):
private static ModuleNeeded getModuleValue(final IProcess process,String moduleValue){
  if (ContextParameterUtils.isContainContextParam(moduleValue)) {
    String var=ContextParameterUtils.getVariableFromCode(moduleValue);
    if (var != null) {
      IContext selectedContext=CorePlugin.getDefault().getRunProcessService().getSelectedContext();
      if (selectedContext == null) {
        selectedContext=process.getContextManager().getDefaultContext();
      }
      IContextParameter param=selectedContext.getContextParameter(var);
      if (param != null) {
        ModuleNeeded module=getModuleNeededForContextParam(param);
        return module;
      }
    }
  }
  return new ModuleNeeded(null,TalendTextUtils.removeQuotes(moduleValue),null,true);
}
Program: 119655
Project: 119655
Buggy source:
private static ModuleNeeded getModuleValue(final IProcess process,String moduleValue){
  if (ContextParameterUtils.isContainContextParam(moduleValue)) {
    String var=ContextParameterUtils.getVariableFromCode(moduleValue);
    if (var != null) {
      IContext selectedContext=CorePlugin.getDefault().getRunProcessService().getSelectedContext();
      if (selectedContext == null) {
        selectedContext=process.getContextManager().getDefaultContext();
      }
      IContextParameter param=selectedContext.getContextParameter(var);
      if (param != null) {
        String paramvalue=param.getValue();
        int a=paramvalue.lastIndexOf("String_Node_Str");
        String filename=paramvalue.substring(a + 1,paramvalue.length());
        return new ModuleNeeded(null,filename,null,true);
      }
    }
  }
  return new ModuleNeeded(null,TalendTextUtils.removeQuotes(moduleValue),null,true);
}

Fixed version (ground truth):
private static ModuleNeeded getModuleValue(final IProcess process,String moduleValue){
  if (ContextParameterUtils.isContainContextParam(moduleValue)) {
    String var=ContextParameterUtils.getVariableFromCode(moduleValue);
    if (var != null) {
      IContext selectedContext=CorePlugin.getDefault().getRunProcessService().getSelectedContext();
      if (selectedContext == null) {
        selectedContext=process.getContextManager().getDefaultContext();
      }
      IContextParameter param=selectedContext.getContextParameter(var);
      if (param != null) {
        ModuleNeeded module=getModuleNeededForContextParam(param);
        return module;
      }
    }
  }
  return new ModuleNeeded(null,TalendTextUtils.removeQuotes(moduleValue),null,true);
}
Program: 119657
Project: 119657
Buggy source:
protected String getPropertyTypeName(){
  return JobSettingsConstants.getExtraParameterName(EParameterName.PROPERTY_TYPE.getName()) + ':' + EParameterName.PROPERTY_TYPE.getName();
}

Fixed version (ground truth):
@Override protected String getPropertyTypeName(){
  return JobSettingsConstants.getExtraParameterName(EParameterName.PROPERTY_TYPE.getName()) + ':' + EParameterName.PROPERTY_TYPE.getName();
}
Program: 119658
Project: 119658
Buggy source:
protected EParameterName getParameterName(){
  return EParameterName.IMPLICITCONTEXT_USE_PROJECT_SETTINGS;
}

Fixed version (ground truth):
@Override protected EParameterName getParameterName(){
  return EParameterName.IMPLICITCONTEXT_USE_PROJECT_SETTINGS;
}
Program: 119659
Project: 119659
Buggy source:
protected String getRepositoryPropertyName(){
  return JobSettingsConstants.getExtraParameterName(EParameterName.PROPERTY_TYPE.getName()) + ':' + EParameterName.REPOSITORY_PROPERTY_TYPE.getName();
}

Fixed version (ground truth):
@Override protected String getRepositoryPropertyName(){
  return JobSettingsConstants.getExtraParameterName(EParameterName.PROPERTY_TYPE.getName()) + ':' + EParameterName.REPOSITORY_PROPERTY_TYPE.getName();
}
Program: 119660
Project: 119660
Buggy source:
protected String getDisplayName(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override protected String getDisplayName(){
  return "String_Node_Str";
}
Program: 119661
Project: 119661
Buggy source:
protected Element checkAndCreateElement(){
  return ProjectSettingManager.createImplicitContextLoadElement(pro);
}

Fixed version (ground truth):
@Override protected Element checkAndCreateElement(){
  return ProjectSettingManager.createImplicitContextLoadElement(pro);
}
Program: 119662
Project: 119662
Buggy source:
protected String getTaskMessages(){
  return Messages.getString("String_Node_Str");
}

Fixed version (ground truth):
@Override protected String getTaskMessages(){
  return Messages.getString("String_Node_Str");
}
Program: 119663
Project: 119663
Buggy source:
protected EComponentCategory getCategory(){
  return EComponentCategory.EXTRA;
}

Fixed version (ground truth):
@Override protected EComponentCategory getCategory(){
  return EComponentCategory.EXTRA;
}
Program: 119664
Project: 119664
Buggy source:
protected ParametersType getParametersType(){
  if (pro != null && pro.getEmfProject() != null && pro.getEmfProject().getImplicitContextSettings() != null) {
    return pro.getEmfProject().getImplicitContextSettings().getParameters();
  }
  return null;
}

Fixed version (ground truth):
@Override protected ParametersType getParametersType(){
  if (pro != null && pro.getEmfProject() != null && pro.getEmfProject().getImplicitContextSettings() != null) {
    return pro.getEmfProject().getImplicitContextSettings().getParameters();
  }
  return null;
}
Program: 119665
Project: 119665
Buggy source:
protected void checkSettingExisted(){
  if (pro.getEmfProject().getImplicitContextSettings() == null) {
    MessageDialog.openInformation(getShell(),getTitle(),Messages.getString("String_Node_Str"));
  }
}

Fixed version (ground truth):
@Override protected void checkSettingExisted(){
  if (pro.getEmfProject().getImplicitContextSettings() == null) {
    MessageDialog.openInformation(getShell(),getTitle(),Messages.getString("String_Node_Str"));
  }
}
Program: 119666
Project: 119666
Buggy source:
private void init(){
  ImplicitContextSettings implicit=pro.getEmfProject().getImplicitContextSettings();
  if (implicit != null) {
    String v=ElementParameter2ParameterType.getParameterValue(implicit.getParameters(),EParameterName.IMPLICT_DEFAULT_PROJECTSETTING.getName());
    if (v != null)     implicitBtn.setSelection(Boolean.valueOf(v));
 else     implicitBtn.setSelection(true);
  }
  StatAndLogsSettings stat=pro.getEmfProject().getStatAndLogsSettings();
  if (stat != null) {
    String v=ElementParameter2ParameterType.getParameterValue(stat.getParameters(),EParameterName.STATS_DEFAULT_PROJECTSETTING.getName());
    if (v != null)     statBtn.setSelection(Boolean.valueOf(v));
 else     statBtn.setSelection(true);
  }
}

Fixed version (ground truth):
private void init(){
  ImplicitContextSettings implicit=pro.getEmfProject().getImplicitContextSettings();
  if (implicit != null) {
    String v=ElementParameter2ParameterType.getParameterValue(implicit.getParameters(),EParameterName.IMPLICT_DEFAULT_PROJECTSETTING.getName());
    if (v != null) {
      implicitBtn.setSelection(Boolean.valueOf(v));
    }
 else {
      implicitBtn.setSelection(true);
    }
  }
  StatAndLogsSettings stat=pro.getEmfProject().getStatAndLogsSettings();
  if (stat != null) {
    String v=ElementParameter2ParameterType.getParameterValue(stat.getParameters(),EParameterName.STATS_DEFAULT_PROJECTSETTING.getName());
    if (v != null) {
      statBtn.setSelection(Boolean.valueOf(v));
    }
 else {
      statBtn.setSelection(true);
    }
  }
}
Program: 119667
Project: 119667
Buggy source:
protected String getPropertyTypeName(){
  return EParameterName.PROPERTY_TYPE.getName() + ':' + EParameterName.PROPERTY_TYPE.getName();
}

Fixed version (ground truth):
@Override protected String getPropertyTypeName(){
  return EParameterName.PROPERTY_TYPE.getName() + ':' + EParameterName.PROPERTY_TYPE.getName();
}
Program: 119668
Project: 119668
Buggy source:
protected EParameterName getParameterName(){
  return EParameterName.STATANDLOG_USE_PROJECT_SETTINGS;
}

Fixed version (ground truth):
@Override protected EParameterName getParameterName(){
  return EParameterName.STATANDLOG_USE_PROJECT_SETTINGS;
}
Program: 119669
Project: 119669
Buggy source:
protected String getRepositoryPropertyName(){
  return EParameterName.PROPERTY_TYPE.getName() + ':' + EParameterName.REPOSITORY_PROPERTY_TYPE.getName();
}

Fixed version (ground truth):
@Override protected String getRepositoryPropertyName(){
  return EParameterName.PROPERTY_TYPE.getName() + ':' + EParameterName.REPOSITORY_PROPERTY_TYPE.getName();
}
Program: 119670
Project: 119670
Buggy source:
protected String getDisplayName(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override protected String getDisplayName(){
  return "String_Node_Str";
}
Program: 119671
Project: 119671
Buggy source:
protected Element checkAndCreateElement(){
  return ProjectSettingManager.createStatsAndLogsElement(pro);
}

Fixed version (ground truth):
@Override protected Element checkAndCreateElement(){
  return ProjectSettingManager.createStatsAndLogsElement(pro);
}
Program: 119672
Project: 119672
Buggy source:
protected String getTaskMessages(){
  return Messages.getString("String_Node_Str");
}

Fixed version (ground truth):
@Override protected String getTaskMessages(){
  return Messages.getString("String_Node_Str");
}
Program: 119673
Project: 119673
Buggy source:
protected EComponentCategory getCategory(){
  return EComponentCategory.STATSANDLOGS;
}

Fixed version (ground truth):
@Override protected EComponentCategory getCategory(){
  return EComponentCategory.STATSANDLOGS;
}
Program: 119674
Project: 119674
Buggy source:
protected ParametersType getParametersType(){
  if (pro != null && pro.getEmfProject() != null && pro.getEmfProject().getStatAndLogsSettings() != null) {
    return pro.getEmfProject().getStatAndLogsSettings().getParameters();
  }
  return null;
}

Fixed version (ground truth):
@Override protected ParametersType getParametersType(){
  if (pro != null && pro.getEmfProject() != null && pro.getEmfProject().getStatAndLogsSettings() != null) {
    return pro.getEmfProject().getStatAndLogsSettings().getParameters();
  }
  return null;
}
Program: 119675
Project: 119675
Buggy source:
protected void checkSettingExisted(){
  if (pro.getEmfProject().getStatAndLogsSettings() == null) {
    MessageDialog.openInformation(getShell(),getTitle(),Messages.getString("String_Node_Str"));
  }
}

Fixed version (ground truth):
@Override protected void checkSettingExisted(){
  if (pro.getEmfProject().getStatAndLogsSettings() == null) {
    MessageDialog.openInformation(getShell(),getTitle(),Messages.getString("String_Node_Str"));
  }
}
Program: 119687
Project: 119687
Buggy source:
private void checkInitialSelections(){
  for (  UpdateResult result : getInputElements()) {
    if (!result.isFromItem()) {
      result.setChecked(true);
    }
    if (result.isReadOnlyProcess()) {
      result.setChecked(false);
      this.isJobReadOnly=true;
    }
switch (result.getResultType()) {
case RENAME:
      this.canCancel=false;
    this.canDeselect=false;
case RELOAD:
case JOBLET_UPDATE:
  this.canCancel=false;
this.canDeselect=true;
return;
default :
this.canCancel=true;
this.canDeselect=true;
}
}
}

Fixed version (ground truth):
private void checkInitialSelections(){
  for (  UpdateResult result : getInputElements()) {
    if (!result.isFromItem()) {
      result.setChecked(true);
    }
    if (result.isReadOnlyProcess()) {
      result.setChecked(false);
      this.isJobReadOnly=true;
    }
switch (result.getResultType()) {
case RENAME:
      this.canCancel=false;
    this.canDeselect=false;
case RELOAD:
case PATH_UPDATE:
case JOBLET_UPDATE:
  this.canCancel=false;
this.canDeselect=true;
return;
default :
this.canCancel=true;
this.canDeselect=true;
}
}
}
Program: 119689
Project: 119689
Buggy source:
private static void executeUpdate(UpdateResult result,IProgressMonitor monitor,boolean updateAllJobs){
  if (result.isReadOnlyProcess()) {
    return;
  }
  Command command=null;
switch (result.getUpdateType()) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    command=new UpdateNodeParameterCommand(result);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
case JOB_PROPERTY_MAPREDUCE:
command=new UpdateMainParameterCommand(result);
break;
case CONTEXT:
command=executeContextUpdates(result);
break;
case CONTEXT_GROUP:
command=executeContextGroupUpdates(result);
break;
case JOBLET_RENAMED:
case JOBLET_SCHEMA:
case RELOAD:
command=executeJobletNodesUpdates(result);
break;
case JOBLET_CONTEXT:
command=new Command(){
}
;
break;
default :
break;
}
if (command != null) {
SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
subMonitor.beginTask(UpdatesConstants.EMPTY,1);
subMonitor.subTask(getResultTaskInfor(result));
Object job=result.getJob();
boolean executed=false;
if (job != null && job instanceof IGEFProcess) {
IDesignerCoreUIService designerCoreUIService=CoreUIPlugin.getDefault().getDesignerCoreUIService();
if (designerCoreUIService != null) {
executed=designerCoreUIService.executeCommand((IGEFProcess)job,command);
}
}
if (!executed) {
command.execute();
}
subMonitor.worked(1);
}
}

Fixed version (ground truth):
private static void executeUpdate(UpdateResult result,IProgressMonitor monitor,boolean updateAllJobs){
  if (result.isReadOnlyProcess()) {
    return;
  }
  Command command=null;
switch (result.getUpdateType()) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    command=new UpdateNodeParameterCommand(result);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
case JOB_PROPERTY_MAPREDUCE:
command=new UpdateMainParameterCommand(result);
break;
case CONTEXT:
command=executeContextUpdates(result);
break;
case CONTEXT_GROUP:
command=executeContextGroupUpdates(result);
break;
case JOBLET_RENAMED:
case JOBLET_SCHEMA:
case RELOAD:
command=executeJobletNodesUpdates(result);
break;
case JOBLET_CONTEXT:
command=new Command(){
}
;
break;
case MAP_PATH:
command=new UpdateNodePathCommand(result);
break;
default :
break;
}
if (command != null) {
SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
subMonitor.beginTask(UpdatesConstants.EMPTY,1);
subMonitor.subTask(getResultTaskInfor(result));
Object job=result.getJob();
boolean executed=false;
if (job != null && job instanceof IGEFProcess) {
IDesignerCoreUIService designerCoreUIService=CoreUIPlugin.getDefault().getDesignerCoreUIService();
if (designerCoreUIService != null) {
executed=designerCoreUIService.executeCommand((IGEFProcess)job,command);
}
}
if (!executed) {
command.execute();
}
subMonitor.worked(1);
}
}
Program: 119693
Project: 119693
Buggy source:
private void checkInitialSelections(){
  for (  UpdateResult result : getInputElements()) {
    if (!result.isFromItem()) {
      result.setChecked(true);
    }
    if (result.isReadOnlyProcess()) {
      result.setChecked(false);
      this.isJobReadOnly=true;
    }
switch (result.getResultType()) {
case RENAME:
      this.canCancel=false;
    this.canDeselect=false;
case RELOAD:
case JOBLET_UPDATE:
  this.canCancel=false;
this.canDeselect=true;
return;
default :
this.canCancel=true;
this.canDeselect=true;
}
}
}

Fixed version (ground truth):
private void checkInitialSelections(){
  for (  UpdateResult result : getInputElements()) {
    if (!result.isFromItem()) {
      result.setChecked(true);
    }
    if (result.isReadOnlyProcess()) {
      result.setChecked(false);
      this.isJobReadOnly=true;
    }
switch (result.getResultType()) {
case RENAME:
      this.canCancel=false;
    this.canDeselect=false;
case RELOAD:
case PATH_UPDATE:
case JOBLET_UPDATE:
  this.canCancel=false;
this.canDeselect=true;
return;
default :
this.canCancel=true;
this.canDeselect=true;
}
}
}
Program: 119695
Project: 119695
Buggy source:
private static void executeUpdate(UpdateResult result,IProgressMonitor monitor,boolean updateAllJobs){
  if (result.isReadOnlyProcess()) {
    return;
  }
  Command command=null;
switch (result.getUpdateType()) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    command=new UpdateNodeParameterCommand(result);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
case JOB_PROPERTY_MAPREDUCE:
command=new UpdateMainParameterCommand(result);
break;
case CONTEXT:
command=executeContextUpdates(result);
break;
case CONTEXT_GROUP:
command=executeContextGroupUpdates(result);
break;
case JOBLET_RENAMED:
case JOBLET_SCHEMA:
case RELOAD:
command=executeJobletNodesUpdates(result);
break;
case JOBLET_CONTEXT:
command=new Command(){
}
;
break;
default :
break;
}
if (command != null) {
SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
subMonitor.beginTask(UpdatesConstants.EMPTY,1);
subMonitor.subTask(getResultTaskInfor(result));
Object job=result.getJob();
boolean executed=false;
if (job != null && job instanceof IGEFProcess) {
IDesignerCoreUIService designerCoreUIService=CoreUIPlugin.getDefault().getDesignerCoreUIService();
if (designerCoreUIService != null) {
executed=designerCoreUIService.executeCommand((IGEFProcess)job,command);
}
}
if (!executed) {
command.execute();
}
subMonitor.worked(1);
}
}

Fixed version (ground truth):
private static void executeUpdate(UpdateResult result,IProgressMonitor monitor,boolean updateAllJobs){
  if (result.isReadOnlyProcess()) {
    return;
  }
  Command command=null;
switch (result.getUpdateType()) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    command=new UpdateNodeParameterCommand(result);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
case JOB_PROPERTY_MAPREDUCE:
command=new UpdateMainParameterCommand(result);
break;
case CONTEXT:
command=executeContextUpdates(result);
break;
case CONTEXT_GROUP:
command=executeContextGroupUpdates(result);
break;
case JOBLET_RENAMED:
case JOBLET_SCHEMA:
case RELOAD:
command=executeJobletNodesUpdates(result);
break;
case JOBLET_CONTEXT:
command=new Command(){
}
;
break;
case MAP_PATH:
command=new UpdateNodePathCommand(result);
break;
default :
break;
}
if (command != null) {
SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
subMonitor.beginTask(UpdatesConstants.EMPTY,1);
subMonitor.subTask(getResultTaskInfor(result));
Object job=result.getJob();
boolean executed=false;
if (job != null && job instanceof IGEFProcess) {
IDesignerCoreUIService designerCoreUIService=CoreUIPlugin.getDefault().getDesignerCoreUIService();
if (designerCoreUIService != null) {
executed=designerCoreUIService.executeCommand((IGEFProcess)job,command);
}
}
if (!executed) {
command.execute();
}
subMonitor.worked(1);
}
}
Program: 119697
Project: 119697
Buggy source:
@Override protected void addChildVisual(EditPart childEditPart,int index){
  IFigure child=((GraphicalEditPart)childEditPart).getFigure();
  if (childEditPart instanceof InputTablePart) {
    Object model=childEditPart.getModel();
    index=getRootModelManager().getInputTables().indexOf(model);
    if (index != -1) {
      leftFigure.add(child,index);
    }
 else {
      leftFigure.add(child);
    }
  }
  if (childEditPart instanceof OutputTablePart) {
    Object model=childEditPart.getModel();
    index=getRootModelManager().getOutputTables().indexOf(model);
    if (index != -1) {
      rightFigure.add(child,index);
    }
 else {
      rightFigure.add(child);
    }
  }
  if (childEditPart instanceof VarTablePart) {
    Object model=childEditPart.getModel();
    index=getRootModelManager().getVarTables().indexOf(model);
    if (index != -1) {
      centerFigure.add(child,index);
    }
 else {
      centerFigure.add(child);
    }
  }
}

Fixed version (ground truth):
@Override protected void addChildVisual(EditPart childEditPart,int index){
  IFigure child=((GraphicalEditPart)childEditPart).getFigure();
  if (childEditPart instanceof InputTablePart) {
    Object model=childEditPart.getModel();
    index=getRootModelManager().getInputTables().indexOf(model);
    if (index != -1) {
      leftFigure.add(child,index);
    }
 else {
      leftFigure.add(child);
    }
  }
  if (childEditPart instanceof OutputTablePart) {
    Object model=childEditPart.getModel();
    index=getRootModelManager().getOutputTables().indexOf(model);
    if (index != -1) {
      rightFigure.add(child,index);
    }
 else {
      rightFigure.add(child);
    }
  }
  if (childEditPart instanceof VarTablePart) {
    Object model=childEditPart.getModel();
    index=getRootModelManager().getVarTables().indexOf(model);
    if (index != -1) {
      if (centerFigure.getChildren() != null && centerFigure.getChildren().size() != 0) {
        centerFigure.add(child,index + centerFigure.getChildren().size());
      }
 else {
        centerFigure.add(child,index);
      }
    }
 else {
      centerFigure.add(child);
    }
  }
}
Program: 119701
Project: 119701
Buggy source:
protected void nextPressed(){
  tabFolder=webServiceUI.getTabFolder();
  Function function=webServiceUI.getCurrentFunction();
  int curreSelect=tabFolder.getSelectionIndex();
  if (function == null) {
    warningDialog("String_Node_Str");
  }
 else   if (curreSelect < 2 && function != null) {
    if (webServiceUI.getIsFirst()) {
      webServiceUI.initWebserviceData();
    }
    tabFolder.setSelection(curreSelect + 1);
    if (!backButton.getEnabled()) {
      backButton.setEnabled(true);
    }
    if ((curreSelect + 1) == 2) {
      nextButton.setEnabled(false);
    }
  }
}

Fixed version (ground truth):
protected void nextPressed(){
  tabFolder=webServiceUI.getTabFolder();
  Function function=webServiceUI.getCurrentFunction();
  int curreSelect=tabFolder.getSelectionIndex();
  if (function == null) {
    warningDialog("String_Node_Str");
  }
 else   if (curreSelect < 2 && function != null) {
    if (webServiceUI.getIsFirst()) {
      webServiceUI.initWebserviceData();
    }
    tabFolder.setSelection(curreSelect + 1);
    if (!backButton.getEnabled()) {
      backButton.setEnabled(true);
    }
    if ((curreSelect + 1) == 2) {
      nextButton.setEnabled(false);
    }
    webServiceUI.refreshTableView();
  }
}
Program: 119703
Project: 119703
Buggy source:
public void update(int type){
switch (type) {
case XmlmapPackage.INPUT_XML_TREE__LOOKUP_MODE:
    lookupModel.setText(getLookupDisplayName(inputxmlTree.getLookupMode()));
  if (inputxmlTree.isLookup() && inputxmlTree.getLookupMode().equals(LOOKUP_MODE.LOAD_ONCE.toString())) {
    inputxmlTree.setActivateGlobalMap(false);
  }
 else {
    inputxmlTree.setActivateGlobalMap(true);
  }
break;
case XmlmapPackage.INPUT_XML_TREE__MATCHING_MODE:
matchModel.setText(getMatchModelDisplayName(inputxmlTree.getMatchingMode()));
break;
case XmlmapPackage.INPUT_XML_TREE__INNER_JOIN:
joinModel.setText(String.valueOf(inputxmlTree.isInnerJoin()));
break;
case XmlmapPackage.INPUT_XML_TREE__PERSISTENT:
persistentModel.setText(String.valueOf(inputxmlTree.isPersistent()));
default :
break;
}
}

Fixed version (ground truth):
public void update(int type){
switch (type) {
case XmlmapPackage.INPUT_XML_TREE__LOOKUP_MODE:
    lookupModel.setText(getLookupDisplayName(inputxmlTree.getLookupMode()));
  if (inputxmlTree.isLookup() && inputxmlTree.getLookupMode().equals(LOOKUP_MODE.LOAD_ONCE.toString())) {
    inputxmlTree.setActivateGlobalMap(false);
  }
 else {
    inputxmlTree.setActivateGlobalMap(true);
  }
break;
case XmlmapPackage.INPUT_XML_TREE__MATCHING_MODE:
matchModel.setText(getMatchModelDisplayName(inputxmlTree.getMatchingMode()));
break;
case XmlmapPackage.INPUT_XML_TREE__INNER_JOIN:
if (inputxmlTree.isInnerJoin()) {
joinModel.setText(TreeSettingsConstant.INNER_JOIN);
}
 else {
joinModel.setText(TreeSettingsConstant.LEFT_OUTER_JOIN);
}
break;
case XmlmapPackage.INPUT_XML_TREE__PERSISTENT:
persistentModel.setText(String.valueOf(inputxmlTree.isPersistent()));
default :
break;
}
}
Program: 119707
Project: 119707
Buggy source:
public void checkPerformed(boolean enable){
  final Button okBtn=getButton(IDialogConstants.OK_ID);
  if (okBtn != null) {
    okBtn.setEnabled(enable);
  }
}

Fixed version (ground truth):
@Override public void checkPerformed(boolean enable){
  final Button okBtn=getButton(IDialogConstants.OK_ID);
  if (okBtn != null) {
    okBtn.setEnabled(enable);
  }
}
Program: 119708
Project: 119708
Buggy source:
protected Control createDialogArea(Composite parent){
  Composite panel=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.marginHeight=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
  layout.marginWidth=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
  layout.verticalSpacing=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
  layout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
  panel.setLayout(layout);
  panel.setLayoutData(new GridData(GridData.FILL_BOTH));
  applyDialogFont(panel);
  webServiceUI=new WebServiceUI(panel,this.webServiceComponentMain);
  webServiceUI.addListener(this);
  webServiceUI.init();
  return panel;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  Composite panel=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.marginHeight=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
  layout.marginWidth=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
  layout.verticalSpacing=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
  layout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
  panel.setLayout(layout);
  panel.setLayoutData(new GridData(GridData.FILL_BOTH));
  applyDialogFont(panel);
  webServiceUI=new WebServiceUI(panel,this.webServiceComponentMain);
  webServiceUI.addListener(this);
  webServiceUI.init();
  return panel;
}
Program: 119709
Project: 119709
Buggy source:
protected void okPressed(){
  getWebServiceUI().saveProperties();
  saveValue();
  getUIManager().setDialogResponse(SWT.OK);
}

Fixed version (ground truth):
@Override protected void okPressed(){
  getWebServiceUI().saveProperties();
  saveValue();
  getUIManager().setDialogResponse(SWT.OK);
}
Program: 119710
Project: 119710
Buggy source:
protected void cancelPressed(){
  super.cancelPressed();
  getUIManager().setDialogResponse(SWT.CANCEL);
}

Fixed version (ground truth):
@Override protected void cancelPressed(){
  super.cancelPressed();
  getUIManager().setDialogResponse(SWT.CANCEL);
}
Program: 119711
Project: 119711
Buggy source:
protected void createButtonsForButtonBar(Composite parent){
  createButton(parent,IDialogConstants.BACK_ID,IDialogConstants.BACK_LABEL,false);
  createButton(parent,IDialogConstants.NEXT_ID,IDialogConstants.NEXT_LABEL,false);
  createButton(parent,IDialogConstants.OK_ID,IDialogConstants.OK_LABEL,false);
  createButton(parent,IDialogConstants.CANCEL_ID,IDialogConstants.CANCEL_LABEL,false);
  backButton=getButton(IDialogConstants.BACK_ID);
  backButton.setEnabled(false);
  nextButton=getButton(IDialogConstants.NEXT_ID);
}

Fixed version (ground truth):
@Override protected void createButtonsForButtonBar(Composite parent){
  createButton(parent,IDialogConstants.BACK_ID,IDialogConstants.BACK_LABEL,false);
  createButton(parent,IDialogConstants.NEXT_ID,IDialogConstants.NEXT_LABEL,false);
  createButton(parent,IDialogConstants.OK_ID,IDialogConstants.OK_LABEL,false);
  createButton(parent,IDialogConstants.CANCEL_ID,IDialogConstants.CANCEL_LABEL,false);
  backButton=getButton(IDialogConstants.BACK_ID);
  backButton.setEnabled(false);
  nextButton=getButton(IDialogConstants.NEXT_ID);
}
Program: 119712
Project: 119712
Buggy source:
protected void nextPressed(){
  tabFolder=webServiceUI.getTabFolder();
  Function function=webServiceUI.getCurrentFunction();
  int curreSelect=tabFolder.getSelectionIndex();
  if (function == null) {
    warningDialog("String_Node_Str");
  }
 else   if (curreSelect < 2 && function != null) {
    if (webServiceUI.getIsFirst()) {
      webServiceUI.initWebserviceData();
    }
    tabFolder.setSelection(curreSelect + 1);
    if (!backButton.getEnabled()) {
      backButton.setEnabled(true);
    }
    if ((curreSelect + 1) == 2) {
      nextButton.setEnabled(false);
    }
  }
}

Fixed version (ground truth):
protected void nextPressed(){
  tabFolder=webServiceUI.getTabFolder();
  Function function=webServiceUI.getCurrentFunction();
  int curreSelect=tabFolder.getSelectionIndex();
  if (function == null) {
    warningDialog("String_Node_Str");
  }
 else   if (curreSelect < 2 && function != null) {
    if (webServiceUI.getIsFirst()) {
      webServiceUI.initWebserviceData();
    }
    tabFolder.setSelection(curreSelect + 1);
    if (!backButton.getEnabled()) {
      backButton.setEnabled(true);
    }
    if ((curreSelect + 1) == 2) {
      nextButton.setEnabled(false);
    }
    webServiceUI.refreshTableView();
  }
}
Program: 119713
Project: 119713
Buggy source:
protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  if (title != null) {
    newShell.setText(title);
  }
  if (maximized) {
    newShell.setMaximized(true);
  }
 else {
    newShell.setBounds(size);
  }
}

Fixed version (ground truth):
@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  if (title != null) {
    newShell.setText(title);
  }
  if (maximized) {
    newShell.setMaximized(true);
  }
 else {
    newShell.setBounds(size);
  }
}
Program: 119714
Project: 119714
Buggy source:
protected void buttonPressed(int buttonId){
  if (IDialogConstants.OK_ID == buttonId) {
    okPressed();
  }
 else   if (IDialogConstants.CANCEL_ID == buttonId) {
    cancelPressed();
  }
 else   if (IDialogConstants.NEXT_ID == buttonId) {
    nextPressed();
  }
 else   if (IDialogConstants.BACK_ID == buttonId) {
    backPressed();
  }
}

Fixed version (ground truth):
@Override protected void buttonPressed(int buttonId){
  if (IDialogConstants.OK_ID == buttonId) {
    okPressed();
  }
 else   if (IDialogConstants.CANCEL_ID == buttonId) {
    cancelPressed();
  }
 else   if (IDialogConstants.NEXT_ID == buttonId) {
    nextPressed();
  }
 else   if (IDialogConstants.BACK_ID == buttonId) {
    backPressed();
  }
}
Program: 119716
Project: 119716
Buggy source:
@Override public void setTopFolder(List<ExportFileResource> resourcesToExport){
  String topFolder=getRootFolderName(getDestinationPath());
  for (  ExportFileResource fileResource : resourcesToExport) {
    String directory=fileResource.getDirectoryName();
    fileResource.setDirectoryName(topFolder + "String_Node_Str" + directory);
  }
}

Fixed version (ground truth):
@Override public void setTopFolder(List<ExportFileResource> resourcesToExport){
  String topFolder=getRootFolderName(this.topFolderName);
  for (  ExportFileResource fileResource : resourcesToExport) {
    String directory=fileResource.getDirectoryName();
    fileResource.setDirectoryName(topFolder + "String_Node_Str" + directory);
  }
}
Program: 119718
Project: 119718
Buggy source:
@Override public void setTopFolder(List<ExportFileResource> resourcesToExport){
  String topFolder=getRootFolderName(getDestinationPath());
  for (  ExportFileResource fileResource : resourcesToExport) {
    String directory=fileResource.getDirectoryName();
    fileResource.setDirectoryName(topFolder + "String_Node_Str" + directory);
  }
}

Fixed version (ground truth):
@Override public void setTopFolder(List<ExportFileResource> resourcesToExport){
  String topFolder=getRootFolderName(this.topFolderName);
  for (  ExportFileResource fileResource : resourcesToExport) {
    String directory=fileResource.getDirectoryName();
    fileResource.setDirectoryName(topFolder + "String_Node_Str" + directory);
  }
}
Program: 119720
Project: 119720
Buggy source:
@Override public void start(final BundleContext context) throws Exception {
  super.start(context);
  if (!CommonUIPlugin.isFullyHeadless()) {
    IPreferenceStore store=EditorsPlugin.getDefault().getPreferenceStore();
    store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_UNDO_HISTORY_SIZE,0);
  }
}

Fixed version (ground truth):
@Override public void start(final BundleContext context) throws Exception {
  super.start(context);
}
Program: 119721
Project: 119721
Buggy source:
/** 
 * DOC xzhang Comment method "autoMap".
 */
public void autoMap(String currentSchema){
  if (this.hl7Manager instanceof HL7OutputManager) {
    List<HL7TreeNode> roots=this.hl7Manager.getTreeData("String_Node_Str");
    List<HL7TreeNode> mappableNodes=new ArrayList<HL7TreeNode>();
    for (    HL7TreeNode root : roots) {
      getMappableNode((Element)root,mappableNodes);
    }
    List<IMetadataColumn> schemaData=this.hl7Manager.getSchemaData(currentSchema);
    for (    HL7TreeNode node : mappableNodes) {
      for (      IMetadataColumn column : schemaData) {
        if (node.getLabel().equals(column.getLabel())) {
          node.setDefaultValue(null);
          node.setColumn(column);
          break;
        }
        String[] splits=node.getColumnLabel().split("String_Node_Str");
        for (        String s : splits) {
          if (s.equals(column.getLabel())) {
            node.setDefaultValue(null);
            node.setColumn(column);
            break;
          }
        }
      }
    }
    this.hl7UI.redrawLinkers();
    return;
  }
  this.hl7UI.autoMap();
}

Fixed version (ground truth):
/** 
 * DOC xzhang Comment method "autoMap".
 */
public void autoMap(String currentSchema){
  if (this.hl7Manager instanceof HL7OutputManager) {
    List<HL7TreeNode> roots=this.hl7Manager.getTreeData("String_Node_Str");
    List<HL7TreeNode> mappableNodes=new ArrayList<HL7TreeNode>();
    for (    HL7TreeNode root : roots) {
      getMappableNode((Element)root,mappableNodes);
    }
    List<IMetadataColumn> schemaData=this.hl7Manager.getSchemaData(currentSchema);
    for (    HL7TreeNode node : mappableNodes) {
      for (      IMetadataColumn column : schemaData) {
        if (node.getLabel().equals(column.getLabel())) {
          node.setDefaultValue(null);
          node.setColumn(column);
          break;
        }
      }
    }
    this.hl7UI.redrawLinkers();
    return;
  }
  this.hl7UI.autoMap();
}
Program: 119724
Project: 119724
Buggy source:
@Override protected List<IRepositoryViewObject> loadRepViewObjectWithOtherTypes() throws PersistenceException {
  List<IRepositoryViewObject> list=new ArrayList<IRepositoryViewObject>();
  list.addAll(loadRepViewObjectWithOtherTypes(ERepositoryObjectType.PROCESS));
  ERepositoryObjectType mrRepObjType=ERepositoryObjectType.valueOf(ERepositoryObjectType.class,"String_Node_Str");
  list.addAll(loadRepViewObjectWithOtherTypes(mrRepObjType));
  list.addAll(loadRepViewObjectWithOtherTypes(ERepositoryObjectType.PIG_UDF));
  return list;
}

Fixed version (ground truth):
@Override protected List<IRepositoryViewObject> loadRepViewObjectWithOtherTypes() throws PersistenceException {
  List<IRepositoryViewObject> list=new ArrayList<IRepositoryViewObject>();
  list.addAll(loadRepViewObjectWithOtherTypes(ERepositoryObjectType.PROCESS));
  ERepositoryObjectType mrRepObjType=ERepositoryObjectType.valueOf(ERepositoryObjectType.class,"String_Node_Str");
  list.addAll(loadRepViewObjectWithOtherTypes(mrRepObjType));
  list.addAll(loadRepViewObjectWithOtherTypes(ERepositoryObjectType.PIG_UDF));
  ERepositoryObjectType routeType=ERepositoryObjectType.valueOf(ERepositoryObjectType.class,"String_Node_Str");
  if (routeType != null) {
    list.addAll(loadRepViewObjectWithOtherTypes(routeType));
  }
  return list;
}
Program: 119725
Project: 119725
Buggy source:
public void updateStatus(){
  for (  IElementParameter enableParallel : figureMap.keySet()) {
    if (enableParallel != null) {
      if (enableParallel.getValue().equals(true)) {
        if (enableParallel.getName().equals(EParameterName.NONE.getName())) {
          boolean isDisplayKeepPartion=false;
          isDisplayKeepPartion=ParallelExecutionUtils.isExistPreviousParCon((Node)connection.getSource());
          if (isDisplayKeepPartion) {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(true);
            }
          }
 else {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(false);
            }
          }
        }
 else {
          for (          ParallelFigure pf : figureMap.get(enableParallel)) {
            pf.setVisible(true);
          }
        }
      }
 else {
        for (        ParallelFigure pf : figureMap.get(enableParallel)) {
          pf.setVisible(false);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void updateStatus(){
  for (  IElementParameter enableParallel : figureMap.keySet()) {
    if (connection.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA) && enableParallel != null) {
      if (enableParallel.getValue().equals(true)) {
        if (enableParallel.getName().equals(EParameterName.NONE.getName())) {
          boolean isDisplayKeepPartion=false;
          isDisplayKeepPartion=ParallelExecutionUtils.isExistPreviousParCon((Node)connection.getSource());
          if (isDisplayKeepPartion) {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(true);
            }
          }
 else {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(false);
            }
          }
        }
 else {
          for (          ParallelFigure pf : figureMap.get(enableParallel)) {
            pf.setVisible(true);
          }
        }
      }
 else {
        for (        ParallelFigure pf : figureMap.get(enableParallel)) {
          pf.setVisible(false);
        }
      }
    }
  }
}
Program: 119728
Project: 119728
Buggy source:
@Override protected List<IRepositoryViewObject> loadRepViewObjectWithOtherTypes() throws PersistenceException {
  List<IRepositoryViewObject> list=new ArrayList<IRepositoryViewObject>();
  list.addAll(loadRepViewObjectWithOtherTypes(ERepositoryObjectType.PROCESS));
  ERepositoryObjectType mrRepObjType=ERepositoryObjectType.valueOf(ERepositoryObjectType.class,"String_Node_Str");
  list.addAll(loadRepViewObjectWithOtherTypes(mrRepObjType));
  list.addAll(loadRepViewObjectWithOtherTypes(ERepositoryObjectType.PIG_UDF));
  return list;
}

Fixed version (ground truth):
@Override protected List<IRepositoryViewObject> loadRepViewObjectWithOtherTypes() throws PersistenceException {
  List<IRepositoryViewObject> list=new ArrayList<IRepositoryViewObject>();
  list.addAll(loadRepViewObjectWithOtherTypes(ERepositoryObjectType.PROCESS));
  ERepositoryObjectType mrRepObjType=ERepositoryObjectType.valueOf(ERepositoryObjectType.class,"String_Node_Str");
  list.addAll(loadRepViewObjectWithOtherTypes(mrRepObjType));
  list.addAll(loadRepViewObjectWithOtherTypes(ERepositoryObjectType.PIG_UDF));
  ERepositoryObjectType routeType=ERepositoryObjectType.valueOf(ERepositoryObjectType.class,"String_Node_Str");
  if (routeType != null) {
    list.addAll(loadRepViewObjectWithOtherTypes(routeType));
  }
  return list;
}
Program: 119729
Project: 119729
Buggy source:
@Override public void start(final BundleContext context) throws Exception {
  super.start(context);
  if (!CommonUIPlugin.isFullyHeadless()) {
    IPreferenceStore store=EditorsPlugin.getDefault().getPreferenceStore();
    store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_UNDO_HISTORY_SIZE,0);
  }
}

Fixed version (ground truth):
@Override public void start(final BundleContext context) throws Exception {
  super.start(context);
}
Program: 119730
Project: 119730
Buggy source:
/** 
 * DOC amaumont Comment method "createMetadataEditor".
 */
private void createMetadataEditorTab(){
  CTabItem item=new CTabItem(tabFolderEditors,SWT.BORDER);
  item.setText(Messages.getString("String_Node_Str"));
  SashForm inOutMetaEditorContainer=new SashForm(tabFolderEditors,SWT.SMOOTH | SWT.HORIZONTAL | SWT.SHADOW_OUT);
  inOutMetaEditorContainer.setLayout(new RowLayout(SWT.HORIZONTAL));
  item.setControl(inOutMetaEditorContainer);
  CommandStack commandStack=mapperManager.getCommandStack();
  inputMetaEditor=new MetadataTableEditorView(inOutMetaEditorContainer,SWT.BORDER);
  inputMetaEditor.setShowDbTypeColumn(true,false,false);
  inputMetaEditor.setShowDbColumnName(true,false);
  inputMetaEditor.setShowPatternColumn(false);
  inputMetaEditor.setShowTalendTypeColumn(false);
  inputMetaEditor.initGraphicComponents();
  inputMetaEditor.getExtendedTableViewer().setCommandStack(commandStack);
  outputMetaEditor=new MetadataTableEditorView(inOutMetaEditorContainer,SWT.BORDER);
  outputMetaEditor.setShowDbTypeColumn(true,false,false);
  outputMetaEditor.setShowDbColumnName(true,false);
  outputMetaEditor.setShowTalendTypeColumn(false);
  outputMetaEditor.setShowPatternColumn(false);
  outputMetaEditor.initGraphicComponents();
  outputMetaEditor.getExtendedTableViewer().setCommandStack(commandStack);
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "createMetadataEditor".
 */
private void createMetadataEditorTab(){
  CTabItem item=new CTabItem(tabFolderEditors,SWT.BORDER);
  item.setText(Messages.getString("String_Node_Str"));
  SashForm inOutMetaEditorContainer=new SashForm(tabFolderEditors,SWT.SMOOTH | SWT.HORIZONTAL | SWT.SHADOW_OUT);
  inOutMetaEditorContainer.setLayout(new RowLayout(SWT.HORIZONTAL));
  item.setControl(inOutMetaEditorContainer);
  CommandStack commandStack=mapperManager.getCommandStack();
  inputMetaEditor=new MetadataTableEditorView(inOutMetaEditorContainer,SWT.BORDER);
  inputMetaEditor.setShowDbTypeColumn(true,false,true);
  inputMetaEditor.setShowDbColumnName(true,false);
  inputMetaEditor.setShowPatternColumn(false);
  inputMetaEditor.setShowTalendTypeColumn(false);
  inputMetaEditor.initGraphicComponents();
  inputMetaEditor.getExtendedTableViewer().setCommandStack(commandStack);
  outputMetaEditor=new MetadataTableEditorView(inOutMetaEditorContainer,SWT.BORDER);
  outputMetaEditor.setShowDbTypeColumn(true,false,true);
  outputMetaEditor.setShowDbColumnName(true,false);
  outputMetaEditor.setShowTalendTypeColumn(false);
  outputMetaEditor.setShowPatternColumn(false);
  outputMetaEditor.initGraphicComponents();
  outputMetaEditor.getExtendedTableViewer().setCommandStack(commandStack);
}
Program: 119731
Project: 119731
Buggy source:
public void updateStatus(){
  for (  IElementParameter enableParallel : figureMap.keySet()) {
    if (enableParallel != null) {
      if (enableParallel.getValue().equals(true)) {
        if (enableParallel.getName().equals(EParameterName.NONE.getName())) {
          boolean isDisplayKeepPartion=false;
          isDisplayKeepPartion=ParallelExecutionUtils.isExistPreviousParCon((Node)connection.getSource());
          if (isDisplayKeepPartion) {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(true);
            }
          }
 else {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(false);
            }
          }
        }
 else {
          for (          ParallelFigure pf : figureMap.get(enableParallel)) {
            pf.setVisible(true);
          }
        }
      }
 else {
        for (        ParallelFigure pf : figureMap.get(enableParallel)) {
          pf.setVisible(false);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void updateStatus(){
  for (  IElementParameter enableParallel : figureMap.keySet()) {
    if (connection.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA) && enableParallel != null) {
      if (enableParallel.getValue().equals(true)) {
        if (enableParallel.getName().equals(EParameterName.NONE.getName())) {
          boolean isDisplayKeepPartion=false;
          isDisplayKeepPartion=ParallelExecutionUtils.isExistPreviousParCon((Node)connection.getSource());
          if (isDisplayKeepPartion) {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(true);
            }
          }
 else {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(false);
            }
          }
        }
 else {
          for (          ParallelFigure pf : figureMap.get(enableParallel)) {
            pf.setVisible(true);
          }
        }
      }
 else {
        for (        ParallelFigure pf : figureMap.get(enableParallel)) {
          pf.setVisible(false);
        }
      }
    }
  }
}
Program: 119733
Project: 119733
Buggy source:
public ConnectionLabel getConnectionLabel(){
  if (label.equals("String_Node_Str") || label.equals("String_Node_Str")) {
    System.out.println("String_Node_Str");
  }
  return label;
}

Fixed version (ground truth):
public ConnectionLabel getConnectionLabel(){
  return label;
}
Program: 119734
Project: 119734
Buggy source:
public void updateStatus(){
  for (  IElementParameter enableParallel : figureMap.keySet()) {
    if (enableParallel != null) {
      if (enableParallel.getValue().equals(true)) {
        if (enableParallel.getName().equals(EParameterName.NONE.getName())) {
          boolean isDisplayKeepPartion=false;
          isDisplayKeepPartion=ParallelExecutionUtils.isExistPreviousParCon((Node)connection.getSource());
          if (isDisplayKeepPartion) {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(true);
            }
          }
 else {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(false);
            }
          }
        }
 else {
          for (          ParallelFigure pf : figureMap.get(enableParallel)) {
            pf.setVisible(true);
          }
        }
      }
 else {
        for (        ParallelFigure pf : figureMap.get(enableParallel)) {
          pf.setVisible(false);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void updateStatus(){
  for (  IElementParameter enableParallel : figureMap.keySet()) {
    if (connection.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA) && enableParallel != null) {
      if (enableParallel.getValue().equals(true)) {
        if (enableParallel.getName().equals(EParameterName.NONE.getName())) {
          boolean isDisplayKeepPartion=false;
          isDisplayKeepPartion=ParallelExecutionUtils.isExistPreviousParCon((Node)connection.getSource());
          if (isDisplayKeepPartion) {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(true);
            }
          }
 else {
            for (            ParallelFigure pf : figureMap.get(enableParallel)) {
              pf.setVisible(false);
            }
          }
        }
 else {
          for (          ParallelFigure pf : figureMap.get(enableParallel)) {
            pf.setVisible(true);
          }
        }
      }
 else {
        for (        ParallelFigure pf : figureMap.get(enableParallel)) {
          pf.setVisible(false);
        }
      }
    }
  }
}