Buggy code:
public final class RosterHelper { public static final int SORT_BY_STATUS = 0 ; public static final int SORT_BY_ONLINE = 1 ; public static final int SORT_BY_NAME = 2 ; public static final int ALL_CONTACTS = 0 ; public static final int ONLINE_CONTACTS = 1 ; public static final int ACTIVE_CONTACTS = 2 ; private static final RosterHelper instance = new RosterHelper ( ) ; private final StatusView statusView = new StatusView ( ) ; private Contact currentContact ; private List < FileTransfer > transfers = new ArrayList < FileTransfer > ( ) ; private OnUpdateRoster updateRoster ; private OnAccountsLoaded accountsLoaded ; public boolean useGroups ; private Protocol [ ] protocolList ; private int count = 0 ; public static RosterHelper getInstance ( ) { } private boolean is ( Protocol protocol , Profile profile ) { } private void addProtocols ( Vector accounts ) { } public void setCurrentProtocol ( ) { } public void initAccounts ( ) { } public boolean isAccountsLoaded ; public void loadAccounts ( ) { } private void addProtocol ( Profile account , boolean load ) { } public Protocol getProtocol ( Profile profile ) { } public int getProtocol ( Protocol protocol ) { } public Protocol getProtocol ( String account ) { } public final Protocol getProtocol ( int accountIndex ) { } public final Protocol getProtocol ( Group treeNode ) { } public Protocol getProtocol ( Contact c ) { } public Protocol [ ] getProtocols ( ) { } public Group getGroupWithContacts ( Group g ) { } public void activate ( Contact c ) { } public void activateWithMsg ( final Protocol protocol , final SawimException e ) { } public void showLoginWindow ( ) { } public boolean checkPassword ( Protocol protocol ) { } public void autoConnect ( ) { } public void autoConnect ( int i ) { } public boolean isConnected ( ) { } public boolean isConnecting ( ) { } public final void markMessages ( Contact contact ) { } public void updateConnectionStatus ( ) { } public final Contact getCurrentContact ( ) { } public final void setCurrentContact ( Contact contact ) { } public StatusView getStatusView ( ) { } public void addTransfer ( FileTransfer ft ) { } public void removeTransfer ( int id , boolean cancel ) { } public FileTransfer getFileTransfer ( int id ) { } public void updateRoster ( TreeNode node ) { } public final void updateRoster ( ) { } public void updateProgressBar ( ) { } public void setOnUpdateRoster ( OnUpdateRoster l ) { } public void removeAllProtocols ( ) { } public void removeProtocol ( int i ) { } private void addProtocol ( Protocol prot ) { } public final int getProtocolCount ( ) { } public void updateOptions ( ) { } public static < T extends TreeNode > void sort ( List < T > subnodes , final ConcurrentHashMap < Integer , Group > groups ) { } public void updateGroup ( Protocol protocol , Group group , Contact contact ) { } public void updateGroup ( Protocol protocol , Group group ) { } public void removeFromGroup ( Protocol protocol , Group g , Contact c ) { } public void putIntoQueue ( Group group ) { } public String getStatusMessage ( Protocol protocol , Contact contact ) { } public static final int MENU_CONNECT = 0 ; public static final int MENU_FIND_CONF = 1 ; public static final int MENU_STATUS = 2 ; public static final int MENU_XSTATUS = 3 ; public static final int MENU_DISCO = 16 ; public static final int MENU_NOTES = 17 ; public static final int MENU_GROUPS = 18 ; public static final int MENU_MYSELF = 19 ; public MyMenu getMenu ( final Protocol p ) { } public void showProtocolMenu ( final BaseActivity activity , final Protocol p ) { } public boolean protocolMenuItemSelected ( BaseActivity activity , Protocol p , int idItem ) { switch ( idItem ) { case RosterHelper . MENU_CONNECT : SawimApplication . getInstance ( ) . setStatus ( p , ( ( p . isConnected ( ) ) || ( p . isConnecting ( ) ) ? StatusInfo . STATUS_OFFLINE : StatusInfo . STATUS_ONLINE ) , "" ) ; return true ; case RosterHelper . MENU_FIND_CONF : activity . getSupportFragmentManager ( ) . beginTransaction ( ) . replace ( fragment_container , new SearchConferenceFragment ( ) , TAG ) . addToBackStack ( null ) . commit ( ) ; return true ; case RosterHelper . MENU_STATUS : new StatusesView ( ) . init ( p , ADAPTER_STATUS ) . show ( activity . getSupportFragmentManager ( ) , "change-status" ) ; return true ; case RosterHelper . MENU_XSTATUS : <START_BUG> new ru . sawim . view . XStatusesView ( p ) . show ( activity . getSupportFragmentManager ( ) , "change-xstatus" ) ; <END_BUG> return true ; case RosterHelper . MENU_DISCO : ( ( protocol . xmpp . Xmpp ) ( p ) ) . getServiceDiscovery ( ) . showIt ( activity ) ; return true ; case RosterHelper . MENU_NOTES : ( ( protocol . xmpp . Xmpp ) ( p ) ) . getMirandaNotes ( ) . showIt ( activity ) ; return true ; case RosterHelper . MENU_GROUPS : new ru . sawim . forms . ManageContactListForm ( p ) . showMenu ( activity ) ; return true ; case RosterHelper . MENU_MYSELF : p . showUserInfo ( activity , p . createTempContact ( p . getUserId ( ) , p . getNick ( ) , false ) ) ; return true ; } return false ; } private OnUpdateChat updateChatListener ; public void setOnUpdateChat ( OnUpdateChat l ) { } public OnUpdateChat getUpdateChatListener ( ) { } public void setOnAccountsLoaded ( OnAccountsLoaded accountsLoaded ) { } }

Fix:
new XStatusesView ( ) . init ( p ) . show ( activity . getSupportFragmentManager ( ) , "change-xstatus" ) ;