Program: 51747
Project: 51747
Buggy source:
public void saveToSharedPreferences(SharedPreferences sharedPreferences){
  String prefix="String_Node_Str";
  SharedPreferences.Editor editor=sharedPreferences.edit();
  if (this.preferenceSpot >= 0) {
    prefix+=this.preferenceSpot + "String_Node_Str";
  }
 else {
    int count=sharedPreferences.getInt("String_Node_Str",0);
    editor.putInt("String_Node_Str",count + 1);
    prefix+=(count + 1) + "String_Node_Str";
  }
  editor.putString(prefix + "String_Node_Str",this.getName());
  editor.putInt(prefix + "String_Node_Str",this.nicknames.size());
  for (int i=0; i < this.nicknames.size(); i++) {
    editor.putString(prefix + "String_Node_Str" + i,this.nicknames.get(i));
  }
  editor.putString(prefix + "String_Node_Str",this.getUsername());
  editor.putString(prefix + "String_Node_Str",this.getRealname());
  editor.putString(prefix + "String_Node_Str",this.host.getHostname());
  editor.putInt(prefix + "String_Node_Str",this.host.getPort());
  editor.putBoolean(prefix + "String_Node_Str",this.host.isSSL());
  editor.putBoolean(prefix + "String_Node_Str",this.host.verifySSL());
  editor.putString(prefix + "String_Node_Str",this.host.getPassword());
  editor.putInt(prefix + "String_Node_Str",this.autoChannels.size());
  for (int i=0; i < this.autoChannels.size(); i++) {
    editor.putString(prefix + "String_Node_Str" + i,this.autoChannels.get(i));
  }
  editor.putInt(prefix + "String_Node_Str",this.autoCommands.size());
  for (int i=0; i < this.autoCommands.size(); i++) {
    editor.putString(prefix + "String_Node_Str" + i,this.autoCommands.get(i));
  }
  editor.putBoolean(prefix + "String_Node_Str",this.isAutoConnected());
  editor.putBoolean(prefix + "String_Node_Str",this.isLogged());
  editor.commit();
}

Fixed version (ground truth):
public void saveToSharedPreferences(SharedPreferences sharedPreferences){
  String prefix="String_Node_Str";
  SharedPreferences.Editor editor=sharedPreferences.edit();
  if (this.preferenceSpot >= 0) {
    prefix+=this.preferenceSpot + "String_Node_Str";
  }
 else {
    int count=sharedPreferences.getInt("String_Node_Str",0);
    editor.putInt("String_Node_Str",count + 1);
    prefix+=count + "String_Node_Str";
  }
  editor.putString(prefix + "String_Node_Str",this.getName());
  editor.putInt(prefix + "String_Node_Str",this.nicknames.size());
  for (int i=0; i < this.nicknames.size(); i++) {
    editor.putString(prefix + "String_Node_Str" + i,this.nicknames.get(i));
  }
  editor.putString(prefix + "String_Node_Str",this.getUsername());
  editor.putString(prefix + "String_Node_Str",this.getRealname());
  editor.putString(prefix + "String_Node_Str",this.host.getHostname());
  editor.putInt(prefix + "String_Node_Str",this.host.getPort());
  editor.putBoolean(prefix + "String_Node_Str",this.host.isSSL());
  editor.putBoolean(prefix + "String_Node_Str",this.host.verifySSL());
  editor.putString(prefix + "String_Node_Str",this.host.getPassword());
  editor.putInt(prefix + "String_Node_Str",this.autoChannels.size());
  for (int i=0; i < this.autoChannels.size(); i++) {
    editor.putString(prefix + "String_Node_Str" + i,this.autoChannels.get(i));
  }
  editor.putInt(prefix + "String_Node_Str",this.autoCommands.size());
  for (int i=0; i < this.autoCommands.size(); i++) {
    editor.putString(prefix + "String_Node_Str" + i,this.autoCommands.get(i));
  }
  editor.putBoolean(prefix + "String_Node_Str",this.isAutoConnected());
  editor.putBoolean(prefix + "String_Node_Str",this.isLogged());
  editor.commit();
}