[Demonstration 1]

[Buggy Method]
public void validateUserData(UserDTO user) throws BusinessException {
    validateEmail(user.getEmail());
}

[Buggy Hunk]
validateEmail(user.getEmail());

[Patch]
validateEmail(user);

[Demonstration 2]

[Buggy Method]
private void updateContentDescription() {
    if (this.currentProject != null) {
        int projectDomain = getProjectDomainId(this.currentProject);
        DomainEntry de = findDomainById(IProjectDomains.PROJECT_DOMAINS, projectDomain);
        if (de != null) {
            setContentDescription("Active project: " + this.currentProject.getName() + " (" + de.getName() + ")");
        } else {
            setContentDescription("Active project: " + this.currentProject.getName() + " (domain unset)");
        }
    } else {
        setContentDescription("Please select a project");
    }
}

[Buggy Hunk]
if (this.currentProject != null) {

[Patch]
if (this.currentProject != null && this.currentProject.exists()) {

[Demonstration 3]

[Buggy Method]
private ControlledElectionNode<TMsg> sendNotification() throws IOException {
    TMsg outputMsg = this.getGenerator().generate(Message.NOTIFY.toString() + ":FORWARD:LEFT", this);
    writeToSocket(this.getLeftNodeAddress(), outputMsg);
    outputMsg = this.getGenerator().generate(Message.NOTIFY.toString() + ":FORWARD:RIGHT:", this);
    writeToSocket(this.getRightNodeAddress(), outputMsg);
    this.setNodeState(State.DONE);
    return this;
}

[Buggy Hunk]
private ControlledElectionNode<TMsg> sendNotification() throws IOException {

[Patch]
private ControlledElectionNode<TMsg> sendNotification() {