nus-yam/ex-repair huggingface dataset:
Program: 125638
Project: 125638
Buggy source:
public void createPropertiesFields(Composite parent){
  propComposite=new Composite(parent,SWT.NONE);
  GridLayout propCompLayout=new GridLayout(3,false);
  propCompLayout.marginWidth=getMarginWidth();
  propCompLayout.marginHeight=getMarginHeight();
  propComposite.setLayout(propCompLayout);
  propComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  Label propLabel=new Label(propComposite,SWT.NONE);
  propLabel.setText(getTitle());
  Button propertyButton=new Button(propComposite,SWT.NONE);
  final PropertiesDialog propertiesDialog=this;
  propertyButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
  propertyButton.setLayoutData(new GridData(30,25));
  propertyButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (propertiesTableView != null && !propertiesTableView.getTable().isDisposed()) {
        propertiesTableView.setReadOnly(isReadOnly());
      }
      setInitProperties(getLatestInitProperties());
      if (propertiesDialog.open() == IDialogConstants.OK_ID) {
        applyProperties(properties);
        updateStatusLabel(properties);
      }
    }
  }
);
  statusLabel=new Label(propComposite,SWT.NONE);
  statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}

Fixed version (ground truth):
public void createPropertiesFields(Composite parent){
  propComposite=new Composite(parent,SWT.NONE);
  GridLayout propCompLayout=new GridLayout(3,false);
  propCompLayout.marginWidth=getMarginWidth();
  propCompLayout.marginHeight=getMarginHeight();
  propComposite.setLayout(propCompLayout);
  propComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  Label propLabel=new Label(propComposite,SWT.NONE);
  propLabel.setText(getTitle());
  Button propertyButton=new Button(propComposite,SWT.NONE);
  final PropertiesDialog propertiesDialog=this;
  propertyButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
  propertyButton.setLayoutData(new GridData(30,25));
  propertyButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (propertiesTableView != null && !propertiesTableView.getTable().isDisposed()) {
        propertiesTableView.setReadOnly(isReadOnly());
      }
      setInitProperties(getLatestInitProperties());
      if (propertiesDialog.open() == IDialogConstants.OK_ID) {
        applyProperties(properties);
        updateStatusLabel(properties);
      }
    }
  }
);
  statusLabel=new Label(propComposite,SWT.NONE);
  statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  updateStatusLabel(initProperties);
}
Program: 125639
Project: 125639
Buggy source:
protected void revertContext(){
  if (hasContextBtn() && connectionItem != null) {
    if (isContextMode()) {
      ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(getShell(),connectionItem.getConnection(),true);
      if (contextType != null) {
        ConnectionContextHelper.revertPropertiesForContextMode(connectionItem,contextType);
        adaptContextModeToReversion();
      }
    }
 else {
      ConnectionContextHelper.openOutConetxtModeDialog();
    }
  }
}

Fixed version (ground truth):
protected void revertContext(){
  if (hasContextBtn() && connectionItem != null) {
    if (isContextMode()) {
      ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(getShell(),connectionItem.getConnection(),true);
      if (contextType != null) {
        revertingContext=true;
        ConnectionContextHelper.revertPropertiesForContextMode(connectionItem,contextType);
        adaptContextModeToReversion();
        revertingContext=false;
      }
    }
 else {
      ConnectionContextHelper.openOutConetxtModeDialog();
    }
  }
}
Program: 125640
Project: 125640
Buggy source:
private void fillDefaultsWhenImpalaVersionChanged(){
  if (isCreation) {
    String distribution=getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_IMPALA_DISTRIBUTION);
    String version=getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_IMPALA_VERSION);
    if (distribution == null) {
      return;
    }
    EDatabaseConnTemplate template=EDatabaseConnTemplate.indexOfTemplate(getConnection().getDatabaseType());
    if (template != null) {
      portText.setText(template.getDefaultPort());
    }
  }
}

Fixed version (ground truth):
private void fillDefaultsWhenImpalaVersionChanged(){
  if (isCreation && isNeedFillDefaults()) {
    String distribution=getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_IMPALA_DISTRIBUTION);
    String version=getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_IMPALA_VERSION);
    if (distribution == null) {
      return;
    }
    EDatabaseConnTemplate template=EDatabaseConnTemplate.indexOfTemplate(getConnection().getDatabaseType());
    if (template != null) {
      portText.setText(template.getDefaultPort());
    }
  }
}
Program: 125642
Project: 125642
Buggy source:
private void fillDefaultsWhenHiveModeChanged(boolean isEmbeddedMode){
  if (isCreation) {
    IHDistribution hiveDistribution=getCurrentHiveDistribution(false);
    if (hiveDistribution == null) {
      return;
    }
    IHDistributionVersion hiveVersion=hiveDistribution.getHDVersion(hiveVersionCombo.getText(),true);
    if (hiveVersion == null) {
      return;
    }
    String defaultPort=null;
    if (isEmbeddedMode) {
      defaultPort=hiveVersion.getDefaultConfig(hiveDistribution.getName(),EHadoopCategory.HIVE.getName(),HiveModeInfo.EMBEDDED.getName(),EHadoopProperties.PORT.getName());
    }
 else {
      defaultPort=hiveVersion.getDefaultConfig(hiveDistribution.getName(),EHadoopCategory.HIVE.getName(),HiveModeInfo.STANDALONE.getName(),EHadoopProperties.PORT.getName());
    }
    if (defaultPort != null && !isContextMode()) {
      getConnection().setPort(defaultPort);
      portText.setText(defaultPort);
    }
  }
}

Fixed version (ground truth):
private void fillDefaultsWhenHiveModeChanged(boolean isEmbeddedMode){
  if (isCreation && isNeedFillDefaults()) {
    IHDistribution hiveDistribution=getCurrentHiveDistribution(false);
    if (hiveDistribution == null) {
      return;
    }
    IHDistributionVersion hiveVersion=hiveDistribution.getHDVersion(hiveVersionCombo.getText(),true);
    if (hiveVersion == null) {
      return;
    }
    String defaultPort=null;
    if (isEmbeddedMode) {
      defaultPort=hiveVersion.getDefaultConfig(hiveDistribution.getName(),EHadoopCategory.HIVE.getName(),HiveModeInfo.EMBEDDED.getName(),EHadoopProperties.PORT.getName());
    }
 else {
      defaultPort=hiveVersion.getDefaultConfig(hiveDistribution.getName(),EHadoopCategory.HIVE.getName(),HiveModeInfo.STANDALONE.getName(),EHadoopProperties.PORT.getName());
    }
    if (defaultPort != null && !isContextMode()) {
      getConnection().setPort(defaultPort);
      portText.setText(defaultPort);
    }
  }
}
Program: 125643
Project: 125643
Buggy source:
private void fillDefaultsWhenHBaseVersionChanged(){
  if (isCreation) {
    String distribution=getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HBASE_DISTRIBUTION);
    String version=getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HBASE_VERSION);
    if (distribution == null) {
      return;
    }
    IHadoopDistributionService hadoopDistributionService=getHadoopDistributionService();
    if (hadoopDistributionService == null) {
      return;
    }
    IHDistribution hbaseDistribution=hadoopDistributionService.getHBaseDistributionManager().getDistribution(distribution,false);
    if (hbaseDistribution == null) {
      return;
    }
    IHDistributionVersion hbaseVersion=hbaseDistribution.getHDVersion(version,false);
    if (hbaseVersion == null) {
      return;
    }
    String defaultPort=hbaseVersion.getDefaultConfig(distribution,EHadoopCategory.HBASE.getName(),EHadoopProperties.PORT.getName());
    if (defaultPort != null && !isContextMode()) {
      getConnection().setPort(defaultPort);
      portText.setText(defaultPort);
    }
  }
}

Fixed version (ground truth):
private void fillDefaultsWhenHBaseVersionChanged(){
  if (isCreation && isNeedFillDefaults()) {
    String distribution=getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HBASE_DISTRIBUTION);
    String version=getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HBASE_VERSION);
    if (distribution == null) {
      return;
    }
    IHadoopDistributionService hadoopDistributionService=getHadoopDistributionService();
    if (hadoopDistributionService == null) {
      return;
    }
    IHDistribution hbaseDistribution=hadoopDistributionService.getHBaseDistributionManager().getDistribution(distribution,false);
    if (hbaseDistribution == null) {
      return;
    }
    IHDistributionVersion hbaseVersion=hbaseDistribution.getHDVersion(version,false);
    if (hbaseVersion == null) {
      return;
    }
    String defaultPort=hbaseVersion.getDefaultConfig(distribution,EHadoopCategory.HBASE.getName(),EHadoopProperties.PORT.getName());
    if (defaultPort != null && !isContextMode()) {
      getConnection().setPort(defaultPort);
      portText.setText(defaultPort);
    }
  }
}
Program: 125644
Project: 125644
Buggy source:
/** 
 * get the Column Comment especially for oracle type.
 * @param dbJDBCMetadata
 * @param columns
 * @param tableName
 * @param columnName
 * @param schemaPattern
 * @return
 */
private String getColumnComment(DatabaseMetaData dbJDBCMetadata,ResultSet columns,String tableName,String columnName,String schemaPattern){
  String columnComment=getStringFromResultSet(columns,GetColumn.REMARKS.name());
  try {
    if (StringUtils.isBlank(columnComment) && MetadataConnectionUtils.isOracle(dbJDBCMetadata)) {
      String selectRemarkOnTable="String_Node_Str" + tableName + "String_Node_Str"+ schemaPattern.toUpperCase()+ "String_Node_Str"+ columnName+ "String_Node_Str";
      columnComment=executeGetCommentStatement(selectRemarkOnTable,dbJDBCMetadata.getConnection());
    }
  }
 catch (  SQLException e) {
    log.error(e,e);
  }
  if (columnComment == null) {
    columnComment="String_Node_Str";
  }
  return columnComment;
}

Fixed version (ground truth):
/** 
 * get the Column Comment especially for oracle type.
 * @param dbJDBCMetadata
 * @param columns
 * @param tableName
 * @param columnName
 * @param schemaPattern
 * @return
 */
private String getColumnComment(DatabaseMetaData dbJDBCMetadata,ResultSet columns,String tableName,String columnName,String schemaPattern){
  String columnComment=getRemarksFromResultSet(columns);
  try {
    if (StringUtils.isBlank(columnComment) && MetadataConnectionUtils.isOracle(dbJDBCMetadata)) {
      String selectRemarkOnTable="String_Node_Str" + tableName + "String_Node_Str"+ schemaPattern.toUpperCase()+ "String_Node_Str"+ columnName+ "String_Node_Str";
      columnComment=executeGetCommentStatement(selectRemarkOnTable,dbJDBCMetadata.getConnection());
    }
  }
 catch (  SQLException e) {
    log.error(e,e);
  }
  if (columnComment == null) {
    columnComment="String_Node_Str";
  }
  return columnComment;
}
Program: 125645
Project: 125645
Buggy source:
/** 
 * get Table Comment.
 * @param dbJDBCMetadata
 * @param tables
 * @param tableName
 * @param catalogName
 * @param schemaPattern
 * @return
 */
private String getTableComment(DatabaseMetaData dbJDBCMetadata,ResultSet tables,String tableName,String catalogName,String schemaPattern){
  String tableComment=getStringFromResultSet(tables,GetTable.REMARKS.name());
  try {
    String productName=dbJDBCMetadata.getDatabaseProductName();
    if (StringUtils.isBlank(tableComment)) {
      String selectRemarkOnTable=MetadataConnectionUtils.getCommentQueryStr(productName,tableName,catalogName,schemaPattern);
      if (selectRemarkOnTable != null) {
        tableComment=executeGetCommentStatement(selectRemarkOnTable,dbJDBCMetadata.getConnection());
      }
    }
  }
 catch (  SQLException e) {
    log.error(e,e);
  }
  return tableComment;
}

Fixed version (ground truth):
/** 
 * get Table Comment.
 * @param dbJDBCMetadata
 * @param tables
 * @param tableName
 * @param catalogName
 * @param schemaPattern
 * @return
 */
private String getTableComment(DatabaseMetaData dbJDBCMetadata,ResultSet tables,String tableName,String catalogName,String schemaPattern){
  String tableComment=getRemarksFromResultSet(tables);
  try {
    String productName=dbJDBCMetadata.getDatabaseProductName();
    if (StringUtils.isBlank(tableComment)) {
      String selectRemarkOnTable=MetadataConnectionUtils.getCommentQueryStr(productName,tableName,catalogName,schemaPattern);
      if (selectRemarkOnTable != null) {
        tableComment=executeGetCommentStatement(selectRemarkOnTable,dbJDBCMetadata.getConnection());
      }
    }
  }
 catch (  SQLException e) {
    log.error(e,e);
  }
  return tableComment;
}
Program: 125646
Project: 125646
Buggy source:
public static String getOriginalValueOfProperties(ContextType contextType,String propertiesStrings){
  String originalValueOfProperties=propertiesStrings;
  if (propertiesStrings != null && !propertiesStrings.isEmpty()) {
    List<Map<String,Object>> jdbcPropertiesList=HadoopRepositoryUtil.getHadoopPropertiesList(propertiesStrings);
    if (jdbcPropertiesList != null && !jdbcPropertiesList.isEmpty()) {
      List<Map<String,Object>> newJdbcPropertiesList=new ArrayList<Map<String,Object>>(jdbcPropertiesList.size());
      Iterator<Map<String,Object>> iter=jdbcPropertiesList.iterator();
      while (iter.hasNext()) {
        Map<String,Object> map=iter.next();
        if (map != null && !map.isEmpty()) {
          Map<String,Object> newMap=new HashMap<String,Object>();
          Iterator<Map.Entry<String,Object>> mapEntryIter=map.entrySet().iterator();
          while (mapEntryIter.hasNext()) {
            Map.Entry<String,Object> entry=mapEntryIter.next();
            if (entry != null) {
              Object obj=entry.getValue();
              Object newValue=null;
              if (obj != null) {
                newValue=ContextParameterUtils.getOriginalValue(contextType,obj.toString());
              }
              newMap.put(entry.getKey(),newValue);
            }
          }
          newJdbcPropertiesList.add(newMap);
        }
      }
      originalValueOfProperties=HadoopRepositoryUtil.getHadoopPropertiesJsonStr(newJdbcPropertiesList);
    }
  }
  return originalValueOfProperties;
}

Fixed version (ground truth):
public static String getOriginalValueOfProperties(String propertiesStrings,ContextType contextType,boolean includeQuotes){
  String originalValueOfProperties=propertiesStrings;
  if (propertiesStrings != null && !propertiesStrings.isEmpty()) {
    List<Map<String,Object>> propertiesList=getHadoopPropertiesWithOriginalValue(propertiesStrings,contextType,includeQuotes);
    if (propertiesList != null && !propertiesList.isEmpty()) {
      originalValueOfProperties=getHadoopPropertiesJsonStr(propertiesList);
    }
  }
  return originalValueOfProperties;
}
Program: 125648
Project: 125648
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  if (propertiesDialog.open() == IDialogConstants.OK_ID) {
    applyProperties(properties);
    updateStatusLabel(properties);
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  setInitProperties(getLatestInitProperties());
  if (propertiesDialog.open() == IDialogConstants.OK_ID) {
    applyProperties(properties);
    updateStatusLabel(properties);
  }
}
Program: 125649
Project: 125649
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  Composite comp=new Composite(composite,SWT.NONE);
  comp.setLayoutData(new GridData(GridData.FILL_BOTH));
  GridLayout layout=new GridLayout();
  layout.marginHeight=10;
  layout.marginWidth=10;
  comp.setLayout(layout);
  propertiesBar=new ExpandBar(comp,SWT.V_SCROLL);
  propertiesBar.setSpacing(10);
  propertiesBar.setBackground(propertiesBar.getParent().getBackground());
  propertiesBar.setLayoutData(new GridData(GridData.FILL_BOTH));
  PropertiesTableView parentPropertiesTable=null;
  if (initPropertiesOfParent != null) {
    parentPropertiesTable=createPropertiesTable(propertiesBar,0,getParentTitle(),initPropertiesOfParent,true,false);
  }
  int tableIndex=parentPropertiesTable == null ? 0 : 1;
  propertiesTableView=createPropertiesTable(propertiesBar,tableIndex,getTitle(),initProperties,false,true);
  updateExpandItems();
  return parent;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  Composite comp=new Composite(composite,SWT.NONE);
  comp.setLayoutData(new GridData(GridData.FILL_BOTH));
  GridLayout layout=new GridLayout();
  layout.marginHeight=10;
  layout.marginWidth=10;
  comp.setLayout(layout);
  propertiesBar=new ExpandBar(comp,SWT.V_SCROLL);
  propertiesBar.setSpacing(10);
  propertiesBar.setBackground(propertiesBar.getParent().getBackground());
  propertiesBar.setLayoutData(new GridData(GridData.FILL_BOTH));
  PropertiesTableView parentPropertiesTable=null;
  if (initPropertiesOfParent != null) {
    parentPropertiesTable=createPropertiesTable(propertiesBar,0,getParentTitle(),initPropertiesOfParent,true,false);
  }
  int tableIndex=parentPropertiesTable == null ? 0 : 1;
  propertiesTableView=createPropertiesTable(propertiesBar,tableIndex,getTitle(),initProperties,false,true);
  updateExpandItems();
  updateStatusLabel(initProperties);
  return parent;
}
Program: 125650
Project: 125650
Buggy source:
public void createPropertiesFields(Composite parent){
  propComposite=new Composite(parent,SWT.NONE);
  GridLayout propCompLayout=new GridLayout(3,false);
  propCompLayout.marginWidth=getMarginWidth();
  propCompLayout.marginHeight=getMarginHeight();
  propComposite.setLayout(propCompLayout);
  propComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  Label propLabel=new Label(propComposite,SWT.NONE);
  propLabel.setText(getTitle());
  Button propertyButton=new Button(propComposite,SWT.NONE);
  final PropertiesDialog propertiesDialog=this;
  propertyButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
  propertyButton.setLayoutData(new GridData(30,25));
  propertyButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (propertiesDialog.open() == IDialogConstants.OK_ID) {
        applyProperties(properties);
        updateStatusLabel(properties);
      }
    }
  }
);
  statusLabel=new Label(propComposite,SWT.NONE);
  statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  updateStatusLabel(initProperties);
}

Fixed version (ground truth):
public void createPropertiesFields(Composite parent){
  propComposite=new Composite(parent,SWT.NONE);
  GridLayout propCompLayout=new GridLayout(3,false);
  propCompLayout.marginWidth=getMarginWidth();
  propCompLayout.marginHeight=getMarginHeight();
  propComposite.setLayout(propCompLayout);
  propComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  Label propLabel=new Label(propComposite,SWT.NONE);
  propLabel.setText(getTitle());
  Button propertyButton=new Button(propComposite,SWT.NONE);
  final PropertiesDialog propertiesDialog=this;
  propertyButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
  propertyButton.setLayoutData(new GridData(30,25));
  propertyButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      setInitProperties(getLatestInitProperties());
      if (propertiesDialog.open() == IDialogConstants.OK_ID) {
        applyProperties(properties);
        updateStatusLabel(properties);
      }
    }
  }
);
  statusLabel=new Label(propComposite,SWT.NONE);
  statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
Program: 125652
Project: 125652
Buggy source:
protected void createHadoopPropertiesContextVariable(String prefixName,List<IContextParameter> varList,String hadoopProperties){
  List<Map<String,Object>> hadoopPropertiesList=HadoopRepositoryUtil.getHadoopPropertiesList(hadoopProperties);
  for (  Map<String,Object> propertyMap : hadoopPropertiesList) {
    String propertyKey=(String)propertyMap.get(HADOOP_PROPERTY);
    String propertyValue=(String)propertyMap.get(HADOOP_VALUE);
    String keyWithPrefix=prefixName + ConnectionContextHelper.LINE + getValidHadoopContextName(propertyKey);
    ConnectionContextHelper.createParameters(varList,keyWithPrefix,propertyValue);
  }
}

Fixed version (ground truth):
protected void createHadoopPropertiesContextVariable(String prefixName,List<IContextParameter> varList,String hadoopProperties){
  List<Map<String,Object>> hadoopPropertiesList=HadoopRepositoryUtil.getHadoopPropertiesList(hadoopProperties);
  for (  Map<String,Object> propertyMap : hadoopPropertiesList) {
    String propertyKey=(String)propertyMap.get(HADOOP_PROPERTY);
    String propertyValue=(String)propertyMap.get(HADOOP_VALUE);
    String keyWithPrefix=prefixName + ConnectionContextHelper.LINE + ContextParameterUtils.getValidParameterName(propertyKey);
    ConnectionContextHelper.createParameters(varList,keyWithPrefix,propertyValue);
  }
}
Program: 125653
Project: 125653
Buggy source:
protected List<Map<String,Object>> transformHadoopPropertiesForContextMode(List<Map<String,Object>> hadoopPropertiesList,String prefixName){
  for (  Map<String,Object> propertyMap : hadoopPropertiesList) {
    String propertyKey=(String)propertyMap.get(HADOOP_PROPERTY);
    propertyMap.put(HADOOP_VALUE,ContextParameterUtils.getNewScriptCode(prefixName + ConnectionContextHelper.LINE + getValidHadoopContextName(propertyKey),LANGUAGE));
  }
  return hadoopPropertiesList;
}

Fixed version (ground truth):
protected List<Map<String,Object>> transformHadoopPropertiesForContextMode(List<Map<String,Object>> hadoopPropertiesList,String prefixName){
  for (  Map<String,Object> propertyMap : hadoopPropertiesList) {
    String propertyKey=(String)propertyMap.get(HADOOP_PROPERTY);
    propertyMap.put(HADOOP_VALUE,ContextParameterUtils.getNewScriptCode(prefixName + ConnectionContextHelper.LINE + ContextParameterUtils.getValidParameterName(propertyKey),LANGUAGE));
  }
  return hadoopPropertiesList;
}
Program: 125660
Project: 125660
Buggy source:
@Override public IMetadataColumn getColumn(String columnName){
  for (int i=0; i < getListColumns(true).size(); i++) {
    IMetadataColumn column=getListColumns(true).get(i);
    if (column.getLabel().equals(columnName)) {
      return column;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IMetadataColumn getColumn(String columnName){
  List<IMetadataColumn> withUnusedList=getListColumns(true);
  for (int i=0; i < withUnusedList.size(); i++) {
    IMetadataColumn column=withUnusedList.get(i);
    if (column.getLabel().equals(columnName)) {
      return column;
    }
  }
  return null;
}
Program: 125661
Project: 125661
Buggy source:
@Override public synchronized List<IMetadataColumn> getListColumns(boolean withUnselected){
  Iterator<IMetadataColumn> it=this.listColumns.iterator();
  while (it.hasNext()) {
    IMetadataColumn column=it.next();
    if (!column.isUsefulColumn()) {
      this.unusedColumns.add(column);
      it.remove();
    }
  }
  Iterator<IMetadataColumn> it2=this.unusedColumns.iterator();
  while (it2.hasNext()) {
    IMetadataColumn column=it2.next();
    if (column.isUsefulColumn()) {
      this.listColumns.add(column);
      it2.remove();
    }
  }
  if (withUnselected) {
    List<IMetadataColumn> temp=new ArrayList<IMetadataColumn>();
    temp.addAll(this.listColumns);
    temp.addAll(this.unusedColumns);
    return temp;
  }
  return this.listColumns;
}

Fixed version (ground truth):
@Override public synchronized List<IMetadataColumn> getListColumns(boolean withUnselected){
  Iterator<IMetadataColumn> it=this.listColumns.iterator();
  while (it.hasNext()) {
    IMetadataColumn column=it.next();
    if (!column.isUsefulColumn()) {
      this.unusedColumns.add(column);
      it.remove();
    }
  }
  Iterator<IMetadataColumn> it2=this.unusedColumns.iterator();
  while (it2.hasNext()) {
    IMetadataColumn column=it2.next();
    if (column.isUsefulColumn()) {
      this.listColumns.add(column);
      it2.remove();
    }
  }
  if (withUnselected) {
    List<IMetadataColumn> temp=new ArrayList<IMetadataColumn>();
    temp.addAll(this.listColumns);
    temp.addAll(this.unusedColumns);
    if (isRepository && originalColumns != null) {
      Collections.sort(temp,new Comparator<IMetadataColumn>(){
        @Override public int compare(        IMetadataColumn o1,        IMetadataColumn o2){
          int index1=originalColumns.indexOf(o1.getLabel());
          int index2=originalColumns.indexOf(o2.getLabel());
          return index1 - index2;
        }
      }
);
    }
    return temp;
  }
  return this.listColumns;
}
Program: 125662
Project: 125662
Buggy source:
public boolean isRepository(){
  return this.isRepository;
}

Fixed version (ground truth):
@Override public boolean isRepository(){
  return this.isRepository;
}
Program: 125667
Project: 125667
Buggy source:
private static ContextType getHadoopClusterContextType(DatabaseConnection dbConn,boolean useDefaultContext){
  ContextType hadoopClusterContextType=null;
  IHadoopClusterService hadoopClusterService=null;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopClusterService.class)) {
    hadoopClusterService=(IHadoopClusterService)GlobalServiceRegister.getDefault().getService(IHadoopClusterService.class);
  }
  if (hadoopClusterService != null) {
    ConnectionItem hadoopClusterItem=(ConnectionItem)hadoopClusterService.getHadoopClusterItemById(dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HADOOP_CLUSTER_ID));
    if (hadoopClusterItem != null) {
      Connection hadoopClusterConnection=hadoopClusterItem.getConnection();
      hadoopClusterContextType=ConnectionContextHelper.getContextTypeForContextMode(null,hadoopClusterConnection,hadoopClusterConnection.getContextName(),useDefaultContext);
    }
  }
  return hadoopClusterContextType;
}

Fixed version (ground truth):
private static ContextType getHadoopClusterContextType(DatabaseConnection dbConn,boolean useDefaultContext){
  ContextType hadoopClusterContextType=null;
  IHadoopClusterService hadoopClusterService=null;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopClusterService.class)) {
    hadoopClusterService=(IHadoopClusterService)GlobalServiceRegister.getDefault().getService(IHadoopClusterService.class);
  }
  if (hadoopClusterService != null) {
    EMap<String,String> parameters=dbConn.getParameters();
    if (parameters != null && parameters.size() > 0) {
      ConnectionItem hadoopClusterItem=(ConnectionItem)hadoopClusterService.getHadoopClusterItemById(parameters.get(ConnParameterKeys.CONN_PARA_KEY_HADOOP_CLUSTER_ID));
      if (hadoopClusterItem != null) {
        Connection hadoopClusterConnection=hadoopClusterItem.getConnection();
        hadoopClusterContextType=ConnectionContextHelper.getContextTypeForContextMode(null,hadoopClusterConnection,hadoopClusterConnection.getContextName(),useDefaultContext);
      }
    }
  }
  return hadoopClusterContextType;
}
Program: 125668
Project: 125668
Buggy source:
public static SAPConnection cloneOriginalValueSAPConnection(SAPConnection fileConn,ContextType contextType){
  if (fileConn == null) {
    return null;
  }
  SAPConnection cloneConn=ConnectionFactory.eINSTANCE.createSAPConnection();
  String client=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getClient());
  String host=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getHost());
  String user=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getUsername());
  String pass=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getValue(fileConn.getPassword(),false));
  String sysNumber=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getSystemNumber());
  String language=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getLanguage());
  cloneConn.setClient(client);
  cloneConn.setHost(host);
  cloneConn.setUsername(user);
  cloneConn.setPassword(cloneConn.getValue(pass,true));
  cloneConn.setSystemNumber(sysNumber);
  cloneConn.setLanguage(language);
  ConnectionContextHelper.cloneConnectionProperties(fileConn,cloneConn);
  return cloneConn;
}

Fixed version (ground truth):
public static SAPConnection cloneOriginalValueSAPConnection(SAPConnection fileConn,ContextType contextType){
  if (fileConn == null) {
    return null;
  }
  SAPConnection cloneConn=ConnectionFactory.eINSTANCE.createSAPConnection();
  String client=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getClient());
  String host=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getHost());
  String user=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getUsername());
  String pass=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getValue(fileConn.getPassword(),false));
  String sysNumber=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getSystemNumber());
  String language=ConnectionContextHelper.getOriginalValue(contextType,fileConn.getLanguage());
  cloneConn.setClient(client);
  cloneConn.setHost(host);
  cloneConn.setUsername(user);
  cloneConn.setPassword(cloneConn.getValue(pass,true));
  cloneConn.setSystemNumber(sysNumber);
  cloneConn.setLanguage(language);
  if (fileConn.getAdditionalProperties() != null && !fileConn.getAdditionalProperties().isEmpty()) {
    Collection<AdditionalConnectionProperty> addtionalProperties=EcoreUtil.copyAll(fileConn.getAdditionalProperties());
    cloneConn.getAdditionalProperties().addAll(addtionalProperties);
    for (    AdditionalConnectionProperty prop : cloneConn.getAdditionalProperties()) {
      String propValue=ConnectionContextHelper.getOriginalValue(contextType,prop.getValue());
      prop.setValue(propValue);
    }
  }
  ConnectionContextHelper.cloneConnectionProperties(fileConn,cloneConn);
  return cloneConn;
}
Program: 125669
Project: 125669
Buggy source:
@Override public int hashCode(){
  final int prime=31;
  int result=1;
  result=prime * result + ((this.path == null) ? 0 : this.path.hashCode());
  return result;
}

Fixed version (ground truth):
@Override public int hashCode(){
  final int prime=31;
  int result=1;
  result=prime * result + ((this.path == null) ? 0 : this.path.hashCode());
  result=prime * result + ((this.topNodePath == null) ? 0 : this.topNodePath.hashCode());
  return result;
}
Program: 125670
Project: 125670
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  ResourceNode other=(ResourceNode)obj;
  if (this.path == null) {
    if (other.path != null)     return false;
  }
 else   if (!this.path.equals(other.path))   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  ResourceNode other=(ResourceNode)obj;
  if (this.path == null) {
    if (other.path != null)     return false;
  }
 else   if (!this.path.equals(other.path))   return false;
  if (this.topNodePath == null) {
    if (other.topNodePath != null)     return false;
  }
 else   if (!this.topNodePath.equals(other.topNodePath))   return false;
  return true;
}
Program: 125671
Project: 125671
Buggy source:
@Override public boolean contains(String jarName){
  return list().contains(jarName);
}

Fixed version (ground truth):
@Override public boolean contains(String jarName){
  Set<String> list=list();
  boolean contained=list.contains(jarName);
  if (!contained) {
    try {
      File jarFile=getJarFile(jarName);
      if (jarFile != null) {
        list.add(jarName);
        contained=true;
      }
    }
 catch (    MalformedURLException e) {
      contained=false;
    }
  }
  return contained;
}
Program: 125672
Project: 125672
Buggy source:
public void executeJobOnServer(IProcessMessageManager processMessageManager,ITargetExecutionConfig config,PipedInputStream stdInputStream,PipedInputStream errInputStream,PipedOutputStream stdOutputStream,PipedOutputStream errOutputStream,String remoteJobId,String jobName,Map<String,String> jobParams,Map<String,String> contextParams) throws Exception ;

Fixed version (ground truth):
public Process executeJobOnServer(IProcessMessageManager processMessageManager,ITargetExecutionConfig config,PipedInputStream stdInputStream,PipedInputStream errInputStream,PipedOutputStream stdOutputStream,PipedOutputStream errOutputStream,String remoteJobId,String jobName,Map<String,String> jobParams,Map<String,String> contextParams) throws Exception ;
Program: 125676
Project: 125676
Buggy source:
public static ExtractManager create(EDatabaseTypeName dbType){
  if (dbType == null) {
    return null;
  }
switch (dbType) {
case ACCESS:
    return new AccessExtractManager();
case AS400:
  return new AS400ExtractManager();
case GENERAL_JDBC:
return new GeneralJDBCExtractManager();
case HIVE:
return new HiveExtractManager();
case HSQLDB:
case HSQLDB_SERVER:
case HSQLDB_WEBSERVER:
case HSQLDB_IN_PROGRESS:
return new HSQLDBExtractManager(dbType);
case IBMDB2:
case IBMDB2ZOS:
return new IBMDB2ExtractManager(dbType);
case JAVADB:
case JAVADB_EMBEDED:
case JAVADB_DERBYCLIENT:
case JAVADB_JCCJDBC:
return new JAVADBExtractManager(dbType);
case MSSQL:
case MSSQL05_08:
return new MSSQLExtractManager(dbType);
case MYSQL:
return new MySQLExtractManager();
case ORACLEFORSID:
case ORACLESN:
case ORACLE_CUSTOM:
case ORACLE_OCI:
return new OracleExtractManager(dbType);
case TERADATA:
return new TeradataExtractManager();
default :
return new ExtractManager(dbType);
}
}

Fixed version (ground truth):
public static ExtractManager create(EDatabaseTypeName dbType){
  if (dbType == null) {
    return null;
  }
switch (dbType) {
case ACCESS:
    return new AccessExtractManager();
case AS400:
  return new AS400ExtractManager();
case GENERAL_JDBC:
return new GeneralJDBCExtractManager();
case HIVE:
return new HiveExtractManager();
case IMPALA:
return new ImpalaExtractManager();
case HSQLDB:
case HSQLDB_SERVER:
case HSQLDB_WEBSERVER:
case HSQLDB_IN_PROGRESS:
return new HSQLDBExtractManager(dbType);
case IBMDB2:
case IBMDB2ZOS:
return new IBMDB2ExtractManager(dbType);
case JAVADB:
case JAVADB_EMBEDED:
case JAVADB_DERBYCLIENT:
case JAVADB_JCCJDBC:
return new JAVADBExtractManager(dbType);
case MSSQL:
case MSSQL05_08:
return new MSSQLExtractManager(dbType);
case MYSQL:
return new MySQLExtractManager();
case ORACLEFORSID:
case ORACLESN:
case ORACLE_CUSTOM:
case ORACLE_OCI:
return new OracleExtractManager(dbType);
case TERADATA:
return new TeradataExtractManager();
default :
return new ExtractManager(dbType);
}
}
Program: 125678
Project: 125678
Buggy source:
@Override public IFile getRoutinesFile(Item item) throws SystemException {
  if (item instanceof RoutineItem) {
    final RoutineItem routineItem=(RoutineItem)item;
    final IProject project=ResourcesPlugin.getWorkspace().getRoot().getProject(ProjectManager.getInstance().getProject(routineItem).getTechnicalLabel());
    IFolder folder=project.getFolder(ERepositoryObjectType.getFolderName(ERepositoryObjectType.getItemType(routineItem)));
    final String folderPath=RepositoryNodeUtilities.getPath(routineItem.getProperty().getId()).toString();
    if (folderPath != null && !folderPath.trim().isEmpty()) {
      folder=folder.getFolder(folderPath);
    }
    final String fileName=routineItem.getProperty().getLabel() + '_' + routineItem.getProperty().getVersion()+ JavaUtils.ITEM_EXTENSION;
    return folder.getFile(fileName);
  }
  return null;
}

Fixed version (ground truth):
@Override public IFile getRoutinesFile(Item item) throws SystemException {
  if (item instanceof RoutineItem) {
    final RoutineItem routineItem=(RoutineItem)item;
    final IProject project=ResourcesPlugin.getWorkspace().getRoot().getProject(ProjectManager.getInstance().getProject(routineItem).getTechnicalLabel());
    IFolder folder=project.getFolder(ERepositoryObjectType.getFolderName(ERepositoryObjectType.getItemType(routineItem)));
    IPath ipath=RepositoryNodeUtilities.getPath(routineItem.getProperty().getId());
    if (ipath == null)     return null;
    final String folderPath=ipath.toString();
    if (folderPath != null && !folderPath.trim().isEmpty()) {
      folder=folder.getFolder(folderPath);
    }
    final String fileName=routineItem.getProperty().getLabel() + '_' + routineItem.getProperty().getVersion()+ JavaUtils.ITEM_EXTENSION;
    return folder.getFile(fileName);
  }
  return null;
}
Program: 125680
Project: 125680
Buggy source:
/** 
 * DOC nrousseau Comment method "getParentResourceNode".
 * @param delta
 * @param resource
 * @return
 */
private ResourceNode getParentResourceNode(IResourceDelta delta,IResource resource){
  IRepositoryNode topNode=getTopNodeFromResourceDelta(delta);
  ResourceNode resourceNode=new ResourceNode();
  resourceNode.setPath(resource.getParent().getFullPath().toPortableString());
  resourceNode.setTopNode(topNode);
  resourceNode.setTopNodePath(getTopLevelNodePathForRefresh((RepositoryNode)topNode).toPortableString());
  ((RepositoryNode)topNode).setInitialized(false);
  return resourceNode;
}

Fixed version (ground truth):
/** 
 * DOC nrousseau Comment method "getParentResourceNode".
 * @param delta
 * @param resource
 * @return
 */
private ResourceNode getParentResourceNode(IResourceDelta delta,IResource resource){
  IRepositoryNode topNode=getTopNodeFromResourceDelta(delta);
  ResourceNode resourceNode=new ResourceNode();
  resourceNode.setPath(resource.getParent().getFullPath().toPortableString());
  resourceNode.setTopNode(topNode);
  resourceNode.setTopNodePath(getTopLevelNodePathForRefresh((RepositoryNode)topNode).toPortableString());
  ((RepositoryNode)topNode).setInitialized(false);
  topNode.getChildren().clear();
  return resourceNode;
}
Program: 125681
Project: 125681
Buggy source:
@Override public boolean contains(String jarName){
  return list().contains(jarName);
}

Fixed version (ground truth):
@Override public boolean contains(String jarName){
  Set<String> list=list();
  boolean contained=list.contains(jarName);
  if (!contained) {
    try {
      File jarFile=getJarFile(jarName);
      if (jarFile != null) {
        list.add(jarName);
        contained=true;
      }
    }
 catch (    MalformedURLException e) {
      contained=false;
    }
  }
  return contained;
}
Program: 125682
Project: 125682
Buggy source:
/** 
 * collect all vesions to one ModuleToInstall to don't display several times for the same jar in the dialog if need to download all versions
 */
public void collectModulesWithJarName(List<ModuleToInstall> toInstall){
  List<ModuleToInstall> manualInstall=new ArrayList<ModuleToInstall>();
  Map<String,ModuleToInstall> nameAndModuleMap=new HashMap<String,ModuleToInstall>();
  for (  ModuleToInstall module : toInstall) {
    if (MavenConstants.DOWNLOAD_MANUAL.equals(module.getDistribution())) {
      manualInstall.add(module);
    }
 else     if (module.getMavenUri() != null) {
      final ModuleToInstall moduleToInstall=nameAndModuleMap.get(module.getName());
      if (moduleToInstall != null) {
        moduleToInstall.getMavenUris().add(module.getMavenUri());
      }
 else {
        module.getMavenUris().add(module.getMavenUri());
        nameAndModuleMap.put(module.getName(),module);
      }
    }
  }
  toInstall.clear();
  toInstall.addAll(nameAndModuleMap.values());
  toInstall.addAll(manualInstall);
}

Fixed version (ground truth):
/** 
 * collect all vesions to one ModuleToInstall to don't display several times for the same jar in the dialog if need to download all versions
 */
public void collectModulesWithJarName(List<ModuleToInstall> toInstall){
  List<ModuleToInstall> manualInstall=new ArrayList<ModuleToInstall>();
  Map<String,ModuleToInstall> nameAndModuleMap=new HashMap<String,ModuleToInstall>();
  for (  ModuleToInstall module : toInstall) {
    ModuleToInstall moduleToInstall=nameAndModuleMap.get(module.getName());
    if (!MavenConstants.DOWNLOAD_MANUAL.equals(module.getDistribution()) && module.getMavenUri() != null) {
      if (moduleToInstall == null) {
        moduleToInstall=module;
        nameAndModuleMap.put(module.getName(),module);
      }
      moduleToInstall.getMavenUris().add(module.getMavenUri());
    }
  }
  for (  ModuleToInstall module : toInstall) {
    if (MavenConstants.DOWNLOAD_MANUAL.equals(module.getDistribution())) {
      ModuleToInstall moduleToInstall=nameAndModuleMap.get(module.getName());
      if (moduleToInstall == null) {
        nameAndModuleMap.put(module.getName(),module);
      }
    }
  }
  toInstall.clear();
  toInstall.addAll(nameAndModuleMap.values());
  toInstall.addAll(manualInstall);
}
Program: 125684
Project: 125684
Buggy source:
/** 
 * DOC nrousseau Comment method "resolveJar".
 * @param jarNeeded
 * @param jarFile
 * @param manager
 * @param customNexusServer
 * @param uri
 * @return
 * @throws Exception
 * @throws IOException
 */
public File resolveJar(TalendLibsServerManager manager,final NexusServerBean customNexusServer,String uri) throws Exception, IOException {
  File resolvedFile=null;
  if (!isLocalJarSameAsNexus(manager,customNexusServer,uri)) {
    resolvedFile=manager.getMavenResolver().resolve(uri);
  }
  if (resolvedFile != null) {
    final Map<String,ELibraryInstallStatus> statusMap=ModuleStatusProvider.getStatusMap();
    statusMap.put(uri,ELibraryInstallStatus.INSTALLED);
    mavenJarInstalled.put(uri,resolvedFile.getAbsolutePath());
  }
  updateLastResolveDate(uri);
  return resolvedFile;
}

Fixed version (ground truth):
/** 
 * DOC nrousseau Comment method "resolveJar".
 * @param jarNeeded
 * @param jarFile
 * @param manager
 * @param customNexusServer
 * @param uri
 * @return
 * @throws Exception
 * @throws IOException
 */
public File resolveJar(TalendLibsServerManager manager,final NexusServerBean customNexusServer,String uri) throws Exception, IOException {
  File resolvedFile=null;
  if (!isLocalJarSameAsNexus(manager,customNexusServer,uri)) {
    resolvedFile=manager.getMavenResolver().resolve(uri);
  }
  if (resolvedFile != null) {
    final Map<String,ELibraryInstallStatus> statusMap=ModuleStatusProvider.getStatusMap();
    statusMap.put(uri,ELibraryInstallStatus.INSTALLED);
    mavenJarInstalled.put(uri,resolvedFile.getAbsolutePath());
  }
  updateLastResolveDate(uri);
  if (resolvedFile != null) {
    try {
      String pomPath=resolvedFile.getParent();
      String name=resolvedFile.getName();
      int indexOf=name.lastIndexOf("String_Node_Str");
      if (indexOf != -1) {
        pomPath=pomPath + "String_Node_Str" + name.substring(0,indexOf)+ "String_Node_Str"+ MavenConstants.PACKAGING_POM;
      }
 else {
        pomPath=pomPath + name + "String_Node_Str"+ MavenConstants.PACKAGING_POM;
      }
      File pomFile=new File(pomPath);
      if (!pomFile.exists()) {
        MavenArtifact parseMvnUrl=MavenUrlHelper.parseMvnUrl(uri);
        File generatedPom=new File(PomUtil.generatePom(parseMvnUrl));
        FilesUtils.copyFile(generatedPom,pomFile);
      }
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
  return resolvedFile;
}
Program: 125686
Project: 125686
Buggy source:
public static DynamicClassLoader getClassLoader(String index,ClassLoader parentClassLoader){
  if (classLoadersMap == null) {
    init();
  }
  DynamicClassLoader classLoader=classLoadersMap.get(index);
  if (classLoader == null) {
    classLoader=findLoader(index,parentClassLoader,true);
  }
  return classLoader;
}

Fixed version (ground truth):
public static DynamicClassLoader getClassLoader(IHDistributionVersion hdVersion){
  String index="String_Node_Str" + KEY_SEPARATOR + hdVersion.getDistribution().getName()+ KEY_SEPARATOR+ hdVersion.getVersion();
  List<ModuleNeeded> modulesNeeded=hdVersion.getModulesNeeded();
  Set<String> libraries=new HashSet<String>();
  for (  ModuleNeeded m : modulesNeeded) {
    libraries.add(m.getModuleName());
  }
  DynamicClassLoader hdClassLoader=getCustomClassLoader(index,libraries);
  return hdClassLoader;
}
Program: 125690
Project: 125690
Buggy source:
@Override protected boolean validChildrenJob(JobInfo jobInfo){
  JobInfo fatherJobInfo=null;
  for (  JobInfo lastGeneratedJobInfo : LastGenerationInfo.getInstance().getLastGeneratedjobs()) {
    if (lastGeneratedJobInfo.getJobId().equals(getJobProcessor().getProperty().getId()) && lastGeneratedJobInfo.getJobVersion().equals(getJobProcessor().getProperty().getVersion())) {
      fatherJobInfo=lastGeneratedJobInfo;
      break;
    }
  }
  if (fatherJobInfo != null) {
    fatherJobInfo=fatherJobInfo.getFatherJobInfo();
  }
  while (fatherJobInfo != null) {
    if (fatherJobInfo.getJobId().equals(jobInfo.getJobId()) && fatherJobInfo.getJobVersion().equals(jobInfo.getJobVersion())) {
      return false;
    }
    fatherJobInfo=fatherJobInfo.getFatherJobInfo();
  }
  return jobInfo != null && !jobInfo.isTestContainer();
}

Fixed version (ground truth):
@Override protected boolean validChildrenJob(JobInfo jobInfo){
  JobInfo fatherJobInfo=null;
  for (  JobInfo lastGeneratedJobInfo : LastGenerationInfo.getInstance().getLastGeneratedjobs()) {
    if (lastGeneratedJobInfo.getJobId().equals(getJobProcessor().getProperty().getId()) && lastGeneratedJobInfo.getJobVersion().equals(getJobProcessor().getProperty().getVersion())) {
      fatherJobInfo=lastGeneratedJobInfo;
      break;
    }
  }
  while (fatherJobInfo != null) {
    if (fatherJobInfo.getJobId().equals(jobInfo.getJobId()) && fatherJobInfo.getJobVersion().equals(jobInfo.getJobVersion())) {
      return false;
    }
    fatherJobInfo=fatherJobInfo.getFatherJobInfo();
  }
  return jobInfo != null && !jobInfo.isTestContainer();
}
Program: 125691
Project: 125691
Buggy source:
/** 
 * DOC nrousseau Comment method "findItemNode".
 * @param id
 * @return
 */
private IRepositoryNode findItemNode(String id,List<IRepositoryNode> nodes){
  for (  IRepositoryNode node : nodes) {
    if (id.equals(node.getId())) {
      return node;
    }
    IRepositoryNode childNode=findItemNode(id,node.getChildren());
    if (childNode != null) {
      return childNode;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * DOC nrousseau Comment method "findItemNode".
 * @param id
 * @return
 */
private IRepositoryNode findItemNode(String id,List<IRepositoryNode> nodes){
  for (  IRepositoryNode node : nodes) {
    if (id.equals(node.getId())) {
      return node;
    }
    ITreeContentProvider contentProvider=(ITreeContentProvider)getContentProvider();
    Object[] childrensObject=contentProvider.getElements(node);
    List<IRepositoryNode> childrens=new ArrayList<>();
    for (    Object o : childrensObject) {
      if (o instanceof IRepositoryNode) {
        childrens.add((IRepositoryNode)o);
      }
    }
    IRepositoryNode childNode=findItemNode(id,childrens);
    if (childNode != null) {
      return childNode;
    }
  }
  return null;
}
Program: 125694
Project: 125694
Buggy source:
/** 
 * DOC nrousseau Comment method "findItemNode".
 * @param id
 * @return
 */
private IRepositoryNode findItemNode(String id,List<IRepositoryNode> nodes){
  for (  IRepositoryNode node : nodes) {
    if (id.equals(node.getId())) {
      return node;
    }
    IRepositoryNode childNode=findItemNode(id,node.getChildren());
    if (childNode != null) {
      return childNode;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * DOC nrousseau Comment method "findItemNode".
 * @param id
 * @return
 */
private IRepositoryNode findItemNode(String id,List<IRepositoryNode> nodes){
  for (  IRepositoryNode node : nodes) {
    if (id.equals(node.getId())) {
      return node;
    }
    ITreeContentProvider contentProvider=(ITreeContentProvider)viewer.getContentProvider();
    Object[] childrensObject=contentProvider.getElements(node);
    List<IRepositoryNode> childrens=new ArrayList<>();
    for (    Object o : childrensObject) {
      if (o instanceof IRepositoryNode) {
        childrens.add((IRepositoryNode)o);
      }
    }
    IRepositoryNode childNode=findItemNode(id,node.getChildren());
    if (childNode != null) {
      return childNode;
    }
  }
  return null;
}