Program: 31650
Project: 31650
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public DataBag exec(Tuple input) throws IOException {
  DataBag bag=BagFactory.getInstance().newDefaultBag();
  TupleFactory tupleFactory=TupleFactory.getInstance();
  if (input == null) {
    return null;
  }
  int size=input.size();
  if (size == 0 || input.size() != this.columnConfigList.size()) {
    log.info("String_Node_Str" + input.size() + "String_Node_Str"+ columnConfigList.size());
    throw new ShifuException(ShifuErrorCode.ERROR_NO_EQUAL_COLCONFIG);
  }
  if (input.get(tagColumnNum) == null) {
    log.info("String_Node_Str" + tagColumnNum + "String_Node_Str"+ input.size()+ "String_Node_Str"+ columnConfigList.size()+ "String_Node_Str"+ input.toDelimitedString("String_Node_Str")+ "String_Node_Str"+ input.get(tagColumnNum));
    if (isPigEnabled(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str")) {
      PigStatusReporter.getInstance().getCounter(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str").increment(1);
    }
    return null;
  }
  String tag=CommonUtils.trimTag(input.get(tagColumnNum).toString());
  if (!super.tagSet.contains(tag)) {
    if (isPigEnabled(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str")) {
      PigStatusReporter.getInstance().getCounter(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str").increment(1);
    }
    return null;
  }
  Double rate=modelConfig.getBinningSampleRate();
  if (modelConfig.isBinningSampleNegOnly()) {
    if (super.negTagSet.contains(tag) && random.nextDouble() > rate) {
      return null;
    }
  }
 else {
    if (random.nextDouble() > rate) {
      return null;
    }
  }
  for (int i=0; i < size; i++) {
    ColumnConfig config=columnConfigList.get(i);
    boolean isPositive=false;
    if (modelConfig.isRegression()) {
      if (super.posTagSet.contains(tag)) {
        isPositive=true;
      }
 else       if (super.negTagSet.contains(tag)) {
        isPositive=false;
      }
 else {
        continue;
      }
    }
    if (!isValidRecord(modelConfig.isRegression(),isPositive,config)) {
      continue;
    }
    Tuple tuple=buildTuple(input,tupleFactory,tag,i,i,null);
    bag.add(tuple);
    if (this.isForExpressions) {
      for (int j=0; j < this.dataPurifiers.size(); j++) {
        DataPurifier dataPurifier=this.dataPurifiers.get(j);
        Tuple newTuple=buildTuple(input,tupleFactory,tag,i,(j + 1) * size + i,dataPurifier);
        if (newTuple != null) {
          bag.add(newTuple);
        }
      }
    }
  }
  return bag;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public DataBag exec(Tuple input) throws IOException {
  DataBag bag=BagFactory.getInstance().newDefaultBag();
  TupleFactory tupleFactory=TupleFactory.getInstance();
  if (input == null) {
    return null;
  }
  int size=input.size();
  if (size == 0 || input.size() != this.columnConfigList.size()) {
    log.info("String_Node_Str" + input.size() + "String_Node_Str"+ columnConfigList.size());
    throw new ShifuException(ShifuErrorCode.ERROR_NO_EQUAL_COLCONFIG);
  }
  if (input.get(tagColumnNum) == null) {
    log.info("String_Node_Str" + tagColumnNum + "String_Node_Str"+ input.size()+ "String_Node_Str"+ columnConfigList.size()+ "String_Node_Str"+ input.toDelimitedString("String_Node_Str")+ "String_Node_Str"+ input.get(tagColumnNum));
    if (isPigEnabled(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str")) {
      PigStatusReporter.getInstance().getCounter(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str").increment(1);
    }
    return null;
  }
  String tag=CommonUtils.trimTag(input.get(tagColumnNum).toString());
  if (!super.tagSet.contains(tag)) {
    if (isPigEnabled(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str")) {
      PigStatusReporter.getInstance().getCounter(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str").increment(1);
    }
    return null;
  }
  Double rate=modelConfig.getBinningSampleRate();
  if (modelConfig.isBinningSampleNegOnly()) {
    if (super.negTagSet.contains(tag) && random.nextDouble() > rate) {
      return null;
    }
  }
 else {
    if (random.nextDouble() > rate) {
      return null;
    }
  }
  List<Boolean> filterResultList=null;
  if (this.isForExpressions) {
    filterResultList=new ArrayList<Boolean>();
    for (int j=0; j < this.dataPurifiers.size(); j++) {
      DataPurifier dataPurifier=this.dataPurifiers.get(j);
      filterResultList.add(dataPurifier.isFilter(input));
    }
  }
  for (int i=0; i < size; i++) {
    ColumnConfig config=columnConfigList.get(i);
    boolean isPositive=false;
    if (modelConfig.isRegression()) {
      if (super.posTagSet.contains(tag)) {
        isPositive=true;
      }
 else       if (super.negTagSet.contains(tag)) {
        isPositive=false;
      }
 else {
        continue;
      }
    }
    if (!isValidRecord(modelConfig.isRegression(),isPositive,config)) {
      continue;
    }
    bag.add(buildTuple(input,tupleFactory,tag,i,i));
    if (this.isForExpressions) {
      for (int j=0; j < this.dataPurifiers.size(); j++) {
        Boolean isFilter=filterResultList.get(j);
        if (isFilter != null && isFilter) {
          bag.add(buildTuple(input,tupleFactory,tag,i,(j + 1) * size + i));
        }
      }
    }
  }
  return bag;
}