#vulnerable code 
                                @BeforeClass
    public void beforeClass() {
        ExtentManager.createInstance(filePath);
        
        ExtentXReporter extentx = new ExtentXReporter("localhost");
        extentx.config().setProjectName("extentreports-pro");
        extentx.config().setReportName(fileName);
        extentx.config().setServerUrl("http://localhost:1337/");
        
        ExtentManager.getInstance().attachReporter(extentx);
        
        ExtentTestManager.setReporter(ExtentManager.getInstance());;
    } 
                            #location 10 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @BeforeClass
    public void beforeClass() {
        ExtentManager.createInstance(filePath);       
        ExtentTestManager.setReporter(ExtentManager.getInstance());
    }