Buggy code:
public class CreateTask extends AppCompatActivity { private int setTimeId = 1000 ; private int setDateId = 9999 ; final Calendar cal = Calendar . getInstance ( ) ; private int year = cal . get ( Calendar . YEAR ) ; private int month = cal . get ( Calendar . MONTH ) ; private int day = cal . get ( Calendar . DAY_OF_MONTH ) ; private String choice ; private int hour ; private int min ; private int ampm = 0 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_create_task ) ; Toolbar toolbar = ( ( Toolbar ) ( findViewById ( toolbar ) ) ) ; setSupportActionBar ( toolbar ) ; <START_BUG> Bitmap bm = BitmapFactory . decodeResource ( getResources ( ) , profile_pic_default ) ; <END_BUG> ImageView myImageView = ( ( ImageView ) ( findViewById ( imageView4 ) ) ) ; myImageView . setImageBitmap ( bm ) ; Spinner s = ( ( Spinner ) ( findViewById ( spin ) ) ) ; ArrayAdapter adapter = ArrayAdapter . createFromResource ( this , Task_Types , spinner_item ) ; adapter . setDropDownViewResource ( spinner_dropdown_item ) ; s . setAdapter ( adapter ) ; s . setOnItemSelectedListener ( new AdapterView . OnItemSelectedListener ( ) { @ Override public void onItemSelected ( AdapterView < ? > parent , View view , int position , long id ) { String Task = parent . getSelectedItem ( ) . toString ( ) ; Bitmap nbm = BitmapFactory . decodeResource ( getResources ( ) , selecticon ) ; ImageView superManImageView = ( ( ImageView ) ( findViewById ( imageView4 ) ) ) ; superManImageView . setImageBitmap ( nbm ) ; switch ( Task ) { case "Select<seq2seq4repair_space>Type" : Bitmap selectbm = BitmapFactory . decodeResource ( getResources ( ) , selecticon ) ; ImageView selectImageView = ( ( ImageView ) ( findViewById ( imageView4 ) ) ) ; selectImageView . setImageBitmap ( selectbm ) ; choice = DEFAULT . name ( ) ; break ; case "Laundry" : Bitmap laundrybm = BitmapFactory . decodeResource ( getResources ( ) , laundryicon ) ; ImageView laundryImageView = ( ( ImageView ) ( findViewById ( imageView4 ) ) ) ; laundryImageView . setImageBitmap ( laundrybm ) ; choice = LAUNDRY . name ( ) ; break ; case "Dishes" : Bitmap dishesbm = BitmapFactory . decodeResource ( getResources ( ) , dishesicon ) ; ImageView dishesImageView = ( ( ImageView ) ( findViewById ( imageView4 ) ) ) ; dishesImageView . setImageBitmap ( dishesbm ) ; choice = DISHES . name ( ) ; break ; case "Car" : Bitmap carbm = BitmapFactory . decodeResource ( getResources ( ) , caricon ) ; ImageView carImageView = ( ( ImageView ) ( findViewById ( imageView4 ) ) ) ; carImageView . setImageBitmap ( carbm ) ; choice = CAR . name ( ) ; break ; case "Food" : Bitmap foodbm = BitmapFactory . decodeResource ( getResources ( ) , foodicon ) ; ImageView foodImageView = ( ( ImageView ) ( findViewById ( imageView4 ) ) ) ; foodImageView . setImageBitmap ( foodbm ) ; choice = FOOD . name ( ) ; break ; case "Video<seq2seq4repair_space>Games" : Bitmap gamebm = BitmapFactory . decodeResource ( getResources ( ) , gameicon ) ; ImageView gameImageView = ( ( ImageView ) ( findViewById ( imageView4 ) ) ) ; gameImageView . setImageBitmap ( gamebm ) ; choice = GAMES . name ( ) ; break ; } } @ Override public void onNothingSelected ( AdapterView < ? > parent ) { } } ) ; Button createTaskButton ; createTaskButton = ( ( Button ) ( findViewById ( cancelId ) ) ) ; createTaskButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Task task = createTask ( ) ; if ( task != null ) { taskList . add ( task ) ; TaskManager . storeTask ( task ) ; startActivity ( new android . content . Intent ( getApplicationContext ( ) , HomePage . class ) ) ; } else { Toast . makeText ( CreateTask . this , "Please<seq2seq4repair_space>fill<seq2seq4repair_space>all<seq2seq4repair_space>fields!" , LENGTH_SHORT ) . show ( ) ; } } } ) ; setupActionBar ( ) ; } private OnDateSetListener myDateListener = new DatePickerDialog . OnDateSetListener ( ) { @ Override public void onDateSet ( DatePicker view , int year_val , int month_val , int day_val ) { } } ; private OnTimeSetListener myTimeListener = new TimePickerDialog . OnTimeSetListener ( ) { @ Override public void onTimeSet ( TimePicker view , int hour_val , int min_val ) { } } ; @ SuppressWarnings ( "deprecation" ) public void setDate ( View view ) { } @ SuppressWarnings ( "deprecation" ) public void setTime ( View view ) { } @ Override @ SuppressWarnings ( "deprecation" ) protected Dialog onCreateDialog ( int id ) { } public void goHome ( View v ) { } private Task createTask ( ) { } private void setupActionBar ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
Bitmap bm = BitmapFactory . decodeResource ( getResources ( ) , selecticon ) ;