[Demonstration 1]

[Buggy Method]
@Override
public void showMessageOnNotReceiveRemote() {
    Snackbar.make(root, "Check your connection or try again later", Snackbar.LENGTH_LONG).show();
    getActivity().runOnUiThread(new Runnable() {

        @Override
        public void run() {
            if (swipeRefreshLayout.isRefreshing()) {
                swipeRefreshLayout.setRefreshing(false);
            }
        }
    });
}

[Buggy Hunk]
Snackbar.make(root, "Check your connection or try again later", Snackbar.LENGTH_LONG).show();

[Patch]
Snackbar.make(getView(), "Check your connection or try again later", Snackbar.LENGTH_LONG).show();

[Demonstration 2]

[Buggy Method]
public final // add the item to the end
void // add the item to the end
addLast(// add the item to the end
Item item) {
    Node node = new Node(item, null, last);
    if (last != null)
        last.next = node;
    last = node;
    if (first == null)
        first = last;
    count++;
}

[Buggy Hunk]
public final void addLast(Item item)           // add the item to the end

[Patch]
public void addLast(Item item)           // add the item to the end

[Demonstration 3]

[Buggy Method]
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_book, menu);
    MenuItem searchItem = menu.findItem(R.id.action_search);
    SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
    searchView.setQueryHint(getString(R.string.search_hint));
    searchView.setOnQueryTextListener(this);
    if (!search.isEmpty()) {
        searchItem.expandActionView();
        searchView.setQuery(search, false);
        searchView.clearFocus();
    }
    return true;
}

[Buggy Hunk]
if(!search.isEmpty()){

[Patch]
if(search != null && !search.isEmpty()){