[Demonstration 1]

[Buggy Method]
protected void loadBannerAds() {
    RelativeLayout adsLayout = (RelativeLayout) findViewById(R.id.adView);
    if (adsLayout != null) {
        String AD_UNIT_ID = getString(R.string.admob_id);
        adView = new AdView(this);
        adView.setAdSize(AdSize.BANNER);
        adView.setAdUnitId(AD_UNIT_ID);
        adsLayout.addView(adView);
        adView.loadAd(adRequest);
    }
}

[Buggy Hunk]
RelativeLayout adsLayout = (RelativeLayout)findViewById(R.id.adView);

[Patch]
ViewGroup adsLayout = (ViewGroup)findViewById(R.id.adView);

[Demonstration 2]

[Buggy Method]
public ArrayList<RobotWrapper> getDependentWrapper() {
    List<RobotWrapper> sublist = robots.subList(independent + 1, robots.size());
    return new ArrayList<>(sublist);
}

[Buggy Hunk]
List<RobotWrapper> sublist = robots.subList(independent + 1, robots.size());

[Patch]
List<RobotWrapper> sublist = robots.subList(independent, robots.size());

[Demonstration 3]

[Buggy Method]
@SuppressWarnings("ConstantConditions")
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    if (savedInstanceState != null) {
        return;
    }
    //Set up ads
    mInterstitialAd3 = new InterstitialAd(this);
    // set the ad unit ID
    mInterstitialAd3.setAdUnitId(getString(R.string.int_add_full2));
    requestNewInterstitial();
    mInterstitialAd3.setAdListener(new AdListener() {

        @Override
        public void onAdClosed() {
            requestNewInterstitial();
        }
    });
    if (progress_dialog != null)
        progress_dialog.dismiss();
    if (isConnected() && !explicitlySignedOut)
        gPlusSignIn();
    getSupportActionBar().setDisplayHomeAsUpEnabled(false);
    getSupportActionBar().setTitle(R.string.app_name);
    Field mField = new Field();
    mField.setArguments(getIntent().getExtras());
    FragmentTransaction transaction = fragmentManager.beginTransaction();
    transaction.setCustomAnimations(android.R.anim.fade_in, R.anim.slide_out_left, android.R.anim.slide_in_left, android.R.anim.slide_out_right);
    transaction.add(R.id.main_fragment_container, mField).commit();
    //        APP-RATING DIALOG CODE
    //        Custom criteria: 3 days and 5 launches
    RateThisApp.Config config = new RateThisApp.Config(3, 5);
    //        Custom title
    config.setTitle(R.string.rate_us);
    RateThisApp.init(config);
    //        initializing db handler
    dbHandler = new DatabaseHolder(this);
    dbHandler.open();
    Cursor versionCursor = dbHandler.getQuestionVersion();
    versionCursor.moveToFirst();
    if (!versionCursor.isAfterLast()) {
        version = versionCursor.getString(versionCursor.getColumnIndex("version"));
    }
    dbHandler.close();
    //        FIRST GET THE VERSION
    if (isConnected()) {
        new HttpAsyncTask().execute("http://json-956.appspot.com/version.txt");
    }
    try {
        String string = readFromFile();
        if (string != null)
            JSONString = string;
        else {
            if (isConnected()) {
                //                 call AsyncTask to perform network operation on separate thread
                //                new HttpAsyncTask().execute("http://json-956.appspot.com/version.txt");
                new HttpAsyncTask().execute("https://json-956.appspot.com/json-1.txt");
            } else {
                JSONString = readFromExternalFile();
            }
        }
    } catch (IOException e) {
        e.printStackTrace();
        JSONString = readFromExternalFile();
    }
}

[Buggy Hunk]
mInterstitialAd3.setAdUnitId(getString(R.string.int_add_full2));

[Patch]
mInterstitialAd3.setAdUnitId(getString(R.string.ad_bookmark_click));