[Demonstration 1]

[Buggy Method]
private void handleDetails() {
    displayArrows();
    ciscoHomeDetails.getArrow().setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            ImageView arrow = ciscoHomeDetails.getArrow();
            ImageView details = ciscoHomeDetails.getArrow();
            if (!ciscoBool) {
                details.setVisibility(View.VISIBLE);
                arrow.startAnimation(animation);
                ciscoBool = true;
            } else {
                details.setVisibility(View.GONE);
                arrow.startAnimation(animationBack);
                ciscoBool = false;
            }
        }
    });
    midlabHomeDetails.getArrow().setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            ImageView arrow = midlabHomeDetails.getArrow();
            TextView details = midlabHomeDetails.getDetails();
            if (!midBool) {
                details.setVisibility(View.VISIBLE);
                arrow.startAnimation(animation);
                midBool = true;
            } else {
                details.setVisibility(View.GONE);
                arrow.startAnimation(animationBack);
                midBool = false;
            }
        }
    });
    srHomeDetails.getArrow().setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            ImageView arrow = srHomeDetails.getArrow();
            TextView details = srHomeDetails.getDetails();
            if (!srBool) {
                details.setVisibility(View.VISIBLE);
                arrow.startAnimation(animation);
                srBool = true;
            } else {
                details.setVisibility(View.GONE);
                arrow.startAnimation(animationBack);
                srBool = false;
            }
        }
    });
    sm14HomeDetails.getArrow().setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            ImageView arrow = sm14HomeDetails.getArrow();
            TextView details = sm14HomeDetails.getDetails();
            if (!sm14Bool) {
                details.setVisibility(View.VISIBLE);
                arrow.startAnimation(animation);
                sm14Bool = true;
            } else {
                details.setVisibility(View.GONE);
                arrow.startAnimation(animationBack);
                sm14Bool = false;
            }
        }
    });
    otherHomeDetails.getArrow().setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            ImageView arrow = otherHomeDetails.getArrow();
            TextView details = otherHomeDetails.getDetails();
            if (!otherBool) {
                details.setVisibility(View.VISIBLE);
                arrow.startAnimation(animation);
                otherBool = true;
            } else {
                details.setVisibility(View.GONE);
                arrow.startAnimation(animationBack);
                otherBool = false;
            }
        }
    });
}

[Buggy Hunk]
ImageView details = ciscoHomeDetails.getArrow();

[Patch]
TextView details = ciscoHomeDetails.getDetails();

[Demonstration 2]

[Buggy Method]
@Override
public void onResponse(Call<SearchAPIResponse> call, Response<SearchAPIResponse> response) {
    searchView.setVisibility(View.GONE);
    AppController.getInstance().setProducts(response.body().getResults());
    if (response.body().getResults().size() != 0) {
        if (firstTime) {
            productItemList = response.body().getResults();
            productsAdapter = new ProductsAdapter(this, productItemList);
            gridView.setAdapter(productsAdapter);
            firstTime = false;
        } else {
            productItemList.clear();
            productItemList.addAll(response.body().getResults());
            productsAdapter.notifyDataSetChanged();
        }
        showContainer();
        if (sharing) {
            gridView.performItemClick(gridView.getChildAt(index), index, gridView.getAdapter().getItemId(index));
        }
    } else {
        Toast.makeText(this, "No results", Toast.LENGTH_SHORT).show();
        if (productItemList != null)
            productItemList.clear();
        if (productsAdapter != null) {
            productsAdapter.notifyDataSetChanged();
        }
        hideContainer();
    }
    AppController.getInstance().dismissLoading();
}

[Buggy Hunk]
searchView.setVisibility(View.GONE);

[Patch]
menuView.setVisibility(View.GONE);

[Demonstration 3]

[Buggy Method]
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    if (convertView == null) {
        convertView = LayoutInflater.from(context).inflate(R.layout.layout_records_item, parent, false);
    }
    final HSRecord record = (HSRecord) getItem(position);
    TextView tv_mobile = (TextView) convertView.findViewById(R.id.mobile);
    TextView tv_type = (TextView) convertView.findViewById(R.id.type);
    TextView tv_time = (TextView) convertView.findViewById(R.id.time);
    TextView tv_duration = (TextView) convertView.findViewById(R.id.duration);
    SimpleDateFormat sfd = new SimpleDateFormat("MM-dd HH:mm:ss");
    String time = sfd.format(record.getDate());
    String type = "";
    switch(record.getType()) {
        case HSRecordsUploadHelper.INCOMING_TYPE:
            type = "接听";
            tv_type.setTextColor(context.getResources().getColor(R.color.green));
            tv_mobile.setTextColor(context.getResources().getColor(R.color.green));
            tv_time.setTextColor(context.getResources().getColor(R.color.green));
            tv_duration.setTextColor(context.getResources().getColor(R.color.green));
            break;
        case HSRecordsUploadHelper.MISSED_TYPE:
            type = "未接";
            tv_type.setTextColor(context.getResources().getColor(R.color.red));
            tv_mobile.setTextColor(context.getResources().getColor(R.color.red));
            tv_time.setTextColor(context.getResources().getColor(R.color.red));
            tv_duration.setTextColor(context.getResources().getColor(R.color.red));
            break;
        case HSRecordsUploadHelper.OUTGOING_TYPE:
            type = "打出";
            tv_type.setTextColor(context.getResources().getColor(R.color.blue));
            tv_mobile.setTextColor(context.getResources().getColor(R.color.blue));
            tv_time.setTextColor(context.getResources().getColor(R.color.blue));
            tv_duration.setTextColor(context.getResources().getColor(R.color.blue));
            break;
    }
    tv_mobile.setText(record.getNumber() + "");
    tv_time.setText(time);
    tv_type.setText(type);
    tv_duration.setText((record.getType() == 3 ? "0" : String.valueOf(record.getDuration())) + "秒");
    ImageView play_record = (ImageView) convertView.findViewById(R.id.play_record);
    if (!TextUtils.isEmpty(record.getFile_path())) {
        play_record.setVisibility(View.VISIBLE);
        final boolean isPlay = record.isPlay_state();
        if (isPlay) {
            play_record.setImageResource(R.drawable.icon_pause);
        } else {
            play_record.setImageResource(R.drawable.icon_play);
        }
        play_record.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                boolean isPlaying = record.isPlay_state();
                if (isPlaying) {
                    HSRecordHelper.stopPlay();
                    ((ImageView) v).setImageResource(R.drawable.icon_play);
                    record.setPlay_state(false);
                } else {
                    if (HSRecordHelper.isPlaying)
                        return;
                    HSRecordHelper.play(record.getFile_path());
                    ((ImageView) v).setImageResource(R.drawable.icon_pause);
                    record.setPlay_state(true);
                }
            }
        });
    } else {
        play_record.setVisibility(View.GONE);
    }
    final TextView reupload = (TextView) convertView.findViewById(R.id.reupload);
    if (TextUtils.isEmpty(record.getReupload_id())) {
        reupload.setVisibility(View.GONE);
    } else {
        reupload.setVisibility(View.VISIBLE);
        reupload.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                List<HSRecord> records = new ArrayList<HSRecord>();
                records.add(record);
                reupload.setText("正在重传...");
                HSApiHelper.requestReleaseRecord(records, context, new HSApiHelper.CallBack() {

                    @Override
                    public void onSuccess(JSONObject response) {
                        int status = response.optInt("status");
                        if (status == 201) {
                            reupload.setText("重传");
                        } else {
                            reupload.setVisibility(View.GONE);
                        }
                    }

                    @Override
                    public void onFailure() {
                    }
                });
            }
        });
    }
    final ImageView select = (ImageView) convertView.findViewById(R.id.select);
    if (showSelect) {
        select.setBackgroundResource(record.select ? R.drawable.btn_selected : R.drawable.btn_unselect);
        select.setVisibility(View.VISIBLE);
        select.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                if (record.select) {
                    record.select = false;
                    select.setBackgroundResource(R.drawable.btn_unselect);
                } else {
                    record.select = true;
                    select.setBackgroundResource(R.drawable.btn_selected);
                }
            }
        });
    } else {
        select.setVisibility(View.GONE);
    }
    return convertView;
}

[Buggy Hunk]
if (!TextUtils.isEmpty(record.getFile_path())) {

[Patch]
if (!TextUtils.isEmpty(record.getFile_path()) && (record.getType() != 3 && record.getDuration() != 0)) {