Program: 31979
Project: 31979
Buggy source:
@Override public void load(GuaguaWritableAdapter<LongWritable> currentKey,GuaguaWritableAdapter<Text> currentValue,WorkerContext<DTMasterParams,DTWorkerParams> context){
  this.count+=1;
  if ((this.count) % 5000 == 0) {
    LOG.info("String_Node_Str",this.count);
  }
  double baggingSampleRate=this.modelConfig.getBaggingSampleRate();
  if (!modelConfig.isFixInitialInput() && Double.compare(Math.random(),baggingSampleRate) >= 0) {
    return;
  }
  long hashcode=0;
  short[] inputs=new short[this.inputCount];
  float ideal=0f;
  float significance=1f;
  int index=0, inputIndex=0;
  for (  String input : DEFAULT_SPLITTER.split(currentValue.getWritable().toString())) {
    if (index == this.columnConfigList.size()) {
      significance=input.length() == 0 ? 1f : NumberFormatUtils.getFloat(input,1f);
      break;
    }
 else {
      ColumnConfig columnConfig=this.columnConfigList.get(index);
      if (columnConfig != null && columnConfig.isTarget()) {
        ideal=getFloatValue(input);
      }
 else {
        if (!isAfterVarSelect) {
          if (!columnConfig.isMeta() && !columnConfig.isTarget() && CommonUtils.isGoodCandidate(columnConfig)) {
            if (columnConfig.isNumerical()) {
              float floatValue=getFloatValue(input);
              short binIndex=(short)getBinIndex(floatValue,columnConfig.getBinBoundary());
              inputs[inputIndex]=binIndex;
              if (!this.inputIndexMap.containsKey(columnConfig.getColumnNum())) {
                this.inputIndexMap.put(columnConfig.getColumnNum(),inputIndex);
              }
            }
 else             if (columnConfig.isCategorical()) {
              short shortValue=(short)(columnConfig.getBinCategory().size());
              if (input.length() == 0) {
                shortValue=(short)(columnConfig.getBinCategory().size());
              }
 else {
                int categoricalIndex=this.columnCategoryIndexMapping.get(columnConfig.getColumnNum()).get(input);
                shortValue=(short)(categoricalIndex);
                if (shortValue == -1) {
                  shortValue=(short)(columnConfig.getBinCategory().size());
                }
              }
              inputs[inputIndex]=shortValue;
              if (!this.inputIndexMap.containsKey(columnConfig.getColumnNum())) {
                this.inputIndexMap.put(columnConfig.getColumnNum(),inputIndex);
              }
            }
            hashcode=hashcode * 31 + input.hashCode();
            inputIndex+=1;
          }
        }
 else {
          if (columnConfig != null && !columnConfig.isMeta() && !columnConfig.isTarget() && columnConfig.isFinalSelect()) {
            if (columnConfig.isNumerical()) {
              float floatValue=getFloatValue(input);
              short binIndex=(short)getBinIndex(floatValue,columnConfig.getBinBoundary());
              inputs[inputIndex]=binIndex;
              if (!this.inputIndexMap.containsKey(columnConfig.getColumnNum())) {
                this.inputIndexMap.put(columnConfig.getColumnNum(),inputIndex);
              }
            }
 else             if (columnConfig.isCategorical()) {
              short shortValue=(short)(columnConfig.getBinCategory().size());
              if (input.length() == 0) {
                shortValue=(short)(columnConfig.getBinCategory().size());
              }
 else {
                int categoricalIndex=this.columnCategoryIndexMapping.get(columnConfig.getColumnNum()).get(input);
                shortValue=(short)(categoricalIndex);
                if (shortValue == -1) {
                  shortValue=(short)(columnConfig.getBinCategory().size());
                }
              }
              inputs[inputIndex]=shortValue;
              if (!this.inputIndexMap.containsKey(columnConfig.getColumnNum())) {
                this.inputIndexMap.put(columnConfig.getColumnNum(),inputIndex);
              }
            }
            hashcode=hashcode * 31 + input.hashCode();
            inputIndex+=1;
          }
        }
      }
    }
    index+=1;
  }
  long longBaggingSampleRate=Double.valueOf(baggingSampleRate * 100).longValue();
  if (this.modelConfig.isFixInitialInput() && hashcode % 100 >= longBaggingSampleRate) {
    return;
  }
  this.sampleCount+=1;
  if (this.isOneVsAll) {
    ideal=updateOneVsAllTargetValue(ideal);
  }
  float output=ideal;
  float predict=ideal;
  Data data=new Data(inputs,predict,output,output,significance,sampleWeights());
  boolean isTesting=false;
  if (context.getAttachment() != null && context.getAttachment() instanceof Boolean) {
    isTesting=(Boolean)context.getAttachment();
  }
  this.addDataPairToDataSet(hashcode,data,isTesting);
}

Fixed version (ground truth):
@Override public void load(GuaguaWritableAdapter<LongWritable> currentKey,GuaguaWritableAdapter<Text> currentValue,WorkerContext<DTMasterParams,DTWorkerParams> context){
  this.count+=1;
  if ((this.count) % 5000 == 0) {
    LOG.info("String_Node_Str",this.count);
  }
  double baggingSampleRate=this.modelConfig.getBaggingSampleRate();
  if (!modelConfig.isFixInitialInput() && Double.compare(Math.random(),baggingSampleRate) >= 0) {
    return;
  }
  long hashcode=0;
  short[] inputs=new short[this.inputCount];
  float ideal=0f;
  float significance=1f;
  int index=0, inputIndex=0;
  for (  String input : DEFAULT_SPLITTER.split(currentValue.getWritable().toString())) {
    if (index == this.columnConfigList.size()) {
      significance=input.length() == 0 ? 1f : NumberFormatUtils.getFloat(input,1f);
      break;
    }
 else {
      ColumnConfig columnConfig=this.columnConfigList.get(index);
      if (columnConfig != null && columnConfig.isTarget()) {
        ideal=getFloatValue(input);
      }
 else {
        if (!isAfterVarSelect) {
          if (!columnConfig.isMeta() && !columnConfig.isTarget() && CommonUtils.isGoodCandidate(columnConfig)) {
            if (columnConfig.isNumerical()) {
              float floatValue=getFloatValue(input);
              short binIndex=(short)getBinIndex(floatValue,columnConfig.getBinBoundary());
              inputs[inputIndex]=binIndex;
              if (!this.inputIndexMap.containsKey(columnConfig.getColumnNum())) {
                this.inputIndexMap.put(columnConfig.getColumnNum(),inputIndex);
              }
            }
 else             if (columnConfig.isCategorical()) {
              short shortValue=(short)(columnConfig.getBinCategory().size());
              if (input.length() == 0) {
                shortValue=(short)(columnConfig.getBinCategory().size());
              }
 else {
                Integer categoricalIndex=this.columnCategoryIndexMapping.get(columnConfig.getColumnNum()).get(input);
                if (categoricalIndex == null) {
                  shortValue=-1;
                }
 else {
                  shortValue=(short)(categoricalIndex.intValue());
                }
                if (shortValue == -1) {
                  shortValue=(short)(columnConfig.getBinCategory().size());
                }
              }
              inputs[inputIndex]=shortValue;
              if (!this.inputIndexMap.containsKey(columnConfig.getColumnNum())) {
                this.inputIndexMap.put(columnConfig.getColumnNum(),inputIndex);
              }
            }
            hashcode=hashcode * 31 + input.hashCode();
            inputIndex+=1;
          }
        }
 else {
          if (columnConfig != null && !columnConfig.isMeta() && !columnConfig.isTarget() && columnConfig.isFinalSelect()) {
            if (columnConfig.isNumerical()) {
              float floatValue=getFloatValue(input);
              short binIndex=(short)getBinIndex(floatValue,columnConfig.getBinBoundary());
              inputs[inputIndex]=binIndex;
              if (!this.inputIndexMap.containsKey(columnConfig.getColumnNum())) {
                this.inputIndexMap.put(columnConfig.getColumnNum(),inputIndex);
              }
            }
 else             if (columnConfig.isCategorical()) {
              short shortValue=(short)(columnConfig.getBinCategory().size());
              if (input.length() == 0) {
                shortValue=(short)(columnConfig.getBinCategory().size());
              }
 else {
                Integer categoricalIndex=this.columnCategoryIndexMapping.get(columnConfig.getColumnNum()).get(input);
                if (categoricalIndex == null) {
                  shortValue=-1;
                }
 else {
                  shortValue=(short)(categoricalIndex.intValue());
                }
                if (shortValue == -1) {
                  shortValue=(short)(columnConfig.getBinCategory().size());
                }
              }
              inputs[inputIndex]=shortValue;
              if (!this.inputIndexMap.containsKey(columnConfig.getColumnNum())) {
                this.inputIndexMap.put(columnConfig.getColumnNum(),inputIndex);
              }
            }
            hashcode=hashcode * 31 + input.hashCode();
            inputIndex+=1;
          }
        }
      }
    }
    index+=1;
  }
  long longBaggingSampleRate=Double.valueOf(baggingSampleRate * 100).longValue();
  if (this.modelConfig.isFixInitialInput() && hashcode % 100 >= longBaggingSampleRate) {
    return;
  }
  this.sampleCount+=1;
  if (this.isOneVsAll) {
    ideal=updateOneVsAllTargetValue(ideal);
  }
  float output=ideal;
  float predict=ideal;
  Data data=new Data(inputs,predict,output,output,significance,sampleWeights());
  boolean isTesting=false;
  if (context.getAttachment() != null && context.getAttachment() instanceof Boolean) {
    isTesting=(Boolean)context.getAttachment();
  }
  this.addDataPairToDataSet(hashcode,data,isTesting);
}