Program: 169050
Project: 169050
Buggy source:
@Test public void testMappingConstructor() throws Exception {
  ViewMetamodel viewMetamodel=getViewMetamodel();
  ViewType<?> viewType=viewMetamodel.view(DocumentViewAbstractClass.class);
  Set<MappingConstructor<?>> constructors=(Set<MappingConstructor<?>>)viewType.getConstructors();
  MappingConstructor<?> constructor=constructors.iterator().next();
  assertNotNull(constructor);
  assertEquals(2,constructor.getParameterAttributes().size());
  assertEquals(Long.class,constructor.getParameterAttributes().get(0).getJavaType());
  assertEquals(constructor,constructor.getParameterAttributes().get(0).getDeclaringConstructor());
  assertEquals(viewType,constructor.getParameterAttributes().get(0).getDeclaringType());
  assertEquals(0,constructor.getParameterAttributes().get(0).getIndex());
  assertFalse(constructor.getParameterAttributes().get(0).isSubquery());
  assertEquals("String_Node_Str",((MappingAttribute)constructor.getParameterAttributes().get(0)).getMapping());
  assertFalse(constructor.getParameterAttributes().get(0).isCollection());
  assertFalse(((SingularAttribute<?,?>)constructor.getParameterAttributes().get(0)).isQueryParameter());
  assertEquals(Integer.class,constructor.getParameterAttributes().get(1).getJavaType());
  assertEquals(constructor,constructor.getParameterAttributes().get(1).getDeclaringConstructor());
  assertEquals(viewType,constructor.getParameterAttributes().get(1).getDeclaringType());
  assertEquals(1,constructor.getParameterAttributes().get(1).getIndex());
  assertFalse(constructor.getParameterAttributes().get(1).isSubquery());
  assertEquals("String_Node_Str",((MappingAttribute)constructor.getParameterAttributes().get(1)).getMapping());
  assertFalse(constructor.getParameterAttributes().get(1).isCollection());
  assertTrue(((SingularAttribute<?,?>)constructor.getParameterAttributes().get(1)).isQueryParameter());
  assertEquals(DocumentViewAbstractClass.class.getConstructor(Long.class,Integer.class),constructor.getJavaConstructor());
  assertEquals(viewType,constructor.getDeclaringType());
}

Fixed version (ground truth):
@Test public void testMappingConstructor() throws Exception {
  ViewMetamodel viewMetamodel=getViewMetamodel();
  ViewType<DocumentViewAbstractClass> viewType=viewMetamodel.view(DocumentViewAbstractClass.class);
  Set<MappingConstructor<DocumentViewAbstractClass>> constructors=viewType.getConstructors();
  MappingConstructor<DocumentViewAbstractClass> constructor=constructors.iterator().next();
  assertNotNull(constructor);
  assertEquals(2,constructor.getParameterAttributes().size());
  assertEquals(Long.class,constructor.getParameterAttributes().get(0).getJavaType());
  assertEquals(constructor,constructor.getParameterAttributes().get(0).getDeclaringConstructor());
  assertEquals(viewType,constructor.getParameterAttributes().get(0).getDeclaringType());
  assertEquals(0,constructor.getParameterAttributes().get(0).getIndex());
  assertFalse(constructor.getParameterAttributes().get(0).isSubquery());
  assertEquals("String_Node_Str",((MappingAttribute)constructor.getParameterAttributes().get(0)).getMapping());
  assertFalse(constructor.getParameterAttributes().get(0).isCollection());
  assertFalse(((SingularAttribute<?,?>)constructor.getParameterAttributes().get(0)).isQueryParameter());
  assertEquals(Integer.class,constructor.getParameterAttributes().get(1).getJavaType());
  assertEquals(constructor,constructor.getParameterAttributes().get(1).getDeclaringConstructor());
  assertEquals(viewType,constructor.getParameterAttributes().get(1).getDeclaringType());
  assertEquals(1,constructor.getParameterAttributes().get(1).getIndex());
  assertFalse(constructor.getParameterAttributes().get(1).isSubquery());
  assertEquals("String_Node_Str",((MappingAttribute)constructor.getParameterAttributes().get(1)).getMapping());
  assertFalse(constructor.getParameterAttributes().get(1).isCollection());
  assertTrue(((SingularAttribute<?,?>)constructor.getParameterAttributes().get(1)).isQueryParameter());
  assertEquals(DocumentViewAbstractClass.class.getConstructor(Long.class,Integer.class),constructor.getJavaConstructor());
  assertEquals(viewType,constructor.getDeclaringType());
}