Program: 33230
Project: 33230
Buggy source:
protected void transformResults(EvaluationResult result,ExperimentTaskResult expResult){
  if (result instanceof SubTaskResult) {
    ExperimentTaskResult subTask=new ExperimentTaskResult(((SubTaskResult)result).getConfiguration(),new double[6],ExperimentDAO.TASK_FINISHED,0);
    List<EvaluationResult> tempResults=((EvaluationResultContainer)result).getResults();
    for (    EvaluationResult tempResult : tempResults) {
      transformResults(tempResult,subTask);
    }
    expResult.addSubTask(subTask);
  }
  if (result instanceof EvaluationResultContainer) {
    List<EvaluationResult> tempResults=((EvaluationResultContainer)result).getResults();
    for (    EvaluationResult tempResult : tempResults) {
      transformResults(tempResult,expResult);
    }
  }
 else   if (result instanceof DoubleEvaluationResult) {
switch (result.getName()) {
case FMeasureCalculator.MACRO_F1_SCORE_NAME:
{
        expResult.results[ExperimentTaskResult.MACRO_F1_MEASURE_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
        return;
      }
case FMeasureCalculator.MACRO_PRECISION_NAME:
{
      expResult.results[ExperimentTaskResult.MACRO_PRECISION_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
      return;
    }
case FMeasureCalculator.MACRO_RECALL_NAME:
{
    expResult.results[ExperimentTaskResult.MACRO_RECALL_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
    return;
  }
case FMeasureCalculator.MICRO_F1_SCORE_NAME:
{
  expResult.results[ExperimentTaskResult.MICRO_F1_MEASURE_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
  return;
}
case FMeasureCalculator.MICRO_PRECISION_NAME:
{
expResult.results[ExperimentTaskResult.MICRO_PRECISION_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
return;
}
case FMeasureCalculator.MICRO_RECALL_NAME:
{
expResult.results[ExperimentTaskResult.MICRO_RECALL_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
return;
}
default :
{
int id=ResultNameToIdMapping.getInstance().getResultId(result.getName());
if (id == ResultNameToIdMapping.UKNOWN_RESULT_TYPE) {
LOGGER.error("String_Node_Str" + result.getName() + "String_Node_Str");
}
 else {
expResult.addAdditionalResult(id,((DoubleEvaluationResult)result).getValueAsDouble());
}
}
}
return;
}
 else if (result instanceof IntEvaluationResult) {
if (result.getName().equals(ErrorCountingAnnotatorDecorator.ERROR_COUNT_RESULT_NAME)) {
expResult.errorCount=((IntEvaluationResult)result).getValueAsInt();
return;
}
int id=ResultNameToIdMapping.getInstance().getResultId(result.getName());
if (id == ResultNameToIdMapping.UKNOWN_RESULT_TYPE) {
LOGGER.error("String_Node_Str" + result.getName() + "String_Node_Str");
}
 else {
expResult.addAdditionalResult(id,((IntEvaluationResult)result).getValueAsInt());
}
}
}

Fixed version (ground truth):
protected void transformResults(EvaluationResult result,ExperimentTaskResult expResult){
  if (result instanceof SubTaskResult) {
    ExperimentTaskResult subTask=new ExperimentTaskResult(((SubTaskResult)result).getConfiguration(),new double[6],ExperimentDAO.TASK_FINISHED,0);
    List<EvaluationResult> tempResults=((EvaluationResultContainer)result).getResults();
    for (    EvaluationResult tempResult : tempResults) {
      transformResults(tempResult,subTask);
    }
    expResult.addSubTask(subTask);
  }
 else   if (result instanceof EvaluationResultContainer) {
    List<EvaluationResult> tempResults=((EvaluationResultContainer)result).getResults();
    for (    EvaluationResult tempResult : tempResults) {
      transformResults(tempResult,expResult);
    }
  }
 else   if (result instanceof DoubleEvaluationResult) {
switch (result.getName()) {
case FMeasureCalculator.MACRO_F1_SCORE_NAME:
{
        expResult.results[ExperimentTaskResult.MACRO_F1_MEASURE_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
        return;
      }
case FMeasureCalculator.MACRO_PRECISION_NAME:
{
      expResult.results[ExperimentTaskResult.MACRO_PRECISION_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
      return;
    }
case FMeasureCalculator.MACRO_RECALL_NAME:
{
    expResult.results[ExperimentTaskResult.MACRO_RECALL_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
    return;
  }
case FMeasureCalculator.MICRO_F1_SCORE_NAME:
{
  expResult.results[ExperimentTaskResult.MICRO_F1_MEASURE_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
  return;
}
case FMeasureCalculator.MICRO_PRECISION_NAME:
{
expResult.results[ExperimentTaskResult.MICRO_PRECISION_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
return;
}
case FMeasureCalculator.MICRO_RECALL_NAME:
{
expResult.results[ExperimentTaskResult.MICRO_RECALL_INDEX]=((DoubleEvaluationResult)result).getValueAsDouble();
return;
}
default :
{
int id=ResultNameToIdMapping.getInstance().getResultId(result.getName());
if (id == ResultNameToIdMapping.UKNOWN_RESULT_TYPE) {
LOGGER.error("String_Node_Str" + result.getName() + "String_Node_Str");
}
 else {
expResult.addAdditionalResult(id,((DoubleEvaluationResult)result).getValueAsDouble());
}
}
}
return;
}
 else if (result instanceof IntEvaluationResult) {
if (result.getName().equals(ErrorCountingAnnotatorDecorator.ERROR_COUNT_RESULT_NAME)) {
expResult.errorCount=((IntEvaluationResult)result).getValueAsInt();
return;
}
int id=ResultNameToIdMapping.getInstance().getResultId(result.getName());
if (id == ResultNameToIdMapping.UKNOWN_RESULT_TYPE) {
LOGGER.error("String_Node_Str" + result.getName() + "String_Node_Str");
}
 else {
expResult.addAdditionalResult(id,((IntEvaluationResult)result).getValueAsInt());
}
}
}