Program: 80078
Project: 80078
Buggy source:
public static void outputBeds(File exportDir,tectonicus.configuration.Map map,PlayerFilter filter,ArrayList<Player> players,Vector3l mapSpawn){
  File bedsFile=new File(exportDir,"String_Node_Str");
  if (bedsFile.exists())   bedsFile.delete();
  System.out.println("String_Node_Str" + bedsFile.getAbsolutePath());
  int numOutput=0;
  JsArrayWriter jsWriter=null;
  try {
    jsWriter=new JsArrayWriter(bedsFile,map.getId() + "String_Node_Str");
    long radius=0;
    long originX=mapSpawn.x;
    long originZ=mapSpawn.z;
    if (map.getWorldSubsetFactory().getClass() == CircularWorldSubsetFactory.class) {
      CircularWorldSubsetFactory subset=(CircularWorldSubsetFactory)map.getWorldSubsetFactory();
      radius=subset.getRadius();
      if (subset.getOrigin() != null) {
        originX=subset.getOrigin().x;
        originZ=subset.getOrigin().z;
      }
    }
    if (map.getDimension() == Dimension.Terra) {
      for (      Player player : players) {
        if (filter.passesFilter(player) && player.getSpawnPosition() != null) {
          System.out.println("String_Node_Str" + player.getName() + "String_Node_Str");
          HashMap<String,String> args=new HashMap<String,String>();
          Vector3l spawn=player.getSpawnPosition();
          args.put("String_Node_Str","String_Node_Str" + player.getName() + "String_Node_Str");
          String posStr="String_Node_Str" + spawn.x + "String_Node_Str"+ spawn.y+ "String_Node_Str"+ spawn.z+ "String_Node_Str";
          args.put("String_Node_Str",posStr);
          if (radius != 0 && Math.pow((spawn.x - originX),2) + Math.pow((spawn.z - originZ),2) < Math.pow(radius,2)) {
            jsWriter.write(args);
          }
 else           if (radius == 0) {
            jsWriter.write(args);
          }
          numOutput++;
        }
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    if (jsWriter != null)     jsWriter.close();
  }
  System.out.println("String_Node_Str" + numOutput + "String_Node_Str");
}

Fixed version (ground truth):
public static void outputBeds(File exportDir,tectonicus.configuration.Map map,PlayerFilter filter,ArrayList<Player> players,Vector3l mapSpawn){
  File bedsFile=new File(exportDir,"String_Node_Str");
  if (bedsFile.exists())   bedsFile.delete();
  System.out.println("String_Node_Str" + bedsFile.getAbsolutePath());
  int numOutput=0;
  JsArrayWriter jsWriter=null;
  try {
    jsWriter=new JsArrayWriter(bedsFile,map.getId() + "String_Node_Str");
    long radius=0;
    long originX=mapSpawn.x;
    long originZ=mapSpawn.z;
    if (map.getWorldSubsetFactory().getClass() == CircularWorldSubsetFactory.class) {
      CircularWorldSubsetFactory subset=(CircularWorldSubsetFactory)map.getWorldSubsetFactory();
      radius=subset.getRadius();
      if (subset.getOrigin() != null) {
        originX=subset.getOrigin().x;
        originZ=subset.getOrigin().z;
      }
    }
    if (map.getDimension() == Dimension.Terra) {
      for (      Player player : players) {
        if (filter.passesFilter(player) && player.getSpawnPosition() != null) {
          System.out.println("String_Node_Str" + player.getName() + "String_Node_Str");
          HashMap<String,String> args=new HashMap<String,String>();
          Vector3l spawn=player.getSpawnPosition();
          args.put("String_Node_Str","String_Node_Str" + player.getName() + "String_Node_Str");
          String posStr="String_Node_Str" + spawn.x + "String_Node_Str"+ spawn.y+ "String_Node_Str"+ spawn.z+ "String_Node_Str";
          args.put("String_Node_Str",posStr);
          if (radius == 0 || radius != 0 && Math.pow((spawn.x - originX),2) + Math.pow((spawn.z - originZ),2) < Math.pow(radius,2)) {
            jsWriter.write(args);
          }
          numOutput++;
        }
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    if (jsWriter != null)     jsWriter.close();
  }
  System.out.println("String_Node_Str" + numOutput + "String_Node_Str");
}