Buggy code:
public ImageButton strokeStyleIB ; public ImageButton grayScaleIB ; public ImageButton textureIB ; public ImageButton saveIB ; public ToggleButton freeHandToggleB ; public ToggleButton oneLineToggleB ; public ListPopupWindow listPopupStyle ; public ListPopupWindow listPopupLine ; public RadioGroup toggleGroup ; public Bitmap mBitmap ; public Bitmap mTextureBitmap ; public Paint mPaint ; public View [ ] listButton ; private WafImage wafImage ; public EditorFragment ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onClick ( View v ) { } @ Override public void onStart ( ) { super . onStart ( ) ; openActionBarBottom ( ) ; freeHandToggleB . setOnClickListener ( this ) ; oneLineToggleB . setOnClickListener ( this ) ; strokeWidthIB . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( ( listPopupLine ) == null ) { listPopupLine = new ListPopupWindow ( getActivity ( ) ) ; listPopupLine . setAdapter ( new com . filippowallandfloorv4 . wallandfloorv4 . Adapter . StrokeWidthListAdapter ( getActivity ( ) , vfd . getmPaint ( ) ) ) ; listPopupLine . setAnchorView ( strokeWidthIB ) ; listPopupLine . setPromptPosition ( POSITION_PROMPT_ABOVE ) ; listPopupLine . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { Integer i = ( ( Integer ) ( parent . getItemAtPosition ( position ) ) ) ; vfd . getmPaint ( ) . setStrokeWidth ( i . floatValue ( ) ) ; listPopupLine . dismiss ( ) ; } } ) ; listPopupLine . show ( ) ; } else { if ( listPopupLine . isShowing ( ) ) { listPopupLine . dismiss ( ) ; } else { listPopupLine . show ( ) ; listPopupLine . setAdapter ( new com . filippowallandfloorv4 . wallandfloorv4 . Adapter . StrokeWidthListAdapter ( getActivity ( ) , vfd . getmPaint ( ) ) ) ; } } } } ) ; strokeStyleIB . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( ( listPopupStyle ) == null ) { listPopupStyle = new ListPopupWindow ( getActivity ( ) ) ; listPopupStyle . setAdapter ( new com . filippowallandfloorv4 . wallandfloorv4 . Adapter . StrokeFillTypeListAdapter ( getActivity ( ) , vfd . getmPaint ( ) ) ) ; listPopupStyle . setAnchorView ( strokeStyleIB ) ; listPopupStyle . setPromptPosition ( POSITION_PROMPT_ABOVE ) ; listPopupStyle . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { Paint . Style style = ( ( Paint . Style ) ( parent . getItemAtPosition ( position ) ) ) ; vfd . getmPaint ( ) . setStyle ( style ) ; listPopupStyle . dismiss ( ) ; } } ) ; listPopupStyle . show ( ) ; } else { if ( listPopupStyle . isShowing ( ) ) { listPopupStyle . dismiss ( ) ; } else { listPopupStyle . show ( ) ; listPopupStyle . setAdapter ( new com . filippowallandfloorv4 . wallandfloorv4 . Adapter . StrokeFillTypeListAdapter ( getActivity ( ) , vfd . getmPaint ( ) ) ) ; } } freeHandToggleB . setChecked ( true ) ; } } ) ; saveIB . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { vfd . finallyDraw ( ) ; EditorActivity activity = ( ( EditorActivity ) ( getActivity ( ) ) ) ; if ( activity . saveCurrentPhoto ( activity . getWafImage ( ) ) ) { Toast . makeText ( getActivity ( ) , save_success , LENGTH_SHORT ) . show ( ) ; } } } ) ; toggleGroup . setOnCheckedChangeListener ( new RadioGroup . OnCheckedChangeListener ( ) { @ Override public void onCheckedChanged ( RadioGroup group , int checkedId ) { Log . e ( "call" , "listenercall" ) ; for ( int i = 0 ; i < ( group . getChildCount ( ) ) ; i ++ ) { ToggleButton toggleButton = ( ( ToggleButton ) ( group . getChildAt ( i ) ) ) ; toggleButton . setChecked ( ( ( toggleButton . getId ( ) ) == checkedId ) ) ; vfd . setFreeHand ( freeHandToggleB . isChecked ( ) ) ; vfd . setFloodFill ( oneLineToggleB . isChecked ( ) ) ; Log . e ( EditorFragment . LOG_EDITFRAG , ( ( ( "freehand:<seq2seq4repair_space>" + ( freeHandToggleB . isChecked ( ) ) ) + "<seq2seq4repair_space>--<seq2seq4repair_space>floodfill:<seq2seq4repair_space>" ) + ( oneLineToggleB . isChecked ( ) ) ) ) ; } } } ) ; grayScaleIB . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { <START_BUG> vfd . findBord ( ) ; <END_BUG> } } ) ; openIB . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { openActionBarBottom ( ) ; } } ) ; textureIB . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { dialogTexture ( ) ; } } ) ; } public void openActionBarBottom ( ) { } private void dialogTexture ( ) { } public ViewForDrawIn getVfd ( ) { } public void setVfd ( ViewForDrawIn vfd ) { } public void setmBitmapAndPaint ( Bitmap mBitmap , Paint mPaint ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } public Bitmap getmBitmap ( ) { } public Paint getmPaint ( ) { } public WafImage getWafImage ( ) { } public void setWafImage ( WafImage wafImage ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onViewStateRestored ( Bundle savedInstanceState ) { } }

Fix:
vfd . CannyBord ( ) ;