Program: 154831
Project: 154831
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,Map<String,String> stringParams,KernelPanicEventGenerator kpe,TxEventSyncHookFactory syncHookFactory){
  if (started) {
    throw new IllegalStateException("String_Node_Str");
  }
  Map<Object,Object> params=getDefaultParams();
  boolean useMemoryMapped=true;
  if (stringParams.containsKey(Config.USE_MEMORY_MAPPED_BUFFERS)) {
    params.put(Config.USE_MEMORY_MAPPED_BUFFERS,stringParams.get(Config.USE_MEMORY_MAPPED_BUFFERS));
  }
  if ("String_Node_Str".equals(params.get(Config.USE_MEMORY_MAPPED_BUFFERS))) {
    useMemoryMapped=false;
  }
  boolean dump=false;
  if ("String_Node_Str".equals(stringParams.get(Config.DUMP_CONFIGURATION))) {
    dump=true;
  }
  storeDir=FileUtils.fixSeparatorsInPath(storeDir);
  new AutoConfigurator(storeDir,useMemoryMapped,dump).configure(params);
  for (  Map.Entry<String,String> entry : stringParams.entrySet()) {
    params.put(entry.getKey(),entry.getValue());
  }
  config=new Config(graphDb,storeDir,params,kpe);
  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) {
    }
    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) {
    }
    try {
      Class<?> cls=Class.forName("String_Node_Str");
      config.getTxModule().registerDataSource("String_Node_Str",cls.getName(),"String_Node_Str".getBytes(),config.getParams());
    }
 catch (    ClassNotFoundException e) {
    }
  }
  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();
  config.getTxModule().start();
  config.getPersistenceModule().start(config.getTxModule().getTxManager(),persistenceSource,syncHookFactory);
  persistenceSource.start(config.getTxModule().getXaDataSourceManager());
  config.getIdGeneratorModule().start();
  config.getGraphDbModule().start(config.getLockReleaser(),config.getPersistenceModule().getPersistenceManager(),params);
  if ("String_Node_Str".equals(params.get(Config.DUMP_CONFIGURATION))) {
    for (    Object key : params.keySet()) {
      if (key instanceof String) {
        Object value=params.get(key);
        if (value instanceof String) {
          System.out.println(key + "String_Node_Str" + value);
        }
      }
    }
  }
  if (config.getTxModule().getXaDataSourceManager().hasDataSource("String_Node_Str")) {
    config.getTxModule().getXaDataSourceManager().unregisterDataSource("String_Node_Str");
  }
  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,Map<String,String> stringParams,KernelPanicEventGenerator kpe,TxEventSyncHookFactory syncHookFactory){
  if (started) {
    throw new IllegalStateException("String_Node_Str");
  }
  Map<Object,Object> params=getDefaultParams();
  boolean useMemoryMapped=true;
  if (stringParams.containsKey(Config.USE_MEMORY_MAPPED_BUFFERS)) {
    params.put(Config.USE_MEMORY_MAPPED_BUFFERS,stringParams.get(Config.USE_MEMORY_MAPPED_BUFFERS));
  }
  if ("String_Node_Str".equals(params.get(Config.USE_MEMORY_MAPPED_BUFFERS))) {
    useMemoryMapped=false;
  }
  boolean dump=false;
  if ("String_Node_Str".equals(stringParams.get(Config.DUMP_CONFIGURATION))) {
    dump=true;
  }
  storeDir=FileUtils.fixSeparatorsInPath(storeDir);
  new AutoConfigurator(storeDir,useMemoryMapped,dump).configure(params);
  for (  Map.Entry<String,String> entry : stringParams.entrySet()) {
    params.put(entry.getKey(),entry.getValue());
  }
  config=new Config(graphDb,storeDir,params,kpe);
  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) {
    }
    try {
      Class<?> cls=Class.forName("String_Node_Str");
      config.getTxModule().registerDataSource("String_Node_Str",cls.getName(),"String_Node_Str".getBytes(),config.getParams());
    }
 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();
  config.getTxModule().start();
  config.getPersistenceModule().start(config.getTxModule().getTxManager(),persistenceSource,syncHookFactory);
  persistenceSource.start(config.getTxModule().getXaDataSourceManager());
  config.getIdGeneratorModule().start();
  config.getGraphDbModule().start(config.getLockReleaser(),config.getPersistenceModule().getPersistenceManager(),params);
  if ("String_Node_Str".equals(params.get(Config.DUMP_CONFIGURATION))) {
    for (    Object key : params.keySet()) {
      if (key instanceof String) {
        Object value=params.get(key);
        if (value instanceof String) {
          System.out.println(key + "String_Node_Str" + value);
        }
      }
    }
  }
  if (config.getTxModule().getXaDataSourceManager().hasDataSource("String_Node_Str")) {
    config.getTxModule().getXaDataSourceManager().unregisterDataSource("String_Node_Str");
  }
  started=true;
  return Collections.unmodifiableMap(params);
}