Program: 32031
Project: 32031
Buggy source:
@Override public void load(GuaguaWritableAdapter<LongWritable> currentKey,GuaguaWritableAdapter<Text> currentValue,WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context){
  ++this.count;
  if ((this.count) % 100000 == 0) {
    LOG.info("String_Node_Str",this.count);
  }
  double baggingSampleRate=this.modelConfig.getBaggingSampleRate();
  if (!this.modelConfig.isFixInitialInput() && Double.compare(Math.random(),baggingSampleRate) >= 0) {
    return;
  }
  String line=currentValue.getWritable().toString();
  float[] inputData=new float[inputNum];
  float[] outputData=new float[outputNum];
  int index=0, inputIndex=0, outputIndex=0;
  long hashcode=0;
  double significance=CommonConstants.DEFAULT_SIGNIFICANCE_VALUE;
  for (  String unit : splitter.split(line)) {
    float floatValue=NumberFormatUtils.getFloat(unit.trim(),0f);
    if (Double.isNaN(floatValue)) {
      floatValue=0f;
    }
    if (index == this.columnConfigList.size()) {
      significance=NumberFormatUtils.getDouble(unit.trim(),1.0d);
      break;
    }
 else {
      ColumnConfig columnConfig=this.columnConfigList.get(index);
      if (columnConfig != null && columnConfig.isTarget()) {
        outputData[outputIndex++]=floatValue;
      }
 else {
        if (this.inputNum == this.candidateNum) {
          if (!columnConfig.isMeta() && !columnConfig.isTarget() && CommonUtils.isGoodCandidate(columnConfig)) {
            inputData[inputIndex++]=floatValue;
            hashcode=hashcode * 31 + Float.valueOf(floatValue).hashCode();
          }
        }
 else {
          if (columnConfig != null && !columnConfig.isMeta() && !columnConfig.isTarget() && columnConfig.isFinalSelect()) {
            inputData[inputIndex++]=floatValue;
            hashcode=hashcode * 31 + Float.valueOf(floatValue).hashCode();
          }
        }
      }
    }
    index+=1;
  }
  long longBaggingSampleRate=Double.valueOf(baggingSampleRate * 100).longValue();
  if (modelConfig.isFixInitialInput() && hashcode % 100 >= longBaggingSampleRate) {
    return;
  }
  this.sampleCount+=1;
  if (modelConfig.isRegression() && isUpSampleEnabled() && Double.compare(outputData[0],1d) == 0) {
    significance*=(this.upSampleRng.sample() + 1);
  }
  this.addDataPairToDataSet(hashcode,new Data(inputData,outputData,significance));
}

Fixed version (ground truth):
@Override public void load(GuaguaWritableAdapter<LongWritable> currentKey,GuaguaWritableAdapter<Text> currentValue,WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context){
  ++this.count;
  if ((this.count) % 100000 == 0) {
    LOG.info("String_Node_Str",this.count);
  }
  double baggingSampleRate=this.modelConfig.getBaggingSampleRate();
  if (!this.modelConfig.isFixInitialInput() && Double.compare(Math.random(),baggingSampleRate) >= 0) {
    return;
  }
  String line=currentValue.getWritable().toString();
  float[] inputData=new float[inputNum];
  float[] outputData=new float[outputNum];
  int index=0, inputIndex=0, outputIndex=0;
  long hashcode=0;
  double significance=CommonConstants.DEFAULT_SIGNIFICANCE_VALUE;
  for (  String unit : splitter.split(line)) {
    float floatValue=0f;
    if (unit.length() == 0) {
      floatValue=0f;
    }
 else {
      floatValue=NumberFormatUtils.getFloat(unit,0f);
    }
    if (Double.isNaN(floatValue)) {
      floatValue=0f;
    }
    if (index == this.columnConfigList.size()) {
      significance=NumberFormatUtils.getDouble(unit.trim(),1.0d);
      break;
    }
 else {
      ColumnConfig columnConfig=this.columnConfigList.get(index);
      if (columnConfig != null && columnConfig.isTarget()) {
        outputData[outputIndex++]=floatValue;
      }
 else {
        if (this.inputNum == this.candidateNum) {
          if (!columnConfig.isMeta() && !columnConfig.isTarget() && CommonUtils.isGoodCandidate(columnConfig)) {
            inputData[inputIndex++]=floatValue;
            hashcode=hashcode * 31 + Float.valueOf(floatValue).hashCode();
          }
        }
 else {
          if (columnConfig != null && !columnConfig.isMeta() && !columnConfig.isTarget() && columnConfig.isFinalSelect()) {
            inputData[inputIndex++]=floatValue;
            hashcode=hashcode * 31 + Float.valueOf(floatValue).hashCode();
          }
        }
      }
    }
    index+=1;
  }
  long longBaggingSampleRate=Double.valueOf(baggingSampleRate * 100).longValue();
  if (modelConfig.isFixInitialInput() && hashcode % 100 >= longBaggingSampleRate) {
    return;
  }
  this.sampleCount+=1;
  if (modelConfig.isRegression() && isUpSampleEnabled() && Double.compare(outputData[0],1d) == 0) {
    significance*=(this.upSampleRng.sample() + 1);
  }
  this.addDataPairToDataSet(hashcode,new Data(inputData,outputData,significance));
}