nus-yam/ex-repair huggingface dataset:
Program: 190688
Project: 190688
Buggy source:
public void startElement(String namespaceURI,String localName,String qName,Attributes atts) throws SAXException {
  try {
    flushText();
    int len=atts.getLength();
    serializer.startElement(namespaceURI,localName,getPrefix(qName),null);
    for (int i=0; i < prefixMap.size(); i+=2) {
      serializer.getNamespaceContext().force(prefixMap.get(i + 1),prefixMap.get(i));
    }
    for (int i=0; i < len; i++) {
      String qname=atts.getQName(i);
      if (qname.startsWith("String_Node_Str"))       continue;
      String prefix=getPrefix(qname);
      serializer.getNamespaceContext().declareNamespace(atts.getURI(i),prefix,true);
    }
    serializer.endNamespaceDecls(null);
    for (int i=0; i < len; i++) {
      if (atts.getQName(i).startsWith("String_Node_Str"))       continue;
      serializer.attribute(atts.getURI(i),atts.getLocalName(i),atts.getValue(i));
    }
    prefixMap.clear();
    serializer.endAttributes();
  }
 catch (  IOException e) {
    throw new SAXException2(e);
  }
catch (  XMLStreamException e) {
    throw new SAXException2(e);
  }
}

Fixed version (ground truth):
public void startElement(String namespaceURI,String localName,String qName,Attributes atts) throws SAXException {
  try {
    flushText();
    int len=atts.getLength();
    String p=getPrefix(qName);
    if (containsPrefixMapping(p,namespaceURI))     serializer.startElementForce(namespaceURI,localName,p,null);
 else     serializer.startElement(namespaceURI,localName,p,null);
    for (int i=0; i < prefixMap.size(); i+=2) {
      serializer.getNamespaceContext().force(prefixMap.get(i + 1),prefixMap.get(i));
    }
    for (int i=0; i < len; i++) {
      String qname=atts.getQName(i);
      if (qname.startsWith("String_Node_Str"))       continue;
      String prefix=getPrefix(qname);
      serializer.getNamespaceContext().declareNamespace(atts.getURI(i),prefix,true);
    }
    serializer.endNamespaceDecls(null);
    for (int i=0; i < len; i++) {
      if (atts.getQName(i).startsWith("String_Node_Str"))       continue;
      serializer.attribute(atts.getURI(i),atts.getLocalName(i),atts.getValue(i));
    }
    prefixMap.clear();
    serializer.endAttributes();
  }
 catch (  IOException e) {
    throw new SAXException2(e);
  }
catch (  XMLStreamException e) {
    throw new SAXException2(e);
  }
}
Program: 190689
Project: 190689
Buggy source:
/** 
 * Sets the target version of the compilation
 */
public void setTarget(String version){
  options.target=Options.Target.parse(version);
  if (options.target == null)   throw new BuildException(version + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Sets the target version of the compilation
 */
public void setTarget(String version){
  options.target=SpecVersion.parse(version);
  if (options.target == null)   throw new BuildException(version + "String_Node_Str");
}
Program: 190690
Project: 190690
Buggy source:
protected InternalBridge(JAXBRIContext context){
  super(context);
}

Fixed version (ground truth):
protected InternalBridge(JAXBContextImpl context){
  super(context);
}
Program: 190691
Project: 190691
Buggy source:
/** 
 * Applies the additional binding customizations.
 */
public void apply(XSSchemaSet schema,ErrorReceiver errorReceiver){
  if (topLevel != null) {
    this.errorReceiver=errorReceiver;
    UnmarshallerImpl u=BindInfo.getJAXBContext().createUnmarshaller();
    this.unmarshaller=u.getUnmarshallerHandler();
    ValidatorHandler v=BindInfo.bindingFileSchema.newValidator();
    v.setErrorHandler(errorReceiver);
    loader=new ForkContentHandler(v,unmarshaller);
    topLevel.apply(schema.getSchemas());
    this.loader=null;
    this.unmarshaller=null;
    this.errorReceiver=null;
  }
}

Fixed version (ground truth):
/** 
 * Applies the additional binding customizations.
 */
public void apply(XSSchemaSet schema,ErrorReceiver errorReceiver){
  if (topLevel != null) {
    this.errorReceiver=errorReceiver;
    UnmarshallerImpl u=BindInfo.getJAXBContext().createUnmarshaller();
    this.unmarshaller=u.getUnmarshallerHandler();
    ValidatorHandler v=BindInfo.bindingFileSchema.newValidator();
    v.setErrorHandler(errorReceiver);
    loader=new ForkContentHandler(v,unmarshaller);
    topLevel.applyAll(schema.getSchemas());
    this.loader=null;
    this.unmarshaller=null;
    this.errorReceiver=null;
  }
}
Program: 190692
Project: 190692
Buggy source:
/** 
 * Gets the   {@link JAXBRIContext} to which this object belongs.
 * @since 2.1
 */
public final @NotNull JAXBRIContext getContext(){
  return context;
}

Fixed version (ground truth):
/** 
 * Gets the   {@link JAXBRIContext} to which this object belongs.
 * @since 2.1
 */
public @NotNull JAXBRIContext getContext(){
  return context;
}
Program: 190693
Project: 190693
Buggy source:
protected Bridge(JAXBRIContext context){
  this.context=context;
}

Fixed version (ground truth):
protected Bridge(JAXBContextImpl context){
  this.context=context;
}
Program: 190694
Project: 190694
Buggy source:
protected InternalBridge(JAXBContextImpl context){
  super(context);
}

Fixed version (ground truth):
protected InternalBridge(JAXBRIContext context){
  super(context);
}
Program: 190695
Project: 190695
Buggy source:
public void endDTD() throws SAXException {
  for (  Element e : elements.values())   e.bind();
  if (errorReceiver.hadError())   return;
  processInterfaceDeclarations();
  model.serialVersionUID=bindInfo.getSerialVersionUID();
  model.rootClass=bindInfo.getSuperClass();
  model.rootInterface=bindInfo.getSuperInterface();
  processConstructorDeclarations();
}

Fixed version (ground truth):
public void endDTD() throws SAXException {
  for (  Element e : elements.values())   e.bind();
  if (errorReceiver.hadError())   return;
  processInterfaceDeclarations();
  model.serialVersionUID=bindInfo.getSerialVersionUID();
  if (model.serialVersionUID != null)   model.serializable=true;
  model.rootClass=bindInfo.getSuperClass();
  model.rootInterface=bindInfo.getSuperInterface();
  processConstructorDeclarations();
}
Program: 190696
Project: 190696
Buggy source:
protected Bridge(JAXBContextImpl context){
  this.context=context;
}

Fixed version (ground truth):
protected Bridge(JAXBRIContext context){
  this.context=context;
}
Program: 190698
Project: 190698
Buggy source:
public void elementDecl(XSElementDecl decl){
  QName n=BGMBuilder.getName(decl);
  if (elementNames.add(n)) {
    CElement elementBean=Ring.get(ClassSelector.class).bindToType(decl,null);
    if (elementBean == null)     refs.add(new XmlTypeRef(decl));
 else {
      if (elementBean instanceof CClassInfo)       refs.add(new CClassInfoRef(decl,(CClassInfo)elementBean));
 else       refs.add(new CElementInfoRef(decl,(CElementInfo)elementBean));
    }
  }
}

Fixed version (ground truth):
public void elementDecl(XSElementDecl decl){
  QName n=BGMBuilder.getName(decl);
  if (elementNames.add(n)) {
    CElement elementBean=Ring.get(ClassSelector.class).bindToType(decl,null);
    if (elementBean == null)     refs.add(new XmlTypeRef(decl));
 else {
      if (elementBean instanceof CClass)       refs.add(new CClassRef(decl,(CClass)elementBean));
 else       refs.add(new CElementInfoRef(decl,(CElementInfo)elementBean));
    }
  }
}
Program: 190699
Project: 190699
Buggy source:
public CEnumLeafInfo(Model model,QName typeName,CClassInfoParent container,String shortName,CNonElement base,Collection<CEnumConstant> _members,XSComponent source,CCustomizations customizations,Locator _sourceLocator){
  this.model=model;
  this.parent=container;
  this.shortName=shortName;
  this.base=base;
  this.members=_members;
  this.source=source;
  if (customizations == null)   customizations=CCustomizations.EMPTY;
  this.customizations=customizations;
  this.sourceLocator=_sourceLocator;
  this.typeName=typeName;
  for (  CEnumConstant mem : members)   mem.setParent(this);
  model.add(this);
}

Fixed version (ground truth):
public CEnumLeafInfo(Model model,QName typeName,CClassInfoParent container,String shortName,CNonElement base,Collection<CEnumConstant> _members,XSComponent source,CCustomizations customizations,Locator _sourceLocator){
  this.model=model;
  this.parent=container;
  this.shortName=model.allocator.assignClassName(parent,shortName);
  this.base=base;
  this.members=_members;
  this.source=source;
  if (customizations == null)   customizations=CCustomizations.EMPTY;
  this.customizations=customizations;
  this.sourceLocator=_sourceLocator;
  this.typeName=typeName;
  for (  CEnumConstant mem : members)   mem.setParent(this);
  model.add(this);
}
Program: 190701
Project: 190701
Buggy source:
/** 
 * Picks one document at random and returns it.
 */
public Document getOneDocument(){
  return core.values().iterator().next();
}

Fixed version (ground truth):
/** 
 * Picks one document at random and returns it.
 */
public Document getOneDocument(){
  for (  Document dom : core.values()) {
    if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI))     return dom;
  }
  throw new AssertionError();
}
Program: 190702
Project: 190702
Buggy source:
public String getNamespaceURI(String prefix){
  Node parent=e;
  String namespace=null;
  if (prefix.equals("String_Node_Str")) {
    namespace=WellKnownNamespace.XML_NAMESPACE_URI;
  }
 else {
    int type;
    while ((null != parent) && (null == namespace) && (((type=parent.getNodeType()) == Node.ELEMENT_NODE) || (type == Node.ENTITY_REFERENCE_NODE))) {
      if (type == Node.ELEMENT_NODE) {
        if (parent.getNodeName().indexOf(prefix + ':') == 0)         return parent.getNamespaceURI();
        NamedNodeMap nnm=parent.getAttributes();
        for (int i=0; i < nnm.getLength(); i++) {
          Node attr=nnm.item(i);
          String aname=attr.getNodeName();
          boolean isPrefix=aname.startsWith("String_Node_Str");
          if (isPrefix || aname.equals("String_Node_Str")) {
            int index=aname.indexOf(':');
            String p=isPrefix ? aname.substring(index + 1) : "String_Node_Str";
            if (p.equals(prefix)) {
              namespace=attr.getNodeValue();
              break;
            }
          }
        }
      }
      parent=parent.getParentNode();
    }
  }
  return namespace;
}

Fixed version (ground truth):
public String getNamespaceURI(String prefix){
  Node parent=e;
  String namespace=null;
  final String prefixColon=prefix + ':';
  if (prefix.equals("String_Node_Str")) {
    namespace=WellKnownNamespace.XML_NAMESPACE_URI;
  }
 else {
    int type;
    while ((null != parent) && (null == namespace) && (((type=parent.getNodeType()) == Node.ELEMENT_NODE) || (type == Node.ENTITY_REFERENCE_NODE))) {
      if (type == Node.ELEMENT_NODE) {
        if (parent.getNodeName().startsWith(prefixColon))         return parent.getNamespaceURI();
        NamedNodeMap nnm=parent.getAttributes();
        for (int i=0; i < nnm.getLength(); i++) {
          Node attr=nnm.item(i);
          String aname=attr.getNodeName();
          boolean isPrefix=aname.startsWith("String_Node_Str");
          if (isPrefix || aname.equals("String_Node_Str")) {
            int index=aname.indexOf(':');
            String p=isPrefix ? aname.substring(index + 1) : "String_Node_Str";
            if (p.equals(prefix)) {
              namespace=attr.getNodeValue();
              break;
            }
          }
        }
      }
      parent=parent.getParentNode();
    }
  }
  if (prefix.equals("String_Node_Str"))   return "String_Node_Str";
  return namespace;
}
Program: 190703
Project: 190703
Buggy source:
private static String calculateRelativePath(String uri,String base){
  if (base == null) {
    return null;
  }
  if (uri.startsWith(base)) {
    return uri.substring(base.length());
  }
 else {
    return "String_Node_Str" + calculateRelativePath(uri,getParentUriPath(base));
  }
}

Fixed version (ground truth):
private static String calculateRelativePath(String uri,String base,boolean fileUrl){
  boolean onWindows=File.pathSeparatorChar == ';';
  if (base == null) {
    return null;
  }
  if ((fileUrl && onWindows && startsWithIgnoreCase(uri,base)) || uri.startsWith(base)) {
    return uri.substring(base.length());
  }
 else {
    return "String_Node_Str" + calculateRelativePath(uri,getParentUriPath(base),fileUrl);
  }
}
Program: 190704
Project: 190704
Buggy source:
public void set(BeanT bean,OnWireValueT o) throws AccessorException {
  if (o == null)   core.set(bean,null);
 else {
    XmlAdapter<OnWireValueT,InMemValueT> a=getAdapter();
    try {
      core.set(bean,a.unmarshal(o));
    }
 catch (    Exception e) {
      throw new AccessorException(e);
    }
  }
}

Fixed version (ground truth):
public void set(BeanT bean,OnWireValueT o) throws AccessorException {
  XmlAdapter<OnWireValueT,InMemValueT> a=getAdapter();
  try {
    core.set(bean,a.unmarshal(o));
  }
 catch (  Exception e) {
    throw new AccessorException(e);
  }
}
Program: 190705
Project: 190705
Buggy source:
public OnWireValueT get(BeanT bean) throws AccessorException {
  InMemValueT v=core.get(bean);
  if (v == null)   return null;
  XmlAdapter<OnWireValueT,InMemValueT> a=getAdapter();
  try {
    return a.marshal(v);
  }
 catch (  Exception e) {
    throw new AccessorException(e);
  }
}

Fixed version (ground truth):
public OnWireValueT get(BeanT bean) throws AccessorException {
  InMemValueT v=core.get(bean);
  XmlAdapter<OnWireValueT,InMemValueT> a=getAdapter();
  try {
    return a.marshal(v);
  }
 catch (  Exception e) {
    throw new AccessorException(e);
  }
}
Program: 190706
Project: 190706
Buggy source:
/** 
 * Returns an union of two   {@link ElementSet}s. This method performs better if lhs is bigger than rhs
 */
public static ElementSet union(ElementSet lhs,ElementSet rhs){
  if (lhs.contains(rhs))   return lhs;
  return new MultiValueSet(lhs,rhs);
}

Fixed version (ground truth):
/** 
 * Returns an union of two   {@link ElementSet}s. This method performs better if lhs is bigger than rhs
 */
public static ElementSet union(ElementSet lhs,ElementSet rhs){
  if (lhs.contains(rhs))   return lhs;
  if (lhs == ElementSet.EMPTY_SET)   return rhs;
  if (rhs == ElementSet.EMPTY_SET)   return lhs;
  return new MultiValueSet(lhs,rhs);
}
Program: 190707
Project: 190707
Buggy source:
public void process(){
  List<Reference> decls=new ArrayList<Reference>();
  for (  TypeDeclaration d : env.getTypeDeclarations())   decls.add(new Reference(d,env));
  J2SJAXBModel model=XJC.createJavaCompiler().bind(decls,Collections.<QName,Reference>emptyMap(),null,env);
  if (model == null)   return;
  try {
    model.generateSchema(new SchemaOutputResolver(){
      public Result createOutput(      String namespaceUri,      String suggestedFileName) throws IOException {
        File file;
        OutputStream out;
        if (schemaLocations.containsKey(namespaceUri)) {
          file=schemaLocations.get(namespaceUri);
          if (file == null)           return null;
          out=new FileOutputStream(file);
        }
 else {
          file=new File(suggestedFileName);
          out=env.getFiler().createBinaryFile(Filer.Location.CLASS_TREE,"String_Node_Str",file);
        }
        StreamResult ss=new StreamResult(out);
        env.getMessager().printNotice("String_Node_Str" + file);
        ss.setSystemId(file.getPath());
        return ss;
      }
    }
,errorListener);
  }
 catch (  IOException e) {
    errorListener.error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
public void process(){
  List<Reference> decls=new ArrayList<Reference>();
  for (  TypeDeclaration d : env.getTypeDeclarations()) {
    if (d instanceof ClassDeclaration)     decls.add(new Reference(d,env));
  }
  J2SJAXBModel model=XJC.createJavaCompiler().bind(decls,Collections.<QName,Reference>emptyMap(),null,env);
  if (model == null)   return;
  try {
    model.generateSchema(new SchemaOutputResolver(){
      public Result createOutput(      String namespaceUri,      String suggestedFileName) throws IOException {
        File file;
        OutputStream out;
        if (schemaLocations.containsKey(namespaceUri)) {
          file=schemaLocations.get(namespaceUri);
          if (file == null)           return null;
          out=new FileOutputStream(file);
        }
 else {
          file=new File(suggestedFileName);
          out=env.getFiler().createBinaryFile(Filer.Location.CLASS_TREE,"String_Node_Str",file);
        }
        StreamResult ss=new StreamResult(out);
        env.getMessager().printNotice("String_Node_Str" + file);
        ss.setSystemId(file.getPath());
        return ss;
      }
    }
,errorListener);
  }
 catch (  IOException e) {
    errorListener.error(e.getMessage(),e);
  }
}
Program: 190709
Project: 190709
Buggy source:
public Expression modelGroup(XSModelGroup group){
  XSModelGroup.Compositor comp=group.getCompositor();
  if (comp == XSModelGroup.CHOICE) {
    Expression e=null;
    for (    XSParticle p : group.getChildren()) {
      if (e == null)       e=particle(p);
 else       e=new Choice(e,particle(p));
    }
    return e;
  }
 else {
    Expression e=null;
    for (    XSParticle p : group.getChildren()) {
      if (e == null)       e=particle(p);
 else       e=new Sequence(e,particle(p));
    }
    return e;
  }
}

Fixed version (ground truth):
public Expression modelGroup(XSModelGroup group){
  XSModelGroup.Compositor comp=group.getCompositor();
  if (comp == XSModelGroup.CHOICE) {
    Expression e=Expression.EPSILON;
    for (    XSParticle p : group.getChildren()) {
      if (e == null)       e=particle(p);
 else       e=new Choice(e,particle(p));
    }
    return e;
  }
 else {
    Expression e=Expression.EPSILON;
    for (    XSParticle p : group.getChildren()) {
      if (e == null)       e=particle(p);
 else       e=new Sequence(e,particle(p));
    }
    return e;
  }
}
Program: 190711
Project: 190711
Buggy source:
@XmlElement(name="String_Node_Str") private void setGlobalConversions(GlobalConversion[] convs){
  for (  GlobalConversion u : convs) {
    globalConversions.put(u.xmlType,u);
  }
}

Fixed version (ground truth):
@XmlElement(name="String_Node_Str") private void setGlobalConversions(GlobalStandardConversion[] convs){
  for (  GlobalStandardConversion u : convs) {
    globalConversions.put(u.xmlType,u);
  }
}
Program: 190712
Project: 190712
Buggy source:
/** 
 * Write the XML declaration at the beginning of the document. Pass the event on down the filter chain for further processing.
 * @exception org.xml.sax.SAXException If there is an errorwriting the XML declaration, or if a handler further down the filter chain raises an exception.
 * @see org.xml.sax.ContentHandler#startDocument()
 */
public void startDocument() throws SAXException {
  try {
    reset();
    if (writeXmlDecl) {
      String e="String_Node_Str";
      if (encoding != null)       e="String_Node_Str" + encoding + '\"';
      write("String_Node_Str" + e + "String_Node_Str");
    }
    if (header != null)     write(header);
    super.startDocument();
  }
 catch (  IOException e) {
    throw new SAXException(e);
  }
}

Fixed version (ground truth):
/** 
 * Write the XML declaration at the beginning of the document. Pass the event on down the filter chain for further processing.
 * @exception org.xml.sax.SAXException If there is an errorwriting the XML declaration, or if a handler further down the filter chain raises an exception.
 * @see org.xml.sax.ContentHandler#startDocument()
 */
public void startDocument() throws SAXException {
  try {
    reset();
    if (writeXmlDecl) {
      String e="String_Node_Str";
      if (encoding != null)       e="String_Node_Str" + encoding + '\"';
      writeXmlDecl("String_Node_Str" + e + "String_Node_Str");
    }
    if (header != null)     write(header);
    super.startDocument();
  }
 catch (  IOException e) {
    throw new SAXException(e);
  }
}
Program: 190713
Project: 190713
Buggy source:
/** 
 * Write a newline at the end of the document. Pass the event on down the filter chain for further processing.
 * @exception org.xml.sax.SAXException If there is an errorwriting the newline, or if a handler further down the filter chain raises an exception.
 * @see org.xml.sax.ContentHandler#endDocument()
 */
public void endDocument() throws SAXException {
  try {
    write('\n');
    super.endDocument();
    flush();
  }
 catch (  IOException e) {
    throw new SAXException(e);
  }
}

Fixed version (ground truth):
/** 
 * Write a newline at the end of the document. Pass the event on down the filter chain for further processing.
 * @exception org.xml.sax.SAXException If there is an errorwriting the newline, or if a handler further down the filter chain raises an exception.
 * @see org.xml.sax.ContentHandler#endDocument()
 */
public void endDocument() throws SAXException {
  try {
    super.endDocument();
    flush();
  }
 catch (  IOException e) {
    throw new SAXException(e);
  }
}
Program: 190714
Project: 190714
Buggy source:
/** 
 * Write a raw string.
 */
private void write(String s) throws IOException {
  output.write(s);
}

Fixed version (ground truth):
/** 
 * Write a raw string.
 */
protected final void write(String s) throws IOException {
  output.write(s);
}
Program: 190715
Project: 190715
Buggy source:
public boolean isRequired(){
  return !mul.isOptional();
}

Fixed version (ground truth):
public boolean isRequired(){
  return mul.min > 0;
}
Program: 190716
Project: 190716
Buggy source:
/** 
 * Static field reference. 
 */
public final JFieldRef staticRef(JVar field){
  return staticRef(field.name());
}

Fixed version (ground truth):
/** 
 * Static field reference. 
 */
public final JFieldRef staticRef(JVar field){
  return new JFieldRef(this,field);
}
Program: 190717
Project: 190717
Buggy source:
JFieldRef(JGenerable object,String name,boolean explicitThis){
  this.explicitThis=explicitThis;
  this.object=object;
  if (name.indexOf('.') >= 0)   throw new IllegalArgumentException("String_Node_Str" + name);
  this.name=name;
}

Fixed version (ground truth):
JFieldRef(JGenerable object,JVar var,boolean explicitThis){
  this.explicitThis=explicitThis;
  this.object=object;
  this.var=var;
}
Program: 190718
Project: 190718
Buggy source:
public void generate(JFormatter f){
  if (object != null) {
    f.g(object).p('.').p(name);
  }
 else {
    if (explicitThis) {
      f.p("String_Node_Str").p(name);
    }
 else {
      f.id(name);
    }
  }
}

Fixed version (ground truth):
public void generate(JFormatter f){
  String name=this.name;
  if (name == null)   name=var.name();
  if (object != null) {
    f.g(object).p('.').p(name);
  }
 else {
    if (explicitThis) {
      f.p("String_Node_Str").p(name);
    }
 else {
      f.id(name);
    }
  }
}
Program: 190719
Project: 190719
Buggy source:
/** 
 * We can only have one   {@link XmlAnyElement} property,so all the wildcards need to be treated as one node.
 */
public Expression wildcard(XSWildcard wc){
  if (wildcard == null)   wildcard=new GWildcardElement();
  return wildcard;
}

Fixed version (ground truth):
/** 
 * We can only have one   {@link XmlAnyElement} property,so all the wildcards need to be treated as one node.
 */
public Expression wildcard(XSWildcard wc){
  if (wildcard == null)   wildcard=new GWildcardElement();
  wildcard.particles.add(current);
  return wildcard;
}
Program: 190720
Project: 190720
Buggy source:
/** 
 * Returns true if the array contains a JAXB annotation.
 */
private static boolean hasJAXBAnnotation(Annotation[] annotations){
  for (  Annotation a : annotations)   if (isJAXBAnnotation(a))   return true;
  return false;
}

Fixed version (ground truth):
/** 
 * Returns true if the array contains a JAXB annotation.
 */
private static boolean hasJAXBAnnotation(Annotation[] annotations){
  return getSomeJAXBAnnotation(annotations) != null;
}
Program: 190721
Project: 190721
Buggy source:
/** 
 * Returns a   {@link ClassInfo} for the given bean.<p> This method is almost like refinement of  {@link #getTypeInfo(Object)} exceptour C cannot derive from T.
 * @return null if the specified type is not bound by JAXB or otherwise unknown to this set.
 */
public NonElement<TypeT,ClassDeclT> getClassInfo(ClassDeclT type){
  LeafInfo<TypeT,ClassDeclT> l=builtins.get(nav.use(type));
  if (l != null)   return l;
  l=enums.get(type);
  if (l != null)   return l;
  return beans.get(type);
}

Fixed version (ground truth):
/** 
 * Returns a   {@link ClassInfo} for the given bean.<p> This method is almost like refinement of  {@link #getTypeInfo(Object)} exceptour C cannot derive from T.
 * @return null if the specified type is not bound by JAXB or otherwise unknown to this set.
 */
public NonElement<TypeT,ClassDeclT> getClassInfo(ClassDeclT type){
  LeafInfo<TypeT,ClassDeclT> l=builtins.get(nav.use(type));
  if (l != null)   return l;
  l=enums.get(type);
  if (l != null)   return l;
  if (nav.asDecl(Object.class).equals(type))   return anyType;
  return beans.get(type);
}
Program: 190723
Project: 190723
Buggy source:
public void declare(JFormatter f){
  if (jdoc != null)   f.g(jdoc);
  if (annotations != null) {
    for (    JAnnotationUse a : annotations)     f.g(a).nl();
  }
  super.declare(f);
  f.g(mods);
  if (!isConstructor())   f.g(type);
  f.id(name).p('(').i();
  boolean first=true;
  for (  JVar var : params) {
    if (!first)     f.p(',');
    if (var.isAnnotated())     f.nl();
    f.b(var);
    first=false;
  }
  if (hasVarArgs()) {
    if (!first)     f.p(',');
    f.g(varParam.type());
    f.p("String_Node_Str");
    f.id(varParam.name());
  }
  f.o().p(')');
  if (_throws != null && !_throws.isEmpty()) {
    f.nl().i().p("String_Node_Str").g(_throws).nl().o();
  }
  if (defaultValue != null) {
    f.p("String_Node_Str");
    f.g(defaultValue);
  }
  if (body != null) {
    f.s(body);
  }
 else   if (!outer.isInterface() && !outer.isAnnotationTypeDeclaration() && !mods.isAbstract()&& !mods.isNative()) {
    f.s(new JBlock());
  }
 else {
    f.p(';').nl();
  }
}

Fixed version (ground truth):
public void declare(JFormatter f){
  if (jdoc != null)   f.g(jdoc);
  if (annotations != null) {
    for (    JAnnotationUse a : annotations)     f.g(a).nl();
  }
  super.declare(f);
  f.g(mods);
  if (!isConstructor())   f.g(type);
  f.id(name).p('(').i();
  boolean first=true;
  for (  JVar var : params) {
    if (!first)     f.p(',');
    if (var.isAnnotated())     f.nl();
    f.b(var);
    first=false;
  }
  if (hasVarArgs()) {
    if (!first)     f.p(',');
    f.g(varParam.type().elementType());
    f.p("String_Node_Str");
    f.id(varParam.name());
  }
  f.o().p(')');
  if (_throws != null && !_throws.isEmpty()) {
    f.nl().i().p("String_Node_Str").g(_throws).nl().o();
  }
  if (defaultValue != null) {
    f.p("String_Node_Str");
    f.g(defaultValue);
  }
  if (body != null) {
    f.s(body);
  }
 else   if (!outer.isInterface() && !outer.isAnnotationTypeDeclaration() && !mods.isAbstract()&& !mods.isNative()) {
    f.s(new JBlock());
  }
 else {
    f.p(';').nl();
  }
}
Program: 190724
Project: 190724
Buggy source:
public JType elementType(){
  throw new IllegalArgumentException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * If this is an array, returns the component type of the array. (T of T[])
 */
public JType elementType(){
  throw new IllegalArgumentException("String_Node_Str");
}
Program: 190725
Project: 190725
Buggy source:
/** 
 * Returns true if the symbol represented by the short name is "importable".
 */
public boolean collisions(JDefinedClass enclosingClass){
  if (classes.size() > 1)   return true;
  if (id && classes.size() != 0)   return true;
  for (  JClass c : classes) {
    if (c._package() == javaLang) {
      Iterator itr=enclosingClass._package().classes();
      while (itr.hasNext()) {
        JDefinedClass n=(JDefinedClass)itr.next();
        if (n.name().equals(c.name()))         return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Returns true if the symbol represented by the short name is "importable".
 */
public boolean collisions(JDefinedClass enclosingClass){
  if (classes.size() > 1)   return true;
  if (id && classes.size() != 0)   return true;
  for (  JClass c : classes) {
    if (c._package() == javaLang) {
      Iterator itr=enclosingClass._package().classes();
      while (itr.hasNext()) {
        JDefinedClass n=(JDefinedClass)itr.next();
        if (n.name().equals(c.name()))         return true;
      }
    }
    if (c.outer() != null)     return true;
  }
  return false;
}
Program: 190726
Project: 190726
Buggy source:
/** 
 * Print a type name. <p> In the collecting mode we use this information to decide what types to import and what not to.
 */
public JFormatter t(JClass type){
switch (mode) {
case PRINTING:
    if (importedClasses.contains(type)) {
      p(type.name());
    }
 else {
      p(type.fullName());
    }
  break;
case COLLECTING:
final String shortName=type.name();
if (collectedReferences.containsKey(shortName)) {
collectedReferences.get(shortName).add(type);
}
 else {
ReferenceList tl=new ReferenceList();
tl.add(type);
collectedReferences.put(shortName,tl);
}
break;
}
return this;
}

Fixed version (ground truth):
/** 
 * Print a type name. <p> In the collecting mode we use this information to decide what types to import and what not to.
 */
public JFormatter t(JClass type){
switch (mode) {
case PRINTING:
    if (importedClasses.contains(type)) {
      p(type.name());
    }
 else {
      if (type.outer() != null)       t(type.outer()).p('.').p(type.name());
 else       p(type.fullName());
    }
  break;
case COLLECTING:
final String shortName=type.name();
if (collectedReferences.containsKey(shortName)) {
collectedReferences.get(shortName).add(type);
}
 else {
ReferenceList tl=new ReferenceList();
tl.add(type);
collectedReferences.put(shortName,tl);
}
break;
}
return this;
}
Program: 190727
Project: 190727
Buggy source:
public boolean run(Outline outline,Options opt,ErrorHandler errorHandler){
  for (  ClassOutline ci : outline.getClasses()) {
    JDefinedClass impl=ci.implClass;
    if (ci.getSuperClass() == null) {
      JVar $loc=impl.field(JMod.PROTECTED,Locator.class,fieldName);
      $loc.annotate(XmlLocation.class);
      impl._implements(Locatable.class);
      impl.method(JMod.PUBLIC,Locator.class,"String_Node_Str").body()._return($loc);
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean run(Outline outline,Options opt,ErrorHandler errorHandler){
  for (  ClassOutline ci : outline.getClasses()) {
    JDefinedClass impl=ci.implClass;
    if (ci.getSuperClass() == null) {
      JVar $loc=impl.field(JMod.PROTECTED,Locator.class,fieldName);
      $loc.annotate(XmlLocation.class);
      $loc.annotate(XmlTransient.class);
      impl._implements(Locatable.class);
      impl.method(JMod.PUBLIC,Locator.class,"String_Node_Str").body()._return($loc);
    }
  }
  return true;
}
Program: 190728
Project: 190728
Buggy source:
public void generatedFile(String fileName){
  message(fileName);
}

Fixed version (ground truth):
public void generatedFile(String fileName,int count,int total){
  message(fileName);
}
Program: 190729
Project: 190729
Buggy source:
public ProgressCodeWriter(CodeWriter output,XJCListener progress){
  super(output);
  this.progress=progress;
  if (progress == null)   throw new IllegalArgumentException();
}

Fixed version (ground truth):
public ProgressCodeWriter(CodeWriter output,XJCListener progress,int totalFileCount){
  super(output);
  this.progress=progress;
  this.totalFileCount=totalFileCount;
  if (progress == null)   throw new IllegalArgumentException();
}
Program: 190730
Project: 190730
Buggy source:
private void report(JPackage pkg,String fileName){
  String name=pkg.name().replace('.',File.separatorChar);
  if (name.length() != 0)   name+=File.separatorChar;
  name+=fileName;
  progress.generatedFile(name);
}

Fixed version (ground truth):
private void report(JPackage pkg,String fileName){
  String name=pkg.name().replace('.',File.separatorChar);
  if (name.length() != 0)   name+=File.separatorChar;
  name+=fileName;
  progress.generatedFile(name,current++,totalFileCount);
}
Program: 190731
Project: 190731
Buggy source:
/** 
 * Called for each file generated by XJC. <p> XJC may generate not only source files but also resources files. The file name includes the path portions that correspond with the package name. <p> When generating files into a directory, file names will be relative to the output directory. When generating files into a zip file, file names will be those in the zip file.
 * @param fileName file names like "org/acme/foo/Foo.java" or "org/acme/foo/jaxb.properties".
 */
public void generatedFile(String fileName){
}

Fixed version (ground truth):
/** 
 * Called for each file generated by XJC. <p> XJC may generate not only source files but also resources files. The file name includes the path portions that correspond with the package name. <p> When generating files into a directory, file names will be relative to the output directory. When generating files into a zip file, file names will be those in the zip file.
 * @param fileName file names like "org/acme/foo/Foo.java" or "org/acme/foo/jaxb.properties".
 * @since 2.0.1
 */
public void generatedFile(String fileName,int current,int total){
  generatedFile(fileName);
}
Program: 190732
Project: 190732
Buggy source:
/** 
 * Wraps the annotation into a proxy so that the returned object will also implement  {@link Locatable}.
 */
public static <A extends Annotation>A create(A annotation,Locatable parentSourcePos){
  if (annotation == null)   return null;
  Class<? extends Annotation> type=annotation.annotationType();
  if (quicks.containsKey(type)) {
    return (A)quicks.get(type).newInstance(parentSourcePos,annotation);
  }
  return (A)Proxy.newProxyInstance(LocatableAnnotation.class.getClassLoader(),new Class[]{type,Locatable.class},new LocatableAnnotation(annotation,parentSourcePos));
}

Fixed version (ground truth):
/** 
 * Wraps the annotation into a proxy so that the returned object will also implement  {@link Locatable}.
 */
public static <A extends Annotation>A create(A annotation,Locatable parentSourcePos){
  if (annotation == null)   return null;
  Class<? extends Annotation> type=annotation.annotationType();
  if (quicks.containsKey(type)) {
    return (A)quicks.get(type).newInstance(parentSourcePos,annotation);
  }
  ClassLoader cl=LocatableAnnotation.class.getClassLoader();
  try {
    Class loadableT=Class.forName(type.getName(),false,cl);
    if (loadableT != type)     return annotation;
    return (A)Proxy.newProxyInstance(cl,new Class[]{type,Locatable.class},new LocatableAnnotation(annotation,parentSourcePos));
  }
 catch (  ClassNotFoundException e) {
    return annotation;
  }
}
Program: 190733
Project: 190733
Buggy source:
private void indentEndTag() throws IOException {
  depth--;
  if (!seenText)   printIndent();
  seenText=false;
}

Fixed version (ground truth):
private void indentEndTag() throws IOException {
  depth--;
  if (!closeStartTagPending && !seenText)   printIndent();
  seenText=false;
}
Program: 190734
Project: 190734
Buggy source:
private void indentStartTag() throws IOException {
  if (!seenText)   printIndent();
  depth++;
  seenText=false;
}

Fixed version (ground truth):
private void indentStartTag() throws IOException {
  closeStartTag();
  if (!seenText)   printIndent();
  depth++;
  seenText=false;
}
Program: 190735
Project: 190735
Buggy source:
public void beginStartTag(Name name) throws IOException {
  int base=pushNsDecls();
  write('<');
  writeName(name);
  writeNsDecls(base);
}

Fixed version (ground truth):
public void beginStartTag(Name name) throws IOException {
  closeStartTag();
  int base=pushNsDecls();
  write('<');
  writeName(name);
  writeNsDecls(base);
}
Program: 190736
Project: 190736
Buggy source:
public void endStartTag() throws IOException {
  write('>');
}

Fixed version (ground truth):
public void endStartTag() throws IOException {
  closeStartTagPending=true;
}
Program: 190737
Project: 190737
Buggy source:
public void endTag(int prefix,String localName) throws IOException {
  write(CLOSE_TAG);
  writeName(prefix,localName);
  write('>');
}

Fixed version (ground truth):
public void endTag(int prefix,String localName) throws IOException {
  if (closeStartTagPending) {
    write(EMPTY_TAG);
    closeStartTagPending=false;
  }
 else {
    write(CLOSE_TAG);
    writeName(prefix,localName);
    write('>');
  }
}
Program: 190738
Project: 190738
Buggy source:
/** 
 * Writes the given byte[] as base64 encoded binary to the output. <p> Being defined on this class allows this method to access the buffer directly, which translates to a better performance.
 */
public void text(byte[] data,int dataLen) throws IOException {
  int start=0;
  while (dataLen > 0) {
    int batchSize=Math.min(((octetBuffer.length - octetBufferIndex) / 4) * 3,dataLen);
    octetBufferIndex=DatatypeConverterImpl._printBase64Binary(data,start,batchSize,octetBuffer,octetBufferIndex);
    if (batchSize < dataLen)     flushBuffer();
    start+=batchSize;
    dataLen-=batchSize;
  }
}

Fixed version (ground truth):
/** 
 * Writes the given byte[] as base64 encoded binary to the output. <p> Being defined on this class allows this method to access the buffer directly, which translates to a better performance.
 */
public void text(byte[] data,int dataLen) throws IOException {
  closeStartTag();
  int start=0;
  while (dataLen > 0) {
    int batchSize=Math.min(((octetBuffer.length - octetBufferIndex) / 4) * 3,dataLen);
    octetBufferIndex=DatatypeConverterImpl._printBase64Binary(data,start,batchSize,octetBuffer,octetBufferIndex);
    if (batchSize < dataLen)     flushBuffer();
    start+=batchSize;
    dataLen-=batchSize;
  }
}
Program: 190739
Project: 190739
Buggy source:
private QName calcXmlName(String uri,String local){
  TODO.checkSpec();
  if (local.length() == 0 || local.equals("String_Node_Str"))   local=seed.getName();
  if (uri.equals("String_Node_Str")) {
    XmlSchema xs=reader().getPackageAnnotation(XmlSchema.class,parent.getClazz(),this);
    if (xs != null) {
switch (xs.elementFormDefault()) {
case QUALIFIED:
        uri=parent.getTypeName().getNamespaceURI();
      if (uri.length() == 0)       uri=parent.builder.defaultNsUri;
    break;
case UNQUALIFIED:
case UNSET:
  uri="String_Node_Str";
}
}
 else {
uri="String_Node_Str";
}
}
return new QName(uri.intern(),local.intern());
}

Fixed version (ground truth):
private QName calcXmlName(String uri,String local){
  TODO.checkSpec();
  if (local.length() == 0 || local.equals("String_Node_Str"))   local=seed.getName();
  if (uri.equals("String_Node_Str")) {
    XmlSchema xs=reader().getPackageAnnotation(XmlSchema.class,parent.getClazz(),this);
    if (xs != null) {
switch (xs.elementFormDefault()) {
case QUALIFIED:
        QName typeName=parent.getTypeName();
      if (typeName != null)       uri=typeName.getNamespaceURI();
 else       uri=xs.namespace();
    if (uri.length() == 0)     uri=parent.builder.defaultNsUri;
  break;
case UNQUALIFIED:
case UNSET:
uri="String_Node_Str";
}
}
 else {
uri="String_Node_Str";
}
}
return new QName(uri.intern(),local.intern());
}
Program: 190740
Project: 190740
Buggy source:
/** 
 * Gets the XML type name of the class.
 * @return null if the object doesn't have an explicit type name (AKA anonymous.)
 */
QName getTypeName();

Fixed version (ground truth):
/** 
 * Gets the primary XML type name of the class. <p> A Java type can be mapped to multiple XML types, but one of them is considered "primary" and used when we generate a schema.
 * @return null if the object doesn't have an explicit type name (AKA anonymous.)
 */
QName getTypeName();
Program: 190741
Project: 190741
Buggy source:
public CompositeStructureBeanInfo(JAXBContextImpl context){
  super(context,null,CompositeStructure.class,null,false,true,false);
}

Fixed version (ground truth):
public CompositeStructureBeanInfo(JAXBContextImpl context){
  super(context,null,CompositeStructure.class,false,true,false);
}
Program: 190744
Project: 190744
Buggy source:
protected JaxBeanInfo(JAXBContextImpl grammar,RuntimeTypeInfo rti,Class<BeanT> jaxbType,QName typeName,boolean isElement,boolean isImmutable,boolean hasLifecycleEvents){
  grammar.beanInfos.put(rti,this);
  this.jaxbType=jaxbType;
  this.typeName=typeName;
  this.flag=(short)((isElement ? FLAG_IS_ELEMENT : 0) | (isImmutable ? FLAG_IS_IMMUTABLE : 0) | (hasLifecycleEvents ? FLAG_HAS_LIFECYCLE_EVENTS : 0));
}

Fixed version (ground truth):
private JaxBeanInfo(JAXBContextImpl grammar,RuntimeTypeInfo rti,Class<BeanT> jaxbType,Object typeName,boolean isElement,boolean isImmutable,boolean hasLifecycleEvents){
  grammar.beanInfos.put(rti,this);
  this.jaxbType=jaxbType;
  this.typeName=typeName;
  this.flag=(short)((isElement ? FLAG_IS_ELEMENT : 0) | (isImmutable ? FLAG_IS_IMMUTABLE : 0) | (hasLifecycleEvents ? FLAG_HAS_LIFECYCLE_EVENTS : 0));
}
Program: 190745
Project: 190745
Buggy source:
public Void onReference(CReferencePropertyInfo p){
  countURI(propUriCountMap,p.getXmlName());
  return null;
}

Fixed version (ground truth):
public Void onReference(CReferencePropertyInfo p){
  for (  CElement e : p.getElements()) {
    countURI(propUriCountMap,e.getElementName());
  }
  return null;
}
Program: 190747
Project: 190747
Buggy source:
/** 
 * pull the uri out of the specified QName and keep track of it in the specified hash map
 * @param qname
 */
private void countURI(HashMap<String,Integer> map,QName qname){
  if (qname == null)   return;
  String uri=qname.getNamespaceURI();
  if (map.containsKey(uri)) {
    map.put(uri,map.get(uri).intValue() + 1);
  }
 else {
    map.put(uri,1);
  }
}

Fixed version (ground truth):
/** 
 * pull the uri out of the specified QName and keep track of it in the specified hash map
 * @param qname
 */
private void countURI(HashMap<String,Integer> map,QName qname){
  if (qname == null)   return;
  String uri=qname.getNamespaceURI();
  if (map.containsKey(uri)) {
    map.put(uri,map.get(uri) + 1);
  }
 else {
    map.put(uri,1);
  }
}
Program: 190748
Project: 190748
Buggy source:
public Void onElement(CElementPropertyInfo p){
  countURI(propUriCountMap,p.getXmlName());
  return null;
}

Fixed version (ground truth):
public Void onElement(CElementPropertyInfo p){
  for (  CTypeRef tr : p.getTypes()) {
    countURI(propUriCountMap,tr.getTagName());
  }
  return null;
}
Program: 190749
Project: 190749
Buggy source:
/** 
 * Calculate the element form defaulting. Compare the most frequently used property URI to the most frequently used element/type URI.  If they match, then return QUALIFIED
 * @return
 */
private XmlNsForm getFormDefault(){
  if (getMostUsedURI(propUriCountMap).equals("String_Node_Str"))   return XmlNsForm.UNQUALIFIED;
 else   return XmlNsForm.QUALIFIED;
}

Fixed version (ground truth):
/** 
 * Calculate the element form defaulting. Compare the most frequently used property URI to the most frequently used element/type URI.  If they match, then return QUALIFIED
 */
private XmlNsForm getFormDefault(){
  if (getMostUsedURI(propUriCountMap).equals("String_Node_Str"))   return XmlNsForm.UNQUALIFIED;
 else   return XmlNsForm.QUALIFIED;
}
Program: 190750
Project: 190750
Buggy source:
/** 
 * Annotate the element property 'field'
 */
private void annotateElement(JAnnotatable field){
  CElementPropertyInfo ep=(CElementPropertyInfo)prop;
  List<CTypeRef> types=ep.getTypes();
  QName eName=ep.getXmlName();
  if (ep.isValueList()) {
    field.annotate(XmlList.class);
  }
  if (eName != null) {
    XmlElementWrapperWriter xcw=field.annotate2(XmlElementWrapperWriter.class);
    xcw.name(eName.getLocalPart()).namespace(eName.getNamespaceURI());
  }
  if (types.size() == 1) {
    CTypeRef t=types.get(0);
    writeXmlElementAnnotation(field,t,resolve(t,IMPLEMENTATION),false);
  }
 else {
    for (    CTypeRef t : types) {
      writeXmlElementAnnotation(field,t,resolve(t,IMPLEMENTATION),true);
    }
    xesw=null;
  }
}

Fixed version (ground truth):
/** 
 * Annotate the element property 'field'
 */
private void annotateElement(JAnnotatable field){
}
Program: 190751
Project: 190751
Buggy source:
/** 
 * XJC never uses the wrapper element. Always return null.
 */
public QName getXmlName(){
  return null;
}

Fixed version (ground truth):
/** 
 * XJC never uses the wrapper element. Always return null.
 */
@Deprecated public QName getXmlName(){
  return null;
}
Program: 190752
Project: 190752
Buggy source:
/** 
 * We'll never use a wrapper element in XJC. Always return null.
 */
public QName getXmlName(){
  return null;
}

Fixed version (ground truth):
/** 
 * We'll never use a wrapper element in XJC. Always return null.
 */
@Deprecated public QName getXmlName(){
  return null;
}
Program: 190753
Project: 190753
Buggy source:
public void complexType(XSComplexType ct){
  getCurrentBean().setBaseClass(selector.bindToType(ct,false));
}

Fixed version (ground truth):
public void complexType(XSComplexType ct){
  CClassInfo ctBean=selector.bindToType(ct,false);
  if (getCurrentBean() != ctBean)   getCurrentBean().setBaseClass(ctBean);
}
Program: 190754
Project: 190754
Buggy source:
public Binding(XSComponent sc,CTypeInfo bean){
  this.sc=sc;
  this.bean=bean;
  if (!(bean instanceof CClassInfo))   built=true;
}

Fixed version (ground truth):
public Binding(XSComponent sc,CTypeInfo bean){
  this.sc=sc;
  this.bean=bean;
}
Program: 190755
Project: 190755
Buggy source:
void build(){
  if (built)   return;
  built=true;
  CClassInfo bean=(CClassInfo)this.bean;
  for (  String reservedClassName : reservedClassNames) {
    if (bean.getName().equals(reservedClassName)) {
      getErrorReporter().error(sc.getLocator(),Messages.ERR_RESERVED_CLASS_NAME,reservedClassName);
      break;
    }
  }
  if (needValueConstructor(sc)) {
    bean.addConstructor("String_Node_Str");
  }
  if (sc instanceof XSElementDecl) {
    XSElementDecl e=(XSElementDecl)sc;
    bean.isRootElement=e.isGlobal();
  }
  if (bean.javadoc == null)   addSchemaFragmentJavadoc(bean,sc);
  if (builder.getGlobalBinding().getFlattenClasses() == LocalScoping.NESTED)   pushClassScope(bean);
 else   pushClassScope(bean.parent());
  XSComponent oldRoot=currentRoot;
  CClassInfo oldBean=currentBean;
  currentRoot=sc;
  currentBean=bean;
  sc.visit(Ring.get(BindRed.class));
  currentBean=oldBean;
  currentRoot=oldRoot;
  popClassScope();
  BIProperty prop=builder.getBindInfo(sc).get(BIProperty.class);
  if (prop != null)   prop.markAsAcknowledged();
}

Fixed version (ground truth):
void build(){
  if (!(this.bean instanceof CClassInfo))   return;
  CClassInfo bean=(CClassInfo)this.bean;
  if (!built.add(bean))   return;
  for (  String reservedClassName : reservedClassNames) {
    if (bean.getName().equals(reservedClassName)) {
      getErrorReporter().error(sc.getLocator(),Messages.ERR_RESERVED_CLASS_NAME,reservedClassName);
      break;
    }
  }
  if (needValueConstructor(sc)) {
    bean.addConstructor("String_Node_Str");
  }
  if (bean.javadoc == null)   addSchemaFragmentJavadoc(bean,sc);
  if (builder.getGlobalBinding().getFlattenClasses() == LocalScoping.NESTED)   pushClassScope(bean);
 else   pushClassScope(bean.parent());
  XSComponent oldRoot=currentRoot;
  CClassInfo oldBean=currentBean;
  currentRoot=sc;
  currentBean=bean;
  sc.visit(Ring.get(BindRed.class));
  currentBean=oldBean;
  currentRoot=oldRoot;
  popClassScope();
  BIProperty prop=builder.getBindInfo(sc).get(BIProperty.class);
  if (prop != null)   prop.markAsAcknowledged();
}