[Demonstration 1]

[Buggy Method]
public void onSplashPageClick(View view) {
    Intent intent = new Intent(this, questions.class);
    startActivity(intent);
    finish();
}

[Buggy Hunk]
Intent intent = new Intent(this, questions.class);

[Patch]
Intent intent = new Intent(this, GameActivity.class);

[Demonstration 2]

[Buggy Method]
public boolean syncDistrict(List<TbDistrict> tbDistricts) {
    if (tbDistricts.size() == 0) {
        return false;
    }
    try {
        mDb = this.getReadableDatabase();
        SQLiteDatabase db;
        db = this.getWritableDatabase();
        int size = tbDistricts.size();
        int insert = 0;
        int update = 0;
        String PRIMARY_KEY;
        String strSQL;
        db.beginTransaction();
        for (int i = 0; i < size; i++) {
            PRIMARY_KEY = tbDistricts.get(i).DISTRICT_ID;
            strSQL = "SELECT * FROM district WHERE " + "DISTRICT_ID = '" + PRIMARY_KEY + "'";
            Cursor cursor = mDb.rawQuery(strSQL, null);
            TbDistrict temp = new TbDistrict();
            ContentValues Val = new ContentValues();
            Val.put(temp.COL_DISTRICT_ID, tbDistricts.get(i).DISTRICT_ID);
            Val.put(temp.COL_DISTRICT_CODE, tbDistricts.get(i).DISTRICT_CODE);
            Val.put(temp.COL_DISTRICT_NAME, tbDistricts.get(i).DISTRICT_NAME);
            Val.put(temp.COL_AMPHUR_ID, tbDistricts.get(i).COL_AMPHUR_ID);
            if (cursor.getCount() == 0) {
                // กรณีไม่เคยมีข้อมูลนี้
                db.insert("district", null, Val);
                insert++;
            } else if (cursor.getCount() == 1) {
                // กรณีเคยมีข้อมูลแล้ว
                db.update("district", Val, " DISTRICT_ID = ?", new String[] { String.valueOf(PRIMARY_KEY) });
                update++;
            }
            cursor.close();
        }
        db.setTransactionSuccessful();
        db.endTransaction();
        Log.d(TAG, "Sync Table district: Insert " + insert + ", Update " + update);
        db.close();
        return true;
    } catch (Exception e) {
        Log.d(TAG, "Error in syncDistrict " + e.getMessage().toString());
        return false;
    }
}

[Buggy Hunk]
Val.put(temp.COL_AMPHUR_ID, tbDistricts.get(i).COL_AMPHUR_ID);

[Patch]
Val.put(temp.COL_AMPHUR_ID, tbDistricts.get(i).AMPHUR_ID);

[Demonstration 3]

[Buggy Method]
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch(item.getItemId()) {
        case R.id.action_addBook:
            Intent intent = new Intent(this, CreateContactScreen.class);
            intent.putExtra("BookId", mBookId);
            startActivity(intent);
            return true;
        case R.id.action_options:
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}

[Buggy Hunk]
case R.id.action_addBook:

[Patch]
case R.id.action_addContact: