test_class.file: tycho-extras/tycho-sourceref-jgit/src/test/java/org/eclipse/tycho/extras/sourceref/jgit/JGitSourceReferencesProviderTest.java
test_class.identifier: JGitSourceReferencesProviderTest
test_case.body: @Test
      public void testGetRelativePathNoCommonBasedir() throws MojoExecutionException {
          JGitSourceReferencesProvider provider = new JGitSourceReferencesProvider();
          File projectBasedir = new File("/foo/test/bar");
          File repoRoot = new File("/baz");
          assertThrows(MojoExecutionException.class, () -> provider.getRelativePath(projectBasedir, repoRoot));
      }
test_case.class_method_signature: JGitSourceReferencesProviderTest.testGetRelativePathNoCommonBasedir()
test_case.full_signature: @Test public void testGetRelativePathNoCommonBasedir()
test_case.identifier: testGetRelativePathNoCommonBasedir
test_case.invocations: assertThrows getRelativePath
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetRelativePathNoCommonBasedir()
focal_class.file: tycho-extras/tycho-sourceref-jgit/src/main/java/org/eclipse/tycho/extras/sourceref/jgit/JGitSourceReferencesProvider.java
focal_class.identifier: JGitSourceReferencesProvider
focal_class.interfaces: implements SourceReferencesProvider
focal_class.class_method_signature: JGitSourceReferencesProvider.getSourceReferencesHeader(MavenProject project, ScmUrl scmUrl)
focal_class.full_signature: @Override public String getSourceReferencesHeader(MavenProject project, ScmUrl scmUrl)
focal_class.identifier: getSourceReferencesHeader
focal_class.modifiers: @Override public
focal_class.parameters: (MavenProject project, ScmUrl scmUrl)
focal_class.return: String
focal_class.signature: String getSourceReferencesHeader(MavenProject project, ScmUrl scmUrl)
focal_class.class_method_signature: JGitSourceReferencesProvider.resolveHead(Repository repo)
focal_class.full_signature: private ObjectId resolveHead(Repository repo)
focal_class.identifier: resolveHead
focal_class.modifiers: private
focal_class.parameters: (Repository repo)
focal_class.return: ObjectId
focal_class.signature: ObjectId resolveHead(Repository repo)
focal_class.class_method_signature: JGitSourceReferencesProvider.findTagForHead(Git git, ObjectId head)
focal_class.full_signature: private String findTagForHead(Git git, ObjectId head)
focal_class.identifier: findTagForHead
focal_class.modifiers: private
focal_class.parameters: (Git git, ObjectId head)
focal_class.return: String
focal_class.signature: String findTagForHead(Git git, ObjectId head)
focal_class.class_method_signature: JGitSourceReferencesProvider.getRelativePath(File subDir, File parentDir)
focal_class.full_signature:  String getRelativePath(File subDir, File parentDir)
focal_class.identifier: getRelativePath
focal_class.parameters: (File subDir, File parentDir)
focal_class.return: String
focal_class.signature: String getRelativePath(File subDir, File parentDir)
focal_method.body: String getRelativePath(File subDir, File parentDir) throws MojoExecutionException {
          URI subDirUri;
          URI relativeUri;
          try {
              // have to canonicalize before comparing on case-insensitive filesystems
              subDirUri = subDir.getCanonicalFile().toURI();
              relativeUri = parentDir.getCanonicalFile().toURI().relativize(subDirUri);
          } catch (IOException e) {
              throw new MojoExecutionException(e.getMessage(), e);
          }
          if (relativeUri.equals(subDirUri)) {
              throw new MojoExecutionException(subDir + " is not a subdir of " + parentDir);
          }
          String relative = relativeUri.getPath();
          // remove surrounding slashes
          if (relative.startsWith("/")) {
              relative = relative.substring(1);
          }
          if (relative.endsWith("/")) {
              relative = relative.substring(0, relative.length() - 1);
          }
          return relative;
      }
focal_method.class_method_signature: JGitSourceReferencesProvider.getRelativePath(File subDir, File parentDir)
focal_method.full_signature:  String getRelativePath(File subDir, File parentDir)
focal_method.identifier: getRelativePath
focal_method.invocations: toURI getCanonicalFile relativize toURI getCanonicalFile getMessage equals getPath startsWith substring endsWith substring length
focal_method.parameters: (File subDir, File parentDir)
focal_method.return: String
focal_method.signature: String getRelativePath(File subDir, File parentDir)