[Demonstration 1]

[Buggy Method]
public void andVar(int n, int v) {
    cube[n / 32] &= (v << (n % 32) * 2) | ~(3 << (n % 32) * 2);
}

[Buggy Hunk]
cube[n / 32] &= (v << (n % 32)*2) | ~(3 << (n % 32)*2);

[Patch]
cube[n / literalsPerWord] &= (v << (n % literalsPerWord)*2) | ~(3 << (n % literalsPerWord)*2);

[Demonstration 2]

[Buggy Method]
private void initView(View view) {
    Project project = DatebaseHelper.getInstance(getContext()).find(Project.class).equalTo(Project.PROJECT_ID, mProjectId).findFirst();
    TextView projectName = (TextView) view.findViewById(R.id.tv_project_name);
    view.findViewById(R.id.tv_project_progress).setVisibility(View.GONE);
    view.findViewById(R.id.tv_project_progress_text).setVisibility(View.GONE);
    initNewPlanButton((ImageButton) view.findViewById(R.id.btn_addPlan), mProjectId);
    projectName.setText(project.getProjectTitle());
    RecyclerView mPlansRv = (RecyclerView) view.findViewById(R.id.rv_plans);
    mPlansRv.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
    RealmList<Plan> planList = project.getPlans();
    // RealmList<Plan> planCategoryList = new RealmList<>();
    // for (Plan plan : planList) {
    //     if (plan.getStatus() == mPlanStatus) {
    //         planCategoryList.add(plan);
    //     }
    // }
    // PlanListAdapter adapter = new PlanListAdapter(getContext(), planCategoryList);
    PlanListAdapter adapter = new PlanListAdapter(getContext(), planList);
    adapter.setOnItemClickListener(new PlanListAdapter.OnItemClickListener() {

        @Override
        public void onItemClick(int position, View view) {
            // Intent intent = new Intent(getActivity(),DetailPlanActivity.class);
            // intent.putExtra("planId", planList.get(position).getPlanId());
            // startActivity(intent);
        }
    });
    mPlansRv.setAdapter(adapter);
}

[Buggy Hunk]
Project project = DatebaseHelper.getInstance(getContext())

[Patch]
Project project = DatabaseHelper.getInstance(getContext())