[Demonstration 1]

[Buggy Method]
public void getPersonalIDs(String photographer_id) {
    List<Integer> personalID = new ArrayList<>();
    try {
        socket.writeObject(PhotographerCall.getUniqueNumbers);
        socket.writeObject(photographer_id);
        personalID = (ArrayList) socket.readObject();
    } catch (IOException | ClassNotFoundException ex) {
        Logger.getLogger(PhotographerClientRunnable.class.getName()).log(Level.SEVERE, null, ex);
    }
    PhotographerClient.client.savePersonalPictureToLocal(personalID);
}

[Buggy Hunk]
PhotographerClient.client.savePersonalPictureToLocal(personalID);

[Patch]
PhotographerClient.client.savePersonalPictureIdList(personalID);

[Demonstration 2]

[Buggy Method]
private static boolean isResourceXmlFile(@Nullable VirtualFile file) {
    if (file == null || !file.getName().endsWith(".xml"))
        return false;
    XMLStreamReader xml = null;
    try {
        xml = XMLInputFactory.newFactory().createXMLStreamReader(file.getInputStream());
        while (xml.hasNext()) {
            if (xml.next() == XMLStreamConstants.START_ELEMENT) {
                return "resources".equals(xml.getLocalName());
            }
        }
    } catch (XMLStreamException | IOException e) {
        return false;
    } finally {
        if (xml != null) {
            try {
                xml.close();
            } catch (XMLStreamException e) {
                // Ignore
            }
        }
    }
    return false;
}

[Buggy Hunk]
xml = XMLInputFactory.newFactory().createXMLStreamReader(file.getInputStream());

[Patch]
xml = XMLInputFactory.newInstance().createXMLStreamReader(file.getInputStream());

[Demonstration 3]

[Buggy Method]
public ArrayList<Playlist> getPlaylistsFromFile() {
    try (ObjectInputStream ois = new ObjectInputStream(new FileInputStream("playlists.data"))) {
        savedPlaylists = (ArrayList<Playlist>) ois.readObject();
        System.out.println("Loaded playlists!");
    } catch (Error | IOException | ClassNotFoundException ex) {
        System.out.println("Songs read Error " + ex);
    }
    return savedPlaylists;
}

[Buggy Hunk]
} catch (Error | IOException | ClassNotFoundException ex) {

[Patch]
} catch (IOException | ClassNotFoundException ex) {