[Demonstration 1]

[Buggy Method]
@Override
public void onSuccess(Product product) {
    // process the product
    FeatureCheckResponse featureCheckResponse = processProduct(product, featureCheckRequest);
    // make the callback
    featureCheckRequest.getCallback().onStatusChecked(featureCheckResponse.getFeatureName(), featureCheckResponse.isEnabled(), featureCheckResponse.getMetadata(), true);
}

[Buggy Hunk]
featureCheckRequest.getCallback().onStatusChecked(featureCheckResponse.getFeatureName(), featureCheckResponse.isEnabled(), featureCheckResponse.getMetadata(), true);

[Patch]
makeFeatureCheckCallback(featureCheckRequest, featureCheckResponse);

[Demonstration 2]

[Buggy Method]
private String tryToGetDescription(Object object) {
    // huuh, not the best, but the simpliest way:
    if (object instanceof JackSerializable) {
        JackToKlaxonSerializable serializable = (JackToKlaxonSerializable) object;
        return serializable.jaxonDescription();
    }
    return null;
}

[Buggy Hunk]
if (object instanceof JackSerializable) {

[Patch]
if (object instanceof JackToKlaxonSerializable) {

[Demonstration 3]

[Buggy Method]
@Override
public void after(Object target, Object[] args, Object result, Throwable throwable) {
    if (isDebug) {
        logger.afterInterceptor(target, args);
    }
    Trace trace = traceContext.currentTraceObject();
    if (trace == null) {
        return;
    }
    try {
        trace.recordApi(descriptor);
        trace.recordException(throwable);
        if (args[0] instanceof String) {
            trace.recordAttribute(ANNOTATION_KEY_LENGTH_VALUE, ((String) args[0]).length());
        } else if (args[0] instanceof byte[]) {
            trace.recordAttribute(ANNOTATION_KEY_LENGTH_VALUE, (new String((byte[]) args[0])).length());
        } else if (args[0] instanceof File) {
            trace.recordAttribute(ANNOTATION_KEY_LENGTH_VALUE, ((File) args[0]).length());
        }
        trace.markAfterTime();
    } finally {
        trace.traceBlockEnd();
    }
}

[Buggy Hunk]
trace.recordAttribute(ANNOTATION_KEY_LENGTH_VALUE, (new String((byte []) args[0])).length());

[Patch]
trace.recordAttribute(ANNOTATION_KEY_LENGTH_VALUE, ((byte []) args[0]).length);