nus-yam/ex-repair huggingface dataset:
Program: 190635
Project: 190635
Buggy source:
/** 
 * Creates a   {@link Transducer} given a reference.Used to implement  {@link RuntimeNonElementRef#getTransducer()}. Shouldn't be called from anywhere else. TODO: this is not the proper place for this class to be in.
 */
public static Transducer createTransducer(RuntimeNonElementRef ref){
  Transducer t=ref.getTarget().getTransducer();
  RuntimePropertyInfo src=ref.getSource();
  ID id=src.id();
  if (id == ID.IDREF)   return RuntimeBuiltinLeafInfoImpl.STRING;
  if (id == ID.ID)   t=new IDTransducerImpl(t);
  MimeType emt=src.getExpectedMimeType();
  if (emt != null)   t=new MimeTypedTransducer(t,emt);
  if (src.inlineBinaryData())   t=new InlineBinaryTransducer(t);
  if (src.getSchemaType() != null)   t=new SchemaTypeTransducer(t,src.getSchemaType());
  return t;
}

Fixed version (ground truth):
/** 
 * Creates a   {@link Transducer} given a reference.Used to implement  {@link RuntimeNonElementRef#getTransducer()}. Shouldn't be called from anywhere else. TODO: this is not the proper place for this class to be in.
 */
public static Transducer createTransducer(RuntimeNonElementRef ref){
  Transducer t=ref.getTarget().getTransducer();
  RuntimePropertyInfo src=ref.getSource();
  ID id=src.id();
  if (id == ID.IDREF)   return RuntimeBuiltinLeafInfoImpl.STRING;
  if (id == ID.ID)   t=new IDTransducerImpl(t);
  MimeType emt=src.getExpectedMimeType();
  if (emt != null)   t=new MimeTypedTransducer(t,emt);
  if (src.inlineBinaryData())   t=new InlineBinaryTransducer(t);
  if (src.getSchemaType() != null) {
    if (src.getSchemaType().equals(createXSSimpleType())) {
      return RuntimeBuiltinLeafInfoImpl.STRING;
    }
    t=new SchemaTypeTransducer(t,src.getSchemaType());
  }
  return t;
}
Program: 190636
Project: 190636
Buggy source:
public void fromRawValue(JBlock block,String uniqueName,JExpression $var){
  if (getOptions().target.isLaterThan(SpecVersion.V2_2)) {
    block.invoke($target,$setAll).arg($var);
  }
 else {
    block.invoke($target,$setAll).arg($var.invoke("String_Node_Str").arg(JExpr.newArray(exposedType,$var.invoke("String_Node_Str"))));
  }
}

Fixed version (ground truth):
public void fromRawValue(JBlock block,String uniqueName,JExpression $var){
  block.invoke($target,$setAll).arg($var.invoke("String_Node_Str").arg(JExpr.newArray(exposedType,$var.invoke("String_Node_Str"))));
}
Program: 190637
Project: 190637
Buggy source:
ArrayField(ClassOutlineImpl context,CPropertyInfo prop){
  super(context,prop,false);
  if (getOptions().target.isLaterThan(SpecVersion.V2_2)) {
    generateArray();
  }
 else {
    generate();
  }
}

Fixed version (ground truth):
ArrayField(ClassOutlineImpl context,CPropertyInfo prop){
  super(context,prop,false);
  generate();
}
Program: 190639
Project: 190639
Buggy source:
public void toRawValue(JBlock block,JVar $var){
  if (getOptions().target.isLaterThan(SpecVersion.V2_2)) {
    block.assign($var,$target.invoke($getAll));
  }
 else {
    block.assign($var,codeModel.ref(Arrays.class).staticInvoke("String_Node_Str").arg($target.invoke($getAll)));
  }
}

Fixed version (ground truth):
public void toRawValue(JBlock block,JVar $var){
  block.assign($var,codeModel.ref(Arrays.class).staticInvoke("String_Node_Str").arg($target.invoke($getAll)));
}
Program: 190640
Project: 190640
Buggy source:
private boolean isRequired(XmlElementRef ref){
  if (!is2_2)   return false;
  try {
    return ref.required();
  }
 catch (  LinkageError e) {
    is2_2=false;
    throw new Error();
  }
}

Fixed version (ground truth):
/** 
 * Reads the value of   {@code XmlElementRef.required()}. If we are working as 2.1 RI, this defaults to true.
 */
private boolean isRequired(XmlElementRef ref){
  if (!is2_2)   return true;
  try {
    return ref.required();
  }
 catch (  LinkageError e) {
    is2_2=false;
    return true;
  }
}
Program: 190641
Project: 190641
Buggy source:
public void beginStartTag(int prefix,String localName) throws IOException {
  fiout.writeLowLevelTerminationAndMark();
  int type=EncodingConstants.ELEMENT;
  if (nsContext.getCurrent().count() > 0) {
    final NamespaceContextImpl.Element nse=nsContext.getCurrent();
    fiout.writeLowLevelStartNamespaces();
    for (int i=nse.count() - 1; i >= 0; i--) {
      final String uri=nse.getNsUri(i);
      if (uri.length() == 0 && nse.getBase() == 1)       continue;
      fiout.writeLowLevelNamespace(nse.getPrefix(i),uri);
    }
    fiout.writeLowLevelEndNamespaces();
    type=0;
  }
  final boolean isIndexed=fiout.writeLowLevelStartElement(type,nsContext.getPrefix(prefix),localName,nsContext.getNamespaceURI(prefix));
  if (!isIndexed)   tables.incrementMaxIndexValue();
}

Fixed version (ground truth):
@Override public void beginStartTag(int prefix,String localName) throws IOException {
  fiout.writeLowLevelTerminationAndMark();
  int type=EncodingConstants.ELEMENT;
  if (nsContext.getCurrent().count() > 0) {
    final NamespaceContextImpl.Element nse=nsContext.getCurrent();
    fiout.writeLowLevelStartNamespaces();
    for (int i=nse.count() - 1; i >= 0; i--) {
      final String uri=nse.getNsUri(i);
      if (uri.length() == 0 && nse.getBase() == 1)       continue;
      fiout.writeLowLevelNamespace(nse.getPrefix(i),uri);
    }
    fiout.writeLowLevelEndNamespaces();
    type=0;
  }
  final boolean isIndexed=fiout.writeLowLevelStartElement(type,nsContext.getPrefix(prefix),localName,nsContext.getNamespaceURI(prefix));
  if (!isIndexed)   tables.incrementMaxIndexValue();
}
Program: 190642
Project: 190642
Buggy source:
public void endStartTag() throws IOException {
  fiout.writeLowLevelEndStartElement();
}

Fixed version (ground truth):
@Override public void endStartTag() throws IOException {
  fiout.writeLowLevelEndStartElement();
}
Program: 190643
Project: 190643
Buggy source:
public void endTag(int prefix,String localName) throws IOException {
  fiout.writeLowLevelEndElement();
}

Fixed version (ground truth):
@Override public void endTag(int prefix,String localName) throws IOException {
  fiout.writeLowLevelEndElement();
}
Program: 190644
Project: 190644
Buggy source:
public void startDocument(XMLSerializer serializer,boolean fragment,int[] nsUriIndex2prefixIndex,NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException {
  super.startDocument(serializer,fragment,nsUriIndex2prefixIndex,nsContext);
  if (fragment)   fiout.initiateLowLevelWriting();
}

Fixed version (ground truth):
@Override public void startDocument(XMLSerializer serializer,boolean fragment,int[] nsUriIndex2prefixIndex,NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException {
  super.startDocument(serializer,fragment,nsUriIndex2prefixIndex,nsContext);
  if (fragment)   fiout.initiateLowLevelWriting();
}
Program: 190645
Project: 190645
Buggy source:
public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException {
  super.endDocument(fragment);
}

Fixed version (ground truth):
@Override public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException {
  super.endDocument(fragment);
}
Program: 190646
Project: 190646
Buggy source:
public void beginStartTagWithNamespaces(Name name) throws IOException {
  final NamespaceContextImpl.Element nse=nsContext.getCurrent();
  fiout.writeLowLevelStartNamespaces();
  for (int i=nse.count() - 1; i >= 0; i--) {
    final String uri=nse.getNsUri(i);
    if (uri.length() == 0 && nse.getBase() == 1)     continue;
    fiout.writeLowLevelNamespace(nse.getPrefix(i),uri);
  }
  fiout.writeLowLevelEndNamespaces();
  final int qNameIndex=tables.elementIndexes[name.qNameIndex] - tables.indexOffset;
  if (qNameIndex >= 0) {
    fiout.writeLowLevelStartElementIndexed(0,qNameIndex);
  }
 else {
    tables.elementIndexes[name.qNameIndex]=fiout.getNextElementIndex() + tables.indexOffset;
    final int prefix=nsUriIndex2prefixIndex[name.nsUriIndex];
    writeLiteral(EncodingConstants.ELEMENT_LITERAL_QNAME_FLAG,name,nsContext.getPrefix(prefix),nsContext.getNamespaceURI(prefix));
  }
}

Fixed version (ground truth):
public void beginStartTagWithNamespaces(Name name) throws IOException {
  final NamespaceContextImpl.Element nse=nsContext.getCurrent();
  fiout.writeLowLevelStartNamespaces();
  for (int i=nse.count() - 1; i >= 0; i--) {
    final String uri=nse.getNsUri(i);
    if (uri.length() == 0 && nse.getBase() == 1)     continue;
    fiout.writeLowLevelNamespace(nse.getPrefix(i),uri);
  }
  fiout.writeLowLevelEndNamespaces();
  final int prefix=nsUriIndex2prefixIndex[name.nsUriIndex];
  final int qNameIndex=getMappedElementIndex(name,prefix) - tables.indexOffset;
  String prefix1S=nsContext.getPrefix(prefix);
  String uri1S=nsContext.getNamespaceURI(prefix);
  if (qNameIndex >= 0) {
    fiout.writeLowLevelStartElementIndexed(0,qNameIndex);
  }
 else {
    setMappedElementIndex(name,prefix,fiout.getNextElementIndex() + tables.indexOffset);
    writeLiteral(EncodingConstants.ELEMENT_LITERAL_QNAME_FLAG,name,nsContext.getPrefix(prefix),nsContext.getNamespaceURI(prefix));
  }
}
Program: 190647
Project: 190647
Buggy source:
public void attribute(int prefix,String localName,String value) throws IOException {
  fiout.writeLowLevelStartAttributes();
  boolean isIndexed;
  if (prefix == -1)   isIndexed=fiout.writeLowLevelAttribute("String_Node_Str","String_Node_Str",localName);
 else   isIndexed=fiout.writeLowLevelAttribute(nsContext.getPrefix(prefix),nsContext.getNamespaceURI(prefix),localName);
  if (!isIndexed)   tables.incrementMaxIndexValue();
  fiout.writeLowLevelAttributeValue(value);
}

Fixed version (ground truth):
@Override public void attribute(int prefix,String localName,String value) throws IOException {
  fiout.writeLowLevelStartAttributes();
  boolean isIndexed;
  if (prefix == -1)   isIndexed=fiout.writeLowLevelAttribute("String_Node_Str","String_Node_Str",localName);
 else   isIndexed=fiout.writeLowLevelAttribute(nsContext.getPrefix(prefix),nsContext.getNamespaceURI(prefix),localName);
  if (!isIndexed)   tables.incrementMaxIndexValue();
  fiout.writeLowLevelAttributeValue(value);
}
Program: 190648
Project: 190648
Buggy source:
public void text(String value,boolean needsSeparatingWhitespace) throws IOException {
  if (needsSeparatingWhitespace)   fiout.writeLowLevelText("String_Node_Str");
  fiout.writeLowLevelText(value);
}

Fixed version (ground truth):
@Override public void text(String value,boolean needsSeparatingWhitespace) throws IOException {
  if (needsSeparatingWhitespace)   fiout.writeLowLevelText("String_Node_Str");
  fiout.writeLowLevelText(value);
}
Program: 190649
Project: 190649
Buggy source:
/** 
 * Create a new set of tables for a JAXB context. <p>
 * @param content the JAXB context.
 * @param initialIndexOffset the initial index offset to calculatethe maximum possible index
 */
TablesPerJAXBContext(JAXBContextImpl context,int initialIndexOffset){
  elementIndexes=new int[context.getNumberOfElementNames()];
  attributeIndexes=new int[context.getNumberOfAttributeNames()];
  localNameIndexes=new int[context.getNumberOfLocalNames()];
  indexOffset=1;
  maxIndex=initialIndexOffset + elementIndexes.length + attributeIndexes.length;
}

Fixed version (ground truth):
/** 
 * Create a new set of tables for a JAXB context. <p>
 * @param content the JAXB context.
 * @param initialIndexOffset the initial index offset to calculatethe maximum possible index
 */
TablesPerJAXBContext(JAXBContextImpl context,int initialIndexOffset){
  elementIndexes=new ElementIndexMap[context.getNumberOfElementNames()];
  attributeIndexes=new int[context.getNumberOfAttributeNames()];
  localNameIndexes=new int[context.getNumberOfLocalNames()];
  indexOffset=1;
  maxIndex=initialIndexOffset + elementIndexes.length + attributeIndexes.length;
}
Program: 190650
Project: 190650
Buggy source:
public JAXBModelImpl bind(){
  SCDBasedBindingSet scdBasedBindingSet=forest.transform(opts.isExtensionMode());
  if (!NO_CORRECTNESS_CHECK) {
    SchemaFactory sf=SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    sf.setErrorHandler(new DowngradingErrorHandler(this));
    forest.weakSchemaCorrectnessCheck(sf);
    if (hadError)     return null;
  }
  JCodeModel codeModel=new JCodeModel();
  ModelLoader gl=new ModelLoader(opts,codeModel,this);
  try {
    XSSchemaSet result=gl.createXSOM(forest,scdBasedBindingSet);
    if (result == null)     return null;
    Model model=gl.annotateXMLSchema(result);
    if (model == null)     return null;
    if (hadError)     return null;
    Outline context=model.generateCode(opts,this);
    if (context == null)     return null;
    if (hadError)     return null;
    return new JAXBModelImpl(context);
  }
 catch (  SAXException e) {
    return null;
  }
}

Fixed version (ground truth):
public JAXBModelImpl bind(){
  for (  InputSource is : opts.getBindFiles())   parseSchema(is);
  SCDBasedBindingSet scdBasedBindingSet=forest.transform(opts.isExtensionMode());
  if (!NO_CORRECTNESS_CHECK) {
    SchemaFactory sf=SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    sf.setErrorHandler(new DowngradingErrorHandler(this));
    forest.weakSchemaCorrectnessCheck(sf);
    if (hadError)     return null;
  }
  JCodeModel codeModel=new JCodeModel();
  ModelLoader gl=new ModelLoader(opts,codeModel,this);
  try {
    XSSchemaSet result=gl.createXSOM(forest,scdBasedBindingSet);
    if (result == null)     return null;
    Model model=gl.annotateXMLSchema(result);
    if (model == null)     return null;
    if (hadError)     return null;
    Outline context=model.generateCode(opts,this);
    if (context == null)     return null;
    if (hadError)     return null;
    return new JAXBModelImpl(context);
  }
 catch (  SAXException e) {
    return null;
  }
}
Program: 190653
Project: 190653
Buggy source:
/** 
 * Returns the full file name for the additional generated file.
 * @param imageFileName just the base name of the file name.
 */
protected final File getOutputFile(TagletWriter writer,PackageDoc pkg,String imageFileName){
  File rootDir=new File(writer.configuration().destDirName);
  File pkgDir=new File(rootDir,pkg.name().replace('.','/'));
  File imageFile=new File(pkgDir,imageFileName);
  return imageFile;
}

Fixed version (ground truth):
/** 
 * Returns the full file name for the additional generated file.
 * @param imageFileName just the base name of the file name.
 */
protected final File getOutputFile(TagletWriter writer,PackageDoc pkg,String imageFileName){
  File rootDir=writer.configuration().destDirName.length() == 0 ? new File("String_Node_Str") : new File(writer.configuration().destDirName);
  File pkgDir=new File(rootDir,pkg.name().replace('.','/'));
  File imageFile=new File(pkgDir,imageFileName);
  return imageFile;
}
Program: 190654
Project: 190654
Buggy source:
/** 
 * Parses a   {@link DOMForest} into a {@link XSSchemaSet}.
 */
public XSSchemaSet createXSOM(DOMForest forest,SCDBasedBindingSet scdBasedBindingSet) throws SAXException {
  XSOMParser reader=createXSOMParser(forest);
  for (  String systemId : forest.getRootDocuments()) {
    errorReceiver.pollAbort();
    Document dom=forest.get(systemId);
    if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI))     reader.parse(systemId);
  }
  XSSchemaSet result=reader.getResult();
  scdBasedBindingSet.apply(result,errorReceiver);
  return result;
}

Fixed version (ground truth):
/** 
 * Parses a   {@link DOMForest} into a {@link XSSchemaSet}.
 * @return null if the parsing failed.
 */
public XSSchemaSet createXSOM(DOMForest forest,SCDBasedBindingSet scdBasedBindingSet) throws SAXException {
  XSOMParser reader=createXSOMParser(forest);
  for (  String systemId : forest.getRootDocuments()) {
    errorReceiver.pollAbort();
    Document dom=forest.get(systemId);
    if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI))     reader.parse(systemId);
  }
  XSSchemaSet result=reader.getResult();
  if (result != null)   scdBasedBindingSet.apply(result,errorReceiver);
  return result;
}
Program: 190655
Project: 190655
Buggy source:
public void buildChildElementUnmarshallers(UnmarshallerChain chain,QNameMap<ChildLoader> handlers){
  JAXBContextImpl context=chain.context;
  for (  TypeRef<Type,Class> e : prop.getTypes()) {
    JaxBeanInfo bi=context.getOrCreate((RuntimeTypeInfo)e.getTarget());
    Loader l=bi.getLoader(context,true);
    if (e.getDefaultValue() != null)     l=new DefaultValueLoaderDecorator(l,e.getDefaultValue());
    if (nillable || chain.context.allNillable)     l=new XsiNilLoader.Single(l,acc);
    handlers.put(e.getTagName(),new ChildLoader(l,acc));
  }
}

Fixed version (ground truth):
public void buildChildElementUnmarshallers(UnmarshallerChain chain,QNameMap<ChildLoader> handlers){
  JAXBContextImpl context=chain.context;
  for (  TypeRef<Type,Class> e : prop.getTypes()) {
    JaxBeanInfo bi=context.getOrCreate((RuntimeTypeInfo)e.getTarget());
    Loader l=bi.getLoader(context,!Modifier.isFinal(bi.jaxbType.getModifiers()));
    if (e.getDefaultValue() != null)     l=new DefaultValueLoaderDecorator(l,e.getDefaultValue());
    if (nillable || chain.context.allNillable)     l=new XsiNilLoader.Single(l,acc);
    handlers.put(e.getTagName(),new ChildLoader(l,acc));
  }
}
Program: 190656
Project: 190656
Buggy source:
public XmlOutput createWriter(OutputStream os,String encoding) throws JAXBException {
  if (encoding.equals("String_Node_Str")) {
    Encoded[] table=context.getUTF8NameTable();
    if (isFormattedOutput())     return new IndentingUTF8XmlOutput(os,indent,table);
 else {
      if (c14nSupport)       return new C14nXmlOutput(os,table,context.c14nSupport);
 else       return new UTF8XmlOutput(os,table);
    }
  }
  try {
    return createWriter(new OutputStreamWriter(os,getJavaEncoding(encoding)),encoding);
  }
 catch (  UnsupportedEncodingException e) {
    throw new MarshalException(Messages.UNSUPPORTED_ENCODING.format(encoding),e);
  }
}

Fixed version (ground truth):
public XmlOutput createWriter(OutputStream os,String encoding) throws JAXBException {
  if (encoding.equals("String_Node_Str")) {
    Encoded[] table=context.getUTF8NameTable();
    final UTF8XmlOutput out;
    if (isFormattedOutput())     out=new IndentingUTF8XmlOutput(os,indent,table);
 else {
      if (c14nSupport)       out=new C14nXmlOutput(os,table,context.c14nSupport);
 else       out=new UTF8XmlOutput(os,table);
    }
    if (header != null)     out.setHeader(header);
    return out;
  }
  try {
    return createWriter(new OutputStreamWriter(os,getJavaEncoding(encoding)),encoding);
  }
 catch (  UnsupportedEncodingException e) {
    throw new MarshalException(Messages.UNSUPPORTED_ENCODING.format(encoding),e);
  }
}
Program: 190657
Project: 190657
Buggy source:
@Override public void startDocument(XMLSerializer serializer,boolean fragment,int[] nsUriIndex2prefixIndex,NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException {
  super.startDocument(serializer,fragment,nsUriIndex2prefixIndex,nsContext);
  octetBufferIndex=0;
  if (!fragment) {
    write(XML_DECL);
  }
}

Fixed version (ground truth):
@Override public void startDocument(XMLSerializer serializer,boolean fragment,int[] nsUriIndex2prefixIndex,NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException {
  super.startDocument(serializer,fragment,nsUriIndex2prefixIndex,nsContext);
  octetBufferIndex=0;
  if (!fragment) {
    write(XML_DECL);
  }
  if (header != null) {
    textBuffer.set(header);
    textBuffer.write(this);
  }
}
Program: 190658
Project: 190658
Buggy source:
/** 
 * Creates a new class loader that eventually delegates to the given   {@link ClassLoader}such that XJC can be loaded by using this classloader.
 * @param v Either "1.0" or "2.0", indicating the version of the -source value.
 */
protected static ClassLoader createProtectiveClassLoader(ClassLoader cl,String v) throws ClassNotFoundException, MalformedURLException {
  if (noHack)   return cl;
  boolean mustang=false;
  if (JAXBContext.class.getClassLoader() == null) {
    mustang=true;
    List mask=new ArrayList(Arrays.asList(maskedPackages));
    mask.add("String_Node_Str");
    cl=new MaskingClassLoader(cl,mask);
    URL apiUrl=cl.getResource("String_Node_Str");
    if (apiUrl == null)     throw new ClassNotFoundException("String_Node_Str");
    cl=new URLClassLoader(new URL[]{ParallelWorldClassLoader.toJarUrl(apiUrl)},cl);
  }
  if (v.equals("String_Node_Str")) {
    if (!mustang)     cl=new MaskingClassLoader(cl,maskedPackages);
    cl=new ParallelWorldClassLoader(cl,"String_Node_Str");
  }
 else {
    if (mustang)     cl=new ParallelWorldClassLoader(cl,"String_Node_Str");
  }
  return cl;
}

Fixed version (ground truth):
/** 
 * Creates a new class loader that eventually delegates to the given   {@link ClassLoader}such that XJC can be loaded by using this classloader.
 * @param v Either "1.0" or "2.0", indicating the version of the -source value.
 */
protected static ClassLoader createProtectiveClassLoader(ClassLoader cl,String v) throws ClassNotFoundException, MalformedURLException {
  if (noHack)   return cl;
  boolean mustang=false;
  if (JAXBContext.class.getClassLoader() == null) {
    mustang=true;
    List mask=new ArrayList(Arrays.asList(maskedPackages));
    mask.add("String_Node_Str");
    cl=new MaskingClassLoader(cl,mask);
    URL apiUrl=cl.getResource("String_Node_Str");
    if (apiUrl == null)     throw new ClassNotFoundException("String_Node_Str");
    cl=new URLClassLoader(new URL[]{ParallelWorldClassLoader.toJarUrl(apiUrl)},cl);
  }
  if (v.equals("String_Node_Str")) {
    if (!mustang)     cl=new MaskingClassLoader(cl,toolPackages);
    cl=new ParallelWorldClassLoader(cl,"String_Node_Str");
  }
 else {
    if (mustang)     cl=new ParallelWorldClassLoader(cl,"String_Node_Str");
  }
  return cl;
}
Program: 190660
Project: 190660
Buggy source:
private synchronized Class inject(String className,byte[] image){
  Class c=classes.get(className);
  if (c == null) {
    try {
      c=(Class)defineClass.invoke(parent,className.replace('/','.'),image,0,image.length);
      resolveClass.invoke(parent,c);
    }
 catch (    IllegalAccessException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
catch (    InvocationTargetException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
catch (    SecurityException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
catch (    LinkageError e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
    classes.put(className,c);
  }
  return c;
}

Fixed version (ground truth):
private synchronized Class inject(String className,byte[] image){
  if (!loadable)   return null;
  Class c=classes.get(className);
  if (c == null) {
    try {
      c=(Class)defineClass.invoke(parent,className.replace('/','.'),image,0,image.length);
      resolveClass.invoke(parent,c);
    }
 catch (    IllegalAccessException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
catch (    InvocationTargetException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
catch (    SecurityException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
catch (    LinkageError e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
    classes.put(className,c);
  }
  return c;
}
Program: 190661
Project: 190661
Buggy source:
public ArrayInfoImpl(ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder,Locatable upstream,TypeT arrayType){
  super(builder,upstream);
  this.arrayType=arrayType;
  this.itemType=builder.getTypeInfo(nav().getComponentType(arrayType),this);
  QName n=itemType.getTypeName();
  this.typeName=calcArrayTypeName(n);
}

Fixed version (ground truth):
public ArrayInfoImpl(ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder,Locatable upstream,TypeT arrayType){
  super(builder,upstream);
  this.arrayType=arrayType;
  TypeT componentType=nav().getComponentType(arrayType);
  this.itemType=builder.getTypeInfo(componentType,this);
  QName n=itemType.getTypeName();
  if (n == null) {
    builder.reportError(new IllegalAnnotationException(Messages.ANONYMOUS_ARRAY_ITEM.format(nav().getTypeName(componentType)),this));
    n=new QName("String_Node_Str");
  }
  this.typeName=calcArrayTypeName(n);
}
Program: 190662
Project: 190662
Buggy source:
/** 
 * Computes the type name of the array from that of the item type.
 */
public static final QName calcArrayTypeName(QName n){
  String uri;
  if (n.getNamespaceURI().equals(WellKnownNamespace.XML_SCHEMA)) {
    TODO.checkSpec("String_Node_Str");
    uri="String_Node_Str";
  }
 else   uri=n.getNamespaceURI();
  return new QName(uri,n.getLocalPart() + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Computes the type name of the array from that of the item type.
 */
public static QName calcArrayTypeName(QName n){
  String uri;
  if (n.getNamespaceURI().equals(WellKnownNamespace.XML_SCHEMA)) {
    TODO.checkSpec("String_Node_Str");
    uri="String_Node_Str";
  }
 else   uri=n.getNamespaceURI();
  return new QName(uri,n.getLocalPart() + "String_Node_Str");
}
Program: 190663
Project: 190663
Buggy source:
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator(){
  RuntimeTypeInfoSet tis;
  try {
    tis=getTypeInfoSet();
  }
 catch (  IllegalAnnotationsException e) {
    throw new AssertionError(e);
  }
  XmlSchemaGenerator<Type,Class,Field,Method> xsdgen=new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);
  Set<QName> rootTagNames=new HashSet<QName>();
  for (  RuntimeElementInfo ei : tis.getAllElements()) {
    rootTagNames.add(ei.getElementName());
  }
  for (  RuntimeClassInfo ci : tis.beans().values()) {
    if (ci.isElement())     rootTagNames.add(ci.asElement().getElementName());
  }
  for (  TypeReference tr : bridges.keySet()) {
    if (rootTagNames.contains(tr.tagName))     continue;
    if (tr.type == void.class || tr.type == Void.class) {
      xsdgen.add(tr.tagName,false,null);
    }
 else {
      NonElement<Type,Class> typeInfo=getXmlType(tis,tr);
      xsdgen.add(tr.tagName,!Navigator.REFLECTION.isPrimitive(tr.type),typeInfo);
    }
  }
  return xsdgen;
}

Fixed version (ground truth):
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator(){
  RuntimeTypeInfoSet tis;
  try {
    tis=getTypeInfoSet();
  }
 catch (  IllegalAnnotationsException e) {
    throw new AssertionError(e);
  }
  XmlSchemaGenerator<Type,Class,Field,Method> xsdgen=new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);
  Set<QName> rootTagNames=new HashSet<QName>();
  for (  RuntimeElementInfo ei : tis.getAllElements()) {
    rootTagNames.add(ei.getElementName());
  }
  for (  RuntimeClassInfo ci : tis.beans().values()) {
    if (ci.isElement())     rootTagNames.add(ci.asElement().getElementName());
  }
  for (  TypeReference tr : bridges.keySet()) {
    if (rootTagNames.contains(tr.tagName))     continue;
    if (tr.type == void.class || tr.type == Void.class) {
      xsdgen.add(tr.tagName,false,null);
    }
 else     if (tr.type == CompositeStructure.class) {
    }
 else {
      NonElement<Type,Class> typeInfo=getXmlType(tis,tr);
      xsdgen.add(tr.tagName,!Navigator.REFLECTION.isPrimitive(tr.type),typeInfo);
    }
  }
  return xsdgen;
}
Program: 190666
Project: 190666
Buggy source:
/** 
 * Examine the specified element ref and determine if a swaRef attribute needs to be generated
 * @param typeRef
 */
private boolean generateSwaRefAdapter(PropertyInfo<T,C> prop){
  final Adapter<T,C> adapter=prop.getAdapter();
  if (adapter == null)   return false;
  final Object o=navigator.asDecl(SwaRefAdapter.class);
  if (o == null)   return false;
  return (o.equals(adapter.adapterType));
}

Fixed version (ground truth):
/** 
 * Examine the specified element ref and determine if a swaRef attribute needs to be generated
 */
private boolean generateSwaRefAdapter(PropertyInfo<T,C> prop){
  final Adapter<T,C> adapter=prop.getAdapter();
  if (adapter == null)   return false;
  final Object o=navigator.asDecl(SwaRefAdapter.class);
  if (o == null)   return false;
  return (o.equals(adapter.adapterType));
}
Program: 190667
Project: 190667
Buggy source:
public static void main(String[] args) throws Throwable {
  String v="String_Node_Str";
  for (int i=0; i < args.length; i++) {
    if (args[i].equals("String_Node_Str")) {
      if (i + 1 < args.length) {
        v=parseVersion(args[i + 1]);
      }
    }
  }
  try {
    ClassLoader cl=createProtectiveClassLoader(XJCFacade.class.getClassLoader(),v);
    Class driver=cl.loadClass("String_Node_Str");
    Method mainMethod=driver.getDeclaredMethod("String_Node_Str",new Class[]{String[].class});
    try {
      mainMethod.invoke(null,new Object[]{args});
    }
 catch (    IllegalAccessException e) {
      throw e;
    }
catch (    InvocationTargetException e) {
      if (e.getTargetException() != null)       throw e.getTargetException();
    }
  }
 catch (  UnsupportedClassVersionError e) {
    System.err.println("String_Node_Str");
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws Throwable {
  String v="String_Node_Str";
  for (int i=0; i < args.length; i++) {
    if (args[i].equals("String_Node_Str")) {
      if (i + 1 < args.length) {
        v=parseVersion(args[i + 1]);
      }
    }
  }
  try {
    ClassLoader cl=ClassLoaderBuilder.createProtectiveClassLoader(XJCFacade.class.getClassLoader(),v);
    Class driver=cl.loadClass("String_Node_Str");
    Method mainMethod=driver.getDeclaredMethod("String_Node_Str",new Class[]{String[].class});
    try {
      mainMethod.invoke(null,new Object[]{args});
    }
 catch (    IllegalAccessException e) {
      throw e;
    }
catch (    InvocationTargetException e) {
      if (e.getTargetException() != null)       throw e.getTargetException();
    }
  }
 catch (  UnsupportedClassVersionError e) {
    System.err.println("String_Node_Str");
  }
}
Program: 190668
Project: 190668
Buggy source:
protected ClassLoader createClassLoader() throws ClassNotFoundException, IOException {
  return XJCFacade.createProtectiveClassLoader(XJCTask.class.getClassLoader(),source);
}

Fixed version (ground truth):
protected ClassLoader createClassLoader() throws ClassNotFoundException, IOException {
  return ClassLoaderBuilder.createProtectiveClassLoader(XJCTask.class.getClassLoader(),source);
}
Program: 190669
Project: 190669
Buggy source:
public ModelBuilder(AnnotationReader<T,C,F,M> reader,Navigator<T,C,F,M> navigator,Map<C,C> subclassReplacements,String defaultNamespaceRemap){
}

Fixed version (ground truth):
public ModelBuilder(AnnotationReader<T,C,F,M> reader,Navigator<T,C,F,M> navigator,Map<C,C> subclassReplacements,String defaultNamespaceRemap,boolean xmlAccessorFactorySupport){
  this.reader=reader;
  this.nav=navigator;
  this.subclassReplacements=subclassReplacements;
  if (defaultNamespaceRemap == null)   defaultNamespaceRemap="String_Node_Str";
  this.defaultNsUri=defaultNamespaceRemap;
  this.xmlAccessorFactorySupport=xmlAccessorFactorySupport;
  reader.setErrorHandler(proxyErrorHandler);
  typeInfoSet=createTypeInfoSet();
}
Program: 190670
Project: 190670
Buggy source:
protected AccessorFactory createAccessorFactory(Class clazz){
}

Fixed version (ground truth):
protected AccessorFactory createAccessorFactory(Class clazz){
  XmlAccessorFactory factoryAnn=null;
  AccessorFactory accFactory=null;
  if (builder.xmlAccessorFactorySupport) {
    factoryAnn=findXmlAccessorFactoryAnnotation(clazz);
    if (factoryAnn != null) {
      try {
        accFactory=factoryAnn.value().newInstance();
      }
 catch (      InstantiationException e) {
        builder.reportError(new IllegalAnnotationException(Messages.ACCESSORFACTORY_INSTANTIATION_EXCEPTION.format(factoryAnn.getClass().getName(),nav().getClassName(clazz)),this));
      }
catch (      IllegalAccessException e) {
        builder.reportError(new IllegalAnnotationException(Messages.ACCESSORFACTORY_ACCESS_EXCEPTION.format(factoryAnn.getClass().getName(),nav().getClassName(clazz)),this));
      }
    }
  }
  if (accFactory == null) {
    accFactory=AccessorFactoryImpl.getInstance();
  }
  return accFactory;
}
Program: 190671
Project: 190671
Buggy source:
protected XmlAccessorFactory findXmlAccessorFactoryAnnotation(Class clazz){
}

Fixed version (ground truth):
protected XmlAccessorFactory findXmlAccessorFactoryAnnotation(Class clazz){
  XmlAccessorFactory factoryAnn=reader().getClassAnnotation(XmlAccessorFactory.class,clazz,this);
  if (factoryAnn == null) {
    factoryAnn=reader().getPackageAnnotation(XmlAccessorFactory.class,clazz,this);
  }
  return factoryAnn;
}
Program: 190672
Project: 190672
Buggy source:
@Override public RuntimePropertySeed createAccessorSeed(Method getter,Method setter){
  Accessor acc;
  try {
    acc=accessorFactory.createPropertyAccessor(clazz,getter,setter);
  }
 catch (  JAXBException e) {
    builder.reportError(new IllegalAnnotationException(Messages.CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR.format(nav().getClassName(clazz),e.toString()),this));
    acc=Accessor.ERROR;
  }
  return new RuntimePropertySeed(super.createAccessorSeed(getter,setter),acc);
}

Fixed version (ground truth):
@Override public RuntimePropertySeed createAccessorSeed(Method getter,Method setter){
  Accessor acc;
  try {
    acc=accessorFactory.createPropertyAccessor(clazz,getter,setter);
  }
 catch (  JAXBException e) {
    builder.reportError(new IllegalAnnotationException(Messages.CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR.format(nav().getClassName(clazz),e.toString()),this));
    acc=Accessor.getErrorInstance();
  }
  return new RuntimePropertySeed(super.createAccessorSeed(getter,setter),acc);
}
Program: 190673
Project: 190673
Buggy source:
@Override protected RuntimePropertySeed createFieldSeed(Field field){
  final boolean readOnly=Modifier.isStatic(field.getModifiers());
  Accessor acc;
  try {
    acc=accessorFactory.createFieldAccessor(clazz,field,readOnly);
  }
 catch (  JAXBException e) {
    builder.reportError(new IllegalAnnotationException(Messages.CUSTOM_ACCESSORFACTORY_FIELD_ERROR.format(nav().getClassName(clazz),e.toString()),this));
    acc=Accessor.ERROR;
  }
  return new RuntimePropertySeed(super.createFieldSeed(field),acc);
}

Fixed version (ground truth):
@Override protected RuntimePropertySeed createFieldSeed(Field field){
  final boolean readOnly=Modifier.isStatic(field.getModifiers());
  Accessor acc;
  try {
    acc=accessorFactory.createFieldAccessor(clazz,field,readOnly);
  }
 catch (  JAXBException e) {
    builder.reportError(new IllegalAnnotationException(Messages.CUSTOM_ACCESSORFACTORY_FIELD_ERROR.format(nav().getClassName(clazz),e.toString()),this));
    acc=Accessor.getErrorInstance();
  }
  return new RuntimePropertySeed(super.createFieldSeed(field),acc);
}
Program: 190674
Project: 190674
Buggy source:
/** 
 * Creates a   {@link JAXBContextImpl} that includes the specified additional classes.
 */
public JAXBContextImpl createAugmented(Class<?> clazz) throws JAXBException {
  Class[] newList=new Class[classes.length + 1];
  System.arraycopy(classes,0,newList,0,classes.length);
  newList[classes.length]=clazz;
  return new JAXBContextImpl(newList,bridges.keySet(),subclassReplacements,defaultNsUri,c14nSupport,annotaitonReader);
}

Fixed version (ground truth):
/** 
 * Creates a   {@link JAXBContextImpl} that includes the specified additional classes.
 */
public JAXBContextImpl createAugmented(Class<?> clazz) throws JAXBException {
  Class[] newList=new Class[classes.length + 1];
  System.arraycopy(classes,0,newList,0,classes.length);
  newList[classes.length]=clazz;
  return new JAXBContextImpl(newList,bridges.keySet(),subclassReplacements,defaultNsUri,c14nSupport,annotaitonReader,xmlAccessorFactorySupport);
}
Program: 190675
Project: 190675
Buggy source:
public static JAXBContextImpl getJAXBContext(){
synchronized (AnnotationParserFactoryImpl.class) {
    try {
      if (customizationContext == null)       customizationContext=new JAXBContextImpl(new Class[]{BindInfo.class,BIClass.class,BIConversion.User.class,BIConversion.UserAdapter.class,BIDom.class,BIXDom.class,BIXSubstitutable.class,BIEnum.class,BIEnumMember.class,BIGlobalBinding.class,BIProperty.class,BISchemaBinding.class},Collections.<TypeReference>emptyList(),Collections.<Class,Class>emptyMap(),null,false,null);
      return customizationContext;
    }
 catch (    JAXBException e) {
      throw new AssertionError(e);
    }
  }
}

Fixed version (ground truth):
public static JAXBContextImpl getJAXBContext(){
synchronized (AnnotationParserFactoryImpl.class) {
    try {
      if (customizationContext == null)       customizationContext=new JAXBContextImpl(new Class[]{BindInfo.class,BIClass.class,BIConversion.User.class,BIConversion.UserAdapter.class,BIDom.class,BIXDom.class,BIXSubstitutable.class,BIEnum.class,BIEnumMember.class,BIGlobalBinding.class,BIProperty.class,BISchemaBinding.class},Collections.<TypeReference>emptyList(),Collections.<Class,Class>emptyMap(),null,false,null,false);
      return customizationContext;
    }
 catch (    JAXBException e) {
      throw new AssertionError(e);
    }
  }
}
Program: 190676
Project: 190676
Buggy source:
public void startElement(String uri,String localName,String qName,Attributes atts) throws SAXException {
  if (!isCutting()) {
    checkAndEnable(uri);
    verifyTagName(uri,localName,qName);
    if (needsToBePruned(uri))     startCutting();
  }
  super.startElement(uri,localName,qName,atts);
}

Fixed version (ground truth):
public void startElement(String uri,String localName,String qName,Attributes atts) throws SAXException {
  if (!isCutting()) {
    if (!uri.equals("String_Node_Str")) {
      checkAndEnable(uri);
      verifyTagName(uri,localName,qName);
      if (needsToBePruned(uri))       startCutting();
    }
  }
  super.startElement(uri,localName,qName,atts);
}
Program: 190677
Project: 190677
Buggy source:
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator(){
  RuntimeTypeInfoSet tis;
  try {
    tis=getTypeInfoSet();
  }
 catch (  IllegalAnnotationsException e) {
    throw new AssertionError(e);
  }
  XmlSchemaGenerator<Type,Class,Field,Method> xsdgen=new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);
  Set<QName> rootTagNames=new HashSet<QName>();
  for (  RuntimeElementInfo ei : tis.getAllElements()) {
    rootTagNames.add(ei.getElementName());
  }
  for (  RuntimeClassInfo ci : tis.beans().values()) {
    if (ci.isElement())     rootTagNames.add(ci.asElement().getElementName());
  }
  for (  TypeReference tr : bridges.keySet()) {
    if (rootTagNames.contains(tr.tagName))     continue;
    if (tr.type == void.class || tr.type == Void.class) {
      xsdgen.add(tr.tagName,false,null);
    }
 else {
      NonElement<Type,Class> typeInfo=getXmlType(tis,tr);
      xsdgen.add(tr.tagName,!Navigator.REFLECTION.isPrimitive(tr.type),typeInfo);
    }
  }
  return xsdgen;
}

Fixed version (ground truth):
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator(){
  RuntimeTypeInfoSet tis;
  try {
    tis=getTypeInfoSet();
  }
 catch (  IllegalAnnotationsException e) {
    throw new AssertionError(e);
  }
  XmlSchemaGenerator<Type,Class,Field,Method> xsdgen=new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);
  Set<QName> rootTagNames=new HashSet<QName>();
  for (  RuntimeElementInfo ei : tis.getAllElements()) {
    rootTagNames.add(ei.getElementName());
  }
  for (  RuntimeClassInfo ci : tis.beans().values()) {
    if (ci.isElement())     rootTagNames.add(ci.asElement().getElementName());
  }
  for (  TypeReference tr : bridges.keySet()) {
    if (rootTagNames.contains(tr.tagName))     continue;
    if (tr.type == void.class || tr.type == Void.class) {
      xsdgen.add(tr.tagName,false,null);
    }
 else     if (tr.type == CompositeStructure.class) {
    }
 else {
      NonElement<Type,Class> typeInfo=getXmlType(tis,tr);
      xsdgen.add(tr.tagName,!Navigator.REFLECTION.isPrimitive(tr.type),typeInfo);
    }
  }
  return xsdgen;
}
Program: 190678
Project: 190678
Buggy source:
/** 
 * Creates a   {@link StAXConnector} from {@link XMLStreamReader}. This method checks if the parser is FI parser and acts accordingly.
 */
public static StAXConnector create(XMLStreamReader reader,XmlVisitor visitor){
  final Class readerClass=reader.getClass();
  if (readerClass == FI_STAX_READER_CLASS && FI_CONNECTOR_CTOR != null) {
    try {
      return FI_CONNECTOR_CTOR.newInstance(reader,visitor);
    }
 catch (    Exception t) {
    }
  }
  boolean isZephyr=readerClass.getName().equals("String_Node_Str");
  if (!isZephyr)   visitor=new InterningXmlVisitor(visitor);
  if (STAX_EX_READER_CLASS != null && STAX_EX_READER_CLASS.isAssignableFrom(readerClass)) {
    try {
      return STAX_EX_CONNECTOR_CTOR.newInstance(reader,visitor);
    }
 catch (    Exception t) {
    }
  }
  return new StAXStreamConnector(reader,visitor);
}

Fixed version (ground truth):
/** 
 * Creates a   {@link StAXConnector} from {@link XMLStreamReader}. This method checks if the parser is FI parser and acts accordingly.
 */
public static StAXConnector create(XMLStreamReader reader,XmlVisitor visitor){
  final Class readerClass=reader.getClass();
  if (FI_STAX_READER_CLASS != null && FI_STAX_READER_CLASS.isAssignableFrom(readerClass) && FI_CONNECTOR_CTOR != null) {
    try {
      return FI_CONNECTOR_CTOR.newInstance(reader,visitor);
    }
 catch (    Exception t) {
    }
  }
  boolean isZephyr=readerClass.getName().equals("String_Node_Str");
  if (!isZephyr)   visitor=new InterningXmlVisitor(visitor);
  if (STAX_EX_READER_CLASS != null && STAX_EX_READER_CLASS.isAssignableFrom(readerClass)) {
    try {
      return STAX_EX_CONNECTOR_CTOR.newInstance(reader,visitor);
    }
 catch (    Exception t) {
    }
  }
  return new StAXStreamConnector(reader,visitor);
}
Program: 190679
Project: 190679
Buggy source:
private synchronized Class inject(String className,byte[] image){
  Class c=classes.get(className);
  if (c == null) {
    try {
      c=(Class)defineClass.invoke(parent,className.replace('/','.'),image,0,image.length);
      resolveClass.invoke(parent,c);
    }
 catch (    IllegalAccessException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
catch (    InvocationTargetException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
catch (    SecurityException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
    classes.put(className,c);
  }
  return c;
}

Fixed version (ground truth):
private synchronized Class inject(String className,byte[] image){
  Class c=classes.get(className);
  if (c == null) {
    try {
      c=(Class)defineClass.invoke(parent,className.replace('/','.'),image,0,image.length);
      resolveClass.invoke(parent,c);
    }
 catch (    IllegalAccessException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
catch (    InvocationTargetException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
catch (    SecurityException e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
catch (    LinkageError e) {
      logger.log(Level.FINE,"String_Node_Str" + className,e);
      return null;
    }
    classes.put(className,c);
  }
  return c;
}
Program: 190680
Project: 190680
Buggy source:
private int hash(Object o){
  if (useIdentity)   return System.identityHashCode(o) % initialHash.length;
 else   return Math.abs(o.hashCode() % initialHash.length);
}

Fixed version (ground truth):
private int hash(Object o){
  return ((useIdentity ? System.identityHashCode(o) : o.hashCode()) & 0x7FFFFFFF) % initialHash.length;
}
Program: 190682
Project: 190682
Buggy source:
public Class<? extends JAXBElement> getType(){
  return JAXBElement.class;
}

Fixed version (ground truth):
public Class<? extends JAXBElement> getType(){
  return (Class<? extends JAXBElement>)super.getType();
}
Program: 190683
Project: 190683
Buggy source:
public final JAXBElement createInstance(UnmarshallingContext context){
  return createInstanceFromValue(null);
}

Fixed version (ground truth):
public final JAXBElement createInstance(UnmarshallingContext context) throws IllegalAccessException, InvocationTargetException, InstantiationException {
  return createInstanceFromValue(null);
}
Program: 190684
Project: 190684
Buggy source:
public final JAXBElement createInstanceFromValue(Object o){
  return new JAXBElement(tagName,expectedType,scope,o);
}

Fixed version (ground truth):
public final JAXBElement createInstanceFromValue(Object o) throws IllegalAccessException, InvocationTargetException, InstantiationException {
  if (constructor == null)   return new JAXBElement(tagName,expectedType,scope,o);
 else   return constructor.newInstance(o);
}
Program: 190686
Project: 190686
Buggy source:
public void set(BeanT bean,Object value) throws AccessorException {
  if (value != null) {
    value=ebi.createInstanceFromValue(value);
  }
  acc.set(bean,(ValueT)value);
}

Fixed version (ground truth):
public void set(BeanT bean,Object value) throws AccessorException {
  if (value != null) {
    try {
      value=ebi.createInstanceFromValue(value);
    }
 catch (    IllegalAccessException e) {
      throw new AccessorException(e);
    }
catch (    InvocationTargetException e) {
      throw new AccessorException(e);
    }
catch (    InstantiationException e) {
      throw new AccessorException(e);
    }
  }
  acc.set(bean,(ValueT)value);
}
Program: 190687
Project: 190687
Buggy source:
@Override public Accessor getElementPropertyAccessor(String nsUri,String localName){
  JaxBeanInfo bi=expectedElements.get(nsUri,localName);
  if (bi != null) {
    if (bi instanceof ElementBeanInfoImpl) {
      final ElementBeanInfoImpl ebi=(ElementBeanInfoImpl)bi;
      return new Accessor<BeanT,Object>(ebi.expectedType){
        public Object get(        BeanT bean) throws AccessorException {
          ValueT r=acc.get(bean);
          if (r instanceof JAXBElement) {
            return ((JAXBElement)r).getValue();
          }
 else           return r;
        }
        public void set(        BeanT bean,        Object value) throws AccessorException {
          if (value != null) {
            value=ebi.createInstanceFromValue(value);
          }
          acc.set(bean,(ValueT)value);
        }
      }
;
    }
 else {
      return acc;
    }
  }
 else   return null;
}

Fixed version (ground truth):
@Override public Accessor getElementPropertyAccessor(String nsUri,String localName){
  JaxBeanInfo bi=expectedElements.get(nsUri,localName);
  if (bi != null) {
    if (bi instanceof ElementBeanInfoImpl) {
      final ElementBeanInfoImpl ebi=(ElementBeanInfoImpl)bi;
      return new Accessor<BeanT,Object>(ebi.expectedType){
        public Object get(        BeanT bean) throws AccessorException {
          ValueT r=acc.get(bean);
          if (r instanceof JAXBElement) {
            return ((JAXBElement)r).getValue();
          }
 else           return r;
        }
        public void set(        BeanT bean,        Object value) throws AccessorException {
          if (value != null) {
            try {
              value=ebi.createInstanceFromValue(value);
            }
 catch (            IllegalAccessException e) {
              throw new AccessorException(e);
            }
catch (            InvocationTargetException e) {
              throw new AccessorException(e);
            }
catch (            InstantiationException e) {
              throw new AccessorException(e);
            }
          }
          acc.set(bean,(ValueT)value);
        }
      }
;
    }
 else {
      return acc;
    }
  }
 else   return null;
}