Background: I found a large-ish open source java project (lots of plugins, old code, a swing GUI, etc) and was able to get a test run working that successfully executes the feature I was looking for. Great first step! I then rampaged around and deleted all other main() calls and test cases. In theory, the only thing that can be run are the lines I'm particularly interested in.
Goal: Is there a way to use JaCoCo (or a profiler's log or some other method) to run the app, watch which lines get used, and "lift" out *only* the minimal necessary code into a new mini-project?
I've tried using IntelliJ "unused declaration" to iteratively prune, but the compiler said that broke everything.