Program: 79687
Project: 79687
Buggy source:
@Override public Void call() throws Exception {
  log.debug("String_Node_Str");
  if (verbose) {
    System.out.println("String_Node_Str" + app + "String_Node_Str"+ locations);
  }
  BrooklynLauncher launcher=BrooklynLauncher.newLauncher();
  ResourceUtils utils=new ResourceUtils(this);
  ClassLoader parent=utils.getLoader();
  GroovyClassLoader loader=new GroovyClassLoader(parent);
  if (script != null) {
    log.debug("String_Node_Str",script);
    String content=utils.getResourceAsString(script);
    GroovyShell shell=new GroovyShell(loader);
    shell.evaluate(content);
  }
  launcher.webconsolePort(port);
  launcher.webconsole(!noConsole);
  AbstractApplication application=null;
  if (app != null) {
    log.debug("String_Node_Str",app);
    application=loadApplicationFromClasspathOrParse(utils,loader,app);
    launcher.managing(application);
  }
  Iterable<String> parsedLocations=LOCATIONS_SPLITTER.split(locations);
  log.info("String_Node_Str",Lists.newArrayList(parsedLocations));
  List<Location> brooklynLocations=new LocationRegistry().getLocationsById((parsedLocations == null || Iterables.isEmpty(parsedLocations)) ? ImmutableSet.of(CommandLineLocations.LOCALHOST) : parsedLocations);
  log.info("String_Node_Str");
  launcher.launch();
  if (application != null) {
    log.info("String_Node_Str",new Object[]{app,brooklynLocations.size() != 1 ? "String_Node_Str" : "String_Node_Str",brooklynLocations});
    if (!noShutdownOnExit)     Entities.invokeStopOnShutdown(application);
    try {
      application.start(brooklynLocations);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + application + "String_Node_Str"+ e,e);
    }
  }
 else   if (brooklynLocations != null && !brooklynLocations.isEmpty()) {
    log.warn("String_Node_Str");
  }
  if (verbose) {
    if (application != null)     Entities.dumpInfo(application);
  }
  if (stopOnKeyPress) {
    log.info("String_Node_Str");
    System.in.read();
    application.stop();
  }
 else {
    log.info("String_Node_Str");
    waitUntilInterrupted();
  }
  return null;
}

Fixed version (ground truth):
@Override public Void call() throws Exception {
  log.debug("String_Node_Str");
  if (verbose) {
    System.out.println("String_Node_Str" + app + "String_Node_Str"+ locations);
  }
  if (locations == null) {
    log.warn("String_Node_Str");
    locations="String_Node_Str";
  }
  BrooklynLauncher launcher=BrooklynLauncher.newLauncher();
  ResourceUtils utils=new ResourceUtils(this);
  ClassLoader parent=utils.getLoader();
  GroovyClassLoader loader=new GroovyClassLoader(parent);
  if (script != null) {
    log.debug("String_Node_Str",script);
    String content=utils.getResourceAsString(script);
    GroovyShell shell=new GroovyShell(loader);
    shell.evaluate(content);
  }
  launcher.webconsolePort(port);
  launcher.webconsole(!noConsole);
  AbstractApplication application=null;
  if (app != null) {
    log.debug("String_Node_Str",app);
    application=loadApplicationFromClasspathOrParse(utils,loader,app);
    launcher.managing(application);
  }
  Iterable<String> parsedLocations=new QuotedStringTokenizer(locations).remainderAsList();
  log.info("String_Node_Str",Lists.newArrayList(parsedLocations));
  List<Location> brooklynLocations=new LocationRegistry().getLocationsById((parsedLocations == null || Iterables.isEmpty(parsedLocations)) ? ImmutableSet.of(CommandLineLocations.LOCALHOST) : parsedLocations);
  log.info("String_Node_Str");
  launcher.launch();
  if (application != null) {
    log.info("String_Node_Str",new Object[]{app,brooklynLocations.size() != 1 ? "String_Node_Str" : "String_Node_Str",brooklynLocations});
    if (!noShutdownOnExit)     Entities.invokeStopOnShutdown(application);
    try {
      application.start(brooklynLocations);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + application + "String_Node_Str"+ e,e);
    }
  }
 else   if (brooklynLocations != null && !brooklynLocations.isEmpty()) {
    log.warn("String_Node_Str");
  }
  if (verbose) {
    if (application != null)     Entities.dumpInfo(application);
  }
  if (stopOnKeyPress) {
    log.info("String_Node_Str");
    System.in.read();
    application.stop();
  }
 else {
    log.info("String_Node_Str");
    waitUntilInterrupted();
  }
  return null;
}