Program: 112532
Project: 112532
Buggy source:
private void setMeasurement(String name,String email){
  person=new Person(email,name,spnGender.getSelectedItemPosition());
  int personID=PersonManager.getInstance(this.getApplicationContext()).getPerson(person);
  if (personID == -1) {
    PersonManager.getInstance(this).addPerson(person);
    personID=PersonManager.getInstance(this.getApplicationContext()).getPerson(person);
  }
  System.out.println(personID);
  person.setID(personID);
  String userID=UserManager.getInstance(this).getCurrent();
  System.out.println(userID + "String_Node_Str");
  if (userID != null) {
    System.out.println(userID + "String_Node_Str");
    measurement=new Measurement(getID(),userID,person.getID(),spnUnits.getSelectedItemPosition());
    SimpleDateFormat dateformat=new SimpleDateFormat("String_Node_Str");
    String dateText="String_Node_Str";
    try {
      Date date=new Date();
      dateText=dateformat.format(date);
      System.out.println("String_Node_Str" + dateText);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    measurement.setCreated(dateText);
    if (userID.equals("String_Node_Str")) {
      dialog("String_Node_Str","String_Node_Str");
    }
 else {
      closer();
    }
  }
 else {
    System.out.println("String_Node_Str");
    Log.d("String_Node_Str","String_Node_Str");
    measurement=new Measurement(getID(),"String_Node_Str",person.getID(),spnUnits.getSelectedItemPosition());
    SimpleDateFormat dateformat=new SimpleDateFormat("String_Node_Str");
    String dateText="String_Node_Str";
    try {
      Date date=new Date();
      dateText=dateformat.format(date);
      System.out.println("String_Node_Str" + dateText);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    measurement.setCreated(dateText);
    dialog("String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
private void setMeasurement(String name,String email){
  person=new Person(email,name,spnGender.getSelectedItemPosition());
  int personID=PersonManager.getInstance(this.getApplicationContext()).getPerson(person);
  if (personID == -1) {
    PersonManager.getInstance(this).addPerson(person);
    personID=PersonManager.getInstance(this.getApplicationContext()).getPerson(person);
  }
  System.out.println(personID);
  person.setID(personID);
  String userID=UserManager.getInstance(this).getCurrent();
  System.out.println(userID + "String_Node_Str");
  if (userID != null) {
    System.out.println(userID + "String_Node_Str");
    measurement=new Measurement(getID(),userID,person.getID(),spnUnits.getSelectedItemPosition());
    SimpleDateFormat dateformat=new SimpleDateFormat("String_Node_Str");
    String dateText="String_Node_Str";
    try {
      Date date=new Date();
      dateText=dateformat.format(date);
      System.out.println("String_Node_Str" + dateText);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    measurement.setCreated(dateText);
    closer();
  }
 else {
    System.out.println("String_Node_Str");
    Log.d("String_Node_Str","String_Node_Str");
    measurement=new Measurement(getID(),"String_Node_Str",person.getID(),spnUnits.getSelectedItemPosition());
    SimpleDateFormat dateformat=new SimpleDateFormat("String_Node_Str");
    String dateText="String_Node_Str";
    try {
      Date date=new Date();
      dateText=dateformat.format(date);
      System.out.println("String_Node_Str" + dateText);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    measurement.setCreated(dateText);
    closer();
  }
}