Buggy code:
@ Service public class FullCustomerServiceImpl implements FullCustomerService { @ Override public FullCustomer createCustomer ( FullCustomer fullCustomer , int partitionId ) { } @ Override public FullCustomer readCustomer ( int customerId , int partitionId ) { } @ Override public FullCustomer updateCustomer ( FullCustomer customer , int partitionId ) { if ( customer == null ) throw new InvalidRequestException ( "Customer<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; if ( ! ( customer . hasId ( ) ) ) throw new InvalidCustomerException ( "Provided<seq2seq4repair_space>customer<seq2seq4repair_space>doesn't<seq2seq4repair_space>have<seq2seq4repair_space>its<seq2seq4repair_space>id<seq2seq4repair_space>set;<seq2seq4repair_space>please<seq2seq4repair_space>set<seq2seq4repair_space>it<seq2seq4repair_space>or<seq2seq4repair_space>use<seq2seq4repair_space>//create<seq2seq4repair_space>instead!" ) ; if ( ( ! ( customer . canUpdateCustomerLanguages ( ) ) ) && ( ! ( customer . canUpdateCustomer ( ) ) ) ) throw new InvalidCustomerException ( "Provided<seq2seq4repair_space>customer<seq2seq4repair_space>only<seq2seq4repair_space>has<seq2seq4repair_space>its<seq2seq4repair_space>id<seq2seq4repair_space>set;<seq2seq4repair_space>to<seq2seq4repair_space>update<seq2seq4repair_space>this<seq2seq4repair_space>customer,<seq2seq4repair_space>set<seq2seq4repair_space>additional<seq2seq4repair_space>fields!" ) ; FullCustomerServiceImpl . LOG . debug ( "Updating<seq2seq4repair_space>customer:<seq2seq4repair_space>{}" , customer ) ; FullCustomer oldCustomer = readCustomer ( customer . getId ( ) , partitionId ) ; <START_BUG> if ( ! ( customer . hasEqualSetCustomerFields ( oldCustomer ) ) ) <END_BUG> fullCustomerQueries . updatePartial ( customer , partitionId ) ; FullCustomerServiceImpl . LOG . debug ( "Customer<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>updated;<seq2seq4repair_space>before<seq2seq4repair_space>update:<seq2seq4repair_space>{}" , oldCustomer ) ; return oldCustomer ; } @ Override public FullCustomer deleteCustomer ( int customerId , int partitionId ) { } @ Override public List < FullCustomer > readCustomersForTeacher ( int teacherId , int page , int amount , int partitionId ) { } @ Override public List < FullCustomer > readCustomersAll ( int page , int amount , int partitionId ) { } @ Override public int countForTeacher ( int teacherId , int partitionId ) { } @ Override public int countAll ( int partitionId ) { } @ Override public Optional < FullCustomer > exists ( FullCustomer customer , int partitionId ) { } @ Autowired public FullCustomerServiceImpl ( FullCustomerQueries fullCustomerQueries , CustomerService customerService , CustomerLanguagesService customerLanguagesService ) { } private final FullCustomerQueries fullCustomerQueries ; private final CustomerService customerService ; private final CustomerLanguagesService customerLanguagesService ; private static final Logger LOG = LoggerFactory . getLogger ( FullCustomerService . class ) ; }

Fix:
if ( ( ! ( customer . hasEqualSetCustomerFields ( oldCustomer ) ) ) || ( ! ( customer . hasEqualSetCustomerLanguagesFields ( oldCustomer ) ) ) )