[Demonstration 1]

[Buggy Method]
public void addCache(Cache cache) {
    if (cache.isValid())
        this.activeCaches.put(cache.getIdent(), cache);
}

[Buggy Hunk]
this.activeCaches.put(cache.getIdent(), cache);

[Patch]
this.activeCaches.put(cache.getIdentifier(), cache);

[Demonstration 2]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
    mArticlesRecycler = binding.rvArticles;
    int orientation = getResources().getConfiguration().orientation;
    if (orientation == Configuration.ORIENTATION_PORTRAIT) {
        mLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
    } else if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
        mLayoutManager = new StaggeredGridLayoutManager(3, StaggeredGridLayoutManager.VERTICAL);
    }
    mArticlesRecycler.setLayoutManager(mLayoutManager);
    scrollListener = new EndlessScrollListener(mLayoutManager) {

        @Override
        public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {
            // Triggered only when new data needs to be appended to the list
            // Add whatever code is needed to append new items to the bottom of the list
            if (InternetManager.getInstance(MainActivity.this).isInternetAvailable()) {
                makeArticlesCall(mQuery, 0);
            } else {
                noInternetDialog.show();
            }
        }
    };
    mAdapter = new ArticlesAdapter(MainActivity.this, new ArrayList<Article>());
    mArticlesRecycler.setAdapter(mAdapter);
    mArticlesRecycler.addOnScrollListener(scrollListener);
}

[Buggy Hunk]
makeArticlesCall(mQuery, 0);

[Patch]
makeArticlesCall(mQuery, page);

[Demonstration 3]

[Buggy Method]
@SuppressWarnings("unchecked")
public static <T> Query<T> from(T t) {
    Class<T> clazz = (Class<T>) t.getClass();
    String className = clazz.getSimpleName();
    className = Character.toLowerCase(className.charAt(0)) + className.substring(1);
    EntityPathBase<T> entityPathBase = new EntityPathBase<T>(clazz, className);
    return new QueryWithModel<T>(entityPathBase, t, className);
}

[Buggy Hunk]
public static <T> Query<T> from(T t) {

[Patch]
public static <T> QueryWithModel<T> from(T t) {