Buggy code:
public class DoSign extends GetPassActivity implements View . OnClickListener { private class DocsListObject { DocSignRequest [ ] values ; } private static Settings settings ; ArrayList < DocSignRequest > documents ; ArrayList < DocSignRequest > documents_for_post_decode ; private int current_doc_idx = 0 ; private Gson gson ; private Long last_recv_time = null ; private TextView textTitleSignDoc ; private TextView textDocSite ; private TextView textDocId ; private TextView textHtmlDoc ; private TextView txtViewDocStatus ; private TextView txtViewDocStatusTime ; private TextView txtViewDocCreateTime ; private TextView txtViewDocConfirmTime ; private Button btnSign ; private Button btnSignCancel ; private Button btnBack ; private TableLayout tblViewInfo ; private LinearLayout llyForBack ; private ProgressDialog send_pd ; private DoSign . DoSignTask send_task ; private ArrayList < DocSign > sign_docs ; private boolean view_mode = false ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onClick ( View v ) { } private void appModeNextDocProcess ( ) { } private void setDocs ( String json_doc ) { } private void setDocsForPostDecode ( String json_doc ) { } private void processDocsForPostDecode ( ) { Log . d ( "DOSIGN" , ( "processDocsForPostDecode<seq2seq4repair_space>for<seq2seq4repair_space>public_key_id<seq2seq4repair_space>=<seq2seq4repair_space>" + ( sign . getPublicKeyIdBase64 ( ) ) ) ) ; if ( ( ( documents_for_post_decode ) != null ) && ( ( documents_for_post_decode . size ( ) ) > 0 ) ) { Log . d ( "DOSIGN" , "processDocsForPostDecode<seq2seq4repair_space>docs<seq2seq4repair_space>present" ) ; boolean is_new_docs = false ; for ( int i = 0 ; i < ( documents_for_post_decode . size ( ) ) ; i ++ ) { DocSignRequest doc = documents_for_post_decode . get ( i ) ; Log . d ( "DOSIGN" , ( "processDocsForPostDecode<seq2seq4repair_space>decrypt<seq2seq4repair_space>data<seq2seq4repair_space>=<seq2seq4repair_space>" + ( doc . data ) ) ) ; <START_BUG> if ( ( ( doc . dec_data ) != null ) && ( ! ( doc . dec_data . equals ( "" ) ) ) ) { <END_BUG> Log . d ( "DOSIGN" , "processDocsForPostDecode<seq2seq4repair_space>decrypted<seq2seq4repair_space>data<seq2seq4repair_space>present" ) ; if ( ( documents ) == null ) documents = new ArrayList < DocSignRequest > ( ) ; documents . add ( doc ) ; is_new_docs = true ; } else { byte [ ] json_data = sign . decrypt ( doc . data ) ; if ( json_data != null ) { try { doc . dec_data = new String ( json_data , "UTF-8" ) ; Log . d ( "DOSIGN" , ( "processDocsForPostDecode<seq2seq4repair_space>decrypted<seq2seq4repair_space>=<seq2seq4repair_space>" + ( doc . dec_data ) ) ) ; } catch ( UnsupportedEncodingException e ) { e . printStackTrace ( ) ; } Log . d ( "DOSIGN" , "processDocsForPostDecode<seq2seq4repair_space>check<seq2seq4repair_space>for<seq2seq4repair_space>new<seq2seq4repair_space>doc" ) ; if ( ( ( ( doc . dec_data ) != null ) && ( ! ( doc . dec_data . equals ( "" ) ) ) ) && ( ( DocsStorage . is_new ( this . getApplicationContext ( ) , doc ) ) || ( DocsStorage . is_not_signed ( this . getApplicationContext ( ) , doc ) ) ) ) { Log . d ( "DOSIGN" , "processDocsForPostDecode<seq2seq4repair_space>add<seq2seq4repair_space>doc<seq2seq4repair_space>in<seq2seq4repair_space>list" ) ; if ( ( documents ) == null ) documents = new ArrayList < DocSignRequest > ( ) ; documents . add ( doc ) ; is_new_docs = true ; } else { if ( ( ( doc . dec_data ) == null ) || ( doc . dec_data . equals ( "" ) ) ) Log . d ( "DOSIGN" , "processDocsForPostDecode<seq2seq4repair_space>no<seq2seq4repair_space>dec_data<seq2seq4repair_space>in<seq2seq4repair_space>document" ) ; if ( ! ( DocsStorage . is_new ( this . getApplicationContext ( ) , doc ) ) ) Log . d ( "DOSIGN" , "processDocsForPostDecode<seq2seq4repair_space>doc<seq2seq4repair_space>already<seq2seq4repair_space>in<seq2seq4repair_space>DB" ) ; } } } } if ( is_new_docs ) { Log . d ( "DOSIGN" , "processDocsForPostDecode<seq2seq4repair_space>show<seq2seq4repair_space>data" ) ; showData ( ) ; } else { MainActivity . alert ( getString ( err_document_already_signed ) , this , true ) ; } } } @ Override public boolean onPassword ( String password ) { } private void showData ( ) { } private void show_next_document ( ) { } private boolean is_last_document ( ) { } private DocSignRequest current_document ( ) { } class DoSignTask extends AsyncTask < DocSignRequest , Void , String > { @ Override protected void onPreExecute ( ) { } @ Override protected String doInBackground ( DocSignRequest ... params ) { } @ Override protected void onPostExecute ( String result ) { } } }

Fix:
if ( ( ( ( doc . dec_data ) != null ) && ( ! ( doc . dec_data . equals ( "" ) ) ) ) && ( ( DocsStorage . is_new ( this . getApplicationContext ( ) , doc ) ) || ( DocsStorage . is_not_signed ( this . getApplicationContext ( ) , doc ) ) ) ) {