Buggy code:
@ SuppressWarnings ( "serial" ) public abstract class AbstractDataCache extends AbstractConcurrentEventManager implements DataCache , Configurable { protected Default stats = new CacheStatistics . Default ( ) ; private static final BitSet EMPTY_BITSET = new BitSet ( 0 ) ; private static final Localizer s_loc = Localizer . forPackage ( AbstractDataCache . class ) ; protected OpenJPAConfiguration conf ; protected Log log ; private String _name = null ; private boolean _closed = false ; private String _schedule = null ; protected Set < String > _includedTypes = new HashSet < String > ( ) ; protected Set < String > _excludedTypes = new HashSet < String > ( ) ; public String getName ( ) { } public void setName ( String name ) { } public void setEnableStatistics ( boolean enable ) { } public void getEnableStatistics ( ) { } public String getEvictionSchedule ( ) { } public void setEvictionSchedule ( String s ) { } public void initialize ( DataCacheManager manager ) { if ( ( ( _schedule ) != null ) && ( ! ( "" . equals ( _schedule ) ) ) ) { <START_BUG> DataCacheScheduler scheduler = manager . getDataCacheScheduler ( ) ; <END_BUG> if ( scheduler != null ) scheduler . scheduleEviction ( this , _schedule ) ; } if ( manager instanceof DataCacheManagerImpl ) { List < String > invalidConfigured = new ArrayList < String > ( ) ; if ( ( _includedTypes ) != null ) { for ( String s : _includedTypes ) { if ( _excludedTypes . contains ( s ) ) { invalidConfigured . add ( s ) ; } } if ( ( invalidConfigured . size ( ) ) > 0 ) { throw new org . apache . openjpa . util . GeneralException ( AbstractDataCache . s_loc . get ( "invalid-types-excluded-types" , invalidConfigured . toString ( ) ) ) ; } } ( ( DataCacheManagerImpl ) ( manager ) ) . setTypes ( _includedTypes , _excludedTypes ) ; } } public void commit ( Collection < DataCachePCData > additions , Collection < DataCachePCData > newUpdates , Collection < DataCachePCData > existingUpdates , Collection < Object > deletes ) { } public boolean contains ( Object key ) { } public BitSet containsAll ( Collection < Object > keys ) { } public DataCachePCData get ( Object key ) { } public Map < Object , DataCachePCData > getAll ( List < Object > keys ) { } public DataCachePCData put ( DataCachePCData data ) { } public void update ( DataCachePCData data ) { } public DataCachePCData remove ( Object key ) { } public BitSet removeAll ( Collection < Object > keys ) { } public void removeAll ( Class < ? > cls , boolean subClasses ) { } public boolean pin ( Object key ) { } public BitSet pinAll ( Collection < Object > keys ) { } public void pinAll ( Class < ? > cls , boolean subs ) { } public boolean unpin ( Object key ) { } public BitSet unpinAll ( Collection < Object > keys ) { } public void unpinAll ( Class < ? > cls , boolean subs ) { } public void clear ( ) { } public void close ( ) { } protected void close ( boolean clear ) { } public boolean isClosed ( ) { } public void addExpirationListener ( ExpirationListener listen ) { } public boolean removeExpirationListener ( ExpirationListener listen ) { } public String toString ( ) { } public void afterCommit ( RemoteCommitEvent event ) { } protected void keyRemoved ( Object key , boolean expired ) { } protected boolean recacheUpdates ( ) { } protected abstract DataCachePCData getInternal ( Object oid ) { } protected abstract DataCachePCData putInternal ( Object oid , DataCachePCData pc ) { } protected void putAllInternal ( Collection < DataCachePCData > pcs ) { } protected abstract DataCachePCData removeInternal ( Object oid ) { } protected abstract void removeAllInternal ( Class < ? > cls , boolean subclasses ) { } protected void removeAllInternal ( Collection < Object > oids ) { } protected void removeAllTypeNamesInternal ( Collection < String > classNames ) { } protected abstract void clearInternal ( ) { } protected abstract boolean pinInternal ( Object oid ) { } protected abstract boolean unpinInternal ( Object oid ) { } public DataCache getPartition ( String name , boolean create ) { } public Set < String > getPartitionNames ( ) { } public boolean isPartitioned ( ) { } public CacheStatistics getStatistics ( ) { } public void setConfiguration ( Configuration conf ) { } public void startConfiguration ( ) { } public void endConfiguration ( ) { } protected void fireEvent ( Object event , Object listener ) { } public Set < String > getTypes ( ) { } public Set < String > getExcludedTypes ( ) { } public void setTypes ( Set < String > types ) { } public void setTypes ( String types ) { } public void setExcludedTypes ( Set < String > types ) { } public void setExcludedTypes ( String types ) { } }

Fix:
ClearableScheduler scheduler = manager . getClearableScheduler ( ) ;