test_class.file: oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/sort/EscapeUtilsTest.java
test_class.identifier: EscapeUtilsTest
test_case.body: @Test
      public void testEscape() throws Exception{
          assertEquals("ab\\nc\\r", EscapeUtils.escapeLineBreak("ab\nc\r"));
          assertEquals("a\\\\z", EscapeUtils.escapeLineBreak("a\\z"));
          assertEquals("some text with multi \\nbyte 田中 characters.",
                  EscapeUtils.escapeLineBreak("some text with multi \nbyte 田中 characters."));
      }
test_case.class_method_signature: EscapeUtilsTest.testEscape()
test_case.full_signature: @Test public void testEscape()
test_case.identifier: testEscape
test_case.invocations: assertEquals escapeLineBreak assertEquals escapeLineBreak assertEquals escapeLineBreak
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEscape()
focal_class.file: oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/EscapeUtils.java
focal_class.identifier: EscapeUtils
focal_class.class_method_signature: EscapeUtils.escapeLineBreak(@Nullable String line)
focal_class.full_signature: public static String escapeLineBreak(@Nullable String line)
focal_class.identifier: escapeLineBreak
focal_class.modifiers: public static
focal_class.parameters: (@Nullable String line)
focal_class.return: String
focal_class.signature: String escapeLineBreak(@Nullable String line)
focal_class.class_method_signature: EscapeUtils.unescapeLineBreaks(@Nullable String line)
focal_class.full_signature: public static String unescapeLineBreaks(@Nullable String line)
focal_class.identifier: unescapeLineBreaks
focal_class.modifiers: public static
focal_class.parameters: (@Nullable String line)
focal_class.return: String
focal_class.signature: String unescapeLineBreaks(@Nullable String line)
focal_class.class_method_signature: EscapeUtils.escapingRequired(String line)
focal_class.full_signature: private static boolean escapingRequired(String line)
focal_class.identifier: escapingRequired
focal_class.modifiers: private static
focal_class.parameters: (String line)
focal_class.return: boolean
focal_class.signature: boolean escapingRequired(String line)
focal_class.class_method_signature: EscapeUtils.unescapingRequired(String line)
focal_class.full_signature: private static boolean unescapingRequired(String line)
focal_class.identifier: unescapingRequired
focal_class.modifiers: private static
focal_class.parameters: (String line)
focal_class.return: boolean
focal_class.signature: boolean unescapingRequired(String line)
focal_class.class_method_signature: EscapeUtils.escape(String line)
focal_class.full_signature: private static String escape(String line)
focal_class.identifier: escape
focal_class.modifiers: private static
focal_class.parameters: (String line)
focal_class.return: String
focal_class.signature: String escape(String line)
focal_class.class_method_signature: EscapeUtils.unescape(String line)
focal_class.full_signature: private static String unescape(String line)
focal_class.identifier: unescape
focal_class.modifiers: private static
focal_class.parameters: (String line)
focal_class.return: String
focal_class.signature: String unescape(String line)
focal_method.body: private static String escape(String line) {
          int len = line.length();
          StringBuilder sb = new StringBuilder(len + 1);
          for (int i = 0; i < len; i++) {
              char c = line.charAt(i);
              /*
                Here we need not worry about unicode chars
                because UTF-16 represents supplementary characters using
                code units whose values are not used for BMP characters
                i.e. ASCII chars
               */
              switch (c) {
                  case '\n':
                      sb.append("\\n");
                      break;
                  case '\r':
                      sb.append("\\r");
                      break;
                  case '\\':
                      sb.append("\\\\");
                      break;
                  default:
                      sb.append(c);
              }
          }
          return sb.toString();
      }
focal_method.class_method_signature: EscapeUtils.escape(String line)
focal_method.full_signature: private static String escape(String line)
focal_method.identifier: escape
focal_method.invocations: length charAt append append append append toString
focal_method.modifiers: private static
focal_method.parameters: (String line)
focal_method.return: String
focal_method.signature: String escape(String line)