nus-yam/ex-repair huggingface dataset:
Program: 31797
Project: 31797
Buggy source:
public void updateColumnConfig(ColumnConfig columnConfig){
  String varName=columnConfig.getColumnName();
  if (this.targetColumnName.equals(varName)) {
    columnConfig.setColumnFlag(ColumnConfig.ColumnFlag.Target);
  }
  if (this.setMeta.contains(varName)) {
    columnConfig.setColumnFlag(ColumnConfig.ColumnFlag.Meta);
  }
 else   if (this.setForceRemove.contains(varName)) {
    columnConfig.setColumnFlag(ColumnConfig.ColumnFlag.ForceRemove);
  }
 else   if (this.setForceSelect.contains(varName)) {
    columnConfig.setColumnFlag(ColumnConfig.ColumnFlag.ForceSelect);
  }
}

Fixed version (ground truth):
public void updateColumnConfig(ColumnConfig columnConfig){
  String varName=columnConfig.getColumnName();
  columnConfig.setColumnFlag(null);
  if (this.targetColumnName.equals(varName)) {
    columnConfig.setColumnFlag(ColumnConfig.ColumnFlag.Target);
  }
  if (this.setMeta.contains(varName)) {
    columnConfig.setColumnFlag(ColumnConfig.ColumnFlag.Meta);
  }
 else   if (this.setForceRemove.contains(varName)) {
    columnConfig.setColumnFlag(ColumnConfig.ColumnFlag.ForceRemove);
  }
 else   if (this.setForceSelect.contains(varName)) {
    columnConfig.setColumnFlag(ColumnConfig.ColumnFlag.ForceSelect);
  }
}
Program: 31798
Project: 31798
Buggy source:
/** 
 * Run model to compute score for input data map
 * @param rawDataMap - the whole original input data as map
 * @return CaseScoreResult
 */
public CaseScoreResult compute(Map<String,String> rawDataMap){
  CaseScoreResult scoreResult=new CaseScoreResult();
  if (this.scorer != null) {
    ScoreObject so=scorer.score(rawDataMap);
    if (so == null) {
      return null;
    }
    scoreResult.setScores(so.getScores());
    scoreResult.setMaxScore(so.getMaxScore());
    scoreResult.setMinScore(so.getMinScore());
    scoreResult.setAvgScore(so.getMeanScore());
    scoreResult.setMedianScore(so.getMedianScore());
  }
  if (MapUtils.isNotEmpty(this.subScorers)) {
    Iterator<Map.Entry<String,Scorer>> iterator=this.subScorers.entrySet().iterator();
    while (iterator.hasNext()) {
      Map.Entry<String,Scorer> entry=iterator.next();
      String modelName=entry.getKey();
      ScoreObject so=scorer.score(rawDataMap);
      if (so != null) {
        scoreResult.addSubModelScore(modelName,so);
      }
    }
  }
  return scoreResult;
}

Fixed version (ground truth):
/** 
 * Run model to compute score for input data map
 * @param rawDataMap - the whole original input data as map
 * @return CaseScoreResult
 */
public CaseScoreResult compute(Map<String,String> rawDataMap){
  CaseScoreResult scoreResult=new CaseScoreResult();
  if (this.scorer != null) {
    ScoreObject so=scorer.score(rawDataMap);
    if (so == null) {
      return null;
    }
    scoreResult.setScores(so.getScores());
    scoreResult.setMaxScore(so.getMaxScore());
    scoreResult.setMinScore(so.getMinScore());
    scoreResult.setAvgScore(so.getMeanScore());
    scoreResult.setMedianScore(so.getMedianScore());
  }
  if (MapUtils.isNotEmpty(this.subScorers)) {
    Iterator<Map.Entry<String,Scorer>> iterator=this.subScorers.entrySet().iterator();
    while (iterator.hasNext()) {
      Map.Entry<String,Scorer> entry=iterator.next();
      String modelName=entry.getKey();
      Scorer subScorer=entry.getValue();
      ScoreObject so=subScorer.score(rawDataMap);
      if (so != null) {
        scoreResult.addSubModelScore(modelName,so);
      }
    }
  }
  return scoreResult;
}
Program: 31799
Project: 31799
Buggy source:
@JsonIgnore public List<String> getScoreMetaColumns(ModelConfig modelConfig) throws IOException {
  if (scoreMetaColumns == null) {
synchronized (this) {
      if (scoreMetaColumns == null) {
        PathFinder pathFinder=new PathFinder(modelConfig);
        String delimiter=StringUtils.isBlank(dataSet.getHeaderDelimiter()) ? dataSet.getDataDelimiter() : dataSet.getHeaderDelimiter();
        if (StringUtils.isNotBlank(scoreMetaColumnNameFile) && SourceType.HDFS.equals(dataSet.getSource())) {
          String path=scoreMetaColumnNameFile;
          File file=new File(scoreMetaColumnNameFile);
          path=new Path(pathFinder.getEvalSetPath(this),file.getName()).toString();
          scoreMetaColumns=CommonUtils.readConfFileIntoList(path,dataSet.getSource(),delimiter);
        }
 else         if (StringUtils.isNotBlank(scoreMetaColumnNameFile) && SourceType.LOCAL.equals(dataSet.getSource())) {
          scoreMetaColumns=CommonUtils.readConfFileIntoList(scoreMetaColumnNameFile,dataSet.getSource(),delimiter);
        }
      }
    }
  }
  return scoreMetaColumns;
}

Fixed version (ground truth):
@JsonIgnore public List<String> getScoreMetaColumns(ModelConfig modelConfig) throws IOException {
  if (scoreMetaColumns == null) {
synchronized (this) {
      if (scoreMetaColumns == null) {
        PathFinder pathFinder=new PathFinder(modelConfig);
        if (StringUtils.isNotBlank(scoreMetaColumnNameFile) && SourceType.HDFS.equals(dataSet.getSource())) {
          String path=scoreMetaColumnNameFile;
          File file=new File(scoreMetaColumnNameFile);
          path=new Path(pathFinder.getEvalSetPath(this),file.getName()).toString();
          scoreMetaColumns=CommonUtils.readConfFileIntoList(path,dataSet.getSource(),dataSet.getHeaderDelimiter());
        }
      }
    }
  }
  return scoreMetaColumns;
}
Program: 31800
Project: 31800
Buggy source:
@JsonIgnore public List<String> getAllMetaColumns(ModelConfig modelConfig) throws IOException {
  if (metaColumns == null) {
synchronized (this) {
      if (metaColumns == null) {
        PathFinder pathFinder=new PathFinder(modelConfig);
        List<String> scoreMetaColumns=null;
        String delimiter=StringUtils.isBlank(dataSet.getHeaderDelimiter()) ? dataSet.getDataDelimiter() : dataSet.getHeaderDelimiter();
        if (StringUtils.isNotBlank(scoreMetaColumnNameFile) && SourceType.HDFS.equals(dataSet.getSource())) {
          String path=scoreMetaColumnNameFile;
          File file=new File(scoreMetaColumnNameFile);
          path=new Path(pathFinder.getEvalSetPath(this),file.getName()).toString();
          scoreMetaColumns=CommonUtils.readConfFileIntoList(path,dataSet.getSource(),delimiter);
          metaColumns=scoreMetaColumns;
        }
 else         if (StringUtils.isNotBlank(scoreMetaColumnNameFile) && SourceType.LOCAL.equals(dataSet.getSource())) {
          scoreMetaColumns=CommonUtils.readConfFileIntoList(scoreMetaColumnNameFile,dataSet.getSource(),delimiter);
          metaColumns=scoreMetaColumns;
        }
        if (StringUtils.isNotBlank(dataSet.getMetaColumnNameFile())) {
          String rawMetaPath=dataSet.getMetaColumnNameFile();
          List<String> rawMetaColumns=null;
          if (StringUtils.isNotBlank(rawMetaPath) && SourceType.HDFS.equals(dataSet.getSource())) {
            File file=new File(rawMetaPath);
            rawMetaPath=new Path(pathFinder.getEvalSetPath(this),file.getName()).toString();
            rawMetaColumns=CommonUtils.readConfFileIntoList(rawMetaPath,dataSet.getSource(),delimiter);
          }
 else           if (StringUtils.isNotBlank(rawMetaPath) && SourceType.LOCAL.equals(dataSet.getSource())) {
            rawMetaColumns=CommonUtils.readConfFileIntoList(rawMetaPath,dataSet.getSource(),delimiter);
          }
          if (metaColumns != null) {
            for (            String column : rawMetaColumns) {
              if (!metaColumns.contains(column)) {
                metaColumns.add(column);
              }
            }
          }
 else {
            metaColumns=rawMetaColumns;
          }
        }
      }
    }
  }
  return metaColumns;
}

Fixed version (ground truth):
@JsonIgnore public List<String> getAllMetaColumns(ModelConfig modelConfig) throws IOException {
  if (metaColumns == null) {
synchronized (this) {
      if (metaColumns == null) {
        PathFinder pathFinder=new PathFinder(modelConfig);
        List<String> scoreMetaColumns=null;
        if (StringUtils.isNotBlank(scoreMetaColumnNameFile) && SourceType.HDFS.equals(dataSet.getSource())) {
          File file=new File(scoreMetaColumnNameFile);
          String path=new Path(pathFinder.getEvalSetPath(this),file.getName()).toString();
          scoreMetaColumns=CommonUtils.readConfFileIntoList(path,dataSet.getSource(),dataSet.getHeaderDelimiter());
          metaColumns=scoreMetaColumns;
        }
      }
    }
  }
  return metaColumns;
}
Program: 31801
Project: 31801
Buggy source:
@Override public RawSourceData clone(){
  RawSourceData copy=null;
  try {
    copy=(RawSourceData)super.clone();
  }
 catch (  CloneNotSupportedException e) {
    throw new InternalError(e.toString());
  }
  copy.setSource(source);
  copy.setDataPath(dataPath);
  copy.setDataDelimiter(dataDelimiter);
  copy.setHeaderPath(headerPath);
  copy.setHeaderDelimiter(headerDelimiter);
  copy.setFilterExpressions(filterExpressions);
  copy.setWeightColumnName(weightColumnName);
  copy.setTargetColumnName(targetColumnName);
  copy.setPosTags(new ArrayList<String>(posTags));
  copy.setNegTags(new ArrayList<String>(negTags));
  copy.setMissingOrInvalidValues(missingOrInvalidValues);
  return copy;
}

Fixed version (ground truth):
@Override public RawSourceData clone(){
  RawSourceData copy=new RawSourceData();
  copy.setSource(source);
  copy.setDataPath(dataPath);
  copy.setDataDelimiter(dataDelimiter);
  copy.setHeaderPath(headerPath);
  copy.setHeaderDelimiter(headerDelimiter);
  copy.setFilterExpressions(filterExpressions);
  copy.setWeightColumnName(weightColumnName);
  copy.setTargetColumnName(targetColumnName);
  copy.setPosTags(new ArrayList<String>(posTags));
  copy.setNegTags(new ArrayList<String>(negTags));
  copy.setMissingOrInvalidValues(missingOrInvalidValues);
  return copy;
}
Program: 31802
Project: 31802
Buggy source:
/** 
 * Returns the element if it is in both collections. - return null if any collection is null or empty - return null if no element exists in both collections
 * @param leftCol - left collection
 * @param rightCol - right collection
 * @return First element that are found in both collectionsnull if no elements in both collection or any collection is null or empty
 */
public static <T>T containsAny(Collection<T> leftCol,Collection<T> rightCol){
  if (CollectionUtils.isEmpty(leftCol) || CollectionUtils.isEmpty(rightCol)) {
    return null;
  }
  Iterator<T> iterator=leftCol.iterator();
  while (iterator.hasNext()) {
    T element=iterator.next();
    if (rightCol.contains(element)) {
      return element;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the element if it is in both collections. - return null if any collection is null or empty - return null if no element exists in both collections
 * @param leftCol - left collection
 * @param rightCol - right collection
 * @param < T > - collection type
 * @return First element that are found in both collectionsnull if no elements in both collection or any collection is null or empty
 */
public static <T>T containsAny(Collection<T> leftCol,Collection<T> rightCol){
  if (CollectionUtils.isEmpty(leftCol) || CollectionUtils.isEmpty(rightCol)) {
    return null;
  }
  Iterator<T> iterator=leftCol.iterator();
  while (iterator.hasNext()) {
    T element=iterator.next();
    if (rightCol.contains(element)) {
      return element;
    }
  }
  return null;
}
Program: 31804
Project: 31804
Buggy source:
/** 
 * Load JSON instance
 * @param path file path
 * @param sourceType source type: hdfs or local
 * @param clazz class of instance
 * @return instance from json file
 * @throws IOException if any IO exception in parsing json.
 * @throws IllegalArgumentException if  {@code path} is null or empty, if sourceType is null.
 */
public static <T>T loadJSON(String path,SourceType sourceType,Class<T> clazz) throws IOException {
  checkPathAndMode(path,sourceType);
  log.debug("String_Node_Str",path,sourceType);
  BufferedReader reader=null;
  try {
    reader=ShifuFileUtils.getReader(path,sourceType);
    return JSONUtils.readValue(reader,clazz);
  }
  finally {
    IOUtils.closeQuietly(reader);
  }
}

Fixed version (ground truth):
/** 
 * Load JSON instance
 * @param path file path
 * @param sourceType source type: hdfs or local
 * @param clazz class of instance
 * @param < T > class type to load
 * @return instance from json file
 * @throws IOException if any IO exception in parsing json.
 * @throws IllegalArgumentException if  {@code path} is null or empty, if sourceType is null.
 */
public static <T>T loadJSON(String path,SourceType sourceType,Class<T> clazz) throws IOException {
  checkPathAndMode(path,sourceType);
  log.debug("String_Node_Str",path,sourceType);
  BufferedReader reader=null;
  try {
    reader=ShifuFileUtils.getReader(path,sourceType);
    return JSONUtils.readValue(reader,clazz);
  }
  finally {
    IOUtils.closeQuietly(reader);
  }
}
Program: 31805
Project: 31805
Buggy source:
/** 
 * Get target column.
 * @param columnConfigList column config list
 * @throws IllegalArgumentException if columnConfigList is null or empty.
 * @throws IllegalStateException if no target column can be found.
 */
public static Integer getTargetColumnNum(List<ColumnConfig> columnConfigList){
  if (CollectionUtils.isEmpty(columnConfigList)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ColumnConfig cc=(ColumnConfig)CollectionUtils.find(columnConfigList,new Predicate(){
    @Override public boolean evaluate(    Object object){
      return ((ColumnConfig)object).isTarget();
    }
  }
);
  if (cc == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  return cc.getColumnNum();
}

Fixed version (ground truth):
/** 
 * Get target column.
 * @param columnConfigList column config list
 * @return target column index
 * @throws IllegalArgumentException if columnConfigList is null or empty.
 * @throws IllegalStateException if no target column can be found.
 */
public static Integer getTargetColumnNum(List<ColumnConfig> columnConfigList){
  if (CollectionUtils.isEmpty(columnConfigList)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ColumnConfig cc=(ColumnConfig)CollectionUtils.find(columnConfigList,new Predicate(){
    @Override public boolean evaluate(    Object object){
      return ((ColumnConfig)object).isTarget();
    }
  }
);
  if (cc == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  return cc.getColumnNum();
}
Program: 31806
Project: 31806
Buggy source:
/** 
 * Return one HashMap Object contains keys in the first parameter, values in the second parameter. Before calling this method, you should be aware that headers should be unique.
 * @throws IllegalArgumentException if lengths of two arrays are not the same.
 * @throws NullPointerException if header or data is null.
 */
public static Map<String,String> getRawDataMap(String[] header,String[] data){
  if (header.length != data.length) {
    throw new IllegalArgumentException(String.format("String_Node_Str",header.length,data.length));
  }
  Map<String,String> rawDataMap=new HashMap<String,String>(header.length);
  for (int i=0; i < header.length; i++) {
    rawDataMap.put(header[i],data[i]);
  }
  return rawDataMap;
}

Fixed version (ground truth):
/** 
 * Return one HashMap Object contains keys in the first parameter, values in the second parameter. Before calling this method, you should be aware that headers should be unique.
 * @param header - header that contains column name
 * @param data - raw data
 * @return key-value map for variable
 */
public static Map<String,String> getRawDataMap(String[] header,String[] data){
  if (header.length != data.length) {
    throw new IllegalArgumentException(String.format("String_Node_Str",header.length,data.length));
  }
  Map<String,String> rawDataMap=new HashMap<String,String>(header.length);
  for (int i=0; i < header.length; i++) {
    rawDataMap.put(header[i],data[i]);
  }
  return rawDataMap;
}
Program: 31807
Project: 31807
Buggy source:
/** 
 * Assemble map data to Encog standard input format.
 * @throws NullPointerException if input is null
 * @throws NumberFormatException if column value is not number format.
 */
public static MLDataPair assembleDataPair(ModelConfig modelConfig,List<ColumnConfig> columnConfigList,Map<String,? extends Object> rawDataMap,double cutoff){
  double[] ideal={Constants.DEFAULT_IDEAL_VALUE};
  List<Double> inputList=new ArrayList<Double>();
  for (  ColumnConfig config : columnConfigList) {
    String key=config.getColumnName();
    if (config.isFinalSelect() && !rawDataMap.containsKey(key)) {
      throw new IllegalStateException(String.format("String_Node_Str",key));
    }
    if (config.isTarget()) {
      continue;
    }
 else     if (config.isFinalSelect()) {
      String val=rawDataMap.get(key) == null ? null : rawDataMap.get(key).toString();
      Double normalizeValue=Normalizer.normalize(config,val,cutoff,modelConfig.getNormalizeType());
      inputList.add(normalizeValue);
    }
  }
  int size=inputList.size();
  double[] input=new double[size];
  for (int i=0; i < size; i++) {
    input[i]=inputList.get(i);
  }
  return new BasicMLDataPair(new BasicMLData(input),new BasicMLData(ideal));
}

Fixed version (ground truth):
/** 
 * Assemble map data to Encog standard input format.
 * @param modelConfig - ModelConfig
 * @param columnConfigList - ColumnConfig list
 * @param rawDataMap - raw input key-value map
 * @param cutoff - cutoff value when normalization
 * @return - input data pair for neural network
 */
public static MLDataPair assembleDataPair(ModelConfig modelConfig,List<ColumnConfig> columnConfigList,Map<String,? extends Object> rawDataMap,double cutoff){
  double[] ideal={Constants.DEFAULT_IDEAL_VALUE};
  List<Double> inputList=new ArrayList<Double>();
  for (  ColumnConfig config : columnConfigList) {
    String key=config.getColumnName();
    if (config.isFinalSelect() && !rawDataMap.containsKey(key)) {
      throw new IllegalStateException(String.format("String_Node_Str",key));
    }
    if (config.isTarget()) {
      continue;
    }
 else     if (config.isFinalSelect()) {
      String val=rawDataMap.get(key) == null ? null : rawDataMap.get(key).toString();
      Double normalizeValue=Normalizer.normalize(config,val,cutoff,modelConfig.getNormalizeType());
      inputList.add(normalizeValue);
    }
  }
  int size=inputList.size();
  double[] input=new double[size];
  for (int i=0; i < size; i++) {
    input[i]=inputList.get(i);
  }
  return new BasicMLDataPair(new BasicMLData(input),new BasicMLData(ideal));
}
Program: 31808
Project: 31808
Buggy source:
/** 
 * Sync-up the evalulation data into HDFS
 */
@SuppressWarnings("String_Node_Str") public static void copyEvalDataFromLocalToHDFS(ModelConfig modelConfig,String evalName) throws IOException {
  EvalConfig evalConfig=modelConfig.getEvalConfigByName(evalName);
  if (evalConfig != null) {
    FileSystem hdfs=HDFSUtils.getFS();
    FileSystem localFs=HDFSUtils.getLocalFS();
    PathFinder pathFinder=new PathFinder(modelConfig);
    Path evalDir=new Path(pathFinder.getEvalSetPath(evalConfig,SourceType.LOCAL));
    Path dst=new Path(pathFinder.getEvalSetPath(evalConfig,SourceType.HDFS));
    if (localFs.exists(evalDir) && localFs.getFileStatus(evalDir).isDir() && !hdfs.exists(dst)) {
      hdfs.copyFromLocalFile(evalDir,dst);
    }
    if (StringUtils.isNotBlank(evalConfig.getScoreMetaColumnNameFile())) {
      hdfs.copyFromLocalFile(new Path(evalConfig.getScoreMetaColumnNameFile()),new Path(pathFinder.getEvalSetPath(evalConfig)));
    }
    if (StringUtils.isNotBlank(evalConfig.getDataSet().getMetaColumnNameFile())) {
      hdfs.copyFromLocalFile(new Path(evalConfig.getDataSet().getMetaColumnNameFile()),new Path(pathFinder.getEvalSetPath(evalConfig)));
    }
  }
}

Fixed version (ground truth):
/** 
 * Sync-up the evalulation data into HDFS
 * @param modelConfig - ModelConfig
 * @param evalName eval name in ModelConfig
 * @throws IOException - error occur when copying data
 */
@SuppressWarnings("String_Node_Str") public static void copyEvalDataFromLocalToHDFS(ModelConfig modelConfig,String evalName) throws IOException {
  EvalConfig evalConfig=modelConfig.getEvalConfigByName(evalName);
  if (evalConfig != null) {
    FileSystem hdfs=HDFSUtils.getFS();
    FileSystem localFs=HDFSUtils.getLocalFS();
    PathFinder pathFinder=new PathFinder(modelConfig);
    Path evalDir=new Path(pathFinder.getEvalSetPath(evalConfig,SourceType.LOCAL));
    Path dst=new Path(pathFinder.getEvalSetPath(evalConfig,SourceType.HDFS));
    if (localFs.exists(evalDir) && localFs.getFileStatus(evalDir).isDir() && !hdfs.exists(dst)) {
      hdfs.copyFromLocalFile(evalDir,dst);
    }
    if (StringUtils.isNotBlank(evalConfig.getScoreMetaColumnNameFile())) {
      hdfs.copyFromLocalFile(new Path(evalConfig.getScoreMetaColumnNameFile()),new Path(pathFinder.getEvalSetPath(evalConfig)));
    }
  }
}
Program: 31809
Project: 31809
Buggy source:
@Test public void testUDFEnoughInput() throws Exception {
  Tuple tuple=TupleFactory.getInstance().newTuple(31);
  for (int i=0; i < 31; i++) {
    tuple.set(i,0);
  }
  tuple.set(0,"String_Node_Str");
  DataBag dataBag=instance.exec(tuple);
  Assert.assertEquals(30,dataBag.size());
  Assert.assertEquals(dataBag.iterator().next().size(),5);
}

Fixed version (ground truth):
@Test public void testUDFEnoughInput() throws Exception {
  Tuple tuple=TupleFactory.getInstance().newTuple(31);
  for (int i=0; i < 31; i++) {
    tuple.set(i,0);
  }
  tuple.set(0,"String_Node_Str");
  DataBag dataBag=instance.exec(tuple);
  Assert.assertEquals(31,dataBag.size());
  Assert.assertEquals(dataBag.iterator().next().size(),5);
}
Program: 31810
Project: 31810
Buggy source:
public Scorer(List<BasicML> models,List<ColumnConfig> columnConfigList,String algorithm,ModelConfig modelConfig,Double cutoff){
  if (modelConfig == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.models=models;
  this.columnConfigList=columnConfigList;
  this.cutoff=cutoff;
  this.alg=algorithm;
  this.modelConfig=modelConfig;
  if (this.columnConfigList != null) {
    int[] inputOutputIndex=DTrainUtils.getInputOutputCandidateCounts(this.columnConfigList);
    int inputNodeCount=inputOutputIndex[0] == 0 ? inputOutputIndex[2] : inputOutputIndex[0];
    int candidateCount=inputOutputIndex[2];
    if (inputNodeCount == candidateCount) {
      this.noVarSelect=true;
    }
 else {
      this.noVarSelect=false;
    }
  }
  if (CommonUtils.isDesicionTreeAlgorithm(alg)) {
    for (    ColumnConfig columnConfig : columnConfigList) {
      if (columnConfig.isCategorical()) {
        Map<String,Integer> map=new HashMap<String,Integer>();
        List<String> categories=columnConfig.getBinCategory();
        if (categories == null) {
          continue;
        }
        for (int i=0; i < categories.size(); i++) {
          map.put(categories.get(i) == null ? "String_Node_Str" : categories.get(i),i);
        }
        this.binCategoryMap.put(columnConfig.getColumnNum(),map);
      }
    }
  }
  this.executorManager=new ExecutorManager<MLData>(Math.min(Runtime.getRuntime().availableProcessors(),models.size()));
  Runtime.getRuntime().addShutdownHook(new Thread(new Runnable(){
    @Override public void run(){
      Scorer.this.executorManager.forceShutDown();
    }
  }
));
}

Fixed version (ground truth):
public Scorer(List<BasicML> models,List<ColumnConfig> columnConfigList,String algorithm,ModelConfig modelConfig,Double cutoff){
  if (modelConfig == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.models=models;
  this.columnConfigList=columnConfigList;
  this.cutoff=cutoff;
  this.alg=algorithm;
  this.modelConfig=modelConfig;
  if (this.columnConfigList != null) {
    int[] inputOutputIndex=DTrainUtils.getInputOutputCandidateCounts(this.columnConfigList);
    int inputNodeCount=inputOutputIndex[0] == 0 ? inputOutputIndex[2] : inputOutputIndex[0];
    int candidateCount=inputOutputIndex[2];
    this.noVarSelect=(inputNodeCount == candidateCount);
  }
  for (  ColumnConfig columnConfig : columnConfigList) {
    if (columnConfig.isCategorical()) {
      Map<String,Integer> map=new HashMap<String,Integer>();
      List<String> categories=columnConfig.getBinCategory();
      if (categories != null) {
        for (int i=0; i < categories.size(); i++) {
          map.put(categories.get(i) == null ? "String_Node_Str" : categories.get(i),i);
        }
      }
      this.binCategoryMap.put(columnConfig.getColumnNum(),map);
    }
  }
  this.executorManager=new ExecutorManager<MLData>(Math.min(Runtime.getRuntime().availableProcessors(),models.size()));
  Runtime.getRuntime().addShutdownHook(new Thread(new Runnable(){
    @Override public void run(){
      Scorer.this.executorManager.forceShutDown();
    }
  }
));
}
Program: 31812
Project: 31812
Buggy source:
/** 
 * output the schema for evaluation score
 */
public Schema outputSchema(Schema input){
  try {
    Schema tupleSchema=new Schema();
    for (int i=0; i < this.outputNames.size(); i++) {
      String name=this.outputNames.get(i);
      if (i < 2) {
        tupleSchema.add(new FieldSchema(name,DataType.CHARARRAY));
      }
 else {
        tupleSchema.add(new FieldSchema(name,DataType.DOUBLE));
      }
    }
    return new Schema(new FieldSchema("String_Node_Str",tupleSchema,DataType.TUPLE));
  }
 catch (  IOException e) {
    log.error("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
/** 
 * output the schema for evaluation score
 */
public Schema outputSchema(Schema input){
  try {
    Schema tupleSchema=new Schema();
    for (int i=0; i < this.outputNames.size(); i++) {
      String name=this.outputNames.get(i);
      if (i < 2 + validMetaSize) {
        tupleSchema.add(new FieldSchema(name,DataType.CHARARRAY));
      }
 else {
        tupleSchema.add(new FieldSchema(name,DataType.DOUBLE));
      }
    }
    return new Schema(new FieldSchema("String_Node_Str",tupleSchema,DataType.TUPLE));
  }
 catch (  IOException e) {
    log.error("String_Node_Str",e);
    return null;
  }
}
Program: 31814
Project: 31814
Buggy source:
public Tuple exec(Tuple input) throws IOException {
  Map<String,String> rawDataMap=CommonUtils.convertDataIntoMap(input,this.headers);
  Tuple tuple=TupleFactory.getInstance().newTuple(this.outputNames.size());
  for (int i=0; i < this.outputNames.size(); i++) {
    String name=this.outputNames.get(i);
    String raw=rawDataMap.get(name);
    if (i == 0) {
      tuple.set(i,raw);
    }
 else     if (i == 1) {
      tuple.set(i,(StringUtils.isEmpty(raw) ? "String_Node_Str" : raw));
    }
 else {
      ColumnConfig columnConfig=CommonUtils.findColumnConfigByName(this.columnConfigList,name);
      Double value=Normalizer.normalize(columnConfig,raw,this.modelConfig.getNormalizeStdDevCutOff(),this.modelConfig.getNormalizeType());
      tuple.set(i,value);
    }
  }
  return tuple;
}

Fixed version (ground truth):
public Tuple exec(Tuple input) throws IOException {
  Map<String,String> rawDataMap=CommonUtils.convertDataIntoMap(input,this.headers);
  Tuple tuple=TupleFactory.getInstance().newTuple(this.outputNames.size());
  for (int i=0; i < this.outputNames.size(); i++) {
    String name=this.outputNames.get(i);
    String raw=rawDataMap.get(name);
    if (i == 0) {
      tuple.set(i,raw);
    }
 else     if (i == 1) {
      tuple.set(i,(StringUtils.isEmpty(raw) ? "String_Node_Str" : raw));
    }
 else     if (i > 1 && i < 2 + validMetaSize) {
      tuple.set(i,raw);
    }
 else {
      ColumnConfig columnConfig=this.columnConfigMap.get(name);
      Double value=Normalizer.normalize(columnConfig,raw,this.modelConfig.getNormalizeStdDevCutOff(),this.modelConfig.getNormalizeType());
      tuple.set(i,value);
    }
  }
  return tuple;
}
Program: 31815
Project: 31815
Buggy source:
public EvalScoreUDF(String source,String pathModelConfig,String pathColumnConfig,String evalSetName,String scale) throws IOException {
  super(source,pathModelConfig,pathColumnConfig);
  evalConfig=modelConfig.getEvalConfigByName(evalSetName);
  if (evalConfig.getModelsPath() != null) {
    this.columnConfigList=ShifuFileUtils.searchColumnConfig(evalConfig,columnConfigList);
  }
  if (StringUtils.isNotBlank(evalConfig.getDataSet().getHeaderPath())) {
    String delimiter=StringUtils.isBlank(evalConfig.getDataSet().getHeaderDelimiter()) ? evalConfig.getDataSet().getDataDelimiter() : evalConfig.getDataSet().getHeaderDelimiter();
    this.headers=CommonUtils.getHeaders(evalConfig.getDataSet().getHeaderPath(),delimiter,evalConfig.getDataSet().getSource());
  }
 else {
    String delimiter=StringUtils.isBlank(evalConfig.getDataSet().getHeaderDelimiter()) ? evalConfig.getDataSet().getDataDelimiter() : evalConfig.getDataSet().getHeaderDelimiter();
    String[] fields=CommonUtils.takeFirstLine(evalConfig.getDataSet().getDataPath(),delimiter,evalConfig.getDataSet().getSource());
    if (StringUtils.join(fields,"String_Node_Str").contains(modelConfig.getTargetColumnName())) {
      this.headers=new String[fields.length];
      for (int i=0; i < fields.length; i++) {
        this.headers[i]=CommonUtils.getRelativePigHeaderColumnName(fields[i]);
      }
      log.warn("String_Node_Str");
      log.warn("String_Node_Str");
    }
 else {
      log.warn("String_Node_Str");
      log.warn("String_Node_Str");
      log.warn("String_Node_Str");
      this.headers=new String[fields.length];
      for (int i=0; i < fields.length; i++) {
        this.headers[i]=i + "String_Node_Str";
      }
    }
  }
  this.modelCnt=CommonUtils.getBasicModelsCnt(modelConfig,this.columnConfigList,evalConfig,evalConfig.getDataSet().getSource());
  this.subModelsCnt=CommonUtils.getSubModelsCnt(modelConfig,this.columnConfigList,evalConfig,evalConfig.getDataSet().getSource());
  this.scale=scale;
}

Fixed version (ground truth):
public EvalScoreUDF(String source,String pathModelConfig,String pathColumnConfig,String evalSetName,String scale) throws IOException {
  super(source,pathModelConfig,pathColumnConfig);
  evalConfig=modelConfig.getEvalConfigByName(evalSetName);
  if (evalConfig.getModelsPath() != null) {
    this.columnConfigList=ShifuFileUtils.searchColumnConfig(evalConfig,columnConfigList);
  }
  this.headers=CommonUtils.getFinalHeaders(evalConfig);
  this.modelCnt=CommonUtils.getBasicModelsCnt(modelConfig,this.columnConfigList,evalConfig,evalConfig.getDataSet().getSource());
  this.subModelsCnt=CommonUtils.getSubModelsCnt(modelConfig,this.columnConfigList,evalConfig,evalConfig.getDataSet().getSource());
  this.scale=scale;
}
Program: 31818
Project: 31818
Buggy source:
@Override public int compare(FileStatus o1,FileStatus o2){
  return o1.getPath().toString().compareTo(o2.getPath().toString());
}

Fixed version (ground truth):
@Override public int compare(ColumnConfig from,ColumnConfig to){
  return from.getColumnName().compareTo(to.getColumnName());
}
Program: 31827
Project: 31827
Buggy source:
/** 
 * validate the modelconfig if it's well written.
 * @return
 * @throws Exception
 */
protected void validateModelConfig(ModelConfig modelConfig,ModelStep step) throws Exception {
  ValidateResult result=new ValidateResult(false);
  if (modelConfig == null) {
    result.getCauses().add("String_Node_Str");
  }
 else {
    result=ModelInspector.getInspector().probe(modelConfig,step);
  }
  if (!result.getStatus()) {
    LOG.error("String_Node_Str");
    for (    String cause : result.getCauses()) {
      LOG.error("String_Node_Str" + cause);
    }
    throw new ShifuException(ShifuErrorCode.ERROR_MODELCONFIG_NOT_VALIDATION);
  }
 else {
    LOG.info("String_Node_Str");
  }
  checkAlgParameter(modelConfig);
}

Fixed version (ground truth):
/** 
 * Validate the modelconfig if it's well written.
 * @param modelConfig the model config
 * @param step step in Shifu
 * @throws Exception any exception in validation
 */
protected void validateModelConfig(ModelConfig modelConfig,ModelStep step) throws Exception {
  ValidateResult result=new ValidateResult(false);
  if (modelConfig == null) {
    result.getCauses().add("String_Node_Str");
  }
 else {
    result=ModelInspector.getInspector().probe(modelConfig,step);
  }
  if (!result.getStatus()) {
    LOG.error("String_Node_Str");
    for (    String cause : result.getCauses()) {
      LOG.error("String_Node_Str" + cause);
    }
    throw new ShifuException(ShifuErrorCode.ERROR_MODELCONFIG_NOT_VALIDATION);
  }
 else {
    LOG.info("String_Node_Str");
  }
  checkAlgParameter(modelConfig);
}
Program: 31828
Project: 31828
Buggy source:
/** 
 * check the argument is for listing version or not
 * @param arg input option
 * @return true - if arg is v/version/-v/-version, or return false
 */
private static boolean isVersionOption(String arg){
  return arg.equalsIgnoreCase("String_Node_Str") || arg.equalsIgnoreCase("String_Node_Str") || arg.equalsIgnoreCase("String_Node_Str")|| arg.equalsIgnoreCase("String_Node_Str");
}

Fixed version (ground truth):
private static boolean isVersionOption(String arg){
  return arg.equalsIgnoreCase("String_Node_Str") || arg.equalsIgnoreCase("String_Node_Str") || arg.equalsIgnoreCase("String_Node_Str")|| arg.equalsIgnoreCase("String_Node_Str");
}
Program: 31829
Project: 31829
Buggy source:
/** 
 * train each sub-models, and use train data as evaluation set to generate model score. And join the evaluation result to train assemble model
 * @return
 * @throws Exception
 */
private static int runComboModels(boolean isToShuffleData,boolean isToResume) throws Exception {
  ComboModelProcessor processor=new ComboModelProcessor(ComboModelProcessor.ComboStep.RUN);
  processor.setToShuffleData(isToShuffleData);
  processor.setToResume(isToResume);
  return processor.run();
}

Fixed version (ground truth):
private static int runComboModels(boolean isToShuffleData,boolean isToResume) throws Exception {
  ComboModelProcessor processor=new ComboModelProcessor(ComboModelProcessor.ComboStep.RUN);
  processor.setToShuffleData(isToShuffleData);
  processor.setToResume(isToResume);
  return processor.run();
}
Program: 31830
Project: 31830
Buggy source:
/** 
 * Select variables for model
 * @throws Exception
 * @throws ShifuException
 */
public static int selectModelVar(boolean isToReset) throws Exception {
  VarSelectModelProcessor p=new VarSelectModelProcessor(isToReset);
  return p.run();
}

Fixed version (ground truth):
public static int selectModelVar(boolean isToReset) throws Exception {
  VarSelectModelProcessor p=new VarSelectModelProcessor(isToReset);
  return p.run();
}
Program: 31831
Project: 31831
Buggy source:
/** 
 * check the argument is for listing help info or not
 * @param str
 * @return true - if arg is h/-h/help/-help, or return false
 */
private static boolean isHelpOption(String str){
  return "String_Node_Str".equalsIgnoreCase(str) || "String_Node_Str".equalsIgnoreCase(str) || "String_Node_Str".equalsIgnoreCase(str)|| "String_Node_Str".equalsIgnoreCase(str);
}

Fixed version (ground truth):
private static boolean isHelpOption(String str){
  return "String_Node_Str".equalsIgnoreCase(str) || "String_Node_Str".equalsIgnoreCase(str) || "String_Node_Str".equalsIgnoreCase(str)|| "String_Node_Str".equalsIgnoreCase(str);
}
Program: 31833
Project: 31833
Buggy source:
/** 
 * create a new model from existing model
 * @throws ShifuException
 */
private static void copyModel(String[] cmdArgs) throws IOException, ShifuException {
  BasicModelProcessor p=new BasicModelProcessor();
  p.copyModelFiles(cmdArgs[0],cmdArgs[1]);
}

Fixed version (ground truth):
private static void copyModel(String[] cmdArgs) throws IOException, ShifuException {
  BasicModelProcessor p=new BasicModelProcessor();
  p.copyModelFiles(cmdArgs[0],cmdArgs[1]);
}
Program: 31834
Project: 31834
Buggy source:
/** 
 * print usage
 */
private static void printUsage(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
private static void printUsage(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
}
Program: 31835
Project: 31835
Buggy source:
/** 
 * Create new model - create directory and ModelConfig for the model
 * @throws Exception
 */
public static int createNewModel(String modelSetName,String modelType,String description) throws Exception {
  ALGORITHM modelAlg=null;
  if (modelType != null) {
    for (    ALGORITHM alg : ALGORITHM.values()) {
      if (alg.name().equalsIgnoreCase(modelType.trim())) {
        modelAlg=alg;
      }
    }
  }
 else {
    modelAlg=ALGORITHM.NN;
  }
  if (modelAlg == null) {
    log.error("String_Node_Str",modelType);
    return 2;
  }
  CreateModelProcessor p=new CreateModelProcessor(modelSetName,modelAlg,description);
  return p.run();
}

Fixed version (ground truth):
public static int createNewModel(String modelSetName,String modelType,String description) throws Exception {
  ALGORITHM modelAlg=null;
  if (modelType != null) {
    for (    ALGORITHM alg : ALGORITHM.values()) {
      if (alg.name().equalsIgnoreCase(modelType.trim())) {
        modelAlg=alg;
      }
    }
  }
 else {
    modelAlg=ALGORITHM.NN;
  }
  if (modelAlg == null) {
    log.error("String_Node_Str",modelType);
    return 2;
  }
  CreateModelProcessor p=new CreateModelProcessor(modelSetName,modelAlg,description);
  return p.run();
}
Program: 31836
Project: 31836
Buggy source:
/** 
 * switch model - switch the current model to</p> <p/> <li>master if it's not current model existing</li> <li><code>modelName</code> if you already save it with name <code>modelName</code></li> <p/> then create a new branch with naming <code>newModelSetName</code>
 * @param newModelSetName
 * @throws Exception
 */
private static void switchCurrentModel(String newModelSetName) throws Exception {
  ManageModelProcessor p=new ManageModelProcessor(ModelAction.SWITCH,newModelSetName);
  p.run();
}

Fixed version (ground truth):
private static void switchCurrentModel(String newModelSetName) throws Exception {
  ManageModelProcessor p=new ManageModelProcessor(ModelAction.SWITCH,newModelSetName);
  p.run();
}
Program: 31837
Project: 31837
Buggy source:
/** 
 * @param evalSetNames
 * @throws Exception
 */
private static int runEvalConfMat(String evalSetNames) throws Exception {
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.CONFMAT,evalSetNames);
  return p.run();
}

Fixed version (ground truth):
private static int runEvalConfMat(String evalSetNames) throws Exception {
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.CONFMAT,evalSetNames);
  return p.run();
}
Program: 31839
Project: 31839
Buggy source:
/** 
 * Load the column definition and do the training data purification
 * @throws Exception
 */
public static int initializeModel() throws Exception {
  InitModelProcessor processor=new InitModelProcessor();
  return processor.run();
}

Fixed version (ground truth):
public static int initializeModel() throws Exception {
  InitModelProcessor processor=new InitModelProcessor();
  return processor.run();
}
Program: 31840
Project: 31840
Buggy source:
/** 
 * @param evalSetNames
 * @return
 */
private static int runEvalNorm(String evalSetNames) throws Exception {
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.NORM,evalSetNames);
  return p.run();
}

Fixed version (ground truth):
private static int runEvalNorm(String evalSetNames) throws Exception {
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.NORM,evalSetNames);
  return p.run();
}
Program: 31841
Project: 31841
Buggy source:
/** 
 * save model - save current mode or save to a specially name <code>newModelSetName</code>
 * @param newModelSetName
 * @throws Exception
 */
private static void saveCurrentModel(String newModelSetName) throws Exception {
  ManageModelProcessor p=new ManageModelProcessor(ModelAction.SAVE,newModelSetName);
  p.run();
}

Fixed version (ground truth):
private static void saveCurrentModel(String newModelSetName) throws Exception {
  ManageModelProcessor p=new ManageModelProcessor(ModelAction.SAVE,newModelSetName);
  p.run();
}
Program: 31842
Project: 31842
Buggy source:
/** 
 * create ComboTrain.json, when user provide the algorithms to combo
 * @param algorithms
 * @return
 * @throws Exception
 */
private static int createNewCombo(String algorithms) throws Exception {
  Processor processor=new ComboModelProcessor(ComboModelProcessor.ComboStep.NEW,algorithms);
  return processor.run();
}

Fixed version (ground truth):
private static int createNewCombo(String algorithms) throws Exception {
  Processor processor=new ComboModelProcessor(ComboModelProcessor.ComboStep.NEW,algorithms);
  return processor.run();
}
Program: 31843
Project: 31843
Buggy source:
/** 
 * Train model
 * @throws Exception
 */
public static int trainModel(boolean isDryTrain,boolean isDebug) throws Exception {
  TrainModelProcessor p=new TrainModelProcessor(isDryTrain,isDebug);
  return p.run();
}

Fixed version (ground truth):
public static int trainModel(boolean isDryTrain,boolean isDebug) throws Exception {
  TrainModelProcessor p=new TrainModelProcessor(isDryTrain,isDebug);
  return p.run();
}
Program: 31844
Project: 31844
Buggy source:
/** 
 * Normalize the training data
 * @throws Exception
 */
public static int normalizeTrainData(boolean isToShuffleData) throws Exception {
  NormalizeModelProcessor p=new NormalizeModelProcessor(isToShuffleData);
  return p.run();
}

Fixed version (ground truth):
public static int normalizeTrainData(boolean isToShuffleData) throws Exception {
  NormalizeModelProcessor p=new NormalizeModelProcessor(isToShuffleData);
  return p.run();
}
Program: 31845
Project: 31845
Buggy source:
/** 
 * Load and test ModelConfig
 * @throws Exception
 */
private static void initializeModelParam() throws Exception {
  InitModelProcessor p=new InitModelProcessor();
  p.checkAlgorithmParam();
}

Fixed version (ground truth):
private static void initializeModelParam() throws Exception {
  InitModelProcessor p=new InitModelProcessor();
  p.checkAlgorithmParam();
}
Program: 31846
Project: 31846
Buggy source:
/** 
 * evaluate each sub-models, join data and evaluate assemble model
 * @return
 * @throws Exception
 */
private static int evalComboModels(boolean isToResume) throws Exception {
  ComboModelProcessor processor=new ComboModelProcessor(ComboModelProcessor.ComboStep.EVAL);
  processor.setToResume(isToResume);
  return processor.run();
}

Fixed version (ground truth):
private static int evalComboModels(boolean isToResume) throws Exception {
  ComboModelProcessor processor=new ComboModelProcessor(ComboModelProcessor.ComboStep.EVAL);
  processor.setToResume(isToResume);
  return processor.run();
}
Program: 31847
Project: 31847
Buggy source:
/** 
 * @param evalSetNames
 * @throws Exception
 */
private static int runEvalPerf(String evalSetNames) throws Exception {
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.PERF,evalSetNames);
  return p.run();
}

Fixed version (ground truth):
private static int runEvalPerf(String evalSetNames) throws Exception {
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.PERF,evalSetNames);
  return p.run();
}
Program: 31848
Project: 31848
Buggy source:
/** 
 * print exception and contact message, then quit program
 * @param e
 */
private static void exceptionExit(Exception e){
  log.error("String_Node_Str" + e.toString(),e);
  System.err.println(Constants.CONTACT_MESSAGE);
  System.exit(-1);
}

Fixed version (ground truth):
private static void exceptionExit(Exception e){
  log.error("String_Node_Str" + e.toString(),e);
  System.err.println(Constants.CONTACT_MESSAGE);
  System.exit(-1);
}
Program: 31849
Project: 31849
Buggy source:
/** 
 * export Shifu model into other format, i.e. PMML
 * @param type
 * @throws Exception
 */
public static int exportModel(String type,boolean isConcise) throws Exception {
  ExportModelProcessor p=new ExportModelProcessor(type,isConcise);
  return p.run();
}

Fixed version (ground truth):
public static int exportModel(String type,boolean isConcise) throws Exception {
  ExportModelProcessor p=new ExportModelProcessor(type,isConcise);
  return p.run();
}
Program: 31850
Project: 31850
Buggy source:
/** 
 * Calculate variables stats for model - ks/iv/mean/max/min
 */
public static int calModelStats() throws Exception {
  StatsModelProcessor p=new StatsModelProcessor();
  return p.run();
}

Fixed version (ground truth):
public static int calModelStats() throws Exception {
  StatsModelProcessor p=new StatsModelProcessor();
  return p.run();
}
Program: 31851
Project: 31851
Buggy source:
/** 
 * @param evalSetName
 * @param isDryRun
 * @throws Exception
 */
public static int runEvalSet(String evalSetName,boolean isDryRun) throws Exception {
  log.info("String_Node_Str",evalSetName);
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.RUN,evalSetName);
  return p.run();
}

Fixed version (ground truth):
public static int runEvalSet(String evalSetName,boolean isDryRun) throws Exception {
  log.info("String_Node_Str",evalSetName);
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.RUN,evalSetName);
  return p.run();
}
Program: 31852
Project: 31852
Buggy source:
/** 
 * list all evaluation set
 * @throws Exception
 */
private static int listEvalSet() throws Exception {
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.LIST);
  return p.run();
}

Fixed version (ground truth):
private static int listEvalSet() throws Exception {
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.LIST);
  return p.run();
}
Program: 31853
Project: 31853
Buggy source:
/** 
 * create each sub-models, assemble model and generate corresponding configurations
 * @return
 * @throws Exception
 */
private static int initComboModels() throws Exception {
  Processor processor=new ComboModelProcessor(ComboModelProcessor.ComboStep.INIT);
  return processor.run();
}

Fixed version (ground truth):
private static int initComboModels() throws Exception {
  Processor processor=new ComboModelProcessor(ComboModelProcessor.ComboStep.INIT);
  return processor.run();
}
Program: 31854
Project: 31854
Buggy source:
/** 
 * Run post-train step
 */
public static int postTrainModel() throws Exception {
  PostTrainModelProcessor p=new PostTrainModelProcessor();
  return p.run();
}

Fixed version (ground truth):
public static int postTrainModel() throws Exception {
  PostTrainModelProcessor p=new PostTrainModelProcessor();
  return p.run();
}
Program: 31855
Project: 31855
Buggy source:
/** 
 * Create new evalset
 * @throws Exception
 */
public static int createNewEvalSet(String evalSetName) throws Exception {
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.NEW,evalSetName);
  return p.run();
}

Fixed version (ground truth):
public static int createNewEvalSet(String evalSetName) throws Exception {
  EvalModelProcessor p=new EvalModelProcessor(EvalStep.NEW,evalSetName);
  return p.run();
}