[Demonstration 1]

[Buggy Method]
private void sendJoinRequest(Circle circle, final int position) {
    UserCircle uc = new UserCircle();
    uc.setCircle(circle);
    uc.setUser(ParseUser.getCurrentUser());
    uc.setIsBroadcasting(false);
    uc.setIsPending(true);
    uc.setIsAccepted(false);
    uc.setIsInvite(false);
    uc.saveInBackground(new SaveCallback() {

        @Override
        public void done(ParseException e) {
            if (e == null) {
                mOriginal.remove(getItems().remove(position));
                getItems().remove(position);
                getBaseAdapter().notifyItemRemoved(position);
                Toast.makeText(getContext(), "Sent request!", Toast.LENGTH_LONG).show();
            } else {
                Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_LONG).show();
            }
        }
    });
}

[Buggy Hunk]
mOriginal.remove(getItems().remove(position));

[Patch]
mOriginal.remove(getItems().get(position));

[Demonstration 2]

[Buggy Method]
@Security.Authenticated(Secured.class)
public static Result team(Long teamID) {
    if (Setting.find.byId(Setting.TEAM_DESCRIPTION).isActivated) {
        Logger.error(session("email") + " ACCESS TO EDIT DESCRIPTION PAGE OF TEAM_ID=" + teamID);
        models.Team team1 = models.Team.find.byId(teamID);
        String[] description = team1.description.split("\r\n");
        return ok(team.render(team1, models.Team.getSortedAllMember(teamID), Screenshot.getURL(teamID), Setting.find.byId(Setting.RATING).isActivated, description));
    }
    return badRequest("Disable this function by admin");
}

[Buggy Hunk]
String[] description = team1.description.split("\r\n");

[Patch]
String[] description = team1.description.replaceAll("\\r", "").split("\n");

[Demonstration 3]

[Buggy Method]
private String performHTTPSPostConnection(SSLContext sslContext, String url, String request) {
    //init https connection and jsonResponse object
    Log.d("INFO", "Performing HTTP POST Connection - " + url);
    HttpsURLConnection httpsURLConnection = null;
    try {
        //init local variables
        String result = null;
        URL requestedUrl = new URL(url);
        //init https connection and return resposne
        httpsURLConnection = (HttpsURLConnection) requestedUrl.openConnection();
        httpsURLConnection.setRequestProperty("Content-Type", "application/json");
        httpsURLConnection.setHostnameVerifier(new HostnameVerifier() {

            @Override
            public boolean verify(String hostname, SSLSession session) {
                Log.d("INFO", "Adding hosting verification");
                HostnameVerifier hv = HttpsURLConnection.getDefaultHostnameVerifier();
                //return hv.verify(rHostName, session);
                return true;
            }
        });
        httpsURLConnection.setSSLSocketFactory(sslContext.getSocketFactory());
        //check for the authorization String
        if (this.rAuthorization != "") {
            Log.d("INFO", "Adding token to header");
            httpsURLConnection.setRequestProperty("Authorization", "Bearer " + this.rAuthorization);
        }
        httpsURLConnection.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)");
        httpsURLConnection.setAllowUserInteraction(true);
        httpsURLConnection.setUseCaches(false);
        httpsURLConnection.setRequestMethod("POST");
        httpsURLConnection.setConnectTimeout(1 * 60 * 1000);
        httpsURLConnection.setDoOutput(true);
        httpsURLConnection.setDoInput(true);
        //write the data to the server
        Log.d("INFO", "Writing POST body to stream");
        //OutputStream os = httpsURLConnection.getOutputStream();
        DataOutputStream out = new DataOutputStream(httpsURLConnection.getOutputStream());
        out.write(request.getBytes());
        out.close();
        //init connection
        httpsURLConnection.connect();
        //returm the data
        String responseString = parseResponseStream(httpsURLConnection.getInputStream());
        Log.d("INFO", "Returning response from POST request - " + responseString);
        return parseResponseStream(httpsURLConnection.getInputStream());
    } catch (Exception ex) {
        Log.d("INFO", ex.toString());
        return ex.toString();
    } finally {
        //check if the connection is not null and close
        if (httpsURLConnection != null) {
            httpsURLConnection.disconnect();
        }
    }
}

[Buggy Hunk]
return parseResponseStream(httpsURLConnection.getInputStream());

[Patch]
return responseString;