test_class.declarator: FACTORY = new PidRuntimeFactory().failOnErrors(true)
test_class.modifier: private static final
test_class.original_string: private static final PidRuntimeFactory FACTORY = new PidRuntimeFactory().failOnErrors(true);
test_class.type: PidRuntimeFactory
test_class.var_name: FACTORY
test_class.declarator: disposer = new DisposeRule()
test_class.modifier: @Rule public
test_class.original_string: @Rule public DisposeRule disposer = new DisposeRule();
test_class.type: DisposeRule
test_class.var_name: disposer
test_class.file: core/src/test/java/com/github/olivergondza/dumpling/factory/PidRuntimeFactoryTest.java
test_class.identifier: PidRuntimeFactoryTest
test_case.body: @Test
      public void notAJavaProcess() throws Exception {
          try {
              new PidRuntimeFactory().fromProcess(299);
              fail("No exception thrown");
          } catch(IOException ex) {
              assertThat(ex.getMessage(), containsString("jstack failed with code "));
          }
      }
test_case.class_method_signature: PidRuntimeFactoryTest.notAJavaProcess()
test_case.full_signature: @Test public void notAJavaProcess()
test_case.identifier: notAJavaProcess
test_case.invocations: fromProcess fail assertThat getMessage containsString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void notAJavaProcess()
focal_class.declarator: javaHome
focal_class.modifier: private final @Nonnull
focal_class.original_string: private final @Nonnull String javaHome;
focal_class.type: String
focal_class.var_name: javaHome
focal_class.declarator: threadDumpFactory = new ThreadDumpFactory()
focal_class.modifier: private final @Nonnull
focal_class.original_string: private final @Nonnull ThreadDumpFactory threadDumpFactory = new ThreadDumpFactory();
focal_class.type: ThreadDumpFactory
focal_class.var_name: threadDumpFactory
focal_class.file: core/src/main/java/com/github/olivergondza/dumpling/factory/PidRuntimeFactory.java
focal_class.identifier: PidRuntimeFactory
focal_class.class_method_signature: PidRuntimeFactory.PidRuntimeFactory()
focal_class.full_signature: public  PidRuntimeFactory()
focal_class.identifier: PidRuntimeFactory
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  PidRuntimeFactory()
focal_class.class_method_signature: PidRuntimeFactory.PidRuntimeFactory(@Nonnull String javaHome)
focal_class.full_signature: public  PidRuntimeFactory(@Nonnull String javaHome)
focal_class.identifier: PidRuntimeFactory
focal_class.modifiers: public
focal_class.parameters: (@Nonnull String javaHome)
focal_class.signature:  PidRuntimeFactory(@Nonnull String javaHome)
focal_class.class_method_signature: PidRuntimeFactory.failOnErrors(boolean failOnErrors)
focal_class.full_signature: public PidRuntimeFactory failOnErrors(boolean failOnErrors)
focal_class.identifier: failOnErrors
focal_class.modifiers: public
focal_class.parameters: (boolean failOnErrors)
focal_class.return: PidRuntimeFactory
focal_class.signature: PidRuntimeFactory failOnErrors(boolean failOnErrors)
focal_class.class_method_signature: PidRuntimeFactory.fromProcess(long pid)
focal_class.full_signature: public @Nonnull ThreadDumpRuntime fromProcess(long pid)
focal_class.identifier: fromProcess
focal_class.modifiers: public @Nonnull
focal_class.parameters: (long pid)
focal_class.return: ThreadDumpRuntime
focal_class.signature: ThreadDumpRuntime fromProcess(long pid)
focal_class.class_method_signature: PidRuntimeFactory.fromProcess(int pid)
focal_class.full_signature: public @Nonnull ThreadDumpRuntime fromProcess(int pid)
focal_class.identifier: fromProcess
focal_class.modifiers: public @Nonnull
focal_class.parameters: (int pid)
focal_class.return: ThreadDumpRuntime
focal_class.signature: ThreadDumpRuntime fromProcess(int pid)
focal_class.class_method_signature: PidRuntimeFactory.fromProcess(@Nonnull Process process)
focal_class.full_signature: public @Nonnull ThreadDumpRuntime fromProcess(@Nonnull Process process)
focal_class.identifier: fromProcess
focal_class.modifiers: public @Nonnull
focal_class.parameters: (@Nonnull Process process)
focal_class.return: ThreadDumpRuntime
focal_class.signature: ThreadDumpRuntime fromProcess(@Nonnull Process process)
focal_class.class_method_signature: PidRuntimeFactory.extractPid(@Nonnull Process process)
focal_class.full_signature: private static long extractPid(@Nonnull Process process)
focal_class.identifier: extractPid
focal_class.modifiers: private static
focal_class.parameters: (@Nonnull Process process)
focal_class.return: long
focal_class.signature: long extractPid(@Nonnull Process process)
focal_class.class_method_signature: PidRuntimeFactory.fromCurrentProcess()
focal_class.full_signature: public @Nonnull ThreadDumpRuntime fromCurrentProcess()
focal_class.identifier: fromCurrentProcess
focal_class.modifiers: public @Nonnull
focal_class.parameters: ()
focal_class.return: ThreadDumpRuntime
focal_class.signature: ThreadDumpRuntime fromCurrentProcess()
focal_class.class_method_signature: PidRuntimeFactory.createRuntime(Process process)
focal_class.full_signature: protected ThreadDumpRuntime createRuntime(Process process)
focal_class.identifier: createRuntime
focal_class.modifiers: protected
focal_class.parameters: (Process process)
focal_class.return: ThreadDumpRuntime
focal_class.signature: ThreadDumpRuntime createRuntime(Process process)
focal_class.class_method_signature: PidRuntimeFactory.validateResult(Process process, int ret)
focal_class.full_signature: private void validateResult(Process process, int ret)
focal_class.identifier: validateResult
focal_class.modifiers: private
focal_class.parameters: (Process process, int ret)
focal_class.return: void
focal_class.signature: void validateResult(Process process, int ret)
focal_class.class_method_signature: PidRuntimeFactory.jstackBinary()
focal_class.full_signature: private String jstackBinary()
focal_class.identifier: jstackBinary
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String jstackBinary()
focal_method.body: public @Nonnull ThreadDumpRuntime fromProcess(long pid) throws IOException, InterruptedException {
          ProcessBuilder pb = new ProcessBuilder(jstackBinary(), "-l", Long.toString(pid));
  
          Process process = pb.start();
  
          // Start consuming the output without waiting for process completion not to block both processes.
          ThreadDumpRuntime runtime = null;
          RuntimeException runtimeEx = null;
          try {
              runtime = createRuntime(process);
          } catch (IllegalRuntimeStateException ex) {
              // Do not throw the exception right away so #validateResult can diagnose more severe problem first.
              runtimeEx = ex;
          }
  
          int ret = process.waitFor();
          validateResult(process, ret);
  
          if (runtimeEx != null) throw runtimeEx;
  
          return runtime;
      }
focal_method.class_method_signature: PidRuntimeFactory.fromProcess(long pid)
focal_method.full_signature: public @Nonnull ThreadDumpRuntime fromProcess(long pid)
focal_method.identifier: fromProcess
focal_method.invocations: jstackBinary toString start createRuntime waitFor validateResult
focal_method.modifiers: public @Nonnull
focal_method.parameters: (long pid)
focal_method.return: ThreadDumpRuntime
focal_method.signature: ThreadDumpRuntime fromProcess(long pid)