Program: 31984
Project: 31984
Buggy source:
@SuppressWarnings("String_Node_Str") 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) {
    throw new ShifuException(ShifuErrorCode.ERROR_NO_TARGET_COLUMN);
  }
  String tag=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);
    if (config.isCandidate()) {
      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=tupleFactory.newTuple(TOTAL_COLUMN_CNT);
      tuple.set(COLUMN_ID_INDX,i);
      tuple.set(COLUMN_VAL_INDX,(input.get(i) == null ? null : input.get(i).toString()));
      if (modelConfig.isRegression()) {
        if (super.posTagSet.contains(tag)) {
          tuple.set(COLUMN_TAG_INDX,true);
        }
        if (super.negTagSet.contains(tag)) {
          tuple.set(COLUMN_TAG_INDX,false);
        }
      }
 else {
        tuple.set(COLUMN_TAG_INDX,true);
      }
      if (this.isAppendRandom) {
        tuple.set(COLUMN_SEED_INDX,Math.abs(random.nextInt() % 300));
      }
      bag.add(tuple);
    }
  }
  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) {
    throw new ShifuException(ShifuErrorCode.ERROR_NO_TARGET_COLUMN);
  }
  String tag=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);
    if (config.isCandidate()) {
      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=tupleFactory.newTuple(TOTAL_COLUMN_CNT);
      tuple.set(COLUMN_ID_INDX,i);
      tuple.set(COLUMN_VAL_INDX,(input.get(i) == null ? null : input.get(i).toString()));
      if (modelConfig.isRegression()) {
        if (super.posTagSet.contains(tag)) {
          tuple.set(COLUMN_TAG_INDX,true);
        }
        if (super.negTagSet.contains(tag)) {
          tuple.set(COLUMN_TAG_INDX,false);
        }
      }
 else {
        tuple.set(COLUMN_TAG_INDX,true);
      }
      tuple.set(COLUMN_WEIGHT_INDX,getWeightColumnVal(input));
      if (this.isAppendRandom) {
        tuple.set(COLUMN_SEED_INDX,Math.abs(random.nextInt() % 300));
      }
      bag.add(tuple);
    }
  }
  return bag;
}