Program: 109347
Project: 109347
Buggy source:
/** 
 * @return a {@link Map} between the values of the given {@link System} properties and the best value foundduring search
 * @throws ExecutionException if an error occurs while calling {@code evaluator}; the cause is the underlying exception
 */
public Map<String,Number> findGoodParameterValues() throws ExecutionException {
  int numProperties=parameterRanges.size();
  String[] propertyNames=new String[numProperties];
  Number[][] parameterValuesToTry=new Number[numProperties][];
  int index=0;
  for (  Map.Entry<String,ParameterRange> entry : parameterRanges.entrySet()) {
    propertyNames[index]=entry.getKey();
    parameterValuesToTry[index]=entry.getValue().buildSteps(numSteps);
    index++;
  }
  int numTests=1;
  for (  Number[] toTry : parameterValuesToTry) {
    numTests*=toTry.length;
  }
  List<Pair<Double,String>> testResultLinesByValue=Lists.newArrayListWithCapacity(numTests);
  Map<String,Number> bestParameterValues=Maps.newHashMap();
  double bestValue=minimize ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY;
  for (int test=0; test < numTests; test++) {
    StringBuilder testResultLine=new StringBuilder();
    for (int prop=0; prop < numProperties; prop++) {
      String property=propertyNames[prop];
      Number parameterValue=getParameterValueToTry(parameterValuesToTry,test,prop);
      String propertyString=parameterValue.toString();
      log.info("String_Node_Str",property,propertyString);
      System.setProperty(property,propertyString);
      testResultLine.append('[').append(property).append('=').append(propertyString).append("String_Node_Str");
    }
    double testValue;
    try {
      testValue=evaluator.call().doubleValue();
    }
 catch (    Exception e) {
      throw new ExecutionException(e);
    }
    testResultLine.append("String_Node_Str").append(testValue);
    testResultLinesByValue.add(new Pair<Double,String>(testValue,testResultLine.toString()));
    log.info("String_Node_Str",testResultLine);
    if (minimize ? testValue < bestValue : testValue > bestValue) {
      log.info("String_Node_Str",testValue);
      bestValue=testValue;
      for (int prop=0; prop < numProperties; prop++) {
        String property=propertyNames[prop];
        Number parameterValue=getParameterValueToTry(parameterValuesToTry,test,prop);
        bestParameterValues.put(property,parameterValue);
      }
    }
    Collections.sort(testResultLinesByValue,new Comparator<Pair<Double,String>>(){
      @Override public int compare(      Pair<Double,String> a,      Pair<Double,String> b){
        if (a.getFirst() > b.getFirst()) {
          return -1;
        }
        if (a.getFirst() < b.getFirst()) {
          return 1;
        }
        return 0;
      }
    }
);
    for (    Pair<Double,String> result : testResultLinesByValue) {
      log.info("String_Node_Str",result.getSecond());
    }
    log.info("String_Node_Str",bestParameterValues);
  }
  log.info("String_Node_Str",bestParameterValues);
  return bestParameterValues;
}

Fixed version (ground truth):
/** 
 * @return a {@link Map} between the values of the given {@link System} properties and the best value foundduring search
 * @throws ExecutionException if an error occurs while calling {@code evaluator}; the cause is the underlying exception
 */
public Map<String,Number> findGoodParameterValues() throws ExecutionException {
  int numProperties=parameterRanges.size();
  String[] propertyNames=new String[numProperties];
  Number[][] parameterValuesToTry=new Number[numProperties][];
  int index=0;
  for (  Map.Entry<String,ParameterRange> entry : parameterRanges.entrySet()) {
    propertyNames[index]=entry.getKey();
    parameterValuesToTry[index]=entry.getValue().buildSteps(numSteps);
    index++;
  }
  int numTests=1;
  for (  Number[] toTry : parameterValuesToTry) {
    numTests*=toTry.length;
  }
  List<Pair<Double,String>> testResultLinesByValue=Lists.newArrayListWithCapacity(numTests);
  Map<String,Number> bestParameterValues=Maps.newHashMap();
  double bestValue=minimize ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY;
  for (int test=0; test < numTests; test++) {
    StringBuilder testResultLine=new StringBuilder();
    for (int prop=0; prop < numProperties; prop++) {
      String property=propertyNames[prop];
      Number parameterValue=getParameterValueToTry(parameterValuesToTry,test,prop);
      String propertyString=parameterValue.toString();
      log.info("String_Node_Str",property,propertyString);
      System.setProperty(property,propertyString);
      testResultLine.append('[').append(property).append('=').append(propertyString).append("String_Node_Str");
    }
    Number evaluatorResult;
    try {
      evaluatorResult=evaluator.call();
    }
 catch (    Exception e) {
      throw new ExecutionException(e);
    }
    if (evaluatorResult == null) {
      continue;
    }
    double testValue=evaluatorResult.doubleValue();
    testResultLine.append("String_Node_Str").append(testValue);
    testResultLinesByValue.add(new Pair<Double,String>(testValue,testResultLine.toString()));
    log.info("String_Node_Str",testResultLine);
    if (minimize ? testValue < bestValue : testValue > bestValue) {
      log.info("String_Node_Str",testValue);
      bestValue=testValue;
      for (int prop=0; prop < numProperties; prop++) {
        String property=propertyNames[prop];
        Number parameterValue=getParameterValueToTry(parameterValuesToTry,test,prop);
        bestParameterValues.put(property,parameterValue);
      }
    }
    Collections.sort(testResultLinesByValue,new Comparator<Pair<Double,String>>(){
      @Override public int compare(      Pair<Double,String> a,      Pair<Double,String> b){
        if (a.getFirst() > b.getFirst()) {
          return -1;
        }
        if (a.getFirst() < b.getFirst()) {
          return 1;
        }
        return 0;
      }
    }
);
    for (    Pair<Double,String> result : testResultLinesByValue) {
      log.info("String_Node_Str",result.getSecond());
    }
    log.info("String_Node_Str",bestParameterValues);
  }
  log.info("String_Node_Str",bestParameterValues);
  return bestParameterValues;
}