Program: 64872
Project: 64872
Buggy source:
public void testXmlAdapterOnElement() throws Exception {
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  InputStream iStream=classLoader.getResourceAsStream(XMLADAPTER_ELEMENT);
  if (iStream == null) {
    fail("String_Node_Str" + XMLADAPTER_ELEMENT + "String_Node_Str");
  }
  Map<String,Object> properties=new HashMap<String,Object>();
  properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY,iStream);
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(classLoader,properties);
  DynamicEntity person=jaxbContext.newDynamicEntity(PACKAGE + "String_Node_Str" + PERSON);
  assertNotNull("String_Node_Str",person);
  Computer computer=new Computer();
  computer.ipCode=121531298;
  computer.macCode=48261593;
  computer.workgroup='C';
  String STREET="String_Node_Str";
  String CITY="String_Node_Str";
  String STATE="String_Node_Str";
  String ZIP="String_Node_Str";
  DynamicEntity address=jaxbContext.newDynamicEntity(PACKAGE + "String_Node_Str" + ADDRESS);
  assertNotNull("String_Node_Str",address);
  address.set("String_Node_Str",STREET);
  address.set("String_Node_Str",CITY);
  address.set("String_Node_Str",STATE);
  address.set("String_Node_Str",ZIP);
  person.set("String_Node_Str","String_Node_Str");
  person.set("String_Node_Str",computer);
  person.set("String_Node_Str",address);
  LinkAdapterString.jc=jaxbContext;
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  jaxbContext.createMarshaller().marshal(person,System.out);
  DynamicEntity readPerson=(DynamicEntity)jaxbContext.createUnmarshaller().unmarshal(marshalDoc);
  DynamicEntity readAddress=readPerson.get("String_Node_Str");
  assertEquals("String_Node_Str",STREET,readAddress.get("String_Node_Str"));
  assertEquals("String_Node_Str",CITY,readAddress.get("String_Node_Str"));
  assertEquals("String_Node_Str",STATE,readAddress.get("String_Node_Str"));
  assertEquals("String_Node_Str",ZIP,readAddress.get("String_Node_Str"));
}

Fixed version (ground truth):
public void testXmlAdapterOnElement() throws Exception {
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  InputStream iStream=classLoader.getResourceAsStream(XMLADAPTER_ELEMENT);
  if (iStream == null) {
    fail("String_Node_Str" + XMLADAPTER_ELEMENT + "String_Node_Str");
  }
  Map<String,Object> properties=new HashMap<String,Object>();
  properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY,iStream);
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(classLoader,properties);
  DynamicEntity person=jaxbContext.newDynamicEntity(PACKAGE + "String_Node_Str" + PERSON);
  assertNotNull("String_Node_Str",person);
  Computer computer=new Computer();
  computer.ipCode=121531298;
  computer.macCode=48261593;
  computer.workgroup='C';
  String STREET="String_Node_Str";
  String CITY="String_Node_Str";
  String STATE="String_Node_Str";
  String ZIP="String_Node_Str";
  DynamicEntity address=jaxbContext.newDynamicEntity(PACKAGE + "String_Node_Str" + ADDRESS);
  assertNotNull("String_Node_Str",address);
  address.set("String_Node_Str",STREET);
  address.set("String_Node_Str",CITY);
  address.set("String_Node_Str",STATE);
  address.set("String_Node_Str",ZIP);
  person.set("String_Node_Str","String_Node_Str");
  person.set("String_Node_Str",computer);
  person.set("String_Node_Str",address);
  LinkAdapterString.jc=jaxbContext;
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  DynamicEntity readPerson=(DynamicEntity)jaxbContext.createUnmarshaller().unmarshal(marshalDoc);
  DynamicEntity readAddress=readPerson.get("String_Node_Str");
  assertEquals("String_Node_Str",STREET,readAddress.get("String_Node_Str"));
  assertEquals("String_Node_Str",CITY,readAddress.get("String_Node_Str"));
  assertEquals("String_Node_Str",STATE,readAddress.get("String_Node_Str"));
  assertEquals("String_Node_Str",ZIP,readAddress.get("String_Node_Str"));
}