Program: 24660
Project: 24660
Buggy source:
public static void idscommand(Player player,String[] split) throws SQLException {
  if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().ids(player)) {
    Statement statement=(Statement)StockCraftDatabase.conn.createStatement();
    if (statement != null) {
      ResultSet resultset=null;
      String id=null;
      String shortid=null;
      String course=null;
      String sql="String_Node_Str";
      try {
        resultset=statement.executeQuery(sql);
        try {
          Boolean idsadded=false;
          int l=0;
          while (resultset.next()) {
            l=l + 1;
          }
          resultset.beforeFirst();
          String[] idlist=new String[l];
          for (int i=0; resultset.next(); i++) {
            id=resultset.getString("String_Node_Str");
            if (id != null) {
              idsadded=true;
            }
            shortid=resultset.getString("String_Node_Str");
            idlist[i]=shortid;
          }
          if (idsadded == false) {
            player.sendMessage(ChatColor.RED + "String_Node_Str");
          }
 else {
            int start=0;
            int end=9;
            int maxpage=0;
            maxpage=idlist.length / 10 + 1;
            boolean symbol=false;
            boolean page=false;
            if (split.length > 1) {
              if (split[1].matches("String_Node_Str")) {
                start=10 * (Integer.parseInt(split[1]) - 1);
                end=10 * (Integer.parseInt(split[1]) - 1) + 9;
                if (Integer.parseInt(split[1]) > maxpage) {
                  player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.LIGHT_PURPLE+ maxpage+ ChatColor.RED+ "String_Node_Str");
                }
 else {
                  player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.LIGHT_PURPLE+ Integer.parseInt(split[1])+ ChatColor.GREEN+ "String_Node_Str"+ maxpage+ "String_Node_Str");
                }
                page=true;
              }
 else               if (split[1].equals("String_Node_Str") || split[1].equals("String_Node_Str")) {
                symbol=true;
                if (split.length > 2) {
                  if (split[2].matches("String_Node_Str")) {
                    start=10 * (Integer.parseInt(split[2]) - 1);
                    end=10 * (Integer.parseInt(split[2]) - 1) + 9;
                    if (Integer.parseInt(split[2]) > maxpage) {
                      player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.LIGHT_PURPLE+ maxpage+ ChatColor.RED+ "String_Node_Str");
                    }
 else {
                      player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.LIGHT_PURPLE+ Integer.parseInt(split[2])+ ChatColor.GREEN+ "String_Node_Str"+ maxpage+ "String_Node_Str");
                    }
                    page=true;
                  }
                }
              }
            }
            if (!page) {
              player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.LIGHT_PURPLE+ "String_Node_Str"+ ChatColor.GREEN+ "String_Node_Str"+ maxpage+ "String_Node_Str");
            }
            String[] gtext=StockCraftDatabase.getcourse(idlist);
            for (int i=start; i < idlist.length && i < end; i++) {
              course=gtext[i];
              if (symbol) {
                player.sendMessage(ChatColor.AQUA + idlist[i] + ChatColor.YELLOW+ "String_Node_Str"+ course);
              }
 else {
                player.sendMessage(ChatColor.AQUA + StockCraftCommands.idback(idlist[i]) + ChatColor.YELLOW+ "String_Node_Str"+ course);
              }
            }
          }
        }
 catch (        SQLException e) {
          e.printStackTrace();
        }
      }
 catch (      SQLException e) {
        e.printStackTrace();
      }
    }
  }
 else {
    player.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}

Fixed version (ground truth):
public static void idscommand(Player player,String[] split) throws SQLException {
  if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().ids(player)) {
    Statement statement=(Statement)StockCraftDatabase.conn.createStatement();
    if (statement != null) {
      ResultSet resultset=null;
      String id=null;
      String shortid=null;
      String course=null;
      String sql="String_Node_Str";
      try {
        resultset=statement.executeQuery(sql);
        try {
          Boolean idsadded=false;
          int l=0;
          while (resultset.next()) {
            l=l + 1;
          }
          resultset.beforeFirst();
          String[] idlist=new String[l];
          for (int i=0; resultset.next(); i++) {
            id=resultset.getString("String_Node_Str");
            if (id != null) {
              idsadded=true;
            }
            shortid=resultset.getString("String_Node_Str");
            idlist[i]=shortid;
          }
          if (idsadded == false) {
            player.sendMessage(ChatColor.RED + "String_Node_Str");
          }
 else {
            int start=0;
            int end=9;
            int maxpage=0;
            maxpage=(idlist.length) / 10 + 1;
            boolean symbol=false;
            boolean page=false;
            if (split.length > 1) {
              if (split[1].matches("String_Node_Str")) {
                start=10 * (Integer.parseInt(split[1]) - 1);
                end=10 * (Integer.parseInt(split[1]) - 1) + 9;
                if (Integer.parseInt(split[1]) > maxpage) {
                  player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.LIGHT_PURPLE+ maxpage+ ChatColor.RED+ "String_Node_Str");
                }
 else {
                  player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.LIGHT_PURPLE+ Integer.parseInt(split[1])+ ChatColor.GREEN+ "String_Node_Str"+ maxpage+ "String_Node_Str");
                }
                page=true;
              }
 else               if (split[1].equals("String_Node_Str") || split[1].equals("String_Node_Str")) {
                symbol=true;
                if (split.length > 2) {
                  if (split[2].matches("String_Node_Str")) {
                    start=10 * (Integer.parseInt(split[2]) - 1);
                    end=10 * (Integer.parseInt(split[2]) - 1) + 9;
                    if (Integer.parseInt(split[2]) > maxpage) {
                      player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.LIGHT_PURPLE+ maxpage+ ChatColor.RED+ "String_Node_Str");
                    }
 else {
                      player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.LIGHT_PURPLE+ Integer.parseInt(split[2])+ ChatColor.GREEN+ "String_Node_Str"+ maxpage+ "String_Node_Str");
                    }
                    page=true;
                  }
                }
              }
            }
            if (!page) {
              player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.LIGHT_PURPLE+ "String_Node_Str"+ ChatColor.GREEN+ "String_Node_Str"+ maxpage+ "String_Node_Str");
            }
            String[] gtext=StockCraftDatabase.getcourse(idlist);
            for (int i=start; i < idlist.length && i <= end; i++) {
              course=gtext[i];
              if (symbol) {
                player.sendMessage(ChatColor.AQUA + idlist[i] + ChatColor.YELLOW+ "String_Node_Str"+ course);
              }
 else {
                player.sendMessage(ChatColor.AQUA + StockCraftCommands.idback(idlist[i]) + ChatColor.YELLOW+ "String_Node_Str"+ course);
              }
            }
          }
        }
 catch (        SQLException e) {
          e.printStackTrace();
        }
      }
 catch (      SQLException e) {
        e.printStackTrace();
      }
    }
  }
 else {
    player.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}