Buggy code:
class PublishedGraphTracker extends PlatformObject implements ISharedObject { private static final String [ ] NO_PATHS = new String [ ] { } ; private static final int JOIN = 0 ; private static final int LEAVE = 1 ; private static final int ADD = 2 ; private static final int REMOVE = 3 ; private class Table { private final Hashtable paths = new Hashtable ( ) ; private final Hashtable containers = new Hashtable ( ) ; public synchronized void add ( ID containerID , String [ ] path ) { } public synchronized void remove ( ID containerID , String path ) { } public synchronized void remove ( ID containerID ) { } public synchronized boolean contains ( String path ) { } public synchronized String [ ] getPaths ( ID containerID ) { } } private final PublishedGraphTracker . Table table = new PublishedGraphTracker . Table ( ) ; private ISharedObjectConfig config ; public synchronized void add ( String path ) throws ECFException { } public synchronized void remove ( String path ) throws ECFException { } public synchronized boolean isPublished ( String path ) { } public synchronized void init ( ISharedObjectConfig initData ) throws SharedObjectInitException { } public void handleEvent ( Event event ) { if ( event instanceof ISharedObjectMessageEvent ) { ISharedObjectMessageEvent e = ( ( ISharedObjectMessageEvent ) ( event ) ) ; Object [ ] data = ( ( Object [ ] ) ( e . getData ( ) ) ) ; Integer type = ( ( Integer ) ( data [ 0 ] ) ) ; switch ( type . intValue ( ) ) { case PublishedGraphTracker . JOIN : <START_BUG> handleJoin ( e . getRemoteContainerID ( ) , ( ( data . length ) > 2 ? ( ( String [ ] ) ( data [ 1 ] ) ) : null ) ) ; <END_BUG> break ; case PublishedGraphTracker . LEAVE : handleLeave ( e . getRemoteContainerID ( ) ) ; break ; case PublishedGraphTracker . ADD : handleAdd ( e . getRemoteContainerID ( ) , ( ( String [ ] ) ( data [ 1 ] ) ) ) ; break ; case PublishedGraphTracker . REMOVE : handleRemove ( e . getRemoteContainerID ( ) , ( ( String ) ( data [ 1 ] ) ) ) ; } } else if ( event instanceof ISharedObjectContainerJoinedEvent ) { if ( ( ( ISharedObjectContainerJoinedEvent ) ( event ) ) . getJoinedContainerID ( ) . equals ( config . getContext ( ) . getLocalContainerID ( ) ) ) handleJoined ( ) ; } else if ( event instanceof ISharedObjectContainerDepartedEvent ) { ISharedObjectContainerDepartedEvent e = ( ( ISharedObjectContainerDepartedEvent ) ( event ) ) ; if ( ! ( e . getDepartedContainerID ( ) . equals ( config . getContext ( ) . getLocalContainerID ( ) ) ) ) handleLeave ( e . getDepartedContainerID ( ) ) ; } else if ( event instanceof ISharedObjectActivatedEvent ) { if ( ( ( ISharedObjectActivatedEvent ) ( event ) ) . getActivatedID ( ) . equals ( config . getSharedObjectID ( ) ) ) handleJoined ( ) ; } else if ( event instanceof ISharedObjectDeactivatedEvent ) { if ( ( ( ISharedObjectDeactivatedEvent ) ( event ) ) . getDeactivatedID ( ) . equals ( config . getSharedObjectID ( ) ) ) handleDeactivated ( ) ; } } private void handleJoin ( ID containerID , String [ ] paths ) { } private void handleLeave ( ID containerID ) { } private void handleAdd ( ID containerID , String [ ] paths ) { } private void handleRemove ( ID containerID , String path ) { } private void handleJoined ( ) { } private void handleDeactivated ( ) { } public void handleEvents ( Event [ ] events ) { } public synchronized void dispose ( ID containerID ) { } }

Fix:
handleJoin ( e . getRemoteContainerID ( ) , ( ( data . length ) > 1 ? ( ( String [ ] ) ( data [ 1 ] ) ) : null ) ) ;