Program: 34994
Project: 34994
Buggy source:
@Test public void testFunctionImport() throws XMLStreamException, EntityProviderException {
  final String xmWithEntityContainer="String_Node_Str" + Edm.NAMESPACE_EDMX_2007_06 + "String_Node_Str"+ "String_Node_Str"+ Edm.NAMESPACE_M_2007_08+ "String_Node_Str"+ "String_Node_Str"+ NAMESPACE+ "String_Node_Str"+ Edm.NAMESPACE_EDM_2008_09+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ propertyNames[0]+ "String_Node_Str"+ "String_Node_Str"+ propertyNames[1]+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  XmlMetadataConsumer parser=new XmlMetadataConsumer();
  XMLStreamReader reader=createStreamReader(xmWithEntityContainer);
  DataServices result=parser.readMetadata(reader,true);
  for (  Schema schema : result.getSchemas()) {
    for (    EntityContainer container : schema.getEntityContainers()) {
      assertEquals("String_Node_Str",container.getName());
      assertEquals(Boolean.TRUE,container.isDefaultEntityContainer());
      for (      FunctionImport functionImport : container.getFunctionImports()) {
        assertEquals("String_Node_Str",functionImport.getName());
        assertEquals("String_Node_Str",functionImport.getEntitySet());
        assertEquals(NAMESPACE,functionImport.getReturnType().getTypeName().getNamespace());
        assertEquals("String_Node_Str",functionImport.getReturnType().getTypeName().getName());
        assertEquals(EdmMultiplicity.MANY,functionImport.getReturnType().getMultiplicity());
        assertEquals("String_Node_Str",functionImport.getHttpMethod());
        for (        FunctionImportParameter parameter : functionImport.getParameters()) {
          assertEquals("String_Node_Str",parameter.getName());
          assertEquals(EdmSimpleTypeKind.String,parameter.getType());
          assertEquals(Boolean.TRUE,parameter.getFacets().isNullable());
        }
      }
    }
  }
}

Fixed version (ground truth):
@Test public void testFunctionImport() throws XMLStreamException, EntityProviderException {
  final String xmWithEntityContainer="String_Node_Str" + Edm.NAMESPACE_EDMX_2007_06 + "String_Node_Str"+ "String_Node_Str"+ Edm.NAMESPACE_M_2007_08+ "String_Node_Str"+ "String_Node_Str"+ NAMESPACE+ "String_Node_Str"+ Edm.NAMESPACE_EDM_2008_09+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ propertyNames[0]+ "String_Node_Str"+ "String_Node_Str"+ propertyNames[1]+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  XmlMetadataConsumer parser=new XmlMetadataConsumer();
  XMLStreamReader reader=createStreamReader(xmWithEntityContainer);
  DataServices result=parser.readMetadata(reader,true);
  for (  Schema schema : result.getSchemas()) {
    for (    EntityContainer container : schema.getEntityContainers()) {
      assertEquals("String_Node_Str",container.getName());
      assertEquals(Boolean.TRUE,container.isDefaultEntityContainer());
      assertEquals(2,container.getFunctionImports().size());
      FunctionImport functionImport1=container.getFunctionImports().get(0);
      assertEquals("String_Node_Str",functionImport1.getName());
      assertEquals("String_Node_Str",functionImport1.getEntitySet());
      assertEquals(NAMESPACE,functionImport1.getReturnType().getTypeName().getNamespace());
      assertEquals("String_Node_Str",functionImport1.getReturnType().getTypeName().getName());
      assertEquals(EdmMultiplicity.MANY,functionImport1.getReturnType().getMultiplicity());
      assertEquals("String_Node_Str",functionImport1.getHttpMethod());
      assertEquals(2,functionImport1.getParameters().size());
      assertEquals("String_Node_Str",functionImport1.getParameters().get(0).getName());
      assertEquals(EdmSimpleTypeKind.String,functionImport1.getParameters().get(0).getType());
      assertEquals(Boolean.TRUE,functionImport1.getParameters().get(0).getFacets().isNullable());
      assertEquals("String_Node_Str",functionImport1.getParameters().get(1).getName());
      assertEquals(EdmSimpleTypeKind.Int32,functionImport1.getParameters().get(1).getType());
      assertEquals(Boolean.FALSE,functionImport1.getParameters().get(1).getFacets().isNullable());
      FunctionImport functionImport2=container.getFunctionImports().get(1);
      assertEquals("String_Node_Str",functionImport2.getName());
      assertEquals("String_Node_Str",functionImport2.getEntitySet());
      assertEquals(NAMESPACE,functionImport2.getReturnType().getTypeName().getNamespace());
      assertEquals("String_Node_Str",functionImport2.getReturnType().getTypeName().getName());
      assertEquals(EdmMultiplicity.MANY,functionImport2.getReturnType().getMultiplicity());
      assertEquals("String_Node_Str",functionImport2.getHttpMethod());
      assertEquals(2,functionImport2.getParameters().size());
      assertEquals("String_Node_Str",functionImport2.getParameters().get(0).getName());
      assertEquals(EdmSimpleTypeKind.String,functionImport2.getParameters().get(0).getType());
      assertEquals(Boolean.TRUE,functionImport2.getParameters().get(0).getFacets().isNullable());
      assertEquals("String_Node_Str",functionImport2.getParameters().get(1).getName());
      assertEquals(EdmSimpleTypeKind.Int32,functionImport2.getParameters().get(1).getType());
      assertEquals(Boolean.FALSE,functionImport2.getParameters().get(1).getFacets().isNullable());
    }
  }
}