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 testUnEscape() throws Exception{
          assertEquals("ab\nc\r", EscapeUtils.unescapeLineBreaks("ab\\nc\\r"));
          assertEquals("a\\z", EscapeUtils.unescapeLineBreaks("a\\\\z"));
          assertEquals("some text with multi \nbyte 田中 characters.",
                  EscapeUtils.unescapeLineBreaks("some text with multi \\nbyte 田中 characters."));
      }
test_case.class_method_signature: EscapeUtilsTest.testUnEscape()
test_case.full_signature: @Test public void testUnEscape()
test_case.identifier: testUnEscape
test_case.invocations: assertEquals unescapeLineBreaks assertEquals unescapeLineBreaks assertEquals unescapeLineBreaks
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUnEscape()
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 unescape(String line) {
          int len = line.length();
          StringBuilder sb = new StringBuilder(len - 1);
          for (int i = 0; i < len; i++) {
              char c = line.charAt(i);
              if (c == '\\') {
                  checkState(i < len - 1, "Expected one more char after '\\' at [%s] in [%s]", i, line);
                  char nextChar = line.charAt(i + 1);
                  switch (nextChar) {
                      case 'n':
                          sb.append('\n');
                          i++;
                          break;
                      case 'r':
                          sb.append('\r');
                          i++;
                          break;
                      case '\\':
                          sb.append('\\');
                          i++;
                          break;
                      default:
                          String msg = String.format("Unexpected char [%c] found at %d of [%s]. " +
                                  "Expected '\\' or 'r' or 'n", nextChar, i, line);
                          throw new IllegalArgumentException(msg);
                  }
              } else {
                  sb.append(c);
              }
          }
          return sb.toString();
      }
focal_method.class_method_signature: EscapeUtils.unescape(String line)
focal_method.full_signature: private static String unescape(String line)
focal_method.identifier: unescape
focal_method.invocations: length charAt checkState charAt append append append format append toString
focal_method.modifiers: private static
focal_method.parameters: (String line)
focal_method.return: String
focal_method.signature: String unescape(String line)