Program: 60633
Project: 60633
Buggy source:
/** 
 * Seta attribute names for a drop down chice list.
 * @param attrType attribute type.
 * @param toBeUpdated drop down choice to be updated.
 */
private void setAttrNames(final IntMappingType attrType,final AjaxDropDownChoicePanel toBeUpdated){
  toBeUpdated.setRequired(true);
  toBeUpdated.setEnabled(true);
  if (attrType == null || attrType.getEntity() == null) {
    toBeUpdated.setChoices(Collections.EMPTY_LIST);
  }
 else {
switch (attrType) {
case UserSchema:
case RoleSchema:
case MembershipSchema:
      toBeUpdated.setChoices(schemaRestClient.getSchemaNames(attrType.getEntity().toString().toLowerCase()));
    break;
case UserDerivedSchema:
case RoleDerivedSchema:
case MembershipDerivedSchema:
  toBeUpdated.setChoices(schemaRestClient.getDerivedSchemaNames(attrType.getEntity().toString().toLowerCase()));
break;
case UserVirtualSchema:
case RoleVirtualSchema:
case MembershipVirtualSchema:
toBeUpdated.setChoices(schemaRestClient.getVirtualSchemaNames(attrType.getEntity().toString().toLowerCase()));
break;
case SyncopeUserId:
toBeUpdated.setEnabled(false);
toBeUpdated.setRequired(false);
toBeUpdated.setChoices(Collections.EMPTY_LIST);
break;
case Password:
toBeUpdated.setEnabled(false);
toBeUpdated.setRequired(false);
toBeUpdated.setChoices(Collections.EMPTY_LIST);
break;
case Username:
toBeUpdated.setEnabled(false);
toBeUpdated.setRequired(false);
toBeUpdated.setChoices(Collections.EMPTY_LIST);
break;
default :
toBeUpdated.setRequired(false);
toBeUpdated.setEnabled(false);
toBeUpdated.setChoices(Collections.EMPTY_LIST);
}
}
}

Fixed version (ground truth):
/** 
 * Seta attribute names for a drop down chice list.
 * @param attrType attribute type.
 * @param toBeUpdated drop down choice to be updated.
 */
private void setAttrNames(final IntMappingType attrType,final AjaxDropDownChoicePanel toBeUpdated){
  toBeUpdated.setRequired(true);
  toBeUpdated.setEnabled(true);
  if (attrType == null || attrType.getAttributableType() == null) {
    toBeUpdated.setChoices(Collections.EMPTY_LIST);
  }
 else {
switch (attrType) {
case UserSchema:
case RoleSchema:
case MembershipSchema:
      toBeUpdated.setChoices(schemaRestClient.getSchemaNames(attrType.getAttributableType().toString().toLowerCase()));
    break;
case UserDerivedSchema:
case RoleDerivedSchema:
case MembershipDerivedSchema:
  toBeUpdated.setChoices(schemaRestClient.getDerivedSchemaNames(attrType.getAttributableType().toString().toLowerCase()));
break;
case UserVirtualSchema:
case RoleVirtualSchema:
case MembershipVirtualSchema:
toBeUpdated.setChoices(schemaRestClient.getVirtualSchemaNames(attrType.getAttributableType().toString().toLowerCase()));
break;
case SyncopeUserId:
toBeUpdated.setEnabled(false);
toBeUpdated.setRequired(false);
toBeUpdated.setChoices(Collections.EMPTY_LIST);
break;
case Password:
toBeUpdated.setEnabled(false);
toBeUpdated.setRequired(false);
toBeUpdated.setChoices(Collections.EMPTY_LIST);
break;
case Username:
toBeUpdated.setEnabled(false);
toBeUpdated.setRequired(false);
toBeUpdated.setChoices(Collections.EMPTY_LIST);
break;
default :
toBeUpdated.setRequired(false);
toBeUpdated.setEnabled(false);
toBeUpdated.setChoices(Collections.EMPTY_LIST);
}
}
}