[Demonstration 1]

[Buggy Method]
@Override
public boolean equals(Object obj) {
    if (this == obj)
        return true;
    if (obj == null)
        return false;
    if (getClass() != obj.getClass())
        return false;
    Node other = (Node) obj;
    if (data == null) {
        if (other.data != null)
            return false;
    } else if (!data.equals(other.data))
        return false;
    if (tick != other.tick)
        return false;
    return true;
}

[Buggy Hunk]
Node other = (Node) obj;

[Patch]
Node<?> other = (Node<?>) obj;

[Demonstration 2]

[Buggy Method]
public void run() {
    String message;
    while (!this.stopFlag.getFlag()) {
        Calendar cal = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
        try {
            if (this.in.ready()) {
                message = this.in.readLine();
                String intro = "\n>>>>>> " + languagesController.getWord("RECEIVED_AT") + " " + sdf.format(cal.getTime()) + "\n";
                if (mh.isTerminationMessage(message)) {
                    this.stop();
                } else if (mh.isFileTransmission(message)) {
                    try {
                        int i;
                        String[] messageParts = mh.getContentFromMessage(message);
                        message = intro + mh.messageToFile(messageParts[1], messageParts[2], this.chatManager.getSavedFilesDirectory()) + "\n";
                        this.chatManager.receivedFile(((i = messageParts[1].lastIndexOf(File.separator)) > 0) ? messageParts[1].substring(i + 1) : messageParts[1]);
                    } catch (IOException e) {
                        message = e.getMessage();
                    }
                } else {
                    message = intro + message + "\n";
                }
                this.chatManager.receivedMessage(message);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    try {
        this.in.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

[Buggy Hunk]
this.chatManager.receivedFile(((i = messageParts[1].lastIndexOf(File.separator)) > 0) ? messageParts[1].substring(i+1) : messageParts[1]);

[Patch]
this.chatManager.receivedFile(((i = messageParts[1].lastIndexOf(File.separator.replace("\\", "\\\\"))) > 0) ? messageParts[1].substring(i+1) : messageParts[1]);

[Demonstration 3]

[Buggy Method]
@Override
public boolean add(T value) {
    Node new_node = new Node(value);
    while (true) {
        Node left = findNearestLeft(value);
        Node current = left.next.getReference();
        if (current.value == value) {
            return false;
        }
        new_node.next.set(current, false);
        if (left.next.compareAndSet(current, new_node, false, false)) {
            return true;
        }
    }
}

[Buggy Hunk]
if (current.value == value) {

[Patch]
if (current.value != null && current.value.compareTo(value) == 0) {