Program: 34972
Project: 34972
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void build() throws ODataJPAModelException, ODataJPARuntimeException {
  Set<javax.persistence.metamodel.EntityType<?>> jpaEntityTypes=metaModel.getEntities();
  if (jpaEntityTypes == null || jpaEntityTypes.isEmpty() == true) {
    return;
  }
 else   if (consistentEntityTypes == null) {
    consistentEntityTypes=new EntityTypeList<EntityType>();
  }
  for (  javax.persistence.metamodel.EntityType<?> jpaEntityType : jpaEntityTypes) {
    currentEdmEntityType=new EntityType();
    currentJPAEntityType=jpaEntityType;
    if (isExcluded(JPAEdmEntityType.this)) {
      continue;
    }
    JPAEdmNameBuilder.build(JPAEdmEntityType.this);
    JPAEdmMapping jpaEdmMapping=(JPAEdmMapping)currentEdmEntityType.getMapping();
    EntityListeners entityListners=currentJPAEntityType.getJavaType().getAnnotation(EntityListeners.class);
    if (entityListners != null) {
      for (      Class<EntityListeners> entityListner : entityListners.value()) {
        if (ODataJPATombstoneEntityListener.class.isAssignableFrom(entityListner)) {
          jpaEdmMapping.setODataJPATombstoneEntityListener((Class<? extends ODataJPATombstoneEntityListener>)entityListner);
          break;
        }
      }
    }
    JPAEdmPropertyView propertyView=new JPAEdmProperty(schemaView);
    propertyView.getBuilder().build();
    currentEdmEntityType.setProperties(propertyView.getEdmPropertyList());
    if (propertyView.getJPAEdmNavigationPropertyView() != null) {
      JPAEdmNavigationPropertyView navPropView=propertyView.getJPAEdmNavigationPropertyView();
      if (navPropView.getConsistentEdmNavigationProperties() != null && !navPropView.getConsistentEdmNavigationProperties().isEmpty()) {
        currentEdmEntityType.setNavigationProperties(navPropView.getConsistentEdmNavigationProperties());
      }
    }
    JPAEdmKeyView keyView=propertyView.getJPAEdmKeyView();
    currentEdmEntityType.setKey(keyView.getEdmKey());
    consistentEntityTypes.add(currentEdmEntityType);
    consistentEntityTypeMap.put(currentJPAEntityType.getName(),currentEdmEntityType);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void build() throws ODataJPAModelException, ODataJPARuntimeException {
  Set<javax.persistence.metamodel.EntityType<?>> jpaEntityTypes=metaModel.getEntities();
  if (jpaEntityTypes == null || jpaEntityTypes.isEmpty() == true) {
    return;
  }
 else   if (consistentEntityTypes == null) {
    consistentEntityTypes=new EntityTypeList<EntityType>();
  }
  for (  javax.persistence.metamodel.EntityType<?> jpaEntityType : jpaEntityTypes) {
    currentEdmEntityType=new EntityType();
    currentJPAEntityType=jpaEntityType;
    if (isExcluded(JPAEdmEntityType.this)) {
      continue;
    }
    JPAEdmNameBuilder.build(JPAEdmEntityType.this);
    JPAEdmMapping jpaEdmMapping=(JPAEdmMapping)currentEdmEntityType.getMapping();
    EntityListeners entityListners=currentJPAEntityType.getJavaType().getAnnotation(EntityListeners.class);
    if (entityListners != null) {
      for (      Class<EntityListeners> entityListner : entityListners.value()) {
        if (ODataJPATombstoneEntityListener.class.isAssignableFrom(entityListner)) {
          jpaEdmMapping.setODataJPATombstoneEntityListener((Class<? extends ODataJPATombstoneEntityListener>)(Object)entityListner);
          break;
        }
      }
    }
    JPAEdmPropertyView propertyView=new JPAEdmProperty(schemaView);
    propertyView.getBuilder().build();
    currentEdmEntityType.setProperties(propertyView.getEdmPropertyList());
    if (propertyView.getJPAEdmNavigationPropertyView() != null) {
      JPAEdmNavigationPropertyView navPropView=propertyView.getJPAEdmNavigationPropertyView();
      if (navPropView.getConsistentEdmNavigationProperties() != null && !navPropView.getConsistentEdmNavigationProperties().isEmpty()) {
        currentEdmEntityType.setNavigationProperties(navPropView.getConsistentEdmNavigationProperties());
      }
    }
    JPAEdmKeyView keyView=propertyView.getJPAEdmKeyView();
    currentEdmEntityType.setKey(keyView.getEdmKey());
    consistentEntityTypes.add(currentEdmEntityType);
    consistentEntityTypeMap.put(currentJPAEntityType.getName(),currentEdmEntityType);
  }
}