[Demonstration 1]

[Buggy Method]
private static void SelfSignedCertWorkaround() {
    javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(new javax.net.ssl.HostnameVerifier() {

        public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) {
            return hostname.equals(IP);
        }
    });
    System.setProperty("javax.net.ssl.trustStore", "./keystore.jks");
    System.setProperty("javax.net.ssl.keyStore", "./keystore.jks");
    System.setProperty("javax.net.ssl.keyStorePassword", "muses11");
}

[Buggy Hunk]
return hostname.equals(IP);

[Patch]
return hostname.equals(MusesUtils.getMusesConf());

[Demonstration 2]

[Buggy Method]
private static void initListeners() {
    showTestsButton.addActionListener(e -> {
        if (isPanelExpanded) {
            listsPanel.remove(testList);
        } else {
            listsPanel.add(testList, BorderLayout.WEST);
        }
    });
    frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    frame.addWindowListener(new WindowListener() {

        @Override
        public void windowOpened(WindowEvent e) {
        }

        @Override
        public void windowClosing(WindowEvent e) {
            e.getWindow().dispose();
            Start.show();
        }

        @Override
        public void windowClosed(WindowEvent e) {
        }

        @Override
        public void windowIconified(WindowEvent e) {
        }

        @Override
        public void windowDeiconified(WindowEvent e) {
        }

        @Override
        public void windowActivated(WindowEvent e) {
        }

        @Override
        public void windowDeactivated(WindowEvent e) {
        }
    });
    problemList.addListSelectionListener(e -> selectProblem());
    deleteButton.addActionListener(e -> {
        DatabaseManager db = new DatabaseManager();
        int index = problemList.getSelectedIndex();
        db.deleteProblem(problems[index]);
        problems = db.getProblemsArray();
        db.close();
        problemList = new JList<>(problems);
        problemList.setSelectedIndex(index);
        problemList.addListSelectionListener(a -> selectProblem());
        scrollerPanelProblems.remove(scrollPane);
        scrollPane = new JScrollPane(problemList, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        scrollerPanelProblems.add(scrollPane, BorderLayout.CENTER);
        scrollerPanelProblems.revalidate();
        frame.repaint();
    });
}

[Buggy Hunk]
listsPanel.add(testList, BorderLayout.WEST);

[Patch]
listsPanel.add(testList);

[Demonstration 3]

[Buggy Method]
public void notifyChanged(Notification notification) {
    super.notifyChanged(notification);
    if (notification.getFeature() instanceof EAttributeImpl) {
        if (notification.getNotifier() instanceof BoundsImpl) {
            reposition(((BoundsImpl) notification.getNotifier()).getX(), ((BoundsImpl) notification.getNotifier()).getY(), ((BoundsImpl) notification.getNotifier()).getWidth(), getTreeHeight());
            FigureCanvas canvas = (FigureCanvas) getViewer().getControl();
            canvas.getViewport().repaint();
        }
    }
}

[Buggy Hunk]
getTreeHeight());

[Patch]
TreeNodeUtils.getTreeHeight(inputRootTreeNode, LEAF_HEIGHT));