nus-yam/ex-repair huggingface dataset:
Program: 136898
Project: 136898
Buggy source:
/** 
 * Extract the name of regular Expression Function If current database type need to use UDF deal regular expression, the expresssion which will definition on "Regular Expression Matching.definition" should like below: "* + when REGULAR_FUNCTION(+ * +) + *". else this method will not return correct result which you want
 * @param expression
 * @return the name of regular Expression Function or null when the expression is invalid
 */
public String extractRegularExpressionFunction(Expression expression){
  String functionName=null;
  try {
    String tempString=splictExpression(expression);
    functionName=tempString.split("String_Node_Str").length > 1 ? tempString.split("String_Node_Str")[0] : "String_Node_Str";
    functionName=functionName.trim();
  }
 catch (  NullPointerException e) {
    log.error(e,e);
  }
  return functionName;
}

Fixed version (ground truth):
/** 
 * Extract the name of regular Expression Function If current database type need to use UDF deal regular expression, the expresssion which will definition on "Regular Expression Matching.definition" should like below: "* + when REGULAR_FUNCTION(+ * +) + *". else this method will not return correct result which you want
 * @param expression
 * @return the name of regular Expression Function or empty string when the expression is invalid
 * @exception If current language is not implement this method will thorw UnsupportedOperationException
 */
public String extractRegularExpressionFunction(Expression expression,String regexp){
  throw new UnsupportedOperationException();
}
Program: 136899
Project: 136899
Buggy source:
@Override public String extractRegularExpressionFunction(Expression expression){
  return getRegularExpressionFunction();
}

Fixed version (ground truth):
@Override public String extractRegularExpressionFunction(Expression expression,String regex){
  return getRegularExpressionFunction();
}
Program: 136900
Project: 136900
Buggy source:
@Override public String extractRegularExpressionFunction(Expression expression){
  return getRegularExpressionFunction();
}

Fixed version (ground truth):
@Override public String extractRegularExpressionFunction(Expression expression,String regex){
  return getRegularExpressionFunction();
}
Program: 136901
Project: 136901
Buggy source:
@Override public String extractRegularExpressionFunction(Expression expression){
  return getRegularExpressionFunction();
}

Fixed version (ground truth):
@Override public String extractRegularExpressionFunction(Expression expression,String regex){
  return getRegularExpressionFunction();
}
Program: 136902
Project: 136902
Buggy source:
@Override public String extractRegularExpressionFunction(Expression expression){
  return getRegularExpressionFunction();
}

Fixed version (ground truth):
@Override public String extractRegularExpressionFunction(Expression expression,String regex){
  return getRegularExpressionFunction();
}
Program: 136903
Project: 136903
Buggy source:
@Override public String extractRegularExpressionFunction(Expression expression){
  return getRegularExpressionFunction();
}

Fixed version (ground truth):
@Override public String extractRegularExpressionFunction(Expression expression,String regex){
  return getRegularExpressionFunction();
}
Program: 136904
Project: 136904
Buggy source:
/** 
 * DOC talend Comment method "createFixedColumns".
 * @return
 */
protected Collection<? extends String> createFixedColumns(int columnSize){
  List<String> columnNames=new ArrayList<String>();
  columnNames.add(MatchAnalysisConstant.BLOCK_KEY);
  additionalColumnPosition=new ColumnPosition(columnSize);
  columnNames.add(MatchAnalysisConstant.GID);
  sortState=new SortState(columnNames.size());
  columnNames.add(MatchAnalysisConstant.GRP_SIZE);
  this.masterColumn=columnNames.size();
  columnNames.add(MatchAnalysisConstant.MASTER);
  columnNames.add(MatchAnalysisConstant.SCORE);
  columnNames.add(MatchAnalysisConstant.GRP_QUALITY);
  columnNames.add(MatchAnalysisConstant.ATTRIBUTE_SCORES);
  return columnNames;
}

Fixed version (ground truth):
/** 
 * DOC talend Comment method "createFixedColumns".
 * @return
 */
protected Collection<? extends String> createFixedColumns(int columnSize){
  List<String> columnNames=new ArrayList<String>();
  columnNames.add(MatchAnalysisConstant.BLOCK_KEY);
  additionalColumnPosition=new ColumnPosition(columnSize + 1);
  columnNames.add(MatchAnalysisConstant.GID);
  sortState=new SortState(columnSize + 2);
  columnNames.add(MatchAnalysisConstant.GRP_SIZE);
  this.masterColumn=columnSize + 3;
  columnNames.add(MatchAnalysisConstant.MASTER);
  columnNames.add(MatchAnalysisConstant.SCORE);
  columnNames.add(MatchAnalysisConstant.GRP_QUALITY);
  columnNames.add(MatchAnalysisConstant.ATTRIBUTE_SCORES);
  return columnNames;
}
Program: 136905
Project: 136905
Buggy source:
private String[] createColumnLabel(ModelElement[] columns){
  int columnCount=getFixedColumnCount();
  if (columns != null) {
    columnCount=columns.length + columnCount;
  }
  List<String> columnsName=new ArrayList<String>();
  if (columns != null) {
    for (    ModelElement column : columns) {
      columnsName.add(column.getName());
    }
  }
  columnsName.addAll(createFixedColumns(columns.length));
  return columnsName.toArray(new String[columnsName.size()]);
}

Fixed version (ground truth):
private String[] createColumnLabel(ModelElement[] columns){
  int columnCount=getFixedColumnCount();
  if (columns != null) {
    columnCount=columns.length + columnCount;
  }
  List<String> columnsName=new ArrayList<String>();
  if (columns != null) {
    for (    ModelElement column : columns) {
      columnsName.add(column.getName());
    }
  }
  columnsName.addAll(createFixedColumns(columns == null ? 0 : columns.length));
  return columnsName.toArray(new String[columnsName.size()]);
}
Program: 136906
Project: 136906
Buggy source:
@Override protected void createSubChart(Composite sectionClient){
  if (!TOPChartUtil.getInstance().isTOPChartInstalled()) {
    return;
  }
  RecordMatchingIndicator recordMatchingIndicator=MatchRuleAnlaysisUtils.getRecordMatchIndicatorFromAna(analysis);
  Composite chartComposite=toolkit.createComposite(sectionClient);
  GridLayout tableLayout=new GridLayout(1,Boolean.TRUE);
  chartComposite.setLayout(tableLayout);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  chartComposite.setLayoutData(gridData);
  matchRuleChartComp=new MatchRuleDataChart(chartComposite,recordMatchingIndicator.getGroupSize2groupFrequency());
  createHideGroupComposite(chartComposite);
}

Fixed version (ground truth):
@Override protected void createSubChart(Composite sectionClient){
  RecordMatchingIndicator recordMatchingIndicator=MatchRuleAnlaysisUtils.getRecordMatchIndicatorFromAna(analysis);
  Composite chartComposite=toolkit.createComposite(sectionClient);
  GridLayout tableLayout=new GridLayout(1,Boolean.TRUE);
  chartComposite.setLayout(tableLayout);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  chartComposite.setLayoutData(gridData);
  matchRuleChartComp=new MatchRuleDataChart(chartComposite,recordMatchingIndicator.getGroupSize2groupFrequency());
  if (!TOPChartUtil.getInstance().isTOPChartInstalled()) {
    return;
  }
  createHideGroupComposite(chartComposite);
}
Program: 136907
Project: 136907
Buggy source:
@Override protected void createSubChart(Composite sectionClient){
  if (!TOPChartUtil.getInstance().isTOPChartInstalled()) {
    return;
  }
  Composite chartComposite=toolkit.createComposite(sectionClient);
  GridLayout tableLayout=new GridLayout(1,Boolean.TRUE);
  chartComposite.setLayout(tableLayout);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  chartComposite.setLayoutData(gridData);
  matchRuleChartComp=new MatchRuleDataChart(chartComposite,new HashMap<Object,Long>());
  createHideGroupComposite(chartComposite);
}

Fixed version (ground truth):
@Override protected void createSubChart(Composite sectionClient){
  Composite chartComposite=toolkit.createComposite(sectionClient);
  GridLayout tableLayout=new GridLayout(1,Boolean.TRUE);
  chartComposite.setLayout(tableLayout);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  chartComposite.setLayoutData(gridData);
  matchRuleChartComp=new MatchRuleDataChart(chartComposite,new HashMap<Object,Long>());
  if (!TOPChartUtil.getInstance().isTOPChartInstalled()) {
    return;
  }
  createHideGroupComposite(chartComposite);
}
Program: 136908
Project: 136908
Buggy source:
public int getRowCount(Object dataset){
  if (isServiceInstalled()) {
    return chartService.getRowCount(dataset);
  }
  return Integer.MIN_VALUE;
}

Fixed version (ground truth):
public int getRowCount(Object dataset){
  if (isTOPChartInstalled()) {
    return chartService.getRowCount(dataset);
  }
  return Integer.MIN_VALUE;
}
Program: 136909
Project: 136909
Buggy source:
public void addValueToCategoryDataset(Object dataset,double value,String labelX,String labelY){
  if (isServiceInstalled()) {
    chartService.addValueToCategoryDataset(dataset,value,labelX,labelY);
  }
}

Fixed version (ground truth):
public void addValueToCategoryDataset(Object dataset,double value,String labelX,String labelY){
  if (isTOPChartInstalled()) {
    chartService.addValueToCategoryDataset(dataset,value,labelX,labelY);
  }
}
Program: 136910
Project: 136910
Buggy source:
public Comparable getRowKey(Object dataset,int row){
  if (isServiceInstalled()) {
    return chartService.getRowKey(dataset,row);
  }
  return Integer.MIN_VALUE;
}

Fixed version (ground truth):
public Comparable getRowKey(Object dataset,int row){
  if (isTOPChartInstalled()) {
    return chartService.getRowKey(dataset,row);
  }
  return Integer.MIN_VALUE;
}
Program: 136911
Project: 136911
Buggy source:
public int getColumnCount(Object dataset){
  if (isServiceInstalled()) {
    return chartService.getColumnCount(dataset);
  }
  return Integer.MIN_VALUE;
}

Fixed version (ground truth):
public int getColumnCount(Object dataset){
  if (isTOPChartInstalled()) {
    return chartService.getColumnCount(dataset);
  }
  return Integer.MIN_VALUE;
}
Program: 136912
Project: 136912
Buggy source:
public Object createDefaultCategoryDataset(){
  if (isServiceInstalled()) {
    return chartService.createDefaultCategoryDataset();
  }
  return null;
}

Fixed version (ground truth):
public Object createDefaultCategoryDataset(){
  if (isTOPChartInstalled()) {
    return chartService.createDefaultCategoryDataset();
  }
  return null;
}
Program: 136913
Project: 136913
Buggy source:
public Number getValue(Object dataset,Comparable rowKey,Comparable columnKey){
  if (chartService != null) {
    return chartService.getValue(dataset,rowKey,columnKey);
  }
  return Integer.MIN_VALUE;
}

Fixed version (ground truth):
public Number getValue(Object dataset,Comparable rowKey,Comparable columnKey){
  if (isTOPChartInstalled()) {
    return chartService.getValue(dataset,rowKey,columnKey);
  }
  return Integer.MIN_VALUE;
}
Program: 136914
Project: 136914
Buggy source:
public void clearDataset(Object dataset){
  if (chartService != null) {
    chartService.clearDataset(dataset);
  }
}

Fixed version (ground truth):
public void clearDataset(Object dataset){
  if (isTOPChartInstalled()) {
    chartService.clearDataset(dataset);
  }
}
Program: 136915
Project: 136915
Buggy source:
public int getRowIndex(Object dataset,Comparable key){
  if (isServiceInstalled()) {
    return chartService.getRowIndex(dataset,key);
  }
  return Integer.MIN_VALUE;
}

Fixed version (ground truth):
public int getRowIndex(Object dataset,Comparable key){
  if (isTOPChartInstalled()) {
    return chartService.getRowIndex(dataset,key);
  }
  return Integer.MIN_VALUE;
}
Program: 136916
Project: 136916
Buggy source:
public Comparable getColumnKey(Object dataset,int column){
  if (isServiceInstalled()) {
    return chartService.getColumnKey(dataset,column);
  }
  return Integer.MIN_VALUE;
}

Fixed version (ground truth):
public Comparable getColumnKey(Object dataset,int column){
  if (isTOPChartInstalled()) {
    return chartService.getColumnKey(dataset,column);
  }
  return Integer.MIN_VALUE;
}
Program: 136917
Project: 136917
Buggy source:
public List getRowKeys(Object dataset){
  if (isServiceInstalled()) {
    return chartService.getRowKeys(dataset);
  }
  return null;
}

Fixed version (ground truth):
public List getRowKeys(Object dataset){
  if (isTOPChartInstalled()) {
    return chartService.getRowKeys(dataset);
  }
  return null;
}
Program: 136918
Project: 136918
Buggy source:
public int getColumnIndex(Object dataset,Comparable key){
  if (isServiceInstalled()) {
    return chartService.getColumnIndex(dataset,key);
  }
  return Integer.MIN_VALUE;
}

Fixed version (ground truth):
public int getColumnIndex(Object dataset,Comparable key){
  if (isTOPChartInstalled()) {
    return chartService.getColumnIndex(dataset,key);
  }
  return Integer.MIN_VALUE;
}
Program: 136919
Project: 136919
Buggy source:
public List getColumnKeys(Object dataset){
  if (isServiceInstalled()) {
    return chartService.getColumnKeys(dataset);
  }
  return null;
}

Fixed version (ground truth):
public List getColumnKeys(Object dataset){
  if (isTOPChartInstalled()) {
    return chartService.getColumnKeys(dataset);
  }
  return null;
}
Program: 136920
Project: 136920
Buggy source:
public static List<String> getLabels(){
  List<String> list=new ArrayList<>();
  for (  ReportType t : ReportType.values()) {
    if (!list.contains(t.getLabel())) {
      list.add(t.getLabel());
    }
  }
  return list;
}

Fixed version (ground truth):
public static List<String> getLabels(){
  List<String> list=new ArrayList<String>();
  for (  ReportType t : ReportType.values()) {
    if (!list.contains(t.getLabel())) {
      list.add(t.getLabel());
    }
  }
  return list;
}
Program: 136921
Project: 136921
Buggy source:
/** 
 * Method "getAnalyses".
 * @param report
 * @return a list of analyses or an empty list. Do not use this list to add analysis to the report.
 */
public static List<Analysis> getAnalyses(Report report){
  List<Analysis> analyses=new ArrayList<>();
  if (report instanceof TdReport) {
    for (    AnalysisMap anaMap : ((TdReport)report).getAnalysisMap()) {
      Analysis analysis=anaMap.getAnalysis();
      if (analysis != null) {
        analyses.add(analysis);
      }
    }
  }
  return analyses;
}

Fixed version (ground truth):
/** 
 * Method "getAnalyses".
 * @param report
 * @return a list of analyses or an empty list. Do not use this list to add analysis to the report.
 */
public static List<Analysis> getAnalyses(Report report){
  List<Analysis> analyses=new ArrayList<Analysis>();
  if (report instanceof TdReport) {
    for (    AnalysisMap anaMap : ((TdReport)report).getAnalysisMap()) {
      Analysis analysis=anaMap.getAnalysis();
      if (analysis != null) {
        analyses.add(analysis);
      }
    }
  }
  return analyses;
}
Program: 136922
Project: 136922
Buggy source:
@Override public boolean finalizeComputation(){
  Iterator<Object> iterator=duplicateObjects.iterator();
  long dupSize=0;
  while (iterator.hasNext()) {
    Object key=iterator.next();
    List<Object> valueArray=distinctMap.get(key);
    dupSize++;
    if (needStoreDrillDownData()) {
      handleDrillDownData(key,valueArray);
    }
  }
  this.setDuplicateValueCount(Long.valueOf(dupSize));
  return super.finalizeComputation();
}

Fixed version (ground truth):
@Override public boolean finalizeComputation(){
  Iterator<Object> iterator=duplicateObjects.iterator();
  while (iterator.hasNext()) {
    Object key=iterator.next();
    if (needStoreDrillDownData()) {
      List<Object> valueArray=distinctMap.get(key);
      handleDrillDownData(key,valueArray);
    }
 else {
      break;
    }
  }
  this.setDuplicateValueCount(Long.valueOf(duplicateObjects.size()));
  return super.finalizeComputation();
}
Program: 136923
Project: 136923
Buggy source:
@Override public boolean handle(Object data){
  super.handle(data);
  if (data != null) {
    if (!this.uniqueObjects.add(data)) {
      duplicateObjects.add(data);
    }
 else {
      this.mustStoreRow=true;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean handle(Object data){
  super.handle(data);
  if (data != null) {
    if (this.distintObjects.add(data)) {
      this.mustStoreRow=true;
    }
 else {
      duplicateObjects.add(data);
    }
  }
  return true;
}
Program: 136924
Project: 136924
Buggy source:
@Override public AbstractDB<Object> getMapDB(String dbName){
  if (isUsedMapDBMode()) {
    if (StandardDBName.computeProcess.name().equals(dbName)) {
      if (needReconnect((DBSet<Object>)uniqueObjects)) {
        return initValueForDBSet(StandardDBName.computeProcessSet.name());
      }
 else {
        return (DBSet<Object>)uniqueObjects;
      }
    }
 else     if (StandardDBName.drillDownValues.name().equals(dbName)) {
      return super.getMapDB(StandardDBName.drillDown.name());
    }
  }
  return super.getMapDB(dbName);
}

Fixed version (ground truth):
@Override public AbstractDB<Object> getMapDB(String dbName){
  if (isUsedMapDBMode()) {
    if (StandardDBName.computeProcess.name().equals(dbName)) {
      if (needReconnect((DBSet<Object>)distintObjects)) {
        return initValueForDBSet(StandardDBName.computeProcessSet.name());
      }
 else {
        return (DBSet<Object>)distintObjects;
      }
    }
 else     if (StandardDBName.drillDownValues.name().equals(dbName)) {
      return super.getMapDB(StandardDBName.drillDown.name());
    }
  }
  return super.getMapDB(dbName);
}
Program: 136925
Project: 136925
Buggy source:
@Override public boolean finalizeComputation(){
  uniqueObjects.removeAll(duplicateObjects);
  clearDrillDownData();
  this.setUniqueValueCount(Long.valueOf(uniqueObjects.size()));
  return super.finalizeComputation();
}

Fixed version (ground truth):
@Override public boolean finalizeComputation(){
  clearDrillDownData();
  this.setUniqueValueCount(Long.valueOf(distintObjects.size() - duplicateObjects.size()));
  return super.finalizeComputation();
}
Program: 136926
Project: 136926
Buggy source:
@Override public boolean reset(){
  this.uniqueValueCount=UNIQUE_VALUE_COUNT_EDEFAULT;
  if (isUsedMapDBMode()) {
    uniqueObjects=initValueForDBSet(StandardDBName.computeProcessSet.name());
    if (uniqueObjects != null) {
      ((DBSet<Object>)uniqueObjects).clear();
    }
    duplicateObjects=initValueForDBSet(StandardDBName.temp.name());
    if (duplicateObjects != null) {
      ((DBSet<Object>)duplicateObjects).clear();
    }
  }
 else {
    this.uniqueObjects.clear();
    this.duplicateObjects.clear();
  }
  return super.reset();
}

Fixed version (ground truth):
@Override public boolean reset(){
  this.uniqueValueCount=UNIQUE_VALUE_COUNT_EDEFAULT;
  if (isUsedMapDBMode()) {
    distintObjects=initValueForDBSet(StandardDBName.computeProcessSet.name());
    if (distintObjects != null) {
      ((DBSet<Object>)distintObjects).clear();
    }
    duplicateObjects=initValueForDBSet(StandardDBName.temp.name());
    if (duplicateObjects != null) {
      ((DBSet<Object>)duplicateObjects).clear();
    }
  }
 else {
    this.distintObjects.clear();
    this.duplicateObjects.clear();
  }
  return super.reset();
}
Program: 136927
Project: 136927
Buggy source:
@Override public DataSetRow getRow(int index){
  DataSetRow returnDataSetRow=null;
  if (iterator == null) {
    return super.getRow(index);
  }
 else {
    if (index < 0 || index >= dataMap.size()) {
      throw new IndexOutOfBoundsException(Messages.getString("String_Node_Str") + index);
    }
    if (currentIndex > index) {
      iterator=dataSet.iterator();
      currentIndex=0;
    }
    while (currentIndex < index) {
      iterator.next();
      currentIndex++;
    }
    Object currentData=iterator.next();
    currentIndex++;
    Comparable[] comparable=new Comparable[1];
    comparable[1]=(Comparable)currentData;
    returnDataSetRow=new DataSetRow(this,comparable);
    return returnDataSetRow;
  }
}

Fixed version (ground truth):
@Override public DataSetRow getRow(int index){
  DataSetRow returnDataSetRow=null;
  if (iterator == null) {
    return super.getRow(index);
  }
 else {
    if (index < 0 || index >= dataSet.size()) {
      throw new IndexOutOfBoundsException(Messages.getString("String_Node_Str") + index);
    }
    if (currentIndex > index) {
      iterator=dataSet.iterator();
      currentIndex=0;
    }
    while (currentIndex < index) {
      iterator.next();
      currentIndex++;
    }
    Object currentData=iterator.next();
    currentIndex++;
    Comparable[] comparable=new Comparable[1];
    comparable[0]=(Comparable)currentData;
    returnDataSetRow=new DataSetRow(this,comparable);
    return returnDataSetRow;
  }
}
Program: 136928
Project: 136928
Buggy source:
public Object createMapDBColumnSetDataSet(String[] columnHeader,ColumnSetDBMap mapDB,Long size,Indicator currIndicator,int pageSize){
  if (getSqlexplorerService() != null) {
    return getSqlexplorerService().createMapDBColumnSetDataSet(columnHeader,mapDB,size,currIndicator,pageSize);
  }
  return null;
}

Fixed version (ground truth):
public Object createMapDBColumnSetDataSet(String[] columnHeader,ColumnSetDBMap mapDB,Long size,DataValidation dataValidation,int pageSize){
  if (getSqlexplorerService() != null) {
    return getSqlexplorerService().createMapDBColumnSetDataSet(columnHeader,mapDB,size,dataValidation,pageSize);
  }
  return null;
}
Program: 136929
Project: 136929
Buggy source:
/** 
 * orgnize EList 'objectLs' by SQL.
 * @param sqlStatement
 * @param ok
 * @return
 * @throws SQLException
 */
private ReturnCode evaluateBySql(String sqlStatement,ReturnCode ok) throws SQLException {
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=createStatement();
    if (continueRun()) {
      if (log.isInfoEnabled()) {
        log.info("String_Node_Str" + sqlStatement);
      }
      statement.execute(sqlStatement);
    }
    resultSet=statement.getResultSet();
    List<String> columnNames=getAnalyzedElementsName();
    if (resultSet == null) {
      String mess=Messages.getString("String_Node_Str",sqlStatement);
      log.warn(mess);
      ok.setReturnCode(mess,false);
      return ok;
    }
    EMap<Indicator,AnalyzedDataSet> indicToRowMap=analysis.getResults().getIndicToRowMap();
    indicToRowMap.clear();
    while (resultSet.next()) {
      if (!continueRun()) {
        break;
      }
      EList<Object> objectLs=new BasicEList<Object>();
      Iterator<String> it=columnNames.iterator();
      while (it.hasNext()) {
        Object obj=resultSet.getObject(it.next());
        objectLs.add(obj);
      }
      if (objectLs.size() == 0) {
        continue;
      }
      handleObjects(objectLs,resultSet);
    }
  }
  finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    getConnection().close();
  }
  return ok;
}

Fixed version (ground truth):
/** 
 * orgnize EList 'objectLs' by SQL.
 * @param sqlStatement
 * @param ok
 * @return
 * @throws SQLException
 */
private ReturnCode evaluateBySql(String sqlStatement,ReturnCode ok) throws SQLException {
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=createStatement();
    if (continueRun()) {
      if (log.isInfoEnabled()) {
        log.info("String_Node_Str" + sqlStatement);
      }
      statement.execute(sqlStatement);
    }
    resultSet=statement.getResultSet();
    List<String> columnNames=getAnalyzedElementsName();
    if (resultSet == null) {
      String mess=Messages.getString("String_Node_Str",sqlStatement);
      log.warn(mess);
      ok.setReturnCode(mess,false);
      return ok;
    }
    EMap<Indicator,AnalyzedDataSet> indicToRowMap=analysis.getResults().getIndicToRowMap();
    indicToRowMap.clear();
    while (resultSet.next()) {
      if (!continueRun()) {
        break;
      }
      EList<Object> objectLs=new BasicEList<Object>();
      Iterator<String> it=columnNames.iterator();
      while (it.hasNext()) {
        Object obj=ResultSetUtils.getObject(resultSet,it.next());
        objectLs.add(obj);
      }
      if (objectLs.size() == 0) {
        continue;
      }
      handleObjects(objectLs,resultSet);
    }
  }
  finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    getConnection().close();
  }
  return ok;
}
Program: 136933
Project: 136933
Buggy source:
/** 
 * DataSet is used to be the input on the export wizard. unchecked is for the type of mapDB else will have a warning
 * @param controller
 * @return
 */
@SuppressWarnings("String_Node_Str") public Object getDataSetForMapDB(int pageSize){
  List<String> columnElementList=filterAdaptColumnHeader();
  columnHeader=new String[columnElementList.size()];
  int headerIndex=0;
  for (  String columnElement : columnElementList) {
    columnHeader[headerIndex++]=columnElement;
  }
  AbstractDB<?> mapDB=getMapDB();
  AnalysisType analysisType=analysis.getParameters().getAnalysisType();
  if (AnalysisType.COLUMN_SET == analysisType) {
    Long size=getCurrentIndicatorResultSize();
    if (ColumnSetDBMap.class.isInstance(mapDB)) {
      return SqlExplorerUtils.getDefault().createMapDBColumnSetDataSet(columnHeader,(ColumnSetDBMap)mapDB,size,currIndicator,pageSize);
    }
  }
  if (DBSet.class.isInstance(mapDB)) {
    return SqlExplorerUtils.getDefault().createMapDBSetDataSet(columnHeader,(DBSet<Object>)mapDB,pageSize);
  }
 else {
    ColumnFilter columnFilter=getColumnFilter();
    Long itemSize=getItemSize(mapDB);
    return SqlExplorerUtils.getDefault().createMapDBDataSet(columnHeader,(DBMap<Object,List<Object>>)mapDB,pageSize,columnFilter,itemSize);
  }
}

Fixed version (ground truth):
/** 
 * DataSet is used to be the input on the export wizard. unchecked is for the type of mapDB else will have a warning
 * @param controller
 * @return
 */
@SuppressWarnings("String_Node_Str") public Object getDataSetForMapDB(int pageSize){
  List<String> columnElementList=filterAdaptColumnHeader();
  columnHeader=new String[columnElementList.size()];
  int headerIndex=0;
  for (  String columnElement : columnElementList) {
    columnHeader[headerIndex++]=columnElement;
  }
  AbstractDB<?> mapDB=getMapDB();
  AnalysisType analysisType=analysis.getParameters().getAnalysisType();
  if (AnalysisType.COLUMN_SET == analysisType) {
    Long size=getCurrentIndicatorResultSize();
    if (ColumnSetDBMap.class.isInstance(mapDB)) {
      return SqlExplorerUtils.getDefault().createMapDBColumnSetDataSet(columnHeader,(ColumnSetDBMap)mapDB,size,IDataValidationFactory.INSTANCE.createValidation(currIndicator),pageSize);
    }
  }
  if (DBSet.class.isInstance(mapDB)) {
    return SqlExplorerUtils.getDefault().createMapDBSetDataSet(columnHeader,(DBSet<Object>)mapDB,pageSize);
  }
 else {
    ColumnFilter columnFilter=getColumnFilter();
    Long itemSize=getItemSize(mapDB);
    return SqlExplorerUtils.getDefault().createMapDBDataSet(columnHeader,(DBMap<Object,List<Object>>)mapDB,pageSize,columnFilter,itemSize);
  }
}
Program: 136935
Project: 136935
Buggy source:
@Override public void dispose(){
  super.dispose();
  DrillDownEditorInput ddEditorInput=(DrillDownEditorInput)this.getEditorInput();
  Indicator generateMapDBIndicator=ddEditorInput.getGenerateMapDBIndicator();
  MapDBManager.getInstance().removeDBRef(generateMapDBIndicator.getMapDBFile());
}

Fixed version (ground truth):
@Override public void dispose(){
  super.dispose();
  DrillDownEditorInput ddEditorInput=(DrillDownEditorInput)this.getEditorInput();
  Indicator generateMapDBIndicator=ddEditorInput.getGenerateMapDBIndicator();
  MapDBManager.getInstance().removeDBRef(MapDBUtils.getMapDBFile(generateMapDBIndicator));
}
Program: 136936
Project: 136936
Buggy source:
/** 
 * Get MapDB which store the drill down data for columnSet analysis
 * @param analysisType
 * @param analysis
 */
public static AbstractDB<Object> getColumnSetAnalysisMapDB(Analysis analysis){
  SimpleStatIndicator simpleStatIndicator=null;
  for (  Indicator indicator : analysis.getResults().getIndicators()) {
    if (SimpleStatIndicator.class.isInstance(indicator)) {
      simpleStatIndicator=(SimpleStatIndicator)indicator;
      break;
    }
  }
  if (simpleStatIndicator != null) {
    return simpleStatIndicator.getMapDB(StandardDBName.dataSection.name());
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Get MapDB which store the drill down data for columnSet analysis
 * @param analysisType
 * @param analysis
 */
public static AbstractDB<Object> getColumnSetAnalysisMapDB(Analysis analysis){
  SimpleStatIndicator simpleStatIndicator=null;
  for (  Indicator indicator : analysis.getResults().getIndicators()) {
    if (SimpleStatIndicator.class.isInstance(indicator)) {
      simpleStatIndicator=(SimpleStatIndicator)indicator;
      break;
    }
  }
  if (simpleStatIndicator != null) {
    return MapDBUtils.getMapDB(StandardDBName.dataSection.name(),simpleStatIndicator);
  }
  return null;
}
Program: 136937
Project: 136937
Buggy source:
/** 
 * Get MapDB which store the drill down data for current indicator
 * @param analysis
 * @return
 */
public static AbstractDB<Object> getMapDB(final ChartDataEntity dataEntity,Analysis analysis,MenuItemEntity itemEntitie){
  AnalysisType analysisType=analysis.getParameters().getAnalysisType();
  if (AnalysisType.COLUMN_SET == analysisType) {
    return getColumnSetAnalysisMapDB(analysis);
  }
  Indicator indicator=dataEntity.getIndicator();
  String selectValue=dataEntity.getLabel();
  String dbMapName=getDBMapName(analysisType,indicator,selectValue,itemEntitie);
  return indicator.getMapDB(dbMapName);
}

Fixed version (ground truth):
/** 
 * Get MapDB which store the drill down data for current indicator
 * @param analysis
 * @return
 */
public static AbstractDB<Object> getMapDB(final ChartDataEntity dataEntity,Analysis analysis,MenuItemEntity itemEntitie){
  AnalysisType analysisType=analysis.getParameters().getAnalysisType();
  if (AnalysisType.COLUMN_SET == analysisType) {
    return getColumnSetAnalysisMapDB(analysis);
  }
  Indicator indicator=dataEntity.getIndicator();
  String selectValue=dataEntity.getLabel();
  String dbMapName=getDBMapName(analysisType,indicator,selectValue,itemEntitie);
  return MapDBUtils.getMapDB(dbMapName,indicator);
}
Program: 136938
Project: 136938
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  if (ExecutionLanguage.JAVA == currentEngine) {
    try {
      DrillDownEditorInput input=new DrillDownEditorInput(analysis,currentDataEntity,itemEntity);
      if (input.computeColumnValueLength(input.filterAdaptDataList())) {
        CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input,"String_Node_Str");
      }
 else {
        MessageDialog.openWarning(null,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
      }
    }
 catch (    PartInitException e1) {
      log.error(e1,e1);
    }
  }
 else {
    Display.getDefault().asyncExec(new Runnable(){
      public void run(){
        Connection tdDataProvider=SwitchHelpers.CONNECTION_SWITCH.doSwitch(analysis.getContext().getConnection());
        String query=itemEntity.getQuery();
        String editorName=currentIndicator.getName();
        SqlExplorerUtils.getDefault().runInDQViewer(tdDataProvider,query,editorName);
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  if (ExecutionLanguage.JAVA == currentEngine) {
    try {
      DrillDownEditorInput input=new DrillDownEditorInput(analysis,currentDataEntity,itemEntity);
      if (SqlExplorerUtils.getDefault().getSqlexplorerService() != null) {
        CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input,"String_Node_Str");
      }
    }
 catch (    PartInitException e1) {
      log.error(e1,e1);
    }
  }
 else {
    Display.getDefault().asyncExec(new Runnable(){
      public void run(){
        Connection tdDataProvider=SwitchHelpers.CONNECTION_SWITCH.doSwitch(analysis.getContext().getConnection());
        String query=itemEntity.getQuery();
        String editorName=currentIndicator.getName();
        SqlExplorerUtils.getDefault().runInDQViewer(tdDataProvider,query,editorName);
      }
    }
);
  }
}
Program: 136941
Project: 136941
Buggy source:
@Override public Double getFrequency(Object dataValue){
  if (this.count.compareTo(0L) == 0) {
    return Double.NaN;
  }
  ModelMatcher matcher=null;
  if (!(dataValue instanceof ModelMatcher)) {
    matcher=dateRetriever.getMatcher(dataValue.toString());
  }
 else {
    matcher=(ModelMatcher)dataValue;
  }
  return ((double)matcher.getScore()) / this.getCount().longValue();
}

Fixed version (ground truth):
@Override public Double getFrequency(Object dataValue){
  if (this.count.compareTo(0L) == 0) {
    return Double.NaN;
  }
  ModelMatcher matcher=null;
  if (dataValue instanceof ModelMatcher) {
    matcher=(ModelMatcher)dataValue;
    return ((double)matcher.getScore()) / this.getCount().longValue();
  }
 else {
    return super.getFrequency(dataValue);
  }
}
Program: 136942
Project: 136942
Buggy source:
private String getFunction(){
  Expression instantiatedExpression=dbmsLanguage.getInstantiatedExpression(indicator);
  final String body=instantiatedExpression.getBody();
  Pattern p=Pattern.compile(REGEX,Pattern.CASE_INSENSITIVE);
  String dbmsName=this.dbmsLanguage.getDbmsName();
  if (DbmsLanguageFactory.isInfomix(dbmsName)) {
    TdColumn column=(TdColumn)indicator.getAnalyzedElement();
    int javaType=column.getSqlDataType().getJavaDataType();
    if (Java2SqlType.isDateInSQL(javaType)) {
      p=Pattern.compile(REGEX_INFOMIX_DATE,Pattern.CASE_INSENSITIVE);
    }
 else {
      p=Pattern.compile(REGEX_INFORMIX,Pattern.CASE_INSENSITIVE);
    }
  }
  Matcher matcher=p.matcher(body);
  matcher.find();
  String group=matcher.group(1);
  return group;
}

Fixed version (ground truth):
private String getFunction(){
  Expression instantiatedExpression=dbmsLanguage.getInstantiatedExpression(indicator);
  final String body=instantiatedExpression.getBody();
  Pattern p=Pattern.compile(REGEX,Pattern.CASE_INSENSITIVE);
  String dbmsName=this.dbmsLanguage.getDbmsName();
  if (DbmsLanguageFactory.isInfomix(dbmsName)) {
    p=Pattern.compile(REGEX_INFORMIX,Pattern.CASE_INSENSITIVE);
  }
  Matcher matcher=p.matcher(body);
  matcher.find();
  String group=matcher.group(1);
  return group;
}
Program: 136943
Project: 136943
Buggy source:
protected String getInstantiatedClause(){
  String colName=columnName;
  String function=null;
  TdColumn column=(TdColumn)indicator.getAnalyzedElement();
  int javaType=column.getSqlDataType().getJavaDataType();
  if (!Java2SqlType.isNumbericInSQL(javaType)) {
    function=getFunction();
  }
 else {
    colName=columnNameConvert();
  }
  Object value=null;
  if (Java2SqlType.isNumbericInSQL(javaType) && dbmsLanguage instanceof DB2DbmsLanguage) {
    value=entity.getKey();
  }
 else {
    value="String_Node_Str" + entity.getKey() + "String_Node_Str";
  }
  String clause=entity.isLabelNull() ? columnName + dbmsLanguage.isNull() : ((function == null ? colName : function) + dbmsLanguage.equal() + value);
  if (dbmsLanguage instanceof InfomixDbmsLanguage) {
    clause=clause.replaceAll(InfomixDbmsLanguage.AS_REPLACE_COLUMN,PluginConstant.EMPTY_STRING);
  }
  return clause;
}

Fixed version (ground truth):
@Override protected String getInstantiatedClause(){
  String colName=columnName;
  String function=null;
  TdColumn column=(TdColumn)indicator.getAnalyzedElement();
  int javaType=column.getSqlDataType().getJavaDataType();
  if (!Java2SqlType.isNumbericInSQL(javaType)) {
    function=getFunction();
  }
 else {
    colName=columnNameConvert();
  }
  Object value=null;
  if (Java2SqlType.isNumbericInSQL(javaType) && dbmsLanguage instanceof DB2DbmsLanguage) {
    value=entity.getKey();
  }
 else {
    value="String_Node_Str" + entity.getKey() + "String_Node_Str";
  }
  String clause=entity.isLabelNull() ? columnName + dbmsLanguage.isNull() : ((function == null ? colName : function) + dbmsLanguage.equal() + value);
  if (dbmsLanguage instanceof InfomixDbmsLanguage) {
    clause=clause.replaceAll(InfomixDbmsLanguage.AS_REPLACE_COLUMN,PluginConstant.EMPTY_STRING);
  }
  return clause;
}
Program: 136944
Project: 136944
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public List<Object[]> getDataSetDBMapSubList(Object dbMap,long fromIndex,long toIndex,Map<Long,Object> indexMap){
  return ((DBMap)dbMap).subList(fromIndex,toIndex,indexMap);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public List<Object[]> getDataSetDBMapSubList(Object dbMap,long fromIndex,long toIndex,Map<Long,Object> indexMap){
  return ((AbstractDB)dbMap).subList(fromIndex,toIndex,indexMap);
}
Program: 136945
Project: 136945
Buggy source:
/** 
 * get subList from fromIndex to toIndex
 * @param fromIndex
 * @param toIndex
 * @param indexMap
 * @return
 */
public List<Object[]> subList(long fromIndex,long toIndex,Map<Long,K> indexMap,DataValidation dataValiator){
  boolean stratToRecord=false;
  List<Object[]> returnList=new ArrayList<Object[]>();
  if (!checkIndex(fromIndex,toIndex)) {
    return returnList;
  }
  K fromKey=indexMap.get(fromIndex);
  K toKey=indexMap.get(toIndex);
  Iterator<K> iterator=null;
  long index=0;
  if (fromKey == null) {
    iterator=this.iterator();
  }
 else   if (toKey == null) {
    NavigableSet<K> tailSet=tailSet(fromKey,true);
    index=fromIndex;
    iterator=tailSet.iterator();
  }
 else {
    NavigableSet<K> tailSet=subSet(fromKey,toKey);
    index=fromIndex;
    iterator=tailSet.iterator();
  }
  while (iterator.hasNext()) {
    K next=iterator.next();
    if (dataValiator != null && !dataValiator.isValid(next)) {
      continue;
    }
    if (index == 0 && fromKey == null && indexMap != null) {
      indexMap.put(0l,next);
    }
    if (index == fromIndex) {
      stratToRecord=true;
    }
    if (index == toIndex) {
      if (toKey == null && indexMap != null) {
        indexMap.put(toIndex,next);
      }
      break;
    }
    if (stratToRecord == true) {
      returnList.add(new Object[]{next});
    }
    index++;
  }
  return returnList;
}

Fixed version (ground truth):
/** 
 * get subList from fromIndex to toIndex
 * @param fromIndex
 * @param toIndex
 * @param indexMap
 * @return
 */
public List<Object[]> subList(long fromIndex,long toIndex,Map<Long,K> indexMap,DataValidation dataValiator){
  boolean stratToRecord=false;
  List<Object[]> returnList=new ArrayList<Object[]>();
  if (!checkIndex(fromIndex,toIndex)) {
    return returnList;
  }
  K fromKey=null;
  K toKey=null;
  if (indexMap != null) {
    fromKey=indexMap.get(fromIndex);
    toKey=indexMap.get(toIndex);
  }
  Iterator<K> iterator=null;
  long index=0;
  if (fromKey == null) {
    iterator=this.iterator();
  }
 else   if (toKey == null) {
    NavigableSet<K> tailSet=tailSet(fromKey,true);
    index=fromIndex;
    iterator=tailSet.iterator();
  }
 else {
    NavigableSet<K> tailSet=subSet(fromKey,toKey);
    index=fromIndex;
    iterator=tailSet.iterator();
  }
  while (iterator.hasNext()) {
    K next=iterator.next();
    if (dataValiator != null && !dataValiator.isValid(next)) {
      continue;
    }
    if (index == 0 && fromKey == null && indexMap != null) {
      indexMap.put(0l,next);
    }
    if (index == fromIndex) {
      stratToRecord=true;
    }
    if (index == toIndex) {
      if (toKey == null && indexMap != null) {
        indexMap.put(toIndex,next);
      }
      break;
    }
    if (stratToRecord == true) {
      returnList.add(new Object[]{next});
    }
    index++;
  }
  return returnList;
}
Program: 136948
Project: 136948
Buggy source:
@Override public void init(IViewSite site,IMemento mem) throws PartInitException {
  super.init(site,mem);
  if (mem == null) {
    setLinkingEnabled(true);
  }
  try {
    addPostWindowCloseListener();
    initToolBar();
    initWorkspace();
    ISqlexplorerService sqlexplorerService=SqlExplorerUtils.getDefault().getSqlexplorerService();
    if (sqlexplorerService != null) {
      SqlExplorerUtils.getDefault().initAllConnectionsToSQLExplorer();
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
}

Fixed version (ground truth):
@Override public void init(IViewSite site,IMemento mem) throws PartInitException {
  super.init(site,mem);
  if (mem == null) {
    setLinkingEnabled(true);
  }
  try {
    addPostWindowCloseListener();
    initToolBar();
    initWorkspace();
    if (SqlExplorerUtils.getDefault().isSqlexplorerInstalled()) {
      SqlExplorerUtils.getDefault().initAllConnectionsToSQLExplorer();
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
}
Program: 136949
Project: 136949
Buggy source:
/** 
 * run analysis when SqlParallelExecutor.
 * @return true if successfull , false otherwise.
 */
public Boolean run(){
  Expression query=null;
  try {
    if (indicator instanceof CompositeIndicator) {
      return Boolean.TRUE;
    }
synchronized (schemata) {
      String catalogName=getCatalogOrSchemaName(indicator.getAnalyzedElement());
      if (catalogName != null) {
        changeCatalog(catalogName,connection);
      }
    }
synchronized (elementToIndicator) {
      MultiMapHelper.addUniqueObjectToListMap(indicator.getAnalyzedElement(),indicator,elementToIndicator);
    }
    query=dbms().getInstantiatedExpression(indicator);
    if (query == null) {
      traceError(getErrorMessageForQuery(query));
      return Boolean.FALSE;
    }
    try {
      boolean execStatus=executeQuery(indicator,connection,query.getBody());
      if (!execStatus) {
        traceError(getErrorMessageForQuery(query));
        return Boolean.FALSE;
      }
    }
 catch (    SQLException e) {
      traceError(getErrorMessageForQuery(query));
      return Boolean.FALSE;
    }
    indicator.setComputed(true);
  }
  finally {
    if (POOLED_CONNECTION) {
      TdqAnalysisConnectionPool.returnPooledConnection(cachedAnalysis,connection);
    }
  }
  return Boolean.TRUE;
}

Fixed version (ground truth):
/** 
 * run analysis when SqlParallelExecutor.
 * @return true if successfull , false otherwise.
 */
public Boolean run(){
  Expression query=null;
  try {
    if (indicator instanceof CompositeIndicator) {
      return Boolean.TRUE;
    }
synchronized (schemata) {
      String catalogName=getCatalogOrSchemaName(indicator.getAnalyzedElement());
      if (catalogName != null) {
        changeCatalog(catalogName,connection);
      }
    }
synchronized (elementToIndicator) {
      MultiMapHelper.addUniqueObjectToListMap(indicator.getAnalyzedElement(),indicator,elementToIndicator);
    }
    query=dbms().getInstantiatedExpression(indicator);
    if (query == null) {
      traceError(getErrorMessageForQuery(query));
      return Boolean.FALSE;
    }
    try {
      boolean execStatus=executeQuery(indicator,connection,query.getBody());
      if (!execStatus) {
        traceError(getErrorMessageForQuery(query));
        return Boolean.FALSE;
      }
    }
 catch (    SQLException e) {
      log.error(e,e);
      traceError(getErrorMessageForQuery(query));
      return Boolean.FALSE;
    }
    indicator.setComputed(true);
  }
  finally {
    if (POOLED_CONNECTION) {
      TdqAnalysisConnectionPool.returnPooledConnection(cachedAnalysis,connection);
    }
  }
  return Boolean.TRUE;
}
Program: 136951
Project: 136951
Buggy source:
/** 
 * orgnize EList 'objectLs' by SQL.
 * @param sqlStatement
 * @param ok
 * @return
 * @throws SQLException
 */
private ReturnCode evaluateBySql(String sqlStatement,ReturnCode ok) throws SQLException {
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=createStatement();
    if (continueRun()) {
      if (log.isInfoEnabled()) {
        log.info("String_Node_Str" + sqlStatement);
      }
      statement.execute(sqlStatement);
    }
    resultSet=statement.getResultSet();
    List<String> columnNames=getAnalyzedElementsName();
    if (resultSet == null) {
      String mess=Messages.getString("String_Node_Str",sqlStatement);
      log.warn(mess);
      ok.setReturnCode(mess,false);
      return ok;
    }
    EMap<Indicator,AnalyzedDataSet> indicToRowMap=analysis.getResults().getIndicToRowMap();
    indicToRowMap.clear();
    while (resultSet.next()) {
      if (!continueRun()) {
        break;
      }
      EList<Object> objectLs=new BasicEList<Object>();
      Iterator<String> it=columnNames.iterator();
      while (it.hasNext()) {
        Object obj=resultSet.getObject(it.next());
        objectLs.add(obj);
      }
      if (objectLs.size() == 0) {
        continue;
      }
      handleObjects(objectLs,resultSet);
    }
  }
 catch (  Exception exc) {
    log.error(exc,exc);
  }
 finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    getConnection().close();
  }
  return ok;
}

Fixed version (ground truth):
/** 
 * orgnize EList 'objectLs' by SQL.
 * @param sqlStatement
 * @param ok
 * @return
 * @throws SQLException
 */
private ReturnCode evaluateBySql(String sqlStatement,ReturnCode ok) throws SQLException {
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=createStatement();
    if (continueRun()) {
      if (log.isInfoEnabled()) {
        log.info("String_Node_Str" + sqlStatement);
      }
      statement.execute(sqlStatement);
    }
    resultSet=statement.getResultSet();
    List<String> columnNames=getAnalyzedElementsName();
    if (resultSet == null) {
      String mess=Messages.getString("String_Node_Str",sqlStatement);
      log.warn(mess);
      ok.setReturnCode(mess,false);
      return ok;
    }
    EMap<Indicator,AnalyzedDataSet> indicToRowMap=analysis.getResults().getIndicToRowMap();
    indicToRowMap.clear();
    while (resultSet.next()) {
      if (!continueRun()) {
        break;
      }
      EList<Object> objectLs=new BasicEList<Object>();
      Iterator<String> it=columnNames.iterator();
      while (it.hasNext()) {
        Object obj=resultSet.getObject(it.next());
        objectLs.add(obj);
      }
      if (objectLs.size() == 0) {
        continue;
      }
      handleObjects(objectLs,resultSet);
    }
  }
  finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    getConnection().close();
  }
  return ok;
}
Program: 136952
Project: 136952
Buggy source:
public void removeAllSurvivorship(){
  matchRuleDef.getSurvivorshipKeys().clear();
  redrawnSubTableContent();
}

Fixed version (ground truth):
public void removeAllSurvivorship(){
  matchRuleDef.getSurvivorshipKeys().clear();
}
Program: 136953
Project: 136953
Buggy source:
@Override protected void setInput(MatchRule matchRule,AbsMatchAnalysisTableComposite<?> matchRuleComposite){
  List<MatchKeyAndSurvivorDefinition> keyList=getKeyList(matchRule,Boolean.FALSE);
  ((MatchKeyAndSurvivorTableComposite)matchRuleComposite).setInput(keyList);
}

Fixed version (ground truth):
@Override protected void setInput(MatchRule matchRule,AbsMatchAnalysisTableComposite<?> matchRuleComposite){
  List<MatchKeyAndSurvivorDefinition> generatedSurvivorKeyList=generateSurvivorKeyByMatchKey(matchRule,Boolean.FALSE);
  ((MatchKeyAndSurvivorTableComposite)matchRuleComposite).setInput(generatedSurvivorKeyList);
}
Program: 136954
Project: 136954
Buggy source:
/** 
 * DOC zhao Comment method "handleTSwooshButtonSelection".
 */
private void handleTSwooshButtonSelection(){
  isVSRMode=false;
  matchKeySection.setAddColumn(true);
  notifyOtherSections();
  algorithmName=RecordMatcherType.T_SwooshAlgorithm.name();
  matchRuleDef.setRecordLinkageAlgorithm(algorithmName);
  if (!isShowBlockingKeySection(isVSRMode)) {
    blockKeySection.removeAllBlockingKey();
  }
  listeners.firePropertyChange(MatchAnalysisConstant.ISDIRTY_PROPERTY,RecordMatcherType.simpleVSRMatcher.name(),RecordMatcherType.T_SwooshAlgorithm.name());
}

Fixed version (ground truth):
/** 
 * DOC zhao Comment method "handleTSwooshButtonSelection".
 */
private void handleTSwooshButtonSelection(){
  isVSRMode=false;
  matchKeySection.setAddColumn(true);
  notifyOtherSections();
  algorithmName=RecordMatcherType.T_SwooshAlgorithm.name();
  matchRuleDef.setRecordLinkageAlgorithm(algorithmName);
  listeners.firePropertyChange(MatchAnalysisConstant.ISDIRTY_PROPERTY,RecordMatcherType.simpleVSRMatcher.name(),RecordMatcherType.T_SwooshAlgorithm.name());
}