#fixed code
                                private ParseResult parseSample(String sampleName) {
        Provider p = Providers.resourceProvider(
                "com/github/javaparser/issue_samples/" + sampleName + ".java.txt");
        return new JavaParser().parse(ParseStart.COMPILATION_UNIT, p);
    }
#vulnerable code 
                                private ParseResult parseSample(String sampleName) {
        InputStream is = this.getClass().getResourceAsStream(
                "/com/github/javaparser/issue_samples/" + sampleName + ".java.txt");
        Provider p = Providers.provider(is, Charsets.UTF_8);
        return new JavaParser().parse(ParseStart.COMPILATION_UNIT, p);
    } 
                            #location 5 
                            #vulnerability type RESOURCE_LEAK