Program: 58004
Project: 58004
Buggy source:
@Override public HashMap<String,HashMap<PlotId,Plot>> getPlotMePlots(Connection connection) throws SQLException {
  ResultSet r;
  PreparedStatement stmt;
  HashMap<String,Integer> plotWidth=new HashMap<>();
  HashMap<String,Integer> roadWidth=new HashMap<>();
  final HashMap<Integer,Plot> plots=new HashMap<>();
  HashMap<String,HashMap<PlotId,boolean[]>> merges=new HashMap<>();
  stmt=connection.prepareStatement("String_Node_Str" + plugin + "String_Node_Str");
  r=stmt.executeQuery();
  boolean checkUUID=DBFunc.hasColumn(r,"String_Node_Str");
  boolean merge=!plugin.equals("String_Node_Str") && Settings.CONVERT_PLOTME;
  while (r.next()) {
    int key=r.getInt("String_Node_Str");
    PlotId id=new PlotId(r.getInt("String_Node_Str"),r.getInt("String_Node_Str"));
    String name=r.getString("String_Node_Str");
    String world=LikePlotMeConverter.getWorld(r.getString("String_Node_Str"));
    if (!plots.containsKey(world)) {
      if (merge) {
        int plot=PS.get().config.getInt("String_Node_Str" + world + "String_Node_Str");
        int path=PS.get().config.getInt("String_Node_Str" + world + "String_Node_Str");
        plotWidth.put(world,plot);
        roadWidth.put(world,path);
        merges.put(world,new HashMap<PlotId,boolean[]>());
      }
    }
    if (merge) {
      int tx=r.getInt("String_Node_Str");
      int tz=r.getInt("String_Node_Str");
      int bx=r.getInt("String_Node_Str") - 1;
      int bz=r.getInt("String_Node_Str") - 1;
      int path=roadWidth.get(world);
      int plot=plotWidth.get(world);
      Location top=getPlotTopLocAbs(path,plot,id);
      Location bot=getPlotBottomLocAbs(path,plot,id);
      if (tx > top.getX()) {
        setMerged(merges,world,id,1);
      }
      if (tz > top.getZ()) {
        setMerged(merges,world,id,2);
      }
      if (bx < bot.getX()) {
        setMerged(merges,world,id,3);
      }
      if (bz > bot.getZ()) {
        setMerged(merges,world,id,0);
      }
    }
    UUID owner=UUIDHandler.getUUID(name);
    if (owner == null) {
      if (name.equals("String_Node_Str")) {
        owner=DBFunc.everyone;
      }
 else {
        if (checkUUID) {
          try {
            byte[] bytes=r.getBytes("String_Node_Str");
            if (bytes != null) {
              owner=UUID.nameUUIDFromBytes(bytes);
              if (owner != null) {
                UUIDHandler.add(new StringWrapper(name),owner);
              }
            }
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
        if (owner == null) {
          MainUtil.sendConsoleMessage("String_Node_Str" + id + "String_Node_Str"+ name+ "String_Node_Str");
          continue;
        }
      }
    }
 else {
      UUIDHandler.add(new StringWrapper(name),owner);
    }
    Plot plot=new Plot(world,id,owner);
    plots.put(key,plot);
  }
  for (  Entry<Integer,Plot> entry : plots.entrySet()) {
    Plot plot=entry.getValue();
    HashMap<PlotId,boolean[]> mergeMap=merges.get(plot.world);
    if (mergeMap != null) {
      if (mergeMap.containsKey(plot.id)) {
        plot.getSettings().setMerged(mergeMap.get(plot.id));
      }
    }
  }
  r.close();
  stmt.close();
  try {
    MainUtil.sendConsoleMessage("String_Node_Str" + plugin + "String_Node_Str");
    stmt=connection.prepareStatement("String_Node_Str" + plugin + "String_Node_Str");
    r=stmt.executeQuery();
    while (r.next()) {
      int key=r.getInt("String_Node_Str");
      Plot plot=plots.get(key);
      if (plot == null) {
        MainUtil.sendConsoleMessage("String_Node_Str" + key + "String_Node_Str");
        continue;
      }
      UUID denied=UUID.fromString(r.getString("String_Node_Str"));
      plot.getDenied().add(denied);
    }
    MainUtil.sendConsoleMessage("String_Node_Str" + plugin + "String_Node_Str");
    stmt=connection.prepareStatement("String_Node_Str" + plugin + "String_Node_Str");
    r=stmt.executeQuery();
    while (r.next()) {
      int key=r.getInt("String_Node_Str");
      Plot plot=plots.get(key);
      if (plot == null) {
        MainUtil.sendConsoleMessage("String_Node_Str" + key + "String_Node_Str");
        continue;
      }
      UUID allowed=UUID.fromString(r.getString("String_Node_Str"));
      plot.getTrusted().add(allowed);
    }
    r.close();
    stmt.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  HashMap<String,HashMap<PlotId,Plot>> processed=new HashMap<>();
  for (  Entry<Integer,Plot> entry : plots.entrySet()) {
    Plot plot=entry.getValue();
    HashMap<PlotId,Plot> map=processed.get(plot.world);
    if (map == null) {
      map=new HashMap<>();
      processed.put(plot.world,map);
    }
    map.put(plot.id,plot);
  }
  return processed;
}

Fixed version (ground truth):
@Override public HashMap<String,HashMap<PlotId,Plot>> getPlotMePlots(Connection connection) throws SQLException {
  ResultSet r;
  PreparedStatement stmt;
  HashMap<String,Integer> plotWidth=new HashMap<>();
  HashMap<String,Integer> roadWidth=new HashMap<>();
  final HashMap<Integer,Plot> plots=new HashMap<>();
  HashMap<String,HashMap<PlotId,boolean[]>> merges=new HashMap<>();
  stmt=connection.prepareStatement("String_Node_Str" + plugin + "String_Node_Str");
  r=stmt.executeQuery();
  boolean checkUUID=DBFunc.hasColumn(r,"String_Node_Str");
  boolean merge=!plugin.equals("String_Node_Str") && Settings.CONVERT_PLOTME;
  while (r.next()) {
    int key=r.getInt("String_Node_Str");
    PlotId id=new PlotId(r.getInt("String_Node_Str"),r.getInt("String_Node_Str"));
    String name=r.getString("String_Node_Str");
    String world=LikePlotMeConverter.getWorld(r.getString("String_Node_Str"));
    if (!plots.containsKey(world)) {
      if (merge) {
        int plot=PS.get().config.getInt("String_Node_Str" + world + "String_Node_Str");
        int path=PS.get().config.getInt("String_Node_Str" + world + "String_Node_Str");
        plotWidth.put(world,plot);
        roadWidth.put(world,path);
        merges.put(world,new HashMap<PlotId,boolean[]>());
      }
    }
    if (merge) {
      int tx=r.getInt("String_Node_Str");
      int tz=r.getInt("String_Node_Str");
      int bx=r.getInt("String_Node_Str") - 1;
      int bz=r.getInt("String_Node_Str") - 1;
      int path=roadWidth.get(world);
      int plot=plotWidth.get(world);
      Location top=getPlotTopLocAbs(path,plot,id);
      Location bot=getPlotBottomLocAbs(path,plot,id);
      if (tx > top.getX()) {
        setMerged(merges,world,id,1);
      }
      if (tz > top.getZ()) {
        setMerged(merges,world,id,2);
      }
      if (bx < bot.getX()) {
        setMerged(merges,world,id,3);
      }
      if (bz > bot.getZ()) {
        setMerged(merges,world,id,0);
      }
    }
    UUID owner=UUIDHandler.getUUID(name,null);
    if (owner == null) {
      if (name.equals("String_Node_Str")) {
        owner=DBFunc.everyone;
      }
 else {
        if (checkUUID) {
          try {
            byte[] bytes=r.getBytes("String_Node_Str");
            if (bytes != null) {
              owner=UUID.nameUUIDFromBytes(bytes);
              if (owner != null) {
                UUIDHandler.add(new StringWrapper(name),owner);
              }
            }
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
        if (owner == null) {
          MainUtil.sendConsoleMessage("String_Node_Str" + id + "String_Node_Str"+ name+ "String_Node_Str");
          continue;
        }
      }
    }
 else {
      UUIDHandler.add(new StringWrapper(name),owner);
    }
    Plot plot=new Plot(world,id,owner);
    plots.put(key,plot);
  }
  for (  Entry<Integer,Plot> entry : plots.entrySet()) {
    Plot plot=entry.getValue();
    HashMap<PlotId,boolean[]> mergeMap=merges.get(plot.world);
    if (mergeMap != null) {
      if (mergeMap.containsKey(plot.id)) {
        plot.getSettings().setMerged(mergeMap.get(plot.id));
      }
    }
  }
  r.close();
  stmt.close();
  try {
    MainUtil.sendConsoleMessage("String_Node_Str" + plugin + "String_Node_Str");
    stmt=connection.prepareStatement("String_Node_Str" + plugin + "String_Node_Str");
    r=stmt.executeQuery();
    while (r.next()) {
      int key=r.getInt("String_Node_Str");
      Plot plot=plots.get(key);
      if (plot == null) {
        MainUtil.sendConsoleMessage("String_Node_Str" + key + "String_Node_Str");
        continue;
      }
      UUID denied=UUID.fromString(r.getString("String_Node_Str"));
      plot.getDenied().add(denied);
    }
    MainUtil.sendConsoleMessage("String_Node_Str" + plugin + "String_Node_Str");
    stmt=connection.prepareStatement("String_Node_Str" + plugin + "String_Node_Str");
    r=stmt.executeQuery();
    while (r.next()) {
      int key=r.getInt("String_Node_Str");
      Plot plot=plots.get(key);
      if (plot == null) {
        MainUtil.sendConsoleMessage("String_Node_Str" + key + "String_Node_Str");
        continue;
      }
      UUID allowed=UUID.fromString(r.getString("String_Node_Str"));
      plot.getTrusted().add(allowed);
    }
    r.close();
    stmt.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  HashMap<String,HashMap<PlotId,Plot>> processed=new HashMap<>();
  for (  Entry<Integer,Plot> entry : plots.entrySet()) {
    Plot plot=entry.getValue();
    HashMap<PlotId,Plot> map=processed.get(plot.world);
    if (map == null) {
      map=new HashMap<>();
      processed.put(plot.world,map);
    }
    map.put(plot.id,plot);
  }
  return processed;
}