[Demonstration 1]

[Buggy Method]
public void setRequestTimeoutMillis(long requestTimeoutMillis) {
    this.requestTimeoutMillis = requestTimeoutMillis;
}

[Buggy Hunk]
public void setRequestTimeoutMillis(long requestTimeoutMillis) {

[Patch]
public void setRequestTimeoutMillis(@Nonnegative long requestTimeoutMillis) {

[Demonstration 2]

[Buggy Method]
private String updateRecord(String name, String type, String content) {
    String resultRecords = null;
    JSONObject payload = null;
    try {
        payload = new JSONObject(getDomainNameServiceRecordsForZone());
    } catch (JSONException e2) {
        e2.printStackTrace();
    }
    String dnsIdentifier = null;
    try {
        if (payload != null && payload.has("id")) {
            dnsIdentifier = payload.getString("id");
        }
    } catch (JSONException e3) {
        e3.printStackTrace();
    }
    if (payload != null && payload.has("content")) {
        payload.remove("content");
        try {
            payload.put("content", content.toString().trim());
        } catch (JSONException e2) {
            e2.printStackTrace();
        }
    }
    String operator = "zones";
    String subOperator = "dns_records";
    String url = cm.getApiVersionedUrl() + "/" + operator + "/" + cfz.getZoneId() + "/" + subOperator + "/" + dnsIdentifier;
    HttpClient client = HttpClientBuilder.create().build();
    HttpPut request = new HttpPut(url);
    request.setHeader("X-Auth-Email", cm.getUserName());
    request.setHeader("X-Auth-Key", cm.getApiKey());
    request.setHeader("Content-Type", "application/json");
    StringEntity params = null;
    try {
        if (payload != null) {
            params = new StringEntity(payload.toString());
        }
    } catch (UnsupportedEncodingException e2) {
        e2.printStackTrace();
    }
    request.setEntity(params);
    HttpResponse response = null;
    try {
        response = client.execute(request);
    } catch (IOException ioe) {
        ioe.printStackTrace();
    }
    BufferedReader rd = null;
    InputStreamReader isr = null;
    try {
        if (response != null) {
            isr = new InputStreamReader(response.getEntity().getContent(), "UTF-8");
            rd = new BufferedReader(isr);
        }
    } catch (UnsupportedOperationException | IOException uoeioe) {
        uoeioe.printStackTrace();
    } finally {
        try {
            if (rd != null) {
                rd.close();
            }
            if (isr != null) {
                isr.close();
            }
        } catch (IOException ioe) {
            ioe.printStackTrace();
        }
    }
    StringBuffer result = new StringBuffer();
    String line = "";
    try {
        if (rd != null) {
            while ((line = rd.readLine()) != null) {
                result.append(line);
            }
        }
    } catch (IOException ioe) {
        ioe.printStackTrace();
    }
    JSONObject jobj1 = null;
    try {
        jobj1 = new JSONObject(result.toString());
        resultRecords = jobj1.toString();
    } catch (JSONException je) {
        je.printStackTrace();
    }
    return resultRecords;
}

[Buggy Hunk]
payload.put("content", content.toString().trim());

[Patch]
payload.put("content", content.trim());

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) {
    JLabel label = new JLabel();
    //sets the gravity vector for the world
    Vec2 gravity = new Vec2(0.0f, -10.0f);
    //creates the world
    World world = new World(gravity);
    //creates a body
    BodyDef bodyDef = new BodyDef();
    bodyDef.type = BodyType.DYNAMIC;
    bodyDef.position.set(0.0f, 4.0f);
    Body body = world.createBody(bodyDef);
    //Creates a polygon shape
    PolygonShape dynamicBox = new PolygonShape();
    dynamicBox.setAsBox(1.0f, 1.0f);
    //Creates a fixture and adds it to the body
    FixtureDef fixtureDef = new FixtureDef();
    //the shape of the fixture is the polygon
    fixtureDef.shape = dynamicBox;
    fixtureDef.density = 1.0f;
    fixtureDef.friction = 0.3f;
    body.createFixture(fixtureDef);
    //Newton's laws are applied at steps, this sets the rate.
    float timeStep = 1.0f / 60.0f;
    //suggested default values
    int velocityIterations = 6;
    int positionIterations = 2;
    //runs the program, prints out the position of a box falling
    for (int i = 0; i < 60; ++i) {
        world.step(timeStep, velocityIterations, positionIterations);
        Vec2 position = body.getPosition();
        float angle = body.getAngle();
        if (position.y < 0) {
            world.destroyBody(body);
            break;
        }
        System.out.printf("%4.2f %4.2f %4.2f\n", position.x, position.y, angle);
    }
}

[Buggy Hunk]
JLabel label = new JLabel();

[Patch]
testGraphics graphics = new testGraphics();