nus-yam/ex-repair huggingface dataset:
Program: 123103
Project: 123103
Buggy source:
public Color getBackgroundColor(B bean){
  Map<String,Object> valueMap=(Map<String,Object>)bean;
  List<Map<String,Object>> fullValues=(List<Map<String,Object>>)param.getValue();
  int index=fullValues.indexOf(valueMap);
  if (index >= 0) {
    ((ElementParameter)currentParam).setCurrentRow(index);
    if (currentParam.isReadOnly(element.getElementParameters())) {
      return AbstractMetadataTableEditorView.READONLY_CELL_BG_COLOR;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Color getBackgroundColor(B bean){
  Map<String,Object> valueMap=(Map<String,Object>)bean;
  List<Map<String,Object>> fullValues=(List<Map<String,Object>>)param.getValue();
  int index=fullValues.indexOf(valueMap);
  if (index >= 0) {
    ((ElementParameter)currentParam).setCurrentRow(index);
    if (currentParam.isReadOnly(element.getElementParameters())) {
      return AbstractMetadataTableEditorView.READONLY_CELL_BG_COLOR;
    }
  }
  return null;
}
Program: 123104
Project: 123104
Buggy source:
/** 
 * DOC nrousseau Comment method "getItemsToDisplay".
 * @param element
 * @param param
 * @param rowNumber
 * @return
 */
private String[] getItemsToDisplay(final IElement element,final IElementParameter param,int rowNumber){
  if (param instanceof ElementParameter) {
    ((ElementParameter)param).setCurrentRow(rowNumber);
  }
  String[] originalList=param.getListItemsDisplayName();
  List<String> stringToDisplay=new ArrayList<String>();
  String[] itemsShowIf=param.getListItemsShowIf();
  if (itemsShowIf != null && (itemsShowIf.length > 0)) {
    String[] itemsNotShowIf=param.getListItemsNotShowIf();
    for (int i=0; i < originalList.length; i++) {
      if (param.isShow(itemsShowIf[i],itemsNotShowIf[i],element.getElementParameters())) {
        stringToDisplay.add(originalList[i]);
      }
    }
  }
 else {
    for (int i=0; i < originalList.length; i++) {
      stringToDisplay.add(originalList[i]);
    }
  }
  String[] listToDisplay=stringToDisplay.toArray(new String[0]);
  return listToDisplay;
}

Fixed version (ground truth):
/** 
 * DOC nrousseau Comment method "getItemsToDisplay".
 * @param element
 * @param param
 * @param rowNumber
 * @return
 */
private String[] getItemsToDisplay(final IElement element,final IElementParameter param,int rowNumber){
  if (param instanceof ElementParameter) {
    ((ElementParameter)param).setCurrentRow(rowNumber);
  }
  String[] originalList=param.getListItemsDisplayName();
  List<String> stringToDisplay=new ArrayList<String>();
  String[] itemsShowIf=param.getListItemsShowIf();
  if (itemsShowIf != null && (itemsShowIf.length > 0)) {
    String[] itemsNotShowIf=param.getListItemsNotShowIf();
    for (int i=0; i < originalList.length; i++) {
      if (param.isShow(itemsShowIf[i],itemsNotShowIf[i],element.getElementParameters())) {
        stringToDisplay.add(originalList[i]);
      }
    }
  }
 else {
    for (    String element2 : originalList) {
      stringToDisplay.add(element2);
    }
  }
  String[] listToDisplay=stringToDisplay.toArray(new String[0]);
  return listToDisplay;
}
Program: 123105
Project: 123105
Buggy source:
public void applyEditorValue(){
  if (element instanceof Node) {
    IProcess process=((Node)element).getProcess();
    if (process instanceof IProcess2) {
      ((IProcess2)process).checkProcess();
    }
  }
}

Fixed version (ground truth):
@Override public void applyEditorValue(){
  if (element instanceof Node) {
    IProcess process=((Node)element).getProcess();
    if (process instanceof IProcess2) {
      ((IProcess2)process).checkProcess();
    }
  }
}
Program: 123106
Project: 123106
Buggy source:
public void editorValueChanged(boolean oldValidState,boolean newValidState){
}

Fixed version (ground truth):
@Override public void editorValueChanged(boolean oldValidState,boolean newValidState){
}
Program: 123107
Project: 123107
Buggy source:
public void cancelEditor(){
}

Fixed version (ground truth):
@Override public void cancelEditor(){
}
Program: 123108
Project: 123108
Buggy source:
public Object get(B bean){
  Object value=((Map<String,Object>)bean).get(items[curCol]);
  if (value == null) {
    return "String_Node_Str";
  }
  if (itemsValue[curCol] instanceof IElementParameter) {
    IElementParameter tmpParam=(IElementParameter)itemsValue[curCol];
switch (tmpParam.getFieldType()) {
case CONTEXT_PARAM_NAME_LIST:
case CLOSED_LIST:
case COMPONENT_LIST:
case COLUMN_LIST:
case CONNECTION_LIST:
case LOOKUP_COLUMN_LIST:
case PREV_COLUMN_LIST:
case DBTYPE_LIST:
      String[] namesSet=tmpParam.getListItemsDisplayName();
    if (namesSet.length == 0) {
      return tmpParam.getDefaultClosedListValue();
    }
  if (value instanceof String) {
    boolean found=false;
    int index=0;
    Object[] items=((IElementParameter)itemsValue[curCol]).getListItemsValue();
    for (int j=0; j < items.length && !found; j++) {
      if (items[j].equals(value)) {
        found=true;
        index=j;
      }
    }
    value=new Integer(index);
  }
if (value != null && ((Integer)value) >= 0) {
  return namesSet[(Integer)value];
}
return null;
case CHECK:
if (value instanceof String) {
return new Boolean((String)value);
}
return value;
case RADIO:
if (value instanceof String) {
return new Boolean((String)value);
}
return value;
case COLOR:
if (value instanceof String) {
return TalendTextUtils.stringToRGB((String)value);
}
return value;
default :
return value;
}
}
return value;
}

Fixed version (ground truth):
@Override public Object get(B bean){
  Object value=((Map<String,Object>)bean).get(items[curCol]);
  if (value == null) {
    return "String_Node_Str";
  }
  if (itemsValue[curCol] instanceof IElementParameter) {
    IElementParameter tmpParam=(IElementParameter)itemsValue[curCol];
switch (tmpParam.getFieldType()) {
case CONTEXT_PARAM_NAME_LIST:
case CLOSED_LIST:
case COMPONENT_LIST:
case COLUMN_LIST:
case CONNECTION_LIST:
case LOOKUP_COLUMN_LIST:
case PREV_COLUMN_LIST:
case DBTYPE_LIST:
      String[] namesSet=tmpParam.getListItemsDisplayName();
    if (namesSet.length == 0) {
      return tmpParam.getDefaultClosedListValue();
    }
  if (value instanceof String) {
    boolean found=false;
    int index=0;
    Object[] items=((IElementParameter)itemsValue[curCol]).getListItemsValue();
    for (int j=0; j < items.length && !found; j++) {
      if (items[j].equals(value)) {
        found=true;
        index=j;
      }
    }
    value=new Integer(index);
  }
if (value != null && ((Integer)value) >= 0) {
  return namesSet[(Integer)value];
}
return null;
case CHECK:
if (value instanceof String) {
return new Boolean((String)value);
}
return value;
case RADIO:
if (value instanceof String) {
return new Boolean((String)value);
}
return value;
case COLOR:
if (value instanceof String) {
return TalendTextUtils.stringToRGB((String)value);
}
return value;
default :
return value;
}
}
return value;
}
Program: 123111
Project: 123111
Buggy source:
/** 
 * DOC hcw Comment method "createTableViewer".
 * @param parent
 */
private void createTable(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  table=new Table(composite,SWT.BORDER);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  table.setLayoutData(gd);
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  TableColumn nameColumn=new TableColumn(table,SWT.NONE);
  nameColumn.setWidth(119);
  nameColumn.setText(Messages.getString("String_Node_Str"));
  TableColumn defaultColumn=new TableColumn(table,SWT.NONE);
  defaultColumn.setWidth(139);
  defaultColumn.setText(Messages.getString("String_Node_Str"));
  editors=new ArrayList<TableEditor>();
}

Fixed version (ground truth):
/** 
 * DOC hcw Comment method "createTableViewer".
 * @param parent
 */
private void createTable(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  table=new Table(composite,SWT.BORDER);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  table.setLayoutData(gd);
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  TableColumn nameColumn=new TableColumn(table,SWT.NONE);
  nameColumn.setWidth(120);
  nameColumn.setText(Messages.getString("String_Node_Str"));
  TableColumn defaultColumn=new TableColumn(table,SWT.NONE);
  defaultColumn.setWidth(108);
  defaultColumn.setText(Messages.getString("String_Node_Str"));
  editors=new ArrayList<TableEditor>();
}
Program: 123112
Project: 123112
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  initializeDialogUnits(composite);
  GridData data=new GridData(GridData.FILL_BOTH);
  data.heightHint=240;
  data.widthHint=290;
  composite.setLayoutData(data);
  createTable(composite);
  return composite;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  initializeDialogUnits(composite);
  GridData data=new GridData(GridData.FILL_BOTH);
  data.heightHint=240;
  data.widthHint=260;
  composite.setLayoutData(data);
  createTable(composite);
  return composite;
}
Program: 123113
Project: 123113
Buggy source:
private void createComboEditor(TableItem item,int column,String[] displayText,int selectIndex){
  TableEditor editor=new TableEditor(table);
  final CCombo combo=new CCombo(table,SWT.READ_ONLY);
  for (  String text : displayText) {
    combo.add(text);
  }
  combo.select(selectIndex);
  editor.grabHorizontal=true;
  editor.setEditor(combo,item,column);
  editor.minimumWidth=combo.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
  editor.layout();
  editors.add(editor);
}

Fixed version (ground truth):
private void createComboEditor(TableItem item,int column,String[] displayText,int selectIndex){
  TableEditor editor=new TableEditor(table);
  final CCombo combo=new CCombo(table,SWT.READ_ONLY);
  for (  String text : displayText) {
    combo.add(text);
  }
  combo.select(selectIndex);
  editor.grabHorizontal=true;
  editor.setEditor(combo,item,column);
  editor.layout();
  editors.add(editor);
}
Program: 123114
Project: 123114
Buggy source:
public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(520,490);
  dialog.open();
}

Fixed version (ground truth):
public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(542,490);
  dialog.open();
}
Program: 123116
Project: 123116
Buggy source:
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,630);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}

Fixed version (ground truth):
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,630);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(260,150);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}
Program: 123117
Project: 123117
Buggy source:
public void init(ICommonActionExtensionSite anExtensionSite){
  if (anExtensionSite.getViewSite() instanceof ICommonViewerWorkbenchSite) {
    newProjectAction=new NewComponentAction();
  }
}

Fixed version (ground truth):
@Override public void init(ICommonActionExtensionSite anExtensionSite){
  if (anExtensionSite.getViewSite() instanceof ICommonViewerWorkbenchSite) {
    newProjectAction=new NewComponentAction();
  }
}
Program: 123118
Project: 123118
Buggy source:
/** 
 * Adds a submenu to the given menu with the name "New Component".
 */
public void fillContextMenu(IMenuManager menu){
  for (  IContributionItem item : menu.getItems()) {
    if (item == null || item.getId() == null) {
      continue;
    }
    if (item.getId().equals("String_Node_Str") || item.getId().equals("String_Node_Str")) {
      menu.remove(item);
    }
  }
  if (ComponentDesigenerPlugin.getDefault().isUsed()) {
    IMenuManager submenu=new MenuManager(Messages.getString("String_Node_Str"),NEW_MENU_NAME);
    submenu.add(newProjectAction);
    menu.insertAfter(ICommonMenuConstants.GROUP_NEW,submenu);
  }
}

Fixed version (ground truth):
/** 
 * Adds a submenu to the given menu with the name "New Component".
 */
@Override public void fillContextMenu(IMenuManager menu){
  for (  IContributionItem item : menu.getItems()) {
    if (item == null || item.getId() == null) {
      continue;
    }
    if (item.getId().equals("String_Node_Str") || item.getId().equals("String_Node_Str")) {
      menu.remove(item);
    }
  }
  if (ComponentDesigenerPlugin.getDefault().isUsed()) {
    IMenuManager submenu=new MenuManager(Messages.getString("String_Node_Str"),NEW_MENU_NAME);
    submenu.add(newProjectAction);
    menu.insertAfter(ICommonMenuConstants.GROUP_NEW,submenu);
  }
}
Program: 123119
Project: 123119
Buggy source:
public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(520,490);
  dialog.open();
}

Fixed version (ground truth):
@Override public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(542,490);
  dialog.open();
}
Program: 123120
Project: 123120
Buggy source:
public void modifyText(ModifyEvent e){
  String attrName=attrLabel.getText().split(MARK)[0];
  if (attrCombo.getText().equals(PluginConstant.EMPTY_STRING)) {
    ((Element)nodeData.getXMLNode()).removeAttribute(attrName);
    nodeData.removeAttrValue(attrName);
  }
 else {
    ((Element)nodeData.getXMLNode()).setAttribute(attrName,attrCombo.getText());
    nodeData.putAttrValue(attrName,attrCombo.getText());
  }
}

Fixed version (ground truth):
@Override public void modifyText(ModifyEvent e){
  String attrName=attrLabel.getText().split(MARK)[0];
  if (attrCombo.getText().equals(PluginConstant.EMPTY_STRING)) {
    ((Element)nodeData.getXMLNode()).removeAttribute(attrName);
    nodeData.removeAttrValue(attrName);
  }
 else {
    ((Element)nodeData.getXMLNode()).setAttribute(attrName,attrCombo.getText());
    nodeData.putAttrValue(attrName,attrCombo.getText());
  }
}
Program: 123122
Project: 123122
Buggy source:
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,630);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}

Fixed version (ground truth):
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,630);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(260,150);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}
Program: 123123
Project: 123123
Buggy source:
public void makeSureUnlockJoblet(IProcess2 process){
  List<? extends INode> nodeList=process.getGraphicalNodes();
  for (  INode node : nodeList) {
    if (((Node)node).isJoblet()) {
      IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
      if (service != null) {
        service.unlockJoblet(node,false);
        service.reloadJobletProcess(node);
      }
    }
  }
}

Fixed version (ground truth):
public void makeSureUnlockJoblet(IProcess2 process){
  List<? extends INode> nodeList=process.getGraphicalNodes();
  for (  INode node : nodeList) {
    if (((Node)node).isJoblet()) {
      IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
      if (service != null) {
        service.reloadJobletProcess(node);
        service.unlockJoblet(node,false);
      }
    }
  }
}
Program: 123124
Project: 123124
Buggy source:
public void makeSureUnlockJoblet(IProcess2 process){
  List<? extends INode> nodeList=process.getGraphicalNodes();
  for (  INode node : nodeList) {
    if (((Node)node).isJoblet()) {
      IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
      if (service != null) {
        service.unlockJoblet(node,false);
        service.reloadJobletProcess(node);
      }
    }
  }
}

Fixed version (ground truth):
public void makeSureUnlockJoblet(IProcess2 process){
  List<? extends INode> nodeList=process.getGraphicalNodes();
  for (  INode node : nodeList) {
    if (((Node)node).isJoblet()) {
      IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
      if (service != null) {
        service.reloadJobletProcess(node);
        service.unlockJoblet(node,false);
      }
    }
  }
}
Program: 123126
Project: 123126
Buggy source:
public boolean openedInJob(JobletProcessItem jobletItem,Node currNode){
  IWorkbenchPage page=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  IEditorPart[] editors=page.getEditors();
  for (int i=0; i < editors.length; i++) {
    if (editors[i] instanceof AbstractMultiPageTalendEditor) {
      IProcess2 pro=((AbstractMultiPageTalendEditor)editors[i]).getProcess();
      if (currNode != null) {
        IProcess2 currPro=(IProcess2)currNode.getProcess();
        if (currPro.getId().equals(pro.getId())) {
          List<? extends INode> currNodeList=currPro.getGraphicalNodes();
          for (          INode node : currNodeList) {
            if (node == currNode) {
              continue;
            }
 else {
              if (((Node)node).isJoblet() && jobletItem.getProperty() != null) {
                boolean haveOpened=!((Node)node).getNodeContainer().isCollapsed();
                if (haveOpened) {
                  return true;
                }
              }
            }
          }
          continue;
        }
      }
      List<? extends INode> nodeList=pro.getGraphicalNodes();
      for (      INode node : nodeList) {
        if (((Node)node).isJoblet() && jobletItem.getProperty() != null) {
          if (jobletItem.getProperty().getId().equals(node.getComponent().getProcess().getId())) {
            boolean haveOpened=!((Node)node).getNodeContainer().isCollapsed();
            if (haveOpened) {
              return true;
            }
          }
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean openedInJob(JobletProcessItem jobletItem,Node currNode){
  IWorkbenchPage page=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  IEditorPart[] editors=page.getEditors();
  for (  IEditorPart editor : editors) {
    if (editor instanceof AbstractMultiPageTalendEditor) {
      IProcess2 pro=((AbstractMultiPageTalendEditor)editor).getProcess();
      if (currNode != null) {
        IProcess2 currPro=(IProcess2)currNode.getProcess();
        if (currPro.getId().equals(pro.getId())) {
          List<? extends INode> currNodeList=currPro.getGraphicalNodes();
          for (          INode node : currNodeList) {
            if (node == currNode) {
              continue;
            }
 else {
              if (((Node)node).isJoblet() && jobletItem.getProperty() != null) {
                boolean haveOpened=!((Node)node).getNodeContainer().isCollapsed();
                if (haveOpened) {
                  return true;
                }
              }
            }
          }
          continue;
        }
      }
      List<? extends INode> nodeList=pro.getGraphicalNodes();
      for (      INode node : nodeList) {
        if (((Node)node).isJoblet() && jobletItem.getProperty() != null) {
          if (jobletItem.getProperty().getId().equals(node.getComponent().getProcess().getId())) {
            boolean haveOpened=!((Node)node).getNodeContainer().isCollapsed();
            if (haveOpened) {
              return true;
            }
          }
        }
      }
    }
  }
  return false;
}
Program: 123130
Project: 123130
Buggy source:
public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(542,490);
  dialog.open();
}

Fixed version (ground truth):
public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(520,490);
  dialog.open();
}
Program: 123131
Project: 123131
Buggy source:
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,630);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(260,150);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}

Fixed version (ground truth):
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,630);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,150);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}
Program: 123132
Project: 123132
Buggy source:
@Override protected void createPageContent(Composite parent){
  Composite topComposite=new Composite(parent,SWT.NONE);
  topComposite.setLayout(new FillLayout());
  availableXmlTree=new Tree(topComposite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  GridData treeGD=new GridData(GridData.FILL_BOTH);
  treeGD.widthHint=110;
  treeGD.grabExcessHorizontalSpace=true;
  treeGD.grabExcessVerticalSpace=true;
  availableXmlTree.setLayoutData(treeGD);
  scrolledComposite=new ScrolledComposite(topComposite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  rightComposite=new Composite(scrolledComposite,SWT.NONE);
  GridData rightPanelGd=new GridData(GridData.FILL_BOTH);
  rightPanelGd.widthHint=180;
  rightComposite.setLayoutData(rightPanelGd);
  rightComposite.setLayout(new GridLayout());
  Label label=new Label(rightComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridData labelGd=new GridData(GridData.FILL_HORIZONTAL);
  label.setLayoutData(labelGd);
  scrolledComposite.setContent(rightComposite);
  scrolledComposite.setExpandHorizontal(true);
  scrolledComposite.setExpandVertical(true);
  this.setControl(topComposite);
}

Fixed version (ground truth):
@Override protected void createPageContent(Composite parent){
  Composite topComposite=new Composite(parent,SWT.NONE);
  topComposite.setLayout(new GridLayout(2,false));
  GridData data=new GridData(GridData.FILL_BOTH);
  topComposite.setLayoutData(data);
  availableXmlTree=new Tree(topComposite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  GridData treeGD=new GridData(GridData.FILL_BOTH);
  treeGD.widthHint=196;
  treeGD.grabExcessHorizontalSpace=true;
  treeGD.grabExcessVerticalSpace=true;
  availableXmlTree.setLayoutData(treeGD);
  scrolledComposite=new ScrolledComposite(topComposite,SWT.V_SCROLL);
  scrolledComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
  scrolledComposite.setLayout(new FillLayout());
  rightComposite=new Composite(scrolledComposite,SWT.NONE);
  GridData rightPanelGd=new GridData(GridData.FILL_BOTH);
  rightPanelGd.widthHint=180;
  rightComposite.setLayoutData(rightPanelGd);
  rightComposite.setLayout(new GridLayout());
  Label label=new Label(rightComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridData labelGd=new GridData(GridData.FILL_HORIZONTAL);
  label.setLayoutData(labelGd);
  scrolledComposite.setContent(rightComposite);
  scrolledComposite.setExpandHorizontal(true);
  scrolledComposite.setExpandVertical(true);
  this.setControl(topComposite);
}
Program: 123133
Project: 123133
Buggy source:
public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(520,490);
  dialog.open();
}

Fixed version (ground truth):
public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(542,490);
  dialog.open();
}
Program: 123135
Project: 123135
Buggy source:
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,630);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}

Fixed version (ground truth):
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,630);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(260,150);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}
Program: 123136
Project: 123136
Buggy source:
/** 
 * DOC hcw Comment method "createTableViewer".
 * @param parent
 */
private void createTable(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  table=new Table(composite,SWT.BORDER);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  table.setLayoutData(gd);
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  TableColumn nameColumn=new TableColumn(table,SWT.NONE);
  nameColumn.setWidth(119);
  nameColumn.setText(Messages.getString("String_Node_Str"));
  TableColumn defaultColumn=new TableColumn(table,SWT.NONE);
  defaultColumn.setWidth(139);
  defaultColumn.setText(Messages.getString("String_Node_Str"));
  editors=new ArrayList<TableEditor>();
}

Fixed version (ground truth):
/** 
 * DOC hcw Comment method "createTableViewer".
 * @param parent
 */
private void createTable(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  table=new Table(composite,SWT.BORDER);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  table.setLayoutData(gd);
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  TableColumn nameColumn=new TableColumn(table,SWT.NONE);
  nameColumn.setWidth(120);
  nameColumn.setText(Messages.getString("String_Node_Str"));
  TableColumn defaultColumn=new TableColumn(table,SWT.NONE);
  defaultColumn.setWidth(108);
  defaultColumn.setText(Messages.getString("String_Node_Str"));
  editors=new ArrayList<TableEditor>();
}
Program: 123137
Project: 123137
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  initializeDialogUnits(composite);
  GridData data=new GridData(GridData.FILL_BOTH);
  data.heightHint=240;
  data.widthHint=290;
  composite.setLayoutData(data);
  createTable(composite);
  return composite;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  initializeDialogUnits(composite);
  GridData data=new GridData(GridData.FILL_BOTH);
  data.heightHint=240;
  data.widthHint=260;
  composite.setLayoutData(data);
  createTable(composite);
  return composite;
}
Program: 123138
Project: 123138
Buggy source:
private void createComboEditor(TableItem item,int column,String[] displayText,int selectIndex){
  TableEditor editor=new TableEditor(table);
  final CCombo combo=new CCombo(table,SWT.READ_ONLY);
  for (  String text : displayText) {
    combo.add(text);
  }
  combo.select(selectIndex);
  editor.grabHorizontal=true;
  editor.setEditor(combo,item,column);
  editor.minimumWidth=combo.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
  editor.layout();
  editors.add(editor);
}

Fixed version (ground truth):
private void createComboEditor(TableItem item,int column,String[] displayText,int selectIndex){
  TableEditor editor=new TableEditor(table);
  final CCombo combo=new CCombo(table,SWT.READ_ONLY);
  for (  String text : displayText) {
    combo.add(text);
  }
  combo.select(selectIndex);
  editor.grabHorizontal=true;
  editor.setEditor(combo,item,column);
  editor.layout();
  editors.add(editor);
}
Program: 123139
Project: 123139
Buggy source:
public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(542,490);
  dialog.open();
}

Fixed version (ground truth):
public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(520,490);
  dialog.open();
}
Program: 123140
Project: 123140
Buggy source:
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,630);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(260,150);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}

Fixed version (ground truth):
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,630);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,150);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}
Program: 123141
Project: 123141
Buggy source:
@Override protected void createPageContent(Composite parent){
  Composite topComposite=new Composite(parent,SWT.NONE);
  topComposite.setLayout(new FillLayout());
  availableXmlTree=new Tree(topComposite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  GridData treeGD=new GridData(GridData.FILL_BOTH);
  treeGD.widthHint=110;
  treeGD.grabExcessHorizontalSpace=true;
  treeGD.grabExcessVerticalSpace=true;
  availableXmlTree.setLayoutData(treeGD);
  scrolledComposite=new ScrolledComposite(topComposite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  rightComposite=new Composite(scrolledComposite,SWT.NONE);
  GridData rightPanelGd=new GridData(GridData.FILL_BOTH);
  rightPanelGd.widthHint=180;
  rightComposite.setLayoutData(rightPanelGd);
  rightComposite.setLayout(new GridLayout());
  Label label=new Label(rightComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridData labelGd=new GridData(GridData.FILL_HORIZONTAL);
  label.setLayoutData(labelGd);
  scrolledComposite.setContent(rightComposite);
  scrolledComposite.setExpandHorizontal(true);
  scrolledComposite.setExpandVertical(true);
  this.setControl(topComposite);
}

Fixed version (ground truth):
@Override protected void createPageContent(Composite parent){
  Composite topComposite=new Composite(parent,SWT.NONE);
  topComposite.setLayout(new GridLayout(2,false));
  GridData data=new GridData(GridData.FILL_BOTH);
  topComposite.setLayoutData(data);
  availableXmlTree=new Tree(topComposite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  GridData treeGD=new GridData(GridData.FILL_BOTH);
  treeGD.widthHint=196;
  treeGD.grabExcessHorizontalSpace=true;
  treeGD.grabExcessVerticalSpace=true;
  availableXmlTree.setLayoutData(treeGD);
  scrolledComposite=new ScrolledComposite(topComposite,SWT.V_SCROLL);
  scrolledComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
  scrolledComposite.setLayout(new FillLayout());
  rightComposite=new Composite(scrolledComposite,SWT.NONE);
  GridData rightPanelGd=new GridData(GridData.FILL_BOTH);
  rightPanelGd.widthHint=180;
  rightComposite.setLayoutData(rightPanelGd);
  rightComposite.setLayout(new GridLayout());
  Label label=new Label(rightComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridData labelGd=new GridData(GridData.FILL_HORIZONTAL);
  label.setLayoutData(labelGd);
  scrolledComposite.setContent(rightComposite);
  scrolledComposite.setExpandHorizontal(true);
  scrolledComposite.setExpandVertical(true);
  this.setControl(topComposite);
}
Program: 123142
Project: 123142
Buggy source:
public void makeSureUnlockJoblet(IProcess2 process){
  List<? extends INode> nodeList=process.getGraphicalNodes();
  for (  INode node : nodeList) {
    if (((Node)node).isJoblet()) {
      IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
      if (service != null) {
        service.unlockJoblet(node,false);
        service.reloadJobletProcess(node);
      }
    }
  }
}

Fixed version (ground truth):
public void makeSureUnlockJoblet(IProcess2 process){
  List<? extends INode> nodeList=process.getGraphicalNodes();
  for (  INode node : nodeList) {
    if (((Node)node).isJoblet()) {
      IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
      if (service != null) {
        service.reloadJobletProcess(node);
        service.unlockJoblet(node,false);
      }
    }
  }
}
Program: 123146
Project: 123146
Buggy source:
@Override public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(542,490);
  dialog.open();
}

Fixed version (ground truth):
@Override public void run(){
  CreateComponentWizard wizard=new CreateComponentWizard();
  wizard.init(PlatformUI.getWorkbench(),null);
  final WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(520,490);
  dialog.open();
}
Program: 123147
Project: 123147
Buggy source:
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(280,630);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(260,150);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}

Fixed version (ground truth):
private void setComponentMinSize(String label){
  if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,750);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,500);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,630);
  }
 else   if (("String_Node_Str").equals(label)) {
    scrolledComposite.setMinSize(0,0);
    scrolledComposite.setMinSize(0,150);
  }
 else {
    scrolledComposite.setMinSize(0,0);
  }
}
Program: 123148
Project: 123148
Buggy source:
@Override protected void createPageContent(Composite parent){
  Composite topComposite=new Composite(parent,SWT.NONE);
  topComposite.setLayout(new FillLayout());
  availableXmlTree=new Tree(topComposite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  GridData treeGD=new GridData(GridData.FILL_BOTH);
  treeGD.widthHint=110;
  treeGD.grabExcessHorizontalSpace=true;
  treeGD.grabExcessVerticalSpace=true;
  availableXmlTree.setLayoutData(treeGD);
  scrolledComposite=new ScrolledComposite(topComposite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  rightComposite=new Composite(scrolledComposite,SWT.NONE);
  GridData rightPanelGd=new GridData(GridData.FILL_BOTH);
  rightPanelGd.widthHint=180;
  rightComposite.setLayoutData(rightPanelGd);
  rightComposite.setLayout(new GridLayout());
  Label label=new Label(rightComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridData labelGd=new GridData(GridData.FILL_HORIZONTAL);
  label.setLayoutData(labelGd);
  scrolledComposite.setContent(rightComposite);
  scrolledComposite.setExpandHorizontal(true);
  scrolledComposite.setExpandVertical(true);
  this.setControl(topComposite);
}

Fixed version (ground truth):
@Override protected void createPageContent(Composite parent){
  Composite topComposite=new Composite(parent,SWT.NONE);
  topComposite.setLayout(new GridLayout(2,false));
  GridData data=new GridData(GridData.FILL_BOTH);
  topComposite.setLayoutData(data);
  availableXmlTree=new Tree(topComposite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  GridData treeGD=new GridData(GridData.FILL_BOTH);
  treeGD.widthHint=196;
  treeGD.grabExcessHorizontalSpace=true;
  treeGD.grabExcessVerticalSpace=true;
  availableXmlTree.setLayoutData(treeGD);
  scrolledComposite=new ScrolledComposite(topComposite,SWT.V_SCROLL);
  scrolledComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
  scrolledComposite.setLayout(new FillLayout());
  rightComposite=new Composite(scrolledComposite,SWT.NONE);
  GridData rightPanelGd=new GridData(GridData.FILL_BOTH);
  rightPanelGd.widthHint=180;
  rightComposite.setLayoutData(rightPanelGd);
  rightComposite.setLayout(new GridLayout());
  Label label=new Label(rightComposite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  GridData labelGd=new GridData(GridData.FILL_HORIZONTAL);
  label.setLayoutData(labelGd);
  scrolledComposite.setContent(rightComposite);
  scrolledComposite.setExpandHorizontal(true);
  scrolledComposite.setExpandVertical(true);
  this.setControl(topComposite);
}
Program: 123155
Project: 123155
Buggy source:
@Override public ExecutionResult execute(Item item){
  ProcessType processType=getProcessType(item);
  if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) {
    return ExecutionResult.NOTHING_TO_DO;
  }
  try {
    for (    Object o : processType.getNode()) {
      NodeType node=(NodeType)o;
      if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") != null) {
        if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") == null) {
          ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
          ComponentUtilities.getNodeProperty(node,"String_Node_Str").setValue("String_Node_Str");
        }
      }
    }
    return ExecutionResult.SUCCESS_NO_ALERT;
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return ExecutionResult.FAILURE;
  }
}

Fixed version (ground truth):
@Override public ExecutionResult execute(Item item){
  ProcessType processType=getProcessType(item);
  if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) {
    return ExecutionResult.NOTHING_TO_DO;
  }
  try {
    boolean modified=false;
    for (    Object o : processType.getNode()) {
      NodeType node=(NodeType)o;
      if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") != null) {
        if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") == null) {
          ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
          ComponentUtilities.getNodeProperty(node,"String_Node_Str").setValue("String_Node_Str");
          modified=true;
        }
      }
    }
    if (modified) {
      ProxyRepositoryFactory.getInstance().save(item,true);
      return ExecutionResult.SUCCESS_NO_ALERT;
    }
 else {
      return ExecutionResult.NOTHING_TO_DO;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return ExecutionResult.FAILURE;
  }
}
Program: 123157
Project: 123157
Buggy source:
/** 
 * Get all route resource needed.
 * @param osgiResource
 * @param processItem
 */
private void addOSGIRouteResources(ExportFileResource osgiResource,ProcessItem processItem){
  ICamelDesignerCoreService camelService=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
  List<IPath> paths=camelService.synchronizeRouteResource(processItem);
  IProject project=ResourcesPlugin.getWorkspace().getRoot().getProject(JavaUtils.JAVA_PROJECT_NAME);
  IFolder srcFolder=project.getFolder(JavaUtils.JAVA_SRC_DIRECTORY);
  IPath srcPath=srcFolder.getLocation();
  for (  IPath path : paths) {
    IPath relativePath=path.removeLastSegments(1);
    relativePath=relativePath.removeFirstSegments(srcPath.segmentCount());
    String pathStr=relativePath.toString();
    try {
      URL url=path.toFile().toURI().toURL();
      osgiResource.addResource(pathStr,url);
    }
 catch (    MalformedURLException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * Get all route resource needed.
 * @param osgiResource
 * @param processItem
 */
private void addOSGIRouteResources(ExportFileResource osgiResource,ProcessItem processItem){
  ICamelDesignerCoreService camelService=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
  List<IPath> paths=camelService.synchronizeRouteResource(processItem);
  IProject project=ResourcesPlugin.getWorkspace().getRoot().getProject(JavaUtils.JAVA_PROJECT_NAME);
  IFolder srcFolder=project.getFolder(JavaUtils.JAVA_SRC_DIRECTORY);
  IPath srcPath=srcFolder.getLocation();
  for (  IPath path : paths) {
    IPath relativePath=path.removeLastSegments(1);
    String pathStr=relativePath.toPortableString().substring(srcPath.toPortableString().length());
    ;
    try {
      URL url=path.toFile().toURI().toURL();
      osgiResource.addResource(pathStr,url);
    }
 catch (    MalformedURLException e) {
      e.printStackTrace();
    }
  }
}
Program: 123158
Project: 123158
Buggy source:
@Override public ExecutionResult execute(Item item){
  ProcessType processType=getProcessType(item);
  if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) {
    return ExecutionResult.NOTHING_TO_DO;
  }
  try {
    for (    Object o : processType.getNode()) {
      NodeType node=(NodeType)o;
      if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") != null) {
        if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") == null) {
          ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
          ComponentUtilities.getNodeProperty(node,"String_Node_Str").setValue("String_Node_Str");
        }
      }
    }
    return ExecutionResult.SUCCESS_NO_ALERT;
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return ExecutionResult.FAILURE;
  }
}

Fixed version (ground truth):
@Override public ExecutionResult execute(Item item){
  ProcessType processType=getProcessType(item);
  if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) {
    return ExecutionResult.NOTHING_TO_DO;
  }
  try {
    boolean modified=false;
    for (    Object o : processType.getNode()) {
      NodeType node=(NodeType)o;
      if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") != null) {
        if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") == null) {
          ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
          ComponentUtilities.getNodeProperty(node,"String_Node_Str").setValue("String_Node_Str");
          modified=true;
        }
      }
    }
    if (modified) {
      ProxyRepositoryFactory.getInstance().save(item,true);
      return ExecutionResult.SUCCESS_NO_ALERT;
    }
 else {
      return ExecutionResult.NOTHING_TO_DO;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return ExecutionResult.FAILURE;
  }
}