test_class.file: com.gzoltar.core/src/test/java/com/gzoltar/core/util/TestCommandLineSupport.java
test_class.identifier: TestCommandLineSupport
test_case.body: @Test
    public void testSplit6() {
      assertEquals(Arrays.asList("a\"c"), CommandLineSupport.split("a\\\"c"));
    }
test_case.class_method_signature: TestCommandLineSupport.testSplit6()
test_case.full_signature: @Test public void testSplit6()
test_case.identifier: testSplit6
test_case.invocations: assertEquals asList split
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSplit6()
focal_class.declarator: BLANK = ' '
focal_class.modifier: private static final
focal_class.original_string: private static final char BLANK = ' ';
focal_class.type: char
focal_class.var_name: BLANK
focal_class.declarator: QUOTE = '"'
focal_class.modifier: private static final
focal_class.original_string: private static final char QUOTE = '"';
focal_class.type: char
focal_class.var_name: QUOTE
focal_class.declarator: SLASH = '\\'
focal_class.modifier: private static final
focal_class.original_string: private static final char SLASH = '\\';
focal_class.type: char
focal_class.var_name: SLASH
focal_class.declarator: M_STRIPWHITESPACE = 0
focal_class.modifier: private static final
focal_class.original_string: private static final int M_STRIPWHITESPACE = 0;
focal_class.type: int
focal_class.var_name: M_STRIPWHITESPACE
focal_class.declarator: M_PARSEARGUMENT = 1
focal_class.modifier: private static final
focal_class.original_string: private static final int M_PARSEARGUMENT = 1;
focal_class.type: int
focal_class.var_name: M_PARSEARGUMENT
focal_class.declarator: M_ESCAPED = 2
focal_class.modifier: private static final
focal_class.original_string: private static final int M_ESCAPED = 2;
focal_class.type: int
focal_class.var_name: M_ESCAPED
focal_class.file: com.gzoltar.core/src/main/java/com/gzoltar/core/util/CommandLineSupport.java
focal_class.identifier: CommandLineSupport
focal_class.class_method_signature: CommandLineSupport.quote(final String arg)
focal_class.full_signature: public static String quote(final String arg)
focal_class.identifier: quote
focal_class.modifiers: public static
focal_class.parameters: (final String arg)
focal_class.return: String
focal_class.signature: String quote(final String arg)
focal_class.class_method_signature: CommandLineSupport.quote(final List<String> args)
focal_class.full_signature: public static String quote(final List<String> args)
focal_class.identifier: quote
focal_class.modifiers: public static
focal_class.parameters: (final List<String> args)
focal_class.return: String
focal_class.signature: String quote(final List<String> args)
focal_class.class_method_signature: CommandLineSupport.split(final String commandline)
focal_class.full_signature: public static List<String> split(final String commandline)
focal_class.identifier: split
focal_class.modifiers: public static
focal_class.parameters: (final String commandline)
focal_class.return: List<String>
focal_class.signature: List<String> split(final String commandline)
focal_class.class_method_signature: CommandLineSupport.addArgument(final List<String> args, final StringBuilder current)
focal_class.full_signature: private static void addArgument(final List<String> args, final StringBuilder current)
focal_class.identifier: addArgument
focal_class.modifiers: private static
focal_class.parameters: (final List<String> args, final StringBuilder current)
focal_class.return: void
focal_class.signature: void addArgument(final List<String> args, final StringBuilder current)
focal_method.body: public static List<String> split(final String commandline) {
      if (commandline == null || commandline.length() == 0) {
        return new ArrayList<String>();
      }
      final List<String> args = new ArrayList<String>();
      final StringBuilder current = new StringBuilder();
      int mode = M_STRIPWHITESPACE;
      int endChar = BLANK;
      for (final char c : commandline.toCharArray()) {
        switch (mode) {
          case M_STRIPWHITESPACE:
            if (!Character.isWhitespace(c)) {
              if (c == QUOTE) {
                endChar = QUOTE;
              } else {
                current.append(c);
                endChar = BLANK;
              }
              mode = M_PARSEARGUMENT;
            }
            break;
          case M_PARSEARGUMENT:
            if (c == endChar) {
              addArgument(args, current);
              mode = M_STRIPWHITESPACE;
            } else if (c == SLASH) {
              current.append(SLASH);
              mode = M_ESCAPED;
            } else {
              current.append(c);
            }
            break;
          case M_ESCAPED:
            if (c == QUOTE || c == SLASH) {
              current.setCharAt(current.length() - 1, c);
            } else if (c == endChar) {
              addArgument(args, current);
              mode = M_STRIPWHITESPACE;
            } else {
              current.append(c);
            }
            mode = M_PARSEARGUMENT;
            break;
          default:
            continue;
        }
      }
      addArgument(args, current);
      return args;
    }
focal_method.class_method_signature: CommandLineSupport.split(final String commandline)
focal_method.full_signature: public static List<String> split(final String commandline)
focal_method.identifier: split
focal_method.invocations: length toCharArray isWhitespace append addArgument append append setCharAt length addArgument append addArgument
focal_method.modifiers: public static
focal_method.parameters: (final String commandline)
focal_method.return: List<String>
focal_method.signature: List<String> split(final String commandline)