test_class.declarator: FACTORY = new ThreadDumpFactory().failOnErrors(true)
test_class.modifier: private static final
test_class.original_string: private static final ThreadDumpFactory FACTORY = new ThreadDumpFactory().failOnErrors(true);
test_class.type: ThreadDumpFactory
test_class.var_name: FACTORY
test_class.declarator: cleaner = new DisposeRule()
test_class.modifier: public @Rule
test_class.original_string: public @Rule DisposeRule cleaner = new DisposeRule();
test_class.type: DisposeRule
test_class.var_name: cleaner
test_class.declarator: syntheticId = 42
test_class.modifier: private static volatile
test_class.original_string: private static volatile int syntheticId = 42;
test_class.type: int
test_class.var_name: syntheticId
test_class.file: core/src/test/java/com/github/olivergondza/dumpling/factory/ThreadDumpFactoryTest.java
test_class.identifier: ThreadDumpFactoryTest
test_case.body: @Test
      public void oracleJdk8() throws Exception {
  
          ThreadDumpRuntime expected = runtime(
                  daemon("Attach Listener").setTid(1716535296).setNid(8144).setThreadStatus(ThreadStatus.RUNNABLE).setPriority(9).setId(11),
                  thread("GC task thread#0 (ParallelGC)").setTid(3059810304L).setNid(8115),
                  thread("GC task thread#1 (ParallelGC)").setTid(3059815424L).setNid(8116),
                  thread("GC task thread#2 (ParallelGC)").setTid(3059820544L).setNid(8117),
                  thread("GC task thread#3 (ParallelGC)").setTid(3059825664L).setNid(8118),
                  thread("VM Periodic Task Thread").setTid(1718347776).setNid(8127),
                  daemon("Signal Dispatcher").setTid(1718240256).setNid(8122).setThreadStatus(ThreadStatus.RUNNABLE).setPriority(9).setId(4),
                  daemon("process reaper").setTid(1697889280).setNid(8129).setThreadStatus(ThreadStatus.RUNNABLE).setPriority(10).setId(10),
                  daemon("C2 CompilerThread0").setTid(1718247424).setNid(8123).setThreadStatus(ThreadStatus.RUNNABLE).setPriority(9).setId(5),
                  daemon("C2 CompilerThread1").setTid(1718254592).setNid(8124).setThreadStatus(ThreadStatus.RUNNABLE).setPriority(9).setId(6),
                  daemon("C1 CompilerThread2").setTid(1718260736).setNid(8125).setThreadStatus(ThreadStatus.RUNNABLE).setPriority(9).setId(7),
                  thread("VM Thread").setTid(1718094848).setNid(8119),
                  daemon("Service Thread").setTid(1718273024).setNid(8126).setThreadStatus(ThreadStatus.RUNNABLE).setPriority(9).setId(8),
                  daemon("Finalizer").setTid(1718118400).setNid(8121).setThreadStatus(ThreadStatus.IN_OBJECT_WAIT).setPriority(8).setId(3)
                          .setWaitingOnLock(lock("java.lang.ref.ReferenceQueue$Lock", 2495908272L))
                  ,
                  daemon("Reference Handler").setTid(1718108160).setNid(8120).setThreadStatus(ThreadStatus.IN_OBJECT_WAIT).setPriority(10).setId(2)
                          .setWaitingOnLock(lock("java.lang.ref.Reference$Lock", 2495922552L))
                  ,
                  thread("main").setTid(3059771392L).setNid(8114).setThreadStatus(ThreadStatus.IN_OBJECT_WAIT).setPriority(5).setId(1)
                          .setWaitingOnLock(lock("java.lang.UNIXProcess", 2468857072L))
          );
  
          ThreadDumpRuntime actual = runtimeFrom("oraclejdk-1.8.log");
          assertThat(actual, sameThreadsAs(expected));
  
          StackTrace expectedStackTrace = new StackTrace(
                  StackTrace.nativeElement("java.lang.Object", "wait"),
                  StackTrace.element("java.lang.Object", "wait", "Object.java", 502),
                  StackTrace.element("java.lang.UNIXProcess", "waitFor", "UNIXProcess.java", 264),
                  StackTrace.nativeElement("sun.reflect.NativeMethodAccessorImpl", "invoke0"),
                  StackTrace.element("sun.reflect.NativeMethodAccessorImpl", "invoke", "NativeMethodAccessorImpl.java", 62),
                  StackTrace.element("sun.reflect.DelegatingMethodAccessorImpl", "invoke", "DelegatingMethodAccessorImpl.java", 43),
                  StackTrace.element("java.lang.reflect.Method", "invoke", "Method.java", 483),
                  StackTrace.element("org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce", "invoke", "PojoMetaMethodSite.java", 230),
                  StackTrace.element("org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite", "call", "PojoMetaMethodSite.java", 53),
                  StackTrace.element("org.codehaus.groovy.runtime.callsite.CallSiteArray", "defaultCall", "CallSiteArray.java", 45),
                  StackTrace.element("org.codehaus.groovy.runtime.callsite.AbstractCallSite", "call", "AbstractCallSite.java", 108),
                  StackTrace.element("org.codehaus.groovy.runtime.callsite.AbstractCallSite", "call", "AbstractCallSite.java", 112),
                  StackTrace.element("hudson8109898462652879487", "run", "hudson8109898462652879487.groovy", 9),
                  StackTrace.element("groovy.lang.GroovyShell", "runScriptOrMainOrTestOrRunnable", "GroovyShell.java", 257),
                  StackTrace.element("groovy.lang.GroovyShell", "run", "GroovyShell.java", 220),
                  StackTrace.element("groovy.lang.GroovyShell", "run", "GroovyShell.java", 150),
                  StackTrace.element("groovy.ui.GroovyMain", "processOnce", "GroovyMain.java", 588),
                  StackTrace.element("groovy.ui.GroovyMain", "run", "GroovyMain.java", 375),
                  StackTrace.element("groovy.ui.GroovyMain", "process", "GroovyMain.java", 361),
                  StackTrace.element("groovy.ui.GroovyMain", "processArgs", "GroovyMain.java", 120),
                  StackTrace.element("groovy.ui.GroovyMain", "main", "GroovyMain.java", 100),
                  StackTrace.nativeElement("sun.reflect.NativeMethodAccessorImpl", "invoke0"),
                  StackTrace.element("sun.reflect.NativeMethodAccessorImpl", "invoke", "NativeMethodAccessorImpl.java", 62),
                  StackTrace.element("sun.reflect.DelegatingMethodAccessorImpl", "invoke", "DelegatingMethodAccessorImpl.java", 43),
                  StackTrace.element("java.lang.reflect.Method", "invoke", "Method.java", 483),
                  StackTrace.element("org.codehaus.groovy.tools.GroovyStarter", "rootLoader", "GroovyStarter.java", 106),
                  StackTrace.element("org.codehaus.groovy.tools.GroovyStarter", "main", "GroovyStarter.java", 128)
          );
  
          assertThat(actual, stacktraceEquals(expectedStackTrace, "main"));
      }
test_case.class_method_signature: ThreadDumpFactoryTest.oracleJdk8()
test_case.full_signature: @Test public void oracleJdk8()
test_case.identifier: oracleJdk8
test_case.invocations: runtime setId setPriority setThreadStatus setNid setTid daemon setNid setTid thread setNid setTid thread setNid setTid thread setNid setTid thread setNid setTid thread setId setPriority setThreadStatus setNid setTid daemon setId setPriority setThreadStatus setNid setTid daemon setId setPriority setThreadStatus setNid setTid daemon setId setPriority setThreadStatus setNid setTid daemon setId setPriority setThreadStatus setNid setTid daemon setNid setTid thread setId setPriority setThreadStatus setNid setTid daemon setWaitingOnLock setId setPriority setThreadStatus setNid setTid daemon lock setWaitingOnLock setId setPriority setThreadStatus setNid setTid daemon lock setWaitingOnLock setId setPriority setThreadStatus setNid setTid thread lock runtimeFrom assertThat sameThreadsAs nativeElement element element nativeElement element element element element element element element element element element element element element element element element element nativeElement element element element element element assertThat stacktraceEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void oracleJdk8()
focal_class.declarator: LOG = Logger.getLogger(ThreadDumpFactory.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = Logger.getLogger(ThreadDumpFactory.class.getName());
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: WAIT_TRACE_ELEMENT = StackTrace.nativeElement("java.lang.Object", "wait")
focal_class.modifier: private static final
focal_class.original_string: private static final StackTraceElement WAIT_TRACE_ELEMENT = StackTrace.nativeElement("java.lang.Object", "wait");
focal_class.type: StackTraceElement
focal_class.var_name: WAIT_TRACE_ELEMENT
focal_class.declarator: NL = "(?:\\r\\n|\\n)"
focal_class.modifier: private static final
focal_class.original_string: private static final String NL = "(?:\\r\\n|\\n)";
focal_class.type: String
focal_class.var_name: NL
focal_class.declarator: LOCK_SUBPATTERN = "<(?:0x)?(\\w+)> \\(a ([^\\)]+)\\)"
focal_class.modifier: private static final
focal_class.original_string: private static final String LOCK_SUBPATTERN = "<(?:0x)?(\\w+)> \\(a ([^\\)]+)\\)";
focal_class.type: String
focal_class.var_name: LOCK_SUBPATTERN
focal_class.declarator: THREAD_DELIMITER = Pattern.compile(NL + "(?:" + NL + "(?!\\s)|(?=\"))")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern THREAD_DELIMITER = Pattern.compile(NL + "(?:" + NL + "(?!\\s)|(?=\"))");
focal_class.type: Pattern
focal_class.var_name: THREAD_DELIMITER
focal_class.declarator: STACK_TRACE_ELEMENT_LINE = Pattern.compile(" *at (\\S+)\\.(\\S+)\\((?:.+/)?([^:]+?)(\\:\\d+)?\\)")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern STACK_TRACE_ELEMENT_LINE = Pattern.compile(" *at (\\S+)\\.(\\S+)\\((?:.+/)?([^:]+?)(\\:\\d+)?\\)");
focal_class.type: Pattern
focal_class.var_name: STACK_TRACE_ELEMENT_LINE
focal_class.declarator: ACQUIRED_LINE = Pattern.compile("- locked " + LOCK_SUBPATTERN)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern ACQUIRED_LINE = Pattern.compile("- locked " + LOCK_SUBPATTERN);
focal_class.type: Pattern
focal_class.var_name: ACQUIRED_LINE
focal_class.declarator: WAITING_ON_LINE = Pattern.compile("- (?:waiting on|parking to wait for ?) " + LOCK_SUBPATTERN)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern WAITING_ON_LINE = Pattern.compile("- (?:waiting on|parking to wait for ?) " + LOCK_SUBPATTERN);
focal_class.type: Pattern
focal_class.var_name: WAITING_ON_LINE
focal_class.declarator: WAITING_TO_LOCK_LINE = Pattern.compile("- waiting to lock " + LOCK_SUBPATTERN)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern WAITING_TO_LOCK_LINE = Pattern.compile("- waiting to lock " + LOCK_SUBPATTERN);
focal_class.type: Pattern
focal_class.var_name: WAITING_TO_LOCK_LINE
focal_class.declarator: OWNABLE_SYNCHRONIZER_LINE = Pattern.compile("- " + LOCK_SUBPATTERN)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern OWNABLE_SYNCHRONIZER_LINE = Pattern.compile("- " + LOCK_SUBPATTERN);
focal_class.type: Pattern
focal_class.var_name: OWNABLE_SYNCHRONIZER_LINE
focal_class.declarator: THREAD_HEADER = Pattern.compile(
              "^\"(.*)\" ([^\\n\\r]+)(?:" + NL + "\\s+java.lang.Thread.State: ([^\\n\\r]+)(?:" + NL + "(.+))?)?",
              Pattern.DOTALL
      )
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern THREAD_HEADER = Pattern.compile(
              "^\"(.*)\" ([^\\n\\r]+)(?:" + NL + "\\s+java.lang.Thread.State: ([^\\n\\r]+)(?:" + NL + "(.+))?)?",
              Pattern.DOTALL
      );
focal_class.type: Pattern
focal_class.var_name: THREAD_HEADER
focal_class.declarator: failOnErrors = false
focal_class.modifier: private
focal_class.original_string: private boolean failOnErrors = false;
focal_class.type: boolean
focal_class.var_name: failOnErrors
focal_class.declarator: traceElementCache = new WeakHashMap<String, StackTraceElement>()
focal_class.modifier: private static final
focal_class.original_string: private static final WeakHashMap<String, StackTraceElement> traceElementCache = new WeakHashMap<String, StackTraceElement>();
focal_class.type: WeakHashMap<String, StackTraceElement>
focal_class.var_name: traceElementCache
focal_class.file: core/src/main/java/com/github/olivergondza/dumpling/factory/ThreadDumpFactory.java
focal_class.identifier: ThreadDumpFactory
focal_class.class_method_signature: ThreadDumpFactory.failOnErrors(boolean failOnErrors)
focal_class.full_signature: public ThreadDumpFactory failOnErrors(boolean failOnErrors)
focal_class.identifier: failOnErrors
focal_class.modifiers: public
focal_class.parameters: (boolean failOnErrors)
focal_class.return: ThreadDumpFactory
focal_class.signature: ThreadDumpFactory failOnErrors(boolean failOnErrors)
focal_class.class_method_signature: ThreadDumpFactory.fromFile(@Nonnull File threadDump)
focal_class.full_signature: public @Nonnull ThreadDumpRuntime fromFile(@Nonnull File threadDump)
focal_class.identifier: fromFile
focal_class.modifiers: public @Nonnull
focal_class.parameters: (@Nonnull File threadDump)
focal_class.return: ThreadDumpRuntime
focal_class.signature: ThreadDumpRuntime fromFile(@Nonnull File threadDump)
focal_class.class_method_signature: ThreadDumpFactory.fromStream(@Nonnull InputStream stream)
focal_class.full_signature: public @Nonnull ThreadDumpRuntime fromStream(@Nonnull InputStream stream)
focal_class.identifier: fromStream
focal_class.modifiers: public @Nonnull
focal_class.parameters: (@Nonnull InputStream stream)
focal_class.return: ThreadDumpRuntime
focal_class.signature: ThreadDumpRuntime fromStream(@Nonnull InputStream stream)
focal_class.class_method_signature: ThreadDumpFactory.fromString(@Nonnull String runtime)
focal_class.full_signature: public @Nonnull ThreadDumpRuntime fromString(@Nonnull String runtime)
focal_class.identifier: fromString
focal_class.modifiers: public @Nonnull
focal_class.parameters: (@Nonnull String runtime)
focal_class.return: ThreadDumpRuntime
focal_class.signature: ThreadDumpRuntime fromString(@Nonnull String runtime)
focal_class.class_method_signature: ThreadDumpFactory.thread(String singleThread)
focal_class.full_signature: private ThreadDumpThread.Builder thread(String singleThread)
focal_class.identifier: thread
focal_class.modifiers: private
focal_class.parameters: (String singleThread)
focal_class.return: ThreadDumpThread.Builder
focal_class.signature: ThreadDumpThread.Builder thread(String singleThread)
focal_class.class_method_signature: ThreadDumpFactory.initStacktrace(Builder builder, String trace, String wholeThread)
focal_class.full_signature: private Builder initStacktrace(Builder builder, String trace, String wholeThread)
focal_class.identifier: initStacktrace
focal_class.modifiers: private
focal_class.parameters: (Builder builder, String trace, String wholeThread)
focal_class.return: Builder
focal_class.signature: Builder initStacktrace(Builder builder, String trace, String wholeThread)
focal_class.class_method_signature: ThreadDumpFactory.getMonitorJustAcquired(List<ThreadLock.Monitor> monitors)
focal_class.full_signature: private Monitor getMonitorJustAcquired(List<ThreadLock.Monitor> monitors)
focal_class.identifier: getMonitorJustAcquired
focal_class.modifiers: private
focal_class.parameters: (List<ThreadLock.Monitor> monitors)
focal_class.return: Monitor
focal_class.signature: Monitor getMonitorJustAcquired(List<ThreadLock.Monitor> monitors)
focal_class.class_method_signature: ThreadDumpFactory.traceElement(String line)
focal_class.full_signature: private StackTraceElement traceElement(String line)
focal_class.identifier: traceElement
focal_class.modifiers: private
focal_class.parameters: (String line)
focal_class.return: StackTraceElement
focal_class.signature: StackTraceElement traceElement(String line)
focal_class.class_method_signature: ThreadDumpFactory.filterMonitors(List<ThreadLock.Monitor> monitors, ThreadLock lock)
focal_class.full_signature: private void filterMonitors(List<ThreadLock.Monitor> monitors, ThreadLock lock)
focal_class.identifier: filterMonitors
focal_class.modifiers: private
focal_class.parameters: (List<ThreadLock.Monitor> monitors, ThreadLock lock)
focal_class.return: void
focal_class.signature: void filterMonitors(List<ThreadLock.Monitor> monitors, ThreadLock lock)
focal_class.class_method_signature: ThreadDumpFactory.createLock(Matcher matcher)
focal_class.full_signature: private @Nonnull ThreadLock createLock(Matcher matcher)
focal_class.identifier: createLock
focal_class.modifiers: private @Nonnull
focal_class.parameters: (Matcher matcher)
focal_class.return: ThreadLock
focal_class.signature: ThreadLock createLock(Matcher matcher)
focal_class.class_method_signature: ThreadDumpFactory.initHeader(ThreadDumpThread.Builder builder, String attrs)
focal_class.full_signature: private void initHeader(ThreadDumpThread.Builder builder, String attrs)
focal_class.identifier: initHeader
focal_class.modifiers: private
focal_class.parameters: (ThreadDumpThread.Builder builder, String attrs)
focal_class.return: void
focal_class.signature: void initHeader(ThreadDumpThread.Builder builder, String attrs)
focal_class.class_method_signature: ThreadDumpFactory.parseNid(String value)
focal_class.full_signature: private long parseNid(String value)
focal_class.identifier: parseNid
focal_class.modifiers: private
focal_class.parameters: (String value)
focal_class.return: long
focal_class.signature: long parseNid(String value)
focal_class.class_method_signature: ThreadDumpFactory.parseLong(String value)
focal_class.full_signature: static long parseLong(String value)
focal_class.identifier: parseLong
focal_class.modifiers: static
focal_class.parameters: (String value)
focal_class.return: long
focal_class.signature: long parseLong(String value)
focal_method.body: private ThreadDumpThread.Builder thread(String singleThread) {
  
          Matcher matcher = THREAD_HEADER.matcher(singleThread);
          if (!matcher.find()) return null;
  
          ThreadDumpThread.Builder builder = new ThreadDumpThread.Builder();
          builder.setName(matcher.group(1));
          initHeader(builder, matcher.group(2));
  
          String status = matcher.group(3);
          if (status != null) {
              builder.setThreadStatus(ThreadStatus.fromString(status));
          }
  
          final String trace = matcher.group(4);
          if (trace != null) {
              builder = initStacktrace(builder, trace, singleThread);
          }
  
          return builder;
      }
focal_method.class_method_signature: ThreadDumpFactory.thread(String singleThread)
focal_method.full_signature: private ThreadDumpThread.Builder thread(String singleThread)
focal_method.identifier: thread
focal_method.invocations: matcher find setName group initHeader group group setThreadStatus fromString group initStacktrace
focal_method.modifiers: private
focal_method.parameters: (String singleThread)
focal_method.return: ThreadDumpThread.Builder
focal_method.signature: ThreadDumpThread.Builder thread(String singleThread)