nus-yam/ex-repair huggingface dataset:
Program: 139771
Project: 139771
Buggy source:
/** 
 * DataProviderBuilder constructor.
 * @param conn the connection
 * @param driver the JDBC driver
 * @param databaseUrl the database connection string (must not be null)
 * @param driverProperties the properties passed to the driver (could be null)
 * @throws SQLException
 */
public DataProviderBuilder(Connection conn,Driver driver,String databaseUrl,Properties driverProperties) throws SQLException {
  super(conn);
  this.dataProvider=DatabaseContentRetriever.getDataProvider(driver,databaseUrl,driverProperties);
  String identifierQuote=conn.getMetaData().getIdentifierQuoteString();
  DataProviderHelper.setIdentifierQuoteString(identifierQuote,dataProvider);
}

Fixed version (ground truth):
/** 
 * DataProviderBuilder constructor.
 * @param conn the connection
 * @param driver the JDBC driver
 * @param databaseUrl the database connection string (must not be null)
 * @param driverProperties the properties passed to the driver (could be null)
 * @throws SQLException
 */
public DataProviderBuilder(Connection conn,Driver driver,String databaseUrl,Properties driverProperties) throws SQLException {
  super(conn);
  this.dataProvider=DatabaseContentRetriever.getDataProvider(driver,databaseUrl,driverProperties);
  String identifierQuote=ConnectionUtils.getConnectionMetadata(conn).getIdentifierQuoteString();
  DataProviderHelper.setIdentifierQuoteString(identifierQuote,dataProvider);
}
Program: 139772
Project: 139772
Buggy source:
public List<ForeignKey> getForeignKeys(String catalogName,String schemaPattern,String tableName) throws SQLException {
  List<ForeignKey> pks=new ArrayList<ForeignKey>();
  String driverName=connection.getMetaData().getDriverName();
  String dbLanguage=SupportDBUrlType.SQLITE3DEFAULTURL.getLanguage();
  if (!driverName.toLowerCase().contains(dbLanguage.toLowerCase())) {
    ResultSet foreignKeys=connection.getMetaData().getImportedKeys(catalogName,schemaPattern,tableName);
    try {
      while (foreignKeys.next()) {
        ForeignKey pk=createForeignKey(foreignKeys);
        pks.add(pk);
      }
    }
 catch (    SQLException e) {
      throw e;
    }
 finally {
      foreignKeys.close();
    }
  }
  return pks;
}

Fixed version (ground truth):
public List<ForeignKey> getForeignKeys(String catalogName,String schemaPattern,String tableName) throws SQLException {
  List<ForeignKey> pks=new ArrayList<ForeignKey>();
  String driverName=ConnectionUtils.getConnectionMetadata(connection).getDriverName();
  String dbLanguage=SupportDBUrlType.SQLITE3DEFAULTURL.getLanguage();
  if (!driverName.toLowerCase().contains(dbLanguage.toLowerCase())) {
    ResultSet foreignKeys=ConnectionUtils.getConnectionMetadata(connection).getImportedKeys(catalogName,schemaPattern,tableName);
    try {
      while (foreignKeys.next()) {
        ForeignKey pk=createForeignKey(foreignKeys);
        pks.add(pk);
      }
    }
 catch (    SQLException e) {
      throw e;
    }
 finally {
      foreignKeys.close();
    }
  }
  return pks;
}
Program: 139773
Project: 139773
Buggy source:
/** 
 * DOC scorreia Comment method "getPrimaryKeys".
 * @param catalogName
 * @param schemaPattern
 * @param table
 * @throws SQLException
 */
public List<PrimaryKey> getPrimaryKeys(String catalogName,String schemaPattern,String tableName) throws SQLException {
  List<PrimaryKey> pks=new ArrayList<PrimaryKey>();
  ResultSet primaryKeys=connection.getMetaData().getPrimaryKeys(catalogName,schemaPattern,tableName);
  try {
    while (primaryKeys.next()) {
      PrimaryKey pk=createPrimaryKey(primaryKeys);
      pks.add(pk);
    }
  }
 catch (  SQLException e) {
    throw e;
  }
 finally {
    primaryKeys.close();
  }
  return pks;
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "getPrimaryKeys".
 * @param catalogName
 * @param schemaPattern
 * @param table
 * @throws SQLException
 */
public List<PrimaryKey> getPrimaryKeys(String catalogName,String schemaPattern,String tableName) throws SQLException {
  List<PrimaryKey> pks=new ArrayList<PrimaryKey>();
  ResultSet primaryKeys=ConnectionUtils.getConnectionMetadata(connection).getPrimaryKeys(catalogName,schemaPattern,tableName);
  try {
    while (primaryKeys.next()) {
      PrimaryKey pk=createPrimaryKey(primaryKeys);
      pks.add(pk);
    }
  }
 catch (  SQLException e) {
    throw e;
  }
 finally {
    primaryKeys.close();
  }
  return pks;
}
Program: 139776
Project: 139776
Buggy source:
public Object[] getElements(Object inputElement){
  if (inputElement instanceof Package) {
    EObject eObj=(EObject)inputElement;
    Package pckg=SwitchHelpers.PACKAGE_SWITCH.doSwitch(eObj);
    if (pckg != null) {
      Catalog catalog=SwitchHelpers.CATALOG_SWITCH.doSwitch(pckg);
      Schema schema=SwitchHelpers.SCHEMA_SWITCH.doSwitch(pckg);
      List<TdTable> temp=PackageHelper.getTables(pckg);
      TdTable[] tables=temp.toArray(new TdTable[temp.size()]);
      if (tables.length <= 0) {
        TdDataProvider provider=DataProviderHelper.getTdDataProvider(pckg);
        if (provider == null) {
          return null;
        }
        try {
          List<TdTable> tableList=null;
          if (catalog != null) {
            tableList=DqRepositoryViewService.getTables(provider,catalog,null,true);
          }
          if (schema != null) {
            tableList=DqRepositoryViewService.getTables(provider,schema,null,true);
          }
          tables=tableList.toArray(new TdTable[tableList.size()]);
        }
 catch (        TalendException e) {
          MessageBoxExceptionHandler.process(e);
        }
        PrvResourceFileHelper.getInstance().save(provider);
      }
      return sort(tables,ComparatorsFactory.MODELELEMENT_COMPARATOR_ID);
    }
  }
  return null;
}

Fixed version (ground truth):
public Object[] getElements(Object inputElement){
  if (inputElement instanceof Package) {
    EObject eObj=(EObject)inputElement;
    Package pckg=SwitchHelpers.PACKAGE_SWITCH.doSwitch(eObj);
    if (pckg != null) {
      Catalog catalog=SwitchHelpers.CATALOG_SWITCH.doSwitch(pckg);
      Schema schema=SwitchHelpers.SCHEMA_SWITCH.doSwitch(pckg);
      List<TdTable> temp=PackageHelper.getTables(pckg);
      TdTable[] tables=temp.toArray(new TdTable[temp.size()]);
      if (tables.length <= 0) {
        TdDataProvider provider=DataProviderHelper.getTdDataProvider(pckg);
        if (provider == null) {
          return null;
        }
        try {
          List<TdTable> tableList=null;
          if (catalog != null) {
            tableList=DqRepositoryViewService.getTables(provider,catalog,null,true);
          }
          if (schema != null) {
            tableList=DqRepositoryViewService.getTables(provider,schema,null,true);
          }
          tables=tableList.toArray(new TdTable[tableList.size()]);
          pckg.getOwnedElement().addAll(tableList);
        }
 catch (        TalendException e) {
          MessageBoxExceptionHandler.process(e);
        }
        PrvResourceFileHelper.getInstance().save(provider);
      }
      return sort(tables,ComparatorsFactory.MODELELEMENT_COMPARATOR_ID);
    }
  }
  return null;
}
Program: 139777
Project: 139777
Buggy source:
/** 
 * DOC bZhou Comment method "createEcosComponent".
 * @param component
 */
private void createEcosComponent(IEcosComponent component){
  newLabelAndText(gContainer,"String_Node_Str",component.getName());
  newLabelAndText(gContainer,"String_Node_Str",component.getAuthor());
  newLabelAndText(gContainer,"String_Node_Str",component.getDescription());
  newLabelAndText(gContainer,"String_Node_Str",ExpressionType.get(Integer.parseInt(component.getCategry())).getLiteral());
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "createEcosComponent".
 * @param component
 */
private void createEcosComponent(IEcosComponent component){
  newLabelAndText(gContainer,"String_Node_Str",component.getName());
  newLabelAndText(gContainer,"String_Node_Str",component.getAuthor());
  newLabelAndText(gContainer,"String_Node_Str",component.getDescription());
  ExpressionType expressionType=ExpressionType.get(Integer.parseInt(component.getCategry()));
  String type="String_Node_Str";
  if (expressionType != null) {
    type=expressionType.getLiteral();
  }
  newLabelAndText(gContainer,"String_Node_Str",type);
}
Program: 139778
Project: 139778
Buggy source:
@Override public boolean performFinish(){
  String targetFile=page.getTargetFile();
  Object[] elements=page.getSelectedPatternsTree().getCheckedElements();
  List<Pattern> seletedPatterns=new ArrayList<Pattern>();
  for (  Object element : elements) {
    if (element instanceof IFile) {
      IFile file=(IFile)element;
      if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
        seletedPatterns.add(PatternResourceFileHelper.getInstance().findPattern(file));
      }
    }
  }
  File file=new File(targetFile);
  if (!file.exists()) {
    MessageDialog.openError(getShell(),"String_Node_Str","String_Node_Str");
    return false;
  }
  boolean isContinue=true;
  if (file.exists() && !isForExchange) {
    isContinue=MessageDialogWithToggle.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
  }
  if (isContinue) {
    ExportFactory.export(file,folder,seletedPatterns.toArray(new Pattern[seletedPatterns.size()]));
    if (isForExchange && file.isDirectory()) {
      for (      File patternFile : file.listFiles()) {
        try {
          FilesUtils.zip(patternFile,patternFile.getPath() + "String_Node_Str");
          patternFile.delete();
        }
 catch (        Exception e) {
          log.error(e.getMessage(),e);
        }
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  String targetFile=page.getTargetFile();
  Object[] elements=page.getSelectedPatternsTree().getCheckedElements();
  List<Pattern> seletedPatterns=new ArrayList<Pattern>();
  for (  Object element : elements) {
    if (element instanceof IFile) {
      IFile file=(IFile)element;
      if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
        seletedPatterns.add(PatternResourceFileHelper.getInstance().findPattern(file));
      }
    }
  }
  File file=new File(targetFile);
  if (!file.exists()) {
    MessageDialog.openError(getShell(),"String_Node_Str","String_Node_Str");
    return false;
  }
  boolean isContinue=true;
  if (file.exists() && !isForExchange) {
    isContinue=MessageDialogWithToggle.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
  }
  if (isContinue) {
    ExportFactory.export(file,folder,seletedPatterns.toArray(new Pattern[seletedPatterns.size()]));
    if (isForExchange && file.isDirectory()) {
      for (Iterator iterator=seletedPatterns.iterator(); iterator.hasNext(); ) {
        Pattern pattern=(Pattern)iterator.next();
        File patternFile=new File(file,pattern.getName() + "String_Node_Str");
        if (patternFile.isFile() && patternFile.exists()) {
          try {
            FilesUtils.zip(patternFile,patternFile.getPath() + "String_Node_Str");
            patternFile.delete();
          }
 catch (          Exception e) {
            log.error(e.getMessage(),e);
          }
        }
      }
    }
    return true;
  }
  return false;
}
Program: 139779
Project: 139779
Buggy source:
@Override public boolean performFinish(){
  String targetFile=page.getTargetFile();
  Object[] elements=page.getSelectedPatternsTree().getCheckedElements();
  List<Pattern> seletedPatterns=new ArrayList<Pattern>();
  for (  Object element : elements) {
    if (element instanceof IFile) {
      IFile file=(IFile)element;
      if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
        seletedPatterns.add(PatternResourceFileHelper.getInstance().findPattern(file));
      }
    }
  }
  File file=new File(targetFile);
  boolean isContinue=true;
  if (file.exists() && !isForExchange) {
    isContinue=MessageDialogWithToggle.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
  }
  if (isContinue) {
    ExportFactory.export(file,folder,seletedPatterns.toArray(new Pattern[seletedPatterns.size()]));
    if (isForExchange && file.isDirectory()) {
      for (      File patternFile : file.listFiles()) {
        try {
          FilesUtils.zip(patternFile,patternFile.getPath() + "String_Node_Str");
          patternFile.delete();
        }
 catch (        Exception e) {
          log.error(e.getMessage(),e);
        }
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  String targetFile=page.getTargetFile();
  Object[] elements=page.getSelectedPatternsTree().getCheckedElements();
  List<Pattern> seletedPatterns=new ArrayList<Pattern>();
  for (  Object element : elements) {
    if (element instanceof IFile) {
      IFile file=(IFile)element;
      if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
        seletedPatterns.add(PatternResourceFileHelper.getInstance().findPattern(file));
      }
    }
  }
  File file=new File(targetFile);
  if (!file.exists()) {
    MessageDialog.openError(getShell(),"String_Node_Str","String_Node_Str");
    return false;
  }
  boolean isContinue=true;
  if (file.exists() && !isForExchange) {
    isContinue=MessageDialogWithToggle.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
  }
  if (isContinue) {
    ExportFactory.export(file,folder,seletedPatterns.toArray(new Pattern[seletedPatterns.size()]));
    if (isForExchange && file.isDirectory()) {
      for (      File patternFile : file.listFiles()) {
        try {
          FilesUtils.zip(patternFile,patternFile.getPath() + "String_Node_Str");
          patternFile.delete();
        }
 catch (        Exception e) {
          log.error(e.getMessage(),e);
        }
      }
    }
    return true;
  }
  return false;
}
Program: 139780
Project: 139780
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public String getRange(){
  if (upperValue != null && lowerValue != null) {
    double range=upperValue.getRealValue() - lowerValue.getRealValue();
    return String.valueOf(range);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public String getRange(){
  if (upperValue != null && lowerValue != null) {
    Double upper=upperValue.getRealValue();
    Double lower=lowerValue.getRealValue();
    if (upper != null && lower != null) {
      double range=upper - lower;
      return String.valueOf(range);
    }
  }
  return null;
}
Program: 139781
Project: 139781
Buggy source:
/** 
 * DOC scorreia Comment method "executeQuery".
 * @param indicator
 * @param connection
 * @param query
 * @return
 * @throws AnalysisExecutionException
 */
private boolean executeQuery(Indicator indicator,Connection connection,Expression query) throws AnalysisExecutionException {
  try {
    List<Object[]> myResultSet=executeQuery(catalogOrSchema,connection,query.getBody());
    String tableName=getAnalyzedTable(indicator);
    final String stringDataFilter=AnalysisHelper.getStringDataFilter(this.cachedAnalysis);
    List<String> whereClauses=new ArrayList<String>();
    if (stringDataFilter != null) {
      whereClauses.add(stringDataFilter);
    }
    boolean ok=indicator.storeSqlResults(myResultSet);
    Long count=getCount(cachedAnalysis,"String_Node_Str",tableName,catalogOrSchema,whereClauses);
    ok=ok && count != null;
    indicator.setCount(count);
    if (ColumnsetPackage.eINSTANCE.getRowMatchingIndicator().equals(indicator.eClass())) {
      RowMatchingIndicator rowMatchingIndicator=(RowMatchingIndicator)indicator;
      Long notMatchingValueCount=rowMatchingIndicator.getNotMatchingValueCount();
      ok=ok && notMatchingValueCount != null;
      if (ok) {
        rowMatchingIndicator.setMatchingValueCount(count - notMatchingValueCount);
      }
    }
    return ok;
  }
 catch (  SQLException e) {
    log.error(e,e);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "executeQuery".
 * @param indicator
 * @param connection
 * @param query
 * @return
 * @throws AnalysisExecutionException
 */
private boolean executeQuery(Indicator indicator,Connection connection,Expression query) throws AnalysisExecutionException {
  try {
    List<Object[]> myResultSet=executeQuery(catalogOrSchema,connection,query.getBody());
    String tableName=getAnalyzedTable(indicator);
    boolean reversion=STATIC_COUNT % 2 == 0 ? true : false;
    STATIC_COUNT++;
    final String stringDataFilter=reversion ? AnalysisHelper.getStringDataFilter(this.cachedAnalysis,AnalysisHelper.DATA_FILTER_B) : AnalysisHelper.getStringDataFilter(this.cachedAnalysis,AnalysisHelper.DATA_FILTER_A);
    List<String> whereClauses=new ArrayList<String>();
    if (stringDataFilter != null && !stringDataFilter.trim().equals("String_Node_Str")) {
      whereClauses.add(stringDataFilter);
    }
    boolean ok=indicator.storeSqlResults(myResultSet);
    Long count=getCount(cachedAnalysis,"String_Node_Str",tableName,catalogOrSchema,whereClauses);
    ok=ok && count != null;
    indicator.setCount(count);
    if (ColumnsetPackage.eINSTANCE.getRowMatchingIndicator().equals(indicator.eClass())) {
      RowMatchingIndicator rowMatchingIndicator=(RowMatchingIndicator)indicator;
      Long notMatchingValueCount=rowMatchingIndicator.getNotMatchingValueCount();
      ok=ok && notMatchingValueCount != null;
      if (ok) {
        rowMatchingIndicator.setMatchingValueCount(count - notMatchingValueCount);
      }
    }
    return ok;
  }
 catch (  SQLException e) {
    log.error(e,e);
    return false;
  }
}
Program: 139782
Project: 139782
Buggy source:
/** 
 * DOC scorreia Comment method "createInstantiatedSqlExpression".
 * @param sqlGenericExpression
 * @param columnSetA
 * @param columnSetB
 * @param useNulls
 * @return
 */
private Expression createInstantiatedSqlExpression(Expression sqlGenericExpression,EList<Column> columnSetA,EList<Column> columnSetB,boolean useNulls){
  String aliasA="String_Node_Str";
  String aliasB="String_Node_Str";
  String tableNameA=getTableName(columnSetA) + "String_Node_Str" + aliasA;
  String tableNameB=getTableName(columnSetB) + "String_Node_Str" + aliasB;
  String genericSQL=sqlGenericExpression.getBody();
  String joinClause=createJoinClause(aliasA,columnSetA,aliasB,columnSetB,useNulls);
  String whereClause=createWhereClause(aliasB,columnSetB);
  if (useNulls) {
    whereClause+=dbms().and() + '(' + createNotNullCondition(aliasA,columnSetA)+ ')';
  }
  String instantiatedSQL=dbms().fillGenericQueryWithJoin(genericSQL,tableNameA,tableNameB,joinClause,whereClause);
  Expression instantiatedExpression=CoreFactory.eINSTANCE.createExpression();
  instantiatedExpression.setLanguage(sqlGenericExpression.getLanguage());
  instantiatedExpression.setBody(instantiatedSQL);
  return instantiatedExpression;
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "createInstantiatedSqlExpression".
 * @param sqlGenericExpression
 * @param columnSetA
 * @param columnSetB
 * @param useNulls
 * @return
 */
private Expression createInstantiatedSqlExpression(Expression sqlGenericExpression,EList<Column> columnSetA,EList<Column> columnSetB,boolean useNulls){
  String aliasA="String_Node_Str";
  String aliasB="String_Node_Str";
  boolean reversion=STATIC_COUNT % 2 == 0 ? true : false;
  STATIC_COUNT++;
  String dataFilterA=AnalysisHelper.getStringDataFilter(this.cachedAnalysis,AnalysisHelper.DATA_FILTER_A);
  String dataFilterB=AnalysisHelper.getStringDataFilter(this.cachedAnalysis,AnalysisHelper.DATA_FILTER_B);
  if (reversion) {
    dataFilterA=AnalysisHelper.getStringDataFilter(this.cachedAnalysis,AnalysisHelper.DATA_FILTER_B);
    dataFilterB=AnalysisHelper.getStringDataFilter(this.cachedAnalysis,AnalysisHelper.DATA_FILTER_A);
  }
  String tableNameA=addDataFilterWithTableName(getTableName(columnSetA),dataFilterA) + "String_Node_Str" + aliasA;
  String tableNameB=addDataFilterWithTableName(getTableName(columnSetB),dataFilterB) + "String_Node_Str" + aliasB;
  String genericSQL=sqlGenericExpression.getBody();
  String joinClause=createJoinClause(aliasA,columnSetA,aliasB,columnSetB,useNulls);
  String whereClause=createWhereClause(aliasB,columnSetB);
  if (useNulls) {
    whereClause+=dbms().and() + '(' + createNotNullCondition(aliasA,columnSetA)+ ')';
  }
  String instantiatedSQL=dbms().fillGenericQueryWithJoin(genericSQL,tableNameA,tableNameB,joinClause,whereClause);
  Expression instantiatedExpression=CoreFactory.eINSTANCE.createExpression();
  instantiatedExpression.setLanguage(sqlGenericExpression.getLanguage());
  instantiatedExpression.setBody(instantiatedSQL);
  return instantiatedExpression;
}
Program: 139783
Project: 139783
Buggy source:
protected void firePropertyChange(final int propertyId){
  if (masterPage.isActive()) {
    setRunActionButtonState(!isDirty() && masterPage.canRun().isOk());
  }
  super.firePropertyChange(propertyId);
}

Fixed version (ground truth):
protected void firePropertyChange(final int propertyId){
  if (masterPage.isActive()) {
    setRunActionButtonState(true);
  }
  super.firePropertyChange(propertyId);
}
Program: 139784
Project: 139784
Buggy source:
@Override protected void pageChange(int newPageIndex){
  super.pageChange(newPageIndex);
  if (masterPage.isDirty() && (newPageIndex == RESULT_PAGE_INDEX)) {
    masterPage.doSave(null);
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof ColumnAnalysisResultPage) {
    ((ColumnAnalysisResultPage)resultPage).refresh((ColumnMasterDetailsPage)masterPage);
    isRefreshResultPage=false;
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof ColumnCorrelationNominalIntervalResultPage) {
    ((ColumnCorrelationNominalIntervalResultPage)resultPage).refresh((ColumnCorrelationNominalAndIntervalMasterPage)masterPage);
    isRefreshResultPage=false;
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof ColumnsComparisonAnalysisResultPage) {
    ((ColumnsComparisonAnalysisResultPage)resultPage).refresh((ColumnsComparisonMasterDetailsPage)masterPage);
    isRefreshResultPage=false;
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof TableAnalysisResultPage) {
    ((TableAnalysisResultPage)resultPage).refresh((TableMasterDetailsPage)masterPage);
    isRefreshResultPage=false;
  }
  if (masterPage != null) {
    setRunActionButtonState(masterPage.canRun().isOk());
  }
}

Fixed version (ground truth):
@Override protected void pageChange(int newPageIndex){
  super.pageChange(newPageIndex);
  if (masterPage.isDirty() && (newPageIndex == RESULT_PAGE_INDEX)) {
    masterPage.doSave(null);
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof ColumnAnalysisResultPage) {
    ((ColumnAnalysisResultPage)resultPage).refresh((ColumnMasterDetailsPage)masterPage);
    isRefreshResultPage=false;
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof ColumnCorrelationNominalIntervalResultPage) {
    ((ColumnCorrelationNominalIntervalResultPage)resultPage).refresh((ColumnCorrelationNominalAndIntervalMasterPage)masterPage);
    isRefreshResultPage=false;
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof ColumnsComparisonAnalysisResultPage) {
    ((ColumnsComparisonAnalysisResultPage)resultPage).refresh((ColumnsComparisonMasterDetailsPage)masterPage);
    isRefreshResultPage=false;
  }
  if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof TableAnalysisResultPage) {
    ((TableAnalysisResultPage)resultPage).refresh((TableMasterDetailsPage)masterPage);
    isRefreshResultPage=false;
  }
  if (masterPage != null) {
    setRunActionButtonState(true);
  }
}
Program: 139785
Project: 139785
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Column> getNumericColumns(){
  EList<Column> computedColumns=new BasicEList<Column>();
  for (  Column column : analyzedColumns) {
    final TdColumn tdColumn=SwitchHelpers.COLUMN_SWITCH.doSwitch(column);
    final DataminingType dmType=MetadataHelper.getDataminingType(tdColumn);
    if (DataminingType.INTERVAL.equals(dmType) && Java2SqlType.isNumbericInSQL(tdColumn.getJavaType())) {
      computedColumns.add(tdColumn);
    }
  }
  return computedColumns;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Column> getNumericColumns(){
  EList<Column> computedColumns=new BasicEList<Column>();
  if (analyzedColumns != null) {
    for (    Column column : analyzedColumns) {
      final TdColumn tdColumn=SwitchHelpers.COLUMN_SWITCH.doSwitch(column);
      final DataminingType dmType=MetadataHelper.getDataminingType(tdColumn);
      if (DataminingType.INTERVAL.equals(dmType) && Java2SqlType.isNumbericInSQL(tdColumn.getJavaType())) {
        computedColumns.add(tdColumn);
      }
    }
  }
  return computedColumns;
}
Program: 139786
Project: 139786
Buggy source:
private void fillDbUrlMap(){
  supportDBUrlMap.put(SupportDBUrlType.MYSQLDEFAULTURL.getDBKey(),SupportDBUrlType.MYSQLDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.ORACLEWITHSIDDEFAULTURL.getDBKey(),SupportDBUrlType.ORACLEWITHSIDDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.ORACLEWITHSERVICENAMEDEFAULTURL.getDBKey(),SupportDBUrlType.ORACLEWITHSERVICENAMEDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.MSSQLDEFAULTURL.getDBKey(),SupportDBUrlType.MSSQLDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.DB2DEFAULTURL.getDBKey(),SupportDBUrlType.DB2DEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.POSTGRESQLEFAULTURL.getDBKey(),SupportDBUrlType.POSTGRESQLEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.SYBASEDEFAULTURL.getDBKey(),SupportDBUrlType.SYBASEDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.INGRESDEFAULTURL.getDBKey(),SupportDBUrlType.INGRESDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.INFORMIXDEFAULTURL.getDBKey(),SupportDBUrlType.INFORMIXDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.SQLITE3DEFAULTURL.getDBKey(),SupportDBUrlType.SQLITE3DEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.GENERICJDBCDEFAULTURL.getDBKey(),SupportDBUrlType.GENERICJDBCDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.TERADATADEFAULTURL.getDBKey(),SupportDBUrlType.TERADATADEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.AS400DEFAULTURL.getDBKey(),SupportDBUrlType.AS400DEFAULTURL);
}

Fixed version (ground truth):
private void fillDbUrlMap(){
  supportDBUrlMap.put(SupportDBUrlType.ODBCDEFAULTURL.getDBKey(),SupportDBUrlType.ODBCDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.MYSQLDEFAULTURL.getDBKey(),SupportDBUrlType.MYSQLDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.ORACLEWITHSIDDEFAULTURL.getDBKey(),SupportDBUrlType.ORACLEWITHSIDDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.ORACLEWITHSERVICENAMEDEFAULTURL.getDBKey(),SupportDBUrlType.ORACLEWITHSERVICENAMEDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.MSSQLDEFAULTURL.getDBKey(),SupportDBUrlType.MSSQLDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.DB2DEFAULTURL.getDBKey(),SupportDBUrlType.DB2DEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.POSTGRESQLEFAULTURL.getDBKey(),SupportDBUrlType.POSTGRESQLEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.SYBASEDEFAULTURL.getDBKey(),SupportDBUrlType.SYBASEDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.INGRESDEFAULTURL.getDBKey(),SupportDBUrlType.INGRESDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.INFORMIXDEFAULTURL.getDBKey(),SupportDBUrlType.INFORMIXDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.SQLITE3DEFAULTURL.getDBKey(),SupportDBUrlType.SQLITE3DEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.GENERICJDBCDEFAULTURL.getDBKey(),SupportDBUrlType.GENERICJDBCDEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.TERADATADEFAULTURL.getDBKey(),SupportDBUrlType.TERADATADEFAULTURL);
  supportDBUrlMap.put(SupportDBUrlType.AS400DEFAULTURL.getDBKey(),SupportDBUrlType.AS400DEFAULTURL);
}
Program: 139787
Project: 139787
Buggy source:
@Override protected void handleUpdateElement(UpdateAttribute updateAttribute){
  EObject leftElement=updateAttribute.getLeftElement();
  TdColumn columnSetSwitchLeft=SwitchHelpers.COLUMN_SWITCH.doSwitch(leftElement);
  EObject rightElement=updateAttribute.getRightElement();
  TdColumn columnSetSwitchRight=SwitchHelpers.COLUMN_SWITCH.doSwitch(rightElement);
  if (columnSetSwitchLeft != null && columnSetSwitchRight != null) {
    ColumnSet columnSet=(ColumnSet)selectedObj;
    ColumnSetHelper.removeColumn(columnSetSwitchLeft,columnSet);
    ColumnSetHelper.addColumn(columnSetSwitchRight,columnSet);
  }
}

Fixed version (ground truth):
@Override protected void handleUpdateElement(UpdateAttribute updateAttribute){
  EObject leftElement=updateAttribute.getLeftElement();
  TdColumn columnSetSwitchLeft=SwitchHelpers.COLUMN_SWITCH.doSwitch(leftElement);
  if (columnSetSwitchLeft == null) {
    columnSetSwitchLeft=(TdColumn)leftElement.eContainer();
  }
  EObject rightElement=updateAttribute.getRightElement();
  TdColumn columnSetSwitchRight=SwitchHelpers.COLUMN_SWITCH.doSwitch(rightElement);
  if (columnSetSwitchRight == null) {
    columnSetSwitchRight=(TdColumn)rightElement.eContainer();
  }
  if (columnSetSwitchLeft != null && columnSetSwitchRight != null) {
    ColumnSet columnSet=(ColumnSet)selectedObj;
    ColumnSetHelper.removeColumn(columnSetSwitchLeft,columnSet);
    ColumnSetHelper.addColumn(columnSetSwitchRight,columnSet);
  }
}
Program: 139789
Project: 139789
Buggy source:
/** 
 * DOC scorreia Comment method "isGreater".
 * @param data
 * @return
 */
private boolean isGreater(Object data){
  throw new UnsupportedOperationException("String_Node_Str" + data);
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "isGreater".
 * @param data
 * @return
 */
private boolean isGreater(Object data){
  try {
    double thisValue=Double.valueOf(this.value);
    double dataValue=Double.valueOf(data.toString());
    return thisValue < dataValue;
  }
 catch (  Exception e) {
    return false;
  }
}
Program: 139790
Project: 139790
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public Double getMean(){
  Long c=getCount();
  if (c.compareTo(0L) == 0) {
    throw new RuntimeException("String_Node_Str");
  }
  Double sum=Double.valueOf(getSumStr());
  if (sum == null) {
    throw new RuntimeException("String_Node_Str");
  }
  return sum / c;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public Double getMean(){
  Long c=getCount();
  if (c.compareTo(0L) == 0) {
    throw new RuntimeException("String_Node_Str");
  }
  Double sum=null;
  try {
    sum=Double.valueOf(getSumStr());
  }
 catch (  Exception e) {
    sum=Double.valueOf(0);
  }
  if (sum == null) {
    throw new RuntimeException("String_Node_Str");
  }
  return sum / c;
}
Program: 139791
Project: 139791
Buggy source:
/** 
 * DOC scorreia Comment method "isLess".
 * @param data
 * @return
 */
private boolean isLess(Object data){
  throw new UnsupportedOperationException("String_Node_Str" + data);
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "isLess".
 * @param data
 * @return
 */
private boolean isLess(Object data){
  try {
    double thisValue=Double.valueOf(this.value);
    double dataValue=Double.valueOf(data.toString());
    return thisValue > dataValue;
  }
 catch (  Exception e) {
    return false;
  }
}
Program: 139792
Project: 139792
Buggy source:
@Override public boolean prepare(){
  final TextParameters textParameter=this.getParameters().getTextParameter();
  if (textParameter != null) {
    this.replacementChars=textParameter.getReplacementCharacters();
    this.charsToReplace=textParameter.getCharactersToReplace();
  }
  return super.prepare();
}

Fixed version (ground truth):
@Override public boolean prepare(){
  final TextParameters textParameter=this.getParameters() == null ? null : this.getParameters().getTextParameter();
  if (textParameter != null) {
    this.replacementChars=textParameter.getReplacementCharacters();
    this.charsToReplace=textParameter.getCharactersToReplace();
  }
  return super.prepare();
}
Program: 139793
Project: 139793
Buggy source:
@Override public boolean prepare(){
  final TextParameters textParameter=this.getParameters().getTextParameter();
  if (textParameter != null) {
    this.replacementChars=textParameter.getReplacementCharacters();
    this.charsToReplace=textParameter.getCharactersToReplace();
  }
  return super.prepare();
}

Fixed version (ground truth):
@Override public boolean prepare(){
  final TextParameters textParameter=this.getParameters() == null ? null : this.getParameters().getTextParameter();
  if (textParameter != null) {
    this.replacementChars=textParameter.getReplacementCharacters();
    this.charsToReplace=textParameter.getCharactersToReplace();
  }
  return super.prepare();
}
Program: 139794
Project: 139794
Buggy source:
@Override public Double getRealValue(){
  if (IndicatorValueType.REAL_VALUE.equals(this.getValueType())) {
    return Double.valueOf(value);
  }
  return null;
}

Fixed version (ground truth):
@Override public Double getRealValue(){
  if (IndicatorValueType.REAL_VALUE.equals(this.getValueType())) {
    return value == null ? null : Double.valueOf(value);
  }
  return null;
}
Program: 139796
Project: 139796
Buggy source:
public void setSessionSelectionNode(MetaDataSession metadataSession,ISelection selection){
  sessionSelectionMap.put(metadataSession,selection);
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "setSessionSelectionNode".
 * @param metadataSession
 * @param selection
 */
public void setSessionSelectionNode(MetaDataSession metadataSession,ISelection selection){
  sessionSelectionMap.put(metadataSession,selection);
  try {
    addSession(metadataSession);
  }
 catch (  SQLCannotConnectException e) {
    e.printStackTrace();
  }
}
Program: 139798
Project: 139798
Buggy source:
@Override protected void createFormContent(IManagedForm managedForm){
  this.form=managedForm.getForm();
  Composite body=form.getBody();
  body.setLayout(new GridLayout());
  final SashForm sForm=new SashForm(body,SWT.NULL);
  sForm.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp=toolkit.createComposite(sForm);
  topComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp.setLayout(new GridLayout());
  metadataSection=creatMetadataSection(form,topComp);
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  createAnalysisColumnsSection(form,topComp);
  createDataFilterSection(form,topComp);
  setSaveButton(createSaveButton(topComp));
  if (false) {
    createAnalysisParamSection(form,topComp);
  }
  Composite previewComp=toolkit.createComposite(sForm);
  previewComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  previewComp.setLayout(new GridLayout());
  previewComp.addControlListener(new ControlAdapter(){
    @Override public void controlResized(    ControlEvent e){
      super.controlResized(e);
      sForm.redraw();
      form.reflow(true);
    }
  }
);
  createPreviewSection(form,previewComp);
  foldingSections(new Section[]{metadataSection,analysisColumnSection,dataFilterSection});
  currentEditor.registerSections(new Section[]{analysisColumnSection,metadataSection,dataFilterSection,analysisParamSection,previewSection});
}

Fixed version (ground truth):
@Override protected void createFormContent(IManagedForm managedForm){
  this.form=managedForm.getForm();
  Composite body=form.getBody();
  body.setLayout(new GridLayout());
  final SashForm sForm=new SashForm(body,SWT.NULL);
  sForm.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp=toolkit.createComposite(sForm);
  topComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  topComp.setLayout(new GridLayout());
  metadataSection=creatMetadataSection(form,topComp);
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  createAnalysisColumnsSection(form,topComp);
  createDataFilterSection(form,topComp);
  createAnalysisParamSection(form,topComp);
  setSaveButton(createSaveButton(topComp));
  Composite previewComp=toolkit.createComposite(sForm);
  previewComp.setLayoutData(new GridData(GridData.FILL_BOTH));
  previewComp.setLayout(new GridLayout());
  previewComp.addControlListener(new ControlAdapter(){
    @Override public void controlResized(    ControlEvent e){
      super.controlResized(e);
      sForm.redraw();
      form.reflow(true);
    }
  }
);
  createPreviewSection(form,previewComp);
  foldingSections(new Section[]{metadataSection,analysisColumnSection,dataFilterSection});
  currentEditor.registerSections(new Section[]{analysisColumnSection,metadataSection,dataFilterSection,analysisParamSection,previewSection});
}
Program: 139799
Project: 139799
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT getDistinctCount(Object dataValue)
 */
public Long getDistinctCount(Object dataValue){
  Long freq=this.valueToDistinctFreq.get(dataValue);
  return (freq == null) ? 0L : freq;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT getDistinctCount(Object dataValue)
 */
public Long getDistinctCount(Object dataValue){
  Long freq=this.valueToDistinctFreq == null ? null : this.valueToDistinctFreq.get(dataValue);
  return (freq == null) ? 0L : freq;
}
Program: 139800
Project: 139800
Buggy source:
public RunAnalysisAction(IRuningStatusListener listener){
  this();
  this.listener=listener;
}

Fixed version (ground truth):
public RunAnalysisAction(){
  super(DefaultMessagesImpl.getString("String_Node_Str"));
  setImageDescriptor(ImageLib.getImageDescriptor(ImageLib.REFRESH_IMAGE));
}
Program: 139802
Project: 139802
Buggy source:
public void refresh(ColumnMasterDetailsPage masterPage){
  this.masterPage=masterPage;
  this.summaryComp.dispose();
  this.resultComp.dispose();
  createFormContent(getManagedForm());
}

Fixed version (ground truth):
@Override public void refresh(AbstractAnalysisMetadataPage masterPage){
  this.masterPage=(ColumnMasterDetailsPage)masterPage;
  this.summaryComp.dispose();
  this.resultComp.dispose();
  createFormContent(getManagedForm());
}
Program: 139803
Project: 139803
Buggy source:
public void linkActivated(HyperlinkEvent e){
  for (  Control control : chartComposite.getChildren()) {
    control.dispose();
  }
  boolean analysisStatue=analysis.getResults().getResultMetadata() != null && analysis.getResults().getResultMetadata().getExecutionDate() != null;
  if (!analysisStatue) {
    boolean returnCode=MessageDialog.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
    if (returnCode) {
      new RunAnalysisAction(ColumnCorrelationNominalAndIntervalMasterPage.this).run();
      message.setVisible(false);
    }
 else {
      createPreviewCharts(form,chartComposite,false);
      message.setText(DefaultMessagesImpl.getString("String_Node_Str"));
      message.setVisible(true);
    }
  }
 else {
    createPreviewCharts(form,chartComposite,true);
  }
  chartComposite.layout();
  form.reflow(true);
}

Fixed version (ground truth):
public void linkActivated(HyperlinkEvent e){
  for (  Control control : chartComposite.getChildren()) {
    control.dispose();
  }
  boolean analysisStatue=analysis.getResults().getResultMetadata() != null && analysis.getResults().getResultMetadata().getExecutionDate() != null;
  if (!analysisStatue) {
    boolean returnCode=MessageDialog.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
    if (returnCode) {
      new RunAnalysisAction().run();
      message.setVisible(false);
    }
 else {
      createPreviewCharts(form,chartComposite,false);
      message.setText(DefaultMessagesImpl.getString("String_Node_Str"));
      message.setVisible(true);
    }
  }
 else {
    createPreviewCharts(form,chartComposite,true);
  }
  chartComposite.layout();
  form.reflow(true);
}
Program: 139805
Project: 139805
Buggy source:
public void refresh(ColumnCorrelationNominalAndIntervalMasterPage masterPage){
  this.masterPage=masterPage;
  this.summaryComp.dispose();
  this.graphicsAndTableComp.dispose();
  createFormContent(getManagedForm());
}

Fixed version (ground truth):
@Override public void refresh(AbstractAnalysisMetadataPage masterPage){
  this.masterPage=(ColumnCorrelationNominalAndIntervalMasterPage)masterPage;
  this.summaryComp.dispose();
  this.graphicsAndTableComp.dispose();
  createFormContent(getManagedForm());
}
Program: 139806
Project: 139806
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void run(){
  if (openStandardAnalysisDialog(AnalysisType.COLUMN_CORRELATION) == Window.OK) {
    AnalysisEditor editor=(AnalysisEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    if (editor != null) {
      ColumnCorrelationNominalAndIntervalMasterPage page=(ColumnCorrelationNominalAndIntervalMasterPage)editor.getMasterPage();
      if (!this.selection.isEmpty()) {
        TdColumn[] columns=new TdColumn[selection.size()];
        Iterator it=this.selection.iterator();
        int i=0;
        while (it.hasNext()) {
          columns[i]=(TdColumn)it.next();
          i++;
        }
        page.getTreeViewer().setInput(columns);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void run(){
  hasDateColumn=false;
  hasNumberColumn=false;
  if (openStandardAnalysisDialog(AnalysisType.COLUMN_CORRELATION) == Window.OK) {
    AnalysisEditor editor=(AnalysisEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    if (editor != null) {
      ColumnCorrelationNominalAndIntervalMasterPage page=(ColumnCorrelationNominalAndIntervalMasterPage)editor.getMasterPage();
      if (!this.selection.isEmpty()) {
        TdColumn[] columns=new TdColumn[selection.size()];
        Iterator it=this.selection.iterator();
        int i=0;
        while (it.hasNext()) {
          columns[i]=(TdColumn)it.next();
          i++;
        }
        page.getTreeViewer().setInput(columns);
      }
    }
  }
}
Program: 139807
Project: 139807
Buggy source:
private int openStandardAnalysisDialog(AnalysisType type){
  AnalysisLabelParameter parameter=new AnalysisLabelParameter();
  if (isContainNumber()) {
    parameter.setCategoryLabel(AnalysisLabelParameter.NUMBERIC_CORRELATION);
  }
 else {
    parameter.setCategoryLabel(AnalysisLabelParameter.DATE_CORRELATION);
  }
  Wizard wizard=WizardFactory.createAnalysisWizard(type,parameter);
  wizard.setForcePreviousAndNextButtons(true);
  WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(500,340);
  return dialog.open();
}

Fixed version (ground truth):
private int openStandardAnalysisDialog(AnalysisType type){
  AnalysisLabelParameter parameter=new AnalysisLabelParameter();
  checkSelectedColumn();
  if (hasNumberColumn && hasDateColumn) {
    MessageUI.openError("String_Node_Str");
    return Window.CANCEL;
  }
 else   if (hasNumberColumn && !hasDateColumn) {
    parameter.setCategoryLabel(AnalysisLabelParameter.NUMBERIC_CORRELATION);
  }
 else   if (!hasNumberColumn && hasDateColumn) {
    parameter.setCategoryLabel(AnalysisLabelParameter.DATE_CORRELATION);
  }
 else {
    parameter.setCategoryLabel(AnalysisLabelParameter.NOMINAL_CORRELATION);
  }
  Wizard wizard=WizardFactory.createAnalysisWizard(type,parameter);
  wizard.setForcePreviousAndNextButtons(true);
  WizardDialog dialog=new WizardDialog(null,wizard);
  dialog.setPageSize(500,340);
  return dialog.open();
}
Program: 139808
Project: 139808
Buggy source:
/** 
 * Method "getCatalogName".
 * @param analyzedElement
 * @return the catalog or schema quoted name
 */
private String getCatalogOrSchemaName(ModelElement analyzedElement){
  Package schema=super.schemata.get(analyzedElement);
  if (schema == null) {
    log.error("String_Node_Str" + analyzedElement.getName());
    return null;
  }
  if (RelationalPackage.eINSTANCE.getTdSchema().equals(schema.eClass())) {
    final TdCatalog parentCatalog=CatalogHelper.getParentCatalog(schema);
    if (parentCatalog != null) {
      return parentCatalog.getName();
    }
  }
  return schema.getName();
}

Fixed version (ground truth):
/** 
 * Method "getCatalogName".
 * @param analyzedElement
 * @return the catalog or schema quoted name
 */
protected String getCatalogOrSchemaName(ModelElement analyzedElement){
  Package schema=super.schemata.get(analyzedElement);
  if (schema == null) {
    log.error("String_Node_Str" + analyzedElement.getName());
    return null;
  }
  if (RelationalPackage.eINSTANCE.getTdSchema().equals(schema.eClass())) {
    final TdCatalog parentCatalog=CatalogHelper.getParentCatalog(schema);
    if (parentCatalog != null) {
      return parentCatalog.getName();
    }
  }
  return schema.getName();
}
Program: 139809
Project: 139809
Buggy source:
/** 
 * DOC scorreia Comment method "getTableName".
 * @param columnSetA
 * @return
 */
private String getTableName(EList<Column> columnSetA){
  String tableName=null;
  for (  Column column : columnSetA) {
    ColumnSet columnSetOwner=ColumnHelper.getColumnSetOwner(column);
    if (columnSetOwner == null) {
      log.error("String_Node_Str" + column.getName() + "String_Node_Str");
      continue;
    }
 else {
      tableName=columnSetOwner.getName();
      Package pack=ColumnSetHelper.getParentCatalogOrSchema(columnSetOwner);
      if (pack == null) {
        log.error("String_Node_Str" + tableName);
        continue;
      }
      this.catalogOrSchema=pack.getName();
      break;
    }
  }
  return quote(tableName);
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "getTableName".
 * @param columnSetA
 * @return
 */
private String getTableName(EList<Column> columnSetA){
  String tableName=null;
  for (  Column column : columnSetA) {
    if (belongToSameSchemata((TdColumn)column)) {
      ColumnSet columnSetOwner=ColumnHelper.getColumnSetOwner(column);
      if (columnSetOwner == null) {
        log.error("String_Node_Str" + column.getName() + "String_Node_Str");
        continue;
      }
 else {
        tableName=columnSetOwner.getName();
        this.catalogOrSchema=getCatalogOrSchemaName(column);
        break;
      }
    }
  }
  return quote(tableName);
}
Program: 139811
Project: 139811
Buggy source:
public static int getPageSize(){
  try {
    return Integer.parseInt(ResourcesPlugin.getPlugin().getPluginPreferences().getString(PerformancePreferencePage.ANALYZED_ITEMS_PER_PAGE));
  }
 catch (  NumberFormatException e) {
    e.printStackTrace();
  }
  return PAGE_SIZE;
}

Fixed version (ground truth):
public static int getPageSize(){
  try {
    String defaultPageSize=ResourcesPlugin.getPlugin().getPluginPreferences().getString(PerformancePreferencePage.ANALYZED_ITEMS_PER_PAGE);
    if (!"String_Node_Str".equals(defaultPageSize)) {
      return Integer.parseInt(defaultPageSize);
    }
  }
 catch (  NumberFormatException e) {
    log.error(e,e);
  }
  return PAGE_SIZE;
}
Program: 139812
Project: 139812
Buggy source:
public static List<TdView> getViews(Catalog catalog){
  return ViewHelper.getViews(catalog.getOwnedElement());
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "getViews".
 * @param pack
 * @return
 */
public static List<TdView> getViews(Package pack){
  return ViewHelper.getViews(pack.getOwnedElement());
}