test_class.declarator: serializer
test_class.modifier: private
test_class.original_string: private JdkSerializerDeserializer serializer;
test_class.type: JdkSerializerDeserializer
test_class.var_name: serializer
test_class.declarator: sessionManager
test_class.modifier: private
test_class.original_string: private SessionManager sessionManager;
test_class.type: SessionManager
test_class.var_name: sessionManager
test_class.declarator: serializedString
test_class.modifier: private
test_class.original_string: private byte[] serializedString;
test_class.type: byte[]
test_class.var_name: serializedString
test_class.declarator: now
test_class.modifier: private
test_class.original_string: private Date now;
test_class.type: Date
test_class.var_name: now
test_class.declarator: serializedDate
test_class.modifier: private
test_class.original_string: private byte[] serializedDate;
test_class.type: byte[]
test_class.var_name: serializedDate
test_class.file: session-replacement/src/test/java/com/amadeus/session/TestJdkSerializerDeserializer.java
test_class.identifier: TestJdkSerializerDeserializer
test_case.body: @Test
    public void testDeserialize() {
      assertEquals(null, serializer.deserialize(null));
      assertEquals("String", serializer.deserialize(serializedString));
    }
test_case.class_method_signature: TestJdkSerializerDeserializer.testDeserialize()
test_case.full_signature: @Test public void testDeserialize()
test_case.identifier: testDeserialize
test_case.invocations: assertEquals deserialize assertEquals deserialize
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDeserialize()
focal_class.declarator: sessionManager
focal_class.modifier: private
focal_class.original_string: private SessionManager sessionManager;
focal_class.type: SessionManager
focal_class.var_name: sessionManager
focal_class.declarator: serializedData
focal_class.modifier: private
focal_class.original_string: private Counter serializedData;
focal_class.type: Counter
focal_class.var_name: serializedData
focal_class.declarator: deserializedData
focal_class.modifier: private
focal_class.original_string: private Counter deserializedData;
focal_class.type: Counter
focal_class.var_name: deserializedData
focal_class.declarator: serializedHistogram
focal_class.modifier: private
focal_class.original_string: private Histogram serializedHistogram;
focal_class.type: Histogram
focal_class.var_name: serializedHistogram
focal_class.declarator: deserializedHistogram
focal_class.modifier: private
focal_class.original_string: private Histogram deserializedHistogram;
focal_class.type: Histogram
focal_class.var_name: deserializedHistogram
focal_class.file: session-replacement/src/main/java/com/amadeus/session/JdkSerializerDeserializer.java
focal_class.identifier: JdkSerializerDeserializer
focal_class.interfaces: implements SerializerDeserializer
focal_class.class_method_signature: JdkSerializerDeserializer.serialize(Object value)
focal_class.full_signature: @Override public byte[] serialize(Object value)
focal_class.identifier: serialize
focal_class.modifiers: @Override public
focal_class.parameters: (Object value)
focal_class.return: byte[]
focal_class.signature: byte[] serialize(Object value)
focal_class.class_method_signature: JdkSerializerDeserializer.deserialize(byte[] data)
focal_class.full_signature: @Override public Object deserialize(byte[] data)
focal_class.identifier: deserialize
focal_class.modifiers: @Override public
focal_class.parameters: (byte[] data)
focal_class.return: Object
focal_class.signature: Object deserialize(byte[] data)
focal_class.class_method_signature: JdkSerializerDeserializer.setSessionManager(SessionManager sessionManager)
focal_class.full_signature: @Override public void setSessionManager(SessionManager sessionManager)
focal_class.identifier: setSessionManager
focal_class.modifiers: @Override public
focal_class.parameters: (SessionManager sessionManager)
focal_class.return: void
focal_class.signature: void setSessionManager(SessionManager sessionManager)
focal_method.body: @Override
    public Object deserialize(byte[] data) {
      if (data == null) {
        return null;
      }
      // For deserializing objects we use specific class loader of
      // the session manager to insure it was the same one used
      // when creating serialized objects.
      ClassLoader classLoader = sessionManager.getSessionClassLoader();
      if (classLoader == null) {
        classLoader = Thread.currentThread().getContextClassLoader();
      }
      try (ByteArrayInputStream in = new ByteArrayInputStream(data);
          ObjectInputStream is = new ClassLoaderObjectInputStream(classLoader, in)) {
        Object obj = is.readObject();
        // Incrementing metrics
        deserializedData.inc(data.length);
        deserializedHistogram.update(data.length);
        return obj;
      } catch (IOException | ClassNotFoundException e) {
        throw new IllegalStateException("Unable to deserialize object. See stacktrace for more information.", e);
      }
    }
focal_method.class_method_signature: JdkSerializerDeserializer.deserialize(byte[] data)
focal_method.full_signature: @Override public Object deserialize(byte[] data)
focal_method.identifier: deserialize
focal_method.invocations: getSessionClassLoader getContextClassLoader currentThread readObject inc update
focal_method.modifiers: @Override public
focal_method.parameters: (byte[] data)
focal_method.return: Object
focal_method.signature: Object deserialize(byte[] data)