Program: 63424
Project: 63424
Buggy source:
public void testOneSessionLoggedOnOneSessionNotLoggedOne() throws Exception {
  SessionID sessionID1=new SessionID(FixVersions.BEGINSTRING_FIX40,"String_Node_Str","String_Node_Str");
  SessionSettings settings=setUpSessionSettings(sessionID1);
  DefaultSessionFactory sessionFactory=new DefaultSessionFactory(new UnitTestApplication(),new MemoryStoreFactory(),new SLF4JLogFactory(new SessionSettings()));
  SessionConnector connector=new SessionConnectorUnderTest(settings,sessionFactory);
  Session session1=connector.createSession(sessionID1);
  assertNotNull(session1);
  SessionConnectorListener connectorListener=new SessionConnectorListener();
  connector.addPropertyChangeListener(connectorListener);
  connector.removePropertyChangeListener(connectorListener);
  Map<SessionID,Session> sessions=new HashMap<>();
  sessions.put(session1.getSessionID(),session1);
  connector.setSessions(sessions);
  assertEquals(0,propertyChangeEvents.size());
  assertEquals(1,connector.getManagedSessions().size());
  assertEquals(session1,connector.getManagedSessions().get(0));
  assertFalse(connector.isLoggedOn());
  Field stateField=session1.getClass().getDeclaredField("String_Node_Str");
  stateField.setAccessible(true);
  SessionState state=(SessionState)stateField.get(session1);
  state.setLogonSent(true);
  state.setLogonReceived(true);
  assertTrue(connector.isLoggedOn());
  SessionID sessionID2=new SessionID(FixVersions.BEGINSTRING_FIX40,"String_Node_Str","String_Node_Str");
  settings.setString(sessionID2,SessionFactory.SETTING_CONNECTION_TYPE,SessionFactory.ACCEPTOR_CONNECTION_TYPE);
  Session session2=connector.createSession(sessionID2);
  assertNotNull(session2);
  sessions.put(session2.getSessionID(),session2);
  assertFalse(connector.isLoggedOn());
}

Fixed version (ground truth):
public void testOneSessionLoggedOnOneSessionNotLoggedOne() throws Exception {
  SessionID sessionID1=new SessionID(FixVersions.BEGINSTRING_FIX40,"String_Node_Str","String_Node_Str");
  SessionSettings settings=setUpSessionSettings(sessionID1);
  DefaultSessionFactory sessionFactory=new DefaultSessionFactory(new UnitTestApplication(),new MemoryStoreFactory(),new SLF4JLogFactory(new SessionSettings()));
  SessionConnector connector=new SessionConnectorUnderTest(settings,sessionFactory);
  Session session1=connector.createSession(sessionID1);
  assertNotNull(session1);
  SessionConnectorListener connectorListener=new SessionConnectorListener();
  connector.addPropertyChangeListener(connectorListener);
  connector.removePropertyChangeListener(connectorListener);
  Map<SessionID,Session> sessions=new HashMap<>();
  sessions.put(session1.getSessionID(),session1);
  connector.setSessions(sessions);
  assertEquals(0,propertyChangeEvents.size());
  assertEquals(1,connector.getManagedSessions().size());
  assertEquals(session1,connector.getManagedSessions().get(0));
  assertFalse(connector.isLoggedOn());
  Field stateField=session1.getClass().getDeclaredField("String_Node_Str");
  stateField.setAccessible(true);
  SessionState state=(SessionState)stateField.get(session1);
  state.setLogonSent(true);
  state.setLogonReceived(true);
  assertTrue(connector.isLoggedOn());
  SessionID sessionID2=new SessionID(FixVersions.BEGINSTRING_FIX40,"String_Node_Str","String_Node_Str");
  settings.setString(sessionID2,SessionFactory.SETTING_CONNECTION_TYPE,SessionFactory.ACCEPTOR_CONNECTION_TYPE);
  Session session2=connector.createSession(sessionID2);
  assertNotNull(session2);
  sessions.put(session2.getSessionID(),session2);
  assertFalse(connector.isLoggedOn());
  assertTrue(connector.anyLoggedOn());
}