[Demonstration 1]

[Buggy Method]
private void initHeader() {
    JPanel pan = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 0));
    JLabel label = new JLabel() {

        @Override
        public String getText() {
            int i = pane.indexOfComponent(CalculationTab.this);
            if (i != -1) {
                return pane.getTitleAt(i);
            }
            return null;
        }
    };
    label.setOpaque(false);
    savedIcon = new JLabel(new ImageIcon(CalculationTab.class.getResource("saved.png")));
    savedIcon.setVisible(false);
    pan.add(savedIcon);
    pan.add(label);
    JButton button = new JButton("x");
    button.setFont(button.getFont().deriveFont(5));
    button.setUI(new BasicButtonUI());
    button.setPreferredSize(new Dimension(20, 20));
    button.setContentAreaFilled(false);
    button.setToolTipText("Zatvoriť výpočet");
    button.addActionListener((e) -> {
        int i = pane.indexOfComponent(this);
        if (i != -1) {
            pane.remove(i);
        }
    });
    pan.add(button);
    pane.setTabComponentAt(pane.indexOfComponent(this), pan);
}

[Buggy Hunk]
savedIcon.setVisible(false);

[Patch]
savedIcon.setVisible(saved);

[Demonstration 2]

[Buggy Method]
public static void setuserID(String userid) {
    userID = userid;
}

[Buggy Hunk]
public static void setuserID(String userid)

[Patch]
public void setuserID(String userid)

[Demonstration 3]

[Buggy Method]
private void initGUI() {
    this.setLayout(new GridBagLayout());
    this.c = new GridBagConstraints();
    c.fill = GridBagConstraints.BOTH;
    c.weightx = 1;
    c.weighty = 1;
    this.setPreferredSize(new Dimension(400, 200));
}

[Buggy Hunk]
this.setPreferredSize(new Dimension(400, 200));

[Patch]
this.setPreferredSize(new Dimension(this.getWidth(), this.getHeight()));