Automatic detection of architectural bad smells through semantic representation of code