[Demonstration 1]

[Buggy Method]
protected void handleRequestArgumentParameter(JnlpTemplate launcher) throws ServletErrorException {
    String[] argValues = ServletUtil.getParameters(launcher.parameterMap.remove(PARAM_ARGUMENT));
    if (launcher != null && launcher.rootElt != null && argValues != null) {
        try {
            Element applicationDescElt = launcher.rootElt.getChild(JNLP_TAG_ELT_APPLICATION_DESC);
            if (applicationDescElt == null) {
                applicationDescElt = launcher.rootElt.getChild(JNLP_TAG_ELT_APPLET_DESC);
                if (applicationDescElt == null) {
                    throw new IllegalStateException("JNLP TAG : <application-desc> or <applet-desc> is not found");
                } else {
                    // Arguments in Applet are formatted as properties
                    for (String newContent : argValues) {
                        // split any whitespace character: [ \t\n\x0B\f\r ]
                        String[] property = Pattern.compile("\\s").split(newContent, 2);
                        String propertyName = property != null && property.length > 0 ? property[0] : null;
                        String propertyValue = property != null && property.length > 1 ? property[1] : null;
                        if (propertyName != null && propertyValue != null) {
                            Element paramElt = new Element(JNLP_TAG_ELT_PARAM);
                            paramElt.setAttribute(JNLP_TAG_PRO_NAME, propertyName);
                            paramElt.setAttribute(JNLP_TAG_PRO_VALUE, propertyValue);
                            applicationDescElt.addContent(paramElt);
                        } else {
                            throw new IllegalStateException("Applet Query Parameter {property} is invalid : " + Arrays.toString(argValues));
                        }
                    }
                }
            } else {
                for (String newContent : argValues) {
                    applicationDescElt.addContent(new Element(JNLP_TAG_ELT_ARGUMENT).addContent(newContent));
                }
            }
        } catch (Exception e) {
            throw new ServletErrorException(HttpServletResponse.SC_NOT_ACCEPTABLE, "Can't add argument parameter to launcher template ", e);
        }
    }
}

[Buggy Hunk]
if (launcher != null && launcher.rootElt != null && argValues != null) {

[Patch]
if (launcher.rootElt != null && argValues != null) {

[Demonstration 2]

[Buggy Method]
public final void updateData(List<T> list) {
    try {
        eventList.getReadWriteLock().writeLock().lock();
        eventList.clear();
        eventList.addAll(list);
    } finally {
        eventList.getReadWriteLock().writeLock().unlock();
    }
    //Can not set strict on empty EventList - so we do it now (if possible)
    try {
        eventList.getReadWriteLock().readLock().lock();
        if (eventList.isEmpty()) {
            autoComplete.setStrict(strict);
        }
    } finally {
        eventList.getReadWriteLock().readLock().unlock();
    }
}

[Buggy Hunk]
if (eventList.isEmpty()) {

[Patch]
if (!eventList.isEmpty()) {

[Demonstration 3]

[Buggy Method]
@Override
public void render(float delta) {
    if (Assets.MANAGER.update()) {
        Application app = (Application) Gdx.app.getApplicationListener();
        app.setScreen(new GameScreen());
        this.dispose();
    }
}

[Buggy Hunk]
app.setScreen(new GameScreen());

[Patch]
app.setScreen(new MainMenuScreen());