Buggy code:
public class PersistenceUnitInfoImpl implements PersistenceUnitInfo , SourceTracker { public static final String PERSISTENCE_VERSION = "PersistenceVersion" ; private static final Localizer s_loc = Localizer . forPackage ( PersistenceUnitInfoImpl . class ) ; private String _name ; private final Properties _props = new Properties ( ) ; private PersistenceUnitTransactionType _transType = PersistenceUnitTransactionType . RESOURCE_LOCAL ; private String _providerClassName ; private List < String > _mappingFileNames ; private List < String > _entityClassNames ; private List < URL > _jarFiles ; private String _jtaDataSourceName ; private DataSource _jtaDataSource ; private String _nonJtaDataSourceName ; private DataSource _nonJtaDataSource ; private boolean _excludeUnlisted ; private URL _persistenceXmlFile ; private String _schemaVersion = "1.0" ; private ValidationMode _validationMode ; private SharedCacheMode _sharedCacheMode ; private URL _root ; public ClassLoader getClassLoader ( ) { } public ClassLoader getNewTempClassLoader ( ) { } public String getPersistenceUnitName ( ) { } public void setPersistenceUnitName ( String emName ) { } public String getPersistenceProviderClassName ( ) { } public void setPersistenceProviderClassName ( String providerClassName ) { } public PersistenceUnitTransactionType getTransactionType ( ) { } public void setTransactionType ( PersistenceUnitTransactionType transType ) { } public String getJtaDataSourceName ( ) { } public void setJtaDataSourceName ( String jta ) { } public DataSource getJtaDataSource ( ) { } public void setJtaDataSource ( DataSource ds ) { } public String getNonJtaDataSourceName ( ) { } public void setNonJtaDataSourceName ( String nonJta ) { } public DataSource getNonJtaDataSource ( ) { } public void setNonJtaDataSource ( DataSource ds ) { } public URL getPersistenceUnitRootUrl ( ) { } public void setPersistenceUnitRootUrl ( URL root ) { } public boolean excludeUnlistedClasses ( ) { } public void setExcludeUnlistedClasses ( boolean excludeUnlisted ) { } public List < String > getMappingFileNames ( ) { } public void addMappingFileName ( String name ) { } public List < URL > getJarFileUrls ( ) { } public void addJarFile ( URL jar ) { } public void addJarFileName ( String name ) { } public List < String > getManagedClassNames ( ) { } public void addManagedClassName ( String name ) { } public Properties getProperties ( ) { } public void setProperty ( String key , String value ) { } public void addTransformer ( ClassTransformer transformer ) { } public URL getPersistenceXmlFileUrl ( ) { } public void setPersistenceXmlFileUrl ( URL url ) { } public void fromUserProperties ( Map map ) { if ( map == null ) return ; Object key ; Object val ; for ( Object o : map . entrySet ( ) ) { key = ( ( Map . Entry ) ( o ) ) . getKey ( ) ; val = ( ( Map . Entry ) ( o ) ) . getValue ( ) ; if ( PROVIDER . equals ( key ) ) setPersistenceProviderClassName ( ( ( String ) ( val ) ) ) ; else if ( TRANSACTION_TYPE . equals ( key ) ) { <START_BUG> setTransactionType ( JPAProperties . getEnumValue ( PersistenceUnitTransactionType . class , key ) ) ; <END_BUG> } else if ( DATASOURCE_JTA . equals ( key ) ) { if ( val instanceof String ) { setJtaDataSourceName ( ( ( String ) ( val ) ) ) ; } else { setJtaDataSource ( ( ( DataSource ) ( val ) ) ) ; } } else if ( DATASOURCE_NONJTA . equals ( key ) ) { if ( val instanceof String ) { setNonJtaDataSourceName ( ( ( String ) ( val ) ) ) ; } else { setNonJtaDataSource ( ( ( DataSource ) ( val ) ) ) ; } } else if ( VALIDATE_MODE . equals ( key ) ) { setValidationMode ( JPAProperties . getEnumValue ( ValidationMode . class , val ) ) ; } else if ( CACHE_MODE . equals ( key ) ) { setSharedCacheMode ( JPAProperties . getEnumValue ( SharedCacheMode . class , val ) ) ; } else { _props . put ( key , val ) ; } } } public Map toOpenJPAProperties ( ) { } public static Map toOpenJPAProperties ( PersistenceUnitInfo info ) { } private static void replaceAsOpenJPAProperty ( Map map , Set < String > added , String key , Object val ) { } public File getSourceFile ( ) { } public Object getSourceScope ( ) { } public int getSourceType ( ) { } public int getLineNumber ( ) { } public int getColNumber ( ) { } public String getResourceName ( ) { } public static class ClassResolverImpl implements ClassResolver { private final ClassLoader _loader ; public ClassResolverImpl ( ClassLoader loader ) { } public ClassLoader getClassLoader ( Class ctx , ClassLoader env ) { } } public String getPersistenceXMLSchemaVersion ( ) { } public void setPersistenceXMLSchemaVersion ( String version ) { } public ValidationMode getValidationMode ( ) { } public void setValidationMode ( ValidationMode mode ) { } public SharedCacheMode getSharedCacheMode ( ) { } public void setSharedCacheMode ( SharedCacheMode mode ) { } }

Fix:
setTransactionType ( JPAProperties . getEnumValue ( PersistenceUnitTransactionType . class , val ) ) ;