[Demonstration 1]

[Buggy Method]
public void setIncludeRootException(boolean includeRootException) {
    this.includeRootException = includeRootException;
}

[Buggy Hunk]
public void setIncludeRootException(boolean includeRootException) {

[Patch]
public void setIncludeRootException(final boolean includeRootException) {

[Demonstration 2]

[Buggy Method]
private Severity parseSeverity(String severity) {
    if (severity == null)
        return null;
    return Severity.valueOf(severity);
}

[Buggy Hunk]
if (severity == null) return null;

[Patch]
if (severity == null) return Severity.ERROR;

[Demonstration 3]

[Buggy Method]
@Override
public Iterable<DiscoveryNode> discoverNodes() {
    try {
        VirtualMachineOperations vmOps = this.computeManagement.getVirtualMachinesOperations();
        String resourceGroup = AzureProperties.getOrNull(AzureProperties.GROUP_NAME, properties);
        String clusterId = AzureProperties.getOrNull(AzureProperties.CLUSTER_ID, properties);
        VirtualMachineListResponse vms = vmOps.list(resourceGroup);
        ArrayList<DiscoveryNode> nodes = new ArrayList<DiscoveryNode>();
        for (VirtualMachine vm : vms.getVirtualMachines()) {
            NetworkProfile netProfile = vm.getNetworkProfile();
            HashMap<String, String> tags = vm.getTags();
            // a tag is required with the hazelcast clusterid
            // and the value should be the port number
            if (tags.get(clusterId) == null) {
                continue;
            }
            // skip any deallocated vms
            if (!isVirtualMachineOn(vmOps, vm)) {
                continue;
            }
            int port = Integer.parseInt(tags.get(clusterId));
            final String faultDomainId = vm.getInstanceView().getPlatformFaultDomain().toString();
            DiscoveryNode node = buildDiscoveredNode(faultDomainId, netProfile, port);
            if (node != null) {
                nodes.add(node);
            }
        }
        LOGGER.info("Azure Discovery SPI Discovered " + nodes.size() + " nodes");
        return nodes;
    } catch (Exception e) {
        e.printStackTrace();
        LOGGER.finest("Failed to discover nodes with Azure SPI", e);
        return null;
    }
}

[Buggy Hunk]
final String  faultDomainId = vm.getInstanceView().getPlatformFaultDomain().toString();

[Patch]
final String faultDomainId = getFaultDomain(vmOps, vm, resourceGroup);