Buggy code:
public static void bangCommands ( String command , ircBot ircBot , String channel , boolean isAdmin ) { if ( command . toLowerCase ( ) . startsWith ( "wiki" ) ) { if ( ( command . length ( ) ) < 6 ) { globalFunctions . writeMsg ( ircBot , channel , "The<seq2seq4repair_space>correct<seq2seq4repair_space>usage<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>command<seq2seq4repair_space>is<seq2seq4repair_space>!wiki<seq2seq4repair_space><article>,<seq2seq4repair_space>example:<seq2seq4repair_space>!wiki<seq2seq4repair_space>China" ) ; return ; } command = command . substring ( 5 , command . length ( ) ) ; command = command . trim ( ) ; command = command . replace ( "<seq2seq4repair_space>" , "_" ) ; globalFunctions . writeMsg ( ircBot , channel , ( "http:////en.wikipedia.org//wiki//" + command ) ) ; } if ( command . toLowerCase ( ) . startsWith ( "swwiki" ) ) { if ( ( command . length ( ) ) < 6 ) { globalFunctions . writeMsg ( ircBot , channel , "The<seq2seq4repair_space>correct<seq2seq4repair_space>usage<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>command<seq2seq4repair_space>is<seq2seq4repair_space>!swwiki<seq2seq4repair_space><article>,<seq2seq4repair_space>example:<seq2seq4repair_space>!swwiki<seq2seq4repair_space>Magic<seq2seq4repair_space>Archer" ) ; return ; } command = command . substring ( 6 , command . length ( ) ) ; command = command . trim ( ) ; command = command . replace ( "<seq2seq4repair_space>" , "-" ) ; globalFunctions . writeMsg ( ircBot , channel , ( "http:////summonerswarskyarena.info//" + command ) ) ; } if ( command . toLowerCase ( ) . startsWith ( "seen" ) ) { String lastSeen = globalFunctions . logScrape ( command , channel , ircBot ) ; globalFunctions . writeMsg ( ircBot , channel , lastSeen ) ; } if ( ( command . equalsIgnoreCase ( "forums" ) ) || ( command . equalsIgnoreCase ( "forum" ) ) ) { globalFunctions . writeMsg ( ircBot , channel , "C++<seq2seq4repair_space>Forums:<seq2seq4repair_space>http:////beginnerscpp.com//forums//" ) ; } if ( command . toLowerCase ( ) . startsWith ( "getinfo" ) ) { if ( ( command . length ( ) ) > 8 ) { command = command . substring ( 8 , command . length ( ) ) ; command = command . trim ( ) ; System . out . println ( ( "Getinfo:<seq2seq4repair_space>" + command ) ) ; globalFunctions . writeServerMsg ( ircBot , ( ( ( "whois<seq2seq4repair_space>" + ( ircBot . getServerHost ( ) . substring ( 1 ) ) ) + "<seq2seq4repair_space>" ) + command ) ) ; } else { globalFunctions . writeMsg ( ircBot , channel , "The<seq2seq4repair_space>getInfo<seq2seq4repair_space>command<seq2seq4repair_space>is<seq2seq4repair_space>meant<seq2seq4repair_space>to<seq2seq4repair_space>take<seq2seq4repair_space>a<seq2seq4repair_space>username<seq2seq4repair_space>(Ex:<seq2seq4repair_space>!getinfo<seq2seq4repair_space>DemonSkye)" ) ; } } if ( ( command . toLowerCase ( ) . startsWith ( "showhost" ) ) || ( command . toLowerCase ( ) . startsWith ( "showinfo" ) ) ) { if ( isAdmin ) { if ( ( command . length ( ) ) > 9 ) { String userName = command . substring ( 9 , command . length ( ) ) ; userName = userName . trim ( ) ; System . out . println ( ( "UserName:<seq2seq4repair_space>" + userName ) ) ; String userHost = ircBot . getUserHostName ( userName ) ; System . out . println ( ( "userHost:<seq2seq4repair_space>" + userHost ) ) ; System . out . println ( ( ( ( ( "Bot<seq2seq4repair_space>Command:<seq2seq4repair_space>PRIVMSG" + channel ) + "Information<seq2seq4repair_space>for<seq2seq4repair_space>user:<seq2seq4repair_space>" ) + userName ) + userHost ) ) ; globalFunctions . writeMsg ( ircBot , channel , ( ( ( ( ( "Information<seq2seq4repair_space>for<seq2seq4repair_space>user:<seq2seq4repair_space>" + userName ) + "--<seq2seq4repair_space>Hostname:<seq2seq4repair_space>" ) + userHost ) + "<seq2seq4repair_space>IP<seq2seq4repair_space>Address:<seq2seq4repair_space>" ) + ( globalFunctions . getIpFromHostName ( userHost ) ) ) ) ; } else { globalFunctions . writeMsg ( ircBot , channel , "The<seq2seq4repair_space>showInfo<seq2seq4repair_space>command<seq2seq4repair_space>is<seq2seq4repair_space>meant<seq2seq4repair_space>to<seq2seq4repair_space>take<seq2seq4repair_space>a<seq2seq4repair_space>username<seq2seq4repair_space>(Ex:<seq2seq4repair_space>!showInfo<seq2seq4repair_space>DemonSkye)" ) ; } } else { globalFunctions . writeMsg ( ircBot , channel , "You<seq2seq4repair_space>do<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>adequate<seq2seq4repair_space>permissions<seq2seq4repair_space>to<seq2seq4repair_space>use<seq2seq4repair_space>this<seq2seq4repair_space>command." ) ; } } if ( ( command . toLowerCase ( ) . contains ( "weather" ) ) || ( command . toLowerCase ( ) . contains ( "temp" ) ) ) { int findTemp = command . lastIndexOf ( "temp" ) ; String command2 = command . substring ( findTemp , command . length ( ) ) ; if ( ( command2 . length ( ) ) > 5 ) { command2 = command2 . substring ( 5 , command2 . length ( ) ) ; command2 = command2 . trim ( ) ; <START_BUG> String userHostName = ircBot . getUserHostName ( command2 ) ; <END_BUG> globalFunctions . doWeather ( userHostName , ircBot , channel ) ; } else { String userHostName = globalFunctions . getHostByMsg ( command ) ; globalFunctions . doWeather ( userHostName , ircBot , channel ) ; } } if ( ( command . equalsIgnoreCase ( "c++list" ) ) || ( command . equalsIgnoreCase ( "c++<seq2seq4repair_space>list" ) ) ) { globalFunctions . writeMsg ( ircBot , channel , "C++<seq2seq4repair_space>Linked<seq2seq4repair_space>List<seq2seq4repair_space>Example<seq2seq4repair_space>implementation:<seq2seq4repair_space>http:////beginnerscpp.com//forums//index.php//topic,47.0.html//" ) ; } if ( command . equalsIgnoreCase ( "tutorials" ) ) { globalFunctions . writeMsg ( ircBot , channel , "BeginnersC++<seq2seq4repair_space>New<seq2seq4repair_space>Tutorials:<seq2seq4repair_space>http:////beginnerscpp.com//category//new-tutorials//" ) ; } if ( command . equalsIgnoreCase ( "plug" ) ) { globalFunctions . writeMsg ( ircBot , channel , ( "Hopefully<seq2seq4repair_space>this<seq2seq4repair_space>was<seq2seq4repair_space>helpful<seq2seq4repair_space>to<seq2seq4repair_space>you,<seq2seq4repair_space>consider<seq2seq4repair_space>unblocking<seq2seq4repair_space>us<seq2seq4repair_space>from<seq2seq4repair_space>adblock,<seq2seq4repair_space>telling<seq2seq4repair_space>your<seq2seq4repair_space>friends<seq2seq4repair_space>and<seq2seq4repair_space>if<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>" + "the<seq2seq4repair_space>means,<seq2seq4repair_space>you<seq2seq4repair_space>could<seq2seq4repair_space>consider<seq2seq4repair_space>donating:<seq2seq4repair_space>http:////beginnerscpp.com//donate//" ) ) ; } if ( command . toLowerCase ( ) . equalsIgnoreCase ( "file" ) ) { globalFunctions . writeMsg ( ircBot , channel , "Lesson<seq2seq4repair_space>13:<seq2seq4repair_space>File<seq2seq4repair_space>I//O<seq2seq4repair_space>--<seq2seq4repair_space>http:////beginnerscpp.com//placeholder-lesson-13-file-input-output//" ) ; } if ( command . toLowerCase ( ) . equalsIgnoreCase ( "string" ) ) { globalFunctions . writeMsg ( ircBot , channel , "Lesson<seq2seq4repair_space>12:<seq2seq4repair_space>Working<seq2seq4repair_space>With<seq2seq4repair_space>Strings<seq2seq4repair_space>--<seq2seq4repair_space>http:////beginnerscpp.com//lesson-12-working-with-strings//" ) ; } if ( command . toLowerCase ( ) . equalsIgnoreCase ( "ss" ) ) { globalFunctions . writeMsg ( ircBot , channel , "Lesson<seq2seq4repair_space>17:<seq2seq4repair_space>Data<seq2seq4repair_space>Validation<seq2seq4repair_space>with<seq2seq4repair_space>StringStream<seq2seq4repair_space>--<seq2seq4repair_space>http:////beginnerscpp.com//placeholder-lesson-17-data-validation-type-checking-with-stringstream//" ) ; } if ( command . toLowerCase ( ) . equalsIgnoreCase ( "debug" ) ) { globalFunctions . writeMsg ( ircBot , channel , "Lesson<seq2seq4repair_space>8:<seq2seq4repair_space>Hard<seq2seq4repair_space>Debugging--<seq2seq4repair_space>http:////beginnerscpp.com//lesson-8-hard-debugging//" ) ; } if ( ( command . toLowerCase ( ) . equalsIgnoreCase ( "array" ) ) || ( command . toLowerCase ( ) . equalsIgnoreCase ( "arrays" ) ) ) { globalFunctions . writeMsg ( ircBot , channel , "http:////beginnerscpp.com//placeholder-lesson-14-introduction-to-arrays//" ) ; } if ( ( command . toLowerCase ( ) . equalsIgnoreCase ( "function" ) ) || ( command . toLowerCase ( ) . equalsIgnoreCase ( "functions" ) ) ) { globalFunctions . writeMsg ( ircBot , channel , "Lesson<seq2seq4repair_space>18:<seq2seq4repair_space>Intro<seq2seq4repair_space>To<seq2seq4repair_space>Functions<seq2seq4repair_space>--<seq2seq4repair_space>http:////beginnerscpp.com//placeholder-lesson-18-introduction-to-functions//" ) ; }

Fix:
String userHostName = ircBot . getUserHostName ( command2 . toLowerCase ( ) ) ;