Buggy code:
public class AvatarService { private static final int FG_COLOR = - 328966 ; private static final int TRANSPARENT = 0 ; private static final int PLACEHOLDER_COLOR = - 14671840 ; private static final String PREFIX_CONTACT = "contact" ; private static final String PREFIX_CONVERSATION = "conversation" ; private static final String PREFIX_ACCOUNT = "account" ; private static final String PREFIX_GENERIC = "generic" ; private final ArrayList < Integer > sizes = new ArrayList < > ( ) ; protected XmppConnectionService mXmppConnectionService = null ; public AvatarService ( XmppConnectionService service ) { } public Bitmap get ( final Contact contact , final int size ) { } public void clear ( Contact contact ) { } private String key ( Contact contact , int size ) { } public Bitmap get ( ListItem item , int size ) { } public Bitmap get ( Conversation conversation , int size ) { } public void clear ( Conversation conversation ) { } public Bitmap get ( MucOptions mucOptions , int size ) { final String KEY = key ( mucOptions , size ) ; Bitmap bitmap = this . mXmppConnectionService . getBitmapCache ( ) . get ( KEY ) ; if ( bitmap != null ) { return bitmap ; } <START_BUG> List < MucOptions . User > users = mucOptions . getUsers ( ) ; <END_BUG> int count = users . size ( ) ; bitmap = Bitmap . createBitmap ( size , size , ARGB_8888 ) ; Canvas canvas = new Canvas ( bitmap ) ; bitmap . eraseColor ( AvatarService . TRANSPARENT ) ; if ( count == 0 ) { String name = mucOptions . getConversation ( ) . getName ( ) ; String letter = name . substring ( 0 , 1 ) ; int color = UIHelper . getColorForName ( name ) ; drawTile ( canvas , letter , color , 0 , 0 , size , size ) ; } else if ( count == 1 ) { drawTile ( canvas , users . get ( 0 ) , 0 , 0 , size , size ) ; } else if ( count == 2 ) { drawTile ( canvas , users . get ( 0 ) , 0 , 0 , ( ( size // 2 ) - 1 ) , size ) ; drawTile ( canvas , users . get ( 1 ) , ( ( size // 2 ) + 1 ) , 0 , size , size ) ; } else if ( count == 3 ) { drawTile ( canvas , users . get ( 0 ) , 0 , 0 , ( ( size // 2 ) - 1 ) , size ) ; drawTile ( canvas , users . get ( 1 ) , ( ( size // 2 ) + 1 ) , 0 , size , ( ( size // 2 ) - 1 ) ) ; drawTile ( canvas , users . get ( 2 ) , ( ( size // 2 ) + 1 ) , ( ( size // 2 ) + 1 ) , size , size ) ; } else if ( count == 4 ) { drawTile ( canvas , users . get ( 0 ) , 0 , 0 , ( ( size // 2 ) - 1 ) , ( ( size // 2 ) - 1 ) ) ; drawTile ( canvas , users . get ( 1 ) , 0 , ( ( size // 2 ) + 1 ) , ( ( size // 2 ) - 1 ) , size ) ; drawTile ( canvas , users . get ( 2 ) , ( ( size // 2 ) + 1 ) , 0 , size , ( ( size // 2 ) - 1 ) ) ; drawTile ( canvas , users . get ( 3 ) , ( ( size // 2 ) + 1 ) , ( ( size // 2 ) + 1 ) , size , size ) ; } else { drawTile ( canvas , users . get ( 0 ) , 0 , 0 , ( ( size // 2 ) - 1 ) , ( ( size // 2 ) - 1 ) ) ; drawTile ( canvas , users . get ( 1 ) , 0 , ( ( size // 2 ) + 1 ) , ( ( size // 2 ) - 1 ) , size ) ; drawTile ( canvas , users . get ( 2 ) , ( ( size // 2 ) + 1 ) , 0 , size , ( ( size // 2 ) - 1 ) ) ; drawTile ( canvas , "…" , AvatarService . PLACEHOLDER_COLOR , ( ( size // 2 ) + 1 ) , ( ( size // 2 ) + 1 ) , size , size ) ; } this . mXmppConnectionService . getBitmapCache ( ) . put ( KEY , bitmap ) ; return bitmap ; } public void clear ( MucOptions options ) { } private String key ( MucOptions options , int size ) { } public Bitmap get ( Account account , int size ) { } public void clear ( Account account ) { } private String key ( Account account , int size ) { } public Bitmap get ( final String name , final int size ) { } private String key ( String name , int size ) { } private void drawTile ( Canvas canvas , String letter , int tileColor , int left , int top , int right , int bottom ) { } private void drawTile ( Canvas canvas , MucOptions . User user , int left , int top , int right , int bottom ) { }

Fix:
final List < MucOptions . User > users = new ArrayList ( mucOptions . getUsers ( ) ) ;