Program: 80029
Project: 80029
Buggy source:
public void boot(boolean create,Properties startParams) throws StandardException {
  jbmsVersion=Monitor.getMonitor().getEngineVersion();
  jvmVersion=buildJvmVersion();
  jarCPath=jarClassPath(getClass());
  dataDirectory=startParams.getProperty(PersistentService.ROOT);
  UUIDFactory uf=Monitor.getMonitor().getUUIDFactory();
  identifier=uf.createUUID();
  PersistentService ps=Monitor.getMonitor().getServiceType(this);
  try {
    storageFactory=ps.getStorageFactoryInstance(true,dataDirectory,startParams.getProperty(Property.STORAGE_TEMP_DIRECTORY,PropertyUtil.getSystemProperty(Property.STORAGE_TEMP_DIRECTORY)),identifier.toANSIidentifier());
  }
 catch (  IOException ioe) {
    if (create) {
      throw StandardException.newException(SQLState.SERVICE_DIRECTORY_CREATE_ERROR,ioe,dataDirectory);
    }
 else {
      throw StandardException.newException(SQLState.DATABASE_NOT_FOUND,ioe,dataDirectory);
    }
  }
  if (storageFactory instanceof WritableStorageFactory)   writableStorageFactory=(WritableStorageFactory)storageFactory;
  actionCode=BOOT_ACTION;
  try {
    AccessController.doPrivileged(this);
  }
 catch (  PrivilegedActionException pae) {
  }
  String value=startParams.getProperty(Property.FORCE_DATABASE_LOCK,PropertyUtil.getSystemProperty(Property.FORCE_DATABASE_LOCK));
  throwDBlckException=Boolean.valueOf((value != null ? value.trim() : value)).booleanValue();
  if (!isReadOnly())   getJBMSLockOnDB(identifier,uf,dataDirectory);
  String restoreFrom=null;
  restoreFrom=startParams.getProperty(Attribute.CREATE_FROM);
  if (restoreFrom == null)   restoreFrom=startParams.getProperty(Attribute.RESTORE_FROM);
  if (restoreFrom == null)   restoreFrom=startParams.getProperty(Attribute.ROLL_FORWARD_RECOVERY_FROM);
  if (restoreFrom != null) {
    try {
      String dataEncryption=startParams.getProperty(Attribute.DATA_ENCRYPTION);
      databaseEncrypted=Boolean.valueOf(dataEncryption).booleanValue();
      restoreDataDirectory(restoreFrom);
    }
 catch (    StandardException se) {
      releaseJBMSLockOnDB();
      throw se;
    }
  }
  logMsg(LINE);
  String readOnlyMsg=(isReadOnly()) ? MessageService.getTextMessage(MessageId.STORE_BOOT_READONLY_MSG) : "String_Node_Str";
  boolean logBootTrace=Boolean.valueOf(startParams.getProperty(Property.LOG_BOOT_TRACE,PropertyUtil.getSystemProperty(Property.LOG_BOOT_TRACE))).booleanValue();
  logMsg(new Date() + MessageService.getTextMessage(MessageId.STORE_BOOT_MSG,jbmsVersion,identifier,dataDirectory + "String_Node_Str" + readOnlyMsg,(Object)this.getClass().getClassLoader(),jarCPath));
  logMsg(jvmVersion);
  logMsg(Property.SYSTEM_HOME_PROPERTY + "String_Node_Str" + PropertyUtil.getSystemProperty(Property.SYSTEM_HOME_PROPERTY));
  String target=PropertyUtil.getSystemProperty(Property.ERRORLOG_FILE_PROPERTY);
  if (target != null)   logMsg(Property.ERRORLOG_FILE_PROPERTY + "String_Node_Str" + target);
  target=PropertyUtil.getSystemProperty(Property.ERRORLOG_METHOD_PROPERTY);
  if (target != null)   logMsg(Property.ERRORLOG_METHOD_PROPERTY + "String_Node_Str" + target);
  target=PropertyUtil.getSystemProperty(Property.ERRORLOG_FIELD_PROPERTY);
  if (target != null)   logMsg(Property.ERRORLOG_FIELD_PROPERTY + "String_Node_Str" + target);
  if (logBootTrace)   Monitor.logThrowable(new Throwable("String_Node_Str"));
  uf=null;
  CacheFactory cf=(CacheFactory)Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.CacheFactory);
  int pageCacheSize=getIntParameter(RawStoreFactory.PAGE_CACHE_SIZE_PARAMETER,null,RawStoreFactory.PAGE_CACHE_SIZE_DEFAULT,RawStoreFactory.PAGE_CACHE_SIZE_MINIMUM,RawStoreFactory.PAGE_CACHE_SIZE_MAXIMUM);
  pageCache=cf.newCacheManager(this,"String_Node_Str",pageCacheSize / 2,pageCacheSize);
  int fileCacheSize=getIntParameter(RawStoreFactory.CONTAINER_CACHE_SIZE_PARAMETER,null,RawStoreFactory.CONTAINER_CACHE_SIZE_DEFAULT,RawStoreFactory.CONTAINER_CACHE_SIZE_MINIMUM,RawStoreFactory.CONTAINER_CACHE_SIZE_MAXIMUM);
  containerCache=cf.newCacheManager(this,"String_Node_Str",fileCacheSize / 2,fileCacheSize);
  if (create) {
    String noLog=startParams.getProperty(Property.CREATE_WITH_NO_LOG);
    inCreateNoLog=(noLog != null && Boolean.valueOf(noLog).booleanValue());
  }
  droppedTableStubInfo=new Hashtable();
  if (Property.DURABILITY_TESTMODE_NO_SYNC.equalsIgnoreCase(PropertyUtil.getSystemProperty(Property.DURABILITY_PROPERTY))) {
    dataNotSyncedAtCheckpoint=true;
    Monitor.logMessage(MessageService.getTextMessage(MessageId.STORE_DURABILITY_TESTMODE_NO_SYNC,Property.DURABILITY_PROPERTY,Property.DURABILITY_TESTMODE_NO_SYNC));
  }
 else   if (Performance.MEASURE) {
    dataNotSyncedAtCheckpoint=PropertyUtil.getSystemBoolean(Property.STORAGE_DATA_NOT_SYNCED_AT_CHECKPOINT);
    if (dataNotSyncedAtCheckpoint)     Monitor.logMessage("String_Node_Str" + Property.STORAGE_DATA_NOT_SYNCED_AT_CHECKPOINT + "String_Node_Str");
  }
  fileHandler=new RFResource(this);
}

Fixed version (ground truth):
public void boot(boolean create,Properties startParams) throws StandardException {
  jbmsVersion=Monitor.getMonitor().getEngineVersion();
  jvmVersion=buildJvmVersion();
  jarCPath=jarClassPath(getClass());
  dataDirectory=startParams.getProperty(PersistentService.ROOT);
  UUIDFactory uf=Monitor.getMonitor().getUUIDFactory();
  identifier=uf.createUUID();
  PersistentService ps=Monitor.getMonitor().getServiceType(this);
  try {
    storageFactory=ps.getStorageFactoryInstance(true,dataDirectory,startParams.getProperty(Property.STORAGE_TEMP_DIRECTORY,PropertyUtil.getSystemProperty(Property.STORAGE_TEMP_DIRECTORY)),identifier.toANSIidentifier());
  }
 catch (  IOException ioe) {
    if (create) {
      throw StandardException.newException(SQLState.SERVICE_DIRECTORY_CREATE_ERROR,ioe,dataDirectory);
    }
 else {
      throw StandardException.newException(SQLState.DATABASE_NOT_FOUND,ioe,dataDirectory);
    }
  }
  if (storageFactory instanceof WritableStorageFactory)   writableStorageFactory=(WritableStorageFactory)storageFactory;
  actionCode=BOOT_ACTION;
  try {
    AccessController.doPrivileged(this);
  }
 catch (  PrivilegedActionException pae) {
  }
  String value=startParams.getProperty(Property.FORCE_DATABASE_LOCK,PropertyUtil.getSystemProperty(Property.FORCE_DATABASE_LOCK));
  throwDBlckException=Boolean.valueOf((value != null ? value.trim() : value)).booleanValue();
  if (!isReadOnly())   getJBMSLockOnDB(identifier,uf,dataDirectory);
  String restoreFrom=null;
  restoreFrom=startParams.getProperty(Attribute.CREATE_FROM);
  if (restoreFrom == null)   restoreFrom=startParams.getProperty(Attribute.RESTORE_FROM);
  if (restoreFrom == null)   restoreFrom=startParams.getProperty(Attribute.ROLL_FORWARD_RECOVERY_FROM);
  if (restoreFrom != null) {
    try {
      String dataEncryption=startParams.getProperty(Attribute.DATA_ENCRYPTION);
      databaseEncrypted=Boolean.valueOf(dataEncryption).booleanValue();
      restoreDataDirectory(restoreFrom);
    }
 catch (    StandardException se) {
      releaseJBMSLockOnDB();
      throw se;
    }
  }
  logMsg(LINE);
  String messageID=(isReadOnly()) ? MessageId.STORE_BOOT_MSG_READ_ONLY : MessageId.STORE_BOOT_MSG;
  boolean logBootTrace=Boolean.valueOf(startParams.getProperty(Property.LOG_BOOT_TRACE,PropertyUtil.getSystemProperty(Property.LOG_BOOT_TRACE))).booleanValue();
  logMsg(new Date() + MessageService.getTextMessage(messageID,jbmsVersion,identifier,dataDirectory,(Object)this.getClass().getClassLoader(),jarCPath));
  logMsg(jvmVersion);
  logMsg(Property.SYSTEM_HOME_PROPERTY + "String_Node_Str" + PropertyUtil.getSystemProperty(Property.SYSTEM_HOME_PROPERTY));
  String target=PropertyUtil.getSystemProperty(Property.ERRORLOG_FILE_PROPERTY);
  if (target != null)   logMsg(Property.ERRORLOG_FILE_PROPERTY + "String_Node_Str" + target);
  target=PropertyUtil.getSystemProperty(Property.ERRORLOG_METHOD_PROPERTY);
  if (target != null)   logMsg(Property.ERRORLOG_METHOD_PROPERTY + "String_Node_Str" + target);
  target=PropertyUtil.getSystemProperty(Property.ERRORLOG_FIELD_PROPERTY);
  if (target != null)   logMsg(Property.ERRORLOG_FIELD_PROPERTY + "String_Node_Str" + target);
  if (logBootTrace)   Monitor.logThrowable(new Throwable("String_Node_Str"));
  uf=null;
  CacheFactory cf=(CacheFactory)Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.CacheFactory);
  int pageCacheSize=getIntParameter(RawStoreFactory.PAGE_CACHE_SIZE_PARAMETER,null,RawStoreFactory.PAGE_CACHE_SIZE_DEFAULT,RawStoreFactory.PAGE_CACHE_SIZE_MINIMUM,RawStoreFactory.PAGE_CACHE_SIZE_MAXIMUM);
  pageCache=cf.newCacheManager(this,"String_Node_Str",pageCacheSize / 2,pageCacheSize);
  int fileCacheSize=getIntParameter(RawStoreFactory.CONTAINER_CACHE_SIZE_PARAMETER,null,RawStoreFactory.CONTAINER_CACHE_SIZE_DEFAULT,RawStoreFactory.CONTAINER_CACHE_SIZE_MINIMUM,RawStoreFactory.CONTAINER_CACHE_SIZE_MAXIMUM);
  containerCache=cf.newCacheManager(this,"String_Node_Str",fileCacheSize / 2,fileCacheSize);
  if (create) {
    String noLog=startParams.getProperty(Property.CREATE_WITH_NO_LOG);
    inCreateNoLog=(noLog != null && Boolean.valueOf(noLog).booleanValue());
  }
  droppedTableStubInfo=new Hashtable();
  if (Property.DURABILITY_TESTMODE_NO_SYNC.equalsIgnoreCase(PropertyUtil.getSystemProperty(Property.DURABILITY_PROPERTY))) {
    dataNotSyncedAtCheckpoint=true;
    Monitor.logMessage(MessageService.getTextMessage(MessageId.STORE_DURABILITY_TESTMODE_NO_SYNC,Property.DURABILITY_PROPERTY,Property.DURABILITY_TESTMODE_NO_SYNC));
  }
 else   if (Performance.MEASURE) {
    dataNotSyncedAtCheckpoint=PropertyUtil.getSystemBoolean(Property.STORAGE_DATA_NOT_SYNCED_AT_CHECKPOINT);
    if (dataNotSyncedAtCheckpoint)     Monitor.logMessage("String_Node_Str" + Property.STORAGE_DATA_NOT_SYNCED_AT_CHECKPOINT + "String_Node_Str");
  }
  fileHandler=new RFResource(this);
}