Buggy code:
public class UserDAOImpl implements BaseDAO < User > , UserDAO { private PreparedStatement ps = null ; private ResultSet rs ; private static Logger logger = Log . init ( "UserDAOImpl" ) ; private ConnectionManager connection = null ; public UserDAOImpl ( ) { } public UserDAOImpl ( ConnectionManager conn ) { } public String create ( User object ) { } public void update ( User object ) { Address newAddress = object . getAddress ( ) ; AddressDAOImpl addressDAO = new AddressDAOImpl ( ) ; String addressUuid = "" ; if ( ( ( newAddress . getUuid ( ) ) == null ) || ( newAddress . getUuid ( ) . isEmpty ( ) ) ) { addressUuid = addressDAO . create ( newAddress ) ; } else { addressUuid = newAddress . getUuid ( ) ; addressDAO . update ( newAddress ) ; } String avatar = "" ; if ( ( ( object . getAvatar ( ) ) == null ) || ( object . getAvatar ( ) . isEmpty ( ) ) ) { User userFromDB = readByKey ( object . getUuid ( ) ) ; avatar = userFromDB . getAvatar ( ) ; } else { avatar = object . getAvatar ( ) ; } try ( Connection conn = connection . getConnection ( ) ) { try { conn . setAutoCommit ( false ) ; ps = conn . prepareStatement ( ( "update<seq2seq4repair_space>user_card<seq2seq4repair_space>set<seq2seq4repair_space>first_name=?," + ( "<seq2seq4repair_space>second_name=?,<seq2seq4repair_space>address_id=?,<seq2seq4repair_space>e_mail=?,<seq2seq4repair_space>password=?,<seq2seq4repair_space>sex=?," + "<seq2seq4repair_space>date_of_birth=CAST(?<seq2seq4repair_space>AS<seq2seq4repair_space>DATE),<seq2seq4repair_space>avatar=?,role=?,<seq2seq4repair_space>session<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>where<seq2seq4repair_space>nick_name=?;" ) ) ) ; ps . setString ( 1 , object . getFirstName ( ) ) ; ps . setString ( 2 , object . getSecondName ( ) ) ; ps . setString ( 3 , addressUuid ) ; ps . setString ( 4 , object . geteMail ( ) ) ; try { ps . setString ( 5 , PasswordHelper . encrypt ( object . getPassword ( ) ) ) ; } catch ( NoSuchAlgorithmException e ) { e . printStackTrace ( ) ; UserDAOImpl . logger . error ( "No<seq2seq4repair_space>such<seq2seq4repair_space>algorithm<seq2seq4repair_space>exception!" , e ) ; } ps . setString ( 6 , object . getSex ( ) . toUpperCase ( ) ) ; <START_BUG> if ( object . getDateOfBirth ( ) . isEmpty ( ) ) { <END_BUG> ps . setString ( 7 , null ) ; } else { ps . setString ( 7 , object . getDateOfBirth ( ) ) ; } ps . setString ( 8 , avatar ) ; ps . setString ( 9 , object . getRole ( ) . toUpperCase ( ) ) ; ps . setString ( 10 , object . getSession ( ) ) ; ps . setString ( 11 , object . getNickName ( ) ) ; ps . execute ( ) ; conn . commit ( ) ; UserDAOImpl . logger . debug ( "User<seq2seq4repair_space>updated" ) ; } catch ( SQLException e ) { UserDAOImpl . logger . error ( "Error.<seq2seq4repair_space>Rollback<seq2seq4repair_space>changes" , e ) ; conn . rollback ( ) ; } finally { conn . setAutoCommit ( true ) ; } } catch ( SQLException e ) { UserDAOImpl . logger . error ( "Update<seq2seq4repair_space>user<seq2seq4repair_space>failed" , e ) ; } } public void delete ( User object ) { } public List < User > getAll ( ) { } public User readByKey ( String uuid ) { } public User readByNickName ( String nickName ) { } public int countAllBySex ( String sex ) { } public List < User > getByYearOfBirth ( String yearOfBirth ) { } public List < User > getUsersByRole ( Role role ) { } private User resultSet ( ResultSet rs ) { } public User getMostActiveUser ( ) { } public int [ ] getSexStatistic ( ) { } public String updateSession ( String nickName ) { } public User getUserByEmail ( String email ) { } public List < User > getActiveUsers ( ) { } }

Fix:
if ( ( object . getDateOfBirth ( ) ) == null ) {