Program: 152731
Project: 152731
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Bundle extras=getIntent().getExtras();
  LoginSet loginSet=new LoginSet(extras.getString(LoginSetConstants.nameKey),extras.getString(LoginSetConstants.serverUrlKey),extras.getString(LoginSetConstants.schoolKey),extras.getString(LoginSetConstants.usernameKey),extras.getString(LoginSetConstants.passwordKey),extras.getBoolean(LoginSetConstants.sslOnlyKey));
  oldName=new String(loginSet.getName());
  oldServerUrl=new String(loginSet.getServerUrl());
  oldSchool=new String(loginSet.getSchool());
  initInputFields(loginSet.getName(),loginSet.getServerUrl(),loginSet.getSchool(),loginSet.getPassword(),loginSet.getPassword(),loginSet.isSslOnly());
  setOnButtonClickListener(new Button.OnClickListener(){
    @Override public void onClick(    View v){
      if (requiredDataEntered()) {
        Intent intent=new Intent();
        intent.putExtra(LOGIN_SET_EDIT_NAME_KEY,getNameInput());
        intent.putExtra(LOGIN_SET_EDIT_SERVER_URL_KEY,getServerUrlInput());
        intent.putExtra(LOGIN_SET_EDIT_SCHOOL_KEY,getSchoolInput());
        intent.putExtra(LOGIN_SET_EDIT_USERNAME_KEY,getUsernameInput());
        intent.putExtra(LOGIN_SET_EDIT_PASSWORD_KEY,getPasswordInput());
        intent.putExtra(LOGIN_SET_EDIT_SSL_ONLY_KEY,isSslOnly());
        intent.putExtra(LOGIN_SET_EDIT_OLD_NAME_KEY,getOldName());
        intent.putExtra(LOGIN_SET_EDIT_OLD_SERVER_URL_KEY,getOldServerUrl());
        intent.putExtra(LOGIN_SET_EDIT_OLD_SCHOOL_KEY,getOldSchool());
        setResult(RESULT_OK,intent);
        finish();
      }
 else {
        showToastMessage(getString(R.string.error_login_set_information_missing));
      }
    }
  }
);
  setBackButtonText(getString(R.string.login_set_edit_exit));
  setNextButtonText(getString(R.string.login_set_edit_save));
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Bundle extras=getIntent().getExtras();
  LoginSet loginSet=new LoginSet(extras.getString(LoginSetConstants.nameKey),extras.getString(LoginSetConstants.serverUrlKey),extras.getString(LoginSetConstants.schoolKey),extras.getString(LoginSetConstants.usernameKey),extras.getString(LoginSetConstants.passwordKey),extras.getBoolean(LoginSetConstants.sslOnlyKey));
  oldName=new String(loginSet.getName());
  oldServerUrl=new String(loginSet.getServerUrl());
  oldSchool=new String(loginSet.getSchool());
  initInputFields(loginSet.getName(),loginSet.getServerUrl(),loginSet.getSchool(),loginSet.getUsername(),loginSet.getPassword(),loginSet.isSslOnly());
  setOnButtonClickListener(new Button.OnClickListener(){
    @Override public void onClick(    View v){
      if (requiredDataEntered()) {
        Intent intent=new Intent();
        intent.putExtra(LOGIN_SET_EDIT_NAME_KEY,getNameInput());
        intent.putExtra(LOGIN_SET_EDIT_SERVER_URL_KEY,getServerUrlInput());
        intent.putExtra(LOGIN_SET_EDIT_SCHOOL_KEY,getSchoolInput());
        intent.putExtra(LOGIN_SET_EDIT_USERNAME_KEY,getUsernameInput());
        intent.putExtra(LOGIN_SET_EDIT_PASSWORD_KEY,getPasswordInput());
        intent.putExtra(LOGIN_SET_EDIT_SSL_ONLY_KEY,isSslOnly());
        intent.putExtra(LOGIN_SET_EDIT_OLD_NAME_KEY,getOldName());
        intent.putExtra(LOGIN_SET_EDIT_OLD_SERVER_URL_KEY,getOldServerUrl());
        intent.putExtra(LOGIN_SET_EDIT_OLD_SCHOOL_KEY,getOldSchool());
        setResult(RESULT_OK,intent);
        finish();
      }
 else {
        showToastMessage(getString(R.string.error_login_set_information_missing));
      }
    }
  }
);
  setBackButtonText(getString(R.string.login_set_edit_exit));
  setNextButtonText(getString(R.string.login_set_edit_save));
}