Program: 20005
Project: 20005
Buggy source:
/** 
 * Kutsutaan kun aktiviteetti luodaan. 
 */
@Override public void onCreate(Bundle _savedInstanceState){
  super.onCreate(_savedInstanceState);
  setContentView(R.layout.main);
  context=getApplicationContext();
  Options options=Options.getInstance();
  SoundManager.getInstance();
  SoundManager.initSounds(this);
  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
  setVolumeControlStream(AudioManager.STREAM_MUSIC);
  View storyButton=findViewById(R.id.button_story);
  storyButton.setOnClickListener(this);
  View survivalButton=findViewById(R.id.button_survival);
  survivalButton.setOnClickListener(this);
  View helpButton=findViewById(R.id.button_help);
  helpButton.setOnClickListener(this);
  View highscoresButton=findViewById(R.id.button_highscores);
  highscoresButton.setOnClickListener(this);
  View quitButton=findViewById(R.id.button_quit);
  quitButton.setOnClickListener(this);
  particleCheckBox=(CheckBox)findViewById(R.id.checkBoxParticle);
  particleCheckBox.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      if (((CheckBox)v).isChecked()) {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
        Options.settings[0]=false;
      }
 else {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
      }
    }
  }
);
  musicCheckBox=(CheckBox)findViewById(R.id.checkBoxMusic);
  musicCheckBox.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      if (((CheckBox)v).isChecked()) {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
        Options.settings[1]=false;
      }
 else {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
      }
    }
  }
);
  soundCheckBox=(CheckBox)findViewById(R.id.checkBoxSound);
  soundCheckBox.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      if (((CheckBox)v).isChecked()) {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
      }
 else {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
      }
    }
  }
);
  if (!settingsLoaded) {
    XmlReader reader=new XmlReader(getBaseContext());
    boolean[] settingsTemp=reader.readSettings();
    particleCheckBox.setChecked(settingsTemp[0]);
    musicCheckBox.setChecked(settingsTemp[1]);
    soundCheckBox.setChecked(settingsTemp[2]);
    settingsLoaded=true;
  }
}

Fixed version (ground truth):
/** 
 * Kutsutaan kun aktiviteetti luodaan. 
 */
@Override public void onCreate(Bundle _savedInstanceState){
  super.onCreate(_savedInstanceState);
  setContentView(R.layout.main);
  context=getApplicationContext();
  DisplayMetrics dm=new DisplayMetrics();
  getWindowManager().getDefaultDisplay().getMetrics(dm);
  Options.getInstance().scaleConversion(dm.densityDpi);
  SoundManager.getInstance();
  SoundManager.initSounds(this);
  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
  setVolumeControlStream(AudioManager.STREAM_MUSIC);
  View storyButton=findViewById(R.id.button_story);
  storyButton.setOnClickListener(this);
  View survivalButton=findViewById(R.id.button_survival);
  survivalButton.setOnClickListener(this);
  View helpButton=findViewById(R.id.button_help);
  helpButton.setOnClickListener(this);
  View highscoresButton=findViewById(R.id.button_highscores);
  highscoresButton.setOnClickListener(this);
  View quitButton=findViewById(R.id.button_quit);
  quitButton.setOnClickListener(this);
  particleCheckBox=(CheckBox)findViewById(R.id.checkBoxParticle);
  particleCheckBox.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      if (((CheckBox)v).isChecked()) {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
        Options.settings[0]=false;
      }
 else {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
      }
    }
  }
);
  musicCheckBox=(CheckBox)findViewById(R.id.checkBoxMusic);
  musicCheckBox.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      if (((CheckBox)v).isChecked()) {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
        Options.settings[1]=false;
      }
 else {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
      }
    }
  }
);
  soundCheckBox=(CheckBox)findViewById(R.id.checkBoxSound);
  soundCheckBox.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      if (((CheckBox)v).isChecked()) {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
      }
 else {
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
      }
    }
  }
);
  if (!settingsLoaded) {
    XmlReader reader=new XmlReader(getBaseContext());
    boolean[] settingsTemp=reader.readSettings();
    particleCheckBox.setChecked(settingsTemp[0]);
    musicCheckBox.setChecked(settingsTemp[1]);
    soundCheckBox.setChecked(settingsTemp[2]);
    settingsLoaded=true;
  }
}