Program: 33217
Project: 33217
Buggy source:
private void readEntityContainer(XMLEventReader reader,StartElement element,CsdlSchema schema) throws XMLStreamException {
  final CsdlEntityContainer container=new CsdlEntityContainer();
  container.setName(attr(element,"String_Node_Str"));
  if (attr(element,"String_Node_Str") != null) {
    container.setExtendsContainer(attr(element,"String_Node_Str"));
  }
  container.setActionImports(new ArrayList<CsdlActionImport>());
  container.setFunctionImports(new ArrayList<CsdlFunctionImport>());
  container.setEntitySets(new ArrayList<CsdlEntitySet>());
  container.setSingletons(new ArrayList<CsdlSingleton>());
  new ElementReader<CsdlSchema>(){
    @Override void build(    XMLEventReader reader,    StartElement element,    CsdlSchema schema,    String name) throws XMLStreamException {
      if (name.equals("String_Node_Str")) {
        readEntitySet(reader,element,container);
      }
 else       if (name.equals("String_Node_Str")) {
        readSingleton(reader,element,container);
      }
 else       if (name.equals("String_Node_Str")) {
        readActionImport(element,container);
      }
 else       if (name.equals("String_Node_Str")) {
        readFunctionImport(element,container);
      }
    }
    private void readFunctionImport(    StartElement element,    CsdlEntityContainer container){
      CsdlFunctionImport functionImport=new CsdlFunctionImport();
      functionImport.setName(attr(element,"String_Node_Str"));
      functionImport.setFunction(new FullQualifiedName(attr(element,"String_Node_Str")));
      functionImport.setIncludeInServiceDocument(Boolean.parseBoolean(attr(element,"String_Node_Str")));
      String entitySet=attr(element,"String_Node_Str");
      if (entitySet != null) {
        functionImport.setEntitySet(entitySet);
      }
      container.getFunctionImports().add(functionImport);
    }
    private void readActionImport(    StartElement element,    CsdlEntityContainer container){
      CsdlActionImport actionImport=new CsdlActionImport();
      actionImport.setName(attr(element,"String_Node_Str"));
      actionImport.setAction(new FullQualifiedName(attr(element,"String_Node_Str")));
      String entitySet=attr(element,"String_Node_Str");
      if (entitySet != null) {
        actionImport.setEntitySet(entitySet);
      }
      container.getActionImports().add(actionImport);
    }
    private void readSingleton(    XMLEventReader reader,    StartElement element,    CsdlEntityContainer container) throws XMLStreamException {
      CsdlSingleton singleton=new CsdlSingleton();
      singleton.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>());
      singleton.setName(attr(element,"String_Node_Str"));
      singleton.setType(new FullQualifiedName(attr(element,"String_Node_Str")));
      singleton.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>());
      readNavigationPropertyBindings(reader,element,singleton.getNavigationPropertyBindings());
      container.getSingletons().add(singleton);
    }
    private void readEntitySet(    XMLEventReader reader,    StartElement element,    CsdlEntityContainer container) throws XMLStreamException {
      CsdlEntitySet entitySet=new CsdlEntitySet();
      entitySet.setName(attr(element,"String_Node_Str"));
      entitySet.setType(new FullQualifiedName(attr(element,"String_Node_Str")));
      entitySet.setIncludeInServiceDocument(Boolean.parseBoolean(attr(element,"String_Node_Str")));
      entitySet.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>());
      readNavigationPropertyBindings(reader,element,entitySet.getNavigationPropertyBindings());
      container.getEntitySets().add(entitySet);
    }
    private void readNavigationPropertyBindings(    XMLEventReader reader,    StartElement element,    List<CsdlNavigationPropertyBinding> bindings) throws XMLStreamException {
      new ElementReader<List<CsdlNavigationPropertyBinding>>(){
        @Override void build(        XMLEventReader reader,        StartElement element,        List<CsdlNavigationPropertyBinding> bindings,        String name) throws XMLStreamException {
          CsdlNavigationPropertyBinding binding=new CsdlNavigationPropertyBinding();
          binding.setPath(attr(element,"String_Node_Str"));
          binding.setTarget(attr(element,"String_Node_Str"));
          bindings.add(binding);
        }
      }
.read(reader,element,bindings,"String_Node_Str");
      ;
    }
  }
.read(reader,element,schema,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  schema.setEntityContainer(container);
}

Fixed version (ground truth):
private void readEntityContainer(XMLEventReader reader,StartElement element,CsdlSchema schema) throws XMLStreamException {
  final CsdlEntityContainer container=new CsdlEntityContainer();
  container.setName(attr(element,"String_Node_Str"));
  if (attr(element,"String_Node_Str") != null) {
    container.setExtendsContainer(attr(element,"String_Node_Str"));
  }
  container.setActionImports(new ArrayList<CsdlActionImport>());
  container.setFunctionImports(new ArrayList<CsdlFunctionImport>());
  container.setEntitySets(new ArrayList<CsdlEntitySet>());
  container.setSingletons(new ArrayList<CsdlSingleton>());
  new ElementReader<CsdlSchema>(){
    @Override void build(    XMLEventReader reader,    StartElement element,    CsdlSchema schema,    String name) throws XMLStreamException {
      if (name.equals("String_Node_Str")) {
        readEntitySet(reader,element,container);
      }
 else       if (name.equals("String_Node_Str")) {
        readSingleton(reader,element,container);
      }
 else       if (name.equals("String_Node_Str")) {
        readActionImport(element,container);
      }
 else       if (name.equals("String_Node_Str")) {
        readFunctionImport(element,container);
      }
    }
    private void readFunctionImport(    StartElement element,    CsdlEntityContainer container){
      CsdlFunctionImport functionImport=new CsdlFunctionImport();
      functionImport.setName(attr(element,"String_Node_Str"));
      functionImport.setFunction(new FullQualifiedName(attr(element,"String_Node_Str")));
      functionImport.setIncludeInServiceDocument(Boolean.parseBoolean(attr(element,"String_Node_Str")));
      String entitySet=attr(element,"String_Node_Str");
      if (entitySet != null) {
        functionImport.setEntitySet(entitySet);
      }
      container.getFunctionImports().add(functionImport);
    }
    private void readActionImport(    StartElement element,    CsdlEntityContainer container){
      CsdlActionImport actionImport=new CsdlActionImport();
      actionImport.setName(attr(element,"String_Node_Str"));
      actionImport.setAction(new FullQualifiedName(attr(element,"String_Node_Str")));
      String entitySet=attr(element,"String_Node_Str");
      if (entitySet != null) {
        actionImport.setEntitySet(entitySet);
      }
      container.getActionImports().add(actionImport);
    }
    private void readSingleton(    XMLEventReader reader,    StartElement element,    CsdlEntityContainer container) throws XMLStreamException {
      CsdlSingleton singleton=new CsdlSingleton();
      singleton.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>());
      singleton.setName(attr(element,"String_Node_Str"));
      singleton.setType(new FullQualifiedName(attr(element,"String_Node_Str")));
      singleton.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>());
      readNavigationPropertyBindings(reader,element,singleton.getNavigationPropertyBindings());
      container.getSingletons().add(singleton);
    }
    private void readEntitySet(    XMLEventReader reader,    StartElement element,    CsdlEntityContainer container) throws XMLStreamException {
      CsdlEntitySet entitySet=new CsdlEntitySet();
      entitySet.setName(attr(element,"String_Node_Str"));
      entitySet.setType(new FullQualifiedName(attr(element,"String_Node_Str")));
      entitySet.setIncludeInServiceDocument(Boolean.parseBoolean(attr(element,"String_Node_Str")));
      entitySet.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>());
      readNavigationPropertyBindings(reader,element,entitySet.getNavigationPropertyBindings());
      container.getEntitySets().add(entitySet);
    }
    private void readNavigationPropertyBindings(    XMLEventReader reader,    StartElement element,    List<CsdlNavigationPropertyBinding> bindings) throws XMLStreamException {
      new ElementReader<List<CsdlNavigationPropertyBinding>>(){
        @Override void build(        XMLEventReader reader,        StartElement element,        List<CsdlNavigationPropertyBinding> bindings,        String name) throws XMLStreamException {
          CsdlNavigationPropertyBinding binding=new CsdlNavigationPropertyBinding();
          binding.setPath(attr(element,"String_Node_Str"));
          binding.setTarget(attr(element,"String_Node_Str"));
          bindings.add(binding);
        }
      }
.read(reader,element,bindings,"String_Node_Str");
    }
  }
.read(reader,element,schema,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  schema.setEntityContainer(container);
}