[Demonstration 1]

[Buggy Method]
public void setConditionList() {
    list = new String[] { "Poor", "Fair", "Good", "New" };
    lpw = new ListPopupWindow(getContext());
    lpw.setAdapter(new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_1, list));
    lpw.setAnchorView(autoCompleteTextView);
    lpw.setModal(true);
    lpw.setOnItemClickListener(new AdapterView.OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            String item = list[position];
            autoCompleteTextView.setText(item);
            lpw.dismiss();
        }
    });
    autoCompleteTextView.setOnTouchListener(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View view, MotionEvent motionEvent) {
            lpw.show();
            return true;
        }
    });
}

[Buggy Hunk]
list = new String[]{"Poor", "Fair", "Good", "New"};

[Patch]
list = new String[]{"As New", "Fine", "Very Good", "Good", "Fair", "Poor"};

[Demonstration 2]

[Buggy Method]
private void initSettings() {
    final XSharedPreferences prefSettings = new XSharedPreferences(Common.PACKAGE_NAME, Common.PREFS_SETTINGS);
    prefSettings.makeWorldReadable();
    debugPref = prefSettings.getBoolean(Common.DEBUG_KEY, false);
}

[Buggy Hunk]
final XSharedPreferences prefSettings = new XSharedPreferences(Common.PACKAGE_NAME, Common.PREFS_SETTINGS);

[Patch]
final XSharedPreferences prefSettings = new XSharedPreferences(BuildConfig.APPLICATION_ID, Common.PREFS_SETTINGS);

[Demonstration 3]

[Buggy Method]
public void getSearchList(final String key) {
    if (TextUtils.isEmpty(key))
        return;
    mTimer.cancel();
    mTimer = new Timer();
    new Timer().schedule(new TimerTask() {

        @Override
        public void run() {
            getSearchListAfterDelay(key);
        }
    }, INSTANT_SEARCH_DELAY);
}

[Buggy Hunk]
new Timer().schedule(new TimerTask() {

[Patch]
mTimer.schedule(new TimerTask() {