[Demonstration 1]

[Buggy Method]
@Override
public void afterPropertiesSet() throws Exception {
    if (swaggerControllerRequestMapping != null) {
        Utils.modifyRequestMapping(newRequestMapping);
    }
    scanApi();
    DefaultListableBeanFactory beanFactory = (DefaultListableBeanFactory) applicationContext.getAutowireCapableBeanFactory();
    BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(SwaggerController.class);
    builder.addPropertyValue("apiBasePath", apiBasePath);
    builder.addPropertyValue("apiClassMap", apiClassMap);
    builder.addPropertyValue("apiVersion", apiVersion);
    builder.addPropertyValue("apiListing", apiListing);
    beanFactory.registerBeanDefinition(name, builder.getBeanDefinition());
}

[Buggy Hunk]
Utils.modifyRequestMapping(newRequestMapping);

[Patch]
Utils.modifyRequestMapping(SwaggerController.class, newRequestMapping);

[Demonstration 2]

[Buggy Method]
protected static boolean isPrimitive(Class<?> clazz) {
    return (clazz.isPrimitive() || clazz == String.class || clazz == Long.class || clazz == java.util.Date.class || clazz == Boolean.class || clazz == Double.class || clazz == Float.class || clazz == Integer.class || clazz == BigInteger.class || clazz == BigDecimal.class || clazz == Character.class || clazz == Byte.class || clazz == Short.class || clazz == java.sql.Date.class || clazz == java.sql.Time.class || clazz == java.sql.Timestamp.class);
}

[Buggy Hunk]
protected static boolean isPrimitive(Class<?> clazz)

[Patch]
protected boolean isPrimitive(Class<?> clazz)

[Demonstration 3]

[Buggy Method]
@RequestMapping(value = "/timeline/{username}", method = RequestMethod.GET)
public String showUserTimeline(@PathVariable("username") String username, @ModelAttribute Timeline timeline, Model model, HttpSession session) {
    if (session == null || session.getAttribute("username") == null) {
        return "redirect:../login";
    }
    User profileUser = new User();
    List<Post> posts;
    if (isMyStream(username)) {
        profileUser.setUsername(session.getAttribute("username").toString());
        model.addAttribute("streamName", "My Stream");
        posts = persistency.findPostsForUser(profileUser.getUsername());
    } else {
        profileUser.setUsername(username);
        model.addAttribute("streamName", "von " + username);
        posts = persistency.findPostsForUser(profileUser.getUsername());
    }
    Set<String> following = persistency.getFollowingIds(profileUser.getUsername());
    Set<String> follower = persistency.getFollowerIds(profileUser.getUsername());
    boolean isFollowingProfileUser = follower.contains(profileUser.getUsername());
    boolean canFollow = !isMyStream(username) && !isFollowingProfileUser && !session.getAttribute("username").equals(username);
    System.out.println("Am I following this user: " + isFollowingProfileUser);
    model.addAttribute("posts", posts);
    System.out.println("Number of posts: " + posts.size());
    model.addAttribute("canFollow", canFollow);
    model.addAttribute("pageuser", profileUser.getUsername());
    model.addAttribute("profilepicture", "/images/profile-pictures/" + profileUser.getProfilePicture());
    model.addAttribute("timeline", timeline);
    model.addAttribute("followerCounter", follower.size() + " folgen " + "mir");
    model.addAttribute("followingCounter", following.size() + " " + "folge ich");
    return "my-stream";
}

[Buggy Hunk]
boolean isFollowingProfileUser = follower.contains(profileUser.getUsername());

[Patch]
boolean isFollowingProfileUser = follower.contains(session.getAttribute("username").toString());