Program: 59582
Project: 59582
Buggy source:
private void generateToOneNavProperties(List<EdmAssociation.Builder> associations,List<EdmAssociationSet.Builder> associationSets,Map<String,EdmEntityType.Builder> entityTypesByName,Map<String,EdmEntitySet.Builder> entitySetByName,Map<Class<?>,String> entityNameByClass,String entityTypeName,InMemoryEntityInfo<?,?> ei){
  for (  String assocProp : ei.properties.getPropertyNames()) {
    EdmEntityType.Builder eet1=entityTypesByName.get(entityTypeName);
    Class<?> clazz2=ei.properties.getPropertyType(assocProp);
    String eetName2=entityNameByClass.get(clazz2);
    if (eet1.findProperty(assocProp) != null || eetName2 == null)     continue;
    EdmEntityType.Builder eet2=entityTypesByName.get(eetName2);
    EdmMultiplicity m1=EdmMultiplicity.MANY;
    EdmMultiplicity m2=EdmMultiplicity.ONE;
    String assocName=String.format("String_Node_Str",eet1.getName(),eet2.getName());
    EdmAssociationEnd.Builder assocEnd1=EdmAssociationEnd.newBuilder().setRole(eet1.getName()).setType(eet1).setMultiplicity(m1);
    String assocEnd2Name=eet2.getName();
    if (assocEnd2Name.equals(eet1.getName()))     assocEnd2Name=assocEnd2Name + "String_Node_Str";
    EdmAssociationEnd.Builder assocEnd2=EdmAssociationEnd.newBuilder().setRole(assocEnd2Name).setType(eet2).setMultiplicity(m2);
    EdmAssociation.Builder assoc=EdmAssociation.newBuilder().setNamespace(namespace).setName(assocName).setEnds(assocEnd1,assocEnd2);
    associations.add(assoc);
    EdmEntitySet.Builder ees1=entitySetByName.get(eet1.getName());
    EdmEntitySet.Builder ees2=entitySetByName.get(eet2.getName());
    EdmAssociationSet.Builder eas=EdmAssociationSet.newBuilder().setName(assocName).setAssociation(assoc).setEnds(EdmAssociationSetEnd.newBuilder().setRole(assocEnd1).setEntitySet(ees1),EdmAssociationSetEnd.newBuilder().setRole(assocEnd2).setEntitySet(ees2));
    associationSets.add(eas);
    EdmNavigationProperty.Builder np=EdmNavigationProperty.newBuilder(assocProp).setRelationship(assoc).setFromTo(assoc.getEnd1(),assoc.getEnd2());
    eet1.addNavigationProperties(np);
  }
}

Fixed version (ground truth):
private void generateToOneNavProperties(List<EdmAssociation.Builder> associations,List<EdmAssociationSet.Builder> associationSets,Map<String,EdmEntityType.Builder> entityTypesByName,Map<String,EdmEntitySet.Builder> entitySetByName,Map<Class<?>,String> entityNameByClass,String entityTypeName,InMemoryEntityInfo<?> ei){
  for (  String assocProp : ei.properties.getPropertyNames()) {
    EdmEntityType.Builder eet1=entityTypesByName.get(entityTypeName);
    Class<?> clazz2=ei.properties.getPropertyType(assocProp);
    String eetName2=entityNameByClass.get(clazz2);
    if (eet1.findProperty(assocProp) != null || eetName2 == null)     continue;
    EdmEntityType.Builder eet2=entityTypesByName.get(eetName2);
    EdmMultiplicity m1=EdmMultiplicity.MANY;
    EdmMultiplicity m2=EdmMultiplicity.ONE;
    String assocName=String.format("String_Node_Str",eet1.getName(),eet2.getName());
    EdmAssociationEnd.Builder assocEnd1=EdmAssociationEnd.newBuilder().setRole(eet1.getName()).setType(eet1).setMultiplicity(m1);
    String assocEnd2Name=eet2.getName();
    if (assocEnd2Name.equals(eet1.getName()))     assocEnd2Name=assocEnd2Name + "String_Node_Str";
    EdmAssociationEnd.Builder assocEnd2=EdmAssociationEnd.newBuilder().setRole(assocEnd2Name).setType(eet2).setMultiplicity(m2);
    EdmAssociation.Builder assoc=EdmAssociation.newBuilder().setNamespace(namespace).setName(assocName).setEnds(assocEnd1,assocEnd2);
    associations.add(assoc);
    EdmEntitySet.Builder ees1=entitySetByName.get(eet1.getName());
    EdmEntitySet.Builder ees2=entitySetByName.get(eet2.getName());
    EdmAssociationSet.Builder eas=EdmAssociationSet.newBuilder().setName(assocName).setAssociation(assoc).setEnds(EdmAssociationSetEnd.newBuilder().setRole(assocEnd1).setEntitySet(ees1),EdmAssociationSetEnd.newBuilder().setRole(assocEnd2).setEntitySet(ees2));
    associationSets.add(eas);
    EdmNavigationProperty.Builder np=EdmNavigationProperty.newBuilder(assocProp).setRelationship(assoc).setFromTo(assoc.getEnd1(),assoc.getEnd2());
    eet1.addNavigationProperties(np);
  }
}