test_class.file: dataprep-backend-service/src/test/java/org/talend/dataprep/info/ClassPathManifestInfoProviderTest.java
test_class.identifier: ClassPathManifestInfoProviderTest
test_case.body: @Test
      public void shouldReadFromMissingFile() throws Exception {
          // given
          final ClassPathManifestInfoProvider provider =
                  new ClassPathManifestInfoProvider("/intentionally_missing_file.properties", "source2");
  
          // when
          final ManifestInfo manifestInfo = provider.getManifestInfo();
  
          // then
          assertEquals("N/A", manifestInfo.getVersionId());
          assertEquals("N/A", manifestInfo.getBuildId());
      }
test_case.class_method_signature: ClassPathManifestInfoProviderTest.shouldReadFromMissingFile()
test_case.full_signature: @Test public void shouldReadFromMissingFile()
test_case.identifier: shouldReadFromMissingFile
test_case.invocations: getManifestInfo assertEquals getVersionId assertEquals getBuildId
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldReadFromMissingFile()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(ClassPathManifestInfoProvider.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(ClassPathManifestInfoProvider.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: resource
focal_class.modifier: private final
focal_class.original_string: private final String resource;
focal_class.type: String
focal_class.var_name: resource
focal_class.declarator: name
focal_class.modifier: private final
focal_class.original_string: private final String name;
focal_class.type: String
focal_class.var_name: name
focal_class.file: dataprep-backend-service/src/main/java/org/talend/dataprep/info/ClassPathManifestInfoProvider.java
focal_class.identifier: ClassPathManifestInfoProvider
focal_class.interfaces: implements ManifestInfoProvider
focal_class.class_method_signature: ClassPathManifestInfoProvider.ClassPathManifestInfoProvider(String resource, String name)
focal_class.full_signature: public  ClassPathManifestInfoProvider(String resource, String name)
focal_class.identifier: ClassPathManifestInfoProvider
focal_class.modifiers: public
focal_class.parameters: (String resource, String name)
focal_class.signature:  ClassPathManifestInfoProvider(String resource, String name)
focal_class.class_method_signature: ClassPathManifestInfoProvider.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: ClassPathManifestInfoProvider.getManifestInfo()
focal_class.full_signature: @Override public ManifestInfo getManifestInfo()
focal_class.identifier: getManifestInfo
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ManifestInfo
focal_class.signature: ManifestInfo getManifestInfo()
focal_method.body: @Override
      public ManifestInfo getManifestInfo() {
          final Properties properties = new Properties();
          final InputStream gitProperties = ClassPathManifestInfoProvider.class.getResourceAsStream(resource);
          if (gitProperties != null) {
              try {
                  properties.load(gitProperties);
              } catch (IOException e) {
                  LOGGER.debug("Unable to read from resource '{}'.", resource, e);
              }
          } else {
              LOGGER.debug("Resource '{}' does not exist.", resource);
          }
          final String versionId = Optional.ofNullable(properties.getProperty("git.build.version")).orElse("N/A");
          final String buildId = Optional.ofNullable(properties.getProperty("git.commit.id.abbrev")).orElse("N/A");
          return new ManifestInfo(versionId, buildId);
      }
focal_method.class_method_signature: ClassPathManifestInfoProvider.getManifestInfo()
focal_method.full_signature: @Override public ManifestInfo getManifestInfo()
focal_method.identifier: getManifestInfo
focal_method.invocations: getResourceAsStream load debug debug orElse ofNullable getProperty orElse ofNullable getProperty
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: ManifestInfo
focal_method.signature: ManifestInfo getManifestInfo()