test_class.file: common/src/test/java/org/glowroot/common/util/VersionTest.java
test_class.identifier: VersionTest
test_case.body: @Test
      public void testWithInvalidBuildCommitAndMissingBuildTime() {
          // given
          Manifest manifest = mock(Manifest.class);
          Attributes attributes = mock(Attributes.class);
          when(manifest.getMainAttributes()).thenReturn(attributes);
          when(attributes.getValue("Implementation-Version")).thenReturn("0.1.2-SNAPSHOT");
          when(attributes.getValue("Build-Commit")).thenReturn("tooshort");
          // when
          String version = Version.getVersion(manifest);
          // then
          assertThat(version).isEqualTo("0.1.2-SNAPSHOT");
      }
test_case.class_method_signature: VersionTest.testWithInvalidBuildCommitAndMissingBuildTime()
test_case.full_signature: @Test public void testWithInvalidBuildCommitAndMissingBuildTime()
test_case.identifier: testWithInvalidBuildCommitAndMissingBuildTime
test_case.invocations: mock mock thenReturn when getMainAttributes thenReturn when getValue thenReturn when getValue getVersion isEqualTo assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testWithInvalidBuildCommitAndMissingBuildTime()
focal_class.declarator: UNKNOWN_VERSION = "unknown"
focal_class.modifier: public static final
focal_class.original_string: public static final String UNKNOWN_VERSION = "unknown";
focal_class.type: String
focal_class.var_name: UNKNOWN_VERSION
focal_class.declarator: logger = LoggerFactory.getLogger(Version.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(Version.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: common/src/main/java/org/glowroot/common/util/Version.java
focal_class.identifier: Version
focal_class.class_method_signature: Version.Version()
focal_class.full_signature: private  Version()
focal_class.identifier: Version
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Version()
focal_class.class_method_signature: Version.getVersion(Class<?> baseClass)
focal_class.full_signature: public static String getVersion(Class<?> baseClass)
focal_class.identifier: getVersion
focal_class.modifiers: public static
focal_class.parameters: (Class<?> baseClass)
focal_class.return: String
focal_class.signature: String getVersion(Class<?> baseClass)
focal_class.class_method_signature: Version.getVersion(@Nullable URL manifestURL)
focal_class.full_signature: public static String getVersion(@Nullable URL manifestURL)
focal_class.identifier: getVersion
focal_class.modifiers: public static
focal_class.parameters: (@Nullable URL manifestURL)
focal_class.return: String
focal_class.signature: String getVersion(@Nullable URL manifestURL)
focal_class.class_method_signature: Version.getManifest(Class<?> clazz)
focal_class.full_signature: @VisibleForTesting static @Nullable Manifest getManifest(Class<?> clazz)
focal_class.identifier: getManifest
focal_class.modifiers: @VisibleForTesting static @Nullable
focal_class.parameters: (Class<?> clazz)
focal_class.return: Manifest
focal_class.signature: Manifest getManifest(Class<?> clazz)
focal_class.class_method_signature: Version.getManifest(@Nullable URL url)
focal_class.full_signature: private static @Nullable Manifest getManifest(@Nullable URL url)
focal_class.identifier: getManifest
focal_class.modifiers: private static @Nullable
focal_class.parameters: (@Nullable URL url)
focal_class.return: Manifest
focal_class.signature: Manifest getManifest(@Nullable URL url)
focal_class.class_method_signature: Version.getVersion(@Nullable Manifest manifest)
focal_class.full_signature: @VisibleForTesting static String getVersion(@Nullable Manifest manifest)
focal_class.identifier: getVersion
focal_class.modifiers: @VisibleForTesting static
focal_class.parameters: (@Nullable Manifest manifest)
focal_class.return: String
focal_class.signature: String getVersion(@Nullable Manifest manifest)
focal_class.class_method_signature: Version.getSnapshotVersion(String version, Attributes mainAttributes)
focal_class.full_signature: private static String getSnapshotVersion(String version, Attributes mainAttributes)
focal_class.identifier: getSnapshotVersion
focal_class.modifiers: private static
focal_class.parameters: (String version, Attributes mainAttributes)
focal_class.return: String
focal_class.signature: String getSnapshotVersion(String version, Attributes mainAttributes)
focal_method.body: public static String getVersion(Class<?> baseClass) {
          Manifest manifest;
          try {
              manifest = getManifest(baseClass);
          } catch (IOException e) {
              logger.error(e.getMessage(), e);
              return UNKNOWN_VERSION;
          }
          return getVersion(manifest);
      }
focal_method.class_method_signature: Version.getVersion(Class<?> baseClass)
focal_method.full_signature: public static String getVersion(Class<?> baseClass)
focal_method.identifier: getVersion
focal_method.invocations: getManifest error getMessage getVersion
focal_method.modifiers: public static
focal_method.parameters: (Class<?> baseClass)
focal_method.return: String
focal_method.signature: String getVersion(Class<?> baseClass)