Program: 20518
Project: 20518
Buggy source:
@Test public void build_simple_response() throws Exception {
  RamlV10.buildResourceV10(this,"String_Node_Str",new CodeContainer<TypeSpec>(){
    @Override public void into(    TypeSpec g) throws IOException {
      assertEquals("String_Node_Str",g.name);
      assertEquals(1,g.methodSpecs.size());
      MethodSpec methodSpec=g.methodSpecs.get(0);
      assertEquals("String_Node_Str",methodSpec.name);
      assertEquals(ClassName.get("String_Node_Str","String_Node_Str"),methodSpec.returnType);
      assertEquals(1,g.typeSpecs.size());
      AnnotationSpec mediaTypeSpec=methodSpec.annotations.get(1);
      assertEquals(ClassName.get(Produces.class),mediaTypeSpec.type);
      assertEquals(1,mediaTypeSpec.members.get("String_Node_Str").size());
      assertEquals("String_Node_Str",mediaTypeSpec.members.get("String_Node_Str").get(0).toString());
      TypeSpec response=g.typeSpecs.get(0);
      assertEquals("String_Node_Str",response.name);
      assertEquals(3,response.methodSpecs.size());
      assertTrue(response.methodSpecs.get(0).isConstructor());
      assertTrue(response.methodSpecs.get(1).isConstructor());
      MethodSpec responseMethod=response.methodSpecs.get(2);
      assertEquals("String_Node_Str",responseMethod.name);
      assertEquals("String_Node_Str",responseMethod.parameters.get(0).type.toString());
      assertTrue(responseMethod.hasModifier(Modifier.PUBLIC));
      assertTrue(responseMethod.hasModifier(Modifier.STATIC));
      assertTrue(responseMethod.code.toString().contains("String_Node_Str"));
    }
  }
,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test public void build_simple_response() throws Exception {
  RamlV10.buildResourceV10(this,"String_Node_Str",new CodeContainer<TypeSpec>(){
    @Override public void into(    TypeSpec g) throws IOException {
      assertEquals("String_Node_Str",g.name);
      assertEquals(1,g.methodSpecs.size());
      MethodSpec methodSpec=g.methodSpecs.get(0);
      assertEquals("String_Node_Str",methodSpec.name);
      assertEquals(ClassName.get("String_Node_Str","String_Node_Str"),methodSpec.returnType);
      assertEquals(1,g.typeSpecs.size());
      assertEquals(2,methodSpec.annotations.size());
      AnnotationSpec mediaTypeSpec=methodSpec.annotations.get(1);
      assertEquals(ClassName.get(Produces.class),mediaTypeSpec.type);
      assertEquals(1,mediaTypeSpec.members.get("String_Node_Str").size());
      assertEquals("String_Node_Str",mediaTypeSpec.members.get("String_Node_Str").get(0).toString());
      TypeSpec response=g.typeSpecs.get(0);
      assertEquals("String_Node_Str",response.name);
      assertEquals(3,response.methodSpecs.size());
      assertTrue(response.methodSpecs.get(0).isConstructor());
      assertTrue(response.methodSpecs.get(1).isConstructor());
      MethodSpec responseMethod=response.methodSpecs.get(2);
      assertEquals("String_Node_Str",responseMethod.name);
      assertEquals("String_Node_Str",responseMethod.parameters.get(0).type.toString());
      assertTrue(responseMethod.hasModifier(Modifier.PUBLIC));
      assertTrue(responseMethod.hasModifier(Modifier.STATIC));
      assertTrue(responseMethod.code.toString().contains("String_Node_Str"));
    }
  }
,"String_Node_Str","String_Node_Str");
}