AbstractGraphDatabase graph = database.graph;
String storeDir = graph.getStoreDir();
if (storeDir == null) {
storeDir = config.getString(DATABASE_LOCATION_PROPERTY_KEY);
}
graph.shutdown();
Map<String, Object> result = removeDirectory(storeDir);
// TODO wtf?
// database.graph = new EmbeddedGraphDatabase(storeDir, graph.getKernelData().getConfigParams());
database.start();