Program: 58003
Project: 58003
Buggy source:
@Override public HashMap<String,HashMap<PlotId,Plot>> getPlotMePlots(Connection connection) throws SQLException {
  ResultSet r;
  PreparedStatement stmt;
  final HashMap<String,Integer> plotWidth=new HashMap<>();
  final HashMap<String,Integer> roadWidth=new HashMap<>();
  final HashMap<String,HashMap<PlotId,Plot>> plots=new HashMap<>();
  final 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()) {
    final PlotId id=new PlotId(r.getInt("String_Node_Str"),r.getInt("String_Node_Str"));
    final String name=r.getString("String_Node_Str");
    final String world=LikePlotMeConverter.getWorld(r.getString("String_Node_Str"));
    if (!plots.containsKey(world)) {
      plots.put(world,new HashMap<PlotId,Plot>());
      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);
    }
    final Plot plot=new Plot(world,id,owner);
    plots.get(world).put(id,plot);
  }
  for (  Entry<String,HashMap<PlotId,boolean[]>> entry : merges.entrySet()) {
    String world=entry.getKey();
    for (    Entry<PlotId,boolean[]> entry2 : entry.getValue().entrySet()) {
      HashMap<PlotId,Plot> newplots=plots.get(world);
      Plot plot=newplots.get(entry2.getKey());
      if (plot != null) {
        plot.getSettings().setMerged(entry2.getValue());
      }
    }
  }
  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()) {
      final PlotId id=new PlotId(r.getInt("String_Node_Str"),r.getInt("String_Node_Str"));
      final String name=r.getString("String_Node_Str");
      final String world=LikePlotMeConverter.getWorld(r.getString("String_Node_Str"));
      UUID denied=UUIDHandler.getUUID(name);
      if (denied == null) {
        if (name.equals("String_Node_Str")) {
          denied=DBFunc.everyone;
        }
 else {
          MainUtil.sendConsoleMessage("String_Node_Str" + id);
          continue;
        }
      }
      if (plots.get(world).containsKey(id)) {
        plots.get(world).get(id).getDenied().add(denied);
      }
    }
    stmt=connection.prepareStatement("String_Node_Str" + plugin + "String_Node_Str");
    r=stmt.executeQuery();
    while (r.next()) {
      final PlotId id=new PlotId(r.getInt("String_Node_Str"),r.getInt("String_Node_Str"));
      final String name=r.getString("String_Node_Str");
      final String world=LikePlotMeConverter.getWorld(r.getString("String_Node_Str"));
      UUID helper=UUIDHandler.getUUID(name);
      if (helper == null) {
        if (name.equals("String_Node_Str")) {
          helper=DBFunc.everyone;
        }
 else {
          MainUtil.sendConsoleMessage("String_Node_Str" + id);
          continue;
        }
      }
      if (plots.get(world).containsKey(id)) {
        plots.get(world).get(id).getTrusted().add(helper);
      }
    }
    r.close();
    stmt.close();
  }
 catch (  Exception e) {
  }
  return plots;
}

Fixed version (ground truth):
@Override public HashMap<String,HashMap<PlotId,Plot>> getPlotMePlots(Connection connection) throws SQLException {
  ResultSet r;
  PreparedStatement stmt;
  final HashMap<String,Integer> plotWidth=new HashMap<>();
  final HashMap<String,Integer> roadWidth=new HashMap<>();
  final HashMap<String,HashMap<PlotId,Plot>> plots=new HashMap<>();
  final 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()) {
    final PlotId id=new PlotId(r.getInt("String_Node_Str"),r.getInt("String_Node_Str"));
    final String name=r.getString("String_Node_Str");
    final String world=LikePlotMeConverter.getWorld(r.getString("String_Node_Str"));
    if (!plots.containsKey(world)) {
      plots.put(world,new HashMap<PlotId,Plot>());
      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);
    }
    final Plot plot=new Plot(world,id,owner);
    plots.get(world).put(id,plot);
  }
  for (  Entry<String,HashMap<PlotId,boolean[]>> entry : merges.entrySet()) {
    String world=entry.getKey();
    for (    Entry<PlotId,boolean[]> entry2 : entry.getValue().entrySet()) {
      HashMap<PlotId,Plot> newplots=plots.get(world);
      Plot plot=newplots.get(entry2.getKey());
      if (plot != null) {
        plot.getSettings().setMerged(entry2.getValue());
      }
    }
  }
  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()) {
      final PlotId id=new PlotId(r.getInt("String_Node_Str"),r.getInt("String_Node_Str"));
      final String name=r.getString("String_Node_Str");
      final String world=LikePlotMeConverter.getWorld(r.getString("String_Node_Str"));
      UUID denied=UUIDHandler.getUUID(name,null);
      if (denied == null) {
        if (name.equals("String_Node_Str")) {
          denied=DBFunc.everyone;
        }
 else {
          MainUtil.sendConsoleMessage("String_Node_Str" + id);
          continue;
        }
      }
      if (plots.get(world).containsKey(id)) {
        plots.get(world).get(id).getDenied().add(denied);
      }
    }
    stmt=connection.prepareStatement("String_Node_Str" + plugin + "String_Node_Str");
    r=stmt.executeQuery();
    while (r.next()) {
      final PlotId id=new PlotId(r.getInt("String_Node_Str"),r.getInt("String_Node_Str"));
      final String name=r.getString("String_Node_Str");
      final String world=LikePlotMeConverter.getWorld(r.getString("String_Node_Str"));
      UUID helper=UUIDHandler.getUUID(name,null);
      if (helper == null) {
        if (name.equals("String_Node_Str")) {
          helper=DBFunc.everyone;
        }
 else {
          MainUtil.sendConsoleMessage("String_Node_Str" + id);
          continue;
        }
      }
      if (plots.get(world).containsKey(id)) {
        plots.get(world).get(id).getTrusted().add(helper);
      }
    }
    r.close();
    stmt.close();
  }
 catch (  Exception e) {
  }
  return plots;
}