Buggy code:
public class LocationActivity extends Activity implements ParseCallbacks { private ParseHelper ph ; private TextView title ; private TextView description ; private TextView fullness ; private RatingBar rating ; private ListView listView ; private GoogleMap map ; private MapView mapView ; private Button rate ; private Button comment ; private Button napHere ; private Button moreComments ; private Location l ; private ArrayList < String > comments ; private int numComments = 10 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( location_main ) ; ActionBar actionBar = getActionBar ( ) ; actionBar . setDisplayHomeAsUpEnabled ( true ) ; mapView = ( ( MapView ) ( findViewById ( mapview_header ) ) ) ; mapView . onCreate ( savedInstanceState ) ; map = mapView . getMap ( ) ; map . getUiSettings ( ) . setMyLocationButtonEnabled ( false ) ; map . setMyLocationEnabled ( true ) ; MapsInitializer . initialize ( this ) ; title = ( ( TextView ) ( findViewById ( location_title ) ) ) ; description = ( ( TextView ) ( findViewById ( location_description ) ) ) ; rating = ( ( RatingBar ) ( findViewById ( ratingBar ) ) ) ; fullness = ( ( TextView ) ( findViewById ( location_fullness ) ) ) ; listView = ( ( ListView ) ( findViewById ( R . id . comments ) ) ) ; listView . setFocusable ( false ) ; ph = new ParseHelper ( this ) ; Intent intent = getIntent ( ) ; String id = intent . getStringExtra ( "id" ) ; ph . queryById ( id ) ; ph . queryFullness ( id ) ; ph . queryComments ( id , numComments ) ; ph . fixRating ( id ) ; String nap_title = intent . getStringExtra ( "title" ) ; title . setText ( nap_title ) ; setTitle ( nap_title ) ; getActionBar ( ) . setDisplayShowHomeEnabled ( false ) ; rate = ( ( Button ) ( findViewById ( rate_location ) ) ) ; final Context context = this ; rate . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { AlertDialog . Builder builder = new AlertDialog . Builder ( ( ( Activity ) ( context ) ) ) ; builder . setTitle ( "Rate<seq2seq4repair_space>Nap<seq2seq4repair_space>Location" ) ; String [ ] pillows = new String [ ] { "1<seq2seq4repair_space>Pillow" , "2<seq2seq4repair_space>Pillows" , "3<seq2seq4repair_space>Pillows" , "4<seq2seq4repair_space>Pillows" , "5<seq2seq4repair_space>Pillows" } ; builder . setItems ( pillows , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int which ) { String android_id = Secure . getString ( context . getContentResolver ( ) , ANDROID_ID ) ; <START_BUG> ph . rateNap ( l . id ( ) , which , android_id ) ; <END_BUG> } } ) ; AlertDialog dialog = builder . create ( ) ; dialog . show ( ) ; } } ) ; comment = ( ( Button ) ( findViewById ( comment_location ) ) ) ; comment . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { AlertDialog . Builder builder = new AlertDialog . Builder ( ( ( Activity ) ( context ) ) ) ; builder . setTitle ( "Comment" ) ; LayoutInflater inflater = getLayoutInflater ( ) ; final View view = inflater . inflate ( comment_dialog , null ) ; builder . setView ( view ) ; builder . setPositiveButton ( "Submit" , new DialogInterface . OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialog , int id ) { EditText com = ( ( EditText ) ( view . findViewById ( dialog_text ) ) ) ; ph . submitComment ( com . getText ( ) . toString ( ) , l . id ( ) ) ; } } ) . setNegativeButton ( "Cancel" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { } } ) ; AlertDialog dialog = builder . create ( ) ; dialog . show ( ) ; } } ) ; napHere = ( ( Button ) ( findViewById ( nap_here ) ) ) ; napHere . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { AlertDialog . Builder builder = new AlertDialog . Builder ( ( ( Activity ) ( context ) ) ) ; builder . setMessage ( "Choosing<seq2seq4repair_space>\"Nap<seq2seq4repair_space>Here\"<seq2seq4repair_space>will<seq2seq4repair_space>show<seq2seq4repair_space>others<seq2seq4repair_space>that<seq2seq4repair_space>someone<seq2seq4repair_space>is<seq2seq4repair_space>currently<seq2seq4repair_space>napping<seq2seq4repair_space>here<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>next<seq2seq4repair_space>hour." ) . setTitle ( "Nap<seq2seq4repair_space>Here!" ) . setPositiveButton ( "Nap<seq2seq4repair_space>Here!" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { String android_id = Secure . getString ( context . getContentResolver ( ) , ANDROID_ID ) ; ph . addNap ( l . id ( ) , android_id ) ; } } ) . setNegativeButton ( "Cancel" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { } } ) ; AlertDialog dialog = builder . create ( ) ; dialog . show ( ) ; } } ) ; moreComments = ( ( Button ) ( findViewById ( add_more_comments ) ) ) ; moreComments . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { numComments += 10 ; ph . queryComments ( l . id ( ) , numComments ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void complete ( ) { } @ Override public void commentsComplete ( ) { } @ Override public void completeFullness ( int full ) { } @ Override public void onResume ( ) { } @ Override public void onDestroy ( ) { }

Fix:
ph . rateNap ( l . id ( ) , ( which + 1 ) , android_id ) ;