Program: 145765
Project: 145765
Buggy source:
public static String init(Configuration config,Writer w) throws Exception {
  output.set(new PrintWriter(w));
  Application app=Application.get();
  app.setConfiguration(config);
  ApplicationManager appManager=(ApplicationManager)Components.getComponent(ApplicationManager.class);
  Collection prefixes=appManager.getPrefixes();
  if (prefixes != null && prefixes.contains(config.getPrefix())) {
    throw new Exception("String_Node_Str" + config.getPrefix() + "String_Node_Str");
  }
  Properties prefixProps=appManager.createApplication(config.getName(),config.getPrefix());
  String appOid=prefixProps.getProperty(ApplicationStorage.OID);
  try {
    message("String_Node_Str" + appOid);
    app.storeObject(Application.OID,appOid);
    new File(config.getFileStore()).mkdirs();
    SnipSpace space=(SnipSpace)Components.getComponent(SnipSpace.class);
    createAdministrator(config);
    String ping=config.get(Configuration.APP_PERM_WEBLOGSPING);
    String notify=config.get(Configuration.APP_PERM_NOTIFICATION);
    config.set(Configuration.APP_PERM_WEBLOGSPING,"String_Node_Str");
    config.set(Configuration.APP_PERM_NOTIFICATION,"String_Node_Str");
    InputStream data=getLocalizedResource("String_Node_Str","String_Node_Str",config.getLocale());
    XMLSnipImport.load(data,XMLSnipImport.OVERWRITE | XMLSnipImport.IMPORT_USERS | XMLSnipImport.IMPORT_SNIPS);
    postFirstBlog(config,space);
    config.set(Configuration.APP_PERM_WEBLOGSPING,ping);
    config.set(Configuration.APP_PERM_NOTIFICATION,notify);
    message("String_Node_Str");
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_API,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_ASIN,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_BOOK,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_PING,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_ROBOTS,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_ROBOTS_TXT,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_WIKI,"String_Node_Str",space);
    File themeTemplateDir=new File(config.getWebInfDir(),"String_Node_Str");
    XMLSnipImport.load(new FileInputStream(new File(themeTemplateDir,"String_Node_Str" + config.getTheme() + "String_Node_Str")),XMLSnipImport.OVERWRITE | XMLSnipImport.IMPORT_SNIPS);
    storeConfiguration(config,space);
    ConfigurationManager configManager=ConfigurationManager.getInstance();
    configManager.addConfiguration(appOid,config);
  }
 catch (  Exception e) {
    appManager.removeApplication(appOid);
    config.getFileStore(appOid).delete();
    e.printStackTrace();
    throw e;
  }
  return appOid;
}

Fixed version (ground truth):
public static String init(Configuration config,Writer w) throws Exception {
  output.set(new PrintWriter(w));
  Application app=Application.get();
  app.setConfiguration(config);
  ApplicationManager appManager=(ApplicationManager)Components.getComponent(ApplicationManager.class);
  Collection prefixes=appManager.getPrefixes();
  if (prefixes != null && prefixes.contains(config.getPrefix())) {
    throw new Exception("String_Node_Str" + config.getPrefix() + "String_Node_Str");
  }
  Properties prefixProps=appManager.createApplication(config.getName(),config.getPrefix());
  String appOid=prefixProps.getProperty(ApplicationStorage.OID);
  try {
    message("String_Node_Str" + appOid);
    app.storeObject(Application.OID,appOid);
    new File(config.getFileStore()).mkdirs();
    SnipSpace space=(SnipSpace)Components.getComponent(SnipSpace.class);
    createAdministrator(config);
    String ping=config.get(Configuration.APP_PERM_WEBLOGSPING);
    String notify=config.get(Configuration.APP_PERM_NOTIFICATION);
    config.set(Configuration.APP_PERM_WEBLOGSPING,"String_Node_Str");
    config.set(Configuration.APP_PERM_NOTIFICATION,"String_Node_Str");
    InputStream data=getLocalizedResource("String_Node_Str","String_Node_Str",config.getLocale());
    XMLSnipImport.load(data,XMLSnipImport.OVERWRITE | XMLSnipImport.IMPORT_USERS | XMLSnipImport.IMPORT_SNIPS);
    message("String_Node_Str");
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_API,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_ASIN,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_BOOK,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_PING,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_ROBOTS,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_ROBOTS_TXT,"String_Node_Str",space);
    createConfigSnipFromFile(Configuration.SNIPSNAP_CONFIG_WIKI,"String_Node_Str",space);
    File themeTemplateDir=new File(config.getWebInfDir(),"String_Node_Str");
    XMLSnipImport.load(new FileInputStream(new File(themeTemplateDir,"String_Node_Str" + config.getTheme() + "String_Node_Str")),XMLSnipImport.OVERWRITE | XMLSnipImport.IMPORT_SNIPS);
    postFirstBlog(config,space);
    config.set(Configuration.APP_PERM_WEBLOGSPING,ping);
    config.set(Configuration.APP_PERM_NOTIFICATION,notify);
    storeConfiguration(config,space);
    ConfigurationManager configManager=ConfigurationManager.getInstance();
    configManager.addConfiguration(appOid,config);
  }
 catch (  Exception e) {
    appManager.removeApplication(appOid);
    config.getFileStore(appOid).delete();
    e.printStackTrace();
    throw e;
  }
  return appOid;
}