#vulnerable code 
                                @Test
    void cmdLineOutputDotFile() throws IOException, InterruptedException {
        final File dotFile = setUpFakeDotFile();
        final CommandLineExecutor cmdExecutor = setUpFakeStubCommandExecutor();

        final String envPath = dotFile.getParent();

        final File dotOutputFolder = new File(temp, "out");
        dotOutputFolder.mkdir();
        final String dotOutputName = "test123";

        // Configure engine to output the dotFile to dotOutputFolder
        final GraphvizCmdLineEngine engine = new GraphvizCmdLineEngine(envPath, cmdExecutor);
        engine.setDotOutputFile(dotOutputFolder.getAbsolutePath(), dotOutputName);

        Graphviz.useEngine(engine);

        // Do execution
        Graphviz.fromString("graph g {a--b}").render(SVG_STANDALONE).toString();

        assertTrue(new File(dotOutputFolder.getAbsolutePath(), dotOutputName + ".dot").exists());
    } 
                            #location 16 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    void cmdLineOutputDotFile() throws IOException, InterruptedException {
        final File dotOutputFolder = new File(temp, "out");
        dotOutputFolder.mkdir();
        final String dotOutputName = "test123";

        // Configure engine to output the dotFile to dotOutputFolder
        final GraphvizCmdLineEngine engine = new GraphvizCmdLineEngine()
                .searchPath(setUpFakeDotFile().getParent())
                .executor(setUpFakeStubCommandExecutor());
        engine.setDotOutputFile(dotOutputFolder.getAbsolutePath(), dotOutputName);

        Graphviz.useEngine(engine);

        // Do execution
        Graphviz.fromString("graph g {a--b}").render(SVG_STANDALONE).toString();

        assertTrue(new File(dotOutputFolder.getAbsolutePath(), dotOutputName + ".dot").exists());
    }