Buggy code:
private static final String appPropertyId = "Api.UserProcess.ValidateData" ; @ Get public GenericResponse get ( GenericRequest request ) { } @ Post public GenericResponse post ( PostUserProcessRequest request ) throws InvalidArgumentException { if ( request . validateData ( ) ) { DataAccessor dataAccessor = DataAccessorFactory . getDataAccessor ( ) ; PersistenceManager pm = dataAccessor . getPersistenceManager ( ) ; User user = dataAccessor . getUser ( request . getUserId ( ) ) ; if ( ( user . getState ( ) ) == ( UserState . DELETED ) ) { Author author = dataAccessor . getAuthorByUserId ( user . getId ( ) ) ; if ( ( author != null ) && ( ( author . getState ( ) ) != ( AuthorState . DELETED ) ) ) throw new InvalidArgumentException ( "DELETED<seq2seq4repair_space>User<seq2seq4repair_space>entity<seq2seq4repair_space>has<seq2seq4repair_space>a<seq2seq4repair_space>non-DELETED<seq2seq4repair_space>Author<seq2seq4repair_space>entity<seq2seq4repair_space>linked." ) ; return new GenericResponse ( ) ; } if ( ( ( user . getEmail ( ) ) == null ) && ( ( user . getFacebookId ( ) ) == null ) ) throw new InvalidArgumentException ( "Neither<seq2seq4repair_space>email<seq2seq4repair_space>nor<seq2seq4repair_space>facebook<seq2seq4repair_space>id<seq2seq4repair_space>is<seq2seq4repair_space>set." ) ; if ( ( ( user . getEmail ( ) ) != null ) && ( user . getEmail ( ) . trim ( ) . isEmpty ( ) ) ) throw new InvalidArgumentException ( "Email<seq2seq4repair_space>is<seq2seq4repair_space>empty." ) ; if ( ( ( user . getFacebookId ( ) ) != null ) && ( user . getFacebookId ( ) . trim ( ) . isEmpty ( ) ) ) throw new InvalidArgumentException ( "Facebook<seq2seq4repair_space>Id<seq2seq4repair_space>is<seq2seq4repair_space>empty." ) ; if ( ( ( user . getEmail ( ) ) != null ) && ( ! ( user . getEmail ( ) . equals ( user . getEmail ( ) . trim ( ) . toLowerCase ( ) ) ) ) ) throw new InvalidArgumentException ( "Email<seq2seq4repair_space>is<seq2seq4repair_space>either<seq2seq4repair_space>not<seq2seq4repair_space>trimmed<seq2seq4repair_space>or<seq2seq4repair_space>not<seq2seq4repair_space>converted<seq2seq4repair_space>to<seq2seq4repair_space>lower<seq2seq4repair_space>case." ) ; if ( ( user . getEmail ( ) ) != null ) { GaeQueryBuilder gaeQueryBuilder = new GaeQueryBuilder ( pm . newQuery ( UserEntity . class ) ) ; gaeQueryBuilder . addFilter ( "email" , user . getEmail ( ) ) ; gaeQueryBuilder . addFilter ( "state" , DELETED , NOT_EQUALS ) ; gaeQueryBuilder . addOrdering ( "state" , true ) ; gaeQueryBuilder . addOrdering ( "signUpDate" , true ) ; Query query = gaeQueryBuilder . build ( ) ; List < User > list = ( ( List < User > ) ( query . executeWithMap ( gaeQueryBuilder . getParamNameValueMap ( ) ) ) ) ; if ( ( list . size ( ) ) != 1 ) throw new InvalidArgumentException ( ( ( ( ( list . size ( ) ) + "<seq2seq4repair_space>non-DELETED<seq2seq4repair_space>User<seq2seq4repair_space>entities<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>email<seq2seq4repair_space>" ) + ( user . getEmail ( ) ) ) + "<seq2seq4repair_space>." ) ) ; } if ( ( user . getFacebookId ( ) ) != null ) { GaeQueryBuilder gaeQueryBuilder = new GaeQueryBuilder ( pm . newQuery ( UserEntity . class ) ) ; gaeQueryBuilder . addFilter ( "facebookId" , user . getFacebookId ( ) ) ; gaeQueryBuilder . addFilter ( "state" , DELETED , NOT_EQUALS ) ; gaeQueryBuilder . addOrdering ( "state" , true ) ; gaeQueryBuilder . addOrdering ( "signUpDate" , true ) ; Query query = gaeQueryBuilder . build ( ) ; List < User > list = ( ( List < User > ) ( query . executeWithMap ( gaeQueryBuilder . getParamNameValueMap ( ) ) ) ) ; if ( ( list . size ( ) ) != 1 ) throw new InvalidArgumentException ( ( ( ( ( list . size ( ) ) + "<seq2seq4repair_space>non-DELETED<seq2seq4repair_space>User<seq2seq4repair_space>entities<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>Facebook<seq2seq4repair_space>Id<seq2seq4repair_space>" ) + ( user . getFacebookId ( ) ) ) + "<seq2seq4repair_space>." ) ) ; } GaeQueryBuilder gaeQueryBuilder = new GaeQueryBuilder ( pm . newQuery ( AuthorEntity . class ) ) ; gaeQueryBuilder . addFilter ( "userId" , user . getId ( ) ) ; gaeQueryBuilder . addFilter ( "state" , AuthorState . DELETED , NOT_EQUALS ) ; gaeQueryBuilder . addOrdering ( "state" , true ) ; gaeQueryBuilder . addOrdering ( "registrationDate" , true ) ; Query query = gaeQueryBuilder . build ( ) ; List < Author > authorList = ( ( List < Author > ) ( query . executeWithMap ( gaeQueryBuilder . getParamNameValueMap ( ) ) ) ) ; if ( ( authorList . size ( ) ) == 0 ) { <START_BUG> if ( ( ( ( user . getSignUpSource ( ) ) == ( UserSignUpSource . WEBSITE ) ) && ( ( user . getSignUpSource ( ) ) == ( UserSignUpSource . WEBSITE_FACEBOOK ) ) ) && ( ( ( user . getState ( ) ) == ( UserState . REGISTERED ) ) || ( ( user . getState ( ) ) == ( UserState . ACTIVE ) ) ) ) { <END_BUG> UserData userData = UserDataUtil . createUserData ( user ) ; userData . setFirstName ( user . getFirstName ( ) ) ; userData . setLastName ( user . getLastName ( ) ) ; AuthorDataUtil . createAuthorProfile ( userData , null ) ; if ( ( user . getEmail ( ) ) != null ) { Task task = TaskQueueFactory . newTask ( ) . setUrl ( "//user//email" ) . addParam ( "userId" , userData . getId ( ) . toString ( ) ) . addParam ( "sendWelcomeMail" , "true" ) ; TaskQueueFactory . getUserTaskQueue ( ) . addAll ( task ) ; } UserProcessApi . logger . log ( Level . WARNING , ( ( ( "Created<seq2seq4repair_space>Author<seq2seq4repair_space>entity<seq2seq4repair_space>for<seq2seq4repair_space>user<seq2seq4repair_space>" + ( user . getId ( ) ) ) + "<seq2seq4repair_space>with<seq2seq4repair_space>email<seq2seq4repair_space>" ) + ( user . getEmail ( ) ) ) ) ; } else { throw new InvalidArgumentException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>an<seq2seq4repair_space>Author<seq2seq4repair_space>entity<seq2seq4repair_space>linked." ) ; } } else if ( ( authorList . size ( ) ) == 1 ) { } else { throw new InvalidArgumentException ( ( ( "User<seq2seq4repair_space>has<seq2seq4repair_space>" + ( authorList . size ( ) ) ) + "<seq2seq4repair_space>non-DELETED<seq2seq4repair_space>Author<seq2seq4repair_space>entities<seq2seq4repair_space>linked." ) ) ; } } return new GenericResponse ( ) ; } No newline ;

Fix:
if ( ( ( ( user . getSignUpSource ( ) ) == ( UserSignUpSource . WEBSITE ) ) || ( ( user . getSignUpSource ( ) ) == ( UserSignUpSource . WEBSITE_FACEBOOK ) ) ) && ( ( ( user . getState ( ) ) == ( UserState . REGISTERED ) ) || ( ( user . getState ( ) ) == ( UserState . ACTIVE ) ) ) ) {