Synthesizing code quality rules from examples