Program: 177228
Project: 177228
Buggy source:
@Override protected EnunciateFreemarkerModel getRootModel() throws TemplateModelException {
  EnunciateFreemarkerModel model=(EnunciateFreemarkerModel)super.getRootModel();
  model.put("String_Node_Str",new PrefixMethod());
  model.put("String_Node_Str",new QNameMethod());
  AnnotationProcessorEnvironment env=Context.getCurrentEnvironment();
  Collection<TypeDeclaration> typeDeclarations=env.getTypeDeclarations();
  for (  TypeDeclaration declaration : typeDeclarations) {
    if (isEndpointInterface(declaration)) {
      EndpointInterface endpointInterface=new EndpointInterface(declaration);
      if (isVerbose()) {
        System.out.println(declaration.getQualifiedName() + "String_Node_Str");
      }
      model.add(endpointInterface);
    }
 else     if (isPotentialSchemaType(declaration)) {
      TypeDefinition typeDef=createTypeDefinition((ClassDeclaration)declaration);
      if (typeDef != null) {
        if (isVerbose()) {
          System.out.println(String.format("String_Node_Str",declaration.getQualifiedName(),typeDef.getClass().getSimpleName(),typeDef.getTargetNamespace(),typeDef.getName()));
        }
        model.add(typeDef);
        RootElementDeclaration rootElement=createRootElementDeclaration((ClassDeclaration)declaration,typeDef);
        if (rootElement != null) {
          if (isVerbose()) {
            System.out.println(declaration.getQualifiedName() + "String_Node_Str");
          }
          model.add(rootElement);
        }
      }
    }
  }
  Validator validator=new DefaultValidator();
  ValidationResult validationResult=validate(model,validator);
  if (validationResult.hasWarnings()) {
    for (    ValidationMessage warning : validationResult.getWarnings()) {
      env.getMessager().printWarning(warning.getPosition(),warning.getText());
    }
  }
  if (validationResult.hasErrors()) {
    for (    ValidationMessage error : validationResult.getErrors()) {
      env.getMessager().printError(error.getPosition(),error.getText());
    }
    throw new ModelValidationException();
  }
  return model;
}

Fixed version (ground truth):
@Override protected EnunciateFreemarkerModel getRootModel() throws TemplateModelException {
  EnunciateFreemarkerModel model=(EnunciateFreemarkerModel)super.getRootModel();
  model.put("String_Node_Str",new PrefixMethod());
  model.put("String_Node_Str",new QNameMethod());
  AnnotationProcessorEnvironment env=Context.getCurrentEnvironment();
  Collection<TypeDeclaration> typeDeclarations=env.getTypeDeclarations();
  for (  TypeDeclaration declaration : typeDeclarations) {
    if (isEndpointInterface(declaration)) {
      EndpointInterface endpointInterface=new EndpointInterface(declaration);
      if (isVerbose()) {
        System.out.println(declaration.getQualifiedName() + "String_Node_Str");
      }
      model.add(endpointInterface);
    }
 else     if (isPotentialSchemaType(declaration)) {
      TypeDefinition typeDef=createTypeDefinition((ClassDeclaration)declaration);
      if (typeDef != null) {
        if (isVerbose()) {
          System.out.println(String.format("String_Node_Str",declaration.getQualifiedName(),typeDef.getClass().getSimpleName(),typeDef.getTargetNamespace() == null ? "String_Node_Str" : typeDef.getTargetNamespace(),typeDef.getName()));
        }
        model.add(typeDef);
        RootElementDeclaration rootElement=createRootElementDeclaration((ClassDeclaration)declaration,typeDef);
        if (rootElement != null) {
          if (isVerbose()) {
            System.out.println(declaration.getQualifiedName() + "String_Node_Str");
          }
          model.add(rootElement);
        }
      }
    }
  }
  Validator validator=new DefaultValidator();
  ValidationResult validationResult=validate(model,validator);
  if (validationResult.hasWarnings()) {
    for (    ValidationMessage warning : validationResult.getWarnings()) {
      env.getMessager().printWarning(warning.getPosition(),warning.getText());
    }
  }
  if (validationResult.hasErrors()) {
    for (    ValidationMessage error : validationResult.getErrors()) {
      env.getMessager().printError(error.getPosition(),error.getText());
    }
    throw new ModelValidationException();
  }
  return model;
}