Program: 15757
Project: 15757
Buggy source:
/** 
 * Create and open the store.
 * @param config the configuration to use
 * @throws IllegalStateException if the file is corrupt, or an exceptionoccurred while opening
 * @throws IllegalArgumentException if the directory does not exist
 */
MVStore(HashMap<String,Object> config){
  Object o=config.get("String_Node_Str");
  this.compressionLevel=o == null ? 0 : (Integer)o;
  String fileName=(String)config.get("String_Node_Str");
  o=config.get("String_Node_Str");
  if (o == null) {
    pageSplitSize=fileName == null ? 4 * 1024 : 16 * 1024;
  }
 else {
    pageSplitSize=(Integer)o;
  }
  o=config.get("String_Node_Str");
  this.backgroundExceptionHandler=(UncaughtExceptionHandler)o;
  meta=new MVMap<String,String>(StringDataType.INSTANCE,StringDataType.INSTANCE);
  HashMap<String,Object> c=New.hashMap();
  c.put("String_Node_Str",0);
  c.put("String_Node_Str",currentVersion);
  meta.init(this,c);
  fileStore=(FileStore)config.get("String_Node_Str");
  if (fileName == null && fileStore == null) {
    cache=null;
    cacheChunkRef=null;
    return;
  }
  if (fileStore == null) {
    fileStoreIsProvided=false;
    fileStore=new FileStore();
  }
 else {
    fileStoreIsProvided=true;
  }
  retentionTime=fileStore.getDefaultRetentionTime();
  boolean readOnly=config.containsKey("String_Node_Str");
  o=config.get("String_Node_Str");
  int mb=o == null ? 16 : (Integer)o;
  if (mb > 0) {
    int maxMemoryBytes=mb * 1024 * 1024;
    int averageMemory=Math.max(10,pageSplitSize / 2);
    int segmentCount=16;
    int stackMoveDistance=maxMemoryBytes / averageMemory * 2 / 100;
    cache=new CacheLongKeyLIRS<Page>(maxMemoryBytes,averageMemory,segmentCount,stackMoveDistance);
    cacheChunkRef=new CacheLongKeyLIRS<PageChildren>(maxMemoryBytes / 4,20,segmentCount,stackMoveDistance);
  }
  o=config.get("String_Node_Str");
  int kb=o == null ? 512 : (Integer)o;
  autoCommitMemory=kb * 1024 * 19;
  o=config.get("String_Node_Str");
  autoCompactFillRate=o == null ? 50 : (Integer)o;
  char[] encryptionKey=(char[])config.get("String_Node_Str");
  try {
    if (!fileStoreIsProvided) {
      fileStore.open(fileName,readOnly,encryptionKey);
    }
    if (fileStore.size() == 0) {
      creationTime=getTime();
      lastCommitTime=creationTime;
      fileHeader.put("String_Node_Str",2);
      fileHeader.put("String_Node_Str",BLOCK_SIZE);
      fileHeader.put("String_Node_Str",FORMAT_WRITE);
      fileHeader.put("String_Node_Str",creationTime);
      writeFileHeader();
    }
 else {
      readFileHeader();
    }
  }
 catch (  IllegalStateException e) {
    panic(e);
  }
 finally {
    if (encryptionKey != null) {
      Arrays.fill(encryptionKey,(char)0);
    }
  }
  lastCommitTime=getTime();
  o=config.get("String_Node_Str");
  int delay=o == null ? 1000 : (Integer)o;
  setAutoCommitDelay(delay);
}

Fixed version (ground truth):
/** 
 * Create and open the store.
 * @param config the configuration to use
 * @throws IllegalStateException if the file is corrupt, or an exceptionoccurred while opening
 * @throws IllegalArgumentException if the directory does not exist
 */
MVStore(HashMap<String,Object> config){
  Object o=config.get("String_Node_Str");
  this.compressionLevel=o == null ? 0 : (Integer)o;
  String fileName=(String)config.get("String_Node_Str");
  o=config.get("String_Node_Str");
  if (o == null) {
    pageSplitSize=fileName == null ? 4 * 1024 : 16 * 1024;
  }
 else {
    pageSplitSize=(Integer)o;
  }
  o=config.get("String_Node_Str");
  this.backgroundExceptionHandler=(UncaughtExceptionHandler)o;
  meta=new MVMap<String,String>(StringDataType.INSTANCE,StringDataType.INSTANCE);
  HashMap<String,Object> c=New.hashMap();
  c.put("String_Node_Str",0);
  c.put("String_Node_Str",currentVersion);
  meta.init(this,c);
  fileStore=(FileStore)config.get("String_Node_Str");
  if (fileName == null && fileStore == null) {
    cache=null;
    cacheChunkRef=null;
    return;
  }
  if (fileStore == null) {
    fileStoreIsProvided=false;
    fileStore=new FileStore();
  }
 else {
    fileStoreIsProvided=true;
  }
  retentionTime=fileStore.getDefaultRetentionTime();
  boolean readOnly=config.containsKey("String_Node_Str");
  o=config.get("String_Node_Str");
  int mb=o == null ? 16 : (Integer)o;
  if (mb > 0) {
    int maxMemoryBytes=mb * 1024 * 1024;
    int averageMemory=Math.max(10,pageSplitSize / 2);
    int segmentCount=16;
    int stackMoveDistance=maxMemoryBytes / averageMemory * 2 / 100;
    cache=new CacheLongKeyLIRS<Page>(maxMemoryBytes,averageMemory,segmentCount,stackMoveDistance);
    cacheChunkRef=new CacheLongKeyLIRS<PageChildren>(maxMemoryBytes / 4,20,segmentCount,stackMoveDistance);
  }
  o=config.get("String_Node_Str");
  int kb=o == null ? 1024 : (Integer)o;
  autoCommitMemory=kb * 1024 * 19;
  o=config.get("String_Node_Str");
  autoCompactFillRate=o == null ? 50 : (Integer)o;
  char[] encryptionKey=(char[])config.get("String_Node_Str");
  try {
    if (!fileStoreIsProvided) {
      fileStore.open(fileName,readOnly,encryptionKey);
    }
    if (fileStore.size() == 0) {
      creationTime=getTime();
      lastCommitTime=creationTime;
      fileHeader.put("String_Node_Str",2);
      fileHeader.put("String_Node_Str",BLOCK_SIZE);
      fileHeader.put("String_Node_Str",FORMAT_WRITE);
      fileHeader.put("String_Node_Str",creationTime);
      writeFileHeader();
    }
 else {
      readFileHeader();
    }
  }
 catch (  IllegalStateException e) {
    panic(e);
  }
 finally {
    if (encryptionKey != null) {
      Arrays.fill(encryptionKey,(char)0);
    }
  }
  lastCommitTime=getTime();
  o=config.get("String_Node_Str");
  int delay=o == null ? 1000 : (Integer)o;
  setAutoCommitDelay(delay);
}