nus-yam/ex-repair huggingface dataset:
Program: 137189
Project: 137189
Buggy source:
public Set<java.util.Map.Entry<K,V>> entrySet(){
  return dbMap.entrySet();
}

Fixed version (ground truth):
@Override public Set<java.util.Map.Entry<K,V>> entrySet(){
  return dbMap.entrySet();
}
Program: 137190
Project: 137190
Buggy source:
public boolean containsKey(Object key){
  if (key == null) {
    return dbMap.containsKey(EMPTY);
  }
  return dbMap.containsKey(key);
}

Fixed version (ground truth):
@Override public boolean containsKey(Object key){
  if (key == null) {
    return dbMap.containsKey(EMPTY);
  }
  return dbMap.containsKey(key);
}
Program: 137191
Project: 137191
Buggy source:
public java.util.Map.Entry<K,V> floorEntry(K key){
  return dbMap.floorEntry(key);
}

Fixed version (ground truth):
@Override public java.util.Map.Entry<K,V> floorEntry(K key){
  return dbMap.floorEntry(key);
}
Program: 137192
Project: 137192
Buggy source:
public ConcurrentNavigableMap<K,V> subMap(K fromKey,K toKey){
  return dbMap.subMap(fromKey,toKey);
}

Fixed version (ground truth):
@Override public ConcurrentNavigableMap<K,V> subMap(K fromKey,K toKey){
  return dbMap.subMap(fromKey,toKey);
}
Program: 137193
Project: 137193
Buggy source:
public void clear(){
  this.getDB().delete(mapName);
  this.getDB().getEngine().clearCache();
}

Fixed version (ground truth):
@Override public void clear(){
  if (!getDB().isClosed()) {
    dbMap.clear();
    this.getDB().delete(mapName);
    this.getDB().getEngine().clearCache();
  }
}
Program: 137194
Project: 137194
Buggy source:
public K ceilingKey(K key){
  return dbMap.ceilingKey(key);
}

Fixed version (ground truth):
@Override public K ceilingKey(K key){
  return dbMap.ceilingKey(key);
}
Program: 137195
Project: 137195
Buggy source:
public java.util.Map.Entry<K,V> pollLastEntry(){
  return dbMap.pollLastEntry();
}

Fixed version (ground truth):
@Override public java.util.Map.Entry<K,V> pollLastEntry(){
  return dbMap.pollLastEntry();
}
Program: 137196
Project: 137196
Buggy source:
public Comparator<? super K> comparator(){
  return dbMap.comparator();
}

Fixed version (ground truth):
@Override public Comparator<? super K> comparator(){
  return dbMap.comparator();
}
Program: 137197
Project: 137197
Buggy source:
public java.util.Map.Entry<K,V> lastEntry(){
  return dbMap.lastEntry();
}

Fixed version (ground truth):
@Override public java.util.Map.Entry<K,V> lastEntry(){
  return dbMap.lastEntry();
}
Program: 137198
Project: 137198
Buggy source:
public K firstKey(){
  return dbMap.firstKey();
}

Fixed version (ground truth):
@Override public K firstKey(){
  return dbMap.firstKey();
}
Program: 137199
Project: 137199
Buggy source:
public K lowerKey(K key){
  return dbMap.lowerKey(key);
}

Fixed version (ground truth):
@Override public K lowerKey(K key){
  return dbMap.lowerKey(key);
}
Program: 137200
Project: 137200
Buggy source:
public ConcurrentNavigableMap<K,V> headMap(K toKey){
  return dbMap.headMap(toKey);
}

Fixed version (ground truth):
@Override public ConcurrentNavigableMap<K,V> headMap(K toKey){
  return dbMap.headMap(toKey);
}
Program: 137201
Project: 137201
Buggy source:
public V putIfAbsent(K key,V value){
  return dbMap.putIfAbsent(key,value);
}

Fixed version (ground truth):
@Override public V putIfAbsent(K key,V value){
  return dbMap.putIfAbsent(key,value);
}
Program: 137202
Project: 137202
Buggy source:
public ConcurrentNavigableMap<K,V> tailMap(K fromKey){
  return dbMap.tailMap(fromKey);
}

Fixed version (ground truth):
@Override public ConcurrentNavigableMap<K,V> tailMap(K fromKey){
  return dbMap.tailMap(fromKey);
}
Program: 137203
Project: 137203
Buggy source:
@Override public boolean reset(){
  if (this.isUsedMapDBMode()) {
    if (needReconnect((AbstractDB<?>)duplicateMap)) {
      duplicateMap=initValueForDBMap(StandardDBName.computeProcess.name());
      if (duplicateMap != null) {
        duplicateMap.clear();
      }
    }
    if (needReconnect((AbstractDB<?>)duplicateMap)) {
      duplicateObjects=initValueForDBSet(StandardDBName.computeProcessSet.name());
      if (duplicateObjects != null) {
        duplicateObjects.clear();
      }
    }
  }
  return super.reset();
}

Fixed version (ground truth):
@Override public boolean reset(){
  if (this.isUsedMapDBMode()) {
    if (needReconnect((AbstractDB<?>)duplicateMap)) {
      duplicateMap=initValueForDBMap(StandardDBName.computeProcess.name());
      duplicateMap.clear();
    }
    if (needReconnect((AbstractDB<?>)duplicateObjects)) {
      duplicateObjects=initValueForDBSet(StandardDBName.computeProcessSet.name());
      duplicateObjects.clear();
    }
  }
 else {
    duplicateMap=initValueForDBMap(StandardDBName.computeProcess.name());
    duplicateObjects=initValueForDBSet(StandardDBName.computeProcessSet.name());
    duplicateMap.clear();
    duplicateObjects.clear();
  }
  return super.reset();
}
Program: 137204
Project: 137204
Buggy source:
@Override public DataSet getCurrentPageDataSet(){
  long pageSize=endIndex - startIndex;
  Comparable[][] compareArray=new Comparable[(int)(pageSize)][this.getColumns().length];
  List<Object[]> subList=MapDBUtils.getDefault().getDataSetDBMapSubList(this.dataMap,startIndex,endIndex,null);
  if (columnFilter != null) {
    subList=columnFilter.filterArray(subList);
  }
  for (int i=0; i < pageSize; i++) {
    Object[] objArray=subList.get(i);
    for (int j=0; j < this.getColumns().length; j++) {
      compareArray[i][j]=(Comparable)objArray[j];
    }
  }
  return new DataSet(this.columnHeads,compareArray);
}

Fixed version (ground truth):
@Override public DataSet getCurrentPageDataSet(){
  long pageSize=endIndex - startIndex;
  List<Object[]> subList=MapDBUtils.getDefault().getDataSetDBMapSubList(this.dataMap,startIndex,endIndex,null);
  if (columnFilter != null) {
    subList=columnFilter.filterArray(subList);
  }
  int count=(int)(pageSize > subList.size() ? subList.size() : pageSize);
  Comparable[][] compareArray=new Comparable[(count)][this.getColumns().length];
  for (int i=0; i < count; i++) {
    Object[] objArray=subList.get(i);
    for (int j=0; j < objArray.length; j++) {
      compareArray[i][j]=(Comparable)objArray[j];
    }
  }
  return new DataSet(this.columnHeads,compareArray);
}
Program: 137205
Project: 137205
Buggy source:
public List<Object[]> executeQuery(DataManager connection,List<ModelElement> analysedElements) throws SQLException {
  dataFromTable.clear();
  try {
    beginQuery();
  }
 catch (  Exception e1) {
    log.error(e1.getMessage(),e1);
    return dataFromTable;
  }
  int columnListSize=analysedElements.size();
  TypedReturnCode<java.sql.Connection> sqlconnection=JavaSqlFactory.createConnection((Connection)connection);
  if (!sqlconnection.isOk()) {
    MessageDialogWithToggle.openWarning(Display.getCurrent().getActiveShell(),Messages.getString("String_Node_Str"),sqlconnection.getMessage());
    throw new SQLException(sqlconnection.getMessage());
  }
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=sqlconnection.getObject().createStatement();
    statement.execute(createSqlStatement(connection,analysedElements));
    resultSet=statement.getResultSet();
    while (resultSet.next()) {
      Object[] oneRow=new Object[columnListSize];
      for (int i=0; i < columnListSize; i++) {
        oneRow[i]=resultSet.getObject(i + 1);
      }
      handleRow(oneRow);
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
 finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    ReturnCode closed=ConnectionUtils.closeConnection(sqlconnection.getObject());
    if (!closed.isOk()) {
      log.error(closed.getMessage());
    }
  }
  try {
    endQuery();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return dataFromTable;
}

Fixed version (ground truth):
public List<Object[]> executeQuery(DataManager connection,List<ModelElement> analysedElements) throws SQLException {
  dataFromTable.clear();
  try {
    beginQuery();
  }
 catch (  Exception e1) {
    log.error(e1.getMessage(),e1);
    return dataFromTable;
  }
  int columnListSize=analysedElements.size();
  TypedReturnCode<java.sql.Connection> sqlconnection=getSQLConnection(connection);
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=sqlconnection.getObject().createStatement();
    statement.execute(createSqlStatement(connection,analysedElements));
    resultSet=statement.getResultSet();
    while (resultSet.next()) {
      Object[] oneRow=new Object[columnListSize];
      for (int i=0; i < columnListSize; i++) {
        oneRow[i]=resultSet.getObject(i + 1);
      }
      handleRow(oneRow);
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
 finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    ReturnCode closed=ConnectionUtils.closeConnection(sqlconnection.getObject());
    if (!closed.isOk()) {
      log.error(closed.getMessage());
    }
  }
  try {
    endQuery();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return dataFromTable;
}
Program: 137206
Project: 137206
Buggy source:
public StoreOnDiskHandler(RecordMatchingIndicator recordMatchingIndicator,final Map<MetadataColumn,String> columnMap,String container,int buffSize) throws IOException {
  this.columnMap=columnMap;
  this.recordMatchingIndicator=recordMatchingIndicator;
  ExecuteMatchRuleHandler handler=new ExecuteMatchRuleHandler();
  this.blockKeyDefinitions=handler.getBlockKeySchema(StoreOnDiskHandler.this.recordMatchingIndicator);
  initPersistentLookupManager(container,buffSize);
  generateKeyAPI=new AbstractGenerateKey();
}

Fixed version (ground truth):
public StoreOnDiskHandler(RecordMatchingIndicator recordMatchingIndicator,final Map<MetadataColumn,String> columnMap,String container,int buffSize) throws IOException {
  this.columnMap=columnMap;
  this.recordMatchingIndicator=recordMatchingIndicator;
  this.blockKeyDefinitions=AnalysisRecordGroupingUtils.getBlockKeySchema(StoreOnDiskHandler.this.recordMatchingIndicator);
  initPersistentLookupManager(container,buffSize);
  generateKeyAPI=new AbstractGenerateKey();
}
Program: 137207
Project: 137207
Buggy source:
/** 
 * set StoreData Value And Status.
 */
private void setStoreDataValueAndStatus(){
  if (execLang.equals(ExecutionLanguage.JAVA.getLiteral())) {
    storeDataCheck.setSelection(true);
    storeDataCheck.setEnabled(false);
  }
 else {
    storeDataCheck.setSelection(simpleStatIndicator.isStoreData());
    storeDataCheck.setEnabled(true);
  }
}

Fixed version (ground truth):
/** 
 * set StoreData Value And Status.
 */
private void setStoreDataValueAndStatus(){
  if (execLang.equals(ExecutionLanguage.JAVA.getLiteral())) {
    storeDataCheck.setSelection(true);
    storeDataCheck.setEnabled(false);
  }
 else {
    storeDataCheck.setSelection(simpleStatIndicator.isStoreData());
    storeDataCheck.setEnabled(true);
  }
  simpleStatIndicator.setStoreData(storeDataCheck.getSelection());
  allMatchIndicator.setStoreData(storeDataCheck.getSelection());
}
Program: 137208
Project: 137208
Buggy source:
/** 
 * Get the name of MapDB
 * @return
 */
private String getDBMapName(AnalysisType analysisType,Indicator indicator,String selectValue){
  String dbMapName=StandardDBName.drillDown.name();
  if (FrequencyIndicator.class.isInstance(indicator)) {
    dbMapName=selectValue;
  }
 else   if (LengthIndicator.class.isInstance(indicator)) {
    String selectValueLength=((LengthIndicator)indicator).getLength().toString();
    dbMapName=selectValue + selectValueLength;
  }
 else   if (AnalysisType.COLUMN_SET == analysisType) {
    dbMapName=StandardDBName.dataSection.name();
  }
  return dbMapName;
}

Fixed version (ground truth):
/** 
 * Get the name of MapDB
 * @return
 */
private String getDBMapName(AnalysisType analysisType,Indicator indicator,String selectValue){
  String dbMapName=StandardDBName.drillDown.name();
  if (FrequencyIndicator.class.isInstance(indicator)) {
    dbMapName=selectValue;
  }
 else   if (LengthIndicator.class.isInstance(indicator)) {
    String selectValueLength;
    Long length=((LengthIndicator)indicator).getLength();
    if (length != null) {
      selectValueLength=length.toString();
    }
 else {
      selectValueLength=((LengthIndicator)indicator).getRealValue().toString();
    }
    dbMapName=selectValue + selectValueLength;
  }
 else   if (AnalysisType.COLUMN_SET == analysisType) {
    dbMapName=StandardDBName.dataSection.name();
  }
  return dbMapName;
}
Program: 137210
Project: 137210
Buggy source:
/** 
 * clear DrillDown Maps.
 * @param valueToFreqForMapDB2
 */
@SuppressWarnings("String_Node_Str") protected void clearDrillDownMaps(){
  AbstractDB<?> mapDB=getMapDB(StandardDBName.drillDown.name());
  mapDB.clearDB();
}

Fixed version (ground truth):
/** 
 * clear DrillDown Maps.
 * @param valueToFreqForMapDB2
 */
@SuppressWarnings("String_Node_Str") protected void clearDrillDownMaps(){
  AbstractDB<?> mapDB=getMapDB(StandardDBName.drillDown.name());
  if (mapDB != null) {
    mapDB.clearDB();
  }
}
Program: 137211
Project: 137211
Buggy source:
@Override public boolean reset(){
  this.uniqueValueCount=0L;
  this.distinctValueCount=0L;
  this.distinctComputed=false;
  this.datePattern=null;
  if (isUsedMapDBMode()) {
    if (valueToFreqForMapDB != null) {
      if (checkAllowDrillDown()) {
        clearDrillDownMaps();
      }
 else {
        ((DBMap<Object,Long>)valueToFreqForMapDB).clear();
      }
    }
    valueToFreqForMapDB=initValueForDBMap(FREQUENCYMAPNAME);
  }
 else {
    this.getValueToFreq().clear();
  }
  return super.reset();
}

Fixed version (ground truth):
@Override public boolean reset(){
  this.uniqueValueCount=0L;
  this.distinctValueCount=0L;
  this.distinctComputed=false;
  this.datePattern=null;
  if (isUsedMapDBMode()) {
    if (checkAllowDrillDown()) {
      clearDrillDownMaps();
    }
    valueToFreqForMapDB=initValueForDBMap(FREQUENCYMAPNAME);
    if (valueToFreqForMapDB != null && !valueToFreqForMapDB.isEmpty()) {
      valueToFreqForMapDB.clear();
    }
  }
 else {
    this.getValueToFreq().clear();
  }
  return super.reset();
}
Program: 137212
Project: 137212
Buggy source:
@Override public void run(){
  if (db != null && !db.isClosed()) {
    db.close();
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (db != null && !db.isClosed()) {
    MapDBManager.getInstance().removeDB(dbFile);
    db.close();
  }
}
Program: 137213
Project: 137213
Buggy source:
public CloseDBTimeTask(DB closeDb){
  this.db=closeDb;
}

Fixed version (ground truth):
public CloseDBTimeTask(DB closeDb,File filePath){
  this.db=closeDb;
  dbFile=filePath;
}
Program: 137214
Project: 137214
Buggy source:
private void closeDB(DB db){
  if (db == null) {
    return;
  }
  scheduleCloseTask(db);
}

Fixed version (ground truth):
private void closeDB(DB db,File filePath){
  if (db == null) {
    return;
  }
  scheduleCloseTask(db,filePath);
}
Program: 137215
Project: 137215
Buggy source:
/** 
 * DOC talend Comment method "scheduleCloseTask".
 * @param db
 */
protected void scheduleCloseTask(DB db){
  CloseDBTimeTask closeDBTimeTask=new CloseDBTimeTask(db);
  timer.schedule(closeDBTimeTask,CLOSE_TIME_DELAY);
  closeTaskMap.put(db,closeDBTimeTask);
}

Fixed version (ground truth):
/** 
 * DOC talend Comment method "scheduleCloseTask".
 * @param db
 */
protected void scheduleCloseTask(DB db,File filePath){
  CloseDBTimeTask closeDBTimeTask=new CloseDBTimeTask(db,filePath);
  timer.schedule(closeDBTimeTask,CLOSE_TIME_DELAY);
  closeTaskMap.put(db,closeDBTimeTask);
}
Program: 137216
Project: 137216
Buggy source:
/** 
 * Reduce the times which one db be used. When the count of times is 0 we will close this db.
 * @param filePath
 */
public void removeDBRef(File filePath){
  DB db=dbMap.get(filePath);
  if (db == null) {
    return;
  }
  Integer refConut=dbRefCountMap.get(db);
  if (refConut == null) {
    return;
  }
  refConut--;
  if (refConut > 0) {
    dbRefCountMap.put(db,refConut);
  }
 else {
    dbRefCountMap.remove(db);
    dbMap.remove(filePath);
    closeDB(db);
  }
}

Fixed version (ground truth):
/** 
 * Reduce the times which one db be used. When the count of times is 0 we will close this db.
 * @param filePath
 */
public void removeDBRef(File filePath){
  DB db=dbMap.get(filePath);
  if (db == null) {
    return;
  }
  Integer refConut=dbRefCountMap.get(db);
  if (refConut == null) {
    return;
  }
  refConut--;
  if (refConut > 0) {
    dbRefCountMap.put(db,refConut);
  }
 else {
    dbRefCountMap.remove(db);
    closeDB(db,filePath);
  }
}
Program: 137217
Project: 137217
Buggy source:
/** 
 * whether match records in different groups.
 */
protected boolean isMatchDiffGroups(){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str");
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @return <code>true</code> if algorithm should try to match records from different groups.
 */
protected boolean isMatchDiffGroups(){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str");
  }
  return false;
}
Program: 137218
Project: 137218
Buggy source:
@Override public List<Record> execute(Iterator<Record> sourceRecords,Callback callback){
  if (callback == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  List<Record> mergedRecords=new ArrayList<Record>();
  int index=0;
  Queue<Record> queue=new ProcessQueue<Record>(sourceRecords);
  callback.onBeginProcessing();
  while (!queue.isEmpty() && !callback.isInterrupted()) {
    if (LOGGER.isDebugEnabled() && index % 10000 == 0) {
      LOGGER.debug("String_Node_Str" + index);
    }
    Record currentRecord=queue.poll();
    matchOneRecord(callback,mergedRecords,queue,currentRecord);
    index++;
  }
  callback.onEndProcessing();
  return mergedRecords;
}

Fixed version (ground truth):
/** 
 * <p> Performs match & merge operation on <code>record</code>. For algorithm purposes, the list of previously merged records (<code>mergedRecords</code>) as well as the queue of records (<code>queue</code>) to be processed are needed. </p> <p> A <code>callback</code> is used to notify calling code about decisions the processing does. </p>
 * @param record The record to be compared to previously merged records.
 * @param mergedRecords The previously merged records.
 * @param queue Queue of records to be processed: in case of new merge, algorithm is expected to publish new mergedrecord on this queue for later processing.
 * @param callback A {@link org.talend.dataquality.matchmerge.MatchMergeAlgorithm.Callback} to notify callers ofdecisions the algorithm takes.
 */
protected void execute(Record record,List<Record> mergedRecords,Queue<Record> queue,Callback callback){
  callback.onBeginRecord(record);
  if (record == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  boolean hasCreatedNewMerge=false;
  for (  Record mergedRecord : mergedRecords) {
    MatchResult matchResult=doMatch(mergedRecord,record);
    if (matchResult.isMatch()) {
      callback.onMatch(mergedRecord,record,matchResult);
      Record newMergedRecord=merger.merge(record,mergedRecord);
      queue.offer(newMergedRecord);
      callback.onNewMerge(newMergedRecord);
      mergedRecords.remove(mergedRecord);
      callback.onRemoveMerge(mergedRecord);
      hasCreatedNewMerge=true;
      break;
    }
 else {
      callback.onDifferent(mergedRecord,record,matchResult);
    }
  }
  if (!hasCreatedNewMerge) {
    record.getRelatedIds().add(record.getId());
    mergedRecords.add(record);
    callback.onNewMerge(record);
  }
  callback.onEndRecord(record);
}
Program: 137219
Project: 137219
Buggy source:
public List<Record> getResult(){
  while (!queue.isEmpty() && !callback.isInterrupted()) {
    Record currentRecord=queue.poll();
    matchOneRecord(callback,mergedRecords,queue,currentRecord);
  }
  callback.onEndProcessing();
  return this.mergedRecords;
}

Fixed version (ground truth):
public List<Record> getResult(){
  while (!queue.isEmpty() && !callback.isInterrupted()) {
    Record currentRecord=queue.poll();
    execute(currentRecord,mergedRecords,queue,callback);
  }
  callback.onEndProcessing();
  return this.mergedRecords;
}
Program: 137220
Project: 137220
Buggy source:
/** 
 * do the match on one record
 * @param oneRecord
 */
public void matchOneRecord(Record oneRecord){
  matchOneRecord(callback,mergedRecords,queue,oneRecord);
}

Fixed version (ground truth):
/** 
 * do the match on one record
 * @param oneRecord
 */
public void matchOneRecord(Record oneRecord){
  execute(oneRecord,mergedRecords,queue,callback);
}
Program: 137221
Project: 137221
Buggy source:
/** 
 * DOC yyin Comment method "useCsvReader".
 * @param file
 * @param delimitedFileconnection
 * @param analysisElementList
 * @throws IOException
 */
private void useCsvReader(File file,DelimitedFileConnection delimitedFileconnection,List<ModelElement> analysisElementList) throws IOException {
  csvLimitValue=JavaSqlFactory.getLimitValue(delimitedFileconnection);
  csvHeadValue=JavaSqlFactory.getHeadValue(delimitedFileconnection);
  csvReader=AnalysisExecutorHelper.createCsvReader(file,delimitedFileconnection);
  AnalysisExecutorHelper.initializeCsvReader(delimitedFileconnection,csvReader);
  findElementPosition(analysisElementList);
}

Fixed version (ground truth):
/** 
 * DOC yyin Comment method "useCsvReader".
 * @param file
 * @param delimitedFileconnection
 * @param analysisElementList
 * @throws IOException
 */
private void useCsvReader(File file,DelimitedFileConnection delimitedFileconnection,List<ModelElement> analysisElementList) throws IOException {
  csvLimitValue=AnalysisExecutorHelper.getLimitValue(delimitedFileconnection);
  csvHeadValue=AnalysisExecutorHelper.getHeadValue(delimitedFileconnection);
  csvReader=AnalysisExecutorHelper.createCsvReader(file,delimitedFileconnection);
  AnalysisExecutorHelper.initializeCsvReader(delimitedFileconnection,csvReader);
  findElementPosition(analysisElementList);
}
Program: 137222
Project: 137222
Buggy source:
public DelimitedFileIterator(DelimitedFileConnection delimitedFileconnection,List<ModelElement> analysisElementList){
  String path=JavaSqlFactory.getURL(delimitedFileconnection);
  IPath iPath=new Path(path);
  File file=iPath.toFile();
  if (!file.exists()) {
    return;
  }
  isCSV=Escape.CSV.equals(delimitedFileconnection.getEscapeType());
  analysedColumnIndex=new int[analysisElementList.size()];
  analysedColumnName=new String[analysisElementList.size()];
  try {
    if (isCSV) {
      useCsvReader(file,delimitedFileconnection,analysisElementList);
    }
 else {
      useFileInputDelimited(file,delimitedFileconnection,analysisElementList);
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public DelimitedFileIterator(DelimitedFileConnection delimitedFileconnection,List<ModelElement> analysisElementList){
  String path=AnalysisExecutorHelper.getFilePath(delimitedFileconnection);
  IPath iPath=new Path(path);
  File file=iPath.toFile();
  if (!file.exists()) {
    return;
  }
  isCSV=Escape.CSV.equals(delimitedFileconnection.getEscapeType());
  analysedColumnIndex=new int[analysisElementList.size()];
  analysedColumnName=new String[analysisElementList.size()];
  try {
    if (isCSV) {
      useCsvReader(file,delimitedFileconnection,analysisElementList);
    }
 else {
      useFileInputDelimited(file,delimitedFileconnection,analysisElementList);
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 137227
Project: 137227
Buggy source:
public List<Object[]> executeQuery(DataManager connection,List<ModelElement> analysedElements) throws SQLException {
  dataFromTable.clear();
  try {
    beginQuery();
  }
 catch (  Exception e1) {
    log.error(e1.getMessage(),e1);
    return dataFromTable;
  }
  int columnListSize=analysedElements.size();
  TypedReturnCode<java.sql.Connection> sqlconnection=getSQLConnection(connection);
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=sqlconnection.getObject().createStatement();
    statement.execute(createSqlStatement(connection,analysedElements));
    resultSet=statement.getResultSet();
    while (resultSet.next()) {
      Object[] oneRow=new Object[columnListSize];
      for (int i=0; i < columnListSize; i++) {
        oneRow[i]=resultSet.getObject(i + 1);
      }
      handleRow(oneRow);
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
 finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    ReturnCode closed=ConnectionUtils.closeConnection(sqlconnection.getObject());
    if (!closed.isOk()) {
      log.error(closed.getMessage());
    }
  }
  try {
    endQuery();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return dataFromTable;
}

Fixed version (ground truth):
public List<Object[]> executeQuery(DataManager connection,List<ModelElement> analysedElements) throws SQLException {
  dataFromTable.clear();
  try {
    beginQuery();
  }
 catch (  Exception e1) {
    log.error(e1.getMessage(),e1);
    return dataFromTable;
  }
  int columnListSize=analysedElements.size();
  TypedReturnCode<java.sql.Connection> sqlconnection=JavaSqlFactory.createConnection((Connection)connection);
  if (!sqlconnection.isOk()) {
    MessageDialogWithToggle.openWarning(Display.getCurrent().getActiveShell(),Messages.getString("String_Node_Str"),sqlconnection.getMessage());
    throw new SQLException(sqlconnection.getMessage());
  }
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=sqlconnection.getObject().createStatement();
    statement.execute(createSqlStatement(connection,analysedElements));
    resultSet=statement.getResultSet();
    while (resultSet.next()) {
      Object[] oneRow=new Object[columnListSize];
      for (int i=0; i < columnListSize; i++) {
        oneRow[i]=resultSet.getObject(i + 1);
      }
      handleRow(oneRow);
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
 finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    ReturnCode closed=ConnectionUtils.closeConnection(sqlconnection.getObject());
    if (!closed.isOk()) {
      log.error(closed.getMessage());
    }
  }
  try {
    endQuery();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return dataFromTable;
}
Program: 137228
Project: 137228
Buggy source:
public StoreOnDiskHandler(RecordMatchingIndicator recordMatchingIndicator,final Map<MetadataColumn,String> columnMap,String container,int buffSize) throws IOException {
  this.columnMap=columnMap;
  this.recordMatchingIndicator=recordMatchingIndicator;
  this.blockKeyDefinitions=AnalysisRecordGroupingUtils.getBlockKeySchema(StoreOnDiskHandler.this.recordMatchingIndicator);
  initPersistentLookupManager(container,buffSize);
  generateKeyAPI=new AbstractGenerateKey();
}

Fixed version (ground truth):
public StoreOnDiskHandler(RecordMatchingIndicator recordMatchingIndicator,final Map<MetadataColumn,String> columnMap,String container,int buffSize) throws IOException {
  this.columnMap=columnMap;
  this.recordMatchingIndicator=recordMatchingIndicator;
  ExecuteMatchRuleHandler handler=new ExecuteMatchRuleHandler();
  this.blockKeyDefinitions=handler.getBlockKeySchema(StoreOnDiskHandler.this.recordMatchingIndicator);
  initPersistentLookupManager(container,buffSize);
  generateKeyAPI=new AbstractGenerateKey();
}
Program: 137229
Project: 137229
Buggy source:
public List<Object[]> executeQuery(DataManager connection,List<ModelElement> analysedElements) throws SQLException {
  dataFromTable.clear();
  try {
    beginQuery();
  }
 catch (  Exception e1) {
    log.error(e1.getMessage(),e1);
    return dataFromTable;
  }
  int columnListSize=analysedElements.size();
  TypedReturnCode<java.sql.Connection> sqlconnection=getSQLConnection(connection);
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=sqlconnection.getObject().createStatement();
    statement.execute(createSqlStatement(connection,analysedElements));
    resultSet=statement.getResultSet();
    while (resultSet.next()) {
      Object[] oneRow=new Object[columnListSize];
      for (int i=0; i < columnListSize; i++) {
        oneRow[i]=resultSet.getObject(i + 1);
      }
      handleRow(oneRow);
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
 finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    ReturnCode closed=ConnectionUtils.closeConnection(sqlconnection.getObject());
    if (!closed.isOk()) {
      log.error(closed.getMessage());
    }
  }
  try {
    endQuery();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return dataFromTable;
}

Fixed version (ground truth):
public List<Object[]> executeQuery(DataManager connection,List<ModelElement> analysedElements) throws SQLException {
  dataFromTable.clear();
  try {
    beginQuery();
  }
 catch (  Exception e1) {
    log.error(e1.getMessage(),e1);
    return dataFromTable;
  }
  int columnListSize=analysedElements.size();
  TypedReturnCode<java.sql.Connection> sqlconnection=JavaSqlFactory.createConnection((Connection)connection);
  if (!sqlconnection.isOk()) {
    MessageDialogWithToggle.openWarning(Display.getCurrent().getActiveShell(),Messages.getString("String_Node_Str"),sqlconnection.getMessage());
    throw new SQLException(sqlconnection.getMessage());
  }
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=sqlconnection.getObject().createStatement();
    statement.execute(createSqlStatement(connection,analysedElements));
    resultSet=statement.getResultSet();
    while (resultSet.next()) {
      Object[] oneRow=new Object[columnListSize];
      for (int i=0; i < columnListSize; i++) {
        oneRow[i]=resultSet.getObject(i + 1);
      }
      handleRow(oneRow);
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
 finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    ReturnCode closed=ConnectionUtils.closeConnection(sqlconnection.getObject());
    if (!closed.isOk()) {
      log.error(closed.getMessage());
    }
  }
  try {
    endQuery();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return dataFromTable;
}
Program: 137230
Project: 137230
Buggy source:
public StoreOnDiskHandler(RecordMatchingIndicator recordMatchingIndicator,final Map<MetadataColumn,String> columnMap,String container,int buffSize) throws IOException {
  this.columnMap=columnMap;
  this.recordMatchingIndicator=recordMatchingIndicator;
  this.blockKeyDefinitions=AnalysisRecordGroupingUtils.getBlockKeySchema(StoreOnDiskHandler.this.recordMatchingIndicator);
  initPersistentLookupManager(container,buffSize);
  generateKeyAPI=new AbstractGenerateKey();
}

Fixed version (ground truth):
public StoreOnDiskHandler(RecordMatchingIndicator recordMatchingIndicator,final Map<MetadataColumn,String> columnMap,String container,int buffSize) throws IOException {
  this.columnMap=columnMap;
  this.recordMatchingIndicator=recordMatchingIndicator;
  ExecuteMatchRuleHandler handler=new ExecuteMatchRuleHandler();
  this.blockKeyDefinitions=handler.getBlockKeySchema(StoreOnDiskHandler.this.recordMatchingIndicator);
  initPersistentLookupManager(container,buffSize);
  generateKeyAPI=new AbstractGenerateKey();
}
Program: 137231
Project: 137231
Buggy source:
/** 
 * DOC talend Comment method "filterViewValuesData".
 */
private Object[] filterViewValuesData(Object[] currentInputData){
  Object filterArray[]=new Object[remaindColumnIndexs.length];
  for (int remainIndex=0; remainIndex < remaindColumnIndexs.length; remainIndex++) {
    if (currentInputData.length >= remaindColumnIndexs[remainIndex]) {
      filterArray[remainIndex]=currentInputData[remaindColumnIndexs[remainIndex]];
    }
  }
  return filterArray;
}

Fixed version (ground truth):
/** 
 * DOC talend Comment method "filterViewValuesData".
 */
private Object[] filterViewValuesData(Object[] currentInputData){
  Object filterArray[]=new Object[remaindColumnIndexs.length];
  for (int remainIndex=0; remainIndex < remaindColumnIndexs.length; remainIndex++) {
    if (currentInputData != null && currentInputData.length >= remaindColumnIndexs[remainIndex]) {
      filterArray[remainIndex]=currentInputData[remaindColumnIndexs[remainIndex]];
    }
  }
  return filterArray;
}
Program: 137232
Project: 137232
Buggy source:
public List<Object[]> filterArray(List<Object[]> inputData){
  List<Object[]> retrunList=new ArrayList<Object[]>();
  for (int i=0; i < inputData.size(); i++) {
    Object[] currentInputData=inputData.get(i);
    if (remaindColumnIndexs.length == 1) {
      Object[] filterViewValuesData=filterViewValuesData(currentInputData);
      if (!isDuplicate(filterViewValuesData,retrunList)) {
        retrunList.add(filterViewValuesData);
      }
    }
 else {
      Object filterArray[]=new Object[remaindColumnIndexs.length];
      for (int remainIndex=0; remainIndex < remaindColumnIndexs.length; remainIndex++) {
        if (inputData.get(i).length >= remaindColumnIndexs[remainIndex]) {
          filterArray[remainIndex]=inputData.get(i)[remaindColumnIndexs[remainIndex]];
        }
      }
      retrunList.add(filterArray);
    }
  }
  return retrunList;
}

Fixed version (ground truth):
public List<Object[]> filterArray(List<Object[]> inputData){
  List<Object[]> returnList=new ArrayList<Object[]>();
  for (int i=0; i < inputData.size(); i++) {
    Object[] currentInputData=inputData.get(i);
    Object[] filterViewValuesData=filterViewValuesData(currentInputData);
    if (remaindColumnIndexs.length == 1) {
      if (!isDuplicate(filterViewValuesData,returnList)) {
        returnList.add(filterViewValuesData);
      }
    }
 else {
      returnList.add(filterViewValuesData);
    }
  }
  return returnList;
}
Program: 137233
Project: 137233
Buggy source:
/** 
 * Judge wheter current data is duplicate one
 * @param filterViewValuesData
 * @return
 */
private boolean isDuplicate(Object[] filterViewValuesData,List<Object[]> retrunList){
  for (  Object[] noDuplicateArray : retrunList) {
    if (noDuplicateArray[0] == null && filterViewValuesData[0] == null) {
      return true;
    }
 else     if (noDuplicateArray[0] == null || filterViewValuesData[0] == null) {
      continue;
    }
    if (noDuplicateArray[0].equals(filterViewValuesData[0])) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Judge wheter current data is duplicate one
 * @param filterViewValuesData
 * @return
 */
private boolean isDuplicate(Object[] filterViewValuesData,List<Object[]> returnList){
  for (  Object[] noDuplicateArray : returnList) {
    if (filterViewValuesData != null && filterViewValuesData.length > 0 && (noDuplicateArray != null && noDuplicateArray.length > 0)) {
      if (noDuplicateArray[0] == null && filterViewValuesData[0] == null) {
        return true;
      }
 else       if (noDuplicateArray[0] == null || filterViewValuesData[0] == null) {
        continue;
      }
      if (noDuplicateArray[0].equals(filterViewValuesData[0])) {
        return true;
      }
    }
  }
  return false;
}
Program: 137234
Project: 137234
Buggy source:
@Override public List<Object[]> subList(long fromIndex,long toIndex,Map<Long,K> indexMap){
  boolean stratToRecord=false;
  List<Object[]> returnList=new ArrayList<Object[]>();
  K fromKey=null;
  K toKey=null;
  if (indexMap != null) {
    fromKey=indexMap.get(fromIndex);
    toKey=indexMap.get(toIndex);
  }
  Iterator<K> iterator=null;
  int index=0;
  if (fromKey == null) {
    iterator=this.iterator();
  }
 else   if (toKey == null) {
    NavigableSet<K> tailSet=tailSet(fromKey,true);
    index=(int)fromIndex;
    iterator=tailSet.iterator();
  }
 else {
    NavigableSet<K> tailSet=subSet(fromKey,toKey);
    index=(int)fromIndex;
    iterator=tailSet.iterator();
  }
  while (iterator.hasNext()) {
    K next=iterator.next();
    if (index == 0 && fromKey == null && indexMap != null) {
      indexMap.put(0l,next);
    }
    if (index == fromIndex) {
      stratToRecord=true;
    }
    if (index == toIndex && indexMap != null) {
      if (toKey == null) {
        indexMap.put(toIndex,next);
      }
      break;
    }
    if (stratToRecord == true) {
      returnList.add(((List)this.get(next)).toArray());
    }
    index++;
  }
  return returnList;
}

Fixed version (ground truth):
@Override public List<Object[]> subList(long fromIndex,long toIndex,Map<Long,K> indexMap){
  boolean stratToRecord=false;
  List<Object[]> returnList=new ArrayList<Object[]>();
  K fromKey=null;
  K toKey=null;
  if (indexMap != null) {
    fromKey=indexMap.get(fromIndex);
    toKey=indexMap.get(toIndex);
  }
  Iterator<K> iterator=null;
  int index=0;
  if (fromKey == null) {
    iterator=this.iterator();
  }
 else   if (toKey == null) {
    NavigableSet<K> tailSet=tailSet(fromKey,true);
    index=(int)fromIndex;
    iterator=tailSet.iterator();
  }
 else {
    NavigableSet<K> tailSet=subSet(fromKey,toKey);
    index=(int)fromIndex;
    iterator=tailSet.iterator();
  }
  while (iterator.hasNext()) {
    K next=iterator.next();
    if (index == 0 && fromKey == null && indexMap != null) {
      indexMap.put(0l,next);
    }
    if (index == fromIndex) {
      stratToRecord=true;
    }
    if (index == toIndex && indexMap != null) {
      if (toKey == null) {
        indexMap.put(toIndex,next);
      }
      break;
    }
    if (stratToRecord == true) {
      V v=this.get(next);
      if (v.getClass().isArray()) {
        returnList.add((Object[])v);
      }
 else       if (v instanceof String) {
        returnList.add(((String)v).split("String_Node_Str"));
      }
 else {
        returnList.add(((List)v).toArray());
      }
    }
    index++;
  }
  return returnList;
}
Program: 137235
Project: 137235
Buggy source:
public List<Object[]> executeQuery(DataManager connection,List<ModelElement> analysedElements) throws SQLException {
  dataFromTable.clear();
  try {
    beginQuery();
  }
 catch (  Exception e1) {
    log.error(e1.getMessage(),e1);
    return dataFromTable;
  }
  int columnListSize=analysedElements.size();
  TypedReturnCode<java.sql.Connection> sqlconnection=JavaSqlFactory.createConnection((Connection)connection);
  if (!sqlconnection.isOk()) {
    MessageDialogWithToggle.openWarning(Display.getCurrent().getActiveShell(),Messages.getString("String_Node_Str"),sqlconnection.getMessage());
    throw new SQLException(sqlconnection.getMessage());
  }
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=sqlconnection.getObject().createStatement();
    statement.execute(createSqlStatement(connection,analysedElements));
    resultSet=statement.getResultSet();
    while (resultSet.next()) {
      Object[] oneRow=new Object[columnListSize];
      for (int i=0; i < columnListSize; i++) {
        oneRow[i]=resultSet.getObject(i + 1);
      }
      handleRow(oneRow);
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
 finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    ReturnCode closed=ConnectionUtils.closeConnection(sqlconnection.getObject());
    if (!closed.isOk()) {
      log.error(closed.getMessage());
    }
  }
  try {
    endQuery();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return dataFromTable;
}

Fixed version (ground truth):
public List<Object[]> executeQuery(DataManager connection,List<ModelElement> analysedElements) throws SQLException {
  dataFromTable.clear();
  try {
    beginQuery();
  }
 catch (  Exception e1) {
    log.error(e1.getMessage(),e1);
    return dataFromTable;
  }
  int columnListSize=analysedElements.size();
  TypedReturnCode<java.sql.Connection> sqlconnection=getSQLConnection(connection);
  Statement statement=null;
  ResultSet resultSet=null;
  try {
    statement=sqlconnection.getObject().createStatement();
    statement.execute(createSqlStatement(connection,analysedElements));
    resultSet=statement.getResultSet();
    while (resultSet.next()) {
      Object[] oneRow=new Object[columnListSize];
      for (int i=0; i < columnListSize; i++) {
        oneRow[i]=resultSet.getObject(i + 1);
      }
      handleRow(oneRow);
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
 finally {
    if (resultSet != null) {
      resultSet.close();
    }
    if (statement != null) {
      statement.close();
    }
    ReturnCode closed=ConnectionUtils.closeConnection(sqlconnection.getObject());
    if (!closed.isOk()) {
      log.error(closed.getMessage());
    }
  }
  try {
    endQuery();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return dataFromTable;
}
Program: 137236
Project: 137236
Buggy source:
public StoreOnDiskHandler(RecordMatchingIndicator recordMatchingIndicator,final Map<MetadataColumn,String> columnMap,String container,int buffSize) throws IOException {
  this.columnMap=columnMap;
  this.recordMatchingIndicator=recordMatchingIndicator;
  ExecuteMatchRuleHandler handler=new ExecuteMatchRuleHandler();
  this.blockKeyDefinitions=handler.getBlockKeySchema(StoreOnDiskHandler.this.recordMatchingIndicator);
  initPersistentLookupManager(container,buffSize);
  generateKeyAPI=new AbstractGenerateKey();
}

Fixed version (ground truth):
public StoreOnDiskHandler(RecordMatchingIndicator recordMatchingIndicator,final Map<MetadataColumn,String> columnMap,String container,int buffSize) throws IOException {
  this.columnMap=columnMap;
  this.recordMatchingIndicator=recordMatchingIndicator;
  this.blockKeyDefinitions=AnalysisRecordGroupingUtils.getBlockKeySchema(StoreOnDiskHandler.this.recordMatchingIndicator);
  initPersistentLookupManager(container,buffSize);
  generateKeyAPI=new AbstractGenerateKey();
}
Program: 137237
Project: 137237
Buggy source:
/** 
 * DOC yyin Comment method "useCsvReader".
 * @param file
 * @param delimitedFileconnection
 * @param analysisElementList
 * @throws IOException
 */
private void useCsvReader(File file,DelimitedFileConnection delimitedFileconnection,List<ModelElement> analysisElementList) throws IOException {
  csvLimitValue=AnalysisExecutorHelper.getLimitValue(delimitedFileconnection);
  csvHeadValue=AnalysisExecutorHelper.getHeadValue(delimitedFileconnection);
  csvReader=AnalysisExecutorHelper.createCsvReader(file,delimitedFileconnection);
  AnalysisExecutorHelper.initializeCsvReader(delimitedFileconnection,csvReader);
  findElementPosition(analysisElementList);
}

Fixed version (ground truth):
/** 
 * DOC yyin Comment method "useCsvReader".
 * @param file
 * @param delimitedFileconnection
 * @param analysisElementList
 * @throws IOException
 */
private void useCsvReader(File file,DelimitedFileConnection delimitedFileconnection,List<ModelElement> analysisElementList) throws IOException {
  csvLimitValue=JavaSqlFactory.getLimitValue(delimitedFileconnection);
  csvHeadValue=JavaSqlFactory.getHeadValue(delimitedFileconnection);
  csvReader=AnalysisExecutorHelper.createCsvReader(file,delimitedFileconnection);
  AnalysisExecutorHelper.initializeCsvReader(delimitedFileconnection,csvReader);
  findElementPosition(analysisElementList);
}
Program: 137238
Project: 137238
Buggy source:
public DelimitedFileIterator(DelimitedFileConnection delimitedFileconnection,List<ModelElement> analysisElementList){
  String path=AnalysisExecutorHelper.getFilePath(delimitedFileconnection);
  IPath iPath=new Path(path);
  File file=iPath.toFile();
  if (!file.exists()) {
    return;
  }
  isCSV=Escape.CSV.equals(delimitedFileconnection.getEscapeType());
  analysedColumnIndex=new int[analysisElementList.size()];
  analysedColumnName=new String[analysisElementList.size()];
  try {
    if (isCSV) {
      useCsvReader(file,delimitedFileconnection,analysisElementList);
    }
 else {
      useFileInputDelimited(file,delimitedFileconnection,analysisElementList);
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public DelimitedFileIterator(DelimitedFileConnection delimitedFileconnection,List<ModelElement> analysisElementList){
  String path=JavaSqlFactory.getURL(delimitedFileconnection);
  IPath iPath=new Path(path);
  File file=iPath.toFile();
  if (!file.exists()) {
    return;
  }
  isCSV=Escape.CSV.equals(delimitedFileconnection.getEscapeType());
  analysedColumnIndex=new int[analysisElementList.size()];
  analysedColumnName=new String[analysisElementList.size()];
  try {
    if (isCSV) {
      useCsvReader(file,delimitedFileconnection,analysisElementList);
    }
 else {
      useFileInputDelimited(file,delimitedFileconnection,analysisElementList);
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 137244
Project: 137244
Buggy source:
@Override public void update(ViewerCell cell){
  Object element=cell.getElement();
  int index=cell.getColumnIndex();
  cell.setText(getColumnText(element,index));
  cell.setForeground(getForeground(element,index));
}

Fixed version (ground truth):
@Override public void update(ViewerCell cell){
  Object element=cell.getElement();
  int index=cell.getColumnIndex();
  cell.setText(getColumnText(element,index));
  cell.setForeground(getForeground(element,index));
  cell.setBackground(getBackground(element,index));
}
Program: 137249
Project: 137249
Buggy source:
/** 
 * Get MapDB which store the drill down data for columnSet analysis
 * @param analysisType
 */
private AbstractDB<Object> getColumnSetAnalysisMapDB(AnalysisType analysisType){
  if (AnalysisType.COLUMN_SET == analysisType) {
    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.computeProcess.name());
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Get MapDB which store the drill down data for columnSet analysis
 * @param analysisType
 */
private AbstractDB<Object> getColumnSetAnalysisMapDB(AnalysisType analysisType){
  if (AnalysisType.COLUMN_SET == analysisType) {
    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;
}
Program: 137250
Project: 137250
Buggy source:
/** 
 * Get the name of MapDB
 * @return
 */
private String getDBMapName(AnalysisType analysisType){
  String dbMapName=StandardDBName.drillDown.name();
  if (FrequencyIndicator.class.isInstance(currIndicator)) {
    dbMapName=this.getSelectValue();
  }
 else   if (LengthIndicator.class.isInstance(currIndicator)) {
    String selectValue=((LengthIndicator)currIndicator).getLength().toString();
    dbMapName=this.getSelectValue() + selectValue;
  }
 else   if (AnalysisType.COLUMN_SET == analysisType) {
    dbMapName=StandardDBName.computeProcess.name();
  }
  return dbMapName;
}

Fixed version (ground truth):
/** 
 * Get the name of MapDB
 * @return
 */
private String getDBMapName(AnalysisType analysisType){
  String dbMapName=StandardDBName.drillDown.name();
  if (FrequencyIndicator.class.isInstance(currIndicator)) {
    dbMapName=this.getSelectValue();
  }
 else   if (LengthIndicator.class.isInstance(currIndicator)) {
    String selectValue=((LengthIndicator)currIndicator).getLength().toString();
    dbMapName=this.getSelectValue() + selectValue;
  }
 else   if (AnalysisType.COLUMN_SET == analysisType) {
    dbMapName=StandardDBName.dataSection.name();
  }
  return dbMapName;
}