Program: 59397
Project: 59397
Buggy source:
/** 
 * Return an instance of the Metadata offered by this add-on
 */
protected ItdTypeDetailsProvidingMetadataItem getMetadata(String metadataIdentificationString,JavaType aspectName,PhysicalTypeMetadata governorPhysicalTypeMetadata,String itdFilename){
  final JpaAuditAnnotationValues annotationValues=new JpaAuditAnnotationValues(governorPhysicalTypeMetadata);
  RevisionLogProvider logProvider=operations.getActiveRevisionLogProvider();
  JavaType entity=JpaAuditMetadata.getJavaType(metadataIdentificationString);
  LogicalPath entityPath=JpaAuditMetadata.getPath(metadataIdentificationString);
  String jpaMetadataId=JpaActiveRecordMetadata.createIdentifier(entity,entityPath);
  JpaActiveRecordMetadata jpaMetadata=(JpaActiveRecordMetadata)metadataService.get(jpaMetadataId);
  List<FieldMetadata> identifiers=persistenceMemberLocator.getIdentifierFields(entity);
  String plural=jpaMetadata.getPlural();
  RevisionLogMetadataBuilder revisionLogBuilder=null;
  if (logProvider == null) {
    if (annotationValues.getStoreRevisionLog() == StoreRevisionLog.YES) {
      LOGGER.warning(governorPhysicalTypeMetadata.getType().getSimpleTypeName().concat("String_Node_Str"));
    }
  }
 else {
    boolean useRevisionLog=false;
    if (annotationValues.getStoreRevisionLog() == null || annotationValues.getStoreRevisionLog() == StoreRevisionLog.PROVIDER_DEFAULT) {
      useRevisionLog=logProvider.getDefaultValueOfRevisionLogAttribute();
    }
 else     if (annotationValues.getStoreRevisionLog() == StoreRevisionLog.YES) {
      useRevisionLog=true;
    }
    if (useRevisionLog) {
      revisionLogBuilder=logProvider.getMetadataBuilder(governorPhysicalTypeMetadata);
    }
  }
  return new JpaAuditMetadata(metadataIdentificationString,aspectName,governorPhysicalTypeMetadata,annotationValues,plural,revisionLogBuilder,identifiers);
}

Fixed version (ground truth):
/** 
 * Return an instance of the Metadata offered by this add-on
 */
protected ItdTypeDetailsProvidingMetadataItem getMetadata(String metadataIdentificationString,JavaType aspectName,PhysicalTypeMetadata governorPhysicalTypeMetadata,String itdFilename){
  final JpaAuditAnnotationValues annotationValues=new JpaAuditAnnotationValues(governorPhysicalTypeMetadata);
  RevisionLogProvider logProvider=operations.getActiveRevisionLogProvider();
  JavaType entity=JpaAuditMetadata.getJavaType(metadataIdentificationString);
  LogicalPath entityPath=JpaAuditMetadata.getPath(metadataIdentificationString);
  String jpaMetadataId=JpaActiveRecordMetadata.createIdentifier(entity,entityPath);
  metadataDependencyRegistry.registerDependency(jpaMetadataId,metadataIdentificationString);
  JpaActiveRecordMetadata jpaMetadata=(JpaActiveRecordMetadata)metadataService.get(jpaMetadataId);
  if (jpaMetadata == null) {
    return null;
  }
  List<FieldMetadata> identifiers=persistenceMemberLocator.getIdentifierFields(entity);
  if (identifiers == null || identifiers.isEmpty()) {
    return null;
  }
  String plural=jpaMetadata.getPlural();
  RevisionLogMetadataBuilder revisionLogBuilder=null;
  if (logProvider == null) {
    if (annotationValues.getStoreRevisionLog() == StoreRevisionLog.YES) {
      LOGGER.warning(governorPhysicalTypeMetadata.getType().getSimpleTypeName().concat("String_Node_Str"));
    }
  }
 else {
    boolean useRevisionLog=false;
    if (annotationValues.getStoreRevisionLog() == null || annotationValues.getStoreRevisionLog() == StoreRevisionLog.PROVIDER_DEFAULT) {
      useRevisionLog=logProvider.getDefaultValueOfRevisionLogAttribute();
    }
 else     if (annotationValues.getStoreRevisionLog() == StoreRevisionLog.YES) {
      useRevisionLog=true;
    }
    if (useRevisionLog) {
      revisionLogBuilder=logProvider.getMetadataBuilder(governorPhysicalTypeMetadata);
    }
  }
  return new JpaAuditMetadata(metadataIdentificationString,aspectName,governorPhysicalTypeMetadata,annotationValues,plural,revisionLogBuilder,identifiers);
}