I mean I test the fixing in resolveSyntaxPredicate or variable class individually. Then I test to move flattenTerms before resolveSyntaxPredicate. For the above two solutions, The first cannot pass every test cases if I did not move flattenTerms before resolveSyntaxPredicate. The second one cannot pass all test cases even if I did not move  flattenTerms before resolveSyntaxPredicate.