[Demonstration 1]

[Buggy Method]
@Override
public void start() {
    LOG.info("Starting Kaa Sandbox Web Server...");
    String webappsDir = Environment.getServerHomeDir() + "/webapps";
    LOG.info("Webapps dir [{}]", webappsDir);
    server = new Server(webPort);
    HandlerCollection handlers = new HandlerCollection();
    sandboxWebAppContext = new WebAppContext();
    sandboxWebAppContext.setContextPath("/sandbox");
    sandboxWebAppContext.setDescriptor(webappsDir + "/sandbox/WEB-INF/web.xml");
    sandboxWebAppContext.setResourceBase(webappsDir + "/sandbox");
    avroUiSandboxWebAppContext = new WebAppContext();
    avroUiSandboxWebAppContext.setContextPath("/avroUiSandbox");
    avroUiSandboxWebAppContext.setDescriptor(webappsDir + "/avroUiSandbox/WEB-INF/web.xml");
    avroUiSandboxWebAppContext.setResourceBase(webappsDir + "/avroUiSandbox");
    RewriteHandler rewriteRoot2Sandbox = new RewriteHandler();
    rewriteRoot2Sandbox.setHandler(sandboxWebAppContext);
    RewritePatternRule rootRule = new RewritePatternRule();
    rootRule.setPattern("/");
    rootRule.setReplacement("/sandbox");
    rootRule.setTerminating(true);
    rewriteRoot2Sandbox.addRule(rootRule);
    handlers.addHandler(sandboxWebAppContext);
    handlers.addHandler(avroUiSandboxWebAppContext);
    hardlers.addHandler(rewriteRoot2Sandbox);
    server.setHandler(handlers);
    try {
        server.start();
        LOG.info("Kaa Sandbox Web Server started.");
    } catch (Exception e) {
        LOG.error("Error starting Kaa Sandbox Web Server!", e);
    }
    try {
        server.join();
    } catch (InterruptedException e) {
        LOG.error("Sandbox Web Server Interrupted!", e);
    }
}

[Buggy Hunk]
hardlers.addHandler(rewriteRoot2Sandbox);

[Patch]
handlers.addHandler(rewriteRoot2Sandbox);