Program: 20612
Project: 20612
Buggy source:
private void addMethod(ActionType q,Resource res,IMethodModel m,IDocInfo documentation){
  Action value=new Action();
  value.setType(q);
  res.getActions().put(q,value);
  IParameterModel[] parameters=m.getParameters();
  for (  IParameterModel pm : parameters) {
    if (pm.hasAnnotation(QUERY_PARAM)) {
      String annotationValue=pm.getAnnotationValue(QUERY_PARAM);
      String type=pm.getType();
      QueryParameter value2=new QueryParameter();
      proceedType(type,value2);
      value2.setDescription(documentation.getDocumentation(pm.getName()));
      value.getQueryParameters().put(annotationValue,value2);
    }
  }
  for (  IParameterModel pm : parameters) {
    if (pm.hasAnnotation(HEADER_PARAM)) {
      String annotationValue=pm.getAnnotationValue(HEADER_PARAM);
      Header value2=new Header();
      proceedType(pm.getType(),value2);
      value2.setDescription(documentation.getDocumentation(pm.getName()));
      value.getHeaders().put(annotationValue,value2);
    }
  }
  for (  IParameterModel pm : parameters) {
    if (pm.hasAnnotation(PATH_PARAM)) {
      String annotationValue=pm.getAnnotationValue(PATH_PARAM);
      UriParameter value2=new UriParameter();
      value2.setDescription(documentation.getDocumentation(pm.getName()));
      proceedType(pm.getType(),value2);
      res.getUriParameters().put(annotationValue,value2);
    }
  }
  String[] consumesValue=m.getAnnotationValues(CONSUMES);
  if (consumesValue == null) {
    consumesValue=classConsumes;
  }
  if (consumesValue != null) {
    for (    String s : consumesValue) {
      s=sanitizeMediaType(s);
      MimeType value2=new MimeType();
      value2.setType(s);
      value.getBody().put(s,value2);
    }
  }
  String[] producesValue=m.getAnnotationValues(PRODUCES);
  if (producesValue == null) {
    producesValue=classProduces;
  }
  if (producesValue != null) {
    Response value2=new Response();
    value2.setDescription(documentation.getReturnInfo());
    for (    String s : producesValue) {
      s=sanitizeMediaType(s);
      MimeType mimeType=new MimeType();
      mimeType.setType(s);
      value2.getBody().put(s,mimeType);
    }
    value.getResponses().put("String_Node_Str",value2);
  }
}

Fixed version (ground truth):
private void addMethod(ActionType q,Resource res,IMethodModel m,IDocInfo documentation){
  Action value=new Action();
  value.setType(q);
  res.getActions().put(q,value);
  IParameterModel[] parameters=m.getParameters();
  for (  IParameterModel pm : parameters) {
    if (pm.hasAnnotation(QUERY_PARAM)) {
      String annotationValue=pm.getAnnotationValue(QUERY_PARAM);
      String type=pm.getType();
      QueryParameter value2=new QueryParameter();
      proceedType(type,value2);
      value2.setDescription(documentation.getDocumentation(pm.getName()));
      value.getQueryParameters().put(annotationValue,value2);
    }
  }
  for (  IParameterModel pm : parameters) {
    if (pm.hasAnnotation(HEADER_PARAM)) {
      String annotationValue=pm.getAnnotationValue(HEADER_PARAM);
      Header value2=new Header();
      proceedType(pm.getType(),value2);
      value2.setDescription(documentation.getDocumentation(pm.getName()));
      value.getHeaders().put(annotationValue,value2);
    }
  }
  for (  IParameterModel pm : parameters) {
    if (pm.hasAnnotation(PATH_PARAM)) {
      String annotationValue=pm.getAnnotationValue(PATH_PARAM);
      UriParameter value2=new UriParameter();
      value2.setDescription(documentation.getDocumentation(pm.getName()));
      proceedType(pm.getType(),value2);
      res.getUriParameters().put(annotationValue,value2);
    }
  }
  String[] consumesValue=m.getAnnotationValues(CONSUMES);
  if (consumesValue == null) {
    consumesValue=classConsumes;
  }
  if (consumesValue != null) {
    for (    String s : consumesValue) {
      s=sanitizeMediaType(s);
      MimeType value2=new MimeType();
      value2.setType(s);
      value.getBody().put(s,value2);
    }
  }
  String[] producesValue=m.getAnnotationValues(PRODUCES);
  if (producesValue == null) {
    producesValue=classProduces;
  }
  if (producesValue != null) {
    Response value2=new Response();
    value2.setDescription(documentation.getReturnInfo());
    for (    String s : producesValue) {
      s=sanitizeMediaType(s);
      MimeType mimeType=new MimeType();
      mimeType.setType(s);
      value2.getBody().put(s,mimeType);
    }
    value.getResponses().put("String_Node_Str",value2);
  }
 else {
    Response value2=new Response();
    value2.setDescription(documentation.getReturnInfo());
    value.getResponses().put("String_Node_Str",value2);
  }
}