test_class.file: resources/src/test/java/org/jboss/hal/resources/StringsTest.java
test_class.identifier: StringsTest
test_case.body: @Test
      public void abbreviateMiddle() throws Exception {
          assertNull(Strings.abbreviateMiddle(null, 0));
          assertNull(Strings.abbreviateMiddle(null, 1));
          assertNull(Strings.abbreviateMiddle(null, 100));
  
          assertEquals("", Strings.abbreviateMiddle("", 0));
          assertEquals("", Strings.abbreviateMiddle("", 1));
          assertEquals("", Strings.abbreviateMiddle("", 100));
  
          assertEquals("", Strings.abbreviateMiddle("foo", 0));
          assertEquals("f", Strings.abbreviateMiddle("foo", 1));
          assertEquals("fo", Strings.abbreviateMiddle("foo", 2));
          assertEquals("foo", Strings.abbreviateMiddle("foo", 3));
          assertEquals("foo", Strings.abbreviateMiddle("foo", 4));
          assertEquals("foo", Strings.abbreviateMiddle("foo", 100));
  
          assertEquals("", Strings.abbreviateMiddle("foobar", 0));
          assertEquals("f", Strings.abbreviateMiddle("foobar", 1));
          assertEquals("fo", Strings.abbreviateMiddle("foobar", 2));
          assertEquals("foo", Strings.abbreviateMiddle("foobar", 3));
          assertEquals("f...", Strings.abbreviateMiddle("foobar", 4));
          assertEquals("f...r", Strings.abbreviateMiddle("foobar", 5));
          assertEquals("foobar", Strings.abbreviateMiddle("foobar", 6));
          assertEquals("foobar", Strings.abbreviateMiddle("foobar", 7));
          assertEquals("foobar", Strings.abbreviateMiddle("foobar", 100));
  
          assertEquals("", Strings.abbreviateMiddle("Lorem ipsum dolor sit amet", 0));
          assertEquals("L", Strings.abbreviateMiddle("Lorem ipsum dolor sit amet", 1));
          assertEquals("Lore...met", Strings.abbreviateMiddle("Lorem ipsum dolor sit amet", 10));
          assertEquals("Lorem ipsum dolor sit amet", Strings.abbreviateMiddle("Lorem ipsum dolor sit amet", 26));
          assertEquals("Lorem ipsum dolor sit amet", Strings.abbreviateMiddle("Lorem ipsum dolor sit amet", 100));
      }
test_case.class_method_signature: StringsTest.abbreviateMiddle()
test_case.full_signature: @Test public void abbreviateMiddle()
test_case.identifier: abbreviateMiddle
test_case.invocations: assertNull abbreviateMiddle assertNull abbreviateMiddle assertNull abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle assertEquals abbreviateMiddle
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void abbreviateMiddle()
focal_class.declarator: INDEX_NOT_FOUND = -1
focal_class.modifier: private static final
focal_class.original_string: private static final int INDEX_NOT_FOUND = -1;
focal_class.type: int
focal_class.var_name: INDEX_NOT_FOUND
focal_class.declarator: ELLIPSIS = "..."
focal_class.modifier: private static final
focal_class.original_string: private static final String ELLIPSIS = "...";
focal_class.type: String
focal_class.var_name: ELLIPSIS
focal_class.declarator: EMPTY = ""
focal_class.modifier: private static final
focal_class.original_string: private static final String EMPTY = "";
focal_class.type: String
focal_class.var_name: EMPTY
focal_class.declarator: SCHEME_HOST_SEPARATOR = "://"
focal_class.modifier: private static final
focal_class.original_string: private static final String SCHEME_HOST_SEPARATOR = "://";
focal_class.type: String
focal_class.var_name: SCHEME_HOST_SEPARATOR
focal_class.declarator: FQ_CLASS_NAME = "\\B\\w+(\\.[a-z])"
focal_class.modifier: private static final
focal_class.original_string: private static final String FQ_CLASS_NAME = "\\B\\w+(\\.[a-z])";
focal_class.type: String
focal_class.var_name: FQ_CLASS_NAME
focal_class.file: resources/src/main/java/org/jboss/hal/resources/Strings.java
focal_class.identifier: Strings
focal_class.class_method_signature: Strings.abbreviate(String str, int offset, int maxWidth)
focal_class.full_signature: public static String abbreviate(String str, int offset, int maxWidth)
focal_class.identifier: abbreviate
focal_class.modifiers: public static
focal_class.parameters: (String str, int offset, int maxWidth)
focal_class.return: String
focal_class.signature: String abbreviate(String str, int offset, int maxWidth)
focal_class.class_method_signature: Strings.abbreviateMiddle(String string, int maxLength)
focal_class.full_signature: public static String abbreviateMiddle(String string, int maxLength)
focal_class.identifier: abbreviateMiddle
focal_class.modifiers: public static
focal_class.parameters: (String string, int maxLength)
focal_class.return: String
focal_class.signature: String abbreviateMiddle(String string, int maxLength)
focal_class.class_method_signature: Strings.abbreviateFqClassName(String fqcn)
focal_class.full_signature: public static String abbreviateFqClassName(String fqcn)
focal_class.identifier: abbreviateFqClassName
focal_class.modifiers: public static
focal_class.parameters: (String fqcn)
focal_class.return: String
focal_class.signature: String abbreviateFqClassName(String fqcn)
focal_class.class_method_signature: Strings.capitalize(String str)
focal_class.full_signature: public static String capitalize(String str)
focal_class.identifier: capitalize
focal_class.modifiers: public static
focal_class.parameters: (String str)
focal_class.return: String
focal_class.signature: String capitalize(String str)
focal_class.class_method_signature: Strings.substringAfterLast(String str, String separator)
focal_class.full_signature: public static String substringAfterLast(String str, String separator)
focal_class.identifier: substringAfterLast
focal_class.modifiers: public static
focal_class.parameters: (String str, String separator)
focal_class.return: String
focal_class.signature: String substringAfterLast(String str, String separator)
focal_class.class_method_signature: Strings.strip(String str, String stripChars)
focal_class.full_signature: public static String strip(String str, String stripChars)
focal_class.identifier: strip
focal_class.modifiers: public static
focal_class.parameters: (String str, String stripChars)
focal_class.return: String
focal_class.signature: String strip(String str, String stripChars)
focal_class.class_method_signature: Strings.stripStart(String str, String stripChars)
focal_class.full_signature: public static String stripStart(String str, String stripChars)
focal_class.identifier: stripStart
focal_class.modifiers: public static
focal_class.parameters: (String str, String stripChars)
focal_class.return: String
focal_class.signature: String stripStart(String str, String stripChars)
focal_class.class_method_signature: Strings.stripEnd(String str, String stripChars)
focal_class.full_signature: public static String stripEnd(String str, String stripChars)
focal_class.identifier: stripEnd
focal_class.modifiers: public static
focal_class.parameters: (String str, String stripChars)
focal_class.return: String
focal_class.signature: String stripEnd(String str, String stripChars)
focal_class.class_method_signature: Strings.getParent(String path)
focal_class.full_signature: public static String getParent(String path)
focal_class.identifier: getParent
focal_class.modifiers: public static
focal_class.parameters: (String path)
focal_class.return: String
focal_class.signature: String getParent(String path)
focal_class.class_method_signature: Strings.getDomain(String url)
focal_class.full_signature: public static String getDomain(String url)
focal_class.identifier: getDomain
focal_class.modifiers: public static
focal_class.parameters: (String url)
focal_class.return: String
focal_class.signature: String getDomain(String url)
focal_class.class_method_signature: Strings.sanitize(String str)
focal_class.full_signature: public static String sanitize(String str)
focal_class.identifier: sanitize
focal_class.modifiers: public static
focal_class.parameters: (String str)
focal_class.return: String
focal_class.signature: String sanitize(String str)
focal_class.class_method_signature: Strings.Strings()
focal_class.full_signature: private  Strings()
focal_class.identifier: Strings
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Strings()
focal_method.body: public static String abbreviateMiddle(String string, int maxLength) {
          if (string == null || maxLength >= string.length()) {
              return string;
          }
          if (maxLength == 0) {
              return "";
          }
          if (maxLength <= ELLIPSIS.length()) {
              return string.substring(0, maxLength);
          }
  
          int targetSting = max(1, maxLength - ELLIPSIS.length());
          int startOffset = targetSting / 2 + targetSting % 2;
          int endOffset = string.length() - targetSting / 2;
  
          return string.substring(0, startOffset) + ELLIPSIS + string.substring(endOffset);
      }
focal_method.class_method_signature: Strings.abbreviateMiddle(String string, int maxLength)
focal_method.full_signature: public static String abbreviateMiddle(String string, int maxLength)
focal_method.identifier: abbreviateMiddle
focal_method.invocations: length length substring max length length substring substring
focal_method.modifiers: public static
focal_method.parameters: (String string, int maxLength)
focal_method.return: String
focal_method.signature: String abbreviateMiddle(String string, int maxLength)