#vulnerable code 
                                private String runCommand(String directory, String... command) throws IOException {
        ProcessBuilder processBuilder = new ProcessBuilder(command);

        processBuilder.directory(new File(directory));
        Process process = processBuilder.start();

        InputStream is = process.getInputStream();
        InputStreamReader isr = new InputStreamReader(is);
        BufferedReader br = new BufferedReader(isr);
        String line;
        StringBuilder sb = new StringBuilder();

        while ((line = br.readLine()) != null) {
            sb.append(line);
        }

        return sb.toString();
    } 
                            #location 17 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                private String runCommand(String directory, String... command) throws IOException {
        ProcessBuilder processBuilder = new ProcessBuilder(command);

        processBuilder.directory(new File(directory));
        Process process = processBuilder.start();

        InputStream is = process.getInputStream();
        InputStreamReader isr = new InputStreamReader(is, Values.CHARSET_UTF8);
        BufferedReader br = new BufferedReader(isr);
        String line;
        StringBuilder sb = new StringBuilder();

        while ((line = br.readLine()) != null) {
            sb.append(line);
        }

        return sb.toString();
    }