Program: 24659
Project: 24659
Buggy source:
public void infosystem(String[] split,Player player,PlayerChatEvent event) throws SQLException {
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().course(player)) {
      String idname=String.valueOf(split[1]);
      String id=idchange(idname);
      String[] gtext=StockCraftDatabase.getcourse(id);
      String course=gtext[1];
      String lastday=gtext[2];
      String percent=gtext[3];
      String days50=gtext[4];
      player.sendMessage(ChatColor.DARK_AQUA + "String_Node_Str" + idname+ ChatColor.BLUE+ "String_Node_Str"+ course+ ChatColor.DARK_AQUA+ "String_Node_Str"+ lastday+ ChatColor.BLUE+ "String_Node_Str"+ percent+ ChatColor.DARK_AQUA+ "String_Node_Str"+ days50);
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().stocks(player)) {
      Statement statement=(Statement)StockCraftDatabase.conn.createStatement();
      if (statement != null) {
        ResultSet resultset=null;
        int amountof=0;
        float sumpaid=0;
        String id=null;
        String shortid=null;
        String course=null;
        String sql="String_Node_Str" + player.getName() + "String_Node_Str";
        try {
          resultset=statement.executeQuery(sql);
          try {
            Boolean bought=false;
            int l=0;
            while (resultset.next()) {
              l=l + 1;
            }
            resultset.beforeFirst();
            String[] idlist=new String[l];
            float[] sumpaidlist=new float[l];
            int[] amountoflist=new int[l];
            for (int i=0; resultset.next(); i++) {
              id=resultset.getString("String_Node_Str");
              sumpaidlist[i]=Float.valueOf(resultset.getString("String_Node_Str"));
              amountoflist[i]=Integer.valueOf(resultset.getString("String_Node_Str"));
              if (id != null) {
                bought=true;
              }
              shortid=idchange(id);
              idlist[i]=shortid;
            }
            if (bought == false) {
              player.sendMessage(ChatColor.RED + "String_Node_Str");
            }
 else {
              String[] gtext=StockCraftDatabase.getcourse(idlist);
              float profit=0;
              for (int i=0; i < idlist.length; i++) {
                course=gtext[i];
                amountof=amountoflist[i];
                sumpaid=sumpaidlist[i];
                id=idback(idlist[i]);
                float avp=0;
                if (amountof > 0) {
                  profit=Float.valueOf(course) - (sumpaid / amountof);
                  avp=(sumpaid / amountof);
                }
 else                 if (amountof < 0) {
                  profit=Float.valueOf(course) - (sumpaid / (-amountof));
                  profit=-profit;
                  avp=(sumpaid / -amountof);
                }
                if (profit > 0) {
                  player.sendMessage(ChatColor.YELLOW + id + ChatColor.LIGHT_PURPLE+ "String_Node_Str"+ amountof+ ChatColor.GREEN+ "String_Node_Str"+ avp+ ChatColor.BLUE+ "String_Node_Str"+ course+ ChatColor.GREEN+ "String_Node_Str"+ profit);
                }
 else                 if (profit == 0) {
                  player.sendMessage(ChatColor.YELLOW + id + ChatColor.LIGHT_PURPLE+ "String_Node_Str"+ amountof+ ChatColor.GREEN+ "String_Node_Str"+ avp+ ChatColor.BLUE+ "String_Node_Str"+ course+ ChatColor.WHITE+ "String_Node_Str"+ profit);
                }
 else                 if (profit < 0) {
                  player.sendMessage(ChatColor.YELLOW + id + ChatColor.LIGHT_PURPLE+ "String_Node_Str"+ amountof+ ChatColor.GREEN+ "String_Node_Str"+ avp+ ChatColor.BLUE+ "String_Node_Str"+ course+ ChatColor.RED+ "String_Node_Str"+ profit);
                }
              }
            }
          }
 catch (          SQLException e) {
            e.printStackTrace();
          }
        }
 catch (        SQLException e) {
          e.printStackTrace();
        }
      }
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    ids.idscommand(player,split);
    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 {
            player.sendMessage(ChatColor.GREEN + "String_Node_Str");
            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 {
              String[] gtext=StockCraftDatabase.getcourse(idlist);
              for (int i=0; i < idlist.length; i++) {
                course=gtext[i];
                player.sendMessage(ChatColor.AQUA + 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");
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    stocksell.stocksellcommand(player,split);
    if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().stocksell(player)) {
      String amount="String_Node_Str";
      String idname=String.valueOf(split[1]);
      String id=idchange(idname);
      String[] gtext=StockCraftDatabase.getcourse(id);
      String course=gtext[1];
      if (split.length > 2) {
        amount=split[2];
      }
      float fcourse=Float.valueOf(course);
      int iamount=Integer.valueOf(amount);
      float sumget=(iamount * fcourse);
      float allprofit=0;
      float price=(iamount * fcourse);
      Statement statement=(Statement)StockCraftDatabase.conn.createStatement();
      if (statement != null && id != null && price <= iConomy.getBank().getAccount(player.getName()).getBalance()) {
        ResultSet resultset=null;
        int amountof=0;
        float sumpaid=0;
        try {
          String sql="String_Node_Str" + player.getName() + "String_Node_Str"+ idname+ "String_Node_Str";
          resultset=statement.executeQuery(sql);
          while (resultset.next()) {
            sumpaid=Float.valueOf(resultset.getString("String_Node_Str"));
            amountof=Integer.valueOf(resultset.getString("String_Node_Str"));
          }
          if (amountof < 0) {
            if (StockCraftPropertiesVar.shorten == true) {
              sql="String_Node_Str" + (amountof - iamount) + "String_Node_Str"+ (sumpaid + price)+ "String_Node_Str"+ player.getName()+ "String_Node_Str"+ idname+ "String_Node_Str";
              statement.execute(sql);
              player.sendMessage(ChatColor.GREEN + amount + "String_Node_Str"+ idname+ "String_Node_Str"+ price+ "String_Node_Str"+ iConomy.getBank().getCurrency());
              sumget=-sumget;
              iConomy.getBank().getAccount(player.getName()).add(sumget);
            }
 else {
              player.sendMessage(ChatColor.RED + "String_Node_Str");
            }
          }
 else           if (amountof == 0) {
            if (StockCraftPropertiesVar.shorten == true) {
              sql="String_Node_Str" + player.getName() + "String_Node_Str"+ idname+ "String_Node_Str"+ price+ "String_Node_Str"+ -iamount+ "String_Node_Str";
              statement.execute(sql);
              player.sendMessage(ChatColor.GREEN + amount + "String_Node_Str"+ idname+ "String_Node_Str"+ price+ "String_Node_Str"+ iConomy.getBank().getCurrency());
              sumget=-sumget;
              iConomy.getBank().getAccount(player.getName()).add(sumget);
            }
 else {
              player.sendMessage(ChatColor.RED + "String_Node_Str" + idname);
            }
          }
 else {
            if (amountof <= iamount) {
              if (amountof < iamount) {
                player.sendMessage(ChatColor.RED + "String_Node_Str" + iamount+ "String_Node_Str"+ idname+ "String_Node_Str"+ amountof+ "String_Node_Str");
                iamount=amountof;
                sumget=(iamount * fcourse);
              }
              sql="String_Node_Str" + player.getName() + "String_Node_Str"+ idname+ "String_Node_Str";
            }
 else {
              sql="String_Node_Str" + (amountof - iamount) + "String_Node_Str"+ (sumpaid - (sumpaid / amountof) * iamount)+ "String_Node_Str"+ player.getName()+ "String_Node_Str"+ idname+ "String_Node_Str";
            }
            statement.execute(sql);
            float profit=sumget - (sumpaid / amountof * iamount);
            player.sendMessage(ChatColor.GOLD + "String_Node_Str" + profit+ "String_Node_Str"+ iConomy.getBank().getCurrency()+ "String_Node_Str");
            sql="String_Node_Str" + player.getName() + "String_Node_Str";
            resultset=statement.executeQuery(sql);
            while (resultset.next()) {
              allprofit=Float.valueOf(resultset.getString("String_Node_Str"));
            }
            sql="String_Node_Str" + player.getName() + "String_Node_Str";
            resultset=statement.executeQuery(sql);
            String name=null;
            while (resultset.next()) {
              name=resultset.getString("String_Node_Str");
            }
            if (name != null) {
              sql="String_Node_Str" + (allprofit + profit) + "String_Node_Str"+ player.getName()+ "String_Node_Str";
            }
 else {
              sql="String_Node_Str" + player.getName() + "String_Node_Str"+ profit+ "String_Node_Str";
            }
            statement.execute(sql);
            iConomy.getBank().getAccount(player.getName()).add(sumget);
            player.sendMessage(ChatColor.GREEN + amount + "String_Node_Str"+ idname+ "String_Node_Str"+ sumget+ "String_Node_Str"+ iConomy.getBank().getCurrency());
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
 else {
        if (id == null) {
          player.sendMessage(ChatColor.RED + "String_Node_Str" + idname+ "String_Node_Str");
        }
 else         if (price > iConomy.getBank().getAccount(player.getName()).getBalance()) {
          player.sendMessage(ChatColor.RED + "String_Node_Str" + (iamount * fcourse)+ "String_Node_Str"+ iConomy.getBank().getCurrency()+ "String_Node_Str"+ iConomy.getBank().getAccount(player.getName()).getBalance()+ "String_Node_Str"+ iConomy.getBank().getCurrency()+ "String_Node_Str");
        }
      }
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    stockbuy.stockbuycommand(player,split);
    if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().stockbuy(player)) {
      String amount="String_Node_Str";
      String idname=String.valueOf(split[1]);
      String id=idchange(idname);
      String[] gtext=StockCraftDatabase.getcourse(id);
      String course=gtext[1];
      if (split.length > 2) {
        amount=split[2];
      }
      float fcourse=Float.valueOf(course);
      int iamount=Integer.valueOf(amount);
      float sumget=(iamount * fcourse);
      float allprofit=0;
      float price=(iamount * fcourse);
      if (id != null) {
        Statement statement=(Statement)StockCraftDatabase.conn.createStatement();
        if (statement != null) {
          ResultSet resultset=null;
          int amountof=0;
          float sumpaid=0;
          try {
            String sql="String_Node_Str" + player.getName() + "String_Node_Str"+ idname+ "String_Node_Str";
            resultset=statement.executeQuery(sql);
            while (resultset.next()) {
              sumpaid=Float.valueOf(resultset.getString("String_Node_Str"));
              amountof=Integer.valueOf(resultset.getString("String_Node_Str"));
            }
            if (price <= iConomy.getBank().getAccount(player.getName()).getBalance() || amountof < 0) {
              if (amountof < 0) {
                if (StockCraftPropertiesVar.shorten == true) {
                  if (-amountof <= iamount) {
                    if (-amountof < iamount) {
                      player.sendMessage(ChatColor.RED + "String_Node_Str" + iamount+ "String_Node_Str"+ idname+ "String_Node_Str"+ amountof+ "String_Node_Str");
                      iamount=amountof;
                      sumget=(iamount * fcourse);
                    }
                    sql="String_Node_Str" + player.getName() + "String_Node_Str"+ idname+ "String_Node_Str";
                  }
 else {
                    sql="String_Node_Str" + (amountof + iamount) + "String_Node_Str"+ (sumpaid - (sumpaid / -amountof) * iamount)+ "String_Node_Str"+ player.getName()+ "String_Node_Str"+ idname+ "String_Node_Str";
                  }
                  statement.execute(sql);
                  float profit=sumget - (sumpaid / -amountof * iamount);
                  profit=-profit;
                  player.sendMessage(ChatColor.GOLD + "String_Node_Str" + profit+ "String_Node_Str"+ iConomy.getBank().getCurrency()+ "String_Node_Str");
                  sql="String_Node_Str" + player.getName() + "String_Node_Str";
                  resultset=statement.executeQuery(sql);
                  while (resultset.next()) {
                    allprofit=Float.valueOf(resultset.getString("String_Node_Str"));
                  }
                  sql="String_Node_Str" + player.getName() + "String_Node_Str";
                  resultset=statement.executeQuery(sql);
                  String name=null;
                  while (resultset.next()) {
                    name=resultset.getString("String_Node_Str");
                  }
                  if (name != null) {
                    sql="String_Node_Str" + (allprofit + profit) + "String_Node_Str"+ player.getName()+ "String_Node_Str";
                  }
 else {
                    sql="String_Node_Str" + player.getName() + "String_Node_Str"+ profit+ "String_Node_Str";
                  }
                  statement.execute(sql);
                  iConomy.getBank().getAccount(player.getName()).add(sumget);
                  iConomy.getBank().getAccount(player.getName()).add(profit * 2);
                  player.sendMessage(ChatColor.GREEN + amount + "String_Node_Str"+ idname+ "String_Node_Str"+ sumget+ "String_Node_Str"+ iConomy.getBank().getCurrency());
                }
 else {
                  player.sendMessage(ChatColor.RED + "String_Node_Str");
                }
              }
 else               if (amountof == 0) {
                sql="String_Node_Str" + player.getName() + "String_Node_Str"+ idname+ "String_Node_Str"+ price+ "String_Node_Str"+ amount+ "String_Node_Str";
                statement.execute(sql);
                iConomy.getBank().getAccount(player.getName()).subtract(price);
                player.sendMessage(ChatColor.GREEN + amount + "String_Node_Str"+ idname+ "String_Node_Str"+ price+ "String_Node_Str"+ iConomy.getBank().getCurrency());
              }
 else               if (amountof > 0) {
                sql="String_Node_Str" + (amountof + iamount) + "String_Node_Str"+ (sumpaid + price)+ "String_Node_Str"+ player.getName()+ "String_Node_Str"+ idname+ "String_Node_Str";
                statement.execute(sql);
                iConomy.getBank().getAccount(player.getName()).subtract(price);
                player.sendMessage(ChatColor.GREEN + amount + "String_Node_Str"+ idname+ "String_Node_Str"+ price+ "String_Node_Str"+ iConomy.getBank().getCurrency());
              }
            }
 else {
              player.sendMessage(ChatColor.RED + "String_Node_Str" + (iamount * fcourse)+ "String_Node_Str"+ iConomy.getBank().getCurrency()+ "String_Node_Str"+ iConomy.getBank().getAccount(player.getName()).getBalance()+ "String_Node_Str"+ iConomy.getBank().getCurrency()+ "String_Node_Str");
            }
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
      }
 else {
        if (id == null) {
          player.sendMessage(ChatColor.RED + "String_Node_Str" + idname+ "String_Node_Str");
        }
      }
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPermissions.getInstance().addid(player)) {
      if (split.length > 2) {
        StockCraftDatabase.idadd(player,split[1],split[2]);
      }
 else {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPermissions.getInstance().addid(player)) {
      if (split.length > 1) {
        String loc="String_Node_Str" + split[1] + "String_Node_Str";
        String[] list=loadidlist(player,loc);
        for (int i=0; i < list.length; i=i + 2) {
          StockCraftDatabase.idadd(player,list[i],list[i + 1]);
        }
      }
 else {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPermissions.getInstance().removeid(player)) {
      if (split.length > 1) {
        Statement statement=(Statement)StockCraftDatabase.conn.createStatement();
        if (statement != null) {
          try {
            ResultSet resultset=null;
            String sql="String_Node_Str" + split[1] + "String_Node_Str";
            resultset=statement.executeQuery(sql);
            String longid="String_Node_Str";
            while (resultset.next()) {
              longid=resultset.getString("String_Node_Str");
            }
            if (longid.toLowerCase().equals(split[1].toLowerCase())) {
              sql="String_Node_Str" + longid + "String_Node_Str";
              resultset=statement.executeQuery(sql);
              String name=null;
              while (resultset.next()) {
                name=resultset.getString("String_Node_Str");
                player.sendMessage(ChatColor.RED + name + "String_Node_Str"+ longid+ "String_Node_Str");
              }
              sql="String_Node_Str" + split[1] + "String_Node_Str";
              statement.execute(sql);
              player.sendMessage(ChatColor.GREEN + longid + "String_Node_Str");
            }
 else {
              player.sendMessage(ChatColor.RED + longid + "String_Node_Str"+ split[1]+ "String_Node_Str");
            }
          }
 catch (          SQLException e1) {
            e1.printStackTrace();
          }
        }
      }
 else {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().stocktop(player)) {
      Statement statement=(Statement)StockCraftDatabase.conn.createStatement();
      if (statement != null) {
        try {
          ResultSet resultset=null;
          String sql="String_Node_Str";
          resultset=statement.executeQuery(sql);
          String name="String_Node_Str";
          String profit="String_Node_Str";
          player.sendMessage(ChatColor.GREEN + "String_Node_Str");
          for (int i=1; resultset.next() && i < 11; i++) {
            name=resultset.getString("String_Node_Str");
            profit=resultset.getString("String_Node_Str");
            player.sendMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + i+ "String_Node_Str"+ name+ "String_Node_Str"+ profit);
          }
        }
 catch (        SQLException e1) {
          e1.printStackTrace();
        }
      }
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().stockhelp(player)) {
      String rulesloc="String_Node_Str";
      writetxt(rulesloc,event);
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void infosystem(String[] split,Player player,PlayerChatEvent event) throws SQLException {
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().course(player)) {
      String idname=String.valueOf(split[1]);
      String id=idchange(idname);
      String[] gtext=StockCraftDatabase.getcourse(id);
      String course=gtext[1];
      String lastday=gtext[2];
      String percent=gtext[3];
      String days50=gtext[4];
      player.sendMessage(ChatColor.DARK_AQUA + "String_Node_Str" + idname+ ChatColor.BLUE+ "String_Node_Str"+ course+ ChatColor.DARK_AQUA+ "String_Node_Str"+ lastday+ ChatColor.BLUE+ "String_Node_Str"+ percent+ ChatColor.DARK_AQUA+ "String_Node_Str"+ days50);
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().stocks(player)) {
      Statement statement=(Statement)StockCraftDatabase.conn.createStatement();
      if (statement != null) {
        ResultSet resultset=null;
        int amountof=0;
        float sumpaid=0;
        String id=null;
        String shortid=null;
        String course=null;
        String sql="String_Node_Str" + player.getName() + "String_Node_Str";
        try {
          resultset=statement.executeQuery(sql);
          try {
            Boolean bought=false;
            int l=0;
            while (resultset.next()) {
              l=l + 1;
            }
            resultset.beforeFirst();
            String[] idlist=new String[l];
            float[] sumpaidlist=new float[l];
            int[] amountoflist=new int[l];
            for (int i=0; resultset.next(); i++) {
              id=resultset.getString("String_Node_Str");
              sumpaidlist[i]=Float.valueOf(resultset.getString("String_Node_Str"));
              amountoflist[i]=Integer.valueOf(resultset.getString("String_Node_Str"));
              if (id != null) {
                bought=true;
              }
              shortid=idchange(id);
              idlist[i]=shortid;
            }
            if (bought == false) {
              player.sendMessage(ChatColor.RED + "String_Node_Str");
            }
 else {
              String[] gtext=StockCraftDatabase.getcourse(idlist);
              float profit=0;
              for (int i=0; i < idlist.length; i++) {
                course=gtext[i];
                amountof=amountoflist[i];
                sumpaid=sumpaidlist[i];
                id=idback(idlist[i]);
                float avp=0;
                if (amountof > 0) {
                  profit=Float.valueOf(course) - (sumpaid / amountof);
                  avp=(sumpaid / amountof);
                }
 else                 if (amountof < 0) {
                  profit=Float.valueOf(course) - (sumpaid / (-amountof));
                  profit=-profit;
                  avp=(sumpaid / -amountof);
                }
                if (profit > 0) {
                  player.sendMessage(ChatColor.YELLOW + id + ChatColor.LIGHT_PURPLE+ "String_Node_Str"+ amountof+ ChatColor.GREEN+ "String_Node_Str"+ avp+ ChatColor.BLUE+ "String_Node_Str"+ course+ ChatColor.GREEN+ "String_Node_Str"+ profit);
                }
 else                 if (profit == 0) {
                  player.sendMessage(ChatColor.YELLOW + id + ChatColor.LIGHT_PURPLE+ "String_Node_Str"+ amountof+ ChatColor.GREEN+ "String_Node_Str"+ avp+ ChatColor.BLUE+ "String_Node_Str"+ course+ ChatColor.WHITE+ "String_Node_Str"+ profit);
                }
 else                 if (profit < 0) {
                  player.sendMessage(ChatColor.YELLOW + id + ChatColor.LIGHT_PURPLE+ "String_Node_Str"+ amountof+ ChatColor.GREEN+ "String_Node_Str"+ avp+ ChatColor.BLUE+ "String_Node_Str"+ course+ ChatColor.RED+ "String_Node_Str"+ profit);
                }
              }
            }
          }
 catch (          SQLException e) {
            e.printStackTrace();
          }
        }
 catch (        SQLException e) {
          e.printStackTrace();
        }
      }
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    ids.idscommand(player,split);
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    stocksell.stocksellcommand(player,split);
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    stockbuy.stockbuycommand(player,split);
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPermissions.getInstance().addid(player)) {
      if (split.length > 2) {
        StockCraftDatabase.idadd(player,split[1],split[2]);
      }
 else {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPermissions.getInstance().addid(player)) {
      if (split.length > 1) {
        String loc="String_Node_Str" + split[1] + "String_Node_Str";
        String[] list=loadidlist(player,loc);
        for (int i=0; i < list.length; i=i + 2) {
          StockCraftDatabase.idadd(player,list[i],list[i + 1]);
        }
      }
 else {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPermissions.getInstance().removeid(player)) {
      if (split.length > 1) {
        Statement statement=(Statement)StockCraftDatabase.conn.createStatement();
        if (statement != null) {
          try {
            ResultSet resultset=null;
            String sql="String_Node_Str" + split[1] + "String_Node_Str";
            resultset=statement.executeQuery(sql);
            String longid="String_Node_Str";
            while (resultset.next()) {
              longid=resultset.getString("String_Node_Str");
            }
            if (longid.toLowerCase().equals(split[1].toLowerCase())) {
              sql="String_Node_Str" + longid + "String_Node_Str";
              resultset=statement.executeQuery(sql);
              String name=null;
              while (resultset.next()) {
                name=resultset.getString("String_Node_Str");
                player.sendMessage(ChatColor.RED + name + "String_Node_Str"+ longid+ "String_Node_Str");
              }
              sql="String_Node_Str" + split[1] + "String_Node_Str";
              statement.execute(sql);
              player.sendMessage(ChatColor.GREEN + longid + "String_Node_Str");
            }
 else {
              player.sendMessage(ChatColor.RED + longid + "String_Node_Str"+ split[1]+ "String_Node_Str");
            }
          }
 catch (          SQLException e1) {
            e1.printStackTrace();
          }
        }
      }
 else {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        player.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().stocktop(player)) {
      Statement statement=(Statement)StockCraftDatabase.conn.createStatement();
      if (statement != null) {
        try {
          ResultSet resultset=null;
          String sql="String_Node_Str";
          resultset=statement.executeQuery(sql);
          String name="String_Node_Str";
          String profit="String_Node_Str";
          player.sendMessage(ChatColor.GREEN + "String_Node_Str");
          for (int i=1; resultset.next() && i < 11; i++) {
            name=resultset.getString("String_Node_Str");
            profit=resultset.getString("String_Node_Str");
            player.sendMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + i+ "String_Node_Str"+ name+ "String_Node_Str"+ profit);
          }
        }
 catch (        SQLException e1) {
          e1.printStackTrace();
        }
      }
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
  if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    if (StockCraftPropertiesVar.perm == false || StockCraftPermissions.getInstance().stockhelp(player)) {
      String rulesloc="String_Node_Str";
      writetxt(rulesloc,event);
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
}