Buggy code:
public class ATKPolygonView { private ATKPolygon polygon ; private ATKPolygonViewOptions viewOptions ; private GoogleMap map ; private Polygon mapPolygon ; private Marker mapLabelMarker ; private BitmapDescriptor iconLabel ; private BitmapDescriptor iconLabelSelected ; private PolygonOptions polygonOptions ; private ATKPolygonClickListener clickListener ; private ATKPolygonDrawListener drawListener ; private Object userData ; private String currentLabel ; public ATKPolygonView ( GoogleMap map , ATKPolygon polygon ) { } public void setOnClickListener ( ATKPolygonClickListener clickListener ) { } public void setOnDrawListener ( ATKPolygonDrawListener drawListener ) { } public ATKPolygonDrawListener getOnDrawListener ( ) { } public ATKPolygon getAtkPolygon ( ) { } public void setAtkPolygon ( ATKPolygon polygon ) { } public void update ( ) { } public void remove ( ) { } public void hide ( ) { } public void show ( ) { } public void setStrokeColor ( int color ) { } public void setStrokeColor ( float alpha , int red , int green , int blue ) { } public void setFillColor ( int color ) { } public void setFillColor ( float alpha , int red , int green , int blue ) { } public void setStrokeWidth ( float width ) { } public void setOpacity ( float opacity ) { } public void setZIndex ( float zindex ) { } public float getZIndex ( ) { } public boolean wasClicked ( Point point ) { } public boolean wasClicked ( LatLng point ) { } public boolean click ( ) { } public boolean labelWasClicked ( Marker marker ) { } private void drawPolygon ( ) { } private void drawLabel ( ) { } public void setLabel ( String label ) { } public void setLabel ( String label , Boolean selected ) { this . currentLabel = label ; this . polygon . label = label ; this . viewOptions . setBlnLabelSelected ( selected ) ; <START_BUG> if ( ( label == null ) || ( ( label . length ( ) ) == 0 ) ) { <END_BUG> this . drawLabel ( ) ; return ; } Paint paint = new Paint ( Paint . ANTI_ALIAS_FLAG ) ; paint . setTextAlign ( LEFT ) ; paint . setTextSize ( 20 ) ; paint . setStrokeWidth ( 12 ) ; Rect bounds = new Rect ( ) ; paint . getTextBounds ( label , 0 , label . length ( ) , bounds ) ; Bitmap . Config conf = Config . ARGB_8888 ; Bitmap bitmapSelected = Bitmap . createBitmap ( ( ( bounds . width ( ) ) + 5 ) , bounds . height ( ) , conf ) ; Bitmap bitmap = Bitmap . createBitmap ( ( ( bounds . width ( ) ) + 5 ) , bounds . height ( ) , conf ) ; float x = 0 ; float y = ( ( - 1.0F ) * ( bounds . top ) ) + ( ( bitmap . getHeight ( ) ) * 0.06F ) ; Canvas canvas = new Canvas ( bitmap ) ; paint . setColor ( this . viewOptions . getLabelColor ( ) ) ; canvas . drawText ( label , x , y , paint ) ; canvas = new Canvas ( bitmapSelected ) ; paint . setColor ( this . viewOptions . getLabelSelectedColor ( ) ) ; paint . setShadowLayer ( 1.0F , 0.0F , 1.0F , DKGRAY ) ; canvas . drawText ( label , x , y , paint ) ; this . iconLabel = BitmapDescriptorFactory . fromBitmap ( bitmap ) ; this . iconLabelSelected = BitmapDescriptorFactory . fromBitmap ( bitmapSelected ) ; this . drawLabel ( ) ; } public void setLabelSelected ( boolean selected ) { } public void setLabelColor ( int color ) { } public void setLabelColor ( float alpha , int red , int green , int blue ) { } public void setLabelSelectedColor ( int color ) { } public void setLabelSelectedColor ( float alpha , int red , int green , int blue ) { } public String getLabel ( ) { } public void setData ( Object data ) { } public Object getData ( ) { } private boolean isPointInPolygon ( Point tap , List < Point > vertices ) { } private boolean rayCastIntersect ( Point tap , Point vertA , Point vertB ) { } public static LatLng midPoint ( LatLng point1 , LatLng point2 ) { } public float getAcres ( ) { } }

Fix:
if ( ( label == null ) || ( ( label . trim ( ) . length ( ) ) == 0 ) ) {