[Demonstration 1]

[Buggy Method]
public static boolean SearchDirectiveDuplicated(String name, String value, ApacheDirectiveStack stack) {
    for (ApacheDirective dir : stack) {
        if (dir.getName() == name || dir.getValuesAsString() == value) {
            log.warn("Apache configuration file already conatins the directive " + name + " with the value " + value + " .");
            throw new ApacheParserException("Apache configuration file already conatins the directive " + name + " with the value " + value + " .");
            return true;
        }
    }
    return false;
}

[Buggy Hunk]
for (ApacheDirective dir : stack) {

[Patch]
for (ApacheDirective dir : stack.getStack()) {

[Demonstration 2]

[Buggy Method]
@GET
@Timed
@Path("/{alarm_id}")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Get alarm", response = Alarm.class)
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"), @ApiResponse(code = 404, message = "Alarm not found") })
public Alarm get(@ApiParam(value = "ID of alarm to fetch", required = true) @Context UriInfo uriInfo, @HeaderParam("X-Tenant-Id") String tenantId, @PathParam("alarm_id") String alarm_id) {
    return fixAlarmLinks(uriInfo, repo.findById(alarm_id));
}

[Buggy Hunk]
return fixAlarmLinks(uriInfo, repo.findById(alarm_id));

[Patch]
return fixAlarmLinks(uriInfo, repo.findById(tenantId, alarm_id));

[Demonstration 3]

[Buggy Method]
@Override
public ResolvedType resolve() {
    throw new UnsupportedOperationException();
}

[Buggy Hunk]
throw new UnsupportedOperationException();

[Patch]
return getSymbolResolver().resolve(this, ResolvedReferenceType.class);