Buggy code:
public class BanPlugin extends JavaPlugin implements Listener { public static final String MSG_PREFIX = ( ( ( ( ( ChatColor . GRAY ) + "[" ) + ( ChatColor . GOLD ) ) + "Ban" ) + ( ChatColor . GRAY ) ) + "]<seq2seq4repair_space>" ; public static final ChatColor COLOR_INFO = ChatColor . AQUA ; public static final ChatColor COLOR_WARNING = ChatColor . RED ; public static final ChatColor COLOR_NAME = ChatColor . GOLD ; private final ConcurrentHashMap < Player , Boolean > debugees = new ConcurrentHashMap < Player , Boolean > ( ) ; public final ConcurrentHashMap < String , String > settings = new ConcurrentHashMap < String , String > ( ) ; public static DbPool dbpool = null ; String baseDir = "plugins//BanPlugin" ; String configFile = "settings.txt" ; public static final Logger logger = Logger . getLogger ( "Minecraft.BanPlugin" ) ; public void onDisable ( ) { } public void onEnable ( ) { } public boolean onCommand ( CommandSender sender , Command cmd , String commandLabel , String [ ] args ) { } @ EventHandler public void onPlayerLogin ( PlayerLoginEvent event ) { } private void initDbPool ( ) { } public boolean isDebugging ( final Player player ) { } public void setDebugging ( final Player player , final boolean value ) { } private void loadSettings ( ) { } private void respond ( Player player , String message ) { } private boolean permBan ( Connection dbh , String p_name , String p_uuid , String p_ip , String op , String reason ) { } private boolean tempBan ( Connection dbh , String p_name , String p_uuid , String p_ip , String op , String reason , String expires ) { } private boolean unBan ( Connection dbh , String p_name , String p_uuid , String p_ip , String op , String reason ) { } private String uuid_by_name ( Connection dbh , String p_name ) { } private String ip_by_name ( Connection dbh , String p_name ) { } private String banned ( Connection dbh , String p_name , String p_uuid , String p_ip ) { String message = null ; boolean permanent = false ; try { PreparedStatement sth ; sth = dbh . prepareStatement ( ( "REPLACE<seq2seq4repair_space>INTO<seq2seq4repair_space>logins<seq2seq4repair_space>" + ( ( "(name,<seq2seq4repair_space>uuid,<seq2seq4repair_space>ip)" + "VALUES<seq2seq4repair_space>" ) + "(?,<seq2seq4repair_space>?,<seq2seq4repair_space>?)" ) ) ) ; sth . setNString ( 1 , p_name ) ; sth . setNString ( 2 , p_uuid ) ; sth . setNString ( 3 , p_ip ) ; sth . execute ( ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; BanPlugin . logger . warning ( ( ( "[Ban]<seq2seq4repair_space>" + "(trace)<seq2seq4repair_space>SQL<seq2seq4repair_space>error:<seq2seq4repair_space>" ) + ( e . getLocalizedMessage ( ) ) ) ) ; } try { PreparedStatement sth ; sth = dbh . prepareStatement ( ( "UPDATE<seq2seq4repair_space>bans<seq2seq4repair_space>" + ( ( ( "SET<seq2seq4repair_space>player_uuid<seq2seq4repair_space>=<seq2seq4repair_space>?,<seq2seq4repair_space>player_ip<seq2seq4repair_space>=<seq2seq4repair_space>?" + "WHERE<seq2seq4repair_space>player_name<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>" ) + "AND<seq2seq4repair_space>(player_uuid<seq2seq4repair_space>IS<seq2seq4repair_space>NULL<seq2seq4repair_space>OR<seq2seq4repair_space>player_uuid<seq2seq4repair_space>=<seq2seq4repair_space>'')<seq2seq4repair_space>" ) + "AND<seq2seq4repair_space>(player_ip<seq2seq4repair_space>IS<seq2seq4repair_space>NULL<seq2seq4repair_space>OR<seq2seq4repair_space>player_ip<seq2seq4repair_space>=<seq2seq4repair_space>'')" ) ) ) ; sth . setNString ( 1 , p_uuid ) ; sth . setNString ( 2 , p_ip ) ; sth . setNString ( 3 , p_name ) ; sth . execute ( ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; BanPlugin . logger . warning ( ( ( "[Ban]<seq2seq4repair_space>" + "(update)<seq2seq4repair_space>SQL<seq2seq4repair_space>error:<seq2seq4repair_space>" ) + ( e . getLocalizedMessage ( ) ) ) ) ; } try { PreparedStatement sth ; <START_BUG> sth = dbh . prepareStatement ( ( ( ( ( ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>bans<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>0=1<seq2seq4repair_space>" ) + ( settings . get ( "enforce_uuid" ) . equalsIgnoreCase ( "yes" ) ? "OR<seq2seq4repair_space>(player_uuid<seq2seq4repair_space>!=<seq2seq4repair_space>''<seq2seq4repair_space>AND<seq2seq4repair_space>player_uuid<seq2seq4repair_space>LIKE<seq2seq4repair_space>?)<seq2seq4repair_space>" : "" ) ) + ( settings . get ( "enforce_ip" ) . equalsIgnoreCase ( "yes" ) ? "OR<seq2seq4repair_space>(player_ip<seq2seq4repair_space>!=<seq2seq4repair_space>''<seq2seq4repair_space>AND<seq2seq4repair_space>player_ip<seq2seq4repair_space>LIKE<seq2seq4repair_space>?)<seq2seq4repair_space>" : "" ) ) + "AND<seq2seq4repair_space>(expires<seq2seq4repair_space>IS<seq2seq4repair_space>NULL<seq2seq4repair_space>OR<seq2seq4repair_space>expires<seq2seq4repair_space><<seq2seq4repair_space>NOW())<seq2seq4repair_space>" ) + "ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>issued" ) ) ; <END_BUG> Integer i = 1 ; if ( settings . get ( "enforce_uuid" ) . equalsIgnoreCase ( "yes" ) ) { BanPlugin . logger . info ( ( "[Ban]<seq2seq4repair_space>" + "(check)<seq2seq4repair_space>Enforcing<seq2seq4repair_space>uuid<seq2seq4repair_space>bans" ) ) ; sth . setNString ( i , p_uuid ) ; i ++ ; } if ( settings . get ( "enforce_ip" ) . equalsIgnoreCase ( "yes" ) ) { BanPlugin . logger . info ( ( "[Ban]<seq2seq4repair_space>" + "(check)<seq2seq4repair_space>Enforcing<seq2seq4repair_space>ip<seq2seq4repair_space>bans" ) ) ; sth . setNString ( i , p_ip ) ; i ++ ; } ResultSet result = sth . executeQuery ( ) ; while ( result . next ( ) ) { BanPlugin . logger . info ( ( ( ( ( ( ( ( ( "[Ban]<seq2seq4repair_space>" + "(check)<seq2seq4repair_space>found<seq2seq4repair_space>" ) + ( result . getString ( "type" ) ) ) + "<seq2seq4repair_space>for<seq2seq4repair_space>" ) + ( result . getString ( "player_name" ) ) ) + "<seq2seq4repair_space>uuid=" ) + ( result . getString ( "player_uuid" ) ) ) + "<seq2seq4repair_space>ip=" ) + ( result . getString ( "player_ip" ) ) ) ) ; if ( result . getString ( "type" ) . equalsIgnoreCase ( "permban" ) ) { message = ( ( "Banned<seq2seq4repair_space>by<seq2seq4repair_space>" + ( result . getString ( "issued_by" ) ) ) + ":<seq2seq4repair_space>" ) + ( result . getString ( "reason" ) ) ; permanent = true ; continue ; } if ( ( result . getString ( "type" ) . equalsIgnoreCase ( "tempban" ) ) && ( permanent == false ) ) { message = ( ( ( ( "Banned<seq2seq4repair_space>by<seq2seq4repair_space>" + ( result . getString ( "issued_by" ) ) ) + "<seq2seq4repair_space>until<seq2seq4repair_space>" ) + ( result . getString ( "expires" ) ) ) + ":<seq2seq4repair_space>" ) + ( result . getString ( "reason" ) ) ; continue ; } if ( result . getString ( "type" ) . equalsIgnoreCase ( "unban" ) ) { message = null ; permanent = false ; continue ; } } return message ; } catch ( SQLException e ) { e . printStackTrace ( ) ; BanPlugin . logger . warning ( ( ( "[Ban]<seq2seq4repair_space>" + "(check)<seq2seq4repair_space>SQL<seq2seq4repair_space>error:<seq2seq4repair_space>" ) + ( e . getLocalizedMessage ( ) ) ) ) ; } return null ; } }

Fix:
sth = dbh . prepareStatement ( ( ( ( ( ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>bans<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>0=1<seq2seq4repair_space>" ) + ( settings . get ( "enforce_uuid" ) . equalsIgnoreCase ( "yes" ) ? "OR<seq2seq4repair_space>(player_uuid<seq2seq4repair_space>!=<seq2seq4repair_space>''<seq2seq4repair_space>AND<seq2seq4repair_space>player_uuid<seq2seq4repair_space>LIKE<seq2seq4repair_space>?)<seq2seq4repair_space>" : "" ) ) + ( settings . get ( "enforce_ip" ) . equalsIgnoreCase ( "yes" ) ? "OR<seq2seq4repair_space>(player_ip<seq2seq4repair_space>!=<seq2seq4repair_space>''<seq2seq4repair_space>AND<seq2seq4repair_space>player_ip<seq2seq4repair_space>LIKE<seq2seq4repair_space>?)<seq2seq4repair_space>" : "" ) ) + "AND<seq2seq4repair_space>(expires<seq2seq4repair_space>IS<seq2seq4repair_space>NULL<seq2seq4repair_space>OR<seq2seq4repair_space>expires<seq2seq4repair_space>><seq2seq4repair_space>NOW())<seq2seq4repair_space>" ) + "ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>issued" ) ) ;