[Demonstration 1]

[Buggy Method]
public void remove() {
    if (!this.initialized) {
        log.warn("Calling remove on a SpellcheckedComponent that hasn't been initialized.");
    } else {
        Highlighter highlighter = this.component.getHighlighter();
        for (WordToken token : this.highlights) {
            highlighter.removeHighlight(token);
        }
        this.component.getDocument().removeDocumentListener(this);
        this.spellchecker.removeDictionaryChangeListener(this);
        if (this.registerMenus) {
            this.component.setComponentPopupMenu(this.oldPopupMenu);
            this.component.removeKeyListener(this.inputTracker);
            this.component.removeMouseListener(this.inputTracker);
            this.component.removeMouseMotionListener(this.inputTracker);
        }
        this.initialized = false;
    }
}

[Buggy Hunk]
highlighter.removeHighlight(token);

[Patch]
highlighter.removeHighlight(token.getHighlightTag());

[Demonstration 2]

[Buggy Method]
private static void copyAllRunsToAnotherParagraph(XWPFParagraph oldPar, XWPFParagraph newPar, String text) {
    for (XWPFRun run : oldPar.getRuns()) {
        String textInRun = run.getText(0);
        if (textInRun == null || textInRun.isEmpty()) {
            continue;
        }
        int fontSize = run.getFontSize();
        XWPFRun newRun = newPar.createRun();
        // Copy text
        newRun.setText(text);
        // Apply the same style
        // newRun.setFontSize( run.getFontSize() );
        newRun.setFontFamily(run.getFontFamily());
        newRun.setBold(run.isBold());
        newRun.setItalic(run.isItalic());
        newRun.setStrike(run.isStrike());
        newRun.setColor(run.getColor());
    }
}

[Buggy Hunk]
newRun.setStrike(run.isStrike());

[Patch]
newRun.setStrikeThrough(run.isStrikeThrough());

[Demonstration 3]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.register_layout);
    mPhoneNumEditText = (EditText) findViewById(R.id.register_phone_num);
    mPasswordEditText = (EditText) findViewById(R.id.register_password);
    mVerifyCodeEditText = (EditText) findViewById(R.id.input_verify_code);
    mGetVerifyCodeBtn = (Button) findViewById(R.id.get_verify_code);
    mRegisterBtn = (Button) findViewById(R.id.register_btn);
    mLoginBtn = (Button) findViewById(R.id.login_btn);
    mCountTimer = new CountTimer(60000, 1000);
    mExecutorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * POOL_SIZE);
    mPrefs = getSharedPreferences(CommonDataStructure.PREFS_LAIQIAN_DEFAULT, MODE_PRIVATE);
    mGetVerifyCodeBtn.setOnClickListener(this);
    mRegisterBtn.setOnClickListener(this);
    mLoginBtn.setOnClickListener(this);
    mBroadcastReceiver = new AuthCodeBroadcastReceiver();
    mBroadcastReceiver.setOnReceivedMessageListener(mBroadcastListener);
    registerReceiver(mBroadcastReceiver, getIntentFilter());
}

[Buggy Hunk]
mLoginBtn = (Button) findViewById(R.id.login_btn);

[Patch]
mLoginBtn = (TextView) findViewById(R.id.login_btn);