@snoofle said:
Then I discovered 48 more IDENTICAL classes, with the sole difference being the name of the class. They were all named ProductDataXXX, with XXX being the individual products. Then I discover 49 identical sets of JUnit tests (testing getters, setters, and useful business logic that did not belong in these classes), with the exact same typos and mispellings; each 800+ lines long.
The reason I'm working on this is that there was a change in the underlying db data structure. As such, the class implementation (all 49 of them) needs to change. And the tests too.
Upon querying the developer as to why he didn't have 49 instances of 1 class instead of 1 instance of each of 49 classes, he said that he needed the "this" pointer to be different.
This most likely falls in the category of "questions you don't ask because you know in advance you won't like the answer", but why did the developer need the "this" pointer to be different?