test_class.declarator: controlConnection
test_class.modifier: private
test_class.original_string: private QoSControlConnection controlConnection;
test_class.type: QoSControlConnection
test_class.var_name: controlConnection
test_class.declarator: clientHolder
test_class.modifier: private
test_class.original_string: private RMBTClient clientHolder;
test_class.type: RMBTClient
test_class.var_name: clientHolder
test_class.declarator: testParameter
test_class.modifier: private
test_class.original_string: private RMBTTestParameter testParameter;
test_class.type: RMBTTestParameter
test_class.var_name: testParameter
test_class.declarator: sslTestParameter
test_class.modifier: private
test_class.original_string: private RMBTTestParameter sslTestParameter;
test_class.type: RMBTTestParameter
test_class.var_name: sslTestParameter
test_class.declarator: loopbackAddress
test_class.modifier: private
test_class.original_string: private InetAddress loopbackAddress;
test_class.type: InetAddress
test_class.var_name: loopbackAddress
test_class.declarator: testOutputStream
test_class.modifier: private
test_class.original_string: private OutputStream testOutputStream;
test_class.type: OutputStream
test_class.var_name: testOutputStream
test_class.declarator: tcpCallbackCount
test_class.modifier: private
test_class.original_string: private int tcpCallbackCount;
test_class.type: int
test_class.var_name: tcpCallbackCount
test_class.declarator: tcpCallbackRequest
test_class.modifier: private
test_class.original_string: private String tcpCallbackRequest, tcpCallbackResponse;
test_class.type: String
test_class.var_name: tcpCallbackRequest
test_class.declarator: dnsCallbackRequest
test_class.modifier: private
test_class.original_string: private String dnsCallbackRequest, dnsCallbackResponse;
test_class.type: String
test_class.var_name: dnsCallbackRequest
test_class.file: RMBTClient/src/test/java/at/rtr/rmbt/client/v2/task/QoSControlConnectionTest.java
test_class.identifier: QoSControlConnectionTest
test_case.body: @Test
      public void basicConnectionProtocolErrorTest (@Mocked final Socket socket, @Mocked final InetAddress inetAddress,
                                       @Mocked final BufferedReader bufferedReader) throws Exception {
  
          new Expectations() {{
  
              InetAddress.getByName(anyString);
              result = loopbackAddress;
  
              bufferedReader.readLine();
              result = "NOT A PROTOCOL";
  
              socket.getOutputStream();
              times = 1;
              result = testOutputStream;
  
          }};
  
  
          controlConnection = new QoSControlConnection(clientHolder, sslTestParameter);
          controlConnection.connect();
          assertNull("Control socket is not null despite protocol error", controlConnection.controlSocket);
          assertFalse("QoSControlConnection reports as running", controlConnection.isRunning.get());
          assertTrue("QoSControlConnection does not show connection issue", controlConnection.couldNotConnect.get());
  
      }
test_case.class_method_signature: QoSControlConnectionTest.basicConnectionProtocolErrorTest(@Mocked final Socket socket, @Mocked final InetAddress inetAddress,
                                       @Mocked final BufferedReader bufferedReader)
test_case.full_signature: @Test public void basicConnectionProtocolErrorTest(@Mocked final Socket socket, @Mocked final InetAddress inetAddress,
                                       @Mocked final BufferedReader bufferedReader)
test_case.identifier: basicConnectionProtocolErrorTest
test_case.invocations: getByName readLine getOutputStream connect assertNull assertFalse get assertTrue get
test_case.modifiers: @Test public
test_case.parameters: (@Mocked final Socket socket, @Mocked final InetAddress inetAddress,
                                       @Mocked final BufferedReader bufferedReader)
test_case.return: void
test_case.signature: void basicConnectionProtocolErrorTest(@Mocked final Socket socket, @Mocked final InetAddress inetAddress,
                                       @Mocked final BufferedReader bufferedReader)
focal_class.declarator: ID_REGEX_PATTERN = Pattern.compile("\\+ID([\\d]*)")
focal_class.modifier: public final static
focal_class.original_string: public final static Pattern ID_REGEX_PATTERN = Pattern.compile("\\+ID([\\d]*)");
focal_class.type: Pattern
focal_class.var_name: ID_REGEX_PATTERN
focal_class.declarator: isRunning = new AtomicBoolean(true)
focal_class.modifier: public final
focal_class.original_string: public final AtomicBoolean isRunning = new AtomicBoolean(true);
focal_class.type: AtomicBoolean
focal_class.var_name: isRunning
focal_class.declarator: couldNotConnect = new AtomicBoolean(false)
focal_class.modifier: public final
focal_class.original_string: public final AtomicBoolean couldNotConnect = new AtomicBoolean(false);
focal_class.type: AtomicBoolean
focal_class.var_name: couldNotConnect
focal_class.declarator: requestMap = 
  			new ConcurrentHashMap<Integer, ControlConnectionResponseCallbackHolder>()
focal_class.modifier: private final
focal_class.original_string: private final ConcurrentHashMap<Integer, ControlConnectionResponseCallbackHolder> requestMap = 
  			new ConcurrentHashMap<Integer, ControlConnectionResponseCallbackHolder>();
focal_class.type: ConcurrentHashMap<Integer, ControlConnectionResponseCallbackHolder>
focal_class.var_name: requestMap
focal_class.declarator: concurrencyGroupSet = new TreeSet<Integer>()
focal_class.modifier: private final
focal_class.original_string: private final TreeSet<Integer> concurrencyGroupSet = new TreeSet<Integer>();
focal_class.type: TreeSet<Integer>
focal_class.var_name: concurrencyGroupSet
focal_class.declarator: controlSocket
focal_class.modifier: protected
focal_class.original_string: protected Socket controlSocket;
focal_class.type: Socket
focal_class.var_name: controlSocket
focal_class.file: RMBTClient/src/main/java/at/rtr/rmbt/client/v2/task/QoSControlConnection.java
focal_class.identifier: QoSControlConnection
focal_class.interfaces: implements Runnable
focal_class.class_method_signature: QoSControlConnection.QoSControlConnection(RMBTClient client, RMBTTestParameter params)
focal_class.full_signature: public  QoSControlConnection(RMBTClient client, RMBTTestParameter params)
focal_class.identifier: QoSControlConnection
focal_class.modifiers: public
focal_class.parameters: (RMBTClient client, RMBTTestParameter params)
focal_class.signature:  QoSControlConnection(RMBTClient client, RMBTTestParameter params)
focal_class.class_method_signature: QoSControlConnection.sendTaskCommand(AbstractQoSTask qosTask, String command, ControlConnectionResponseCallback callback)
focal_class.full_signature: public void sendTaskCommand(AbstractQoSTask qosTask, String command, ControlConnectionResponseCallback callback)
focal_class.identifier: sendTaskCommand
focal_class.modifiers: public
focal_class.parameters: (AbstractQoSTask qosTask, String command, ControlConnectionResponseCallback callback)
focal_class.return: void
focal_class.signature: void sendTaskCommand(AbstractQoSTask qosTask, String command, ControlConnectionResponseCallback callback)
focal_class.class_method_signature: QoSControlConnection.run()
focal_class.full_signature: @Override public void run()
focal_class.identifier: run
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void run()
focal_class.class_method_signature: QoSControlConnection.connect()
focal_class.full_signature: public void connect()
focal_class.identifier: connect
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void connect()
focal_class.class_method_signature: QoSControlConnection.close()
focal_class.full_signature: public void close()
focal_class.identifier: close
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: QoSControlConnection.getConcurrencyGroupSet()
focal_class.full_signature: public TreeSet<Integer> getConcurrencyGroupSet()
focal_class.identifier: getConcurrencyGroupSet
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: TreeSet<Integer>
focal_class.signature: TreeSet<Integer> getConcurrencyGroupSet()
focal_class.superclass: extends AbstractRMBTTest
focal_method.body: public void connect() throws Exception {
  		isRunning.set(true);
  		try {
  			controlSocket = connect(null, InetAddress.getByName(params.getHost()), params.getPort(), 
  				AbstractQoSTask.QOS_SERVER_PROTOCOL_VERSION, "ACCEPT", params.isEncryption(), AbstractQoSTask.CONTROL_CONNECTION_TIMEOUT);
  		    if (controlSocket == null) {
  		        isRunning.set(false);
  		        couldNotConnect.set(true);
              }
  		}
  		catch (Exception e) {
  			isRunning.set(false);
  			couldNotConnect.set(true);
  			throw e;
  		}
  	}
focal_method.class_method_signature: QoSControlConnection.connect()
focal_method.full_signature: public void connect()
focal_method.identifier: connect
focal_method.invocations: set connect getByName getHost getPort isEncryption set set set set
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void connect()