nus-yam/ex-repair huggingface dataset:
Program: 120852
Project: 120852
Buggy source:
protected void generateDisplayName(){
  this.displayName=getParent().getName() + "String_Node_Str" + index+ "String_Node_Str"+ (++rep)+ "String_Node_Str"+ TalendTextUtils.LBRACKET+ type.getName()+ TalendTextUtils.RBRACKET;
}

Fixed version (ground truth):
@Override protected void generateDisplayName(){
  String typeDispaly=type == null ? "String_Node_Str" : TalendTextUtils.LBRACKET + this.type.getName() + TalendTextUtils.RBRACKET;
  this.displayName=getParent().getName() + "String_Node_Str" + index+ "String_Node_Str"+ (++rep)+ "String_Node_Str"+ typeDispaly;
}
Program: 120853
Project: 120853
Buggy source:
private void generatePrimitive(){
  List<PrimitiveModel> pms=new ArrayList<PrimitiveModel>();
  int numComp=Terser.numComponents(this.type);
  for (int k=1; k <= numComp; k++) {
    int numSubComp=Terser.numSubComponents(this.type,k);
    for (int m=1; m <= numSubComp; m++) {
      Primitive p=getPrimitive(this.type,k,m);
      if (p.getValue() != null) {
        PrimitiveModel pm=new PrimitiveModel(this,p,k,m);
        pms.add(pm);
      }
    }
  }
  primitives=pms.toArray(new PrimitiveModel[0]);
}

Fixed version (ground truth):
private void generatePrimitive(){
  if (type != null) {
    List<PrimitiveModel> pms=new ArrayList<PrimitiveModel>();
    int numComp=Terser.numComponents(this.type);
    for (int k=1; k <= numComp; k++) {
      int numSubComp=Terser.numSubComponents(this.type,k);
      for (int m=1; m <= numSubComp; m++) {
        Primitive p=getPrimitive(this.type,k,m);
        if (p.getValue() != null) {
          PrimitiveModel pm=new PrimitiveModel(this,p,k,m);
          pms.add(pm);
        }
      }
    }
    primitives=pms.toArray(new PrimitiveModel[0]);
  }
 else {
    PrimitiveModel pm=new PrimitiveModel(this,null,1,1);
    primitives=new PrimitiveModel[]{pm};
  }
}
Program: 120854
Project: 120854
Buggy source:
private Type getComponent(Type type,int comp){
  Type ret=null;
  if (Varies.class.isAssignableFrom(type.getClass())) {
    Varies v=(Varies)type;
    try {
      if (comp > 1 && GenericPrimitive.class.isAssignableFrom(v.getData().getClass()))       v.setData(new GenericComposite(v.getMessage()));
    }
 catch (    DataTypeException de) {
      String message="String_Node_Str" + de.getMessage();
      throw new Error(message);
    }
    ret=getComponent(v.getData(),comp);
  }
 else {
    if (Primitive.class.isAssignableFrom(type.getClass()) && comp == 1) {
      ret=type;
    }
 else     if (GenericComposite.class.isAssignableFrom(type.getClass()) || (Composite.class.isAssignableFrom(type.getClass()) && comp <= numStandardComponents(type))) {
      try {
        ret=((Composite)type).getComponent(comp - 1);
      }
 catch (      Exception e) {
        throw new Error("String_Node_Str",e);
      }
    }
 else {
      ret=type.getExtraComponents().getComponent(comp - numStandardComponents(type) - 1);
    }
  }
  return ret;
}

Fixed version (ground truth):
private Type getComponent(Type type,int comp){
  Type ret=null;
  if (Varies.class.isAssignableFrom(type.getClass())) {
    Varies v=(Varies)type;
    try {
      if (comp > 1 && GenericPrimitive.class.isAssignableFrom(v.getData().getClass())) {
        v.setData(new GenericComposite(v.getMessage()));
      }
    }
 catch (    DataTypeException de) {
      String message="String_Node_Str" + de.getMessage();
      throw new Error(message);
    }
    ret=getComponent(v.getData(),comp);
  }
 else {
    if (Primitive.class.isAssignableFrom(type.getClass()) && comp == 1) {
      ret=type;
    }
 else     if (GenericComposite.class.isAssignableFrom(type.getClass()) || (Composite.class.isAssignableFrom(type.getClass()) && comp <= numStandardComponents(type))) {
      try {
        ret=((Composite)type).getComponent(comp - 1);
      }
 catch (      Exception e) {
        throw new Error("String_Node_Str",e);
      }
    }
 else {
      ret=type.getExtraComponents().getComponent(comp - numStandardComponents(type) - 1);
    }
  }
  return ret;
}
Program: 120855
Project: 120855
Buggy source:
@Override public void reset(){
  componentsImageRegistry.clear();
  componentList=null;
  skeletonList=null;
  customComponentList=null;
}

Fixed version (ground truth):
@Override public void reset(){
  componentList=null;
  skeletonList=null;
  customComponentList=null;
}
Program: 120859
Project: 120859
Buggy source:
/** 
 * DOC hcyi Comment method "checkHasMultiPrejobOrPostJobComponents".
 */
private void checkHasMultiPrejobOrPostJobComponents(){
  if (PluginChecker.isJobLetPluginLoaded()) {
    IJobletProviderService jobletService=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
    if (jobletService != null) {
      if (jobletService.isJobletComponent(this)) {
        Map<String,INode> multiNodes=new HashMap<String,INode>();
        for (        INode node : jobletService.getGraphNodesForJoblet(this)) {
          if (("String_Node_Str").equals(node.getUniqueName())) {
            continue;
          }
          String componentName=node.getComponent().getName();
          if (componentName != null && componentName.equals(TPREJOB_STR)) {
            if (!multiNodes.containsKey(TPREJOB_STR)) {
              multiNodes.put(TPREJOB_STR,node);
            }
 else {
              String errorMessage=Messages.getString("String_Node_Str",TPREJOB_STR);
              Problems.add(ProblemStatus.WARNING,this,errorMessage);
            }
          }
          if (componentName != null && componentName.equals(TPOSTJOB_STR)) {
            if (!multiNodes.containsKey(TPOSTJOB_STR)) {
              multiNodes.put(TPOSTJOB_STR,node);
            }
 else {
              String errorMessage=Messages.getString("String_Node_Str",TPOSTJOB_STR);
              Problems.add(ProblemStatus.WARNING,this,errorMessage);
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC hcyi Comment method "checkHasMultiPrejobOrPostJobComponents".
 */
private void checkHasMultiPrejobOrPostJobComponents(){
  if (PluginChecker.isJobLetPluginLoaded()) {
    IJobletProviderService jobletService=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
    if (jobletService != null) {
      if (jobletService.isJobletComponent(this)) {
        Map<String,INode> multiNodes=new HashMap<String,INode>();
        for (        INode proGraphicNode : process.getGraphicalNodes()) {
          boolean jobletComponent=jobletService.isJobletComponent(proGraphicNode);
          if (jobletComponent) {
            for (            INode node : jobletService.getGraphNodesForJoblet(proGraphicNode)) {
              if (("String_Node_Str").equals(node.getUniqueName())) {
                continue;
              }
              checktPreOrPost(multiNodes,node);
            }
          }
 else {
            if (("String_Node_Str").equals(proGraphicNode.getUniqueName())) {
              continue;
            }
            checktPreOrPost(multiNodes,proGraphicNode);
          }
        }
      }
    }
  }
}
Program: 120864
Project: 120864
Buggy source:
public void transform(NodeType node){
  ElementParameterType customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (customModule == null) {
    customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  }
  if (customModule != null) {
    String customModuleName=customModule.getValue();
    if (customModuleName != null) {
      if (!customModuleName.startsWith("String_Node_Str")) {
        customModuleName="String_Node_Str" + customModuleName;
      }
      if (!customModuleName.endsWith("String_Node_Str")) {
        customModuleName=customModuleName + "String_Node_Str";
      }
      customModule.setValue(customModuleName);
    }
  }
}

Fixed version (ground truth):
public void transform(NodeType node){
  ElementParameterType module=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (module != null && "String_Node_Str".equals(module.getValue())) {
    ElementParameterType customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
    if (customModule == null) {
      customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
    }
    if (customModule != null) {
      String customModuleName=customModule.getValue();
      if (customModuleName != null) {
        if (!customModuleName.startsWith("String_Node_Str")) {
          customModuleName="String_Node_Str" + customModuleName;
        }
        if (!customModuleName.endsWith("String_Node_Str")) {
          customModuleName=customModuleName + "String_Node_Str";
        }
        customModule.setValue(customModuleName);
      }
    }
  }
}
Program: 120866
Project: 120866
Buggy source:
public void setBlocked(IStatus reason){
  Dialog.getBlockedHandler().showBlocked(this,reason,taskName);
}

Fixed version (ground truth):
public void setBlocked(IStatus reason){
}
Program: 120868
Project: 120868
Buggy source:
public void transform(NodeType node){
  ElementParameterType customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (customModule == null) {
    customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  }
  if (customModule != null) {
    String customModuleName=customModule.getValue();
    if (customModuleName != null) {
      if (!customModuleName.startsWith("String_Node_Str")) {
        customModuleName="String_Node_Str" + customModuleName;
      }
      if (!customModuleName.endsWith("String_Node_Str")) {
        customModuleName=customModuleName + "String_Node_Str";
      }
      customModule.setValue(customModuleName);
    }
  }
}

Fixed version (ground truth):
public void transform(NodeType node){
  String property="String_Node_Str";
  ElementParameterType module=ComponentUtilities.getNodeProperty(node,property);
  if (module != null && "String_Node_Str".equals(module.getValue())) {
    ElementParameterType customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
    if (customModule == null) {
      customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
    }
    if (customModule != null) {
      String customModuleName=customModule.getValue();
      if (customModuleName != null) {
        if (!customModuleName.startsWith("String_Node_Str")) {
          customModuleName="String_Node_Str" + customModuleName;
        }
        if (!customModuleName.endsWith("String_Node_Str")) {
          customModuleName=customModuleName + "String_Node_Str";
        }
        customModule.setValue(customModuleName);
      }
    }
  }
}
Program: 120872
Project: 120872
Buggy source:
@Override protected ITableLabelProvider createLabelProvider(){
  return new ITableLabelProvider(){
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
    public String getColumnText(    Object element,    int columnIndex){
      String value=((String)element);
      if (columnIndex == 0) {
        String trim=ARG_DELIMITER.trim();
        if (value.trim().startsWith(trim)) {
          return value;
        }
        return trim + value;
      }
      throw new IllegalStateException();
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public void dispose(){
    }
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void removeListener(    ILabelProviderListener listener){
    }
  }
;
}

Fixed version (ground truth):
@Override protected ITableLabelProvider createLabelProvider(){
  return new ITableLabelProvider(){
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
    public String getColumnText(    Object element,    int columnIndex){
      String value=((String)element);
      if (columnIndex == 0) {
        return value.replace("String_Node_Str","String_Node_Str");
      }
      throw new IllegalStateException();
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public void dispose(){
    }
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void removeListener(    ILabelProviderListener listener){
    }
  }
;
}
Program: 120873
Project: 120873
Buggy source:
@Override protected List<String> readString(String stringList){
  if (stringList == null || "String_Node_Str".equals(stringList)) {
    return EMPTY_STRING_LIST;
  }
  ArrayList<String> result=new ArrayList<String>(50);
  for (  String tmp : stringList.split(ARG_DELIMITER)) {
    if (tmp != null && !"String_Node_Str".equals(tmp)) {
      result.add(tmp);
    }
  }
  return result;
}

Fixed version (ground truth):
@Override protected List<String> readString(String stringList){
  if (stringList == null || "String_Node_Str".equals(stringList)) {
    return EMPTY_STRING_LIST;
  }
  ArrayList<String> result=new ArrayList<String>(50);
  for (  String tmp : stringList.split("String_Node_Str")) {
    if (tmp != null && !"String_Node_Str".equals(tmp)) {
      result.add(tmp);
    }
  }
  return result;
}
Program: 120874
Project: 120874
Buggy source:
public String getColumnText(Object element,int columnIndex){
  String value=((String)element);
  if (columnIndex == 0) {
    String trim=ARG_DELIMITER.trim();
    if (value.trim().startsWith(trim)) {
      return value;
    }
    return trim + value;
  }
  throw new IllegalStateException();
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  String value=((String)element);
  if (columnIndex == 0) {
    return value.replace("String_Node_Str","String_Node_Str");
  }
  throw new IllegalStateException();
}
Program: 120875
Project: 120875
Buggy source:
@Override protected String writeString(List<String> items){
  int size=items.size();
  StringBuffer buf=new StringBuffer(size * 50);
  if (size > 0) {
    buf.append(ARG_DELIMITER);
  }
  for (int i=0; i < size; i++) {
    buf.append(items.get(i));
    if (i != size - 1) {
      String trim=ARG_DELIMITER.trim();
      if (!items.get(i + 1).trim().startsWith(trim)) {
        buf.append(ARG_DELIMITER);
      }
 else {
        buf.append("String_Node_Str");
      }
    }
  }
  return buf.toString();
}

Fixed version (ground truth):
@Override protected String writeString(List<String> items){
  int size=items.size();
  StringBuffer buf=new StringBuffer(size * 50);
  buf.append("String_Node_Str");
  for (int i=0; i < size; i++) {
    buf.append(items.get(i).trim().replaceAll("String_Node_Str","String_Node_Str"));
    buf.append("String_Node_Str");
  }
  return buf.toString();
}
Program: 120876
Project: 120876
Buggy source:
protected ITableLabelProvider createLabelProvider(){
  return new ITableLabelProvider(){
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
    public String getColumnText(    Object element,    int columnIndex){
      String value=((String)element);
      if (columnIndex == 0) {
        return value;
      }
      throw new IllegalStateException();
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public void dispose(){
    }
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void removeListener(    ILabelProviderListener listener){
    }
  }
;
}

Fixed version (ground truth):
protected ITableLabelProvider createLabelProvider(){
  return new ITableLabelProvider(){
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
    public String getColumnText(    Object element,    int columnIndex){
      String value=((String)element);
      if (columnIndex == 0) {
        return value.replace("String_Node_Str","String_Node_Str");
      }
      throw new IllegalStateException();
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public void dispose(){
    }
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void removeListener(    ILabelProviderListener listener){
    }
  }
;
}
Program: 120877
Project: 120877
Buggy source:
protected void editItem(ISelection sel){
  IStructuredSelection selection=(IStructuredSelection)sel;
  String existing=(String)selection.getFirstElement();
  String value=getExistingInputObject(existing);
  if (value != null) {
    int indexOf=list.indexOf(existing);
    list.remove(existing);
    list.add(indexOf,value.replaceAll("String_Node_Str","String_Node_Str"));
    viewer.refresh();
    doSave();
  }
}

Fixed version (ground truth):
protected void editItem(ISelection sel){
  IStructuredSelection selection=(IStructuredSelection)sel;
  String existing=(String)selection.getFirstElement();
  String value=getExistingInputObject(existing.replace("String_Node_Str","String_Node_Str"));
  if (value != null) {
    int indexOf=list.indexOf(existing);
    list.remove(existing);
    list.add(indexOf,value);
    viewer.refresh();
    doSave();
  }
}
Program: 120878
Project: 120878
Buggy source:
public String getColumnText(Object element,int columnIndex){
  String value=((String)element);
  if (columnIndex == 0) {
    return value;
  }
  throw new IllegalStateException();
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  String value=((String)element);
  if (columnIndex == 0) {
    return value.replace("String_Node_Str","String_Node_Str");
  }
  throw new IllegalStateException();
}
Program: 120879
Project: 120879
Buggy source:
public void transform(NodeType node){
  ElementParameterType customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (customModule == null) {
    customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  }
  if (customModule != null) {
    String customModuleName=customModule.getValue();
    if (customModuleName != null) {
      if (!customModuleName.startsWith("String_Node_Str")) {
        customModuleName="String_Node_Str" + customModuleName;
      }
      if (!customModuleName.endsWith("String_Node_Str")) {
        customModuleName=customModuleName + "String_Node_Str";
      }
      customModule.setValue(customModuleName);
    }
  }
}

Fixed version (ground truth):
public void transform(NodeType node){
  ElementParameterType module=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (module != null && "String_Node_Str".equals(module.getValue())) {
    ElementParameterType customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
    if (customModule == null) {
      customModule=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
    }
    if (customModule != null) {
      String customModuleName=customModule.getValue();
      if (customModuleName != null) {
        if (!customModuleName.startsWith("String_Node_Str")) {
          customModuleName="String_Node_Str" + customModuleName;
        }
        if (!customModuleName.endsWith("String_Node_Str")) {
          customModuleName=customModuleName + "String_Node_Str";
        }
        customModule.setValue(customModuleName);
      }
    }
  }
}
Program: 120881
Project: 120881
Buggy source:
private void createPopupMenu(){
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    @Override public void menuAboutToShow(    IMenuManager mgr){
      BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
      if (businessAssignment != null) {
        repositoryNode=createRepositoryNode(businessAssignment);
        if (repositoryNode != null) {
          List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
          for (          ITreeContextualAction action : contextualsActions) {
            if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
              action.init(null,new StructuredSelection(repositoryNode));
              if (action.isVisible()) {
                ((AContextualAction)action).setAvoidUnloadResources(true);
                mgr.add(action);
              }
            }
          }
        }
        CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
      }
    }
  }
);
  Menu menu=menuMgr.createContextMenu(tableViewer.getControl());
  tableViewer.getControl().setMenu(menu);
}

Fixed version (ground truth):
private void createPopupMenu(){
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    @Override public void menuAboutToShow(    IMenuManager mgr){
      BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
      if (businessAssignment != null) {
        repositoryNode=createRepositoryNode(businessAssignment);
        if (repositoryNode != null) {
          List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
          for (          ITreeContextualAction action : contextualsActions) {
            if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
              action.init(null,new StructuredSelection(repositoryNode));
              if (action.isVisible()) {
                ((AContextualAction)action).setAvoidUnloadResources(true);
                mgr.add(action);
              }
            }
          }
          if (ProjectManager.getInstance().isInCurrentMainProject(repositoryNode)) {
            CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
          }
        }
      }
    }
  }
);
  Menu menu=menuMgr.createContextMenu(tableViewer.getControl());
  tableViewer.getControl().setMenu(menu);
}
Program: 120882
Project: 120882
Buggy source:
@Override public void menuAboutToShow(IMenuManager mgr){
  BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
  if (businessAssignment != null) {
    repositoryNode=createRepositoryNode(businessAssignment);
    if (repositoryNode != null) {
      List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
      for (      ITreeContextualAction action : contextualsActions) {
        if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
          action.init(null,new StructuredSelection(repositoryNode));
          if (action.isVisible()) {
            ((AContextualAction)action).setAvoidUnloadResources(true);
            mgr.add(action);
          }
        }
      }
    }
    CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
  }
}

Fixed version (ground truth):
@Override public void menuAboutToShow(IMenuManager mgr){
  BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
  if (businessAssignment != null) {
    repositoryNode=createRepositoryNode(businessAssignment);
    if (repositoryNode != null) {
      List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
      for (      ITreeContextualAction action : contextualsActions) {
        if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
          action.init(null,new StructuredSelection(repositoryNode));
          if (action.isVisible()) {
            ((AContextualAction)action).setAvoidUnloadResources(true);
            mgr.add(action);
          }
        }
      }
      if (ProjectManager.getInstance().isInCurrentMainProject(repositoryNode)) {
        CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
      }
    }
  }
}
Program: 120883
Project: 120883
Buggy source:
/** 
 * Build Root Nodes List.
 * @return
 */
@SuppressWarnings("String_Node_Str") public void buildRootNodes(IProcess process){
  rootNodes=new ArrayList<INode>();
  List<INode> preJobsNode=(List<INode>)process.getNodesOfType("String_Node_Str");
  for (  INode node : preJobsNode) {
    if (node.isActivate()) {
      rootNodes.add(node);
    }
  }
  for (  INode node : nodes) {
    String componentName=node.getComponent().getName();
    if ((node.isStart()) && (node.isActivate()) && (!componentName.equals("String_Node_Str"))&& (!componentName.equals("String_Node_Str"))) {
      rootNodes.add(node);
    }
  }
  List<INode> postJobsNode=(List<INode>)process.getNodesOfType("String_Node_Str");
  for (  INode node : postJobsNode) {
    if (node.isActivate()) {
      rootNodes.add(node);
    }
  }
}

Fixed version (ground truth):
/** 
 * Build Root Nodes List.
 * @return
 */
@SuppressWarnings("String_Node_Str") public void buildRootNodes(IProcess process){
  rootNodes=new ArrayList<INode>();
  List<INode> preJobsNode=(List<INode>)process.getNodesOfType("String_Node_Str");
  for (  INode node : preJobsNode) {
    if (node.isActivate()) {
      rootNodes.add(node);
    }
  }
  for (  INode node : nodes) {
    String componentName=node.getComponent().getName();
    if ((node.isStart()) && (node.isActivate()) && node.isDesignSubjobStartNode()&& !node.isThereLinkWithHash()&& (!componentName.equals("String_Node_Str"))&& (!componentName.equals("String_Node_Str"))) {
      rootNodes.add(node);
    }
  }
  List<INode> postJobsNode=(List<INode>)process.getNodesOfType("String_Node_Str");
  for (  INode node : postJobsNode) {
    if (node.isActivate()) {
      rootNodes.add(node);
    }
  }
}
Program: 120886
Project: 120886
Buggy source:
protected List<String> getRelatedJobFolderNames(ProcessItem process,Set<String> jobNameVersionChecked){
  List<String> jobFolderNames=new ArrayList<String>();
  String jobName=process.getProperty().getLabel();
  String jobVersion=process.getProperty().getVersion();
  String id=jobName + "String_Node_Str" + jobVersion;
  if (jobNameVersionChecked.contains(id)) {
    return jobFolderNames;
  }
  jobNameVersionChecked.add(id);
  String jobFolderName=JavaResourcesHelper.getJobFolderName(jobName,jobVersion);
  jobFolderNames.add(jobFolderName);
  Set<JobInfo> subjobInfos=ProcessorUtilities.getChildrenJobInfo(process);
  for (  JobInfo subjobInfo : subjobInfos) {
    jobFolderNames.addAll(getRelatedJobFolderNames(subjobInfo.getProcessItem(),jobNameVersionChecked));
  }
  return jobFolderNames;
}

Fixed version (ground truth):
protected List<String> getRelatedJobFolderNames(ProcessItem process,Set<String> jobNameVersionChecked){
  List<String> jobFolderNames=new ArrayList<String>();
  String projectName=getCorrespondingProjectName(process);
  String jobName=process.getProperty().getLabel();
  String jobVersion=process.getProperty().getVersion();
  String id=projectName + "String_Node_Str" + jobName+ "String_Node_Str"+ jobVersion;
  if (jobNameVersionChecked.contains(id)) {
    return jobFolderNames;
  }
  jobNameVersionChecked.add(id);
  String jobFolderName=JavaResourcesHelper.getJobFolderName(jobName,jobVersion);
  jobFolderNames.add(projectName + "String_Node_Str" + jobFolderName);
  Set<JobInfo> subjobInfos=ProcessorUtilities.getChildrenJobInfo(process);
  for (  JobInfo subjobInfo : subjobInfos) {
    jobFolderNames.addAll(getRelatedJobFolderNames(subjobInfo.getProcessItem(),jobNameVersionChecked));
  }
  return jobFolderNames;
}
Program: 120887
Project: 120887
Buggy source:
/** 
 * DOC ycbai Comment method "getJobScriptsUncompressed".
 * @param resource
 * @param process
 * @throws IOException
 */
private void getJobScriptsUncompressed(ExportFileResource resource,ProcessItem process) throws IOException {
  String projectName=getCorrespondingProjectName(process);
  final URI classRootURI=classesLocation.toURI();
  List<String> jobFolderNames=getRelatedJobFolderNames(process);
  try {
    final String classRootLocation=getClassRootLocation() + projectName + File.separator;
    for (    String jobFolderName : jobFolderNames) {
      String classRoot=FilesUtils.getFileRealPath(classRootLocation + jobFolderName);
      String targetPath=FilesUtils.getFileRealPath(classesLocation + File.separator + projectName+ File.separator+ jobFolderName);
      File sourceFile=new File(classRoot);
      File targetFile=new File(targetPath);
      FilesUtils.copyFolder(sourceFile,targetFile,true,null,null,true,false);
      List<URL> fileURLs=FilesUtils.getFileURLs(targetFile);
      for (      URL url : fileURLs) {
        resource.addResource(classRootURI.relativize(new File(url.toURI()).getParentFile().toURI()).toString(),url);
      }
    }
  }
 catch (  IOException e) {
    throw e;
  }
catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "getJobScriptsUncompressed".
 * @param resource
 * @param process
 * @throws IOException
 */
private void getJobScriptsUncompressed(ExportFileResource resource,ProcessItem process) throws IOException {
  final URI classRootURI=classesLocation.toURI();
  List<String> jobFolderNames=getRelatedJobFolderNames(process);
  try {
    for (    String jobFolderName : jobFolderNames) {
      String[] jf=jobFolderName.split("String_Node_Str");
      String projectName=jf[0];
      String folderName=jf[1];
      String classRootLocation=getClassRootLocation() + projectName + File.separator;
      String classRoot=FilesUtils.getFileRealPath(classRootLocation + folderName);
      String targetPath=FilesUtils.getFileRealPath(classesLocation + File.separator + projectName+ File.separator+ folderName);
      File sourceFile=new File(classRoot);
      File targetFile=new File(targetPath);
      FilesUtils.copyFolder(sourceFile,targetFile,true,null,null,true,false);
      List<URL> fileURLs=FilesUtils.getFileURLs(targetFile);
      for (      URL url : fileURLs) {
        resource.addResource(classRootURI.relativize(new File(url.toURI()).getParentFile().toURI()).toString(),url);
      }
    }
  }
 catch (  IOException e) {
    throw e;
  }
catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 120888
Project: 120888
Buggy source:
@Override protected ITableLabelProvider createLabelProvider(){
  return new ITableLabelProvider(){
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
    public String getColumnText(    Object element,    int columnIndex){
      String value=((String)element);
      if (columnIndex == 0) {
        String trim=ARG_DELIMITER.trim();
        if (value.trim().startsWith(trim)) {
          return value;
        }
        return trim + value;
      }
      throw new IllegalStateException();
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public void dispose(){
    }
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void removeListener(    ILabelProviderListener listener){
    }
  }
;
}

Fixed version (ground truth):
@Override protected ITableLabelProvider createLabelProvider(){
  return new ITableLabelProvider(){
    @Override public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
    @Override public String getColumnText(    Object element,    int columnIndex){
      String value=((String)element);
      if (columnIndex == 0) {
        return value.replace("String_Node_Str","String_Node_Str");
      }
      throw new IllegalStateException();
    }
    @Override public void addListener(    ILabelProviderListener listener){
    }
    @Override public void dispose(){
    }
    @Override public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    @Override public void removeListener(    ILabelProviderListener listener){
    }
  }
;
}
Program: 120889
Project: 120889
Buggy source:
@Override protected IStructuredContentProvider createContentProvider(){
  return new IStructuredContentProvider(){
    public Object[] getElements(    Object inputElement){
      return ((List)inputElement).toArray();
    }
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
  }
;
}

Fixed version (ground truth):
@Override protected IStructuredContentProvider createContentProvider(){
  return new IStructuredContentProvider(){
    @Override public Object[] getElements(    Object inputElement){
      return ((List)inputElement).toArray();
    }
    @Override public void dispose(){
    }
    @Override public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
  }
;
}
Program: 120890
Project: 120890
Buggy source:
@Override protected List<String> readString(String stringList){
  if (stringList == null || "String_Node_Str".equals(stringList)) {
    return EMPTY_STRING_LIST;
  }
  ArrayList<String> result=new ArrayList<String>(50);
  for (  String tmp : stringList.split(ARG_DELIMITER)) {
    if (tmp != null && !"String_Node_Str".equals(tmp)) {
      result.add(tmp);
    }
  }
  return result;
}

Fixed version (ground truth):
@Override protected List<String> readString(String stringList){
  if (stringList == null || "String_Node_Str".equals(stringList)) {
    return EMPTY_STRING_LIST;
  }
  ArrayList<String> result=new ArrayList<String>(50);
  for (  String tmp : stringList.split("String_Node_Str")) {
    if (tmp != null && !"String_Node_Str".equals(tmp)) {
      result.add(tmp);
    }
  }
  return result;
}
Program: 120891
Project: 120891
Buggy source:
public void removeListener(ILabelProviderListener listener){
}

Fixed version (ground truth):
@Override public void removeListener(ILabelProviderListener listener){
}
Program: 120892
Project: 120892
Buggy source:
public Image getColumnImage(Object element,int columnIndex){
  return null;
}

Fixed version (ground truth):
@Override public Image getColumnImage(Object element,int columnIndex){
  return null;
}
Program: 120893
Project: 120893
Buggy source:
public Object[] getElements(Object inputElement){
  return ((List)inputElement).toArray();
}

Fixed version (ground truth):
@Override public Object[] getElements(Object inputElement){
  return ((List)inputElement).toArray();
}
Program: 120894
Project: 120894
Buggy source:
public String getColumnText(Object element,int columnIndex){
  String value=((String)element);
  if (columnIndex == 0) {
    String trim=ARG_DELIMITER.trim();
    if (value.trim().startsWith(trim)) {
      return value;
    }
    return trim + value;
  }
  throw new IllegalStateException();
}

Fixed version (ground truth):
@Override public String getColumnText(Object element,int columnIndex){
  String value=((String)element);
  if (columnIndex == 0) {
    return value.replace("String_Node_Str","String_Node_Str");
  }
  throw new IllegalStateException();
}
Program: 120895
Project: 120895
Buggy source:
public void dispose(){
}

Fixed version (ground truth):
@Override public void dispose(){
}
Program: 120896
Project: 120896
Buggy source:
public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}

Fixed version (ground truth):
@Override public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}
Program: 120897
Project: 120897
Buggy source:
public boolean isLabelProperty(Object element,String property){
  return false;
}

Fixed version (ground truth):
@Override public boolean isLabelProperty(Object element,String property){
  return false;
}
Program: 120898
Project: 120898
Buggy source:
@Override protected String writeString(List<String> items){
  int size=items.size();
  StringBuffer buf=new StringBuffer(size * 50);
  if (size > 0) {
    buf.append(ARG_DELIMITER);
  }
  for (int i=0; i < size; i++) {
    buf.append(items.get(i));
    if (i != size - 1) {
      String trim=ARG_DELIMITER.trim();
      if (!items.get(i + 1).trim().startsWith(trim)) {
        buf.append(ARG_DELIMITER);
      }
 else {
        buf.append("String_Node_Str");
      }
    }
  }
  return buf.toString();
}

Fixed version (ground truth):
@Override protected String writeString(List<String> items){
  int size=items.size();
  StringBuffer buf=new StringBuffer(size * 50);
  buf.append("String_Node_Str");
  for (int i=0; i < size; i++) {
    buf.append(items.get(i).trim().replaceAll("String_Node_Str","String_Node_Str"));
    buf.append("String_Node_Str");
  }
  return buf.toString();
}
Program: 120899
Project: 120899
Buggy source:
public void addListener(ILabelProviderListener listener){
}

Fixed version (ground truth):
@Override public void addListener(ILabelProviderListener listener){
}
Program: 120900
Project: 120900
Buggy source:
protected ITableLabelProvider createLabelProvider(){
  return new ITableLabelProvider(){
    @Override public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
    @Override public String getColumnText(    Object element,    int columnIndex){
      String value=((String)element);
      if (columnIndex == 0) {
        return value;
      }
      throw new IllegalStateException();
    }
    @Override public void addListener(    ILabelProviderListener listener){
    }
    @Override public void dispose(){
    }
    @Override public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    @Override public void removeListener(    ILabelProviderListener listener){
    }
  }
;
}

Fixed version (ground truth):
protected ITableLabelProvider createLabelProvider(){
  return new ITableLabelProvider(){
    @Override public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
    @Override public String getColumnText(    Object element,    int columnIndex){
      String value=((String)element);
      if (columnIndex == 0) {
        return value.replace("String_Node_Str","String_Node_Str");
      }
      throw new IllegalStateException();
    }
    @Override public void addListener(    ILabelProviderListener listener){
    }
    @Override public void dispose(){
    }
    @Override public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    @Override public void removeListener(    ILabelProviderListener listener){
    }
  }
;
}
Program: 120901
Project: 120901
Buggy source:
protected void editItem(ISelection sel){
  IStructuredSelection selection=(IStructuredSelection)sel;
  String existing=(String)selection.getFirstElement();
  String value=getExistingInputObject(existing);
  if (value != null) {
    int indexOf=list.indexOf(existing);
    list.remove(existing);
    list.add(indexOf,value.replaceAll("String_Node_Str","String_Node_Str"));
    viewer.refresh();
    doSave();
  }
}

Fixed version (ground truth):
protected void editItem(ISelection sel){
  IStructuredSelection selection=(IStructuredSelection)sel;
  String existing=(String)selection.getFirstElement();
  String value=getExistingInputObject(existing.replace("String_Node_Str","String_Node_Str"));
  if (value != null) {
    int indexOf=list.indexOf(existing);
    list.remove(existing);
    list.add(indexOf,value);
    viewer.refresh();
    doSave();
  }
}
Program: 120902
Project: 120902
Buggy source:
@Override public String getColumnText(Object element,int columnIndex){
  String value=((String)element);
  if (columnIndex == 0) {
    return value;
  }
  throw new IllegalStateException();
}

Fixed version (ground truth):
@Override public String getColumnText(Object element,int columnIndex){
  String value=((String)element);
  if (columnIndex == 0) {
    return value.replace("String_Node_Str","String_Node_Str");
  }
  throw new IllegalStateException();
}
Program: 120903
Project: 120903
Buggy source:
private void createPopupMenu(){
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    @Override public void menuAboutToShow(    IMenuManager mgr){
      BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
      if (businessAssignment != null) {
        repositoryNode=createRepositoryNode(businessAssignment);
        if (repositoryNode != null) {
          List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
          for (          ITreeContextualAction action : contextualsActions) {
            if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
              action.init(null,new StructuredSelection(repositoryNode));
              if (action.isVisible()) {
                ((AContextualAction)action).setAvoidUnloadResources(true);
                mgr.add(action);
              }
            }
          }
        }
        CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
      }
    }
  }
);
  Menu menu=menuMgr.createContextMenu(tableViewer.getControl());
  tableViewer.getControl().setMenu(menu);
}

Fixed version (ground truth):
private void createPopupMenu(){
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    @Override public void menuAboutToShow(    IMenuManager mgr){
      BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
      if (businessAssignment != null) {
        repositoryNode=createRepositoryNode(businessAssignment);
        if (repositoryNode != null) {
          List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
          for (          ITreeContextualAction action : contextualsActions) {
            if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
              action.init(null,new StructuredSelection(repositoryNode));
              if (action.isVisible()) {
                ((AContextualAction)action).setAvoidUnloadResources(true);
                mgr.add(action);
              }
            }
          }
          if (ProjectManager.getInstance().isInCurrentMainProject(repositoryNode)) {
            CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
          }
        }
      }
    }
  }
);
  Menu menu=menuMgr.createContextMenu(tableViewer.getControl());
  tableViewer.getControl().setMenu(menu);
}
Program: 120904
Project: 120904
Buggy source:
@Override public void menuAboutToShow(IMenuManager mgr){
  BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
  if (businessAssignment != null) {
    repositoryNode=createRepositoryNode(businessAssignment);
    if (repositoryNode != null) {
      List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
      for (      ITreeContextualAction action : contextualsActions) {
        if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
          action.init(null,new StructuredSelection(repositoryNode));
          if (action.isVisible()) {
            ((AContextualAction)action).setAvoidUnloadResources(true);
            mgr.add(action);
          }
        }
      }
    }
    CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
  }
}

Fixed version (ground truth):
@Override public void menuAboutToShow(IMenuManager mgr){
  BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
  if (businessAssignment != null) {
    repositoryNode=createRepositoryNode(businessAssignment);
    if (repositoryNode != null) {
      List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
      for (      ITreeContextualAction action : contextualsActions) {
        if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
          action.init(null,new StructuredSelection(repositoryNode));
          if (action.isVisible()) {
            ((AContextualAction)action).setAvoidUnloadResources(true);
            mgr.add(action);
          }
        }
      }
      if (ProjectManager.getInstance().isInCurrentMainProject(repositoryNode)) {
        CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
      }
    }
  }
}
Program: 120905
Project: 120905
Buggy source:
protected List<String> getRelatedJobFolderNames(ProcessItem process,Set<String> jobNameVersionChecked){
  List<String> jobFolderNames=new ArrayList<String>();
  String jobName=process.getProperty().getLabel();
  String jobVersion=process.getProperty().getVersion();
  String id=jobName + "String_Node_Str" + jobVersion;
  if (jobNameVersionChecked.contains(id)) {
    return jobFolderNames;
  }
  jobNameVersionChecked.add(id);
  String jobFolderName=JavaResourcesHelper.getJobFolderName(jobName,jobVersion);
  jobFolderNames.add(jobFolderName);
  Set<JobInfo> subjobInfos=ProcessorUtilities.getChildrenJobInfo(process);
  for (  JobInfo subjobInfo : subjobInfos) {
    jobFolderNames.addAll(getRelatedJobFolderNames(subjobInfo.getProcessItem(),jobNameVersionChecked));
  }
  return jobFolderNames;
}

Fixed version (ground truth):
protected List<String> getRelatedJobFolderNames(ProcessItem process,Set<String> jobNameVersionChecked){
  List<String> jobFolderNames=new ArrayList<String>();
  String projectName=getCorrespondingProjectName(process);
  String jobName=process.getProperty().getLabel();
  String jobVersion=process.getProperty().getVersion();
  String id=projectName + "String_Node_Str" + jobName+ "String_Node_Str"+ jobVersion;
  if (jobNameVersionChecked.contains(id)) {
    return jobFolderNames;
  }
  jobNameVersionChecked.add(id);
  String jobFolderName=JavaResourcesHelper.getJobFolderName(jobName,jobVersion);
  jobFolderNames.add(projectName + "String_Node_Str" + jobFolderName);
  Set<JobInfo> subjobInfos=ProcessorUtilities.getChildrenJobInfo(process);
  for (  JobInfo subjobInfo : subjobInfos) {
    jobFolderNames.addAll(getRelatedJobFolderNames(subjobInfo.getProcessItem(),jobNameVersionChecked));
  }
  return jobFolderNames;
}
Program: 120906
Project: 120906
Buggy source:
public boolean accept(java.io.File dir,String name){
  File file=new java.io.File(dir,name);
  if (file.isFile()) {
    list.add(file);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean accept(java.io.File dir,String name){
  File file=new java.io.File(dir,name);
  if (file.isFile()) {
    list.add(file);
    return true;
  }
  return false;
}
Program: 120907
Project: 120907
Buggy source:
public int compare(ModuleNeeded m1,ModuleNeeded m2){
  return m1.getModuleName().compareToIgnoreCase(m2.getModuleName());
}

Fixed version (ground truth):
@Override public int compare(ModuleNeeded m1,ModuleNeeded m2){
  return m1.getModuleName().compareToIgnoreCase(m2.getModuleName());
}