Buggy code:
public class JavaWebServer { public static final String VERSION = "1.0" ; public static Config mainConfig ; public static ArrayList < Connection > runningThreads = new ArrayList < Connection > ( ) ; public static final FileManager fileManager = new FileManager ( ) ; public static final PatchBus patchBus = new PatchBus ( ) ; public static final HashMap < String , String > extensionToMime = new HashMap < String , String > ( ) ; public static void setupFolders ( ) { } public static void unpack ( ) { } public static void loadUnpacked ( ) { } public static void main ( String [ ] args ) { try { System . out . println ( "Loading<seq2seq4repair_space>Configs" ) ; JavaWebServer . mainConfig = new Config ( new File ( "C:\\jws\\main.cfg" ) , new ConfigFormat ( ) { public void format ( JSONObject json ) { if ( ! ( json . containsKey ( "version" ) ) ) json . put ( "version" , JavaWebServer . VERSION ) ; if ( ! ( json . containsKey ( "dir" ) ) ) json . put ( "dir" , "C:\\jws" ) ; if ( ! ( json . containsKey ( "htdocs" ) ) ) json . put ( "htdocs" , "htdocs" ) ; if ( ! ( json . containsKey ( "plugins" ) ) ) json . put ( "plugins" , "plugins" ) ; if ( ! ( json . containsKey ( "temp" ) ) ) json . put ( "temp" , "temp" ) ; if ( ! ( json . containsKey ( "bindport" ) ) ) json . put ( "bindport" , 80 ) ; if ( ! ( json . containsKey ( "errorpages" ) ) ) json . put ( "errorpages" , new JSONObject ( ) ) ; if ( ! ( json . containsKey ( "index" ) ) ) <START_BUG> json . put ( "index" , "index.jwsl,index.php,index.html" ) ; <END_BUG> if ( ! ( json . containsKey ( "ssl" ) ) ) json . put ( "ssl" , new JSONObject ( ) ) ; JSONObject ssl = ( ( JSONObject ) ( json . get ( "ssl" ) ) ) ; if ( ! ( ssl . containsKey ( "enabled" ) ) ) ssl . put ( "enabled" , false ) ; if ( ! ( ssl . containsKey ( "forceSSL" ) ) ) ssl . put ( "forceSSL" , false ) ; if ( ! ( ssl . containsKey ( "bindport" ) ) ) ssl . put ( "bindport" , 443 ) ; if ( ! ( ssl . containsKey ( "folder" ) ) ) ssl . put ( "folder" , "ssl" ) ; if ( ! ( ssl . containsKey ( "keyFile" ) ) ) ssl . put ( "keyFile" , "keystore" ) ; if ( ! ( ssl . containsKey ( "keystorePassword" ) ) ) ssl . put ( "keystorePassword" , "password" ) ; if ( ! ( ssl . containsKey ( "keyPassword" ) ) ) ssl . put ( "keyPassword" , "password" ) ; } } ) ; JavaWebServer . mainConfig . load ( ) ; JavaWebServer . setupFolders ( ) ; JavaWebServer . unpack ( ) ; JavaWebServer . loadUnpacked ( ) ; System . out . println ( "Loading<seq2seq4repair_space>Base<seq2seq4repair_space>Plugins" ) ; BaseLoader . loadBases ( ) ; int bindport = Integer . parseInt ( JavaWebServer . mainConfig . get ( "bindport" ) . toString ( ) ) ; System . out . println ( ( "Starting<seq2seq4repair_space>Server<seq2seq4repair_space>on<seq2seq4repair_space>" + bindport ) ) ; Thread tnssl = new Thread ( ) { public void run ( ) { try { ServerSocket server = new ServerSocket ( bindport ) ; while ( ! ( server . isClosed ( ) ) ) { Socket s = server . accept ( ) ; DataOutputStream out = new DataOutputStream ( s . getOutputStream ( ) ) ; out . flush ( ) ; DataInputStream in = new DataInputStream ( s . getInputStream ( ) ) ; Connection c = new Connection ( s , in , out , false ) ; c . start ( ) ; JavaWebServer . runningThreads . add ( c ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } } } ; tnssl . start ( ) ; if ( ( ( boolean ) ( ( ( JSONObject ) ( JavaWebServer . mainConfig . get ( "ssl" ) ) ) . get ( "enabled" ) ) ) ) { Thread tssl = new Thread ( ) { public void run ( ) { try { KeyStore ks = KeyStore . getInstance ( "JKS" ) ; InputStream ksIs = new FileInputStream ( JavaWebServer . fileManager . getSSLKeystore ( ) ) ; try { ks . load ( ksIs , ( ( JSONObject ) ( JavaWebServer . mainConfig . get ( "ssl" ) ) ) . get ( "keystorePassword" ) . toString ( ) . toCharArray ( ) ) ; } finally { if ( ksIs != null ) { ksIs . close ( ) ; } } KeyManagerFactory kmf = KeyManagerFactory . getInstance ( KeyManagerFactory . getDefaultAlgorithm ( ) ) ; kmf . init ( ks , ( ( JSONObject ) ( JavaWebServer . mainConfig . get ( "ssl" ) ) ) . get ( "keyPassword" ) . toString ( ) . toCharArray ( ) ) ; TrustManager [ ] trustAllCerts = new TrustManager [ ] { new X509TrustManager ( ) { public void checkClientTrusted ( X509Certificate [ ] certs , String authType ) { } public void checkServerTrusted ( X509Certificate [ ] certs , String authType ) { } public X509Certificate [ ] getAcceptedIssuers ( ) { return null ; } } } ; SSLContext sc = SSLContext . getInstance ( "TLSv1.2" ) ; sc . init ( kmf . getKeyManagers ( ) , trustAllCerts , new SecureRandom ( ) ) ;

Fix:
json . put ( "index" , "Index.class,index.jwsl,index.php,index.html" ) ;