test_class.file: downloader/src/test/java/com/fooock/robotstxt/downloader/util/DomainUtilsTest.java
test_class.identifier: DomainUtilsTest
test_case.body: @Test
      public void testExtractDomain() throws Exception {
          assertEquals("http://abc.com", DomainUtils.base(new URI("http://abc.com/test/dir/1.html")));
          assertEquals("http://abc.com:8080", DomainUtils.base(new URI("http://abc.com:8080/test/dir/1.html")));
  
          assertEquals("http://test.abc.com", DomainUtils.base(new URI("http://test.abc.com/test/dir/1.html#Download")));
          assertEquals("http://test.abc.com:8080", DomainUtils.base(new URI("http://test.abc.com:8080/test/dir/1.html#1")));
  
          assertEquals("http://sec.test.abc.com", DomainUtils.base(new URI("http://sec.test.abc.com/test/dir/1.html#Download")));
          assertEquals("http://sec.test.abc.com:8080", DomainUtils.base(new URI("http://sec.test.abc.com:8080/test/dir/1.html#1")));
      }
test_case.class_method_signature: DomainUtilsTest.testExtractDomain()
test_case.full_signature: @Test public void testExtractDomain()
test_case.identifier: testExtractDomain
test_case.invocations: assertEquals base assertEquals base assertEquals base assertEquals base assertEquals base assertEquals base
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExtractDomain()
focal_class.file: downloader/src/main/java/com/fooock/robotstxt/downloader/util/DomainUtils.java
focal_class.identifier: DomainUtils
focal_class.class_method_signature: DomainUtils.base(URI uri)
focal_class.full_signature: public static String base(URI uri)
focal_class.identifier: base
focal_class.modifiers: public static
focal_class.parameters: (URI uri)
focal_class.return: String
focal_class.signature: String base(URI uri)
focal_method.body: public static String base(URI uri) {
          return uri.getPort() < 0
                  ? String.format("%s://%s", uri.getScheme(), uri.getHost())
                  : String.format("%s://%s:%s", uri.getScheme(), uri.getHost(), uri.getPort());
      }
focal_method.class_method_signature: DomainUtils.base(URI uri)
focal_method.full_signature: public static String base(URI uri)
focal_method.identifier: base
focal_method.invocations: getPort format getScheme getHost format getScheme getHost getPort
focal_method.modifiers: public static
focal_method.parameters: (URI uri)
focal_method.return: String
focal_method.signature: String base(URI uri)