[Demonstration 1]

[Buggy Method]
@RequestMapping(value = "/login", method = RequestMethod.POST, produces = { "application/json;charset=UTF-8" })
@ResponseBody
public Object login(@RequestBody LoginRequest p) {
    System.out.println("" + p.getAction().getCurrent_lat());
    LoginResponse t = null;
    try {
        if (appuserService.checkPhone(p.getAction().getPhone()) == null) {
            return ResponseData.creatResponseWithFailMessage(1, 1, "there are no this user", "Rf");
        }
        t = appuserService.loginAppUser(p.getAction());
        if (t != null) {
            HttpSession s = this.getRequest().getSession();
            s.setAttribute("LoginResponse", t);
            t.setStattus("login successfully.");
        } else {
            //t.setStattus("faild");
            return ResponseData.creatResponseWithFailMessage(1, 1, "password is error", "Rf");
        }
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return ResponseData.creatResponseWithSuccessMessage(null, t);
}

[Buggy Hunk]
if (appuserService.checkPhone(p.getAction().getPhone()) == null) {

[Patch]
if (appuserService.checkPhone(p.getAction().getPhone()) == null&& StringUtils.isEmpty(p.getAction().getUser_token())) {

[Demonstration 2]

[Buggy Method]
public void playGame(boolean isMultiPlayer, boolean isMaster) {
    gameFrameRef.remove(this);
    gameFrameRef.add(GamePanel.instantiate(isMultiPlayer, isMaster), BorderLayout.CENTER);
    gameFrameRef.repaint();
}

[Buggy Hunk]
gameFrameRef.add(GamePanel.instantiate(isMultiPlayer, isMaster),

[Patch]
gameFrameRef.add(GamePanel.getGamePanel(),

[Demonstration 3]

[Buggy Method]
public JSONObject jsonizeObject(JSONObject json, Object o, JSONObject conf) {
    try {
        // FAIL DEFAULT
        if (o == null)
            return (json);
        json = (json != null) ? json : new JSONObject();
        conf = (conf != null) ? conf : new JSONObject();
        Integer rootConf = extractDotConf(conf.get("."), 0x0);
        // SKIP
        if ((rootConf & SKIP) != 0x0)
            return (json);
        // IS ENTITY
        ClassMetadata meta = this.cmn.getClassMetadata(o.getClass());
        if (meta == null)
            throw (new IllegalArgumentException("Argument o is not mapped entity, metadata not found:" + o.getClass().toString()));
        //json.put(meta.getIdentifierPropertyName(), meta.getIdentifier(o));
        String id = meta.getIdentifierPropertyName();
        if (id != null)
            json.put(id, getField(o, id).get(o));
        // ID_ONLY
        if ((rootConf & ID_ONLY) != 0x0) {
            return (json);
        }
        // RETAIN & EXCLUDE
        List<String> names = new ArrayList<String>(Arrays.asList(meta.getPropertyNames()));
        if ((rootConf & RETAIN_NAMED) != 0x0) {
            names.retainAll(conf.keySet());
            names.addAll(conf.keySet());
        }
        if ((rootConf & EXCLUDE_NAMED) != 0x0)
            names.retainAll(conf.keySet());
        if ((rootConf & INCLUDE_NAMED) != 0x0)
            names.addAll(conf.keySet());
        // SERIALIZE
        for (String s : names) {
            Integer nodeConf = extractDotConf(conf.get(s), ID_ONLY);
            // SKIP
            if ((nodeConf & SKIP) != 0x0)
                continue;
            Field f = getField(o, s);
            Class c = f.getType();
            // PRIMITIVE
            if (this.pc.isPrimitive(c)) {
                json.put(s, f.get(o));
                continue;
            }
            // ENTITY
            if (this.cmn.getClassMetadata(c) != null) {
                json.put(s, this.jsonizeObject(null, f.get(o), wrapDotConf(conf.get(s), nodeConf)));
                continue;
            }
            // ARRAY
            if (c.isArray()) {
                if (this.pc.isPrimitive(c.getComponentType())) {
                    json.put(s, f.get(o));
                    continue;
                }
                // else
                // {
                json.put(s, this.jsonizeArray(null, (Object[]) f.get(o), wrapDotConf(conf.get(s), nodeConf)));
                continue;
                // }
            }
            // COLLECTION
            if (Collection.class.isAssignableFrom(c)) {
                json.put(s, this.jsonizeCollection(null, (Collection) f.get(o), wrapDotConf(conf.get(s), nodeConf)));
                continue;
            }
            // default
            // {
            json.put(s, JSON.toJSON(f.get(o)));
            // }
        }
    } catch (IllegalAccessException ex) {
        throw (new RuntimeException(ex));
    }
    return (json);
}

[Buggy Hunk]
names.retainAll(conf.keySet());

[Patch]
names.removeAll(conf.keySet());