Program: 133730
Project: 133730
Buggy source:
/** 
 * <!-- begin-UML-doc --> <p> This operation writes an instance of a particular class type from the input stream into a Java Object. This operation requires both the Object and the specific class type because some classes, such as local classes, do return the appropriate class type from a call to "this.getClass()." </p> <!-- end-UML-doc -->
 * @param dataObject <p> An Object that is an instance of the Class that is parsed to create the XML InputStream. </p>
 * @param outputStream <p> An OutputStream to which the XML should be written by JAXB. </p>
 * @throws NullPointerException
 * @throws JAXBException
 * @throws IOException
 * @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
 */
public void write(Object dataObject,OutputStream outputStream) throws NullPointerException, JAXBException, IOException {
  JAXBContext jaxbContext=null;
  if (dataObject == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (outputStream == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (!dataObject.getClass().isAnonymousClass()) {
    jaxbContext=JAXBContext.newInstance(dataObject.getClass());
  }
 else {
    jaxbContext=JAXBContext.newInstance(dataObject.getClass().getSuperclass());
  }
  Marshaller marshaller=jaxbContext.createMarshaller();
  marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE);
  marshaller.marshal(dataObject,outputStream);
}

Fixed version (ground truth):
/** 
 * <!-- begin-UML-doc --> <p> This operation writes an instance of a particular class type from the input stream into a Java Object. This operation requires both the Object and the specific class type because some classes, such as local classes, do return the appropriate class type from a call to "this.getClass()." </p> <!-- end-UML-doc -->
 * @param dataObject <p> An Object that is an instance of the Class that is parsed to create the XML InputStream. </p>
 * @param outputStream <p> An OutputStream to which the XML should be written by JAXB. </p>
 * @throws NullPointerException
 * @throws JAXBException
 * @throws IOException
 * @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
 */
public void write(Object dataObject,OutputStream outputStream) throws NullPointerException, JAXBException, IOException {
  JAXBContext jaxbContext=null;
  ArrayList<Class> classList=new ArrayList<Class>();
  Class[] classArray={};
  if (dataObject == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (outputStream == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (dataObject instanceof AbstractListComponent) {
    AbstractListComponent list=(AbstractListComponent)dataObject;
    if (list.size() > 0) {
      classList.add(AbstractListComponent.class);
      classList.add(list.get(0).getClass());
    }
  }
 else   if (!dataObject.getClass().isAnonymousClass()) {
    classList.add(dataObject.getClass());
  }
 else {
    classList.add(dataObject.getClass().getSuperclass());
  }
  if (classList.size() > 0) {
    jaxbContext=JAXBContext.newInstance(classList.toArray(classArray));
    Marshaller marshaller=jaxbContext.createMarshaller();
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE);
    marshaller.marshal(dataObject,outputStream);
  }
  return;
}