Buggy code:
public class MainActivity extends Activity implements OnClickListener { private CommonsHttpOAuthConsumer httpOAuthConsumer ; private OAuthProvider httpOAuthProvider ; private static final String TAG = "com.gimranov.zandy.app.MainActivity" ; static final int DIALOG_CHOOSE_COLLECTION = 1 ; private Database db ; private Bundle b = new Bundle ( ) ; @ Override public void onCreate ( Bundle savedInstanceState ) { } public void onResume ( ) { } public void onClick ( View v ) { } protected void startOAuth ( ) { } @ Override protected void onNewIntent ( Intent intent ) { super . onNewIntent ( intent ) ; Log . d ( MainActivity . TAG , "Got<seq2seq4repair_space>new<seq2seq4repair_space>intent" ) ; if ( intent == null ) return ; String action = intent . getAction ( ) ; if ( ( ( action != null ) && ( action . equals ( "android.intent.action.SEND" ) ) ) && ( ( intent . getExtras ( ) ) != null ) ) { Bundle extras = intent . getExtras ( ) ; for ( String s : extras . keySet ( ) ) { try { Log . d ( "TAG" , ( ( ( "Got<seq2seq4repair_space>extra:<seq2seq4repair_space>" + s ) + "<seq2seq4repair_space>=><seq2seq4repair_space>" ) + ( extras . getString ( s ) ) ) ) ; } catch ( ClassCastException e ) { Log . e ( MainActivity . TAG , "Not<seq2seq4repair_space>a<seq2seq4repair_space>string,<seq2seq4repair_space>it<seq2seq4repair_space>seems" , e ) ; } } Bundle b = new Bundle ( ) ; b . putString ( "url" , extras . getString ( "android.intent.extra.TEXT" ) ) ; b . putString ( "title" , extras . getString ( "android.intent.extra.SUBJECT" ) ) ; this . b = b ; showDialog ( MainActivity . DIALOG_CHOOSE_COLLECTION ) ; return ; } if ( ( this . httpOAuthConsumer ) == null ) this . httpOAuthConsumer = new CommonsHttpOAuthConsumer ( ServerCredentials . CONSUMERKEY , ServerCredentials . CONSUMERSECRET ) ; if ( ( this . httpOAuthProvider ) == null ) this . httpOAuthProvider = new oauth . signpost . basic . DefaultOAuthProvider ( ServerCredentials . OAUTHREQUEST , ServerCredentials . OAUTHACCESS , ServerCredentials . OAUTHAUTHORIZE ) ; Uri uri ; uri = intent . getData ( ) ; if ( uri != null ) { String verifier = uri . getQueryParameter ( OAUTH_VERIFIER ) ; try { this . httpOAuthProvider . retrieveAccessToken ( this . httpOAuthConsumer , verifier ) ; HttpParameters params = this . httpOAuthProvider . getResponseParameters ( ) ; String userID = params . getFirst ( "userID" ) ; Log . d ( MainActivity . TAG , ( "uid:<seq2seq4repair_space>" + userID ) ) ; String userKey = this . httpOAuthConsumer . getToken ( ) ; Log . d ( MainActivity . TAG , ( "ukey:<seq2seq4repair_space>" + userKey ) ) ; String userSecret = this . httpOAuthConsumer . getTokenSecret ( ) ; Log . d ( MainActivity . TAG , ( "usecret:<seq2seq4repair_space>" + userSecret ) ) ; SharedPreferences settings = PreferenceManager . getDefaultSharedPreferences ( this ) ; SharedPreferences . Editor editor = settings . edit ( ) ; editor . putString ( "user_key" , userKey ) ; editor . putString ( "user_secret" , userSecret ) ; editor . putString ( "user_id" , userID ) ; editor . commit ( ) ; Button loginButton = ( ( Button ) ( findViewById ( loginButton ) ) ) ; loginButton . setText ( getResources ( ) . getString ( logged_in ) ) ; loginButton . setClickable ( false ) ; } catch ( OAuthMessageSignerException e ) { Toast . makeText ( this , e . getMessage ( ) , LENGTH_LONG ) . show ( ) ; } catch ( OAuthNotAuthorizedException e ) { Toast . makeText ( this , e . getMessage ( ) , LENGTH_LONG ) . show ( ) ; } catch ( OAuthExpectationFailedException e ) { Toast . makeText ( this , e . getMessage ( ) , LENGTH_LONG ) . show ( ) ; } catch ( OAuthCommunicationException e ) { <START_BUG> Toast . makeText ( this , e . getMessage ( ) , LENGTH_LONG ) . show ( ) ; <END_BUG> } } } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } protected Dialog onCreateDialog ( int id ) { } }

Fix:
Toast . makeText ( this , ( "Error<seq2seq4repair_space>communicating<seq2seq4repair_space>with<seq2seq4repair_space>server.<seq2seq4repair_space>Check<seq2seq4repair_space>your<seq2seq4repair_space>time<seq2seq4repair_space>settings,<seq2seq4repair_space>network<seq2seq4repair_space>connectivity,<seq2seq4repair_space>and<seq2seq4repair_space>try<seq2seq4repair_space>again.<seq2seq4repair_space>OAuth<seq2seq4repair_space>error:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , LENGTH_LONG ) . show ( ) ;