Refactor logic in ocomment:clang method.