Buggy code:
i < ( list . size ( ) ) ; i ++ ) { recipeStr . append ( list . get ( i ) ) ; recipeStr . append ( "\n" ) ; recipeStr . append ( "\n" ) ; } } if ( ( intent . getExtras ( ) . getStringArray ( "ingredients" ) ) != null ) ingredients = Arrays . asList ( intent . getExtras ( ) . getStringArray ( "ingredients" ) ) ; if ( ( ingredients ) != null ) { for ( int i = 0 ; i < ( ingredients . size ( ) ) ; i ++ ) { ingredientsStr . append ( ingredients . get ( i ) ) ; ingredientsStr . append ( "\n" ) ; ingredientsStr . append ( "\n" ) ; } } if ( ! ( recipeStr . toString ( ) . isEmpty ( ) ) ) ( ( TextView ) ( findViewById ( R . id . txtText ) ) ) . setText ( recipeStr . toString ( ) ) ; final Button recipeBtn = ( ( Button ) ( findViewById ( recipeBtn ) ) ) ; final Button ingredientsBtn = ( ( Button ) ( findViewById ( ingredientsBtn ) ) ) ; recipeBtn . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { if ( ! ( recipe ) ) { if ( ! ( recipeStr . toString ( ) . isEmpty ( ) ) ) ( ( TextView ) ( findViewById ( R . id . txtText ) ) ) . setText ( recipeStr . toString ( ) ) ; recipe = true ; recipeBtn . setBackgroundColor ( Color . parseColor ( "#44b9cb" ) ) ; ingredientsBtn . setBackgroundColor ( Color . parseColor ( "#2eaac0" ) ) ; } } } ) ; ingredientsBtn . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { if ( recipe ) { if ( ! ( ingredientsStr . toString ( ) . isEmpty ( ) ) ) ( ( TextView ) ( findViewById ( R . id . txtText ) ) ) . setText ( ingredientsStr . toString ( ) ) ; recipe = false ; recipeBtn . setBackgroundColor ( Color . parseColor ( "#2eaac0" ) ) ; ingredientsBtn . setBackgroundColor ( Color . parseColor ( "#44b9cb" ) ) ; } } } ) ; Gson gs = new Gson ( ) ; int i = 0 ; while ( ( getIntent ( ) . getStringExtra ( ( "bookmarked" + i ) ) ) != null ) { String gson = getIntent ( ) . getStringExtra ( ( "bookmarked" + i ) ) ; recipes . add ( gs . fromJson ( gson , Recipe . class ) ) ; i ++ ; } for ( int j = 0 ; j < ( recipes . size ( ) ) ; j ++ ) { titles . add ( recipes . get ( j ) . toString ( ) ) ; } if ( titles . contains ( recipeName ) ) { bookmarked = true ; } else { bookmarked = false ; } final Button newRecipe = ( ( Button ) ( findViewById ( newRecip ) ) ) ; final Button create = ( ( Button ) ( findViewById ( create ) ) ) ; final Button bookmarks = ( ( Button ) ( findViewById ( bookmarks ) ) ) ; newRecipe . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { final Intent mainAct = new Intent ( NewRecipe . this , MainActivity . class ) ; Gson gs2 = new Gson ( ) ; String bookmarkss ; mainAct . putExtra ( "opened" , true ) ; for ( int j = 0 ; j < ( recipes . size ( ) ) ; j ++ ) { bookmarkss = gs2 . toJson ( recipes . get ( j ) ) ; mainAct . putExtra ( ( "bookmarked" + j ) , bookmarkss ) ; } startActivity ( mainAct ) ; } } ) ; create . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { <START_BUG> final Intent createAct = new Intent ( NewRecipe . this , NewRecipe . class ) ; <END_BUG> Gson gs2 = new Gson ( ) ; String bookmarkss ; for ( int j = 0 ; j < ( recipes . size ( ) ) ; j ++ ) { bookmarkss = gs2 . toJson ( recipes . get ( j ) ) ; createAct . putExtra ( ( "bookmarked" + j ) , bookmarkss ) ; } startActivity ( createAct ) ; } } ) ; bookmarks . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { final Intent bookmarkAct = new Intent ( NewRecipe . this , ListViewRemovalAnimation . class ) ; Gson gs2 = new Gson ( ) ; String bookmarkss ; for ( int j = 0 ; j < ( recipes . size ( ) ) ; j ++ ) { bookmarkss = gs2 . toJson ( recipes . get ( j ) ) ; bookmarkAct . putExtra ( ( "bookmarked" + j ) , bookmarkss ) ; } startActivity ( bookmarkAct ) ; } } ) ; } @ Override protected void onStop ( ) { } public void writeJsonStream ( OutputStream out , List < Recipe > messages ) throws IOException { } @ Override public void onDestroy ( ) { } @ Override public void onInit ( int status ) { } private void speakOut ( int i ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } protected void bookmark ( ) { }

Fix:
final Intent createAct = new Intent ( NewRecipe . this , CreateRecipe . class ) ;