removes duplication in FreeDef extractors
Merge pull request #2268 from scalamacros/topic/shannon-entropy

removes duplication in FreeDef extractors