Program: 32087
Project: 32087
Buggy source:
@Override public void load(GuaguaWritableAdapter<LongWritable> currentKey,GuaguaWritableAdapter<Tuple> currentValue,WorkerContext<NNParams,NNParams> workerContext){
  this.initFieldList();
  super.count+=1;
  if ((super.count) % 100000 == 0) {
    LOG.info("String_Node_Str",super.count);
  }
  double baggingSampleRate=super.modelConfig.getBaggingSampleRate();
  if (!super.modelConfig.isFixInitialInput() && Double.compare(Math.random(),baggingSampleRate) >= 0) {
    return;
  }
  double[] inputs=new double[super.inputNodeCount];
  double[] ideal=new double[super.outputNodeCount];
  if (super.isDry) {
    addDataPairToDataSet(0,new BasicMLDataPair(new BasicMLData(inputs),new BasicMLData(ideal)));
    return;
  }
  long hashcode=0;
  double significance=NNConstants.DEFAULT_SIGNIFICANCE_VALUE;
  int index=0, inputsIndex=0, outputIndex=0;
  for (  Object element : currentValue.getWritable()) {
    double doubleValue=0d;
    if (element != null) {
      if (element instanceof Double) {
        doubleValue=(Double)element;
      }
 else {
        doubleValue=NumberFormatUtils.getDouble(element.toString().trim(),0d);
      }
    }
    if (index == (super.inputNodeCount + super.outputNodeCount)) {
      if (element != null && element instanceof Double) {
        significance=(Double)element;
      }
 else {
        significance=NumberFormatUtils.getDouble(element.toString().trim(),NNConstants.DEFAULT_SIGNIFICANCE_VALUE);
        ;
      }
      break;
    }
 else {
      ColumnConfig columnConfig=super.columnConfigList.get(requiredFieldList.getFields().get(index).getIndex());
      if (columnConfig != null && columnConfig.isTarget()) {
        ideal[outputIndex++]=doubleValue;
      }
 else {
        inputs[inputsIndex++]=doubleValue;
        hashcode=hashcode * 31 + Double.valueOf(doubleValue).hashCode();
      }
    }
    index+=1;
  }
  long longBaggingSampleRate=Double.valueOf(baggingSampleRate * 100).longValue();
  if (super.modelConfig.isFixInitialInput() && hashcode % 100 >= longBaggingSampleRate) {
    return;
  }
  super.sampleCount+=1;
  MLDataPair pair=new BasicMLDataPair(new BasicMLData(inputs),new BasicMLData(ideal));
  pair.setSignificance(significance);
  addDataPairToDataSet(hashcode,pair);
}

Fixed version (ground truth):
@Override public void load(GuaguaWritableAdapter<LongWritable> currentKey,GuaguaWritableAdapter<Tuple> currentValue,WorkerContext<NNParams,NNParams> workerContext){
  this.initFieldList();
  super.count+=1;
  if ((super.count) % 100000 == 0) {
    LOG.info("String_Node_Str",super.count);
  }
  double baggingSampleRate=super.modelConfig.getBaggingSampleRate();
  if (!super.modelConfig.isFixInitialInput() && Double.compare(Math.random(),baggingSampleRate) >= 0) {
    return;
  }
  double[] inputs=new double[super.inputNodeCount];
  double[] ideal=new double[super.outputNodeCount];
  if (super.isDry) {
    addDataPairToDataSet(0,new BasicMLDataPair(new BasicMLData(inputs),new BasicMLData(ideal)));
    return;
  }
  long hashcode=0;
  double significance=NNConstants.DEFAULT_SIGNIFICANCE_VALUE;
  int index=0, inputsIndex=0, outputIndex=0;
  Tuple tuple=currentValue.getWritable();
  for (int i=0; i < tuple.size(); i++) {
    Object element=null;
    try {
      element=tuple.get(i);
    }
 catch (    ExecException e) {
      throw new GuaguaRuntimeException(e);
    }
    double doubleValue=0d;
    if (element != null) {
      if (element instanceof Double) {
        doubleValue=(Double)element;
      }
 else {
        doubleValue=NumberFormatUtils.getDouble(element.toString().trim(),0d);
      }
    }
    if (index == (super.inputNodeCount + super.outputNodeCount)) {
      if (element != null && element instanceof Double) {
        significance=(Double)element;
      }
 else {
        significance=NumberFormatUtils.getDouble(element.toString().trim(),NNConstants.DEFAULT_SIGNIFICANCE_VALUE);
        ;
      }
      break;
    }
 else {
      ColumnConfig columnConfig=super.columnConfigList.get(requiredFieldList.getFields().get(index).getIndex());
      if (columnConfig != null && columnConfig.isTarget()) {
        ideal[outputIndex++]=doubleValue;
      }
 else {
        inputs[inputsIndex++]=doubleValue;
        hashcode=hashcode * 31 + Double.valueOf(doubleValue).hashCode();
      }
    }
    index+=1;
  }
  long longBaggingSampleRate=Double.valueOf(baggingSampleRate * 100).longValue();
  if (super.modelConfig.isFixInitialInput() && hashcode % 100 >= longBaggingSampleRate) {
    return;
  }
  super.sampleCount+=1;
  MLDataPair pair=new BasicMLDataPair(new BasicMLData(inputs),new BasicMLData(ideal));
  pair.setSignificance(significance);
  addDataPairToDataSet(hashcode,pair);
}