[Demonstration 1]

[Buggy Method]
public void read(VkCallback<String> callback) {
    int id = pref.getInt(VK_WALL_ID, 0);
    int user = pref.getInt(VK_USER_ID, 0);
    if (id == 0 || user == 0) {
        currentVkUser(new VkCallback<Integer>() {

            @Override
            public void onSuccess(Integer result) {
                SharedPreferences.Editor edit = pref.edit();
                edit.putInt(VK_USER_ID, result);
                edit.apply();
                createStorage(new VkCallback<Integer>() {

                    @Override
                    public void onSuccess(Integer integer) {
                        SharedPreferences.Editor edit = pref.edit();
                        edit.putInt(VK_WALL_ID, integer);
                        edit.apply();
                        int userId = pref.getInt(VK_USER_ID, 0);
                        readFromVkWall(id, userId, new VkCallback<String>() {

                            @Override
                            public void onSuccess(String result) {
                                callback.onSuccess(result);
                            }

                            @Override
                            public void onError(MyVkError error) {
                                callback.onError(error);
                            }
                        });
                    }

                    @Override
                    public void onError(MyVkError error) {
                        callback.onError(error);
                    }
                });
            }

            @Override
            public void onError(MyVkError error) {
                callback.onError(error);
            }
        });
    } else {
        readFromVkWall(id, user, new VkCallback<String>() {

            @Override
            public void onSuccess(String result) {
                callback.onSuccess(result);
            }

            @Override
            public void onError(MyVkError error) {
                callback.onError(error);
            }
        });
    }
}

[Buggy Hunk]
readFromVkWall(id, userId, new VkCallback<String>() {

[Patch]
readFromVkWall(integer, userId, new VkCallback<String>() {

[Demonstration 2]

[Buggy Method]
@Override
public void drawUI(ViewGroup parent, final MapActivity activity) {
    View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.quick_action_switchable_action, parent, false);
    final RecyclerView list = (RecyclerView) view.findViewById(R.id.list);
    final QuickActionItemTouchHelperCallback touchHelperCallback = new QuickActionItemTouchHelperCallback();
    final ItemTouchHelper touchHelper = new ItemTouchHelper(touchHelperCallback);
    final Adapter adapter = new Adapter(new QuickActionListFragment.OnStartDragListener() {

        @Override
        public void onStartDrag(RecyclerView.ViewHolder viewHolder) {
            touchHelper.startDrag(viewHolder);
        }
    });
    touchHelperCallback.setItemMoveCallback(adapter);
    touchHelper.attachToRecyclerView(list);
    if (!getParams().isEmpty()) {
        adapter.addItems(loadMapStyles());
    }
    list.setAdapter(adapter);
    TextView dscrTitle = (TextView) view.findViewById(R.id.textDscrTitle);
    TextView dscrHint = (TextView) view.findViewById(R.id.textDscrHint);
    Button addBtn = (Button) view.findViewById(R.id.btnAdd);
    dscrTitle.setText(getDiscrTitle());
    dscrHint.setText(getDiscrHint());
    addBtn.setText(getAddBtnText());
    addBtn.setOnClickListener(getOnAddBtnClickListener(activity, adapter));
    parent.addView(view);
}

[Buggy Hunk]
adapter.addItems(loadMapStyles());

[Patch]
adapter.addItems(loadListFromParams());

[Demonstration 3]

[Buggy Method]
private static boolean isPositionFooter(int position) {
    return position == mRepoList.size() - 1;
}

[Buggy Hunk]
return position == mRepoList.size() - 1;

[Patch]
return position == mRepoList.size() ;