Program: 32156
Project: 32156
Buggy source:
public List<ColumnConfig> selectByFilter(){
  log.info("String_Node_Str");
  for (  ColumnConfig config : this.columnConfigList) {
    config.setFinalSelect(false);
  }
  int ptrKs=0, ptrIv=0, cntByForce=0;
  log.info("String_Node_Str");
  log.info("String_Node_Str" + modelConfig.getVarSelectFilterEnabled());
  log.info("String_Node_Str" + modelConfig.getVarSelectFilterBy());
  log.info("String_Node_Str" + modelConfig.getVarSelectFilterNum());
  List<Integer> selectedColumnNumList=new ArrayList<Integer>();
  List<ColumnConfig> ksList=new ArrayList<ColumnConfig>();
  List<ColumnConfig> ivList=new ArrayList<ColumnConfig>();
  int cntSelected=0;
  for (  ColumnConfig config : this.columnConfigList) {
    if (config.isForceRemove()) {
      log.info("String_Node_Str" + config.getColumnName());
    }
 else     if (config.isForceSelect()) {
      log.info("String_Node_Str" + config.getColumnName());
      if (config.getMean() == null || config.getStdDev() == null) {
        log.info("String_Node_Str");
      }
 else {
        selectedColumnNumList.add(config.getColumnNum());
        cntSelected++;
        cntByForce++;
      }
    }
 else     if (config.isMeta() || config.isTarget()) {
      log.info("String_Node_Str" + config.getColumnName());
    }
 else     if (config.getKs() == null || config.getIv() == null) {
      log.info("String_Node_Str" + config.getColumnName());
    }
 else     if ((config.isCategorical() && !modelConfig.isCategoricalDisabled()) || config.isNumerical()) {
      ksList.add(config);
      ivList.add(config);
    }
  }
  if (!this.modelConfig.getVarSelectFilterEnabled()) {
    log.info("String_Node_Str");
    log.info("String_Node_Str" + cntSelected);
    if (cntByForce != 0) {
      log.info("String_Node_Str" + cntByForce);
    }
    for (    int n : selectedColumnNumList) {
      this.columnConfigList.get(n).setFinalSelect(true);
    }
    return columnConfigList;
  }
  Collections.sort(ksList,new ColumnConfigComparator("String_Node_Str"));
  Collections.sort(ivList,new ColumnConfigComparator("String_Node_Str"));
  int expectedVarNum=Math.min(ksList.size(),this.modelConfig.getVarSelectFilterNum());
  String key=this.modelConfig.getVarSelectFilterBy();
  ColumnConfig config;
  while (cntSelected < expectedVarNum) {
    if (key.equalsIgnoreCase("String_Node_Str")) {
      config=ksList.get(ptrKs);
      selectedColumnNumList.add(config.getColumnNum());
      ptrKs++;
      log.info("String_Node_Str" + config.getKs() + "String_Node_Str"+ ptrKs+ "String_Node_Str"+ config.getColumnName());
      cntSelected++;
    }
 else     if (key.equalsIgnoreCase("String_Node_Str")) {
      config=ivList.get(ptrIv);
      selectedColumnNumList.add(config.getColumnNum());
      ptrIv++;
      log.info("String_Node_Str" + config.getIv() + "String_Node_Str"+ ptrIv+ "String_Node_Str"+ config.getColumnName());
      cntSelected++;
    }
 else     if (key.equalsIgnoreCase("String_Node_Str")) {
      config=ksList.get(ptrKs);
      if (selectedColumnNumList.contains(config.getColumnNum())) {
        log.info("String_Node_Str" + config.getColumnName());
        ptrKs++;
      }
 else {
        selectedColumnNumList.add(config.getColumnNum());
        ptrKs++;
        log.info("String_Node_Str" + config.getKs() + "String_Node_Str"+ ptrKs+ "String_Node_Str"+ config.getColumnName());
        cntSelected++;
      }
      if (cntSelected == expectedVarNum) {
        break;
      }
      config=ivList.get(ptrIv);
      if (selectedColumnNumList.contains(config.getColumnNum())) {
        log.info("String_Node_Str" + config.getColumnName());
        ptrIv++;
      }
 else {
        selectedColumnNumList.add(config.getColumnNum());
        ptrIv++;
        log.info("String_Node_Str" + config.getIv() + "String_Node_Str"+ ptrIv+ "String_Node_Str"+ config.getColumnName());
        cntSelected++;
      }
    }
  }
  log.info("String_Node_Str");
  log.info("String_Node_Str" + cntSelected);
  if (cntByForce != 0) {
    log.info("String_Node_Str" + cntByForce);
  }
  if (ptrKs != 0) {
    log.info("String_Node_Str" + ptrKs);
  }
  if (ptrIv != 0) {
    log.info("String_Node_Str" + ptrIv);
  }
  for (  int n : selectedColumnNumList) {
    this.columnConfigList.get(n).setFinalSelect(true);
  }
  return columnConfigList;
}

Fixed version (ground truth):
public List<ColumnConfig> selectByFilter(){
  log.info("String_Node_Str");
  for (  ColumnConfig config : this.columnConfigList) {
    config.setFinalSelect(false);
  }
  int ptrKs=0, ptrIv=0, cntByForce=0;
  log.info("String_Node_Str");
  log.info("String_Node_Str" + modelConfig.getVarSelectFilterEnabled());
  log.info("String_Node_Str" + modelConfig.getVarSelectFilterBy());
  log.info("String_Node_Str" + modelConfig.getVarSelectFilterNum());
  List<Integer> selectedColumnNumList=new ArrayList<Integer>();
  List<ColumnConfig> ksList=new ArrayList<ColumnConfig>();
  List<ColumnConfig> ivList=new ArrayList<ColumnConfig>();
  int cntSelected=0;
  for (  ColumnConfig config : this.columnConfigList) {
    if (config.isForceRemove()) {
      log.info("String_Node_Str" + config.getColumnName());
    }
 else     if (config.isForceSelect()) {
      log.info("String_Node_Str" + config.getColumnName());
      if (config.getMean() == null || config.getStdDev() == null) {
        log.info("String_Node_Str");
      }
 else {
        selectedColumnNumList.add(config.getColumnNum());
        cntSelected++;
        cntByForce++;
      }
    }
 else     if (config.isMeta() || config.isTarget()) {
      log.info("String_Node_Str" + config.getColumnName());
    }
 else     if (!CommonUtils.isGoodCandidate(config)) {
      log.info("String_Node_Str" + config.getColumnName());
    }
 else     if ((config.isCategorical() && !modelConfig.isCategoricalDisabled()) || config.isNumerical()) {
      ksList.add(config);
      ivList.add(config);
    }
  }
  if (!this.modelConfig.getVarSelectFilterEnabled()) {
    log.info("String_Node_Str");
    log.info("String_Node_Str" + cntSelected);
    if (cntByForce != 0) {
      log.info("String_Node_Str" + cntByForce);
    }
    for (    int n : selectedColumnNumList) {
      this.columnConfigList.get(n).setFinalSelect(true);
    }
    return columnConfigList;
  }
  Collections.sort(ksList,new ColumnConfigComparator("String_Node_Str"));
  Collections.sort(ivList,new ColumnConfigComparator("String_Node_Str"));
  int expectedVarNum=Math.min(ksList.size(),this.modelConfig.getVarSelectFilterNum());
  String key=this.modelConfig.getVarSelectFilterBy();
  ColumnConfig config;
  while (cntSelected < expectedVarNum) {
    if (key.equalsIgnoreCase("String_Node_Str")) {
      config=ksList.get(ptrKs);
      selectedColumnNumList.add(config.getColumnNum());
      ptrKs++;
      log.info("String_Node_Str" + config.getKs() + "String_Node_Str"+ ptrKs+ "String_Node_Str"+ config.getColumnName());
      cntSelected++;
    }
 else     if (key.equalsIgnoreCase("String_Node_Str")) {
      config=ivList.get(ptrIv);
      selectedColumnNumList.add(config.getColumnNum());
      ptrIv++;
      log.info("String_Node_Str" + config.getIv() + "String_Node_Str"+ ptrIv+ "String_Node_Str"+ config.getColumnName());
      cntSelected++;
    }
 else     if (key.equalsIgnoreCase("String_Node_Str")) {
      config=ksList.get(ptrKs);
      if (selectedColumnNumList.contains(config.getColumnNum())) {
        log.info("String_Node_Str" + config.getColumnName());
        ptrKs++;
      }
 else {
        selectedColumnNumList.add(config.getColumnNum());
        ptrKs++;
        log.info("String_Node_Str" + config.getKs() + "String_Node_Str"+ ptrKs+ "String_Node_Str"+ config.getColumnName());
        cntSelected++;
      }
      if (cntSelected == expectedVarNum) {
        break;
      }
      config=ivList.get(ptrIv);
      if (selectedColumnNumList.contains(config.getColumnNum())) {
        log.info("String_Node_Str" + config.getColumnName());
        ptrIv++;
      }
 else {
        selectedColumnNumList.add(config.getColumnNum());
        ptrIv++;
        log.info("String_Node_Str" + config.getIv() + "String_Node_Str"+ ptrIv+ "String_Node_Str"+ config.getColumnName());
        cntSelected++;
      }
    }
  }
  log.info("String_Node_Str");
  log.info("String_Node_Str" + cntSelected);
  if (cntByForce != 0) {
    log.info("String_Node_Str" + cntByForce);
  }
  if (ptrKs != 0) {
    log.info("String_Node_Str" + ptrKs);
  }
  if (ptrIv != 0) {
    log.info("String_Node_Str" + ptrIv);
  }
  for (  int n : selectedColumnNumList) {
    this.columnConfigList.get(n).setFinalSelect(true);
  }
  return columnConfigList;
}