[Demonstration 1]

[Buggy Method]
protected void setStoreLabel(Integer id, Integer value) {
    try {
        if (id >= 1 && id <= 2) {
            Label label = (Label) scene.lookup("#store" + id);
            label.setText(Integer.toString(value));
        } else {
            throw new IllegalArgumentException("Incorrect ID");
        }
    } catch (Exception ex) {
        Logger.getLogger(MatchHandler.class.getName()).log(Level.SEVERE, null, ex);
    }
}

[Buggy Hunk]
Label label = (Label) scene.lookup("#store" + id);

[Patch]
Label label = (Label) scene.lookup("#store" + id.toString());

[Demonstration 2]

[Buggy Method]
private void initView(Project project) {
    inputFileChooserDesc = FileChooserDescriptorFactory.createSingleFileDescriptor();
    outputFileChooserDesc = FileChooserDescriptorFactory.createSingleFolderDescriptor();
    referXmlFileChooserDesc = FileChooserDescriptorFactory.createSingleFolderDescriptor();
    for (String lang : SUPPORT_LANGS) {
        comboBoxLang.addItem(lang);
    }
    spinnerStartRow.setValue(0);
    spinnerEndRow.setValue(-1);
    spinnerKeyColumn.setValue(0);
    spinnerValueColumn.setValue(1);
    spinnerSheetIndex.setValue(0);
    btnChooseInput.requestFocus();
    btnChooseInput.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            VirtualFile[] virtualFiles = FileChooser.chooseFiles(inputFileChooserDesc, null, null);
            if (virtualFiles != null && virtualFiles.length > 0) {
                textFieldInputSrc.setText(virtualFiles[0].getPath());
            }
        }
    });
    btnChooseOutput.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            VirtualFile[] virtualFiles = FileChooser.chooseFiles(outputFileChooserDesc, null, null);
            if (virtualFiles != null && virtualFiles.length > 0) {
                textFieldOutputPath.setText(virtualFiles[0].getPath());
            }
        }
    });
    btnChooseReferXml.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            VirtualFile[] virtualFiles = FileChooser.chooseFiles(referXmlFileChooserDesc, null, null);
            if (virtualFiles != null && virtualFiles.length > 0) {
                textFieldReferXmlSrc.setText(virtualFiles[0].getPath());
            }
        }
    });
    btnOk.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            onGenerateTranslation();
        }
    });
    btnCancel.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            System.exit(0);
        }
    });
}

[Buggy Hunk]
referXmlFileChooserDesc = FileChooserDescriptorFactory.createSingleFolderDescriptor();

[Patch]
referXmlFileChooserDesc = FileChooserDescriptorFactory.createSingleFileDescriptor();

[Demonstration 3]

[Buggy Method]
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEvent(GetServiceTariffsEvent event) {
    if (event.serviceTariffs.size() > 0) {
        popupTariffListViewHeaderLayout.setVisibility(View.VISIBLE);
    } else {
        popupTariffListViewHeaderLayout.setVisibility(View.GONE);
    }
    serviceTariffAdapter.replaceList(event.serviceTariffs);
}

[Buggy Hunk]
if (event.serviceTariffs.size() > 0) {

[Patch]
if (event.serviceTariffs.size() > 0 && popupListView.getAdapter() instanceof ServiceTariffAdapter) {