[Demonstration 1]

[Buggy Method]
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
    super.onScrollStateChanged(recyclerView, newState);
    RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
    int visibleItemCount = layoutManager.getChildCount();
    int totalItemCount = layoutManager.getItemCount();
    if (mIsLoading) {
        if (totalItemCount > mPreviousTotal) {
            mIsLoading = false;
            mPreviousTotal = totalItemCount;
        }
    }
    if (!mIsLoading && (visibleItemCount > 0 && newState == RecyclerView.SCROLL_STATE_IDLE && (mLastVisibleItemPos) >= totalItemCount - 1)) {
        mIsLoading = true;
        onLoadMore();
    }
    boolean isScrolling = newState != RecyclerView.SCROLL_STATE_IDLE;
    if (mIsNeedLoadData && !isScrolling && recyclerView.getAdapter() != null) {
        recyclerView.getAdapter().notifyDataSetChanged();
    }
    onScrollStateChanged(newState);
}

[Buggy Hunk]
if (totalItemCount > mPreviousTotal) {

[Patch]
if (totalItemCount != mPreviousTotal) {

[Demonstration 2]

[Buggy Method]
@Override
public void onResponse(Call<Customers> call, Response<Customers> response) {
    mSwipeLayout.setRefreshing(false);
    int statusCode = response.code();
    if (statusCode == 200) {
        final List<Customer> customers = response.body().getCustomers();
        Log.v(LOG_TAG, "Success Customers page " + mPage + " customers " + customers.size());
        new Thread(new Runnable() {

            public void run() {
                Gson gson = new Gson();
                ArrayList<ContentValues> customersValues = new ArrayList<>();
                for (Customer customer : customers) {
                    ContentValues customerValues = new ContentValues();
                    customerValues.put(WoodminContract.CustomerEntry.COLUMN_ID, customer.getId());
                    customerValues.put(WoodminContract.CustomerEntry.COLUMN_EMAIL, customer.getEmail());
                    customerValues.put(WoodminContract.CustomerEntry.COLUMN_FIRST_NAME, customer.getFirstName());
                    customerValues.put(WoodminContract.CustomerEntry.COLUMN_LAST_NAME, customer.getLastName());
                    customerValues.put(WoodminContract.CustomerEntry.COLUMN_USERNAME, customer.getUsername());
                    customerValues.put(WoodminContract.CustomerEntry.COLUMN_LAST_ORDER_ID, customer.getLastOrderId());
                    if (customer.getBillingAddress() != null) {
                        customerValues.put(WoodminContract.CustomerEntry.COLUMN_BILLING_FIRST_NAME, customer.getBillingAddress().getFirstName());
                        customerValues.put(WoodminContract.CustomerEntry.COLUMN_BILLING_LAST_NAME, customer.getBillingAddress().getLastName());
                        if (customer.getBillingAddress().getPhone() != null) {
                            customerValues.put(WoodminContract.CustomerEntry.COLUMN_BILLING_PHONE, customer.getBillingAddress().getPhone());
                        }
                    }
                    if (customer.getShippingAddress() != null) {
                        customerValues.put(WoodminContract.CustomerEntry.COLUMN_SHIPPING_FIRST_NAME, customer.getShippingAddress().getFirstName());
                        customerValues.put(WoodminContract.CustomerEntry.COLUMN_SHIPPING_LAST_NAME, customer.getShippingAddress().getLastName());
                        if (customer.getShippingAddress().getPhone() != null) {
                            customerValues.put(WoodminContract.CustomerEntry.COLUMN_SHIPPING_PHONE, customer.getShippingAddress().getPhone());
                        }
                    }
                    customerValues.put(WoodminContract.CustomerEntry.COLUMN_JSON, gson.toJson(customer));
                    customerValues.put(WoodminContract.CustomerEntry.COLUMN_ENABLE, 1);
                    customersValues.add(customerValues);
                }
                if (getContext().getContentResolver() != null) {
                    ContentValues[] customersValuesArray = new ContentValues[customersValues.size()];
                    customersValuesArray = customersValues.toArray(customersValuesArray);
                    int customersRowsUpdated = getContext().getContentResolver().bulkInsert(WoodminContract.CustomerEntry.CONTENT_URI, customersValuesArray);
                    Log.v(LOG_TAG, "Customers " + customersRowsUpdated + " updated");
                    getContext().getContentResolver().notifyChange(WoodminContract.CustomerEntry.CONTENT_URI, null, false);
                }
            }
        }).start();
        if (customers.size() == mSize) {
            //getPageCustomers();
        }
    }
    mPage++;
}

[Buggy Hunk]
if(getContext().getContentResolver() != null) {

[Patch]
if(getContext() != null) {

[Demonstration 3]

[Buggy Method]
public void flipDown() {
    turner1.set(true);
}

[Buggy Hunk]
turner1.set(true);

[Patch]
turner1.set(false);