Program: 138254
Project: 138254
Buggy source:
/** 
 * Method "fillDataset" fills in the data sets.
 * @param nominalColumns the nominal columns
 * @param listRows the rows (=result set)
 * @param firstNumericColumnIdx the index of the first numeric column
 * @return a map [key -> aggregated values] where identifies a level of aggregation
 */
private static Map<String,ValueAggregator> fillDataset(final EList<ModelElement> nominalColumns,final List<Object[]> listRows,final int firstNumericColumnIdx){
  Map<String,ValueAggregator> valueAggregators=new HashMap<String,ValueAggregator>();
  int xPos=firstNumericColumnIdx;
  int yPos=firstNumericColumnIdx + 1;
  int zPos=firstNumericColumnIdx + 2;
  for (int i=nominalColumns.size(); i > 0; i--) {
    String key=createKey(nominalColumns,i);
    for (    Object[] row : listRows) {
      final Object xobj=row[xPos];
      final Double xValue=xobj != null ? Double.valueOf(String.valueOf(xobj)) : null;
      final Object yobj=row[yPos];
      final Double yValue=yobj != null ? Double.valueOf(String.valueOf(yobj)) : null;
      final Object zobj=row[zPos];
      final Double zValue=zobj != null ? Double.valueOf(String.valueOf(zobj)) : null;
      ValueAggregator valueAggregator=valueAggregators.get(key);
      if (valueAggregator == null) {
        valueAggregator=new ValueAggregator();
        valueAggregators.put(key,valueAggregator);
      }
      MultipleKey multipleKey=new MultipleKey(row,i);
      valueAggregator.addValue(multipleKey,new Double[]{xValue,yValue,zValue});
    }
  }
  return valueAggregators;
}

Fixed version (ground truth):
/** 
 * Method "fillDataset" fills in the data sets.
 * @param nominalColumns the nominal columns
 * @param listRows the rows (=result set)
 * @param firstNumericColumnIdx the index of the first numeric column
 * @return a map [key -> aggregated values] where identifies a level of aggregation
 */
private static Map<String,ValueAggregator> fillDataset(final EList<ModelElement> nominalColumns,final List<Object[]> listRows,final int firstNumericColumnIdx){
  Map<String,ValueAggregator> valueAggregators=new HashMap<String,ValueAggregator>();
  int xPos=firstNumericColumnIdx;
  int yPos=firstNumericColumnIdx + 1;
  int zPos=firstNumericColumnIdx + 2;
  for (int i=nominalColumns.size(); i > 0; i--) {
    String key=createKey(nominalColumns,i);
    if (null != listRows) {
      for (      Object[] row : listRows) {
        final Object xobj=row[xPos];
        final Double xValue=xobj != null ? Double.valueOf(String.valueOf(xobj)) : null;
        final Object yobj=row[yPos];
        final Double yValue=yobj != null ? Double.valueOf(String.valueOf(yobj)) : null;
        final Object zobj=row[zPos];
        final Double zValue=zobj != null ? Double.valueOf(String.valueOf(zobj)) : null;
        ValueAggregator valueAggregator=valueAggregators.get(key);
        if (valueAggregator == null) {
          valueAggregator=new ValueAggregator();
          valueAggregators.put(key,valueAggregator);
        }
        MultipleKey multipleKey=new MultipleKey(row,i);
        valueAggregator.addValue(multipleKey,new Double[]{xValue,yValue,zValue});
      }
    }
  }
  return valueAggregators;
}