[Demonstration 1]

[Buggy Method]
@Override
public void handle(final HttpDispatcherUriCompilation httpDispatcherUriCompilation, final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) {
    final RequestMapping requestMapping = httpDispatcherUriCompilation.getRequestMapping();
    final HttpController httpController = requestMapping.getHttpController();
    final Method method = requestMapping.getMethod();
    final Map<String, Object> parameters;
    final Object methodReturnObject;
    try {
        parameters = getParameters(httpDispatcherUriCompilation, httpServletRequest, httpServletResponse);
        methodReturnObject = parameters.values().isEmpty() ? method.invoke(httpController) : method.invoke(httpController, parameters.values().toArray());
    } catch (final IllegalArgumentException exception) {
        throw new HttpException(404);
    } catch (final IllegalAccessException | InvocationTargetException | IOException | ServletException exception) {
        throw new HttpException(500, exception);
    }
    if (methodReturnObject instanceof View) {
        final View view = (View) methodReturnObject;
        final String resolverPrefix = view.getLayoutName() == null ? WebApp.getWebAppConfiguration().getViewResolverPrefix() : WebApp.getWebAppConfiguration().getLayoutResolverPrefix();
        final String resolverSuffix = view.getLayoutName() == null ? WebApp.getWebAppConfiguration().getViewResolverSuffix() : WebApp.getWebAppConfiguration().getLayoutResolverSuffix();
        final String viewName;
        if (view.getLayoutName() == null) {
            viewName = view.getName();
        } else {
            viewName = view.getLayoutName();
            httpServletRequest.setAttribute("__view__", WebApp.getWebAppConfiguration().getViewResolverPrefix() + view.getName() + WebApp.getWebAppConfiguration().getViewResolverSuffix());
            httpServletRequest.setAttribute("__viewName__", view.getName());
        }
        httpServletRequest.setAttribute("__appName__", WebApp.getWebAppConfiguration().getAppName());
        httpServletRequest.setAttribute("__appVersion__", WebApp.getWebAppConfiguration().getAppVersion());
        try {
            httpServletRequest.getRequestDispatcher(resolverPrefix + viewName + resolverSuffix).forward(httpServletRequest, httpServletResponse);
        } catch (final ServletException | IOException exception) {
            throw new HttpException(500, exception);
        }
    } else if (!Void.TYPE.equals(method.getReturnType())) {
        final String acceptContentType = httpServletRequest.getHeader("Accept");
        final boolean useAcceptContentType = acceptContentType != null && !acceptContentType.equals("*/*");
        final Setable<String> contentType = new Setable<>(useAcceptContentType ? acceptContentType : WebApp.getWebAppConfiguration().getNonViewDefaultContentType());
        final byte[] content = httpDispatcherParserManager.parseOutgoing(contentType, useAcceptContentType, methodReturnObject);
        HttpDispatcherHelper.httpServletResponseWrite(httpServletResponse, 200, contentType.getValue(), content);
    }
}

[Buggy Hunk]
final Setable<String> contentType = new Setable<>(useAcceptContentType ? acceptContentType : WebApp.getWebAppConfiguration().getNonViewDefaultContentType());

[Patch]
final Setable<String> contentType = new Setable<>(httpServletResponse.getContentType() == null ? useAcceptContentType ? acceptContentType : WebApp.getWebAppConfiguration().getNonViewDefaultContentType() : httpServletResponse.getContentType());

[Demonstration 2]

[Buggy Method]
public String toString(String path) {
    String run = "mode = " + mode + "\n";
    if (mode.equals("clustering") || mode.equals("parameter_optimization") || mode.equals("dataAnalysis") || mode.equals("robustnessAnalysis")) {
        run += "dataConfig = ";
        run += StringUtils.join(dataSets, ',');
        run += "\n";
    }
    if (mode.equals("clustering") || mode.equals("parameter_optimization") || mode.equals("robustnessAnalysis")) {
        run += "programConfig = ";
        run += StringUtils.join(programs, ',');
        run += "\n";
        run += "qualityMeasures = ";
        run += StringUtils.join(qualityMeasures, ',');
        run += "\n";
    }
    if (mode.equals("parameter_optimization")) {
        run += "optimizationCriterion = " + optimizationCriterion + "\n";
        run += "optimizationIterations = " + optimizationIterations + "\n";
        run += "optimizationMethod = " + optimizationMethod + "\n\n";
        ArrayList<String> parametersToOptimize;
        for (Program program : programSettings) {
            parametersToOptimize = new ArrayList<String>();
            run += "[" + program.getName() + "]\n";
            for (ProgramParameter parameter : program.getParameters()) {
                if (parameter.getOptimize()) {
                    parametersToOptimize.add(parameter.getName());
                }
            }
            run += "optimizationParameters = " + StringUtils.join(parametersToOptimize, ',') + "\n\n";
        }
    }
    if (mode.equals("dataAnalysis")) {
        run += "dataStatistics = " + StringUtils.join(dataStatistics, ',') + "\n";
    }
    if (mode.equals("runAnalysis") || mode.equals("robustnessAnalysis")) {
        run += "uniqueRunIdentifiers = " + StringUtils.join(uniqueRunIdentifiers, ',') + "\n";
    }
    if (mode.equals("runAnalysis")) {
        run += "runStatistics = " + StringUtils.join(runStatistics, ',') + "\n";
    }
    if (mode.equals("runDataAnalysis")) {
        run += "runDataStatistics = " + StringUtils.join(runDataStatistics, ',') + "\n";
        run += "uniqueRunIdentifiers = " + StringUtils.join(uniqueRunIdentifiers, ',') + "\n";
        run += "uniqueDataIdentifiers = " + StringUtils.join(uniqueDataIdentifiers, ',') + "\n";
    }
    if (mode.equals("robustnessAnalysis")) {
        run += "randomizer = " + randomizer + "\n";
        run += "numberOfRandomizedDataSets = " + numberOfRandomizedDataSets + "\n";
        int randomizerCounter = 1;
        for (Randomizer rand : randomizers) {
            run += "\n[" + randomizer + "_" + randomizerCounter + "]\n";
            for (Parameter parameter : rand.getParameters()) {
                if (!parameter.getValue().isEmpty()) {
                    run += parameter.getName() + " = " + parameter.getValue() + "\n";
                }
            }
            randomizerCounter++;
        }
    }
    if (mode.equals("clustering") || mode.equals("parameter_optimization") || mode.equals("robustnessAnalysis")) {
        for (Program programSetting : programSettings) {
            for (ProgramParameter programParameter : programSetting.getParameters()) {
                run += "\n[" + programSetting.getName() + ":" + programParameter.getName() + "]\n";
                if (programParameter.getMinValue() != null) {
                    run += "minValue=" + programParameter.getMinValue() + "\n";
                }
                if (programParameter.getMaxValue() != null) {
                    run += "maxValue=" + programParameter.getMaxValue() + "\n";
                }
                if (programParameter.getValue() != null) {
                    run += "defaultValue=" + programParameter.getValue() + "\n";
                }
                if (programParameter.getOptions() != null) {
                    run += "options=" + programParameter.getOptions() + "\n";
                }
            }
        }
    }
    return run;
}

[Buggy Hunk]
if (parameter.getOptimize()) {

[Patch]
if (parameter.getOptimize() && parameter.getOptimizable()) {

[Demonstration 3]

[Buggy Method]
@Around("@annotation(com.cydeer.demo.memcached.annotation.CacheEvictExt)")
private Object cacheevictProcess(ProceedingJoinPoint jp) throws Throwable {
    Class<?> targetClz = jp.getTarget().getClass();
    String methodName = jp.getSignature().getName();
    if (!(jp.getSignature() instanceof MethodSignature)) {
        LOGGER.warn("该方法接口无法启用缓存功能: {}", jp.getSignature().toLongString());
        return jp.proceed();
    }
    MethodSignature methodSign = (MethodSignature) jp.getSignature();
    Method method = targetClz.getMethod(methodName, methodSign.getParameterTypes());
    cacheEvictExt = method.getAnnotation(CacheEvictExt.class);
    if (cacheEvictExt != null) {
        String cacheKey = CacheKeyUtils.buildCacheKey(cacheEvictExt.keyExt(), cacheEvictExt.keys(), targetClz, jp.getArgs());
        cacheApi.evict(cacheKey);
        // 清除 第二个 key
        if (cacheEvictExt.secondKeys() == null || cacheEvictExt.secondKeys().length > 0) {
            String cacheKeyBackUp = CacheKeyUtils.buildCacheKey(cacheEvictExt.keyExt(), cacheEvictExt.secondKeys(), targetClz, jp.getArgs());
            cacheApi.evict(cacheKeyBackUp);
        }
    }
    return jp.proceed();
}

[Buggy Hunk]
cacheEvictExt = method.getAnnotation(CacheEvictExt.class);

[Patch]
CacheEvictExt cacheEvictExt = method.getAnnotation(CacheEvictExt.class);