Buggy code:
public class Main { private Options options ; private boolean welcome = true ; public Main ( ) { } public static void main ( String [ ] args ) { } public boolean parseArguments ( String [ ] args ) { } public void showOptions ( ) { } public static void doRun ( Main main ) { } public void run ( ) throws Exception { } public void run ( boolean join ) throws Exception { } protected void findThirdPartyPlugins ( Slf4jLog log , HandlerCollection handlers , File tempDir ) { File dir = new File ( options . getPlugins ( ) ) ; if ( ( dir . exists ( ) ) && ( dir . isDirectory ( ) ) ) { log . info ( ( "Scanning<seq2seq4repair_space>for<seq2seq4repair_space>3rd<seq2seq4repair_space>party<seq2seq4repair_space>plugins<seq2seq4repair_space>in<seq2seq4repair_space>directory:<seq2seq4repair_space>" + ( dir . getName ( ) ) ) ) ; File [ ] wars = dir . listFiles ( new FilenameFilter ( ) { @ Override public boolean accept ( File dir , String name ) { return isWarFileName ( name ) ; } } ) ; if ( wars != null ) { for ( File war : wars ) { String contextPath = "//" + ( war . getName ( ) ) ; if ( contextPath . endsWith ( ".war" ) ) { contextPath = contextPath . substring ( 0 , ( ( contextPath . length ( ) ) - 4 ) ) ; } if ( contextPath . equals ( options . getContextPath ( ) ) ) { throw new IllegalArgumentException ( ( ( "3rd<seq2seq4repair_space>party<seq2seq4repair_space>plugin<seq2seq4repair_space>" + ( war . getName ( ) ) ) + "<seq2seq4repair_space>cannot<seq2seq4repair_space>have<seq2seq4repair_space>same<seq2seq4repair_space>name<seq2seq4repair_space>as<seq2seq4repair_space>hawtio<seq2seq4repair_space>context<seq2seq4repair_space>path.<seq2seq4repair_space>Rename<seq2seq4repair_space>the<seq2seq4repair_space>plugin<seq2seq4repair_space>file<seq2seq4repair_space>to<seq2seq4repair_space>avoid<seq2seq4repair_space>the<seq2seq4repair_space>clash." ) ) ; } WebAppContext plugin = new WebAppContext ( ) ; plugin . setServer ( handlers . getServer ( ) ) ; plugin . setContextPath ( contextPath ) ; <START_BUG> plugin . setWar ( ( "file:////" + ( war . getAbsolutePath ( ) ) ) ) ; <END_BUG> plugin . setLogUrlOnStart ( true ) ; File pluginTempDir = new File ( tempDir , war . getName ( ) ) ; pluginTempDir . mkdirs ( ) ; plugin . setTempDirectory ( pluginTempDir ) ; plugin . setThrowUnavailableOnStartupException ( true ) ; try { plugin . start ( ) ; handlers . addHandler ( plugin ) ; log . info ( ( "Added<seq2seq4repair_space>3rd<seq2seq4repair_space>party<seq2seq4repair_space>plugin<seq2seq4repair_space>with<seq2seq4repair_space>context-path:<seq2seq4repair_space>" + contextPath ) ) ; System . out . println ( ( "Added<seq2seq4repair_space>3rd<seq2seq4repair_space>party<seq2seq4repair_space>plugin<seq2seq4repair_space>with<seq2seq4repair_space>context-path:<seq2seq4repair_space>" + contextPath ) ) ; } catch ( Exception e ) { log . warn ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>and<seq2seq4repair_space>start<seq2seq4repair_space>3rd<seq2seq4repair_space>party<seq2seq4repair_space>plugin<seq2seq4repair_space>with<seq2seq4repair_space>context-path:<seq2seq4repair_space>" + contextPath ) + "<seq2seq4repair_space>due<seq2seq4repair_space>" ) + ( e . getMessage ( ) ) ) , e ) ; } } } } } protected String findWar ( String ... paths ) { } protected boolean isWarFileName ( String name ) { } public String getWarLocation ( ) { } public void setWarLocation ( String warLocation ) { } public String getWar ( ) { } public void setWar ( String war ) { } public String getContextPath ( ) { } public void setContextPath ( String contextPath ) { } public Integer getPort ( ) { } public void setPort ( Integer port ) { } public String getExtraClassPath ( ) { } public void setExtraClassPath ( String extraClassPath ) { } public boolean isJoinServerThread ( ) { } public void setJoinServerThread ( boolean joinServerThread ) { } public boolean isHelp ( ) { } public void showWelcome ( boolean welcome ) { } }

Fix:
plugin . setWar ( war . getAbsolutePath ( ) ) ;