nus-yam/ex-repair huggingface dataset:
Program: 124095
Project: 124095
Buggy source:
private void deleteNoUseTable(){
  if (SQLBuilderRepositoryNodeManager.tList == null || SQLBuilderRepositoryNodeManager.tList.size() == 0) {
    return;
  }
  IRepositoryViewObject repositoryObject=node.getObject();
  Item item=repositoryObject.getProperty().getItem();
  if (item instanceof DatabaseConnectionItem) {
    manager.deleteNouseTables(((DatabaseConnectionItem)item).getConnection());
  }
}

Fixed version (ground truth):
private void deleteNoUseTable(){
  connection=(DatabaseConnection)SQLBuilderRepositoryNodeManager.getItem(SQLBuilderRepositoryNodeManager.getRoot(nodeInEditor)).getConnection();
  if (SQLBuilderRepositoryNodeManager.tList instanceof List) {
    if (SQLBuilderRepositoryNodeManager.tList.size() == 0) {
      SQLBuilderRepositoryNodeManager.tList.addAll(ConnectionHelper.getTables(connection));
    }
  }
 else {
    SQLBuilderRepositoryNodeManager.tList=new ArrayList<MetadataTable>();
    SQLBuilderRepositoryNodeManager.tList.addAll(ConnectionHelper.getTables(connection));
  }
  if (SQLBuilderRepositoryNodeManager.tList == null || SQLBuilderRepositoryNodeManager.tList.size() == 0) {
    return;
  }
  IRepositoryViewObject repositoryObject=node.getObject();
  Item item=repositoryObject.getProperty().getItem();
  if (item instanceof DatabaseConnectionItem) {
    manager.deleteNouseTables(((DatabaseConnectionItem)item).getConnection());
  }
}
Program: 124096
Project: 124096
Buggy source:
@Override public void cancelPressed(){
  SQLBuilderRepositoryNodeManager.tList=null;
  super.cancelPressed();
}

Fixed version (ground truth):
@Override public void cancelPressed(){
  super.cancelPressed();
  SQLBuilderRepositoryNodeManager.tList=null;
}
Program: 124098
Project: 124098
Buggy source:
private void needContextModeParameters(){
  legalParameters.clear();
  for (  IElementParameter parameter : node.getElementParameters()) {
    if (parameter.isDynamicSettings() && parameter.isShow(node.getElementParameters()) && parameter.getCategory() != EComponentCategory.TECHNICAL && (parameter.getFieldType() == EParameterFieldType.CHECK || parameter.getFieldType() == EParameterFieldType.CLOSED_LIST) || parameter.getFieldType() == EParameterFieldType.MODULE_LIST || parameter.getFieldType() == EParameterFieldType.RADIO || parameter.getFieldType() == EParameterFieldType.COMPONENT_LIST) {
      legalParameters.add(parameter);
    }
  }
}

Fixed version (ground truth):
private void needContextModeParameters(){
  legalParameters.clear();
  for (  IElementParameter parameter : node.getElementParameters()) {
    if (parameter.isDynamicSettings() && parameter.isShow(node.getElementParameters()) && parameter.getCategory() != EComponentCategory.TECHNICAL && (parameter.getFieldType() == EParameterFieldType.CHECK || parameter.getFieldType() == EParameterFieldType.CLOSED_LIST || parameter.getFieldType() == EParameterFieldType.MODULE_LIST || parameter.getFieldType() == EParameterFieldType.RADIO || parameter.getFieldType() == EParameterFieldType.COMPONENT_LIST)) {
      legalParameters.add(parameter);
    }
  }
}
Program: 124105
Project: 124105
Buggy source:
private void needContextModeParameters(){
  legalParameters.clear();
  for (  IElementParameter parameter : node.getElementParameters()) {
    if (parameter.isDynamicSettings() && parameter.isShow(node.getElementParameters()) && parameter.getCategory() != EComponentCategory.TECHNICAL && (parameter.getFieldType() == EParameterFieldType.CHECK || parameter.getFieldType() == EParameterFieldType.CLOSED_LIST) || parameter.getFieldType() == EParameterFieldType.MODULE_LIST || parameter.getFieldType() == EParameterFieldType.RADIO || parameter.getFieldType() == EParameterFieldType.COMPONENT_LIST) {
      legalParameters.add(parameter);
    }
  }
}

Fixed version (ground truth):
private void needContextModeParameters(){
  legalParameters.clear();
  for (  IElementParameter parameter : node.getElementParameters()) {
    if (parameter.isDynamicSettings() && parameter.isShow(node.getElementParameters()) && parameter.getCategory() != EComponentCategory.TECHNICAL && (parameter.getFieldType() == EParameterFieldType.CHECK || parameter.getFieldType() == EParameterFieldType.CLOSED_LIST || parameter.getFieldType() == EParameterFieldType.MODULE_LIST || parameter.getFieldType() == EParameterFieldType.RADIO || parameter.getFieldType() == EParameterFieldType.COMPONENT_LIST)) {
      legalParameters.add(parameter);
    }
  }
}
Program: 124107
Project: 124107
Buggy source:
public HttpEntity sendToServer(List<NameValuePair> qparams,String strAPIUrl) throws paloexception {
  try {
    URI uri=URIUtils.createURI("String_Node_Str",strServer,Integer.valueOf(strPort),strAPIUrl,URLEncodedUtils.format(qparams,"String_Node_Str"),null);
    HttpGet req=new HttpGet(uri);
    System.out.println(req.getURI());
    HttpResponse rsp=paloHttpClient.execute(paloTargetHost,req);
    HttpEntity entity=rsp.getEntity();
    if (rsp.getStatusLine().getStatusCode() != 200) {
      CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
      csv.setDelimiter(';');
      csv.setTextQualifier('"');
      csv.readRecord();
      paloexception plX=new paloexception(csv.get(0),csv.get(1),csv.get(2));
      csv.close();
      entity.consumeContent();
      throw (plX);
    }
 else {
      return entity;
    }
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}

Fixed version (ground truth):
public HttpEntity sendToServer(List<NameValuePair> qparams,String strAPIUrl) throws paloexception {
  try {
    URI uri=URIUtils.createURI("String_Node_Str",strServer,Integer.valueOf(strPort),strAPIUrl,URLEncodedUtils.format(qparams,"String_Node_Str"),null);
    HttpGet req=new HttpGet(uri);
    HttpResponse rsp=paloHttpClient.execute(paloTargetHost,req);
    HttpEntity entity=rsp.getEntity();
    if (rsp.getStatusLine().getStatusCode() != 200) {
      CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
      csv.setDelimiter(';');
      csv.setTextQualifier('"');
      csv.readRecord();
      paloexception plX=new paloexception(csv.get(0),csv.get(1),csv.get(2));
      csv.close();
      entity.consumeContent();
      throw (plX);
    }
 else {
      return entity;
    }
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}
Program: 124108
Project: 124108
Buggy source:
public void getAllExistPaloDimensionElements(paloelements pleles) throws paloexception {
  tPaloDimensionElements tPaloDimele=null;
  int elementPosition=0;
  String elementName="String_Node_Str";
  int elementParentPosition=0;
  int elementLevel=0;
  for (  paloelement plElm : pleles.getElements()) {
    elementPosition=(int)plElm.getElementPosition();
    elementName=plElm.getName();
    elementParentPosition=(int)plElm.getFatherPaloelement().getElementPosition();
    if (elementParentPosition == 0) {
      elementParentPosition=-1;
    }
    elementLevel=getElementLevel(elementName,elementPosition);
    tPaloDimele=new tPaloDimensionElements(elementPosition,elementName,elementParentPosition,elementLevel);
    lstPaloDimensionElements.add(tPaloDimele);
  }
}

Fixed version (ground truth):
public void getAllExistPaloDimensionElements(paloelements pleles) throws paloexception {
  tPaloDimensionElements tPaloDimele=null;
  int elementPosition=0;
  String elementName="String_Node_Str";
  int elementParentPosition=0;
  int elementLevel=0;
  for (  paloelement plElm : pleles.getElements()) {
    elementPosition=(int)plElm.getElementPosition();
    elementName=plElm.getName();
    elementParentPosition=(int)plElm.getFatherPaloelement().getElementPosition();
    elementLevel=getElementLevel(elementName,elementPosition);
    tPaloDimele=new tPaloDimensionElements(elementPosition,elementName,elementParentPosition,elementLevel);
    lstPaloDimensionElements.add(tPaloDimele);
  }
}
Program: 124110
Project: 124110
Buggy source:
@Override public boolean except(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  if (component != null && (component.getName().equals("String_Node_Str") || component.getName().equals("String_Node_Str"))) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean except(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  if (component != null && component.getName().startsWith("String_Node_Str")) {
    return true;
  }
  return false;
}
Program: 124113
Project: 124113
Buggy source:
/** 
 * DOC YeXiaowei Comment method "addCodeGenerateButton".
 * @param parent
 */
private void addCodeGenerateButton(final Composite parent){
  codeGenereateButton=new Button(parent,SWT.CENTER);
  codeGenereateButton.setText(Messages.getString("String_Node_Str"));
  codeGenereateButton.setToolTipText(Messages.getString("String_Node_Str"));
  GridData layoutData=new GridData();
  layoutData.horizontalAlignment=SWT.CENTER;
  codeGenereateButton.setLayoutData(layoutData);
  codeGenereateButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (elem instanceof Node) {
        ISampleCodeFactory factory=JavaSampleCodeFactory.getInstance();
        executeCommand(factory.generateCodeForParameters((Node)elem));
        refresh(curParameter,false);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC YeXiaowei Comment method "addCodeGenerateButton".
 * @param parent
 */
private void addCodeGenerateButton(final Composite parent){
  codeGenereateButton=new Button(parent,SWT.CENTER);
  codeGenereateButton.setText(Messages.getString("String_Node_Str"));
  codeGenereateButton.setToolTipText(Messages.getString("String_Node_Str"));
  codeGenereateButton.setEnabled(!elem.isReadOnly());
  GridData layoutData=new GridData();
  layoutData.horizontalAlignment=SWT.CENTER;
  codeGenereateButton.setLayoutData(layoutData);
  codeGenereateButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (elem instanceof Node) {
        ISampleCodeFactory factory=JavaSampleCodeFactory.getInstance();
        executeCommand(factory.generateCodeForParameters((Node)elem));
        refresh(curParameter,false);
      }
    }
  }
);
}
Program: 124115
Project: 124115
Buggy source:
/** 
 * dev Comment method "restoreConnection".
 * @param connection
 * @param tablesFromEMF
 */
@SuppressWarnings("String_Node_Str") private void restoreConnection(DatabaseConnection connection,List<MetadataTable> tablesFromEMF){
  tablesFromEMF=sortTableColumn(tablesFromEMF);
  tList=new ArrayList<MetadataTable>();
  tList.addAll(ConnectionHelper.getTables(connection));
  Catalog c=(Catalog)ConnectionHelper.getPackage(connection.getSID(),connection,Catalog.class);
  Schema s=(Schema)ConnectionHelper.getPackage(connection.getSID(),connection,Schema.class);
  Schema schema=(Schema)ConnectionHelper.getPackage(connection.getUiSchema(),connection,Schema.class);
  if (c != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,c);
  }
 else   if (s != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,s);
  }
 else   if (schema != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,schema);
  }
}

Fixed version (ground truth):
/** 
 * dev Comment method "restoreConnection".
 * @param connection
 * @param tablesFromEMF
 */
@SuppressWarnings("String_Node_Str") private void restoreConnection(DatabaseConnection connection,List<MetadataTable> tablesFromEMF){
  tablesFromEMF=sortTableColumn(tablesFromEMF);
  if (tList == null) {
    tList=new ArrayList<MetadataTable>();
    tList.addAll(ConnectionHelper.getTables(connection));
  }
  Catalog c=(Catalog)ConnectionHelper.getPackage(connection.getSID(),connection,Catalog.class);
  Schema s=(Schema)ConnectionHelper.getPackage(connection.getSID(),connection,Schema.class);
  Schema schema=(Schema)ConnectionHelper.getPackage(connection.getUiSchema(),connection,Schema.class);
  if (c != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,c);
  }
 else   if (s != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,s);
  }
 else   if (schema != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,schema);
  }
}
Program: 124117
Project: 124117
Buggy source:
public AbstractExternalData getExternalEmfData(){
  final MapperData emfMapperData=MapperFactory.eINSTANCE.createMapperData();
  initMapperMain(false);
  mapperMain.createModelFromExternalData(getIncomingConnections(),getOutgoingConnections(),externalData,getMetadataList(),false);
  ExternalMapperData data=mapperMain.buildExternalData();
  if (mapperMain != null && data != null) {
    if (externalData != null) {
      MapperHelper.saveDataToEmf(data,emfMapperData);
    }
  }
  return emfMapperData;
}

Fixed version (ground truth):
public AbstractExternalData getExternalEmfData(){
  final MapperData emfMapperData=MapperFactory.eINSTANCE.createMapperData();
  initMapperMain(false);
  mapperMain.createModelFromExternalData(getIncomingConnections(),getOutgoingConnections(),externalData,getMetadataList(),false);
  ExternalMapperData data=mapperMain.buildExternalData();
  if (mapperMain != null && data != null) {
    if (externalData != null) {
      this.externalData=data;
      MapperHelper.saveDataToEmf(data,emfMapperData);
    }
  }
  return emfMapperData;
}
Program: 124118
Project: 124118
Buggy source:
/** 
 * Hook method for restoring widget values to the values that they held last time this wizard was used to completion.
 */
protected void restoreWidgetValues(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    contextButton.setSelection(settings.getBoolean(STORE_CONTEXT_ID));
  }
  if (process.length > 0) {
    try {
      process[0].setProcess((ProcessItem)ProxyRepositoryFactory.getInstance().getUptodateProperty(process[0].getItem().getProperty()).getItem());
    }
 catch (    PersistenceException e) {
      e.printStackTrace();
    }
    List<String> contextNames=manager.getJobContextsComboValue((ProcessItem)process[0].getItem());
    contextCombo.setItems(contextNames.toArray(new String[contextNames.size()]));
    if (contextNames.size() > 0) {
      contextCombo.select(0);
    }
  }
}

Fixed version (ground truth):
/** 
 * Hook method for restoring widget values to the values that they held last time this wizard was used to completion.
 */
protected void restoreWidgetValues(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    contextButton.setSelection(settings.getBoolean(STORE_CONTEXT_ID));
  }
  if (process.length > 0) {
    try {
      process[0].setProcess((ProcessItem)ProxyRepositoryFactory.getInstance().getUptodateProperty(process[0].getItem().getProperty()).getItem());
    }
 catch (    PersistenceException e) {
      e.printStackTrace();
    }
    if (manager == null) {
      manager=new JobJavaScriptsManager(getExportChoiceMap(),contextCombo.getText(),"String_Node_Str",IProcessor.NO_STATISTICS,IProcessor.NO_TRACES);
    }
    List<String> contextNames=manager.getJobContextsComboValue((ProcessItem)process[0].getItem());
    contextCombo.setItems(contextNames.toArray(new String[contextNames.size()]));
    if (contextNames.size() > 0) {
      contextCombo.select(0);
    }
  }
}
Program: 124119
Project: 124119
Buggy source:
private Map<ExportChoice,Object> getExportChoiceMap(){
  Map<ExportChoice,Object> exportChoiceMap=new EnumMap<ExportChoice,Object>(ExportChoice.class);
  exportChoiceMap.put(ExportChoice.needLauncher,true);
  exportChoiceMap.put(ExportChoice.needSystemRoutine,true);
  exportChoiceMap.put(ExportChoice.needUserRoutine,true);
  exportChoiceMap.put(ExportChoice.needTalendLibraries,true);
  exportChoiceMap.put(ExportChoice.needJobItem,true);
  exportChoiceMap.put(ExportChoice.needJobScript,true);
  exportChoiceMap.put(ExportChoice.needSourceCode,false);
  exportChoiceMap.put(ExportChoice.needContext,contextButton.getSelection());
  return exportChoiceMap;
}

Fixed version (ground truth):
protected Map<ExportChoice,Object> getExportChoiceMap(){
  Map<ExportChoice,Object> exportChoiceMap=new EnumMap<ExportChoice,Object>(ExportChoice.class);
  exportChoiceMap.put(ExportChoice.needLauncher,true);
  exportChoiceMap.put(ExportChoice.needSystemRoutine,true);
  exportChoiceMap.put(ExportChoice.needUserRoutine,true);
  exportChoiceMap.put(ExportChoice.needTalendLibraries,true);
  exportChoiceMap.put(ExportChoice.needJobItem,true);
  exportChoiceMap.put(ExportChoice.needJobScript,true);
  exportChoiceMap.put(ExportChoice.needSourceCode,false);
  exportChoiceMap.put(ExportChoice.needContext,contextButton.getSelection());
  return exportChoiceMap;
}
Program: 124123
Project: 124123
Buggy source:
/** 
 * Hook method for restoring widget values to the values that they held last time this wizard was used to completion.
 */
protected void restoreWidgetValues(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    contextButton.setSelection(settings.getBoolean(STORE_CONTEXT_ID));
  }
  if (process.length > 0) {
    try {
      process[0].setProcess((ProcessItem)ProxyRepositoryFactory.getInstance().getUptodateProperty(process[0].getItem().getProperty()).getItem());
    }
 catch (    PersistenceException e) {
      e.printStackTrace();
    }
    List<String> contextNames=manager.getJobContextsComboValue((ProcessItem)process[0].getItem());
    contextCombo.setItems(contextNames.toArray(new String[contextNames.size()]));
    if (contextNames.size() > 0) {
      contextCombo.select(0);
    }
  }
}

Fixed version (ground truth):
/** 
 * Hook method for restoring widget values to the values that they held last time this wizard was used to completion.
 */
protected void restoreWidgetValues(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    contextButton.setSelection(settings.getBoolean(STORE_CONTEXT_ID));
  }
  if (process.length > 0) {
    try {
      process[0].setProcess((ProcessItem)ProxyRepositoryFactory.getInstance().getUptodateProperty(process[0].getItem().getProperty()).getItem());
    }
 catch (    PersistenceException e) {
      e.printStackTrace();
    }
    if (manager == null) {
      manager=new JobJavaScriptsManager(getExportChoiceMap(),contextCombo.getText(),"String_Node_Str",IProcessor.NO_STATISTICS,IProcessor.NO_TRACES);
    }
    List<String> contextNames=manager.getJobContextsComboValue((ProcessItem)process[0].getItem());
    contextCombo.setItems(contextNames.toArray(new String[contextNames.size()]));
    if (contextNames.size() > 0) {
      contextCombo.select(0);
    }
  }
}
Program: 124124
Project: 124124
Buggy source:
private Map<ExportChoice,Object> getExportChoiceMap(){
  Map<ExportChoice,Object> exportChoiceMap=new EnumMap<ExportChoice,Object>(ExportChoice.class);
  exportChoiceMap.put(ExportChoice.needLauncher,true);
  exportChoiceMap.put(ExportChoice.needSystemRoutine,true);
  exportChoiceMap.put(ExportChoice.needUserRoutine,true);
  exportChoiceMap.put(ExportChoice.needTalendLibraries,true);
  exportChoiceMap.put(ExportChoice.needJobItem,true);
  exportChoiceMap.put(ExportChoice.needJobScript,true);
  exportChoiceMap.put(ExportChoice.needSourceCode,false);
  exportChoiceMap.put(ExportChoice.needContext,contextButton.getSelection());
  return exportChoiceMap;
}

Fixed version (ground truth):
protected Map<ExportChoice,Object> getExportChoiceMap(){
  Map<ExportChoice,Object> exportChoiceMap=new EnumMap<ExportChoice,Object>(ExportChoice.class);
  exportChoiceMap.put(ExportChoice.needLauncher,true);
  exportChoiceMap.put(ExportChoice.needSystemRoutine,true);
  exportChoiceMap.put(ExportChoice.needUserRoutine,true);
  exportChoiceMap.put(ExportChoice.needTalendLibraries,true);
  exportChoiceMap.put(ExportChoice.needJobItem,true);
  exportChoiceMap.put(ExportChoice.needJobScript,true);
  exportChoiceMap.put(ExportChoice.needSourceCode,false);
  exportChoiceMap.put(ExportChoice.needContext,contextButton.getSelection());
  return exportChoiceMap;
}
Program: 124126
Project: 124126
Buggy source:
public AbstractExternalData getExternalEmfData(){
  final MapperData emfMapperData=MapperFactory.eINSTANCE.createMapperData();
  initMapperMain(false);
  mapperMain.createModelFromExternalData(getIncomingConnections(),getOutgoingConnections(),externalData,getMetadataList(),false);
  ExternalMapperData data=mapperMain.buildExternalData();
  if (mapperMain != null && data != null) {
    if (externalData != null) {
      MapperHelper.saveDataToEmf(data,emfMapperData);
    }
  }
  return emfMapperData;
}

Fixed version (ground truth):
public AbstractExternalData getExternalEmfData(){
  final MapperData emfMapperData=MapperFactory.eINSTANCE.createMapperData();
  initMapperMain(false);
  mapperMain.createModelFromExternalData(getIncomingConnections(),getOutgoingConnections(),externalData,getMetadataList(),false);
  ExternalMapperData data=mapperMain.buildExternalData();
  if (mapperMain != null && data != null) {
    if (externalData != null) {
      this.externalData=data;
      MapperHelper.saveDataToEmf(data,emfMapperData);
    }
  }
  return emfMapperData;
}
Program: 124127
Project: 124127
Buggy source:
/** 
 * dev Comment method "restoreConnection".
 * @param connection
 * @param tablesFromEMF
 */
@SuppressWarnings("String_Node_Str") private void restoreConnection(DatabaseConnection connection,List<MetadataTable> tablesFromEMF){
  tablesFromEMF=sortTableColumn(tablesFromEMF);
  tList=new ArrayList<MetadataTable>();
  tList.addAll(ConnectionHelper.getTables(connection));
  Catalog c=(Catalog)ConnectionHelper.getPackage(connection.getSID(),connection,Catalog.class);
  Schema s=(Schema)ConnectionHelper.getPackage(connection.getSID(),connection,Schema.class);
  Schema schema=(Schema)ConnectionHelper.getPackage(connection.getUiSchema(),connection,Schema.class);
  if (c != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,c);
  }
 else   if (s != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,s);
  }
 else   if (schema != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,schema);
  }
}

Fixed version (ground truth):
/** 
 * dev Comment method "restoreConnection".
 * @param connection
 * @param tablesFromEMF
 */
@SuppressWarnings("String_Node_Str") private void restoreConnection(DatabaseConnection connection,List<MetadataTable> tablesFromEMF){
  tablesFromEMF=sortTableColumn(tablesFromEMF);
  if (tList == null) {
    tList=new ArrayList<MetadataTable>();
    tList.addAll(ConnectionHelper.getTables(connection));
  }
  Catalog c=(Catalog)ConnectionHelper.getPackage(connection.getSID(),connection,Catalog.class);
  Schema s=(Schema)ConnectionHelper.getPackage(connection.getSID(),connection,Schema.class);
  Schema schema=(Schema)ConnectionHelper.getPackage(connection.getUiSchema(),connection,Schema.class);
  if (c != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,c);
  }
 else   if (s != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,s);
  }
 else   if (schema != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,schema);
  }
}
Program: 124129
Project: 124129
Buggy source:
/** 
 * DOC YeXiaowei Comment method "addCodeGenerateButton".
 * @param parent
 */
private void addCodeGenerateButton(final Composite parent){
  codeGenereateButton=new Button(parent,SWT.CENTER);
  codeGenereateButton.setText(Messages.getString("String_Node_Str"));
  codeGenereateButton.setToolTipText(Messages.getString("String_Node_Str"));
  GridData layoutData=new GridData();
  layoutData.horizontalAlignment=SWT.CENTER;
  codeGenereateButton.setLayoutData(layoutData);
  codeGenereateButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (elem instanceof Node) {
        ISampleCodeFactory factory=JavaSampleCodeFactory.getInstance();
        executeCommand(factory.generateCodeForParameters((Node)elem));
        refresh(curParameter,false);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC YeXiaowei Comment method "addCodeGenerateButton".
 * @param parent
 */
private void addCodeGenerateButton(final Composite parent){
  codeGenereateButton=new Button(parent,SWT.CENTER);
  codeGenereateButton.setText(Messages.getString("String_Node_Str"));
  codeGenereateButton.setToolTipText(Messages.getString("String_Node_Str"));
  codeGenereateButton.setEnabled(!elem.isReadOnly());
  GridData layoutData=new GridData();
  layoutData.horizontalAlignment=SWT.CENTER;
  codeGenereateButton.setLayoutData(layoutData);
  codeGenereateButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (elem instanceof Node) {
        ISampleCodeFactory factory=JavaSampleCodeFactory.getInstance();
        executeCommand(factory.generateCodeForParameters((Node)elem));
        refresh(curParameter,false);
      }
    }
  }
);
}
Program: 124132
Project: 124132
Buggy source:
private void copyElementParametersValue(IElement sourceElement,IElement targetElement){
  for (  IElementParameter sourceParam : sourceElement.getElementParameters()) {
    IElementParameter targetParam=targetElement.getElementParameter(sourceParam.getName());
    if (targetParam != null) {
      targetParam.setContextMode(sourceParam.isContextMode());
      targetParam.setValue(sourceParam.getValue());
      if (targetParam.getFieldType() == EParameterFieldType.TABLE) {
        targetParam.setListItemsValue(ArrayUtils.clone(sourceParam.getListItemsValue()));
        targetParam.setListItemsDisplayCodeName(sourceParam.getListItemsDisplayCodeName());
      }
      for (      String name : targetParam.getChildParameters().keySet()) {
        IElementParameter targetChildParam=targetParam.getChildParameters().get(name);
        if (sourceParam.getChildParameters() == null) {
          continue;
        }
        IElementParameter sourceChildParam=sourceParam.getChildParameters().get(name);
        targetChildParam.setValue(sourceChildParam.getValue());
        if (targetChildParam.getFieldType() == EParameterFieldType.TABLE) {
          targetChildParam.setListItemsValue(sourceChildParam.getListItemsValue());
          targetChildParam.setListItemsDisplayCodeName(sourceChildParam.getListItemsDisplayCodeName());
        }
      }
    }
  }
}

Fixed version (ground truth):
private void copyElementParametersValue(IElement sourceElement,IElement targetElement){
  for (  IElementParameter sourceParam : sourceElement.getElementParameters()) {
    IElementParameter targetParam=targetElement.getElementParameter(sourceParam.getName());
    if (targetParam != null) {
      if (sourceParam.getName().equals(EParameterName.DB_TYPE.getName()) && sourceParam.getValue().toString().matches("String_Node_Str")) {
        sourceElement.getElementParameter(EParameterName.DBNAME.getName()).setValue(sourceElement.getElementParameter(EParameterName.DBFILE.getName()).getValue());
      }
      targetParam.setContextMode(sourceParam.isContextMode());
      targetParam.setValue(sourceParam.getValue());
      if (targetParam.getFieldType() == EParameterFieldType.TABLE) {
        targetParam.setListItemsValue(ArrayUtils.clone(sourceParam.getListItemsValue()));
        targetParam.setListItemsDisplayCodeName(sourceParam.getListItemsDisplayCodeName());
      }
      for (      String name : targetParam.getChildParameters().keySet()) {
        IElementParameter targetChildParam=targetParam.getChildParameters().get(name);
        if (sourceParam.getChildParameters() == null) {
          continue;
        }
        IElementParameter sourceChildParam=sourceParam.getChildParameters().get(name);
        targetChildParam.setValue(sourceChildParam.getValue());
        if (targetChildParam.getFieldType() == EParameterFieldType.TABLE) {
          targetChildParam.setListItemsValue(sourceChildParam.getListItemsValue());
          targetChildParam.setListItemsDisplayCodeName(sourceChildParam.getListItemsDisplayCodeName());
        }
      }
    }
  }
}
Program: 124136
Project: 124136
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void execute(){
  IElementParameter dqRuler=node.getElementParameter("String_Node_Str");
  String newQuery="String_Node_Str";
  if (dqRuler != null || !"String_Node_Str".equals(dqRuler.getValue())) {
    newQuery=generateNewQueryFromDQRuler(dqRuler);
    if (newQuery == null || "String_Node_Str".equals(newQuery)) {
      newQuery=generateNewQuery();
    }
  }
 else {
    newQuery=generateNewQuery();
  }
  for (  IElementParameter param : (List<IElementParameter>)node.getElementParameters()) {
    if (param.getFieldType() == EParameterFieldType.MEMO_SQL) {
      oldValue=node.getPropertyValue(param.getName());
      this.propName=param.getName();
      String sql=null;
      try {
        if (QueryUtil.needFormatSQL(dbType)) {
          sql=fomatQuery(newQuery);
        }
 else {
          sql=newQuery;
        }
        node.setPropertyValue(param.getName(),sql);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e,Priority.WARN);
        node.setPropertyValue(param.getName(),newQuery);
      }
      param.setRepositoryValueUsed(false);
    }
  }
  node.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(),Boolean.TRUE);
  if (this.node instanceof Node) {
    ((Node)this.node).checkAndRefreshNode();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void execute(){
  IElementParameter dqRuler=node.getElementParameter("String_Node_Str");
  String newQuery="String_Node_Str";
  if (dqRuler != null && !"String_Node_Str".equals(dqRuler.getValue())) {
    newQuery=generateNewQueryFromDQRuler(dqRuler);
    if (newQuery == null || "String_Node_Str".equals(newQuery)) {
      newQuery=generateNewQuery();
    }
  }
 else {
    newQuery=generateNewQuery();
  }
  for (  IElementParameter param : (List<IElementParameter>)node.getElementParameters()) {
    if (param.getFieldType() == EParameterFieldType.MEMO_SQL) {
      oldValue=node.getPropertyValue(param.getName());
      this.propName=param.getName();
      String sql=null;
      try {
        if (QueryUtil.needFormatSQL(dbType)) {
          sql=fomatQuery(newQuery);
        }
 else {
          sql=newQuery;
        }
        node.setPropertyValue(param.getName(),sql);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e,Priority.WARN);
        node.setPropertyValue(param.getName(),newQuery);
      }
      param.setRepositoryValueUsed(false);
    }
  }
  node.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(),Boolean.TRUE);
  if (this.node instanceof Node) {
    ((Node)this.node).checkAndRefreshNode();
  }
}
Program: 124137
Project: 124137
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void execute(){
  IElementParameter dqRuler=node.getElementParameter("String_Node_Str");
  String newQuery="String_Node_Str";
  if (dqRuler != null || !"String_Node_Str".equals(dqRuler.getValue())) {
    newQuery=generateNewQueryFromDQRuler(dqRuler);
    if (newQuery == null || "String_Node_Str".equals(newQuery)) {
      newQuery=generateNewQuery();
    }
  }
 else {
    newQuery=generateNewQuery();
  }
  for (  IElementParameter param : (List<IElementParameter>)node.getElementParameters()) {
    if (param.getFieldType() == EParameterFieldType.MEMO_SQL) {
      oldValue=node.getPropertyValue(param.getName());
      this.propName=param.getName();
      String sql=null;
      try {
        if (QueryUtil.needFormatSQL(dbType)) {
          sql=fomatQuery(newQuery);
        }
 else {
          sql=newQuery;
        }
        node.setPropertyValue(param.getName(),sql);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e,Priority.WARN);
        node.setPropertyValue(param.getName(),newQuery);
      }
      param.setRepositoryValueUsed(false);
    }
  }
  node.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(),Boolean.TRUE);
  if (this.node instanceof Node) {
    ((Node)this.node).checkAndRefreshNode();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void execute(){
  IElementParameter dqRuler=node.getElementParameter("String_Node_Str");
  String newQuery="String_Node_Str";
  if (dqRuler != null && !"String_Node_Str".equals(dqRuler.getValue())) {
    newQuery=generateNewQueryFromDQRuler(dqRuler);
    if (newQuery == null || "String_Node_Str".equals(newQuery)) {
      newQuery=generateNewQuery();
    }
  }
 else {
    newQuery=generateNewQuery();
  }
  for (  IElementParameter param : (List<IElementParameter>)node.getElementParameters()) {
    if (param.getFieldType() == EParameterFieldType.MEMO_SQL) {
      oldValue=node.getPropertyValue(param.getName());
      this.propName=param.getName();
      String sql=null;
      try {
        if (QueryUtil.needFormatSQL(dbType)) {
          sql=fomatQuery(newQuery);
        }
 else {
          sql=newQuery;
        }
        node.setPropertyValue(param.getName(),sql);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e,Priority.WARN);
        node.setPropertyValue(param.getName(),newQuery);
      }
      param.setRepositoryValueUsed(false);
    }
  }
  node.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(),Boolean.TRUE);
  if (this.node instanceof Node) {
    ((Node)this.node).checkAndRefreshNode();
  }
}
Program: 124138
Project: 124138
Buggy source:
public static long StringToLong(String strIn){
  if (null == strIn || strIn.length() == 0)   return -1l;
  return Long.valueOf(strIn);
}

Fixed version (ground truth):
public static long StringToLong(String strIn){
  if (null == strIn || strIn.length() == 0)   return -1l;
  if (strIn.length() > 18) {
    strIn=strIn.substring(0,18);
  }
  return Long.valueOf(strIn);
}
Program: 124139
Project: 124139
Buggy source:
public void advanced(){
  stackLayout.topControl=tosLoginComposite;
  base.layout();
  Project[] projectCollection=tosLoginComposite.readProject();
  for (int i=0; i < projectCollection.length; i++) {
    tosLoginComposite.getProjectList().add(projectCollection[i].getLabel());
    tosLoginComposite.getProjectMap().put(projectCollection[i].getLabel().toUpperCase(),projectCollection[i]);
    tosLoginComposite.getConvertorMap().put(projectCollection[i].getLabel().toUpperCase(),projectCollection[i].getLabel());
    try {
      tosLoginComposite.setStatusArea();
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
  }
  if (tosLoginComposite.getProjectList().getItemCount() > 0) {
    tosLoginComposite.getProjectList().select(0);
    tosLoginComposite.enableOpenAndDelete(true);
  }
}

Fixed version (ground truth):
public void advanced(){
  stackLayout.topControl=tosLoginComposite;
  base.layout();
  Project[] projectCollection=tosLoginComposite.readProject();
  Map<String,String> convertorMapper=tosLoginComposite.getConvertorMappper();
  for (int i=0; i < projectCollection.length; i++) {
    tosLoginComposite.getProjectMap().put(projectCollection[i].getLabel().toUpperCase(),projectCollection[i]);
    convertorMapper.put(projectCollection[i].getLabel().toUpperCase(),projectCollection[i].getLabel());
  }
  ListViewer projectListViewer=tosLoginComposite.getProjectListViewer();
  projectListViewer.setInput(new ArrayList(convertorMapper.values()));
  try {
    tosLoginComposite.setStatusArea();
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  if (projectListViewer.getList().getItemCount() > 0) {
    projectListViewer.getList().select(0);
    tosLoginComposite.enableOpenAndDelete(true);
  }
}
Program: 124142
Project: 124142
Buggy source:
private void refresh(){
  ProxyRepositoryFactory repositoryFactory=ProxyRepositoryFactory.getInstance();
  Project[] projects=null;
  try {
    projects=repositoryFactory.readProject();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
catch (  BusinessException e1) {
    ExceptionHandler.process(e1);
  }
  projectList.removeAll();
  projectsMap.clear();
  if (projects != null) {
    for (int i=0; i < projects.length; i++) {
      Project pro=projects[i];
      convertorMapper.put(pro.getTechnicalLabel(),pro.getLabel());
      projectList.add(convertorMapper.get(pro.getTechnicalLabel()));
      projectsMap.put(pro.getTechnicalLabel(),pro);
      sortProjects();
      enableOpenAndDelete(true);
    }
  }
  try {
    setStatusArea();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
}

Fixed version (ground truth):
private void refresh(){
  ProxyRepositoryFactory repositoryFactory=ProxyRepositoryFactory.getInstance();
  Project[] projects=null;
  try {
    projects=repositoryFactory.readProject();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
catch (  BusinessException e1) {
    ExceptionHandler.process(e1);
  }
  this.projectListViewer.getList().removeAll();
  projectsMap.clear();
  if (projects != null) {
    for (int i=0; i < projects.length; i++) {
      Project pro=projects[i];
      convertorMapper.put(pro.getTechnicalLabel(),pro.getLabel());
      projectsMap.put(pro.getTechnicalLabel(),pro);
      enableOpenAndDelete(true);
    }
    this.projectListViewer.setInput(new ArrayList(convertorMapper.values()));
  }
  try {
    setStatusArea();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
}
Program: 124144
Project: 124144
Buggy source:
@Override public ExecutionResult execute(Item item){
  ProcessType processType=getProcessType(item);
  if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) {
    return ExecutionResult.NOTHING_TO_DO;
  }
  String[] componentsName=new String[]{"String_Node_Str"};
  try {
    for (int i=0; i < componentsName.length; i++) {
      IComponentFilter filter=new NameComponentFilter(componentsName[i]);
      ModifyComponentsAction.searchAndModify(item,processType,filter,Arrays.<IComponentConversion>asList(new IComponentConversion(){
        public void transform(        NodeType node){
          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;
  }
  String[] componentsName=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  try {
    for (int i=0; i < componentsName.length; i++) {
      IComponentFilter filter=new NameComponentFilter(componentsName[i]);
      ModifyComponentsAction.searchAndModify(item,processType,filter,Arrays.<IComponentConversion>asList(new IComponentConversion(){
        public void transform(        NodeType node){
          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;
  }
}
Program: 124145
Project: 124145
Buggy source:
private void copyElementParametersValue(IElement sourceElement,IElement targetElement){
  for (  IElementParameter sourceParam : sourceElement.getElementParameters()) {
    IElementParameter targetParam=targetElement.getElementParameter(sourceParam.getName());
    if (targetParam != null) {
      targetParam.setContextMode(sourceParam.isContextMode());
      targetParam.setValue(sourceParam.getValue());
      if (targetParam.getFieldType() == EParameterFieldType.TABLE) {
        targetParam.setListItemsValue(ArrayUtils.clone(sourceParam.getListItemsValue()));
        targetParam.setListItemsDisplayCodeName(sourceParam.getListItemsDisplayCodeName());
      }
      for (      String name : targetParam.getChildParameters().keySet()) {
        IElementParameter targetChildParam=targetParam.getChildParameters().get(name);
        if (sourceParam.getChildParameters() == null) {
          continue;
        }
        IElementParameter sourceChildParam=sourceParam.getChildParameters().get(name);
        targetChildParam.setValue(sourceChildParam.getValue());
        if (targetChildParam.getFieldType() == EParameterFieldType.TABLE) {
          targetChildParam.setListItemsValue(sourceChildParam.getListItemsValue());
          targetChildParam.setListItemsDisplayCodeName(sourceChildParam.getListItemsDisplayCodeName());
        }
      }
    }
  }
}

Fixed version (ground truth):
private void copyElementParametersValue(IElement sourceElement,IElement targetElement){
  for (  IElementParameter sourceParam : sourceElement.getElementParameters()) {
    IElementParameter targetParam=targetElement.getElementParameter(sourceParam.getName());
    if (targetParam != null) {
      if (sourceParam.getName().equals(EParameterName.DB_TYPE.getName()) && sourceParam.getValue().toString().matches("String_Node_Str")) {
        sourceElement.getElementParameter(EParameterName.DBNAME.getName()).setValue(sourceElement.getElementParameter(EParameterName.DBFILE.getName()).getValue());
      }
      targetParam.setContextMode(sourceParam.isContextMode());
      targetParam.setValue(sourceParam.getValue());
      if (targetParam.getFieldType() == EParameterFieldType.TABLE) {
        targetParam.setListItemsValue(ArrayUtils.clone(sourceParam.getListItemsValue()));
        targetParam.setListItemsDisplayCodeName(sourceParam.getListItemsDisplayCodeName());
      }
      for (      String name : targetParam.getChildParameters().keySet()) {
        IElementParameter targetChildParam=targetParam.getChildParameters().get(name);
        if (sourceParam.getChildParameters() == null) {
          continue;
        }
        IElementParameter sourceChildParam=sourceParam.getChildParameters().get(name);
        targetChildParam.setValue(sourceChildParam.getValue());
        if (targetChildParam.getFieldType() == EParameterFieldType.TABLE) {
          targetChildParam.setListItemsValue(sourceChildParam.getListItemsValue());
          targetChildParam.setListItemsDisplayCodeName(sourceChildParam.getListItemsDisplayCodeName());
        }
      }
    }
  }
}
Program: 124149
Project: 124149
Buggy source:
public void advanced(){
  stackLayout.topControl=tosLoginComposite;
  base.layout();
  Project[] projectCollection=tosLoginComposite.readProject();
  Map<String,String> convertorMapper=tosLoginComposite.getConvertorMappper();
  for (int i=0; i < projectCollection.length; i++) {
    tosLoginComposite.getProjectMap().put(projectCollection[i].getLabel().toUpperCase(),projectCollection[i]);
    convertorMapper.put(projectCollection[i].getLabel().toUpperCase(),projectCollection[i].getLabel());
  }
  ListViewer projectListViewer=tosLoginComposite.getProjectListViewer();
  projectListViewer.setInput(new ArrayList(convertorMapper.values()));
  try {
    tosLoginComposite.setStatusArea();
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  if (projectListViewer.getList().getItemCount() > 0) {
    projectListViewer.getList().select(0);
    tosLoginComposite.enableOpenAndDelete(true);
  }
}

Fixed version (ground truth):
public void advanced(){
  stackLayout.topControl=tosLoginComposite;
  base.layout();
  Project[] projectCollection=tosLoginComposite.readProject();
  Map<String,String> convertorMapper=tosLoginComposite.getConvertorMapper();
  for (int i=0; i < projectCollection.length; i++) {
    tosLoginComposite.getProjectMap().put(projectCollection[i].getLabel().toUpperCase(),projectCollection[i]);
    convertorMapper.put(projectCollection[i].getLabel().toUpperCase(),projectCollection[i].getLabel());
  }
  ListViewer projectListViewer=tosLoginComposite.getProjectListViewer();
  projectListViewer.setInput(new ArrayList(convertorMapper.values()));
  try {
    tosLoginComposite.setStatusArea();
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  if (projectListViewer.getList().getItemCount() > 0) {
    projectListViewer.getList().select(0);
    tosLoginComposite.enableOpenAndDelete(true);
  }
}
Program: 124151
Project: 124151
Buggy source:
private void addWsdlNeedLib(RoutineItem routineItem){
  List<IMPORTType> wsdlNeedImport=new ArrayList<IMPORTType>();
  IMPORTType type1=ComponentFactory.eINSTANCE.createIMPORTType();
  type1.setMODULE("String_Node_Str");
  type1.setREQUIRED(true);
  type1.setNAME(routineItem.getProperty().getLabel());
  wsdlNeedImport.add(type1);
  IMPORTType type2=ComponentFactory.eINSTANCE.createIMPORTType();
  type2.setMODULE("String_Node_Str");
  type2.setREQUIRED(true);
  type2.setNAME(routineItem.getProperty().getLabel());
  wsdlNeedImport.add(type2);
  routineItem.getImports().addAll(wsdlNeedImport);
  try {
    CorePlugin.getDefault().getProxyRepositoryFactory().save(routineItem);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
}

Fixed version (ground truth):
private void addWsdlNeedLib(RoutineItem routineItem){
  List<IMPORTType> wsdlNeedImport=new ArrayList<IMPORTType>();
  IMPORTType type1=ComponentFactory.eINSTANCE.createIMPORTType();
  type1.setMODULE("String_Node_Str");
  type1.setREQUIRED(true);
  type1.setNAME(routineItem.getProperty().getLabel());
  wsdlNeedImport.add(type1);
  IMPORTType type2=ComponentFactory.eINSTANCE.createIMPORTType();
  type2.setMODULE("String_Node_Str");
  type2.setREQUIRED(true);
  type2.setNAME(routineItem.getProperty().getLabel());
  wsdlNeedImport.add(type2);
  routineItem.getImports().addAll(wsdlNeedImport);
  try {
    CorePlugin.getDefault().getProxyRepositoryFactory().save(routineItem);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
  CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<String>(),null);
}
Program: 124152
Project: 124152
Buggy source:
public void advanced(){
  stackLayout.topControl=tosLoginComposite;
  base.layout();
  Project[] projectCollection=tosLoginComposite.readProject();
  for (int i=0; i < projectCollection.length; i++) {
    tosLoginComposite.getProjectList().add(projectCollection[i].getLabel().toUpperCase());
    tosLoginComposite.getProjectMap().put(projectCollection[i].getLabel().toUpperCase(),projectCollection[i]);
    try {
      tosLoginComposite.setStatusArea();
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
  }
  if (tosLoginComposite.getProjectList().getItemCount() > 0) {
    tosLoginComposite.getProjectList().select(0);
    tosLoginComposite.enableOpenAndDelete(true);
  }
}

Fixed version (ground truth):
public void advanced(){
  stackLayout.topControl=tosLoginComposite;
  base.layout();
  Project[] projectCollection=tosLoginComposite.readProject();
  for (int i=0; i < projectCollection.length; i++) {
    tosLoginComposite.getProjectList().add(projectCollection[i].getLabel());
    tosLoginComposite.getProjectMap().put(projectCollection[i].getLabel().toUpperCase(),projectCollection[i]);
    tosLoginComposite.getConvertorMap().put(projectCollection[i].getLabel().toUpperCase(),projectCollection[i].getLabel());
    try {
      tosLoginComposite.setStatusArea();
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
  }
  if (tosLoginComposite.getProjectList().getItemCount() > 0) {
    tosLoginComposite.getProjectList().select(0);
    tosLoginComposite.enableOpenAndDelete(true);
  }
}