Buggy code:
public class DefaultSubscriptionRegistry extends AbstractSubscriptionRegistry { public static final int DEFAULT_CACHE_LIMIT = 1024 ; private volatile int cacheLimit = DefaultSubscriptionRegistry . DEFAULT_CACHE_LIMIT ; private PathMatcher pathMatcher = new AntPathMatcher ( ) ; private final DefaultSubscriptionRegistry . DestinationCache destinationCache = new DefaultSubscriptionRegistry . DestinationCache ( ) ; private final DefaultSubscriptionRegistry . SessionSubscriptionRegistry subscriptionRegistry = new DefaultSubscriptionRegistry . SessionSubscriptionRegistry ( ) ; public void setCacheLimit ( int cacheLimit ) { } public int getCacheLimit ( ) { } public void setPathMatcher ( PathMatcher pathMatcher ) { } public PathMatcher getPathMatcher ( ) { } @ Override protected void addSubscriptionInternal ( String sessionId , String subsId , String destination , Message < ? > message ) { } @ Override protected void removeSubscriptionInternal ( String sessionId , String subsId , Message < ? > message ) { } @ Override public void unregisterAllSubscriptions ( String sessionId ) { } @ Override protected MultiValueMap < String , String > findSubscriptionsInternal ( String destination , Message < ? > message ) { } @ Override public String toString ( ) { return ( ( ( "DefaultSubscriptionRegistry[" + ( this . destinationCache ) ) + ",<seq2seq4repair_space>" ) + ( this . subscriptionRegistry ) ) + "]" ; } private class DestinationCache { private final Map < String , MultiValueMap < String , String > > accessCache = new ConcurrentHashMap < String , MultiValueMap < String , String > > ( DefaultSubscriptionRegistry . DEFAULT_CACHE_LIMIT ) ; @ SuppressWarnings ( "serial" ) private final Map < String , MultiValueMap < String , String > > updateCache = new LinkedHashMap < String , MultiValueMap < String , String > > ( DefaultSubscriptionRegistry . DEFAULT_CACHE_LIMIT , 0.75F , true ) { @ Override protected boolean removeEldestEntry ( Map . Entry < String , MultiValueMap < String , String > > eldest ) { } } ; public MultiValueMap < String , String > getSubscriptions ( String destination ) { } public void addSubscriptions ( String destination , MultiValueMap < String , String > subscriptions ) { } public void updateAfterNewSubscription ( String destination , String sessionId , String subsId ) { } public void updateAfterRemovedSubscription ( String sessionId , String subsId ) { } public void updateAfterRemovedSession ( DefaultSubscriptionRegistry . SessionSubscriptionInfo info ) { } @ Override public String toString ( ) { return ( "cache[" + ( this . accessCache . size ( ) ) ) + "<seq2seq4repair_space>destination(s)]" ; } } private static class SessionSubscriptionRegistry { private final ConcurrentMap < String , DefaultSubscriptionRegistry . SessionSubscriptionInfo > sessions = new ConcurrentHashMap < String , DefaultSubscriptionRegistry . SessionSubscriptionInfo > ( ) ; public DefaultSubscriptionRegistry . SessionSubscriptionInfo getSubscriptions ( String sessionId ) { } public Collection < DefaultSubscriptionRegistry . SessionSubscriptionInfo > getAllSubscriptions ( ) { } public DefaultSubscriptionRegistry . SessionSubscriptionInfo addSubscription ( String sessionId , String subscriptionId , String destination ) { } public DefaultSubscriptionRegistry . SessionSubscriptionInfo removeSubscriptions ( String sessionId ) { } @ Override public String toString ( ) { <START_BUG> return ( "registry[" + ( sessions . size ( ) ) ) + "<seq2seq4repair_space>session(s)]" ; <END_BUG> } } private static class SessionSubscriptionInfo { private final String sessionId ; private final Map < String , Set < String > > subscriptions = new ConcurrentHashMap < String , Set < String > > ( 4 ) ; private final Object monitor = new Object ( ) ; public SessionSubscriptionInfo ( String sessionId ) { } public String getSessionId ( ) { } public Set < String > getDestinations ( ) { } public Set < String > getSubscriptions ( String destination ) { } public void addSubscription ( String destination , String subscriptionId ) { } public String removeSubscription ( String subscriptionId ) { } @ Override public String toString ( ) { return ( ( ( "[sessionId=" + ( this . sessionId ) ) + ",<seq2seq4repair_space>subscriptions=" ) + ( this . subscriptions ) ) + "]" ; } } }

Fix:
return ( "registry[" + ( sessions . size ( ) ) ) + "<seq2seq4repair_space>sessions]" ;