output: #fixed code
                                  public void stopRecording() throws IOException {
          Integer processId = androidScreenRecordProcess.get(Thread.currentThread().getId());
          stopRunningProcess(processId);
      }
input: #vulnerable code 
                                  public void stopRecording() throws IOException {
          Integer processId = androidScreenRecordProcess.get(Thread.currentThread().getId());
          if (processId != -1) {
              String process = "pgrep -P " + processId;
              System.out.println(process);
              Process p2 = Runtime.getRuntime().exec(process);
              BufferedReader r = new BufferedReader(new InputStreamReader(p2.getInputStream()));
              String command = "kill " + processId;
              System.out.println("Stopping Video Recording");
              System.out.println("******************" + command);
              try {
                  runCommandThruProcess(command);
                  Thread.sleep(10000);
                  System.out.println("Killed video recording with exit code :" + command);
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          }
      } 
                              #location 7 
                              #vulnerability type RESOURCE_LEAK