Buggy code:
public class UserDetail implements Serializable , Comparable < UserDetail > { private static final long serialVersionUID = - 109886153681824159L ; private static final String ANONYMOUS_ID_PROPERTY = "anonymousId" ; private static final String AVATAR_PROPERTY = GeneralPropertiesManager . getString ( "avatar.property" , "login" ) ; private static final String AVATAR_EXTENSION = GeneralPropertiesManager . getString ( "avatar.extension" , "jpg" ) ; private static final ResourceLocator generalSettings = new ResourceLocator ( "org.silverpeas.lookAndFeel.generalLook" , "" ) ; private String id = null ; private String specificId = null ; private String domainId = null ; private String login = null ; private String firstName = "" ; private String lastName = "" ; private String eMail = "" ; private UserAccessLevel accessLevel = UserAccessLevel . from ( null ) ; private String loginQuestion = "" ; private String loginAnswer = "" ; private Date creationDate = null ; private Date saveDate = null ; private int version = 0 ; private Date tosAcceptanceDate = null ; private Date lastLoginDate = null ; private int nbSuccessfulLoginAttempts = 0 ; private Date lastLoginCredentialUpdateDate = null ; private Date expirationDate = null ; private UserState state = UserState . from ( null ) ; private Date stateSaveDate = null ; public static UserDetail getById ( String userId ) { } public static List < UserDetail > getAll ( ) { } public static List < UserDetail > getAllInDomain ( String domainId ) { } public UserDetail ( ) { } public UserDetail ( UserDetail toClone ) { } public String getLoginQuestion ( ) { } public void setLoginQuestion ( String loginQuestion ) { } public String getLoginAnswer ( ) { } public void setLoginAnswer ( String loginAnswer ) { } public Date getTosAcceptanceDate ( ) { } public void setTosAcceptanceDate ( final Date tosAcceptanceDate ) { } public Date getLastLoginDate ( ) { } public void setLastLoginDate ( final Date lastLoginDate ) { } public int getNbSuccessfulLoginAttempts ( ) { } public void setNbSuccessfulLoginAttempts ( final int nbSuccessfulLoginAttempts ) { } public Date getLastLoginCredentialUpdateDate ( ) { } public void setLastLoginCredentialUpdateDate ( final Date lastLoginCredentialUpdateDate ) { } public Date getExpirationDate ( ) { } public void setExpirationDate ( final Date expirationDate ) { } public UserState getState ( ) { } public void setState ( final UserState state ) { } public Date getCreationDate ( ) { } public void setCreationDate ( final Date creationDate ) { } public Date getSaveDate ( ) { } public void setSaveDate ( final Date saveDate ) { } public int getVersion ( ) { } public void setVersion ( final int version ) { } public Date getStateSaveDate ( ) { } public void setStateSaveDate ( final Date stateSaveDate ) { } public String getId ( ) { } public void setId ( String id ) { } public String getSpecificId ( ) { } public void setSpecificId ( String specificId ) { } public String getDomainId ( ) { } public void setDomainId ( String domainId ) { } public String getLogin ( ) { } public void setLogin ( String login ) { } public String getFirstName ( ) { } public void setFirstName ( String firstName ) { } public String getLastName ( ) { } public void setLastName ( String sLastName ) { } public void seteMail ( String seMail ) { } public String geteMail ( ) { } public UserAccessLevel getAccessLevel ( ) { } public void setAccessLevel ( UserAccessLevel accessLevel ) { } public Domain getDomain ( ) { } public boolean isDomainRestricted ( ) { } public boolean isDomainAdminRestricted ( ) { } public boolean isBackOfficeVisible ( ) { } public boolean isAccessAdmin ( ) { } public boolean isAccessDomainManager ( ) { } public boolean isAccessSpaceManager ( ) { } public boolean isAccessPdcManager ( ) { } public boolean isAccessUser ( ) { } public boolean isAccessGuest ( ) { } public boolean isValidState ( ) { } public boolean isDeletedState ( ) { } public boolean isBlockedState ( ) { } public boolean isExpiredState ( ) { } public boolean isAnonymous ( ) { <START_BUG> return getId ( ) . equals ( UserDetail . getAnonymousUserId ( ) ) ; <END_BUG> } public static UserDetail getAnonymousUser ( ) { } public String getDisplayedName ( ) { } @ Override public boolean equals ( Object other ) { } @ Override public int hashCode ( ) { } public void traceUser ( ) { } @ Override public int compareTo ( UserDetail o ) { } public String getAvatar ( ) { } public boolean isAvatarPersonnalized ( ) { } public String getAvatarFileName ( ) { } public String getStatus ( ) { } public final UserPreferences getUserPreferences ( ) { } public boolean isConnected ( ) { } public static boolean isAnonymousUserExist ( ) { } public static boolean isAnonymousUser ( String userId ) { } public boolean isFullyDefined ( ) { } protected static String getAnonymousUserId ( ) { } protected static OrganisationController getOrganisationController ( ) { } }

Fix:
return ( ( getId ( ) ) != null ) && ( getId ( ) . equals ( UserDetail . getAnonymousUserId ( ) ) ) ;