Buggy code:
public class MetaRepository extends BaseRequestHandler { public static class RepoRef { public String repoName ; public String subPath ; public RepoRef ( String repoName , String subPath ) { } public String getHeadPath ( ) { } public static MetaRepository . RepoRef parse ( String uri , boolean assumeHead ) { } public String toString ( ) { } } public Map stringCacheOverride ; protected String normalizeRdfString ( String rdf ) { } protected String filenameToPostSectorPath ( RepoConfig repoConfig , String filename ) { } protected Map fileHashCaches = new HashMap ( ) ; protected FileHashCache getFileHashCache ( ContentAddressingScheme cas ) { } protected void maybeCacheDirectoryUrn ( Directory dir , String urn , Map options ) { } protected void cacheDirectoryUrnInDotFile ( WritableDirectory dir , String urn ) { } protected String getCachedDirectoryUrnFromDatabase ( File dir ) { } protected void cacheDirectoryUrnInDatabase ( File dir , String urn ) { } protected String maybeGetCachedDirectoryUrn ( Directory d , Map options ) { } protected String urnToPostSectorPath ( RepoConfig repoConfig , String urn ) { } protected ShortTermCache repoDataSectorUrlCache = new ShortTermCache ( 60000 ) ; protected List getRepoDataSectorUrlsWithCaching ( RepoConfig repoConfig ) { } protected List getRepoDataSectorUrls ( RepoConfig repoConfig ) { } Pattern entryKeyNumberExtractionPattern = Pattern . compile ( "^(\\d+).*$" ) ; protected String getHighestEntryKey ( String uri ) { } protected String getNextEntryKey ( String uri ) { } protected String resolveHeadPath ( RepoConfig repoConfig , String headPath , String defaultBaseName ) { } protected String getRequestedStoreSector ( Request req , RepoConfig repoConfig ) { } protected Response putDataBlob ( RepoConfig repoConfig , Request req ) { } protected Response putDataRdf ( RepoConfig repoConfig , Request req ) { } protected Response putDataRdfDirectory ( RepoConfig repoConfig , Request req ) { } protected Response putDataNonRdfDirectory ( RepoConfig repoConfig , Request req ) { } static String REQ_ANCESTOR_DEPTH_MAP = ( CCouchNamespace . REQ_CACHE_COMMIT_ANCESTORS ) + "//cachedDepthMap" ; protected void cacheCommitAncestors ( RepoConfig repoConfig , Commit c , Request req ) { } protected boolean shouldStoreCommitTarget ( Request req ) { } protected Response putDataRdfCommit ( RepoConfig repoConfig , Request req ) { } protected Response putDataNonRdfCommit ( RepoConfig repoConfig , Request req ) { } protected Response putData ( RepoConfig repoConfig , Request req ) { } protected String identifyBlob ( Blob blob , Map options ) { } protected String identifyDirectory ( Directory dir , Map options ) { } protected String identify ( Object content , Map contentMetadata , Map options ) { } protected static String FUNCTION_RESULT_CACHE_PREFIX = "function-result-cache//" ; Map slfFiles = new HashMap ( ) ; protected synchronized SimpleListFile getSlf ( File f ) { SimpleListFile slf = ( ( SimpleListFile ) ( slfFiles . get ( f . getAbsolutePath ( ) ) ) ) ; if ( slf == null ) { try { FileUtil . mkParentDirs ( f ) ; slf = new SimpleListFile ( f , "rw" ) ; <START_BUG> slf . init ( 65536 , ( 1024 * 1024 ) ) ; <END_BUG> slfFiles . put ( f . getAbsolutePath ( ) , slf ) ; } catch ( IOException e ) { throw new RuntimeException ( "Couldn't<seq2seq4repair_space>open<seq2seq4repair_space>cache<seq2seq4repair_space>file<seq2seq4repair_space>in<seq2seq4repair_space>'w'<seq2seq4repair_space>mode" , e ) ; } } return slf ; } protected synchronized SimpleListFile getSlf ( RepoConfig repoConfig , String subPath ) { } protected SimpleListFile getCacheSlf ( String cacheName ) { } protected void cacheString ( String cacheName , String valueName , String value ) { } protected String getCachedString ( String cacheName , String valueName ) { } protected void markTreeFullyStored ( String uri , String sector ) { } protected boolean isTreeFullyStored ( String uri , String sector ) { } protected void putFunctionResult ( RepoConfig repoConfig , String subIndexName , String key , String value ) { } protected void putFunctionResultUri ( RepoConfig repoConfig , String subIndexName , String key , String valueUri ) { } protected void putFunctionResult ( RepoConfig repoConfig , String subIndexName , String key , Object value ) { } protected Object getFunctionResult ( RepoConfig repoConfig , String subIndexName , String key ) { } MetaRepoConfig config ; public MetaRepository ( MetaRepoConfig config ) { } protected RepoConfig lastHitRepoConfig ; protected String lastHitDataSectorUri ; protected static class HashMismatchException extends Exception { private static final long serialVersionUID = 1L ; public ContentAddressingScheme dataScheme ; public byte [ ] expected ; public byte [ ] calculated ; public HashMismatchException ( ContentAddressingScheme dataScheme , byte [ ] expected , byte [ ] calculated ) { } } protected Response maybeCacheBlob ( Response res , Request req ) throws MetaRepository . HashMismatchException { } protected void logHashMismatch ( Request req , ContentAddressingScheme dataScheme , byte [ ] expected , byte [ ] calculated ) { } ShortTermCache nonExistentObjects = new ShortTermCache ( 60000 ) ; public Response call ( Request req ) { } public Function1 getTargetRdfifier ( final boolean nested , final boolean followRefs , final Map options ) { } }

Fix:
slf . initIfEmpty ( 65536 , ( 1024 * 1024 ) ) ;