There's some code that's added to all classes generated by Derby's query compiler. For example, there are three static fields that contain statistics used to check if the plan is stale, and there are getter and setter methods for each of the three fields. The fields and their accessor methods take up 468 bytes in every generated class.
We should see if we can factor out some of this code so that there is a single shared copy in BaseActivation. Advantages would be: less complicated byte-code generation, less memory occupied by generated classes in the statement cache, smaller disk footprint for stored prepared statements.