Buggy code:
private boolean checkStructure ( ) { if ( ! ( tableExists ( ( ( plugin . storagePrefix ) + "reportrts_user" ) ) ) ) { try ( Statement stmt = db . createStatement ( ) ) { if ( ( stmt . executeUpdate ( ( ( ( ( ( ( ( ( "CREATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>IF<seq2seq4repair_space>NOT<seq2seq4repair_space>EXISTS<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_user`<seq2seq4repair_space>(" ) + "`uid`<seq2seq4repair_space>int(10)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NULL<seq2seq4repair_space>AUTO_INCREMENT<seq2seq4repair_space>," ) + "`name`<seq2seq4repair_space>varchar(255)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>''<seq2seq4repair_space>," ) + "`uuid`<seq2seq4repair_space>char(36)<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>NULL<seq2seq4repair_space>," ) + "`banned`<seq2seq4repair_space>tinyint(1)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>," ) + "PRIMARY<seq2seq4repair_space>KEY<seq2seq4repair_space>(`uid`))" ) + "DEFAULT<seq2seq4repair_space>CHARACTER<seq2seq4repair_space>SET=utf8mb4<seq2seq4repair_space>COLLATE=utf8mb4_general_ci;" ) ) ) > 0 ) { plugin . getLogger ( ) . warning ( "[MySQL]<seq2seq4repair_space>Failed<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>the<seq2seq4repair_space>user<seq2seq4repair_space>table!" ) ; return false ; } } catch ( SQLException e ) { e . printStackTrace ( ) ; return false ; } plugin . getLogger ( ) . info ( "[MySQL]<seq2seq4repair_space>Created<seq2seq4repair_space>the<seq2seq4repair_space>user<seq2seq4repair_space>table." ) ; } else { ArrayList < String > columns = new ArrayList < > ( ) ; try ( ResultSet rs = query ( ( ( "show<seq2seq4repair_space>columns<seq2seq4repair_space>from<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_user`" ) ) ) { while ( rs . next ( ) ) { columns . add ( rs . getString ( "Field" ) ) ; } } catch ( SQLException e ) { e . printStackTrace ( ) ; return false ; } if ( ! ( columns . contains ( "uid" ) ) ) { if ( columns . contains ( "id" ) ) { try ( Statement stmt = db . createStatement ( ) ) { stmt . execute ( ( ( ( "ALTER<seq2seq4repair_space>TABLE<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_user`<seq2seq4repair_space>CHANGE<seq2seq4repair_space>COLUMN<seq2seq4repair_space>`id`<seq2seq4repair_space>`uid`<seq2seq4repair_space>int(10)<seq2seq4repair_space>" ) + "UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>AUTO_INCREMENT<seq2seq4repair_space>FIRST<seq2seq4repair_space>,<seq2seq4repair_space>DROP<seq2seq4repair_space>PRIMARY<seq2seq4repair_space>KEY,<seq2seq4repair_space>ADD<seq2seq4repair_space>PRIMARY<seq2seq4repair_space>KEY<seq2seq4repair_space>(`uid`)" ) ) ; plugin . getLogger ( ) . info ( "Migrated<seq2seq4repair_space>primary<seq2seq4repair_space>key<seq2seq4repair_space>of<seq2seq4repair_space>user<seq2seq4repair_space>table<seq2seq4repair_space>from<seq2seq4repair_space>`id`<seq2seq4repair_space>to<seq2seq4repair_space>`uid`." ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; return false ; } } } } if ( ! ( tableExists ( ( ( plugin . storagePrefix ) + "reportrts_ticket" ) ) ) ) { if ( tableExists ( ( ( plugin . storagePrefix ) + "reportrts_request" ) ) ) { try ( Statement stmt = db . createStatement ( ) ) { stmt . addBatch ( ( ( ( ( "RENAME<seq2seq4repair_space>TABLE<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_request`<seq2seq4repair_space>TO<seq2seq4repair_space>`" ) + ( plugin . storagePrefix ) ) + "reportrts_ticket`;" ) ) ; plugin . getLogger ( ) . info ( "Renamed<seq2seq4repair_space>request<seq2seq4repair_space>table<seq2seq4repair_space>to<seq2seq4repair_space>tickets." ) ; stmt . addBatch ( ( ( "UPDATE<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_ticket`<seq2seq4repair_space>SET<seq2seq4repair_space>`user_id`<seq2seq4repair_space>=<seq2seq4repair_space>'0'<seq2seq4repair_space>WHERE<seq2seq4repair_space>`user_id`<seq2seq4repair_space>IS<seq2seq4repair_space>NULL;" ) ) ; stmt . addBatch ( ( ( "UPDATE<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_ticket`<seq2seq4repair_space>SET<seq2seq4repair_space>`mod_id`<seq2seq4repair_space>=<seq2seq4repair_space>'0'<seq2seq4repair_space>WHERE<seq2seq4repair_space>`mod_id`<seq2seq4repair_space>IS<seq2seq4repair_space>NULL;" ) ) ; stmt . addBatch ( ( ( "UPDATE<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_ticket`<seq2seq4repair_space>SET<seq2seq4repair_space>`mod_timestamp`<seq2seq4repair_space>=<seq2seq4repair_space>'0'<seq2seq4repair_space>WHERE<seq2seq4repair_space>`mod_timestamp`<seq2seq4repair_space>IS<seq2seq4repair_space>NULL;" ) ) ; stmt . addBatch ( ( ( "UPDATE<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_ticket`<seq2seq4repair_space>SET<seq2seq4repair_space>`notified_of_completion`<seq2seq4repair_space>=<seq2seq4repair_space>'0'<seq2seq4repair_space>WHERE<seq2seq4repair_space>`notified_of_completion`<seq2seq4repair_space>IS<seq2seq4repair_space>NULL;" ) ) ; stmt . addBatch ( ( ( ( ( ( ( ( ( ( "ALTER<seq2seq4repair_space>TABLE<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_ticket`<seq2seq4repair_space>" ) + "CHANGE<seq2seq4repair_space>COLUMN<seq2seq4repair_space>`user_id`<seq2seq4repair_space>`userId`<seq2seq4repair_space>int(10)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>AFTER<seq2seq4repair_space>`id`,<seq2seq4repair_space>" ) + "CHANGE<seq2seq4repair_space>COLUMN<seq2seq4repair_space>`mod_id`<seq2seq4repair_space>`staffId`<seq2seq4repair_space>int(10)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>AFTER<seq2seq4repair_space>`userId`,<seq2seq4repair_space>" ) + "CHANGE<seq2seq4repair_space>COLUMN<seq2seq4repair_space>`mod_timestamp`<seq2seq4repair_space>`staffTime`<seq2seq4repair_space>int(10)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>AFTER<seq2seq4repair_space>`staffId`,<seq2seq4repair_space>" ) + "CHANGE<seq2seq4repair_space>COLUMN<seq2seq4repair_space>`mod_comment`<seq2seq4repair_space>`comment`<seq2seq4repair_space>varchar(255)<seq2seq4repair_space>CHARACTER<seq2seq4repair_space>SET<seq2seq4repair_space>utf8<seq2seq4repair_space>COLLATE<seq2seq4repair_space>utf8_general_ci<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>NULL<seq2seq4repair_space>AFTER<seq2seq4repair_space>`staffTime`,<seq2seq4repair_space>" ) + "CHANGE<seq2seq4repair_space>COLUMN<seq2seq4repair_space>`tstamp`<seq2seq4repair_space>`timestamp`<seq2seq4repair_space>int(10)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>AFTER<seq2seq4repair_space>`comment`,<seq2seq4repair_space>" ) + "CHANGE<seq2seq4repair_space>COLUMN<seq2seq4repair_space>`bc_server`<seq2seq4repair_space>`server`<seq2seq4repair_space>varchar(255)<seq2seq4repair_space>CHARACTER<seq2seq4repair_space>SET<seq2seq4repair_space>utf8<seq2seq4repair_space>COLLATE<seq2seq4repair_space>utf8_general_ci<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>''<seq2seq4repair_space>AFTER<seq2seq4repair_space>`world`,<seq2seq4repair_space>" ) + "CHANGE<seq2seq4repair_space>COLUMN<seq2seq4repair_space>`notified_of_completion`<seq2seq4repair_space>`notified`<seq2seq4repair_space>tinyint(1)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>AFTER<seq2seq4repair_space>`status`;" ) ) ; stmt . addBatch ( ( ( "ALTER<seq2seq4repair_space>TABLE<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_ticket`<seq2seq4repair_space>DROP<seq2seq4repair_space>COLUMN<seq2seq4repair_space>`comment`,<seq2seq4repair_space>MODIFY<seq2seq4repair_space>COLUMN<seq2seq4repair_space>`timestamp`<seq2seq4repair_space>int(10)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>AFTER<seq2seq4repair_space>`staffTime`;" ) ) ; plugin . getLogger ( ) . info ( "Migrated<seq2seq4repair_space>ticket<seq2seq4repair_space>data<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>new<seq2seq4repair_space>table<seq2seq4repair_space>structure." ) ; stmt . executeBatch ( ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; return false ; } } else { try ( Statement stmt = db . createStatement ( ) ) { if ( ( stmt . executeUpdate ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "CREATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>IF<seq2seq4repair_space>NOT<seq2seq4repair_space>EXISTS<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_ticket`<seq2seq4repair_space>(" ) + "`id`<seq2seq4repair_space>int(10)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NULL<seq2seq4repair_space>AUTO_INCREMENT<seq2seq4repair_space>," ) + "`userId`<seq2seq4repair_space>int(10)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>," ) + "`staffId`<seq2seq4repair_space>int(10)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>," ) + "`staffTime`<seq2seq4repair_space>int(10)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>," ) + "`timestamp`<seq2seq4repair_space>int(10)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>," ) + "`world`<seq2seq4repair_space>varchar(255)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>''<seq2seq4repair_space>," ) + "`server`<seq2seq4repair_space>varchar(255)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>''<seq2seq4repair_space>," ) + "`x`<seq2seq4repair_space>int(10)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>," ) + "`y`<seq2seq4repair_space>int(10)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>," ) + "`z`<seq2seq4repair_space>int(10)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>," ) + "`yaw`<seq2seq4repair_space>smallint(6)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>," ) + "`pitch`<seq2seq4repair_space>smallint(6)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>," ) + "`text`<seq2seq4repair_space>varchar(255)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>''<seq2seq4repair_space>," ) + "`status`<seq2seq4repair_space>tinyint(1)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NULL<seq2seq4repair_space>," ) + "`notified`<seq2seq4repair_space>tinyint(1)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NULL<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0<seq2seq4repair_space>," ) + "PRIMARY<seq2seq4repair_space>KEY<seq2seq4repair_space>(`id`))" ) + "DEFAULT<seq2seq4repair_space>CHARACTER<seq2seq4repair_space>SET=utf8mb4<seq2seq4repair_space>COLLATE=utf8mb4_general_ci;" ) ) ) > 0 ) { plugin . getLogger ( ) . warning ( "[MySQL]<seq2seq4repair_space>Failed<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>the<seq2seq4repair_space>ticket<seq2seq4repair_space>table!" ) ; return false ; } } catch ( SQLException e ) { e . printStackTrace ( ) ; return false ; } } plugin . getLogger ( ) . info ( "[MySQL]<seq2seq4repair_space>Created<seq2seq4repair_space>the<seq2seq4repair_space>ticket<seq2seq4repair_space>table." ) ; } else { ArrayList < String > columns = new ArrayList < > ( ) ; try ( ResultSet rs = query ( ( ( "show<seq2seq4repair_space>columns<seq2seq4repair_space>from<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_user`" ) ) ) { while ( rs . next ( ) ) { columns . add ( rs . getString ( "Field" ) ) ; } } catch ( SQLException e ) { e . printStackTrace ( ) ; return false ; } if ( ! ( columns . contains ( "uuid" ) ) ) { plugin . getLogger ( ) . severe ( "The<seq2seq4repair_space>UUID<seq2seq4repair_space>field<seq2seq4repair_space>is<seq2seq4repair_space>missing,<seq2seq4repair_space>your<seq2seq4repair_space>data<seq2seq4repair_space>is<seq2seq4repair_space>probably<seq2seq4repair_space>very<seq2seq4repair_space>old.<seq2seq4repair_space>Please<seq2seq4repair_space>run<seq2seq4repair_space>a<seq2seq4repair_space>older<seq2seq4repair_space>build<seq2seq4repair_space>of<seq2seq4repair_space>ReportRTS<seq2seq4repair_space>to<seq2seq4repair_space>migrate<seq2seq4repair_space>the<seq2seq4repair_space>data." ) ; plugin . getServer ( ) . getPluginManager ( ) . disablePlugin ( plugin ) ; return false ; } } if ( ! ( tableExists ( ( ( plugin . storagePrefix ) + "reportrts_comment" ) ) ) ) { try ( Statement stmt = db . createStatement ( ) ) { <START_BUG> if ( ( stmt . executeUpdate ( ( ( ( ( ( ( ( ( ( "CREATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>IF<seq2seq4repair_space>NOT<seq2seq4repair_space>EXISTS<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_comment`<seq2seq4repair_space>(" ) + "`cid`int(11)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>AUTO_INCREMENT,<seq2seq4repair_space>" ) + "`name`<seq2seq4repair_space>varchar(255)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "`timestamp`<seq2seq4repair_space>int(11)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "`comment`<seq2seq4repair_space>varchar(255)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "`ticket`<seq2seq4repair_space>int(11)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "PRIMARY<seq2seq4repair_space>KEY<seq2seq4repair_space>(`id`))" ) + "DEFAULT<seq2seq4repair_space>CHARACTER<seq2seq4repair_space>SET=utf8mb4<seq2seq4repair_space>COLLATE=utf8mb4_general_ci;" ) ) ) > 0 ) { <END_BUG> plugin . getLogger ( ) . warning ( "[MySQL]<seq2seq4repair_space>Failed<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>the<seq2seq4repair_space>ticket<seq2seq4repair_space>table!" ) ; return false ; } } catch ( SQLException e ) { e . printStackTrace ( ) ; return false ; } plugin . getLogger ( ) . info ( "[MySQL]<seq2seq4repair_space>Created<seq2seq4repair_space>the<seq2seq4repair_space>comment<seq2seq4repair_space>table." ) ; } return true ; } private boolean tableExists ( String table ) { } private boolean loadData ( ) { } @ Override public boolean resetNotifications ( ) { } @ Override public int createUser ( String username ) { } @ Override public int createUser ( UUID uuid ) { }

Fix:
if ( ( stmt . executeUpdate ( ( ( ( ( ( ( ( ( ( "CREATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>IF<seq2seq4repair_space>NOT<seq2seq4repair_space>EXISTS<seq2seq4repair_space>`" + ( plugin . storagePrefix ) ) + "reportrts_comment`<seq2seq4repair_space>(" ) + "`cid`int(11)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>AUTO_INCREMENT,<seq2seq4repair_space>" ) + "`name`<seq2seq4repair_space>varchar(255)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "`timestamp`<seq2seq4repair_space>int(11)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "`comment`<seq2seq4repair_space>varchar(255)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "`ticket`<seq2seq4repair_space>int(11)<seq2seq4repair_space>UNSIGNED<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "PRIMARY<seq2seq4repair_space>KEY<seq2seq4repair_space>(`cid`))" ) + "DEFAULT<seq2seq4repair_space>CHARACTER<seq2seq4repair_space>SET=utf8mb4<seq2seq4repair_space>COLLATE=utf8mb4_general_ci;" ) ) ) > 0 ) {