[Demonstration 1]

[Buggy Method]
private static int[] divide(int[] vector) {
    int[] result = new int[ENCODED_BIT];
    System.arraycopy(vector, 0, result, 0, vector.length);
    for (int i = 0; i < ORIGINAL_BIT; ++i) {
        if (result[i] >= mGeneratorPolynomial[0]) {
            for (int j = i; j < mGeneratorPolynomial.length + i; ++j) {
                result[j] = divideMod2(vector[j], mGeneratorPolynomial[j - i]);
            }
        }
    }
    return result;
}

[Buggy Hunk]
result[j] = divideMod2(vector[j], mGeneratorPolynomial[j - i]);

[Patch]
result[j] = divideMod2(result[j], mGeneratorPolynomial[j - i]);

[Demonstration 2]

[Buggy Method]
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_more, container, false);
    // Inflate the layout for this fragment
    String[] sub = { "Visual Art", "Science" };
    mRecyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_more);
    mRecyclerView.setHasFixedSize(true);
    mLayoutManager = new LinearLayoutManager(getActivity());
    mRecyclerView.setLayoutManager(mLayoutManager);
    loadResource = new LoadResource(getActivity(), getActivity(), mRecyclerView, sub, "LowerElem", 2);
    loadResource.execute();
    return rootView;
}

[Buggy Hunk]
loadResource = new LoadResource(getActivity(), getActivity(), mRecyclerView, sub ,"LowerElem", 2);

[Patch]
loadResource = new LoadResource(getActivity(), getActivity(), mRecyclerView, 2);

[Demonstration 3]

[Buggy Method]
public Matrix diagonalReciprocal(double[] vector, int[] units) {
    if (vector.length != units.length) {
        throw new IllegalArgumentException("Input dimensions do not match.");
    }
    double[][] result = new double[vector.length][vector.length];
    for (int i = 0; i < m.length; i++) {
        for (int j = 0; j < m[0].length; j++) {
            if (isZero(m[i][j] - 1)) {
                m[i][j] = vector[j] / units[j];
            }
        }
    }
    for (int i = 0; i < result.length; i++) {
        if (!isZero(vector[i])) {
            result[i][i] = units[i] / vector[i];
        }
    }
    return this.x(new Matrix(result));
}

[Buggy Hunk]
return this.x(new Matrix(result));

[Patch]
return new Matrix(result).x(this);