test_class.file: common2/src/test/java/org/glowroot/common2/repo/util/CompilationsTest.java
test_class.identifier: CompilationsTest
test_case.body: @Test
      public void testClassNameParsing() {
          assertThat(Compilations.getPublicClassName(
                  "public class A { public static void main(String[] args) {} } class B {}"))
                          .isEqualTo("A");
          assertThat(Compilations.getPublicClassName("public class X extends Object {}"))
                  .isEqualTo("X");
          assertThat(Compilations.getPublicClassName(
                  "public class X extends Object {} public class Y extends Object {}"))
                          .isEqualTo("X");
          assertThat(Compilations
                  .getPublicClassName("class X extends Object {} public class Y extends Object {}"))
                          .isEqualTo("Y");
          assertThat(Compilations
                  .getPublicClassName("class X extends Object {}\npublic class Y extends Object {}"))
                          .isEqualTo("Y");
          assertThat(Compilations
                  .getPublicClassName("class X extends Object {}public class Y extends Object {}"))
                          .isEqualTo("Y");
          assertThat(Compilations.getPublicClassName("class X extends Object {}")).isEqualTo("");
      }
test_case.class_method_signature: CompilationsTest.testClassNameParsing()
test_case.full_signature: @Test public void testClassNameParsing()
test_case.identifier: testClassNameParsing
test_case.invocations: isEqualTo assertThat getPublicClassName isEqualTo assertThat getPublicClassName isEqualTo assertThat getPublicClassName isEqualTo assertThat getPublicClassName isEqualTo assertThat getPublicClassName isEqualTo assertThat getPublicClassName isEqualTo assertThat getPublicClassName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testClassNameParsing()
focal_class.declarator: CLASS_NAME_PATTERN =
              Pattern.compile("\\bpublic\\s+class\\s+([^\\s{]+)[\\s{]")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern CLASS_NAME_PATTERN =
              Pattern.compile("\\bpublic\\s+class\\s+([^\\s{]+)[\\s{]");
focal_class.type: Pattern
focal_class.var_name: CLASS_NAME_PATTERN
focal_class.declarator: PACKAGE_NAME_PATTERN =
              Pattern.compile("^\\s*\\bpackage\\s+([^;]+)\\s*;")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern PACKAGE_NAME_PATTERN =
              Pattern.compile("^\\s*\\bpackage\\s+([^;]+)\\s*;");
focal_class.type: Pattern
focal_class.var_name: PACKAGE_NAME_PATTERN
focal_class.file: common2/src/main/java/org/glowroot/common2/repo/util/Compilations.java
focal_class.identifier: Compilations
focal_class.class_method_signature: Compilations.Compilations()
focal_class.full_signature: private  Compilations()
focal_class.identifier: Compilations
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Compilations()
focal_class.class_method_signature: Compilations.compile(String source)
focal_class.full_signature: public static Class<?> compile(String source)
focal_class.identifier: compile
focal_class.modifiers: public static
focal_class.parameters: (String source)
focal_class.return: Class<?>
focal_class.signature: Class<?> compile(String source)
focal_class.class_method_signature: Compilations.getCompilationClassPath()
focal_class.full_signature: private static List<File> getCompilationClassPath()
focal_class.identifier: getCompilationClassPath
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: List<File>
focal_class.signature: List<File> getCompilationClassPath()
focal_class.class_method_signature: Compilations.getJarFile(String className)
focal_class.full_signature: private static File getJarFile(String className)
focal_class.identifier: getJarFile
focal_class.modifiers: private static
focal_class.parameters: (String className)
focal_class.return: File
focal_class.signature: File getJarFile(String className)
focal_class.class_method_signature: Compilations.getPublicClassName(String source)
focal_class.full_signature: @VisibleForTesting static String getPublicClassName(String source)
focal_class.identifier: getPublicClassName
focal_class.modifiers: @VisibleForTesting static
focal_class.parameters: (String source)
focal_class.return: String
focal_class.signature: String getPublicClassName(String source)
focal_class.class_method_signature: Compilations.getPackagePrefix(String source)
focal_class.full_signature: private static String getPackagePrefix(String source)
focal_class.identifier: getPackagePrefix
focal_class.modifiers: private static
focal_class.parameters: (String source)
focal_class.return: String
focal_class.signature: String getPackagePrefix(String source)
focal_method.body: @VisibleForTesting
      static String getPublicClassName(String source) {
          Matcher matcher = CLASS_NAME_PATTERN.matcher(source);
          if (matcher.find()) {
              return getPackagePrefix(source) + matcher.group(1);
          } else {
              return "";
          }
      }
focal_method.class_method_signature: Compilations.getPublicClassName(String source)
focal_method.full_signature: @VisibleForTesting static String getPublicClassName(String source)
focal_method.identifier: getPublicClassName
focal_method.invocations: matcher find getPackagePrefix group
focal_method.modifiers: @VisibleForTesting static
focal_method.parameters: (String source)
focal_method.return: String
focal_method.signature: String getPublicClassName(String source)