[Demonstration 1]

[Buggy Method]
@Override
public List<QueryResult> getAllByRegionList(List<Region> regionList, QueryOptions options) {
    //  db.regulatory_region.find({"chunkIds": {$in:["1_200", "1_300"]}, "start": 601156})
    QueryBuilder builder = new QueryBuilder();
    List<Object> featureType = options.getList("featureType", null);
    List<Object> featureClass = options.getList("featureClass", null);
    options = addExcludeReturnFields("chunkIds", options);
    List<DBObject> queries = new ArrayList<>();
    for (Region region : regionList) {
        int firstChunkId = getChunkId(region.getStart(), CHUNKSIZE);
        int lastChunkId = getChunkId(region.getEnd(), CHUNKSIZE);
        BasicDBList chunksId = new BasicDBList();
        for (int j = firstChunkId; j <= lastChunkId; j++) {
            String chunkId = region.getChromosome() + "_" + j;
            chunksId.add(chunkId);
        }
        builder = builder.start("chunkIds").in(chunksId).and("start").lessThanEquals(region.getEnd()).and("end").greaterThanEquals(region.getStart());
        if (featureType != null && featureType.size() > 0) {
            BasicDBList featureTypeDBList = new BasicDBList();
            featureTypeDBList.addAll(featureType);
            builder = builder.and("featureType").in(featureTypeDBList);
        }
        if (featureClass != null && featureClass.size() > 0) {
            BasicDBList featureClassDBList = new BasicDBList();
            featureClassDBList.addAll(featureClass);
            builder = builder.and("featureClass").in(featureClassDBList);
        }
        queries.add(builder.get());
    }
    System.out.println(">>" + regionList);
    System.out.println(">>" + builder.get().toString());
    return executeQueryList(regionList, queries, options);
}

[Buggy Hunk]
String chunkId = region.getChromosome() + "_" + j;

[Patch]
String chunkId = region.getChromosome() + "_" + j+"_"+CHUNKSIZE/1000+"k";

[Demonstration 2]

[Buggy Method]
public static void main(String[] args) throws IOException {
    String[] path = new String[2];
    ApkOptions options = parseArgs(args, path);
    if (path[0] == null || options == null) {
        return;
    } else if (path[1] == null) {
        path[1] = System.getProperty("user.dir");
    }
    try (SlimApk apk = new SlimApk(path[0], path[1], options)) {
        if (options.getPackageInfo()) {
            apk.info();
        } else {
            apk.parse();
        }
    }
}

[Buggy Hunk]
if(options.getPackageInfo()) {

[Patch]
if(options.getPackageInfo() != null && options.getPackageInfo()) {

[Demonstration 3]

[Buggy Method]
@Test
public void testSimpleNumber6Skip() throws Exception {
    JSONStreamReader parser = new JSONStreamReader(NUMBER_6);
    Assert.assertEquals(ParseState.DOCUMENT, parser.nextState());
    Assert.assertEquals(ParseState.VALUE, parser.nextState());
    Assert.assertEquals(ParseState.END_DOCUMENT, parser.skipToEndStructure());
}

[Buggy Hunk]
Assert.assertEquals(ParseState.VALUE, parser.nextState());

[Patch]
Assert.assertEquals(ParseState.NUMBER_VALUE, parser.nextState());