I have a large codebase, and I'd like to refactor the package structure so that classes which interact heavily go in the same package.
It seems that it should be possible to create a tool that could look at the interactions between classes, and then group together those classes that interact heavily. These groupings might then suggest a good hierarchy for packages.
Does such a tool exist? (open source is preferred).