Program: 154661
Project: 154661
Buggy source:
/** 
 * Starts Neo4j with default configuration
 * @param graphDb The graph database service.
 * @param storeDir path to directory where Neo4j store is located
 * @param create if true a new Neo4j store will be created if no store existat <CODE>storeDir</CODE>
 * @param configuration parameters
 * @throws StartupFailedException if unable to start
 */
public synchronized Map<Object,Object> start(GraphDatabaseService graphDb,KernelExtensionLoader kernelExtensionLoader){
  if (started) {
    throw new IllegalStateException("String_Node_Str");
  }
  Map<Object,Object> params=config.getParams();
  boolean useMemoryMapped=Boolean.parseBoolean((String)config.getInputParams().get(Config.USE_MEMORY_MAPPED_BUFFERS));
  boolean dumpToConsole=Boolean.parseBoolean((String)config.getInputParams().get(Config.DUMP_CONFIGURATION));
  storeDir=FileUtils.fixSeparatorsInPath(storeDir);
  StringLogger logger=StringLogger.getLogger(storeDir + "String_Node_Str");
  AutoConfigurator autoConfigurator=new AutoConfigurator(storeDir,useMemoryMapped,dumpToConsole);
  autoConfigurator.configure(subset(config.getInputParams(),Config.USE_MEMORY_MAPPED_BUFFERS));
  params.putAll(config.getInputParams());
  String separator=System.getProperty("String_Node_Str");
  String store=storeDir + separator + "String_Node_Str";
  params.put("String_Node_Str",storeDir);
  params.put("String_Node_Str",store);
  params.put("String_Node_Str",String.valueOf(create));
  String logicalLog=storeDir + separator + "String_Node_Str";
  params.put("String_Node_Str",logicalLog);
  byte resourceId[]="String_Node_Str".getBytes();
  params.put(LockManager.class,config.getLockManager());
  params.put(LockReleaser.class,config.getLockReleaser());
  config.getTxModule().registerDataSource(Config.DEFAULT_DATA_SOURCE_NAME,Config.NIO_NEO_DB_CLASS,resourceId,params);
  if (!config.isReadOnly() || config.isBackupSlave()) {
    try {
      Class clazz=Class.forName(Config.LUCENE_DS_CLASS);
      cleanWriteLocksInLuceneDirectory(storeDir + "String_Node_Str");
      byte luceneId[]="String_Node_Str".getBytes();
      registerLuceneDataSource("String_Node_Str",clazz.getName(),config.getTxModule(),storeDir + "String_Node_Str",config.getLockManager(),luceneId,params);
    }
 catch (    ClassNotFoundException e) {
    }
catch (    NoClassDefFoundError err) {
    }
    try {
      Class clazz=Class.forName(Config.LUCENE_FULLTEXT_DS_CLASS);
      cleanWriteLocksInLuceneDirectory(storeDir + "String_Node_Str");
      byte[] luceneId="String_Node_Str".getBytes();
      registerLuceneDataSource("String_Node_Str",clazz.getName(),config.getTxModule(),storeDir + "String_Node_Str",config.getLockManager(),luceneId,params);
    }
 catch (    ClassNotFoundException e) {
    }
catch (    NoClassDefFoundError err) {
    }
  }
  persistenceSource=new NioNeoDbPersistenceSource();
  config.setPersistenceSource(Config.DEFAULT_DATA_SOURCE_NAME,create);
  config.getIdGeneratorModule().setPersistenceSourceInstance(persistenceSource);
  config.getTxModule().init();
  config.getPersistenceModule().init();
  persistenceSource.init();
  config.getIdGeneratorModule().init();
  config.getGraphDbModule().init();
  kernelExtensionLoader.init();
  config.getTxModule().start();
  config.getPersistenceModule().start(config.getTxModule().getTxManager(),persistenceSource,config.getSyncHookFactory());
  persistenceSource.start(config.getTxModule().getXaDataSourceManager());
  config.getIdGeneratorModule().start();
  config.getGraphDbModule().start(config.getLockReleaser(),config.getPersistenceModule().getPersistenceManager(),config.getRelationshipTypeCreator(),params);
  logger.logMessage("String_Node_Str");
  logger.logMessage(autoConfigurator.getNiceMemoryInformation());
  logger.logMessage("String_Node_Str" + Version.get());
  RuntimeMXBean runtime=ManagementFactory.getRuntimeMXBean();
  OperatingSystemMXBean os=ManagementFactory.getOperatingSystemMXBean();
  logger.logMessage("String_Node_Str" + os.getName() + "String_Node_Str"+ os.getVersion()+ "String_Node_Str"+ os.getArch());
  logger.logMessage("String_Node_Str" + runtime.getVmName());
  logger.logMessage("String_Node_Str" + runtime.getVmVendor());
  logger.logMessage("String_Node_Str" + runtime.getVmVersion());
  if (runtime.isBootClassPathSupported()) {
    logger.logMessage("String_Node_Str" + runtime.getBootClassPath());
  }
  logger.logMessage("String_Node_Str" + runtime.getClassPath());
  logger.logMessage("String_Node_Str" + runtime.getLibraryPath());
  for (  GarbageCollectorMXBean gcBean : ManagementFactory.getGarbageCollectorMXBeans()) {
    logger.logMessage("String_Node_Str" + gcBean.getName() + "String_Node_Str"+ Arrays.toString(gcBean.getMemoryPoolNames()));
  }
  logger.logMessage("String_Node_Str" + runtime.getInputArguments());
  logger.logMessage("String_Node_Str");
  logConfiguration(params,logger,dumpToConsole);
  logger.logMessage("String_Node_Str");
  logger.flush();
  started=true;
  return Collections.unmodifiableMap(params);
}

Fixed version (ground truth):
/** 
 * Starts Neo4j with default configuration
 * @param graphDb The graph database service.
 * @param storeDir path to directory where Neo4j store is located
 * @param create if true a new Neo4j store will be created if no store existat <CODE>storeDir</CODE>
 * @param configuration parameters
 * @throws StartupFailedException if unable to start
 */
public synchronized Map<Object,Object> start(GraphDatabaseService graphDb,KernelExtensionLoader kernelExtensionLoader){
  if (started) {
    throw new IllegalStateException("String_Node_Str");
  }
  Map<Object,Object> params=config.getParams();
  boolean useMemoryMapped=Boolean.parseBoolean((String)config.getInputParams().get(Config.USE_MEMORY_MAPPED_BUFFERS));
  boolean dumpToConsole=Boolean.parseBoolean((String)config.getInputParams().get(Config.DUMP_CONFIGURATION));
  storeDir=FileUtils.fixSeparatorsInPath(storeDir);
  StringLogger logger=StringLogger.getLogger(storeDir + "String_Node_Str");
  AutoConfigurator autoConfigurator=new AutoConfigurator(storeDir,useMemoryMapped,dumpToConsole);
  autoConfigurator.configure(subset(config.getInputParams(),Config.USE_MEMORY_MAPPED_BUFFERS));
  params.putAll(config.getInputParams());
  String separator=System.getProperty("String_Node_Str");
  String store=storeDir + separator + "String_Node_Str";
  params.put("String_Node_Str",storeDir);
  params.put("String_Node_Str",store);
  params.put("String_Node_Str",String.valueOf(create));
  String logicalLog=storeDir + separator + "String_Node_Str";
  params.put("String_Node_Str",logicalLog);
  byte resourceId[]="String_Node_Str".getBytes();
  params.put(LockManager.class,config.getLockManager());
  params.put(LockReleaser.class,config.getLockReleaser());
  config.getTxModule().registerDataSource(Config.DEFAULT_DATA_SOURCE_NAME,Config.NIO_NEO_DB_CLASS,resourceId,params);
  if (!config.isReadOnly() || config.isBackupSlave()) {
    try {
      Class clazz=Class.forName(Config.LUCENE_DS_CLASS);
      cleanWriteLocksInLuceneDirectory(storeDir + "String_Node_Str");
      byte luceneId[]="String_Node_Str".getBytes();
      registerLuceneDataSource("String_Node_Str",clazz.getName(),config.getTxModule(),storeDir + "String_Node_Str",config.getLockManager(),luceneId,params);
    }
 catch (    ClassNotFoundException e) {
    }
catch (    NoClassDefFoundError err) {
    }
    try {
      Class clazz=Class.forName(Config.LUCENE_FULLTEXT_DS_CLASS);
      cleanWriteLocksInLuceneDirectory(storeDir + "String_Node_Str");
      byte[] luceneId="String_Node_Str".getBytes();
      registerLuceneDataSource("String_Node_Str",clazz.getName(),config.getTxModule(),storeDir + "String_Node_Str",config.getLockManager(),luceneId,params);
    }
 catch (    ClassNotFoundException e) {
    }
catch (    NoClassDefFoundError err) {
    }
  }
  persistenceSource=new NioNeoDbPersistenceSource();
  config.setPersistenceSource(Config.DEFAULT_DATA_SOURCE_NAME,create);
  config.getIdGeneratorModule().setPersistenceSourceInstance(persistenceSource);
  config.getTxModule().init();
  config.getPersistenceModule().init();
  persistenceSource.init();
  config.getIdGeneratorModule().init();
  config.getGraphDbModule().init();
  kernelExtensionLoader.init();
  config.getTxModule().start();
  config.getPersistenceModule().start(config.getTxModule().getTxManager(),persistenceSource,config.getSyncHookFactory());
  persistenceSource.start(config.getTxModule().getXaDataSourceManager());
  config.getIdGeneratorModule().start();
  config.getGraphDbModule().start(config.getLockReleaser(),config.getPersistenceModule().getPersistenceManager(),config.getRelationshipTypeCreator(),params);
  logger.logMessage("String_Node_Str");
  logger.logMessage(autoConfigurator.getNiceMemoryInformation());
  logger.logMessage("String_Node_Str" + Version.get());
  RuntimeMXBean runtime=ManagementFactory.getRuntimeMXBean();
  OperatingSystemMXBean os=ManagementFactory.getOperatingSystemMXBean();
  logger.logMessage(String.format("String_Node_Str",os.getName(),os.getVersion(),os.getArch(),os.getAvailableProcessors()));
  logger.logMessage("String_Node_Str" + runtime.getVmName());
  logger.logMessage("String_Node_Str" + runtime.getVmVendor());
  logger.logMessage("String_Node_Str" + runtime.getVmVersion());
  if (runtime.isBootClassPathSupported()) {
    logger.logMessage("String_Node_Str" + runtime.getBootClassPath());
  }
  logger.logMessage("String_Node_Str" + runtime.getClassPath());
  logger.logMessage("String_Node_Str" + runtime.getLibraryPath());
  for (  GarbageCollectorMXBean gcBean : ManagementFactory.getGarbageCollectorMXBeans()) {
    logger.logMessage("String_Node_Str" + gcBean.getName() + "String_Node_Str"+ Arrays.toString(gcBean.getMemoryPoolNames()));
  }
  logger.logMessage("String_Node_Str" + runtime.getInputArguments());
  logger.logMessage("String_Node_Str");
  logConfiguration(params,logger,dumpToConsole);
  logger.logMessage("String_Node_Str");
  logger.flush();
  started=true;
  return Collections.unmodifiableMap(params);
}