Program: 141640
Project: 141640
Buggy source:
/** 
 * Create contact from Outlook.
 */
public Contact(String strUid,String strEntryID,String strTitle,String strFirstName,String strMiddleName,String strLastName,String strSuffix,String strCompanyName,String strJobTitle,String strEmail1Address,String strEmail2Address,String strEmail3Address,String strWebPage,String strMobileTelephoneNumber,String strAssistantTelephoneNumber,String strCallbackTelephoneNumber,String strCarTelephoneNumber,String strCompanyMainTelephoneNumber,String strOtherTelephoneNumber,String strPrimaryTelephoneNumber,String strRadioTelephoneNumber,String strTTYTDDTelephoneNumber,String strBusinessTelephoneNumber,String strBusiness2TelephoneNumber,String strBusinessFaxNumber,String strHomeTelephoneNumber,String strHome2TelephoneNumber,String strHomeFaxNumber,String strHomeAddressCity,String strHomeAddressCountry,String strHomeAddressPostalCode,String strHomeAddressState,String strHomeAddressStreet,String strBusinessAddressCity,String strBusinessAddressCountry,String strBusinessAddressPostalCode,String strBusinessAddressState,String strBusinessAddressStreet,String strBody,Calendar calBirthday,Calendar calAnniversary,String strPathToTmpPicture,String strLastModificationTime){
  this.statusConntact=Status.READIN;
  this.vcard=new VCard();
  if (strUid.isEmpty()) {
    this.vcard.setUid(Uid.random());
    this.statusConntact=Status.UIDADDED;
  }
 else {
    this.vcard.setUid(new Uid(strUid.trim()));
  }
  this.strUid=this.vcard.getUid().getValue();
  this.strFileOnDavServer=null;
  if (strEntryID.length() > 0) {
    this.strEntryID=strEntryID;
  }
  if (strTitle.length() > 0 || strFirstName.length() > 0 || strMiddleName.length() > 0 || strLastName.length() > 0 || strSuffix.length() > 0) {
    StructuredName sn=new StructuredName();
    sn.addPrefix(strTitle);
    sn.setGiven(strFirstName);
    sn.addAdditional(strMiddleName);
    sn.setFamily(strLastName);
    sn.addSuffix(strSuffix);
    this.vcard.setStructuredName(sn);
  }
  if (strCompanyName.length() > 0) {
    Organization org=new Organization();
    org.addValue(strCompanyName);
    this.vcard.setOrganization(org);
  }
  if (strJobTitle.length() > 0) {
    this.vcard.addTitle(new Title(strJobTitle));
  }
  if (strEmail1Address.length() > 0) {
    Email email=new Email(strEmail1Address);
    email.addType(EmailType.HOME);
    this.vcard.addEmail(email);
  }
  if (strEmail2Address.length() > 0) {
    Email email=new Email(strEmail2Address);
    email.addType(EmailType.WORK);
    this.vcard.addEmail(email);
  }
  if (strEmail3Address.length() > 0) {
    Email email=new Email(strEmail3Address);
    email.addType(EmailType.INTERNET);
    this.vcard.addEmail(email);
  }
  if (strWebPage.length() > 0) {
    this.vcard.addUrl(new Url(strWebPage));
  }
  if (strMobileTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strMobileTelephoneNumber);
    tel.addType(TelephoneType.CELL);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strAssistantTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strAssistantTelephoneNumber);
    tel.addType(TelephoneType.BBS);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strCallbackTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strCallbackTelephoneNumber);
    tel.addType(TelephoneType.MODEM);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strCarTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strCarTelephoneNumber);
    tel.addType(TelephoneType.PAGER);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strCompanyMainTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strCompanyMainTelephoneNumber);
    tel.addType(TelephoneType.PCS);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strOtherTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strOtherTelephoneNumber);
    tel.addType(TelephoneType.PREF);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strPrimaryTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strPrimaryTelephoneNumber);
    tel.addType(TelephoneType.VIDEO);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strRadioTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strRadioTelephoneNumber);
    tel.addType(TelephoneType.VOICE);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strTTYTDDTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strTTYTDDTelephoneNumber);
    tel.addType(TelephoneType.TEXT);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strBusinessTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strBusinessTelephoneNumber);
    tel.addType(TelephoneType.WORK);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strBusiness2TelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strBusiness2TelephoneNumber);
    tel.addType(TelephoneType.CAR);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strBusinessFaxNumber.length() > 0) {
    Telephone tel=new Telephone(strBusinessFaxNumber);
    tel.addType(TelephoneType.FAX);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strHomeTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strHomeTelephoneNumber);
    tel.addType(TelephoneType.HOME);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strHome2TelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strHome2TelephoneNumber);
    tel.addType(TelephoneType.ISDN);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strHomeFaxNumber.length() > 0) {
    Telephone tel=new Telephone(strHomeFaxNumber);
    tel.addType(TelephoneType.MSG);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strHomeAddressStreet.length() > 0 || strHomeAddressCity.length() > 0 || strHomeAddressState.length() > 0 || strHomeAddressPostalCode.length() > 0 || strHomeAddressCountry.length() > 0) {
    Address adr=new Address();
    adr.setStreetAddress(strHomeAddressStreet);
    adr.setLocality(strHomeAddressCity);
    adr.setRegion(strHomeAddressState);
    adr.setPostalCode(strHomeAddressPostalCode);
    adr.setCountry(strHomeAddressCountry);
    adr.addType(AddressType.HOME);
    this.vcard.addAddress(adr);
  }
  if (strBusinessAddressStreet.length() > 0 || strBusinessAddressCity.length() > 0 || strBusinessAddressState.length() > 0 || strBusinessAddressPostalCode.length() > 0 || strBusinessAddressCountry.length() > 0) {
    Address adr=new Address();
    adr.setStreetAddress(strBusinessAddressStreet);
    adr.setLocality(strBusinessAddressCity);
    adr.setRegion(strBusinessAddressState);
    adr.setPostalCode(strBusinessAddressPostalCode);
    adr.setCountry(strBusinessAddressCountry);
    adr.addType(AddressType.WORK);
    this.vcard.addAddress(adr);
  }
  if (strBody.length() > 0) {
    Note note=new Note(strBody);
    this.vcard.addNote(note);
  }
  if (calBirthday != null) {
    this.vcard.setBirthday(new Birthday(calBirthday.getTime()));
  }
  if (calAnniversary != null) {
    this.vcard.setAnniversary(new Anniversary(calAnniversary.getTime()));
  }
  if (strPathToTmpPicture != null) {
    this.strPathToContactPicture=strPathToTmpPicture;
    File tmpFile=new File(this.strPathToContactPicture);
    if (tmpFile.exists()) {
      try {
        this.vcard.addPhoto(new Photo(Files.readAllBytes(tmpFile.toPath()),ImageType.JPEG));
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
  try {
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str",Locale.ENGLISH);
    this.dateLastModificationTme=sdf.parse(strLastModificationTime);
  }
 catch (  ParseException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Create contact from Outlook.
 */
public Contact(String strUid,String strEntryID,String strTitle,String strFirstName,String strMiddleName,String strLastName,String strSuffix,String strCompanyName,String strJobTitle,String strEmail1Address,String strEmail2Address,String strEmail3Address,String strWebPage,String strMobileTelephoneNumber,String strAssistantTelephoneNumber,String strCallbackTelephoneNumber,String strCarTelephoneNumber,String strCompanyMainTelephoneNumber,String strOtherTelephoneNumber,String strPrimaryTelephoneNumber,String strRadioTelephoneNumber,String strTTYTDDTelephoneNumber,String strBusinessTelephoneNumber,String strBusiness2TelephoneNumber,String strBusinessFaxNumber,String strHomeTelephoneNumber,String strHome2TelephoneNumber,String strHomeFaxNumber,String strHomeAddressCity,String strHomeAddressCountry,String strHomeAddressPostalCode,String strHomeAddressState,String strHomeAddressStreet,String strBusinessAddressCity,String strBusinessAddressCountry,String strBusinessAddressPostalCode,String strBusinessAddressState,String strBusinessAddressStreet,String strBody,Calendar calBirthday,Calendar calAnniversary,String strPathToTmpPicture,String strLastModificationTime){
  this.statusConntact=Status.READIN;
  this.vcard=new VCard();
  if (strUid.isEmpty())   strUid=LegacyCorrectionUtilities.getBodyUID(strBody);
  if (strUid.isEmpty()) {
    this.vcard.setUid(Uid.random());
    this.statusConntact=Status.UIDADDED;
  }
 else {
    this.vcard.setUid(new Uid(strUid.trim()));
  }
  this.strUid=this.vcard.getUid().getValue();
  this.strFileOnDavServer=null;
  if (strEntryID.length() > 0) {
    this.strEntryID=strEntryID;
  }
  if (strTitle.length() > 0 || strFirstName.length() > 0 || strMiddleName.length() > 0 || strLastName.length() > 0 || strSuffix.length() > 0) {
    StructuredName sn=new StructuredName();
    sn.addPrefix(strTitle);
    sn.setGiven(strFirstName);
    sn.addAdditional(strMiddleName);
    sn.setFamily(strLastName);
    sn.addSuffix(strSuffix);
    this.vcard.setStructuredName(sn);
  }
  if (strCompanyName.length() > 0) {
    Organization org=new Organization();
    org.addValue(strCompanyName);
    this.vcard.setOrganization(org);
  }
  if (strJobTitle.length() > 0) {
    this.vcard.addTitle(new Title(strJobTitle));
  }
  if (strEmail1Address.length() > 0) {
    Email email=new Email(strEmail1Address);
    email.addType(EmailType.HOME);
    this.vcard.addEmail(email);
  }
  if (strEmail2Address.length() > 0) {
    Email email=new Email(strEmail2Address);
    email.addType(EmailType.WORK);
    this.vcard.addEmail(email);
  }
  if (strEmail3Address.length() > 0) {
    Email email=new Email(strEmail3Address);
    email.addType(EmailType.INTERNET);
    this.vcard.addEmail(email);
  }
  if (strWebPage.length() > 0) {
    this.vcard.addUrl(new Url(strWebPage));
  }
  if (strMobileTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strMobileTelephoneNumber);
    tel.addType(TelephoneType.CELL);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strAssistantTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strAssistantTelephoneNumber);
    tel.addType(TelephoneType.BBS);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strCallbackTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strCallbackTelephoneNumber);
    tel.addType(TelephoneType.MODEM);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strCarTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strCarTelephoneNumber);
    tel.addType(TelephoneType.PAGER);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strCompanyMainTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strCompanyMainTelephoneNumber);
    tel.addType(TelephoneType.PCS);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strOtherTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strOtherTelephoneNumber);
    tel.addType(TelephoneType.PREF);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strPrimaryTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strPrimaryTelephoneNumber);
    tel.addType(TelephoneType.VIDEO);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strRadioTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strRadioTelephoneNumber);
    tel.addType(TelephoneType.VOICE);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strTTYTDDTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strTTYTDDTelephoneNumber);
    tel.addType(TelephoneType.TEXT);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strBusinessTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strBusinessTelephoneNumber);
    tel.addType(TelephoneType.WORK);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strBusiness2TelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strBusiness2TelephoneNumber);
    tel.addType(TelephoneType.CAR);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strBusinessFaxNumber.length() > 0) {
    Telephone tel=new Telephone(strBusinessFaxNumber);
    tel.addType(TelephoneType.FAX);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strHomeTelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strHomeTelephoneNumber);
    tel.addType(TelephoneType.HOME);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strHome2TelephoneNumber.length() > 0) {
    Telephone tel=new Telephone(strHome2TelephoneNumber);
    tel.addType(TelephoneType.ISDN);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strHomeFaxNumber.length() > 0) {
    Telephone tel=new Telephone(strHomeFaxNumber);
    tel.addType(TelephoneType.MSG);
    this.vcard.addTelephoneNumber(tel);
  }
  if (strHomeAddressStreet.length() > 0 || strHomeAddressCity.length() > 0 || strHomeAddressState.length() > 0 || strHomeAddressPostalCode.length() > 0 || strHomeAddressCountry.length() > 0) {
    Address adr=new Address();
    adr.setStreetAddress(strHomeAddressStreet);
    adr.setLocality(strHomeAddressCity);
    adr.setRegion(strHomeAddressState);
    adr.setPostalCode(strHomeAddressPostalCode);
    adr.setCountry(strHomeAddressCountry);
    adr.addType(AddressType.HOME);
    this.vcard.addAddress(adr);
  }
  if (strBusinessAddressStreet.length() > 0 || strBusinessAddressCity.length() > 0 || strBusinessAddressState.length() > 0 || strBusinessAddressPostalCode.length() > 0 || strBusinessAddressCountry.length() > 0) {
    Address adr=new Address();
    adr.setStreetAddress(strBusinessAddressStreet);
    adr.setLocality(strBusinessAddressCity);
    adr.setRegion(strBusinessAddressState);
    adr.setPostalCode(strBusinessAddressPostalCode);
    adr.setCountry(strBusinessAddressCountry);
    adr.addType(AddressType.WORK);
    this.vcard.addAddress(adr);
  }
  if (strBody.length() > 0) {
    Note note=new Note(strBody);
    this.vcard.addNote(note);
  }
  if (calBirthday != null) {
    this.vcard.setBirthday(new Birthday(calBirthday.getTime()));
  }
  if (calAnniversary != null) {
    this.vcard.setAnniversary(new Anniversary(calAnniversary.getTime()));
  }
  if (strPathToTmpPicture != null) {
    this.strPathToContactPicture=strPathToTmpPicture;
    File tmpFile=new File(this.strPathToContactPicture);
    if (tmpFile.exists()) {
      try {
        this.vcard.addPhoto(new Photo(Files.readAllBytes(tmpFile.toPath()),ImageType.JPEG));
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
  try {
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str",Locale.ENGLISH);
    this.dateLastModificationTme=sdf.parse(strLastModificationTime);
  }
 catch (  ParseException e) {
    e.printStackTrace();
  }
}