test_class.declarator: commandInterpreter = new CommandInterpreter()
test_class.modifier: private
test_class.original_string: private CommandInterpreter commandInterpreter = new CommandInterpreter();
test_class.type: CommandInterpreter
test_class.var_name: commandInterpreter
test_class.file: runtime/src/test/java/com/flipkart/phantom/runtime/impl/server/netty/handler/command/CommandInterpreterTest.java
test_class.identifier: CommandInterpreterTest
test_case.body: @Test
      public void testInterpretCommand() {
  
          CommandInterpreter.ProxyCommand command;
  
          // just command
          command = getCommand("testCommand\n");
          assertTrue("Command parsing failed",command != null && command.getReadFailure() == null);
          assertTrue("Parsed command mismatch: "+command.getCommand(), "testCommand".equals(command.getCommand()));
          assertTrue("Command parameters not empty", command.getCommandParams().isEmpty());
          assertTrue("Command data not empty", command.getCommandData() == null);
  
          // command + params
          command = getCommand("testCommand p1=v1 p2=v2\n");
          assertTrue("Command parsing failed",command != null && command.getReadFailure() == null);
          assertTrue("Parsed command mismatch: "+command.getCommand(), "testCommand".equals(command.getCommand()));
          assertTrue("Command parameters mismatch: "+command.getCommandParams().size(), command.getCommandParams().size() == 2);
          assertTrue("Command data not empty", command.getCommandData() == null);
  
          // command + params + different delim
          command = getCommand("#testCommand#p1=v1#p2=v2\n");
          assertTrue("Command parsing failed",command != null && command.getReadFailure() == null);
          assertTrue("Parsed command mismatch: "+command.getCommand(), "testCommand".equals(command.getCommand()));
          assertTrue("Command parameters mismatch: "+command.getCommandParams().size(), command.getCommandParams().size() == 2);
          assertTrue("Command data not empty", command.getCommandData() == null);
  
          // command + params + data
          command = getCommand("testCommand p1=v1 p2=v2 8\ntestData");
          assertTrue("Command parsing failed",command != null && command.getReadFailure() == null);
          assertTrue("Parsed command mismatch: "+command.getCommand(), "testCommand".equals(command.getCommand()));
          assertTrue("Command parameters mismatch: "+command.getCommandParams().size(), command.getCommandParams().size() == 2);
          assertTrue("Command data mismatch: "+command.getCommandData(), "testData".equals(new String(command.getCommandData())));
  
          // incorrect command - no newline
          command = getCommand("testCommand p1=v1 p2=v2");
          assertTrue("Command parsing passed (which should not)", command != null && command.getReadFailure() != null);
  
          // incorrect command - data size mismatch
          command = getCommand("testCommand p1=v1 p2=v2 10\ntestData");
          assertTrue("Command parsing passed (which should not)", command != null && command.getReadFailure() != null);
  
      }
test_case.class_method_signature: CommandInterpreterTest.testInterpretCommand()
test_case.full_signature: @Test public void testInterpretCommand()
test_case.identifier: testInterpretCommand
test_case.invocations: getCommand assertTrue getReadFailure assertTrue getCommand equals getCommand assertTrue isEmpty getCommandParams assertTrue getCommandData getCommand assertTrue getReadFailure assertTrue getCommand equals getCommand assertTrue size getCommandParams size getCommandParams assertTrue getCommandData getCommand assertTrue getReadFailure assertTrue getCommand equals getCommand assertTrue size getCommandParams size getCommandParams assertTrue getCommandData getCommand assertTrue getReadFailure assertTrue getCommand equals getCommand assertTrue size getCommandParams size getCommandParams assertTrue getCommandData equals getCommandData getCommand assertTrue getReadFailure getCommand assertTrue getReadFailure
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInterpretCommand()
focal_class.declarator: MAX_COMMAND_INPUT = 20480
focal_class.modifier: public static final
focal_class.original_string: public static final int MAX_COMMAND_INPUT = 20480;
focal_class.type: int
focal_class.var_name: MAX_COMMAND_INPUT
focal_class.declarator: LINE_FEED = '\n'
focal_class.modifier: public static final
focal_class.original_string: public static final char LINE_FEED = '\n';
focal_class.type: char
focal_class.var_name: LINE_FEED
focal_class.declarator: CARRIAGE_RETURN = '\r'
focal_class.modifier: private static final
focal_class.original_string: private static final char CARRIAGE_RETURN = '\r';
focal_class.type: char
focal_class.var_name: CARRIAGE_RETURN
focal_class.declarator: DEFAULT_DELIM = ' '
focal_class.modifier: private static final
focal_class.original_string: private static final char DEFAULT_DELIM = ' ';
focal_class.type: char
focal_class.var_name: DEFAULT_DELIM
focal_class.declarator: PARAM_VALUE_SEP = '='
focal_class.modifier: private static final
focal_class.original_string: private static final char PARAM_VALUE_SEP = '=';
focal_class.type: char
focal_class.var_name: PARAM_VALUE_SEP
focal_class.declarator: ASCII_LOW = {'a','z'}
focal_class.modifier: private static final
focal_class.original_string: private static final char[] ASCII_LOW = {'a','z'};
focal_class.type: char[]
focal_class.var_name: ASCII_LOW
focal_class.declarator: ASCII_HIGH = {'A','Z'}
focal_class.modifier: private static final
focal_class.original_string: private static final char[] ASCII_HIGH = {'A','Z'};
focal_class.type: char[]
focal_class.var_name: ASCII_HIGH
focal_class.declarator: SUCCESS = "SUCCESS"
focal_class.modifier: private static final
focal_class.original_string: private static final String SUCCESS = "SUCCESS";
focal_class.type: String
focal_class.var_name: SUCCESS
focal_class.declarator: ERROR = "ERROR"
focal_class.modifier: private static final
focal_class.original_string: private static final String ERROR = "ERROR";
focal_class.type: String
focal_class.var_name: ERROR
focal_class.declarator: NULL_STRING = ""
focal_class.modifier: private static final
focal_class.original_string: private static final String NULL_STRING = "";
focal_class.type: String
focal_class.var_name: NULL_STRING
focal_class.declarator: DEFAULT_PARAM_VALUE = "true"
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFAULT_PARAM_VALUE = "true";
focal_class.type: String
focal_class.var_name: DEFAULT_PARAM_VALUE
focal_class.declarator: OBJECT_MAPPER = new ObjectMapper()
focal_class.modifier: private static final
focal_class.original_string: private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
focal_class.type: ObjectMapper
focal_class.var_name: OBJECT_MAPPER
focal_class.file: runtime/src/main/java/com/flipkart/phantom/runtime/impl/server/netty/handler/command/CommandInterpreter.java
focal_class.identifier: CommandInterpreter
focal_class.class_method_signature: CommandInterpreter.readCommand(InputStream inputStream)
focal_class.full_signature: public ProxyCommand readCommand(InputStream inputStream)
focal_class.identifier: readCommand
focal_class.modifiers: public
focal_class.parameters: (InputStream inputStream)
focal_class.return: ProxyCommand
focal_class.signature: ProxyCommand readCommand(InputStream inputStream)
focal_class.class_method_signature: CommandInterpreter.readCommand(MessageEvent event)
focal_class.full_signature: public ProxyCommand readCommand(MessageEvent event)
focal_class.identifier: readCommand
focal_class.modifiers: public
focal_class.parameters: (MessageEvent event)
focal_class.return: ProxyCommand
focal_class.signature: ProxyCommand readCommand(MessageEvent event)
focal_class.class_method_signature: CommandInterpreter.interpretCommand(ChannelBuffer buffer)
focal_class.full_signature: public ProxyCommand interpretCommand(ChannelBuffer buffer)
focal_class.identifier: interpretCommand
focal_class.modifiers: public
focal_class.parameters: (ChannelBuffer buffer)
focal_class.return: ProxyCommand
focal_class.signature: ProxyCommand interpretCommand(ChannelBuffer buffer)
focal_class.class_method_signature: CommandInterpreter.writeCommandExecutionResponse(ChannelHandlerContext ctx, ChannelEvent event, TaskResult result)
focal_class.full_signature: public void writeCommandExecutionResponse(ChannelHandlerContext ctx, ChannelEvent event, TaskResult result)
focal_class.identifier: writeCommandExecutionResponse
focal_class.modifiers: public
focal_class.parameters: (ChannelHandlerContext ctx, ChannelEvent event, TaskResult result)
focal_class.return: void
focal_class.signature: void writeCommandExecutionResponse(ChannelHandlerContext ctx, ChannelEvent event, TaskResult result)
focal_class.class_method_signature: CommandInterpreter.writeCommandExecutionResponse(OutputStream outputStream, TaskResult result)
focal_class.full_signature: public void writeCommandExecutionResponse(OutputStream outputStream, TaskResult result)
focal_class.identifier: writeCommandExecutionResponse
focal_class.modifiers: public
focal_class.parameters: (OutputStream outputStream, TaskResult result)
focal_class.return: void
focal_class.signature: void writeCommandExecutionResponse(OutputStream outputStream, TaskResult result)
focal_class.class_method_signature: CommandInterpreter.interpretCommand(InputStream inputStream, boolean isFramedTransport)
focal_class.full_signature: private ProxyCommand interpretCommand(InputStream inputStream, boolean isFramedTransport)
focal_class.identifier: interpretCommand
focal_class.modifiers: private
focal_class.parameters: (InputStream inputStream, boolean isFramedTransport)
focal_class.return: ProxyCommand
focal_class.signature: ProxyCommand interpretCommand(InputStream inputStream, boolean isFramedTransport)
focal_class.class_method_signature: CommandInterpreter.getNextCommandFragmentPosition(byte[] arr, int fragmentStart, int lastPos, byte delim)
focal_class.full_signature: private int getNextCommandFragmentPosition(byte[] arr, int fragmentStart, int lastPos, byte delim)
focal_class.identifier: getNextCommandFragmentPosition
focal_class.modifiers: private
focal_class.parameters: (byte[] arr, int fragmentStart, int lastPos, byte delim)
focal_class.return: int
focal_class.signature: int getNextCommandFragmentPosition(byte[] arr, int fragmentStart, int lastPos, byte delim)
focal_method.body: public ProxyCommand interpretCommand(ChannelBuffer buffer) throws Exception {
  		return this.interpretCommand(new ChannelBufferInputStream(buffer), false);
  	}
focal_method.class_method_signature: CommandInterpreter.interpretCommand(ChannelBuffer buffer)
focal_method.full_signature: public ProxyCommand interpretCommand(ChannelBuffer buffer)
focal_method.identifier: interpretCommand
focal_method.invocations: interpretCommand
focal_method.modifiers: public
focal_method.parameters: (ChannelBuffer buffer)
focal_method.return: ProxyCommand
focal_method.signature: ProxyCommand interpretCommand(ChannelBuffer buffer)