[Demonstration 1]

[Buggy Method]
@Override
protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {
    try {
        String jsonString = new String(response.data, HttpHeaderParser.parseCharset(response.headers));
        return Response.success(new JSONObject(jsonString), HttpHeaderParser.parseCacheHeaders(response));
    } catch (UnsupportedEncodingException e) {
        return Response.error(new ParseError(e));
    } catch (JSONException je) {
        return Response.error(new ParseError(je));
    }
}

[Buggy Hunk]
protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {

[Patch]
public Response<JSONObject> parseNetworkResponse(NetworkResponse response) {

[Demonstration 2]

[Buggy Method]
public static String formatJsArgs(String args) {
    if (args == null) {
        return null;
    }
    return args.replace("'", "&#39;").replace("\"", "&quot;");
}

[Buggy Hunk]
return args.replace("'", "&#39;").replace("\"", "&quot;");

[Patch]
return args.replace("'", "\\'");

[Demonstration 3]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    ListView mainListview = (ListView) findViewById(R.id.ListObjectDisplayList);
    mObjectAdapter = new MainListAdapter(this, R.layout.object_list_item, R.id.object_list_item_textview, mListObjects);
    mainListview.setAdapter(mObjectAdapter);
    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            ArrayList pArrayList = new ArrayList();
            ListObject test = new ListObject("List Name", 0, pArrayList);
            dbHelper.addListObject(test);
        }
    });
}

[Buggy Hunk]
ListObject test = new ListObject("List Name", 0, pArrayList);

[Patch]
ListObject test = new ListObject("List Name", -1, pArrayList);