[Demonstration 1]

[Buggy Method]
public boolean canMove(Pile p) {
    if (p.isEmpty() || (hand.isEmpty && faceup.isEmpty())) {
        return true;
    } else {
        if (!hand.isEmpty()) {
            for (Card c : hand) {
                if (p.validMove(c)) {
                    return true;
                }
                cio.typeln(c.value + " was not valid");
            }
        } else if (!faceup.isEmpty()) {
            for (Card c : faceup) {
                if (p.validMove(c)) {
                    return true;
                }
            }
        } else {
        }
    }
    return false;
}

[Buggy Hunk]
if(p.isEmpty() || (hand.isEmpty && faceup.isEmpty())){

[Patch]
if(p.isEmpty() || (hand.isEmpty() && faceup.isEmpty())){

[Demonstration 2]

[Buggy Method]
private String getThemeLocation(String themeName, String hostname) {
    String prefix = configurationReader.getSimpleConfigurationString("OMNY_THEME_ROOT");
    String site = "";
    if (prefix == null) {
        prefix = "";
    }
    if (themeName.startsWith("global/")) {
        prefix += "/global";
        themeName = themeName.substring("global/".length());
    } else if (prefix.isEmpty()) {
        site = hostname + "/";
    }
    return prefix + "/themes/" + site + themeName + "/theme";
}

[Buggy Hunk]
} else if (prefix.isEmpty()) {

[Patch]
} else if (!prefix.isEmpty()) {

[Demonstration 3]

[Buggy Method]
private void insertFront(int data) {
    Node newNode = new Node(data);
    // is LL empty
    if (head == null) {
        head = newNode;
    } else // if LL not empty
    {
        newNode.next = head.next;
        head = newNode;
    }
}

[Buggy Hunk]
newNode.next = head.next;

[Patch]
newNode.next = head;