okay, this class is kind of a complete mess. I'm not even going to bother trying to understand the rest of this until it's cleaned up.

Some guidelines:
* Javadoc things. I should be able to understand what the purpose and structure of all the data in a type is by reading the javadocs for the classes and the fields. I should also be able to understand the purpose, input, and outputs of each method by reading the javadoc for the method.
* Fix your design. Something's messed up here if you're constantly forking on the type that Mapping is instantiated by. Like it or not, this is Java. Make use of inheritance and polymorphism properly and this code should get a lot less full of twisting branches and special cases.