[Demonstration 1]

[Buggy Method]
public List<Led> prepareRangeLeds(int fromIndex, int size, String colorHexTriplet, List<Led> leds) {
    for (int i = fromIndex; i < fromIndex + size; i++) {
        leds.add(new Led(i, colorHexTriplet));
    }
    return leds;
}

[Buggy Hunk]
for (int i = fromIndex; i < fromIndex + size; i++) {

[Patch]
for (int i = fromIndex; i < fromIndex + size + 1; i++) {

[Demonstration 2]

[Buggy Method]
@Override
@NonNull
@SuppressWarnings("unchecked")
public List<T> subList(final int fromIndex, final int toIndex) {
    if (fromIndex < 0 || toIndex > size() || fromIndex > toIndex) {
        throw new IndexOutOfBoundsException();
    }
    JSArray subArray = new JSArray(context);
    for (int index = fromIndex; index < toIndex; index++) {
        subArray.add(get(index));
    }
    return subArray;
}

[Buggy Hunk]
JSArray subArray = new JSArray(context);

[Patch]
JSArray subArray = new JSArray(context,mType);

[Demonstration 3]

[Buggy Method]
@GET
@Path("all")
@Produces(MediaType.APPLICATION_XML)
public Response getAllStockItems() {
    return Response.ok(new LinkRepresentationListWrapper(bean.getAllStockItems())).build();
}

[Buggy Hunk]
return Response.ok(new LinkRepresentationListWrapper(bean.getAllStockItems())).build();

[Patch]
return commonService.createResponseXml(bean.getAllStockItems());