Buggy code:
public class Widget extends AppWidgetProvider { public static final int STATUS_OFFLINE = 0 ; public static final int STATUS_NOTFOUND = 1 ; public static final int STATUS_ONLINE = 2 ; private static final String debugTag = "GHCWidget" ; private RemoteViews remoteViews ; private CommitsBase base ; private int status = Widget . STATUS_ONLINE ; private String username ; private int months ; private String theme ; private boolean startOnMonday ; private boolean showDaysLabel ; @ Override public void onUpdate ( Context context , AppWidgetManager appWidgetManager , int [ ] appWidgetIds ) { } @ Override public void onReceive ( Context context , Intent intent ) { } private void setPreferences ( Context context ) { } private void setClickIntent ( Context context , int appWidgetId ) { } private void updateInfoBar ( CommitsBase base ) { } private Bitmap processImage ( Context context ) { } private CommitsBase loadData ( String username ) { } private Point getScreenSize ( Context context ) { } private Bitmap createBitmap ( CommitsBase base , int weeksNumber , Point size , String theme ) { float SPACE_RATIO = 0.1F ; int TEXT_GRAPH_SPACE = 7 ; float daysLabelSpaceRatio = ( showDaysLabel ) ? 0.8F : 0 ; float side = ( ( size . x ) // ( weeksNumber + daysLabelSpaceRatio ) ) * ( 1 - SPACE_RATIO ) ; float space = ( ( size . x ) // ( weeksNumber + daysLabelSpaceRatio ) ) - side ; float textSize = side * 0.87F ; int height = ( ( int ) ( ( ( 7 * ( side + space ) ) + textSize ) + TEXT_GRAPH_SPACE ) ) ; ColorTheme colorTheme = new ColorTheme ( ) ; Bitmap bitmap = Bitmap . createBitmap ( size . x , height , ARGB_8888 ) ; Canvas canvas = new Canvas ( bitmap ) ; Paint paint = new Paint ( ) ; paint . setStyle ( FILL ) ; Paint paintText = new Paint ( Paint . ANTI_ALIAS_FLAG ) ; paintText . setTypeface ( Typeface . create ( DEFAULT , NORMAL ) ) ; paintText . setTextSize ( textSize ) ; paintText . setColor ( GRAY ) ; if ( base != null ) { float x = 0 ; float y ; if ( showDaysLabel ) { y = ( startOnMonday ) ? ( textSize * 2 ) + TEXT_GRAPH_SPACE : ( ( textSize * 2 ) + TEXT_GRAPH_SPACE ) + side ; canvas . drawText ( "M" , 0 , y , paintText ) ; canvas . drawText ( "W" , 0 , ( y + ( 2 * ( side + space ) ) ) , paintText ) ; canvas . drawText ( "F" , ( textSize * 0.1F ) , ( y + ( 4 * ( side + space ) ) ) , paintText ) ; if ( startOnMonday ) canvas . drawText ( "S" , ( textSize * 0.1F ) , ( y + ( 6 * ( side + space ) ) ) , paintText ) ; x = textSize ; } y = textSize + TEXT_GRAPH_SPACE ; ArrayList < ArrayList < Day > > weeks = base . getWeeks ( ) ; int firstWeek = - 1 ; for ( int i = ( weeks . size ( ) ) - weeksNumber ; i < ( weeks . size ( ) ) ; i ++ ) { if ( ( ( firstWeek != ( - 1 ) ) && ( ( ( i + firstWeek ) % 4 ) == 0 ) ) && ( i != ( ( weeks . size ( ) ) - 1 ) ) ) { <START_BUG> canvas . drawText ( weeks . get ( i ) . get ( 1 ) . getMonth ( ) , x , textSize , paintText ) ; <END_BUG> } for ( Day day : weeks . get ( i ) ) { if ( ( firstWeek == ( - 1 ) ) && ( day . isFirst ( ) ) ) firstWeek = i ; if ( ( startOnMonday ) && ( ( weeks . get ( i ) . indexOf ( day ) ) == 0 ) ) continue ; paint . setColor ( colorTheme . getColor ( theme , day . getLevel ( ) ) ) ; canvas . drawRect ( x , y , ( x + side ) , ( y + side ) , paint ) ; y = ( y + side ) + space ; } if ( startOnMonday ) { try { paint . setColor ( colorTheme . getColor ( theme , weeks . get ( ( i + 1 ) ) . get ( 0 ) . getLevel ( ) ) ) ; } catch ( IndexOutOfBoundsException e ) { break ; } canvas . drawRect ( x , y , ( x + side ) , ( y + side ) , paint ) ; y = ( y + side ) + space ; } y = textSize + TEXT_GRAPH_SPACE ; x = ( x + side ) + space ; } } return bitmap ; } private void printMessage ( String msg ) { } public void setStatus ( int status ) { } No newline ; at end ; of file ; }

Fix:
canvas . drawText ( weeks . get ( i ) . get ( 1 ) . getMonthName ( ) , x , textSize , paintText ) ;