Program: 178339
Project: 178339
Buggy source:
@Override public void onClick(View v){
  String mMessage;
switch (v.getId()) {
case R.id.new_poi_ui_btn_save:
    if (V_LOG) {
      Log.v(TAG,"String_Node_Str");
    }
  TextView mView=(TextView)findViewById(R.id.new_poi_ui_txt_title);
if (TextUtils.isEmpty(mView.getText()) == true) {
  Toast.makeText(this,R.string.new_poi_toast_title_missing,Toast.LENGTH_SHORT).show();
  mView.requestFocus();
  return;
}
if (mView.getText().length() > MAX_TITLE_CHARACTERS) {
mMessage=getString(R.string.new_poi_toast_title_too_long);
Toast.makeText(this,String.format(mMessage,MAX_TITLE_CHARACTERS),Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
String mTitle=mView.getText().toString();
mView=(TextView)findViewById(R.id.new_poi_ui_txt_description);
if (TextUtils.isEmpty(mView.getText()) == true) {
Toast.makeText(this,R.string.new_poi_toast_description_missing,Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
if (mView.getText().length() > MAX_DESCRIPTION_CHARACTERS) {
mMessage=getString(R.string.new_poi_toast_description_too_long);
Toast.makeText(this,String.format(mMessage,MAX_DESCRIPTION_CHARACTERS),Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
String mDescription=mView.getText().toString();
mView=(TextView)findViewById(R.id.new_poi_ui_txt_latitude);
if (TextUtils.isEmpty(mView.getText()) == true) {
Toast.makeText(this,R.string.new_poi_toast_latitude_missing,Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
try {
latitude=Double.parseDouble(mView.getText().toString());
}
 catch (NumberFormatException e) {
Toast.makeText(this,R.string.new_poi_toast_latitude_missing,Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
mView=(TextView)findViewById(R.id.new_poi_ui_txt_longitude);
if (TextUtils.isEmpty(mView.getText()) == true) {
Toast.makeText(this,R.string.new_poi_toast_longitude_missing,Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
try {
longitude=Double.parseDouble(mView.getText().toString());
}
 catch (NumberFormatException e) {
Toast.makeText(this,R.string.new_poi_toast_longitude_missing,Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
addNewPoi(mTitle,mDescription);
finish();
}
}

Fixed version (ground truth):
@Override public void onClick(View v){
  String mMessage;
switch (v.getId()) {
case R.id.new_poi_ui_btn_save:
    if (V_LOG) {
      Log.v(TAG,"String_Node_Str");
    }
  TextView mView=(TextView)findViewById(R.id.new_poi_ui_txt_title);
if (TextUtils.isEmpty(mView.getText()) == true) {
  Toast.makeText(this,R.string.new_poi_toast_title_missing,Toast.LENGTH_SHORT).show();
  mView.requestFocus();
  return;
}
if (mView.getText().length() > MAX_TITLE_CHARACTERS) {
mMessage=getString(R.string.new_poi_toast_title_too_long);
Toast.makeText(this,String.format(mMessage,MAX_TITLE_CHARACTERS),Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
String mTitle=mView.getText().toString();
mView=(TextView)findViewById(R.id.new_poi_ui_txt_description);
if (TextUtils.isEmpty(mView.getText()) == true) {
Toast.makeText(this,R.string.new_poi_toast_description_missing,Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
if (mView.getText().length() > MAX_DESCRIPTION_CHARACTERS) {
mMessage=getString(R.string.new_poi_toast_description_too_long);
Toast.makeText(this,String.format(mMessage,MAX_DESCRIPTION_CHARACTERS),Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
String mDescription=mView.getText().toString();
mView=(TextView)findViewById(R.id.new_poi_ui_txt_latitude);
if (TextUtils.isEmpty(mView.getText()) == true) {
Toast.makeText(this,R.string.new_poi_toast_latitude_missing,Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
try {
latitude=Double.parseDouble(mView.getText().toString());
}
 catch (NumberFormatException e) {
Toast.makeText(this,R.string.new_poi_toast_latitude_missing,Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
mView=(TextView)findViewById(R.id.new_poi_ui_txt_longitude);
if (TextUtils.isEmpty(mView.getText()) == true) {
Toast.makeText(this,R.string.new_poi_toast_longitude_missing,Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
try {
longitude=Double.parseDouble(mView.getText().toString());
}
 catch (NumberFormatException e) {
Toast.makeText(this,R.string.new_poi_toast_longitude_missing,Toast.LENGTH_SHORT).show();
mView.requestFocus();
return;
}
if (addNewPoi(mTitle,mDescription) == true) {
finish();
}
}
}