Rename hasOverrides to hasLifecycleOverrideAnnotation
Refactor some duplicate codes