[Demonstration 1]

[Buggy Method]
@Override
protected void onStart() {
    super.onStart();
    Timber.d("onStart");
    try {
        initUi(mSubredditString, mSearchQueryString, mSortString, mRestrictSearchBoolean, false);
    } finally {
        mFirstChildPosition = mApplicationSharedPreferences.getInt(Constants.KEY_POSTS_SCROLL_POSITION, 0);
        mOffset = mApplicationSharedPreferences.getInt(Constants.KEY_POSTS_OFFSET, 0);
        mListingRecyclerview.scrollToPosition(mFirstChildPosition);
        mListingRecyclerview.scrollBy(0, -mOffset);
        //            mListingRecyclerview.post(new Runnable() {
        //                @Override
        //                public void run() {
        //                    if (android.os.Build.VERSION.SDK_INT >= 21) {
        //                        startPostponedEnterTransition();
        //                    }
        //                }
        //            });
    }
    if (usingTabletLayout) {
        if (mPostId == null) {
            return;
        }
        if (!mPostId.equals(GetCommentsService.sLastPostId)) {
            GetCommentsService.loadCommentsForArticle(MainActivity.this, null, mPostId, mSortString);
        } else {
            initCommentsUi();
            SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
            int commentFirstChild = sp.getInt(Constants.KEY_COMMENTS_FIRST_CHILD, 0);
            final int commentOffset = sp.getInt(Constants.KEY_COMMENTS_OFFSET, 0);
            mCommentsRecyclerview.scrollToPosition(commentFirstChild);
            mCommentsRecyclerview.post(new Runnable() {

                @Override
                public void run() {
                    mCommentsRecyclerview.scrollBy(0, -commentOffset);
                }
            });
        }
    }
}

[Buggy Hunk]
if (!mPostId.equals(GetCommentsService.sLastPostId)) {

[Patch]
if (!mPostId.equals(mApplicationSharedPreferences.getString(getString(R.string.pref_last_post),null))) {

[Demonstration 2]

[Buggy Method]
@Override
public void run() {
    new HangmanFrame(new HangmanModel());
}

[Buggy Hunk]
new HangmanFrame(new HangmanModel());

[Patch]
HangmanFrame hangmanFrame = new HangmanFrame(new HangmanModel());

[Demonstration 3]

[Buggy Method]
public Date getScheduledPublishTime() {
    if (scheduledPublishTime == null) {
        return null;
    }
    return new Date(scheduledPublishTime * 1000);
}

[Buggy Hunk]
return new Date(scheduledPublishTime * 1000);

[Patch]
return new Date(scheduledPublishTime * 1000L);