Program: 189720
Project: 189720
Buggy source:
/** 
 * Processes the Serialization Annotations and sets Serialization Properties that will be used during serialization of the response
 * @param serializationAnnotations The Serialization Annotations to process  
 * @param serializationProperties The Serialization properties derived from the Serialization Annotations
 */
protected void processSerializationAnnotations(final Set<SerializationAnnotation> serializationAnnotations,final Map<SerializationProperty,String> serializationProperties){
  String mediaType=null;
  for (  SerializationAnnotation serializationAnnotation : serializationAnnotations) {
    if (serializationAnnotation instanceof MethodAnnotation) {
      final String methodProp=((MethodAnnotation)serializationAnnotation).getMethod();
      serializationProperties.put(SerializationProperty.METHOD,methodProp);
      SupportedMethod method=null;
      try {
        method=(methodProp == null ? SupportedMethod.xml : SupportedMethod.valueOf(methodProp));
      }
 catch (      final IllegalArgumentException iae) {
        System.out.println(iae.getMessage());
      }
      if (method != null) {
        if (method.equals(SupportedMethod.xml) || method.equals(SupportedMethod.xhtml)) {
          serializationProperties.put(SerializationProperty.MEDIA_TYPE,getDefaultContentType());
        }
 else         if (method.equals(SupportedMethod.html) || method.equals(SupportedMethod.html5)) {
          serializationProperties.put(SerializationProperty.MEDIA_TYPE,InternetMediaType.TEXT_HTML.getMediaType() + "String_Node_Str" + getDefaultEncoding());
        }
 else         if (method.equals(SupportedMethod.json)) {
          serializationProperties.put(SerializationProperty.MEDIA_TYPE,InternetMediaType.APPLICATION_JSON.getMediaType() + "String_Node_Str" + getDefaultEncoding());
        }
      }
    }
 else     if (serializationAnnotation instanceof MediaTypeAnnotation) {
      mediaType=((MediaTypeAnnotation)serializationAnnotation).getMediaType();
    }
  }
  if (mediaType != null) {
    serializationProperties.put(SerializationProperty.MEDIA_TYPE,mediaType);
  }
}

Fixed version (ground truth):
/** 
 * Processes the Serialization Annotations and sets Serialization Properties that will be used during serialization of the response
 * @param serializationAnnotations The Serialization Annotations to process  
 * @param serializationProperties The Serialization properties derived from the Serialization Annotations
 */
protected void processSerializationAnnotations(final Set<SerializationAnnotation> serializationAnnotations,final Map<SerializationProperty,String> serializationProperties){
  String mediaType=null;
  for (  SerializationAnnotation serializationAnnotation : serializationAnnotations) {
    if (serializationAnnotation instanceof MethodAnnotation) {
      final String methodProp=((MethodAnnotation)serializationAnnotation).getMethod();
      serializationProperties.put(SerializationProperty.METHOD,methodProp);
      SupportedMethod method=null;
      try {
        method=(methodProp == null ? SupportedMethod.xml : SupportedMethod.valueOf(methodProp));
      }
 catch (      final IllegalArgumentException iae) {
        System.out.println(iae.getMessage());
      }
      if (method != null) {
        if (method.equals(SupportedMethod.xml) || method.equals(SupportedMethod.xhtml)) {
          serializationProperties.put(SerializationProperty.MEDIA_TYPE,getDefaultContentType());
        }
 else         if (method.equals(SupportedMethod.html) || method.equals(SupportedMethod.html5)) {
          serializationProperties.put(SerializationProperty.MEDIA_TYPE,InternetMediaType.TEXT_HTML.getMediaType() + "String_Node_Str" + getDefaultEncoding());
        }
 else         if (method.equals(SupportedMethod.json)) {
          serializationProperties.put(SerializationProperty.MEDIA_TYPE,InternetMediaType.APPLICATION_JSON.getMediaType() + "String_Node_Str" + getDefaultEncoding());
        }
 else         if (method.equals(SupportedMethod.binary)) {
          serializationProperties.put(SerializationProperty.MEDIA_TYPE,InternetMediaType.APPLICATION_OCTET_STREAM.getMediaType());
        }
      }
    }
 else     if (serializationAnnotation instanceof MediaTypeAnnotation) {
      mediaType=((MediaTypeAnnotation)serializationAnnotation).getMediaType();
    }
  }
  if (mediaType != null) {
    serializationProperties.put(SerializationProperty.MEDIA_TYPE,mediaType);
  }
}