Program: 177200
Project: 177200
Buggy source:
/** 
 * tests the initialization of the application context.
 */
public void testInitApplicationContext() throws Exception {
  RESTResourceFactory factory=new RESTResourceFactory();
  factory.setEndpointClasses(new Class[]{EndpointOneImpl.class,EndpointTwo.class,EndpointThreeImpl.class});
  factory.setApplicationContext(new GenericWebApplicationContext());
  String[] nouns={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  ArrayList<RESTResource> resources=new ArrayList<RESTResource>(factory.getRESTResources());
  for (  String noun : nouns) {
    String context="String_Node_Str";
    if (("String_Node_Str".equals(noun)) || ("String_Node_Str".equals(noun))) {
      context="String_Node_Str";
    }
 else     if ("String_Node_Str".equals(noun)) {
      context="String_Node_Str";
    }
    RESTResource resource=factory.getRESTResource(context,noun);
    assertNotNull(resource);
    for (    VerbType verbType : VerbType.values()) {
      RESTOperation operation=resource.getOperation(verbType);
      assertNotNull(resource.toString() + "String_Node_Str" + verbType+ "String_Node_Str",operation);
    }
    resources.remove(resource);
  }
  assertTrue(resources.isEmpty());
  final ProxyFactoryBean advisedEndpoint=new ProxyFactoryBean();
  advisedEndpoint.setTarget(new EndpointOneImpl());
  advisedEndpoint.setProxyInterfaces(new String[]{"String_Node_Str"});
  factory=new RESTResourceFactory();
  GenericWebApplicationContext ctx=new GenericWebApplicationContext(){
    @Override public Map getBeansOfType(    Class aClass) throws BeansException {
      if (org.codehaus.enunciate.modules.rest.EndpointOne.class.equals(aClass)) {
        HashMap<String,Object> beansOfType=new HashMap<String,Object>();
        beansOfType.put("String_Node_Str",advisedEndpoint);
        return beansOfType;
      }
      return super.getBeansOfType(aClass);
    }
  }
;
  factory.setEndpointClasses(new Class[]{EndpointOneImpl.class});
  factory.setApplicationContext(ctx);
  nouns=new String[]{"String_Node_Str","String_Node_Str"};
  resources=new ArrayList<RESTResource>(factory.getRESTResources());
  for (  String noun : nouns) {
    String context="String_Node_Str";
    if (("String_Node_Str".equals(noun)) || ("String_Node_Str".equals(noun))) {
      context="String_Node_Str";
    }
 else     if ("String_Node_Str".equals(noun)) {
      context="String_Node_Str";
    }
    RESTResource resource=factory.getRESTResource(context,noun);
    assertNotNull(resource);
    for (    VerbType verbType : VerbType.values()) {
      RESTOperation operation=resource.getOperation(verbType);
      assertSame(advisedEndpoint,operation.getEndpoint());
      assertNotNull(operation);
    }
    resources.remove(resource);
  }
  assertTrue(resources.isEmpty());
}

Fixed version (ground truth):
/** 
 * tests the initialization of the application context.
 */
public void testInitApplicationContext() throws Exception {
  RESTResourceFactory factory=new RESTResourceFactory();
  factory.setEndpointClasses(new Class[]{EndpointOneImpl.class,EndpointTwo.class,EndpointThreeImpl.class});
  factory.setApplicationContext(new GenericWebApplicationContext());
  String[] nouns={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  ArrayList<RESTResource> resources=new ArrayList<RESTResource>(factory.getRESTResources());
  for (  String noun : nouns) {
    String context="String_Node_Str";
    if (("String_Node_Str".equals(noun)) || ("String_Node_Str".equals(noun))) {
      context="String_Node_Str";
    }
 else     if ("String_Node_Str".equals(noun)) {
      context="String_Node_Str";
    }
    RESTResource resource=factory.getRESTResource(noun,context);
    assertNotNull(resource);
    for (    VerbType verbType : VerbType.values()) {
      RESTOperation operation=resource.getOperation(verbType);
      assertNotNull(resource.toString() + "String_Node_Str" + verbType+ "String_Node_Str",operation);
    }
    resources.remove(resource);
  }
  assertTrue(resources.isEmpty());
  final ProxyFactoryBean advisedEndpoint=new ProxyFactoryBean();
  advisedEndpoint.setTarget(new EndpointOneImpl());
  advisedEndpoint.setProxyInterfaces(new String[]{"String_Node_Str"});
  factory=new RESTResourceFactory();
  GenericWebApplicationContext ctx=new GenericWebApplicationContext(){
    @Override public Map getBeansOfType(    Class aClass) throws BeansException {
      if (org.codehaus.enunciate.modules.rest.EndpointOne.class.equals(aClass)) {
        HashMap<String,Object> beansOfType=new HashMap<String,Object>();
        beansOfType.put("String_Node_Str",advisedEndpoint);
        return beansOfType;
      }
      return super.getBeansOfType(aClass);
    }
  }
;
  factory.setEndpointClasses(new Class[]{EndpointOneImpl.class});
  factory.setApplicationContext(ctx);
  nouns=new String[]{"String_Node_Str","String_Node_Str"};
  resources=new ArrayList<RESTResource>(factory.getRESTResources());
  for (  String noun : nouns) {
    String context="String_Node_Str";
    if (("String_Node_Str".equals(noun)) || ("String_Node_Str".equals(noun))) {
      context="String_Node_Str";
    }
 else     if ("String_Node_Str".equals(noun)) {
      context="String_Node_Str";
    }
    RESTResource resource=factory.getRESTResource(noun,context);
    assertNotNull(resource);
    for (    VerbType verbType : VerbType.values()) {
      RESTOperation operation=resource.getOperation(verbType);
      assertSame(advisedEndpoint,operation.getEndpoint());
      assertNotNull(operation);
    }
    resources.remove(resource);
  }
  assertTrue(resources.isEmpty());
}