Buggy code:
public class UserService { private final Logger log = LoggerFactory . getLogger ( UserService . class ) ; public static final int FAMILY_INVITAION_EXPIRY_DAYS = 3 ; private Storage storage ; private MailService mailService ; public UserService ( Storage storage , MailService mailService ) { } public User ensureFacebookUser ( Facebook facebook ) throws FacebookException { } private User createFacebookUser ( facebook4j . User fbUser , String facebookPictureUrl ) { } public ServiceResponse createUser ( String username , String name , String email , Date birthDate , String gender , String password ) { } private User getUserByFacebookId ( String facebookId ) { } public User getUserById ( Long id ) { } public User getUserByUsername ( String username ) { } public Principal getPrincipalByEmail ( String email ) { } public boolean isValidPassword ( User thisUser , String password ) { } public boolean hasRole ( User user , String roleIdentifier ) { } public boolean hasEditorRole ( User user ) { } public User getLoggedInUserFromSession ( Request request ) { } public String toDatePickerValue ( Date date ) { if ( date == null ) { return "" ; } <START_BUG> return new SimpleDateFormat ( "yyyy-MM-dd" ) . format ( date ) ; <END_BUG> } public String formatBirthDate ( Date date ) { } public static int getAge ( Principal principal ) { } public static int getAgeThatYearOnTime ( Principal principal , Date startTime ) { } public static int getAgeAtEndOfYear ( Principal principal , int year ) { } public boolean isPrimaryContactCandidate ( Principal principal ) { } public boolean isOfAge ( Principal principal ) { } public boolean isOnlyPrincipal ( Principal principal ) { } public boolean isFacebookUser ( Principal principal ) { } public boolean isPrimaryContact ( Principal principal ) { } public void sendResetPasswordEmail ( User user ) { } public String generateResetPasswordCode ( User user ) { } public User getUserByResetPasswordCodeAndClear ( String code ) { } public boolean setPassword ( User user , String password ) { } public ServiceResponse updateProfile ( User user , String name , Date birthDate , String gender ) { } private void setPrincipalName ( String name , Principal principal ) { } public ServiceResponse updateAddress ( User user , String address1 , String address2 , String zip , String city , String country ) { } public ServiceResponse updateMobile ( User user , String mobile ) { } public ServiceResponse updateEmail ( User user , String email ) { } private void sendEmailVerification ( EmailAddress emailAddress ) { } public ServiceResponse addFamilyMember ( User user , String name , Date birthDate , String gender ) { } public Family ensureFamilyForUser ( User user ) { } public boolean verifyEmailAddressByCode ( String code ) { } public boolean hasValidEmail ( User user ) { } public boolean hasValidMobile ( User user ) { } public boolean hasValidAddress ( User user ) { } public ServiceResponse destroyPrincipal ( Principal principal ) { } public ServiceResponse setPrimaryPrincipal ( Principal principal , Family family ) { } public boolean isFamilyMember ( Family family , Principal principal ) { } public boolean isPendingFamilyMember ( Family family , Principal principal ) { } private boolean isFamilyInvitationExpired ( FamilyInvitation familyInvitation ) { } public ServiceResponse inviteFamilyMember ( Principal principal , Family family ) { } public List < FamilyInvitation > getFamilyInvitations ( Family family ) { } public List < FamilyInvitation > getInvitationsForPrincipal ( Principal principal ) { } public ServiceResponse acceptFamilyInvitation ( String code ) { } public Principal getPrincipalById ( Long id ) { } public List < String > checkUserProfileCompleteness ( User user ) { } public List < Family > getAllFamilies ( ) { } public ServiceResponse updateNoCombinedMembership ( User user , Boolean activeMembers ) { } No newline ; at end ; of file ; }

Fix:
return new SimpleDateFormat ( "dd.MM.yyyy" ) . format ( date ) ;