Buggy code:
public class MainActivity extends ActionBarActivity { private ListView mProjectsList ; private SwipeRefreshLayout mSwipeLayout ; private Map < String , String > mProjectsMap ; private ArrayList < String > mProjectsListFile = new ArrayList < String > ( ) ; private ArrayAdapter myArrayAdapter ; private ShareLaTeXAuthenticator mAuthenticator ; private boolean isBusy = false ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; ActionBar bar = getSupportActionBar ( ) ; bar . setBackgroundDrawable ( new android . graphics . drawable . ColorDrawable ( Color . parseColor ( "#a93529" ) ) ) ; bar . setTitle ( "ShareLaTeX<seq2seq4repair_space>Buddy" ) ; setContentView ( activity_main ) ; myArrayAdapter = new ArrayAdapter < String > ( this , layout . custom_list_item , id . list_content , mProjectsListFile ) ; mProjectsList = ( ( ListView ) ( findViewById ( listview ) ) ) ; mProjectsList . setAdapter ( myArrayAdapter ) ; mProjectsList . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { Log . d ( "OnItemClick" , ( ( "User<seq2seq4repair_space>selected<seq2seq4repair_space>on<seq2seq4repair_space>item<seq2seq4repair_space>" + ( mProjectsListFile . get ( position ) ) ) + ( mSwipeLayout . isRefreshing ( ) ? "Ignored,<seq2seq4repair_space>busy<seq2seq4repair_space>with<seq2seq4repair_space>other<seq2seq4repair_space>task" : "" ) ) ) ; if ( ! ( isBusy ) ) { String projectID = mProjectsMap . get ( mProjectsListFile . get ( position ) ) ; new MainActivity . displayPDFTask ( ) . execute ( projectID ) ; } } } ) ; mSwipeLayout = ( ( SwipeRefreshLayout ) ( findViewById ( swipe_container ) ) ) ; mSwipeLayout . setOnRefreshListener ( new SwipeRefreshLayout . OnRefreshListener ( ) { @ Override public void onRefresh ( ) { Log . d ( "setOnRefreshListener" , "User<seq2seq4repair_space>refreshing" ) ; new MainActivity . GetProjectsTask ( ) . execute ( ) ; } } ) ; mAuthenticator = new ShareLaTeXAuthenticator ( getContext ( ) ) ; <START_BUG> mAuthenticator . useCredentials ( "sune1987@gmail.com" , "***REMOVED***" ) ; <END_BUG> mAuthenticator . storeCredentials ( ) ; mAuthenticator . loadCredentials ( ) ; Authenticator . setDefault ( mAuthenticator ) ; CookieManager cookieManager = new CookieManager ( ) ; CookieHandler . setDefault ( cookieManager ) ; } @ Override protected void onStart ( ) { } @ Override protected void onStop ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private Context getContext ( ) { } private void presentReasonForFailure ( String failure , final Exception exception ) { } private class GetProjectsTask extends AsyncTask < Void , Void , Exception > { @ Override protected void onPreExecute ( ) { } @ Override protected Exception doInBackground ( Void ... arg0 ) { } @ Override protected void onPostExecute ( final Exception exception ) { } } private class displayPDFTask extends AsyncTask < String , Void , Exception > { private File pdfFile ; @ Override protected void onPreExecute ( ) { } @ Override protected Exception doInBackground ( String ... arg0 ) { } @ Override protected void onPostExecute ( final Exception exception ) { } } }

Fix:
mAuthenticator . useCredentials ( "test@test.dk" , "testtest" ) ;