Program: 65478
Project: 65478
Buggy source:
public void setProperty(String key,Object value) throws PropertyException {
  try {
    if (key == null) {
      throw new IllegalArgumentException();
    }
 else     if (JAXB_FORMATTED_OUTPUT.equals(key)) {
      Boolean formattedOutput=(Boolean)value;
      xmlMarshaller.setFormattedOutput(formattedOutput.booleanValue());
    }
 else     if (JAXB_ENCODING.equals(key)) {
      xmlMarshaller.setEncoding((String)value);
    }
 else     if (JAXB_SCHEMA_LOCATION.equals(key)) {
      xmlMarshaller.setSchemaLocation((String)value);
    }
 else     if (JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(key)) {
      xmlMarshaller.setNoNamespaceSchemaLocation((String)value);
    }
 else     if (XMLConstants.JAXB_FRAGMENT.equals(key)) {
      Boolean fragment=(Boolean)value;
      xmlMarshaller.setFragment(fragment.booleanValue());
    }
 else     if (XML_DECLARATION.equals(key)) {
      Boolean fragment=!(Boolean)value;
      xmlMarshaller.setFragment(fragment.booleanValue());
    }
 else     if (JAXBContext.MEDIA_TYPE.equals(key)) {
      MediaType mType=MediaType.getMediaTypeByName((String)value);
      if (mType != null) {
        xmlMarshaller.setMediaType(mType);
      }
 else {
        throw new PropertyException(key,value);
      }
    }
 else     if (JAXBContext.ATTRIBUTE_PREFIX.equals(key)) {
      xmlMarshaller.setAttributePrefix((String)value);
    }
 else     if (JAXBContext.INCLUDE_ROOT.equals(key)) {
      xmlMarshaller.setIncludeRoot((Boolean)value);
    }
 else     if (JAXBContext.NAMESPACES.equals(key)) {
      if (value != null) {
        Map<String,String> namespaces=(Map<String,String>)value;
        NamespaceResolver nr=new NamespaceResolver();
        nr.getPrefixesToNamespaces().putAll(namespaces);
        xmlMarshaller.setNamespaceResolver(nr);
      }
    }
 else     if (JAXBContext.VALUE_WRAPPER.equals(key)) {
      xmlMarshaller.setValueWrapper((String)value);
    }
 else {
      throw new PropertyException(key,value);
    }
  }
 catch (  ClassCastException exception) {
    throw new PropertyException(key,exception);
  }
}

Fixed version (ground truth):
public void setProperty(String key,Object value) throws PropertyException {
  try {
    if (key == null) {
      throw new IllegalArgumentException();
    }
 else     if (JAXB_FORMATTED_OUTPUT.equals(key)) {
      Boolean formattedOutput=(Boolean)value;
      xmlMarshaller.setFormattedOutput(formattedOutput.booleanValue());
    }
 else     if (JAXB_ENCODING.equals(key)) {
      xmlMarshaller.setEncoding((String)value);
    }
 else     if (JAXB_SCHEMA_LOCATION.equals(key)) {
      xmlMarshaller.setSchemaLocation((String)value);
    }
 else     if (JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(key)) {
      xmlMarshaller.setNoNamespaceSchemaLocation((String)value);
    }
 else     if (XMLConstants.JAXB_FRAGMENT.equals(key)) {
      Boolean fragment=(Boolean)value;
      xmlMarshaller.setFragment(fragment.booleanValue());
    }
 else     if (ECLIPSELINK_NAMESPACE_PREFIX_MAPPER.equals(key)) {
      xmlMarshaller.setNamespacePrefixMapper((NamespacePrefixMapper)value);
    }
 else     if (RI_NAMESPACE_PREFIX_MAPPER.equals(key) || JSE_NAMESPACE_PREFIX_MAPPER.equals(key)) {
      xmlMarshaller.setNamespacePrefixMapper(new NamespacePrefixMapperWrapper(value));
    }
 else     if (XML_DECLARATION.equals(key)) {
      Boolean fragment=!(Boolean)value;
      xmlMarshaller.setFragment(fragment.booleanValue());
    }
 else     if (JAXBContext.MEDIA_TYPE.equals(key)) {
      MediaType mType=MediaType.getMediaTypeByName((String)value);
      if (mType != null) {
        xmlMarshaller.setMediaType(mType);
      }
 else {
        throw new PropertyException(key,value);
      }
    }
 else     if (JAXBContext.ATTRIBUTE_PREFIX.equals(key)) {
      xmlMarshaller.setAttributePrefix((String)value);
    }
 else     if (JAXBContext.INCLUDE_ROOT.equals(key)) {
      xmlMarshaller.setIncludeRoot((Boolean)value);
    }
 else     if (JAXBContext.NAMESPACES.equals(key)) {
      if (value != null) {
        Map<String,String> namespaces=(Map<String,String>)value;
        NamespaceResolver nr=new NamespaceResolver();
        nr.getPrefixesToNamespaces().putAll(namespaces);
        xmlMarshaller.setNamespaceResolver(nr);
      }
    }
 else     if (JAXBContext.VALUE_WRAPPER.equals(key)) {
      xmlMarshaller.setValueWrapper((String)value);
    }
 else {
      throw new PropertyException(key,value);
    }
  }
 catch (  ClassCastException exception) {
    throw new PropertyException(key,exception);
  }
}