Program: 31742
Project: 31742
Buggy source:
private double[] convertDataMapToDoubleArray(Map<String,Object> dataMap){
  double[] data=new double[this.columnNumIndexMapping.size()];
  for (  Entry<Integer,Integer> entry : this.columnNumIndexMapping.entrySet()) {
    double value=0d;
    Integer columnNum=entry.getKey();
    String columnName=this.numNameMapping.get(columnNum);
    Object obj=dataMap.get(columnName);
    if (this.categoricalColumnNameNames.containsKey(columnNum)) {
      double indexValue=-1d;
      int categoricalSize=categoricalColumnNameNames.get(columnNum).size();
      if (obj == null) {
        indexValue=categoricalSize;
      }
 else {
        if (obj instanceof Number) {
          indexValue=((Number)obj).doubleValue();
        }
 else {
          Integer intIndex=columnCategoryIndexMapping.get(columnNum).get(obj.toString());
          if (intIndex == null || intIndex < 0 || intIndex >= categoricalSize) {
            intIndex=categoricalSize;
          }
          indexValue=intIndex * 1d;
        }
      }
      value=indexValue;
    }
 else {
      if (obj == null) {
        value=this.numericalMeanMapping.get(columnNum) == null ? 0d : this.numericalMeanMapping.get(columnNum);
      }
 else {
        if (obj instanceof Number) {
          value=((Number)obj).doubleValue();
        }
 else {
          try {
            value=Double.parseDouble(obj.toString());
          }
 catch (          NumberFormatException e) {
            value=this.numericalMeanMapping.get(columnNum) == null ? 0d : this.numericalMeanMapping.get(columnNum);
          }
        }
      }
      if (Double.isNaN(value)) {
        value=this.numericalMeanMapping.get(columnNum) == null ? 0d : this.numericalMeanMapping.get(columnNum);
      }
    }
    Integer index=entry.getValue();
    if (index != null && index < data.length) {
      data[index]=value;
    }
  }
  return data;
}

Fixed version (ground truth):
private double[] convertDataMapToDoubleArray(Map<String,Object> dataMap){
  double[] data=new double[this.columnNumIndexMapping.size()];
  for (  Entry<Integer,Integer> entry : this.columnNumIndexMapping.entrySet()) {
    double value=0d;
    Integer columnNum=entry.getKey();
    String columnName=this.numNameMapping.get(columnNum);
    Object obj=dataMap.get(columnName);
    if (this.categoricalColumnNameNames.containsKey(columnNum)) {
      double indexValue=-1d;
      int categoricalSize=categoricalColumnNameNames.get(columnNum).size();
      if (obj == null) {
        indexValue=categoricalSize;
      }
 else {
        if (obj instanceof Number) {
          indexValue=((Number)obj).doubleValue();
        }
 else {
          Integer intIndex=columnCategoryIndexMapping.get(columnNum).get(obj.toString());
          if (intIndex == null || intIndex < 0 || intIndex >= categoricalSize) {
            intIndex=categoricalSize;
          }
          indexValue=intIndex;
        }
      }
      value=indexValue;
    }
 else {
      if (obj == null) {
        value=this.numericalMeanMapping.get(columnNum) == null ? 0d : this.numericalMeanMapping.get(columnNum);
      }
 else {
        if (obj instanceof Number) {
          value=((Number)obj).doubleValue();
        }
 else {
          try {
            value=Double.parseDouble(obj.toString());
          }
 catch (          NumberFormatException e) {
            value=this.numericalMeanMapping.get(columnNum) == null ? 0d : this.numericalMeanMapping.get(columnNum);
          }
        }
      }
      if (Double.isNaN(value)) {
        value=this.numericalMeanMapping.get(columnNum) == null ? 0d : this.numericalMeanMapping.get(columnNum);
      }
    }
    Integer index=entry.getValue();
    if (index != null && index < data.length) {
      data[index]=value;
    }
  }
  return data;
}