nus-yam/ex-repair huggingface dataset:
Program: 63795
Project: 63795
Buggy source:
public void testUnmarshalLevelElementWithClass() throws Exception {
  if (null == xmlInputFactory) {
    return;
  }
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  XMLStreamReader xmlStreamReader=xmlInputFactory.createXMLStreamReader(instream);
  xmlStreamReader.next();
  XMLStreamReaderReader staxReader=new XMLStreamReaderReader();
  XMLContext xmlContext=new XMLContext(new AddressProject());
  XMLUnmarshaller xmlUnmarshaller=xmlContext.createUnmarshaller();
  staxReader.setErrorHandler(xmlUnmarshaller.getErrorHandler());
  XMLStreamReaderInputSource inputSource=new XMLStreamReaderInputSource(xmlStreamReader);
  xmlUnmarshaller.unmarshal(staxReader,inputSource,Address.class);
  if (xmlStreamReader.getEventType() != XMLStreamReader.END_ELEMENT) {
    fail("String_Node_Str");
  }
  if (!xmlStreamReader.getLocalName().equals("String_Node_Str")) {
    fail("String_Node_Str");
  }
  instream.close();
}

Fixed version (ground truth):
public void testUnmarshalLevelElementWithClass() throws Exception {
  if (null == xmlInputFactory) {
    return;
  }
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  XMLStreamReader xmlStreamReader=xmlInputFactory.createXMLStreamReader(instream);
  xmlStreamReader.next();
  XMLStreamReaderReader staxReader=new XMLStreamReaderReader();
  XMLContext xmlContext=new XMLContext(new AddressProject());
  XMLUnmarshaller xmlUnmarshaller=xmlContext.createUnmarshaller();
  staxReader.setErrorHandler(xmlUnmarshaller.getErrorHandler());
  XMLStreamReaderInputSource inputSource=new XMLStreamReaderInputSource(xmlStreamReader);
  xmlUnmarshaller.unmarshal(staxReader,inputSource,Address.class);
  if (xmlStreamReader.getEventType() != XMLStreamReader.END_DOCUMENT) {
    fail("String_Node_Str");
  }
  instream.close();
}
Program: 63796
Project: 63796
Buggy source:
public void testUnmarshalLevelElement() throws Exception {
  if (null == xmlInputFactory) {
    return;
  }
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  XMLStreamReader xmlStreamReader=xmlInputFactory.createXMLStreamReader(instream);
  xmlStreamReader.next();
  XMLStreamReaderReader staxReader=new XMLStreamReaderReader();
  XMLContext xmlContext=new XMLContext(new AddressProject());
  XMLUnmarshaller xmlUnmarshaller=xmlContext.createUnmarshaller();
  staxReader.setErrorHandler(xmlUnmarshaller.getErrorHandler());
  XMLStreamReaderInputSource inputSource=new XMLStreamReaderInputSource(xmlStreamReader);
  xmlUnmarshaller.unmarshal(staxReader,inputSource);
  if (xmlStreamReader.getEventType() != XMLStreamReader.END_ELEMENT) {
    fail("String_Node_Str");
  }
  if (!xmlStreamReader.getLocalName().equals("String_Node_Str")) {
    fail("String_Node_Str");
  }
  instream.close();
}

Fixed version (ground truth):
public void testUnmarshalLevelElement() throws Exception {
  if (null == xmlInputFactory) {
    return;
  }
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  XMLStreamReader xmlStreamReader=xmlInputFactory.createXMLStreamReader(instream);
  xmlStreamReader.next();
  XMLStreamReaderReader staxReader=new XMLStreamReaderReader();
  XMLContext xmlContext=new XMLContext(new AddressProject());
  XMLUnmarshaller xmlUnmarshaller=xmlContext.createUnmarshaller();
  staxReader.setErrorHandler(xmlUnmarshaller.getErrorHandler());
  XMLStreamReaderInputSource inputSource=new XMLStreamReaderInputSource(xmlStreamReader);
  xmlUnmarshaller.unmarshal(staxReader,inputSource);
  if (xmlStreamReader.getEventType() != XMLStreamReader.END_DOCUMENT) {
    fail("String_Node_Str");
  }
  instream.close();
}
Program: 63799
Project: 63799
Buggy source:
/** 
 * Set this Marshaller's CharacterEscapeHandler.
 * @since 2.3.3
 */
public void setCharacterEscapeHandler(CharacterEscapeHandler c){
  this.charEscapeHandler=c;
}

Fixed version (ground truth):
/** 
 * Set this Marshaller's CharacterEscapeHandler.
 * @since 2.3.3
 */
public void setCharacterEscapeHandler(CHARACTER_ESCAPE_HANDLER c){
  this.charEscapeHandler=c;
}
Program: 63800
Project: 63800
Buggy source:
/** 
 * Copy constructor
 */
protected Marshaller(Marshaller marshaller){
  this.charEscapeHandler=marshaller.getCharacterEscapeHandler();
  this.context=(CONTEXT)marshaller.getContext();
  this.encoding=marshaller.getEncoding();
  this.equalUsingIdenity=marshaller.isEqualUsingIdenity();
  this.errorHandler=marshaller.getErrorHandler();
  this.formattedOutput=marshaller.isFormattedOutput();
  this.indentString=marshaller.getIndentString();
  this.mapper=(NAMESPACE_PREFIX_MAPPER)marshaller.getNamespacePrefixMapper();
  this.marshalListener=(MARSHALLER_LISTENER)marshaller.getMarshalListener();
  if (marshaller.marshalProperties != null) {
    marshalProperties=new Properties();
    for (    Entry entry : marshalProperties.entrySet()) {
      marshalProperties.put(entry.getKey(),entry.getValue());
    }
  }
}

Fixed version (ground truth):
/** 
 * Copy constructor
 */
protected Marshaller(Marshaller marshaller){
  this.charEscapeHandler=(CHARACTER_ESCAPE_HANDLER)marshaller.getCharacterEscapeHandler();
  this.context=(CONTEXT)marshaller.getContext();
  this.encoding=marshaller.getEncoding();
  this.equalUsingIdenity=marshaller.isEqualUsingIdenity();
  this.errorHandler=marshaller.getErrorHandler();
  this.formattedOutput=marshaller.isFormattedOutput();
  this.indentString=marshaller.getIndentString();
  this.mapper=(NAMESPACE_PREFIX_MAPPER)marshaller.getNamespacePrefixMapper();
  this.marshalListener=(MARSHALLER_LISTENER)marshaller.getMarshalListener();
  if (marshaller.marshalProperties != null) {
    marshalProperties=new Properties();
    for (    Entry entry : marshalProperties.entrySet()) {
      marshalProperties.put(entry.getKey(),entry.getValue());
    }
  }
}
Program: 63801
Project: 63801
Buggy source:
/** 
 * Return this Marshaller's CharacterEscapeHandler.
 * @since 2.3.3
 */
public CharacterEscapeHandler getCharacterEscapeHandler(){
  return this.charEscapeHandler;
}

Fixed version (ground truth):
/** 
 * Return this Marshaller's CharacterEscapeHandler.
 * @since 2.3.3
 */
public CHARACTER_ESCAPE_HANDLER getCharacterEscapeHandler(){
  return this.charEscapeHandler;
}
Program: 63803
Project: 63803
Buggy source:
/** 
 * <p> Perform character escaping and write the result to the output. </p> <p> Note: This feature is <i>not</i> supported when marshalling to the following targets: <ul> <li>javax.xml.stream.XMLStreamWriter</li> <li>javax.xml.stream.XMLEventWriter</li> <li>org.xml.sax.ContentHandler</li> <li>org.w3c.dom.Node</li> </ul> </p>
 * @param buffer Array of characters to be escaped
 * @param start The starting position
 * @param length The number of characters being escaped
 * @param isAttributeValue A value of 'true' indicates this is an attribute value
 * @param out The resulting escaped characters will be written to this Writer
 * @throws IOException In an error condition, IOException can be thrown to stop the marshalling process
 */
public void escape(char[] buffer,int start,int length,boolean isAttributeValue,Writer out) throws IOException ;

Fixed version (ground truth):
/** 
 * <p> Perform character escaping and write the result to the output. </p> <p> Note: This feature is <i>not</i> supported when marshalling to the following targets: <ul> <li>javax.xml.stream.XMLStreamWriter</li> <li>javax.xml.stream.XMLEventWriter</li> <li>org.xml.sax.ContentHandler</li> <li>org.w3c.dom.Node</li> </ul> </p>
 * @param buffer Array of characters to be escaped
 * @param start The starting position
 * @param length The number of characters being escaped
 * @param isAttributeValue A value of 'true' indicates this is an attribute value
 * @param out The resulting escaped characters will be written to this Writer
 * @throws IOException In an error condition, IOException can be thrown to stop the marshalling process
 */
@Override public void escape(char[] buffer,int start,int length,boolean isAttributeValue,Writer out) throws IOException ;
Program: 63804
Project: 63804
Buggy source:
public boolean hasEqualNamespaceResolvers(){
  return equalNamespaceResolvers;
}

Fixed version (ground truth):
@Override public boolean hasEqualNamespaceResolvers(){
  return equalNamespaceResolvers;
}
Program: 63805
Project: 63805
Buggy source:
/** 
 * INTERNAL
 */
public void writeHeader(){
  try {
    writer.write(getMarshaller().getXmlHeader());
    writer.write(Helper.cr());
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL
 */
public void writeHeader(){
  try {
    writer.write(getMarshaller().getXmlHeader());
    writer.write(CR);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63806
Project: 63806
Buggy source:
public void startElement(String namespaceURI,String localName,String qName,Attributes atts) throws SAXException {
  try {
    if (isStartElementOpen) {
      writer.write('>');
    }
    if (!isLastEventText) {
      writer.write(Helper.cr());
      for (int x=0; x < numberOfTabs; x++) {
        writer.write(tab());
      }
    }
    writer.write('<');
    writer.write(qName);
    numberOfTabs++;
    isStartElementOpen=true;
    isLastEventText=false;
    handleAttributes(atts);
    writePrefixMappings();
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
public void startElement(String namespaceURI,String localName,String qName,Attributes atts) throws SAXException {
  try {
    if (isStartElementOpen) {
      writer.write('>');
    }
    if (!isLastEventText) {
      writer.write(CR);
      for (int x=0; x < numberOfTabs; x++) {
        writer.write(tab());
      }
    }
    writer.write('<');
    writer.write(qName);
    numberOfTabs++;
    isStartElementOpen=true;
    isLastEventText=false;
    handleAttributes(atts);
    writePrefixMappings();
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63807
Project: 63807
Buggy source:
public void startDocument(String encoding,String version){
  super.startDocument(encoding,version);
  try {
    writer.write(Helper.cr());
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
public void startDocument(String encoding,String version){
  super.startDocument(encoding,version);
  try {
    writer.write(CR);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63808
Project: 63808
Buggy source:
/** 
 * INTERNAL:
 */
public void endDocument(){
  try {
    writer.write(Helper.cr());
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void endDocument(){
  try {
    writer.write(CR);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63809
Project: 63809
Buggy source:
/** 
 * INTERNAL:
 */
public void openStartElement(XPathFragment xPathFragment,NamespaceResolver namespaceResolver){
  this.addPositionalNodes(xPathFragment,namespaceResolver);
  try {
    if (isStartElementOpen) {
      writer.write('>');
    }
    if (!isLastEventText) {
      if (numberOfTabs > 0) {
        writer.write(Helper.cr());
      }
      for (int x=0; x < numberOfTabs; x++) {
        writer.write(tab());
      }
    }
    isStartElementOpen=true;
    writer.write('<');
    writer.write(getNameForFragment(xPathFragment));
    if (xPathFragment.isGeneratedPrefix()) {
      namespaceDeclaration(xPathFragment.getPrefix(),xPathFragment.getNamespaceURI());
    }
    numberOfTabs++;
    isLastEventText=false;
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void openStartElement(XPathFragment xPathFragment,NamespaceResolver namespaceResolver){
  this.addPositionalNodes(xPathFragment,namespaceResolver);
  try {
    if (isStartElementOpen) {
      writer.write('>');
    }
    if (!isLastEventText) {
      if (numberOfTabs > 0) {
        writer.write(CR);
      }
      for (int x=0; x < numberOfTabs; x++) {
        writer.write(tab());
      }
    }
    isStartElementOpen=true;
    writer.write('<');
    writer.write(getNameForFragment(xPathFragment));
    if (xPathFragment.isGeneratedPrefix()) {
      namespaceDeclaration(xPathFragment.getPrefix(),xPathFragment.getNamespaceURI());
    }
    numberOfTabs++;
    isLastEventText=false;
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63810
Project: 63810
Buggy source:
public void endElement(String namespaceURI,String localName,String qName) throws SAXException {
  try {
    isLastEventText=false;
    numberOfTabs--;
    if (isStartElementOpen) {
      writer.write('/');
      writer.write('>');
      isStartElementOpen=false;
      complexType=true;
      return;
    }
    if (complexType) {
      writer.write(Helper.cr());
      for (int x=0; x < numberOfTabs; x++) {
        writer.write(tab());
      }
    }
 else {
      complexType=true;
    }
    super.endElement(namespaceURI,localName,qName);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
public void endElement(String namespaceURI,String localName,String qName) throws SAXException {
  try {
    isLastEventText=false;
    numberOfTabs--;
    if (isStartElementOpen) {
      writer.write('/');
      writer.write('>');
      isStartElementOpen=false;
      complexType=true;
      return;
    }
    if (complexType) {
      writer.write(CR);
      for (int x=0; x < numberOfTabs; x++) {
        writer.write(tab());
      }
    }
 else {
      complexType=true;
    }
    super.endElement(namespaceURI,localName,qName);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63811
Project: 63811
Buggy source:
public void comment(char[] ch,int start,int length) throws SAXException {
  try {
    if (isStartElementOpen) {
      writer.write('>');
      writer.write(Helper.cr());
      isStartElementOpen=false;
    }
    writeComment(ch,start,length);
    complexType=false;
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
public void comment(char[] ch,int start,int length) throws SAXException {
  try {
    if (isStartElementOpen) {
      writer.write('>');
      writer.write(CR);
      isStartElementOpen=false;
    }
    writeComment(ch,start,length);
    complexType=false;
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63812
Project: 63812
Buggy source:
/** 
 * INTERNAL:
 */
public void element(XPathFragment frag){
  try {
    isLastEventText=false;
    if (isStartElementOpen) {
      writer.write('>');
      isStartElementOpen=false;
    }
    writer.write(Helper.cr());
    for (int x=0; x < numberOfTabs; x++) {
      writer.write(tab());
    }
    super.element(frag);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void element(XPathFragment frag){
  try {
    isLastEventText=false;
    if (isStartElementOpen) {
      writer.write('>');
      isStartElementOpen=false;
    }
    writer.write(CR);
    for (int x=0; x < numberOfTabs; x++) {
      writer.write(tab());
    }
    super.element(frag);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63813
Project: 63813
Buggy source:
@Override protected void closeComplex() throws IOException {
  writer.write(Helper.cr());
  for (int x=0; x < numberOfTabs; x++) {
    writeValue(tab(),false);
  }
  writer.write('}');
}

Fixed version (ground truth):
@Override protected void closeComplex() throws IOException {
  writer.write(FormattedWriterRecord.CR);
  for (int x=0; x < numberOfTabs; x++) {
    writeValue(tab(),false);
  }
  writer.write('}');
}
Program: 63814
Project: 63814
Buggy source:
@Override protected void writeKey(XPathFragment xPathFragment) throws IOException {
  writer.write(Helper.cr());
  for (int x=0; x < numberOfTabs; x++) {
    writeValue(tab(),false);
  }
  super.writeKey(xPathFragment);
}

Fixed version (ground truth):
@Override protected void writeKey(XPathFragment xPathFragment) throws IOException {
  writer.write(FormattedWriterRecord.CR);
  for (int x=0; x < numberOfTabs; x++) {
    writeValue(tab(),false);
  }
  super.writeKey(xPathFragment);
}
Program: 63816
Project: 63816
Buggy source:
public void comment(char[] ch,int start,int length) throws SAXException {
  try {
    if (isStartElementOpen) {
      writer.write('>');
      writer.write(Helper.cr());
      isStartElementOpen=false;
    }
    writeComment(ch,start,length);
    complexType=false;
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
public void comment(char[] ch,int start,int length) throws SAXException {
  try {
    if (isStartElementOpen) {
      writer.write('>');
      writer.write(FormattedWriterRecord.CR);
      isStartElementOpen=false;
    }
    writeComment(ch,start,length);
    complexType=false;
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63817
Project: 63817
Buggy source:
/** 
 * INTERNAL:
 */
public void element(XPathFragment frag){
  try {
    isLastEventText=false;
    if (isStartElementOpen) {
      writer.write('>');
      isStartElementOpen=false;
    }
    writer.write(Helper.cr());
    for (int x=0; x < numberOfTabs; x++) {
      writeValue(tab(),false);
    }
    super.element(frag);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void element(XPathFragment frag){
  try {
    isLastEventText=false;
    if (isStartElementOpen) {
      writer.write('>');
      isStartElementOpen=false;
    }
    writer.write(FormattedWriterRecord.CR);
    for (int x=0; x < numberOfTabs; x++) {
      writeValue(tab(),false);
    }
    super.element(frag);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63818
Project: 63818
Buggy source:
public static void main(String[] args) throws WSDLException {
  DBWSBuilder builder=new DBWSBuilder();
  builder.start(args);
}

Fixed version (ground truth):
/** 
 * This method creates a new DBWSBuilder instance, and calls the start method with the given arguments.
 */
public static void main(String[] args) throws WSDLException {
  DBWSBuilder builder=new DBWSBuilder();
  builder.start(args);
}
Program: 63825
Project: 63825
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(IsReadableTestCases.class);
  suite.addTestSuite(IsWriteableTestCases.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(IsReadableTestCases.class);
  suite.addTestSuite(IsWriteableTestCases.class);
  suite.addTestSuite(SimpleListTestCases.class);
  return suite;
}
Program: 63828
Project: 63828
Buggy source:
/** 
 * Gets the.
 * @param key the key
 * @return the object
 */
public static Object get(String key){
  Object value=storage.get().get(key);
  if (REQUEST_UNIQUE_ID.equals(key)) {
    if (value == null) {
      return "String_Node_Str";
    }
  }
  return value;
}

Fixed version (ground truth):
/** 
 * Gets the.
 * @param key the key
 * @return the object
 */
public static Object get(String key){
  Object value=storage.get().get(key);
  if (REQUEST_ID.equals(key)) {
    if (value == null) {
      return "String_Node_Str";
    }
  }
  return value;
}
Program: 63830
Project: 63830
Buggy source:
/** 
 * Instantiates a new persistence context.
 * @param emfName the emf name
 * @param emf the emf
 * @param defaultURI the default uri
 */
public PersistenceContext(String emfName,EntityManagerFactoryImpl emf,URI defaultURI){
  super();
  this.emf=emf;
  this.name=emfName;
  if (getServerSession().hasExternalTransactionController()) {
    transaction=new JTATransactionWrapper();
  }
 else {
    transaction=new ResourceLocalTransactionWrapper();
  }
  try {
    this.jaxbContext=createDynamicJAXBContext(emf.getDatabaseSession());
  }
 catch (  JAXBException jaxbe) {
    JPARSLogger.exception("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),emfName,jaxbe.toString()},jaxbe);
    emf.close();
  }
catch (  IOException e) {
    JPARSLogger.exception("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),emfName,e.toString()},e);
    emf.close();
  }
  setBaseURI(defaultURI);
}

Fixed version (ground truth):
/** 
 * Instantiates a new persistence context.
 * @param emfName the emf name
 * @param emf the emf
 * @param defaultURI the default uri
 */
public PersistenceContext(String emfName,EntityManagerFactoryImpl emf,URI defaultURI){
  super();
  this.emf=emf;
  this.name=emfName;
  if (getServerSession().hasExternalTransactionController()) {
    transaction=new JTATransactionWrapper();
  }
 else {
    transaction=new ResourceLocalTransactionWrapper();
  }
  try {
    this.jaxbContext=createDynamicJAXBContext(emf.getDatabaseSession());
  }
 catch (  JAXBException jaxbe) {
    JPARSLogger.exception("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_ID),emfName,jaxbe.toString()},jaxbe);
    emf.close();
  }
catch (  IOException e) {
    JPARSLogger.exception("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_ID),emfName,e.toString()},e);
    emf.close();
  }
  setBaseURI(defaultURI);
}
Program: 63832
Project: 63832
Buggy source:
/** 
 * A convenience method to create a new dynamic entity of the given type
 * @param tenantId
 * @param type
 * @return
 */
public DynamicEntity newEntity(Map<String,String> tenantId,String type){
  JPADynamicHelper helper=new JPADynamicHelper(getEmf());
  DynamicEntity entity=null;
  try {
    entity=helper.newDynamicEntity(type);
  }
 catch (  IllegalArgumentException e) {
    ClassDescriptor descriptor=getDescriptor(type);
    if (descriptor != null) {
      DynamicType jaxbType=(DynamicType)descriptor.getProperty(DynamicType.DESCRIPTOR_PROPERTY);
      if (jaxbType != null) {
        return jaxbType.newDynamicEntity();
      }
    }
    JPARSLogger.fine("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),type,e.toString()});
    throw e;
  }
  return entity;
}

Fixed version (ground truth):
/** 
 * A convenience method to create a new dynamic entity of the given type
 * @param tenantId
 * @param type
 * @return
 */
public DynamicEntity newEntity(Map<String,String> tenantId,String type){
  JPADynamicHelper helper=new JPADynamicHelper(getEmf());
  DynamicEntity entity=null;
  try {
    entity=helper.newDynamicEntity(type);
  }
 catch (  IllegalArgumentException e) {
    ClassDescriptor descriptor=getDescriptor(type);
    if (descriptor != null) {
      DynamicType jaxbType=(DynamicType)descriptor.getProperty(DynamicType.DESCRIPTOR_PROPERTY);
      if (jaxbType != null) {
        return jaxbType.newDynamicEntity();
      }
    }
    JPARSLogger.fine("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_ID),type,e.toString()});
    throw e;
  }
  return entity;
}
Program: 63833
Project: 63833
Buggy source:
/** 
 * Make adjustments to an unmarshalled entity based on what is found in the weaved fields
 * @param entity
 * @return
 */
protected Object wrap(Object entity){
  if ((entity != null) && (PersistenceWeavedRest.class.isAssignableFrom(entity.getClass()))) {
    if (!doesExist(null,entity)) {
      return entity;
    }
    ClassDescriptor descriptor=getJAXBDescriptorForClass(entity.getClass());
    if (entity instanceof FetchGroupTracker) {
      FetchGroup fetchGroup=new FetchGroup();
      for (      DatabaseMapping mapping : descriptor.getMappings()) {
        if (!(mapping instanceof XMLInverseReferenceMapping)) {
          fetchGroup.addAttribute(mapping.getAttributeName());
        }
      }
      (new FetchGroupManager()).setObjectFetchGroup(entity,fetchGroup,null);
      ((FetchGroupTracker)entity)._persistence_setSession(JpaHelper.getDatabaseSession(getEmf()));
    }
 else     if (descriptor.hasRelationships()) {
      for (      DatabaseMapping mapping : descriptor.getMappings()) {
        if (mapping instanceof XMLInverseReferenceMapping) {
          JPARSLogger.fine("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_UNIQUE_ID)});
          throw JPARSException.invalidConfiguration(Status.INTERNAL_SERVER_ERROR.getStatusCode());
        }
      }
    }
  }
  return entity;
}

Fixed version (ground truth):
/** 
 * Make adjustments to an unmarshalled entity based on what is found in the weaved fields
 * @param entity
 * @return
 */
protected Object wrap(Object entity){
  if ((entity != null) && (PersistenceWeavedRest.class.isAssignableFrom(entity.getClass()))) {
    if (!doesExist(null,entity)) {
      return entity;
    }
    ClassDescriptor descriptor=getJAXBDescriptorForClass(entity.getClass());
    if (entity instanceof FetchGroupTracker) {
      FetchGroup fetchGroup=new FetchGroup();
      for (      DatabaseMapping mapping : descriptor.getMappings()) {
        if (!(mapping instanceof XMLInverseReferenceMapping)) {
          fetchGroup.addAttribute(mapping.getAttributeName());
        }
      }
      (new FetchGroupManager()).setObjectFetchGroup(entity,fetchGroup,null);
      ((FetchGroupTracker)entity)._persistence_setSession(JpaHelper.getDatabaseSession(getEmf()));
    }
 else     if (descriptor.hasRelationships()) {
      for (      DatabaseMapping mapping : descriptor.getMappings()) {
        if (mapping instanceof XMLInverseReferenceMapping) {
          JPARSLogger.fine("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_ID)});
          throw JPARSException.invalidConfiguration(Status.INTERNAL_SERVER_ERROR.getStatusCode());
        }
      }
    }
  }
  return entity;
}
Program: 63835
Project: 63835
Buggy source:
protected Response buildResponse(JPARSException exception){
  String path=null;
  exception.setHttpStatusCode(getHttpStatusCode(exception.getCause()));
  if (uriInfo != null) {
    URI requestURI=uriInfo.getRequestUri();
    if (requestURI != null) {
      path=requestURI.getPath();
    }
  }
  if ((path != null) && (path.contains(AbstractResource.SERVICE_VERSION_2_0))) {
    ErrorResponse errorResponse=new ErrorResponse(PROBLEM_TYPE,exception.getMessage(),String.valueOf(exception.getErrorCode()));
    errorResponse.setRequestUniqueId((String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID));
    errorResponse.setHttpStatus(exception.getHttpStatusCode());
    return Response.status(exception.getHttpStatusCode()).entity(errorResponse).type(StreamingOutputMarshaller.getResponseMediaType(headers)).build();
  }
  return Response.status(exception.getHttpStatusCode()).type(StreamingOutputMarshaller.getResponseMediaType(headers)).build();
}

Fixed version (ground truth):
protected Response buildResponse(JPARSException exception){
  String path=null;
  exception.setHttpStatusCode(getHttpStatusCode(exception.getCause()));
  if (uriInfo != null) {
    URI requestURI=uriInfo.getRequestUri();
    if (requestURI != null) {
      path=requestURI.getPath();
    }
  }
  if ((path != null) && (path.contains(AbstractResource.SERVICE_VERSION_2_0))) {
    ErrorResponse errorResponse=new ErrorResponse(PROBLEM_TYPE,exception.getMessage(),String.valueOf(exception.getErrorCode()));
    errorResponse.setRequestId((String)DataStorage.get(DataStorage.REQUEST_ID));
    errorResponse.setHttpStatus(exception.getHttpStatusCode());
    return Response.status(exception.getHttpStatusCode()).entity(errorResponse).type(StreamingOutputMarshaller.getResponseMediaType(headers)).build();
  }
  return Response.status(exception.getHttpStatusCode()).type(StreamingOutputMarshaller.getResponseMediaType(headers)).build();
}
Program: 63836
Project: 63836
Buggy source:
public Response toResponse(JPARSException exception){
  if (exception.getCause() != null) {
    JPARSLogger.exception("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_UNIQUE_ID)},(Exception)exception.getCause());
  }
 else {
    JPARSLogger.exception("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_UNIQUE_ID)},exception);
  }
  return buildResponse(exception);
}

Fixed version (ground truth):
public Response toResponse(JPARSException exception){
  if (exception.getCause() != null) {
    JPARSLogger.exception("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_ID)},(Exception)exception.getCause());
  }
 else {
    JPARSLogger.exception("String_Node_Str",new Object[]{DataStorage.get(DataStorage.REQUEST_ID)},exception);
  }
  return buildResponse(exception);
}
Program: 63839
Project: 63839
Buggy source:
/** 
 * A part of the facade over the JPA API Call jpa merge on the given object and commit If the passed object is a list, we will iterate through the list and merge each member
 * @param tenantId
 * @param entity
 * @return
 */
@SuppressWarnings("String_Node_Str") public Object merge(Map<String,String> tenantId,Object entity){
  EntityManager em=getEmf().createEntityManager(tenantId);
  Object mergedEntity=null;
  try {
    transaction.beginTransaction(em);
    if (entity instanceof List) {
      List<Object> mergeList=new ArrayList<Object>();
      for (      Object o : (List)entity) {
        mergeList.add(em.merge(o));
      }
      mergedEntity=mergeList;
    }
 else {
      mergedEntity=em.merge(entity);
    }
    transaction.commitTransaction(em);
    return mergedEntity;
  }
  finally {
    em.close();
  }
}

Fixed version (ground truth):
/** 
 * A part of the facade over the JPA API Call jpa merge on the given object and commit If the passed object is a list, we will iterate through the list and merge each member
 * @param tenantId
 * @param entity
 * @return
 */
@SuppressWarnings("String_Node_Str") public Object merge(Map<String,String> tenantId,Object entity){
  EntityManager em=getEmf().createEntityManager(tenantId);
  Object mergedEntity=null;
  try {
    transaction.beginTransaction(em);
    if (entity instanceof List) {
      List<Object> mergeList=new ArrayList<Object>();
      for (      Object o : (List)entity) {
        mergeList.add(em.merge(o));
      }
      mergedEntity=mergeList;
    }
 else {
      mergedEntity=em.merge(entity);
    }
    transaction.commitTransaction(em);
    return mergedEntity;
  }
 catch (  RollbackException ex) {
    throw JPARSException.exceptionOccurred((String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),AbstractResource.getHttpStatusCode(ex),ex);
  }
catch (  Exception ex) {
    transaction.rollbackTransaction(em);
    throw JPARSException.exceptionOccurred((String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),AbstractResource.getHttpStatusCode(ex),ex);
  }
 finally {
    em.close();
  }
}
Program: 63840
Project: 63840
Buggy source:
/** 
 * A part of the facade over the JPA API Persist an entity in JPA and commit
 * @param tenantId
 * @param entity
 */
public void create(Map<String,String> tenantId,Object entity){
  EntityManager em=getEmf().createEntityManager(tenantId);
  try {
    transaction.beginTransaction(em);
    em.persist(entity);
    transaction.commitTransaction(em);
  }
  finally {
    em.close();
  }
}

Fixed version (ground truth):
/** 
 * A part of the facade over the JPA API Persist an entity in JPA and commit
 * @param tenantId
 * @param entity
 * @throws Exception 
 */
public void create(Map<String,String> tenantId,Object entity) throws Exception {
  EntityManager em=getEmf().createEntityManager(tenantId);
  try {
    transaction.beginTransaction(em);
    em.persist(entity);
    transaction.commitTransaction(em);
  }
 catch (  RollbackException ex) {
    throw ex;
  }
catch (  Exception ex) {
    transaction.rollbackTransaction(em);
    throw ex;
  }
 finally {
    em.close();
  }
}
Program: 63842
Project: 63842
Buggy source:
/** 
 * Instantiates a new persistence context.
 * @param emfName the emf name
 * @param emf the emf
 * @param defaultURI the default uri
 */
public PersistenceContext(String emfName,EntityManagerFactoryImpl emf,URI defaultURI){
  super();
  this.emf=emf;
  this.name=emfName;
  if (getServerSession().hasExternalTransactionController()) {
    transaction=new JTATransactionWrapper();
  }
 else {
    transaction=new ResourceLocalTransactionWrapper();
  }
  try {
    this.jaxbContext=createDynamicJAXBContext(emf.getDatabaseSession());
  }
 catch (  JAXBException jaxbe) {
    JPARSLogger.exception("String_Node_Str",new Object[]{emfName,jaxbe.toString()},jaxbe);
    emf.close();
  }
catch (  IOException e) {
    JPARSLogger.exception("String_Node_Str",new Object[]{emfName,e.toString()},e);
    emf.close();
  }
  setBaseURI(defaultURI);
}

Fixed version (ground truth):
/** 
 * Instantiates a new persistence context.
 * @param emfName the emf name
 * @param emf the emf
 * @param defaultURI the default uri
 */
public PersistenceContext(String emfName,EntityManagerFactoryImpl emf,URI defaultURI){
  super();
  this.emf=emf;
  this.name=emfName;
  if (getServerSession().hasExternalTransactionController()) {
    transaction=new JTATransactionWrapper();
  }
 else {
    transaction=new ResourceLocalTransactionWrapper();
  }
  try {
    this.jaxbContext=createDynamicJAXBContext(emf.getDatabaseSession());
  }
 catch (  JAXBException jaxbe) {
    JPARSLogger.exception("String_Node_Str",new Object[]{(String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),emfName,jaxbe.toString()},jaxbe);
    emf.close();
  }
catch (  IOException e) {
    JPARSLogger.exception("String_Node_Str",new Object[]{(String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),emfName,e.toString()},e);
    emf.close();
  }
  setBaseURI(defaultURI);
}
Program: 63843
Project: 63843
Buggy source:
/** 
 * A part of the facade over the JPA API Delete the given entity in JPA and commit the changes
 */
public void delete(Map<String,String> tenantId,String type,Object id){
  EntityManager em=getEmf().createEntityManager(tenantId);
  try {
    transaction.beginTransaction(em);
    Object entity=em.find(getClass(type),id);
    if (entity != null) {
      em.remove(entity);
    }
    transaction.commitTransaction(em);
  }
  finally {
    em.close();
  }
}

Fixed version (ground truth):
/** 
 * A part of the facade over the JPA API Delete the given entity in JPA and commit the changes
 */
public void delete(Map<String,String> tenantId,String type,Object id){
  EntityManager em=getEmf().createEntityManager(tenantId);
  try {
    transaction.beginTransaction(em);
    Object entity=em.find(getClass(type),id);
    if (entity != null) {
      em.remove(entity);
    }
    transaction.commitTransaction(em);
  }
 catch (  RollbackException ex) {
    throw JPARSException.exceptionOccurred((String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),AbstractResource.getHttpStatusCode(ex),ex);
  }
catch (  Exception ex) {
    transaction.rollbackTransaction(em);
    throw JPARSException.exceptionOccurred((String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),AbstractResource.getHttpStatusCode(ex),ex);
  }
 finally {
    em.close();
  }
}
Program: 63846
Project: 63846
Buggy source:
/** 
 * A convenience method to create a new dynamic entity of the given type
 * @param tenantId
 * @param type
 * @return
 */
public DynamicEntity newEntity(Map<String,String> tenantId,String type){
  JPADynamicHelper helper=new JPADynamicHelper(getEmf());
  DynamicEntity entity=null;
  try {
    entity=helper.newDynamicEntity(type);
  }
 catch (  IllegalArgumentException e) {
    ClassDescriptor descriptor=getDescriptor(type);
    if (descriptor != null) {
      DynamicType jaxbType=(DynamicType)descriptor.getProperty(DynamicType.DESCRIPTOR_PROPERTY);
      if (jaxbType != null) {
        return jaxbType.newDynamicEntity();
      }
    }
    JPARSLogger.fine("String_Node_Str",new Object[]{type,e.toString()});
    throw e;
  }
  return entity;
}

Fixed version (ground truth):
/** 
 * A convenience method to create a new dynamic entity of the given type
 * @param tenantId
 * @param type
 * @return
 */
public DynamicEntity newEntity(Map<String,String> tenantId,String type){
  JPADynamicHelper helper=new JPADynamicHelper(getEmf());
  DynamicEntity entity=null;
  try {
    entity=helper.newDynamicEntity(type);
  }
 catch (  IllegalArgumentException e) {
    ClassDescriptor descriptor=getDescriptor(type);
    if (descriptor != null) {
      DynamicType jaxbType=(DynamicType)descriptor.getProperty(DynamicType.DESCRIPTOR_PROPERTY);
      if (jaxbType != null) {
        return jaxbType.newDynamicEntity();
      }
    }
    JPARSLogger.fine("String_Node_Str",new Object[]{(String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),type,e.toString()});
    throw e;
  }
  return entity;
}
Program: 63847
Project: 63847
Buggy source:
/** 
 * Query execute update.
 * @param tenantId the tenant id
 * @param name the name
 * @param parameters the parameters
 * @param hints the hints
 * @return the int
 */
public int queryExecuteUpdate(Map<String,String> tenantId,String name,Map<?,?> parameters,Map<String,?> hints){
  EntityManager em=getEmf().createEntityManager(tenantId);
  try {
    Query query=constructQuery(em,name,parameters,hints);
    transaction.beginTransaction(em);
    int result=query.executeUpdate();
    transaction.commitTransaction(em);
    return result;
  }
  finally {
    em.close();
  }
}

Fixed version (ground truth):
/** 
 * Query execute update.
 * @param tenantId the tenant id
 * @param name the name
 * @param parameters the parameters
 * @param hints the hints
 * @return the int
 */
public int queryExecuteUpdate(Map<String,String> tenantId,String name,Map<?,?> parameters,Map<String,?> hints){
  EntityManager em=getEmf().createEntityManager(tenantId);
  try {
    Query query=constructQuery(em,name,parameters,hints);
    transaction.beginTransaction(em);
    int result=query.executeUpdate();
    transaction.commitTransaction(em);
    return result;
  }
 catch (  RollbackException ex) {
    throw JPARSException.exceptionOccurred((String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),AbstractResource.getHttpStatusCode(ex),ex);
  }
catch (  Exception ex) {
    transaction.rollbackTransaction(em);
    throw JPARSException.exceptionOccurred((String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),AbstractResource.getHttpStatusCode(ex),ex);
  }
 finally {
    em.close();
  }
}
Program: 63848
Project: 63848
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) protected List<XmlAdapter> getAdapters() throws JPARSException {
  if (adapters != null) {
    return adapters;
  }
  adapters=new ArrayList<XmlAdapter>();
  try {
    for (    ClassDescriptor desc : this.getServerSession().getDescriptors().values()) {
      if (!desc.isAggregateCollectionDescriptor() && !desc.isAggregateDescriptor()) {
        Class clz=desc.getJavaClass();
        String referenceAdapterName=RestAdapterClassWriter.constructClassNameForReferenceAdapter(clz.getName());
        ClassLoader cl=getServerSession().getDatasourcePlatform().getConversionManager().getLoader();
        Class referenceAdaptorClass=Class.forName(referenceAdapterName,true,cl);
        Class[] argTypes={String.class,PersistenceContext.class};
        Constructor referenceAdaptorConstructor=referenceAdaptorClass.getDeclaredConstructor(argTypes);
        Object[] args=new Object[]{getBaseURI().toString(),this};
        adapters.add((XmlAdapter)referenceAdaptorConstructor.newInstance(args));
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    throw new JPARSException(ex.getMessage());
  }
  return adapters;
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) protected List<XmlAdapter> getAdapters() throws JPARSException {
  if (adapters != null) {
    return adapters;
  }
  adapters=new ArrayList<XmlAdapter>();
  try {
    for (    ClassDescriptor desc : this.getServerSession().getDescriptors().values()) {
      if (!desc.isAggregateCollectionDescriptor() && !desc.isAggregateDescriptor()) {
        Class clz=desc.getJavaClass();
        String referenceAdapterName=RestAdapterClassWriter.constructClassNameForReferenceAdapter(clz.getName());
        ClassLoader cl=getServerSession().getDatasourcePlatform().getConversionManager().getLoader();
        Class referenceAdaptorClass=Class.forName(referenceAdapterName,true,cl);
        Class[] argTypes={String.class,PersistenceContext.class};
        Constructor referenceAdaptorConstructor=referenceAdaptorClass.getDeclaredConstructor(argTypes);
        Object[] args=new Object[]{getBaseURI().toString(),this};
        adapters.add((XmlAdapter)referenceAdaptorConstructor.newInstance(args));
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    throw JPARSException.exceptionOccurred((String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),AbstractResource.getHttpStatusCode(ex),ex);
  }
  return adapters;
}
Program: 63849
Project: 63849
Buggy source:
/** 
 * Make adjustments to an unmarshalled entity based on what is found in the weaved fields
 * @param entity
 * @return
 */
protected Object wrap(Object entity){
  if ((entity != null) && (PersistenceWeavedRest.class.isAssignableFrom(entity.getClass()))) {
    if (!doesExist(null,entity)) {
      return entity;
    }
    ClassDescriptor descriptor=getJAXBDescriptorForClass(entity.getClass());
    if (entity instanceof FetchGroupTracker) {
      FetchGroup fetchGroup=new FetchGroup();
      for (      DatabaseMapping mapping : descriptor.getMappings()) {
        if (!(mapping instanceof XMLInverseReferenceMapping)) {
          fetchGroup.addAttribute(mapping.getAttributeName());
        }
      }
      (new FetchGroupManager()).setObjectFetchGroup(entity,fetchGroup,null);
      ((FetchGroupTracker)entity)._persistence_setSession(JpaHelper.getDatabaseSession(getEmf()));
    }
 else     if (descriptor.hasRelationships()) {
      for (      DatabaseMapping mapping : descriptor.getMappings()) {
        if (mapping instanceof XMLInverseReferenceMapping) {
          throw new JPARSConfigurationException(LoggingLocalization.buildMessage("String_Node_Str",new Object[]{}));
        }
      }
    }
  }
  return entity;
}

Fixed version (ground truth):
/** 
 * Make adjustments to an unmarshalled entity based on what is found in the weaved fields
 * @param entity
 * @return
 */
protected Object wrap(Object entity){
  if ((entity != null) && (PersistenceWeavedRest.class.isAssignableFrom(entity.getClass()))) {
    if (!doesExist(null,entity)) {
      return entity;
    }
    ClassDescriptor descriptor=getJAXBDescriptorForClass(entity.getClass());
    if (entity instanceof FetchGroupTracker) {
      FetchGroup fetchGroup=new FetchGroup();
      for (      DatabaseMapping mapping : descriptor.getMappings()) {
        if (!(mapping instanceof XMLInverseReferenceMapping)) {
          fetchGroup.addAttribute(mapping.getAttributeName());
        }
      }
      (new FetchGroupManager()).setObjectFetchGroup(entity,fetchGroup,null);
      ((FetchGroupTracker)entity)._persistence_setSession(JpaHelper.getDatabaseSession(getEmf()));
    }
 else     if (descriptor.hasRelationships()) {
      for (      DatabaseMapping mapping : descriptor.getMappings()) {
        if (mapping instanceof XMLInverseReferenceMapping) {
          JPARSLogger.fine("String_Node_Str",new Object[]{(String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID)});
          throw JPARSException.invalidConfiguration((String)DataStorage.get(DataStorage.REQUEST_UNIQUE_ID),Status.INTERNAL_SERVER_ERROR.getStatusCode());
        }
      }
    }
  }
  return entity;
}
Program: 63851
Project: 63851
Buggy source:
public XMLMarshalListener getMarshalListener(){
  return this.marshalListener;
}

Fixed version (ground truth):
public MARSHALLER_LISTENER getMarshalListener(){
  return this.marshalListener;
}
Program: 63852
Project: 63852
Buggy source:
/** 
 * Copy constructor
 */
protected Marshaller(Marshaller marshaller){
  this.charEscapeHandler=marshaller.getCharacterEscapeHandler();
  this.context=(CONTEXT)marshaller.getContext();
  this.encoding=marshaller.getEncoding();
  this.equalUsingIdenity=marshaller.isEqualUsingIdenity();
  this.errorHandler=marshaller.getErrorHandler();
  this.formattedOutput=marshaller.isFormattedOutput();
  this.indentString=marshaller.getIndentString();
  this.mapper=(NAMESPACE_PREFIX_MAPPER)marshaller.getNamespacePrefixMapper();
  this.marshalListener=marshaller.getMarshalListener();
  if (marshaller.marshalProperties != null) {
    marshalProperties=new Properties();
    for (    Entry entry : marshalProperties.entrySet()) {
      marshalProperties.put(entry.getKey(),entry.getValue());
    }
  }
}

Fixed version (ground truth):
/** 
 * Copy constructor
 */
protected Marshaller(Marshaller marshaller){
  this.charEscapeHandler=marshaller.getCharacterEscapeHandler();
  this.context=(CONTEXT)marshaller.getContext();
  this.encoding=marshaller.getEncoding();
  this.equalUsingIdenity=marshaller.isEqualUsingIdenity();
  this.errorHandler=marshaller.getErrorHandler();
  this.formattedOutput=marshaller.isFormattedOutput();
  this.indentString=marshaller.getIndentString();
  this.mapper=(NAMESPACE_PREFIX_MAPPER)marshaller.getNamespacePrefixMapper();
  this.marshalListener=(MARSHALLER_LISTENER)marshaller.getMarshalListener();
  if (marshaller.marshalProperties != null) {
    marshalProperties=new Properties();
    for (    Entry entry : marshalProperties.entrySet()) {
      marshalProperties.put(entry.getKey(),entry.getValue());
    }
  }
}
Program: 63853
Project: 63853
Buggy source:
public void setMarshalListener(XMLMarshalListener listener){
  this.marshalListener=listener;
}

Fixed version (ground truth):
public void setMarshalListener(MARSHALLER_LISTENER listener){
  this.marshalListener=listener;
}
Program: 63854
Project: 63854
Buggy source:
public abstract XMLUnmarshalListener getUnmarshalListener();

Fixed version (ground truth):
public UNMARSHALLER_LISTENER getUnmarshalListener(){
  return unmarshalListener;
}
Program: 63855
Project: 63855
Buggy source:
public Unmarshaller(CONTEXT context){
  this.context=context;
}

Fixed version (ground truth):
/** 
 * Copy constructor
 */
protected Unmarshaller(Unmarshaller unmarshaller){
  this.context=(CONTEXT)unmarshaller.getContext();
  this.unmarshalListener=(UNMARSHALLER_LISTENER)unmarshaller.getUnmarshalListener();
}
Program: 63856
Project: 63856
Buggy source:
protected XMLUnmarshaller(XMLUnmarshaller xmlUnmarshaller){
  this((CONTEXT)xmlUnmarshaller.getContext());
  setAttachmentUnmarshaller(xmlUnmarshaller.getAttachmentUnmarshaller());
  setEntityResolver(xmlUnmarshaller.getEntityResolver());
  setErrorHandler(xmlUnmarshaller.getErrorHandler());
  for (  Entry entry : xmlUnmarshaller.getProperties().entrySet()) {
    getProperties().put(entry.getKey(),entry.getValue());
  }
  setResultAlwaysXMLRoot(xmlUnmarshaller.platformUnmarshaller.isResultAlwaysXMLRoot());
  try {
    Schema schema=xmlUnmarshaller.getSchema();
    if (null != schema) {
      setSchema(schema);
    }
  }
 catch (  UnsupportedOperationException e) {
  }
  setUnmappedContentHandlerClass(xmlUnmarshaller.unmappedContentHandlerClass);
  setUnmarshalListener(xmlUnmarshaller.unmarshalListener);
}

Fixed version (ground truth):
protected XMLUnmarshaller(XMLUnmarshaller xmlUnmarshaller){
  super(xmlUnmarshaller);
  stringBuffer=new StrBuffer();
  initialize(null);
  setAttachmentUnmarshaller(xmlUnmarshaller.getAttachmentUnmarshaller());
  setEntityResolver(xmlUnmarshaller.getEntityResolver());
  setErrorHandler(xmlUnmarshaller.getErrorHandler());
  for (  Entry entry : xmlUnmarshaller.getProperties().entrySet()) {
    getProperties().put(entry.getKey(),entry.getValue());
  }
  setResultAlwaysXMLRoot(xmlUnmarshaller.platformUnmarshaller.isResultAlwaysXMLRoot());
  try {
    Schema schema=xmlUnmarshaller.getSchema();
    if (null != schema) {
      setSchema(schema);
    }
  }
 catch (  UnsupportedOperationException e) {
  }
  setUnmappedContentHandlerClass(xmlUnmarshaller.unmappedContentHandlerClass);
}