Program: 28885
Project: 28885
Buggy source:
private Event convertToSingleEventForDefaultMapping(Object eventObject) throws IOException {
  Event event=new Event(attributesSize);
  Object[] data=event.getData();
  com.fasterxml.jackson.core.JsonParser parser;
  int numberOfProvidedAttributes=0;
  try {
    parser=factory.createParser(eventObject.toString());
  }
 catch (  IOException e) {
    throw new ExecutionPlanRuntimeException("String_Node_Str" + eventObject.toString());
  }
  int position;
  while (!parser.isClosed()) {
    JsonToken jsonToken=parser.nextToken();
    if (JsonToken.START_OBJECT.equals(jsonToken)) {
      parser.nextToken();
      if (DEFAULT_JSON_EVENT_IDENTIFIER.equalsIgnoreCase(parser.getText())) {
        parser.nextToken();
      }
 else {
        throw new ExecutionPlanRuntimeException("String_Node_Str" + eventObject + "String_Node_Str"+ "String_Node_Str"+ parser.getText()+ "String_Node_Str");
      }
    }
 else     if (JsonToken.FIELD_NAME.equals(jsonToken)) {
      String key=parser.getCurrentName();
      numberOfProvidedAttributes++;
      position=findDefaultMappingPosition(key);
      if (position == -1) {
        throw new ExecutionPlanRuntimeException("String_Node_Str" + streamDefinition.getId() + "String_Node_Str"+ key+ "String_Node_Str"+ eventObject.toString()+ "String_Node_Str");
      }
      jsonToken=parser.nextToken();
      Attribute.Type type=streamAttributes.get(position).getType();
      if (JsonToken.VALUE_NULL.equals(jsonToken)) {
        data[position]=null;
      }
 else {
switch (type) {
case BOOL:
          if (JsonToken.VALUE_TRUE.equals(jsonToken) || JsonToken.VALUE_FALSE.equals(jsonToken)) {
            data[position]=parser.getValueAsBoolean();
            break;
          }
 else {
            throw new ExecutionPlanRuntimeException("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str");
          }
case INT:
        if (JsonToken.VALUE_NUMBER_FLOAT.equals(jsonToken)) {
          data[position]=parser.getValueAsInt();
          break;
        }
 else {
          throw new ExecutionPlanRuntimeException("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str");
        }
case DOUBLE:
      if (JsonToken.VALUE_NUMBER_FLOAT.equals(jsonToken)) {
        data[position]=parser.getValueAsDouble();
        break;
      }
 else {
        throw new ExecutionPlanRuntimeException("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str");
      }
case STRING:
    if (JsonToken.VALUE_STRING.equals(jsonToken)) {
      data[position]=parser.getValueAsString();
      break;
    }
 else {
      throw new ExecutionPlanRuntimeException("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str");
    }
case FLOAT:
  if (JsonToken.VALUE_NUMBER_FLOAT.equals(jsonToken) || JsonToken.VALUE_NUMBER_INT.equals(jsonToken)) {
    data[position]=convertAttribute(parser.getValueAsString(),Attribute.Type.FLOAT);
    break;
  }
 else {
    throw new ExecutionPlanRuntimeException("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str");
  }
case LONG:
if (JsonToken.VALUE_NUMBER_INT.equals(jsonToken)) {
  data[position]=parser.getValueAsLong();
  break;
}
 else {
  throw new ExecutionPlanRuntimeException("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str");
}
default :
return null;
}
}
}
}
if (failOnMissingAttribute && (numberOfProvidedAttributes != attributesSize)) {
throw new ExecutionPlanRuntimeException("String_Node_Str" + eventObject.toString() + "String_Node_Str");
}
return event;
}

Fixed version (ground truth):
private Event convertToSingleEventForDefaultMapping(Object eventObject) throws IOException {
  Event event=new Event(attributesSize);
  Object[] data=event.getData();
  JsonParser parser;
  int numberOfProvidedAttributes=0;
  try {
    parser=factory.createParser(eventObject.toString());
  }
 catch (  IOException e) {
    throw new ExecutionPlanRuntimeException("String_Node_Str" + eventObject.toString());
  }
  int position;
  while (!parser.isClosed()) {
    JsonToken jsonToken=parser.nextToken();
    if (JsonToken.START_OBJECT.equals(jsonToken)) {
      parser.nextToken();
      if (DEFAULT_JSON_EVENT_IDENTIFIER.equalsIgnoreCase(parser.getText())) {
        parser.nextToken();
      }
 else {
        log.error("String_Node_Str" + eventObject + "String_Node_Str"+ "String_Node_Str"+ parser.getText()+ "String_Node_Str");
        return null;
      }
    }
 else     if (JsonToken.FIELD_NAME.equals(jsonToken)) {
      String key=parser.getCurrentName();
      numberOfProvidedAttributes++;
      position=findDefaultMappingPosition(key);
      if (position == -1) {
        log.error("String_Node_Str" + streamDefinition.getId() + "String_Node_Str"+ key+ "String_Node_Str"+ eventObject.toString()+ "String_Node_Str");
        return null;
      }
      jsonToken=parser.nextToken();
      Attribute.Type type=streamAttributes.get(position).getType();
      if (JsonToken.VALUE_NULL.equals(jsonToken)) {
        data[position]=null;
      }
 else {
switch (type) {
case BOOL:
          if (JsonToken.VALUE_TRUE.equals(jsonToken) || JsonToken.VALUE_FALSE.equals(jsonToken)) {
            data[position]=parser.getValueAsBoolean();
          }
 else {
            log.error("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str"+ "String_Node_Str");
            return null;
          }
        break;
case INT:
      if (JsonToken.VALUE_NUMBER_INT.equals(jsonToken)) {
        data[position]=parser.getValueAsInt();
      }
 else {
        log.error("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str"+ "String_Node_Str");
        return null;
      }
    break;
case DOUBLE:
  if (JsonToken.VALUE_NUMBER_FLOAT.equals(jsonToken)) {
    data[position]=parser.getValueAsDouble();
  }
 else {
    log.error("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str"+ "String_Node_Str");
    return null;
  }
break;
case STRING:
if (JsonToken.VALUE_STRING.equals(jsonToken)) {
data[position]=parser.getValueAsString();
}
 else {
log.error("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str"+ "String_Node_Str");
return null;
}
break;
case FLOAT:
if (JsonToken.VALUE_NUMBER_FLOAT.equals(jsonToken) || JsonToken.VALUE_NUMBER_INT.equals(jsonToken)) {
data[position]=attributeConverter.getPropertyValue(parser.getValueAsString(),Attribute.Type.FLOAT);
}
 else {
log.error("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str"+ "String_Node_Str");
return null;
}
break;
case LONG:
if (JsonToken.VALUE_NUMBER_INT.equals(jsonToken)) {
data[position]=parser.getValueAsLong();
}
 else {
log.error("String_Node_Str" + eventObject.toString() + "String_Node_Str"+ parser.getText()+ "String_Node_Str"+ "String_Node_Str");
return null;
}
break;
default :
return null;
}
}
}
}
if (failOnMissingAttribute && (numberOfProvidedAttributes != attributesSize)) {
log.error("String_Node_Str" + eventObject.toString() + "String_Node_Str");
return null;
}
return event;
}