Source code classifier refactoring

What is the role of `HasTypeDefinition` here? It doesn't seem related.