Program: 69897
Project: 69897
Buggy source:
/** 
 * loops over all PolicyWrappers and updates the datamodel according to the current form-values
 */
protected void secureListBox(){
  if (isLogDebugEnabled())   logDebug("String_Node_Str",null);
  for (  PolicyWrapper policyWrapper : policyWrappers) {
    TextBoxListElement userList=policyWrapper.getUserListBox();
    if (userList != null) {
      List<String> values=userList.getValueList();
      List<Identity> identities=new ArrayList<Identity>();
      for (      String value : values) {
        Identity id=getIdentityByLogin(value);
        if (id != null) {
          identities.add(id);
        }
      }
      policyWrapper.setIdentities(identities);
    }
    TextBoxListElement groupListBox=policyWrapper.getGroupListBox();
    if (groupListBox != null) {
      List<String> values=groupListBox.getValueList();
      List<BusinessGroup> selectedGroups=new ArrayList<BusinessGroup>();
      for (      BusinessGroup group : groupList) {
        if (values.contains(group.getKey().toString())) {
          selectedGroups.add(group);
        }
      }
      policyWrapper.setGroups(selectedGroups);
    }
    TextElement firstNameEl=policyWrapper.getFirstNameEl();
    if (firstNameEl != null) {
      policyWrapper.getInvitation().setFirstName(firstNameEl.getValue());
    }
    TextElement lastNameEl=policyWrapper.getLastNameEl();
    if (lastNameEl != null) {
      policyWrapper.getInvitation().setLastName(lastNameEl.getValue());
    }
    TextElement mailEl=policyWrapper.getMailEl();
    if (mailEl != null) {
      policyWrapper.getInvitation().setMail(mailEl.getValue());
    }
    policyWrapper.setFrom(policyWrapper.getFromChooser().getDate());
    policyWrapper.setTo(policyWrapper.getToChooser().getDate());
  }
}

Fixed version (ground truth):
/** 
 * loops over all PolicyWrappers and updates the datamodel according to the current form-values
 */
protected void secureListBox(){
  if (isLogDebugEnabled())   logDebug("String_Node_Str",null);
  for (  PolicyWrapper policyWrapper : policyWrappers) {
    TextBoxListElement userList=policyWrapper.getUserListBox();
    if (userList != null) {
      List<String> values=userList.getValueList();
      List<Identity> identities=new ArrayList<Identity>();
      for (      String value : values) {
        Identity id=getIdentityByLogin(value);
        if (id != null) {
          identities.add(id);
        }
      }
      policyWrapper.setIdentities(identities);
    }
    TextBoxListElement groupListBox=policyWrapper.getGroupListBox();
    if (groupListBox != null) {
      List<String> values=groupListBox.getValueList();
      List<BusinessGroup> selectedGroups=new ArrayList<BusinessGroup>();
      for (      BusinessGroup group : groupList) {
        if (values.contains(group.getKey().toString())) {
          selectedGroups.add(group);
        }
      }
      policyWrapper.setGroups(selectedGroups);
    }
    TextElement firstNameEl=policyWrapper.getFirstNameEl();
    if (firstNameEl != null) {
      policyWrapper.getInvitation().setFirstName(firstNameEl.getValue());
    }
    TextElement lastNameEl=policyWrapper.getLastNameEl();
    if (lastNameEl != null) {
      policyWrapper.getInvitation().setLastName(lastNameEl.getValue());
    }
    TextElement mailEl=policyWrapper.getMailEl();
    if (mailEl != null) {
      policyWrapper.getInvitation().setMail(mailEl.getValue());
    }
    if (policyWrapper.getFromChooser() != null) {
      policyWrapper.setFrom(policyWrapper.getFromChooser().getDate());
    }
    if (policyWrapper.getToChooser() != null) {
      policyWrapper.setTo(policyWrapper.getToChooser().getDate());
    }
  }
}