[Demonstration 1]

[Buggy Method]
@WebMethod
public String getStatus(@XmlElement(required = true, name = "pid") String pid) {
    autowire();
    basicAuthenticator.doAuthentication(webServiceContext);
    return SOAPProcessStatus.INSTANCE.get(pid);
}

[Buggy Hunk]
public String getStatus(@XmlElement(required=true, name="pid") String pid){

[Patch]
public Object getStatus(@XmlElement(required=true, name="pid") String pid){

[Demonstration 2]

[Buggy Method]
private void addActionSpecificValues(XmlBuilder builder, OozieAction action) {
    if (action instanceof MapReduceAction) {
        MapReduceAction mr = (MapReduceAction) action;
        builder.openElement("map-reduce");
        builder.openCloseTextElement("job-tracker", DEFAULT_JOB_TRACKER);
        builder.openCloseTextElement("name-node", DEFAULT_NAME_NODE);
        builder.openElement("configuration");
        this.addProperty(builder, "mapred.mapper.class", mr.getMapperClass());
        this.addProperty(builder, "mapred.reducer.class", mr.getReducerClass());
        this.addProperty(builder, "mapred.input.dir", mr.getInputDirectory());
        this.addProperty(builder, "mapred.output.dir", mr.getOutputDirectory());
        builder.closeElement("configuration");
        builder.closeElement("map-reduce");
        mr.getInputDirectory();
        mr.getOutputDirectory();
    } else if (action instanceof JavaAction) {
        JavaAction c = (JavaAction) action;
        builder.openElement("java");
        builder.openCloseTextElement("job-tracker", DEFAULT_JOB_TRACKER);
        builder.openCloseTextElement("name-node", DEFAULT_NAME_NODE);
        builder.openCloseElement("main-class", c.getMainClass());
        List<String> arguments = c.getArguments();
        for (String arg : arguments) {
            builder.openCloseTextElement("arg", arg);
        }
        builder.closeElement("java");
    }
}

[Buggy Hunk]
builder.openCloseElement("main-class", c.getMainClass());

[Patch]
builder.openCloseTextElement("main-class", c.getMainClass());

[Demonstration 3]

[Buggy Method]
public Profile getProfile(String name) {
    for (Profile profile : profiles) {
        if (profile.getName().equals(name))
            return profile;
    }
    return null;
}

[Buggy Hunk]
if(profile.getName().equals(name)) return profile;

[Patch]
if(profile.getName().toLowerCase().equals(name)) return profile;