Buggy code:
public class PersistenceUnitDeploymentProcessor implements DeploymentUnitProcessor { public static final String JNDI_PROPERTY = "jboss.entity.manager.factory.jndi.name" ; private static final AttachmentKey < Map < String , PersistenceProviderAdaptor > > providerAdaptorMapKey = AttachmentKey . create ( Map . class ) ; private final PersistenceUnitRegistryImpl persistenceUnitRegistry ; public PersistenceUnitDeploymentProcessor ( final PersistenceUnitRegistryImpl persistenceUnitRegistry ) { } @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } @ Override public void undeploy ( DeploymentUnit context ) { } private void handleJarDeployment ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void handleWarDeployment ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void handleEarDeployment ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void addPuService ( DeploymentPhaseContext phaseContext , ArrayList < PersistenceUnitMetadataHolder > puList ) throws DeploymentUnitProcessingException { } private void setAnnotationIndexes ( final PersistenceUnitMetadataHolder puHolder , DeploymentUnit deploymentUnit ) { } private String adjustJndi ( String dataSourceName ) { } private PersistenceProviderAdaptor getPersistenceProviderAdaptor ( final PersistenceUnitMetadata pu , final PersistenceProviderDeploymentHolder persistenceProviderDeploymentHolder , final DeploymentUnit deploymentUnit ) throws DeploymentUnitProcessingException { } private PersistenceProviderAdaptor savePerDeploymentSharedPersistenceProviderAdaptor ( DeploymentUnit deploymentUnit , String adaptorModule , PersistenceProviderAdaptor adaptor ) { } private PersistenceProviderAdaptor getPerDeploymentSharedPersistenceProviderAdaptor ( DeploymentUnit deploymentUnit , String adaptorModule ) { } private PersistenceProvider lookupProvider ( PersistenceUnitMetadata pu ) throws DeploymentUnitProcessingException { } private PersistenceProvider getProviderByName ( PersistenceUnitMetadata pu , String persistenceProviderModule ) { } private boolean isHibernate3 ( PersistenceProvider provider ) { boolean result = false ; try { Class targetCls = provider . getClass ( ) . getClassLoader ( ) . loadClass ( "org.hibernate.Version" ) ; Method m = targetCls . getMethod ( "getVersionString" ) ; <START_BUG> Object version = m . invoke ( null , null ) ; <END_BUG> JpaLogger . JPA_LOGGER . tracef ( "lookup<seq2seq4repair_space>provider<seq2seq4repair_space>checking<seq2seq4repair_space>provider<seq2seq4repair_space>version<seq2seq4repair_space>(%s)" , version ) ; if ( ( version instanceof String ) && ( ( ( String ) ( version ) ) . startsWith ( "3." ) ) ) { result = true ; } } catch ( ClassNotFoundException ignore ) { } catch ( NoSuchMethodException ignore ) { } catch ( InvocationTargetException ignore ) { } catch ( IllegalAccessException ignore ) { } return result ; } static boolean isEarDeployment ( final DeploymentUnit context ) { } static boolean isWarDeployment ( final DeploymentUnit context ) { } private static class ManagedReferenceFactoryInjector implements Injector < ManagedReferenceFactory > { private volatile ManagedReference reference ; private final Injector < DataSource > dataSourceInjector ; public ManagedReferenceFactoryInjector ( Injector < DataSource > dataSourceInjector ) { } @ Override public void inject ( final ManagedReferenceFactory value ) throws InjectionException { } @ Override public void uninject ( ) { } } private void addPUServiceDependencyToComponents ( final Collection < ComponentDescription > components , final ServiceName puServiceName ) { } private void addManagementConsole ( final DeploymentUnit deploymentUnit , final PersistenceUnitMetadata pu , final PersistenceUnitService persistenceUnitService , final PersistenceProviderAdaptor adaptor ) { } private static Resource getOrCreateResource ( final Resource parent , final PathElement element ) { } private static class PersistenceAdaptorRemoval { final PersistenceUnitMetadata pu ; final PersistenceProviderAdaptor adaptor ; public PersistenceAdaptorRemoval ( PersistenceUnitMetadata pu , PersistenceProviderAdaptor adaptor ) { } private void cleanup ( ) { } } private static AttachmentKey < AttachmentList < PersistenceUnitDeploymentProcessor . PersistenceAdaptorRemoval > > REMOVAL_KEY = AttachmentKey . createList ( PersistenceUnitDeploymentProcessor . PersistenceAdaptorRemoval . class ) ; }

Fix:
Object version = m . invoke ( null ) ;