Program: 51742
Project: 51742
Buggy source:
public void onClick(View view){
  SharedPreferences rawPreferences=activity.getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE);
  ServerPreferences prefs=new ServerPreferences();
  ServerPreferences.Host host=prefs.new Host();
  prefs.setHost(host);
  boolean success=true;
  if (nameView.getText().length() == 0) {
    success=false;
    AlertDialog.Builder b=new AlertDialog.Builder(activity);
    b.setMessage("String_Node_Str");
    b.setPositiveButton("String_Node_Str",null);
    b.show();
  }
 else {
    if (!nameView.getText().toString().equals(originalServerName) && ServerPreferences.serverNameExists(rawPreferences,nameView.getText().toString())) {
      success=false;
      AlertDialog.Builder b=new AlertDialog.Builder(activity);
      b.setMessage("String_Node_Str");
      b.setPositiveButton("String_Node_Str",null);
      b.show();
    }
 else     prefs.setName(nameView.getText().toString());
  }
  if (hostView.getText().length() == 0) {
    host.setHostname("String_Node_Str");
  }
 else {
    host.setHostname(hostView.getText().toString());
  }
  if (portView.getText().length() == 0) {
    host.setPort(6667);
  }
 else {
    host.setPort(Integer.parseInt(portView.getText().toString()));
  }
  if (passwordView.getText().length() == 0) {
    host.setPassword(null);
  }
 else {
    host.setPassword(passwordView.getText().toString());
  }
  host.isSSL(ssl.isChecked());
  host.isSSL(verifyssl.isChecked());
  if (nickName.getText().length() == 0) {
    success=false;
    AlertDialog.Builder b=new AlertDialog.Builder(activity);
    b.setMessage("String_Node_Str");
    b.setPositiveButton("String_Node_Str",null);
    b.show();
  }
 else {
    ArrayList<String> nicks=new ArrayList<String>();
    for (    String s : nickName.getText().toString().split("String_Node_Str"))     nicks.add(s);
    prefs.setNicknames(nicks);
  }
  if (usernameView.getText().length() == 0) {
    prefs.setUsername("String_Node_Str");
  }
 else {
    prefs.setUsername(usernameView.getText().toString());
  }
  if (realnameView.getText().length() == 0) {
    prefs.setRealname("String_Node_Str");
  }
 else {
    prefs.setRealname(realnameView.getText().toString());
  }
  if (autoconnectCommands.getText().length() > 0) {
    ArrayList<String> commands=new ArrayList<String>();
    for (    String c : autoconnectCommands.getText().toString().split("String_Node_Str"))     commands.add(c);
    prefs.setAutoCommands(commands);
  }
  prefs.isAutoConnected(autoconnect.isChecked());
  prefs.isLogged(log.isChecked());
  if (success) {
    prefs.saveToSharedPreferences(rawPreferences);
    if (server != null && server.getServerInfo().getBot().isConnected())     moeService.disconnect(originalServerName);
    moeService.connect(prefs);
    d.dismiss();
  }
}

Fixed version (ground truth):
public void onClick(View view){
  SharedPreferences rawPreferences=activity.getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE);
  ServerPreferences prefs=new ServerPreferences();
  ServerPreferences.Host host=prefs.new Host();
  prefs.setHost(host);
  boolean success=true;
  if (nameView.getText().length() == 0) {
    success=false;
    AlertDialog.Builder b=new AlertDialog.Builder(activity);
    b.setMessage("String_Node_Str");
    b.setPositiveButton("String_Node_Str",null);
    b.show();
  }
 else {
    if (!nameView.getText().toString().equals(originalServerName) && ServerPreferences.serverNameExists(rawPreferences,nameView.getText().toString())) {
      success=false;
      AlertDialog.Builder b=new AlertDialog.Builder(activity);
      b.setMessage("String_Node_Str");
      b.setPositiveButton("String_Node_Str",null);
      b.show();
    }
 else     prefs.setName(nameView.getText().toString());
  }
  if (hostView.getText().length() == 0) {
    host.setHostname("String_Node_Str");
  }
 else {
    host.setHostname(hostView.getText().toString());
  }
  if (portView.getText().length() == 0) {
    host.setPort(6667);
  }
 else {
    host.setPort(Integer.parseInt(portView.getText().toString()));
  }
  if (passwordView.getText().length() == 0) {
    host.setPassword(null);
  }
 else {
    host.setPassword(passwordView.getText().toString());
  }
  host.isSSL(ssl.isChecked());
  host.verifySSL(verifyssl.isChecked());
  if (nickName.getText().length() == 0) {
    success=false;
    AlertDialog.Builder b=new AlertDialog.Builder(activity);
    b.setMessage("String_Node_Str");
    b.setPositiveButton("String_Node_Str",null);
    b.show();
  }
 else {
    ArrayList<String> nicks=new ArrayList<String>();
    for (    String s : nickName.getText().toString().split("String_Node_Str"))     nicks.add(s);
    prefs.setNicknames(nicks);
  }
  if (usernameView.getText().length() == 0) {
    prefs.setUsername("String_Node_Str");
  }
 else {
    prefs.setUsername(usernameView.getText().toString());
  }
  if (realnameView.getText().length() == 0) {
    prefs.setRealname("String_Node_Str");
  }
 else {
    prefs.setRealname(realnameView.getText().toString());
  }
  if (autoconnectCommands.getText().length() > 0) {
    ArrayList<String> commands=new ArrayList<String>();
    for (    String c : autoconnectCommands.getText().toString().split("String_Node_Str"))     commands.add(c);
    prefs.setAutoCommands(commands);
  }
  prefs.isAutoConnected(autoconnect.isChecked());
  prefs.isLogged(log.isChecked());
  if (success) {
    prefs.saveToSharedPreferences(rawPreferences);
    if (server != null && server.getServerInfo().getBot().isConnected())     moeService.disconnect(originalServerName);
    moeService.connect(prefs);
    d.dismiss();
  }
}