The only time I've seen RobotBuilder generate code that doesn't compile is when the user inputs invalid identifiers. For example, this bug:
http://firstforge.wpi.edu/sf/go/artf1710
If you posted your robot builder yml file and project, we might be able to help.