Program: 93977
Project: 93977
Buggy source:
public boolean isRegistered(String when,String player){
  boolean dupe=false;
  boolean checkneeded=true;
  Util.logging.Debug("String_Node_Str" + player + "String_Node_Str");
  player=Util.checkOtherName(player);
  EBean eBeanClass=EBean.checkPlayer(player,true);
  if (eBeanClass.getRegistered().equalsIgnoreCase("String_Node_Str")) {
    if (when.equalsIgnoreCase("String_Node_Str")) {
      if (!Config.database_keepalive) {
        Util.databaseManager.connect();
      }
      Config.hasForumBoard=false;
      try {
        if (Util.checkScript("String_Node_Str",Config.script_name,player,null,null,null)) {
          AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
          dupe=true;
        }
      }
 catch (      SQLException e) {
        Util.logging.StackTrace(e.getStackTrace(),Thread.currentThread().getStackTrace()[1].getMethodName(),Thread.currentThread().getStackTrace()[1].getLineNumber(),Thread.currentThread().getStackTrace()[1].getClassName(),Thread.currentThread().getStackTrace()[1].getFileName());
      }
      if (!Config.database_keepalive) {
        Util.databaseManager.close();
      }
      if (!dupe) {
        AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
      }
      return dupe;
    }
 else     if (when.equalsIgnoreCase("String_Node_Str")) {
      if (!Config.database_keepalive) {
        Util.databaseManager.connect();
      }
      Config.hasForumBoard=false;
      try {
        if (Util.checkScript("String_Node_Str",Config.script_name,player,null,null,null)) {
          AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
          dupe=true;
        }
 else         if (Util.checkOtherName(player) != player) {
          AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
          dupe=true;
        }
      }
 catch (      SQLException e) {
        Util.logging.StackTrace(e.getStackTrace(),Thread.currentThread().getStackTrace()[1].getMethodName(),Thread.currentThread().getStackTrace()[1].getLineNumber(),Thread.currentThread().getStackTrace()[1].getClassName(),Thread.currentThread().getStackTrace()[1].getFileName());
      }
      if (!Config.database_keepalive) {
        Util.databaseManager.close();
      }
      if (!dupe) {
        AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
      }
      return dupe;
    }
 else {
      if (this.AuthDB_Authed.containsKey(Encryption.md5(player))) {
        String check=AuthDB_Authed.get(Encryption.md5(player));
        if (check.equalsIgnoreCase("String_Node_Str")) {
          checkneeded=false;
          return true;
        }
 else         if (check.equalsIgnoreCase("String_Node_Str")) {
          return false;
        }
      }
 else       if (checkneeded) {
        Util.logging.Debug("String_Node_Str");
        try {
          if (!Config.database_keepalive) {
            Util.databaseManager.connect();
          }
          Config.hasForumBoard=false;
          if (Util.checkScript("String_Node_Str",Config.script_name,player,null,null,null)) {
            AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
            dupe=true;
          }
          if (!Config.database_keepalive) {
            Util.databaseManager.close();
          }
          if (!dupe) {
            AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
          }
          return dupe;
        }
 catch (        SQLException e) {
          Util.logging.StackTrace(e.getStackTrace(),Thread.currentThread().getStackTrace()[1].getMethodName(),Thread.currentThread().getStackTrace()[1].getLineNumber(),Thread.currentThread().getStackTrace()[1].getClassName(),Thread.currentThread().getStackTrace()[1].getFileName());
          Stop("String_Node_Str");
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean isRegistered(String when,String player){
  boolean dupe=false;
  boolean checkneeded=true;
  player=Util.checkOtherName(player);
  EBean eBeanClass=EBean.checkPlayer(player,true);
  if (eBeanClass.getRegistered().equalsIgnoreCase("String_Node_Str")) {
    if (when.equalsIgnoreCase("String_Node_Str")) {
      if (!Config.database_keepalive) {
        Util.databaseManager.connect();
      }
      Config.hasForumBoard=false;
      try {
        if (Util.checkScript("String_Node_Str",Config.script_name,player,null,null,null)) {
          AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
          dupe=true;
        }
      }
 catch (      SQLException e) {
        Util.logging.StackTrace(e.getStackTrace(),Thread.currentThread().getStackTrace()[1].getMethodName(),Thread.currentThread().getStackTrace()[1].getLineNumber(),Thread.currentThread().getStackTrace()[1].getClassName(),Thread.currentThread().getStackTrace()[1].getFileName());
      }
      if (!Config.database_keepalive) {
        Util.databaseManager.close();
      }
      if (!dupe) {
        AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
      }
      return dupe;
    }
 else     if (when.equalsIgnoreCase("String_Node_Str")) {
      if (!Config.database_keepalive) {
        Util.databaseManager.connect();
      }
      Config.hasForumBoard=false;
      try {
        if (Util.checkScript("String_Node_Str",Config.script_name,player,null,null,null)) {
          AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
          dupe=true;
        }
 else         if (Util.checkOtherName(player) != player) {
          AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
          dupe=true;
        }
      }
 catch (      SQLException e) {
        Util.logging.StackTrace(e.getStackTrace(),Thread.currentThread().getStackTrace()[1].getMethodName(),Thread.currentThread().getStackTrace()[1].getLineNumber(),Thread.currentThread().getStackTrace()[1].getClassName(),Thread.currentThread().getStackTrace()[1].getFileName());
      }
      if (!Config.database_keepalive) {
        Util.databaseManager.close();
      }
      if (!dupe) {
        AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
      }
      return dupe;
    }
 else {
      if (this.AuthDB_Authed.containsKey(Encryption.md5(player))) {
        String check=AuthDB_Authed.get(Encryption.md5(player));
        if (check.equalsIgnoreCase("String_Node_Str")) {
          checkneeded=false;
          return true;
        }
 else         if (check.equalsIgnoreCase("String_Node_Str")) {
          return false;
        }
      }
 else       if (checkneeded) {
        Util.logging.Debug("String_Node_Str");
        try {
          if (!Config.database_keepalive) {
            Util.databaseManager.connect();
          }
          Config.hasForumBoard=false;
          if (Util.checkScript("String_Node_Str",Config.script_name,player,null,null,null)) {
            AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
            dupe=true;
          }
          if (!Config.database_keepalive) {
            Util.databaseManager.close();
          }
          if (!dupe) {
            AuthDB_Authed.put(Encryption.md5(player),"String_Node_Str");
          }
          return dupe;
        }
 catch (        SQLException e) {
          Util.logging.StackTrace(e.getStackTrace(),Thread.currentThread().getStackTrace()[1].getMethodName(),Thread.currentThread().getStackTrace()[1].getLineNumber(),Thread.currentThread().getStackTrace()[1].getClassName(),Thread.currentThread().getStackTrace()[1].getFileName());
          Stop("String_Node_Str");
        }
      }
    }
  }
  return false;
}