#vulnerable code 
                                @BeforeClass
    public void setup() {
        ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(htmlFilePath);

        ExtentXReporter extentx = new ExtentXReporter("localhost");
        extentx.config().setProjectName("extentreports");
        extentx.config().setReportName(fileName);
        extentx.config().setServerUrl("http://localhost:1337/");
        
        extent = new ExtentReports();
        extent.attachReporter(htmlReporter);
    } 
                            #location 8 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @BeforeClass
    public void setup() {
        ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(htmlFilePath);        
        extent = new ExtentReports();
        extent.attachReporter(htmlReporter);
    }