It depends what thing you are trying to remove. Spark is pretty customizable though, so you may not need to edit code directly.
I’m also customising Spark at the moment, because I only want a really basic client for now. Some of the changes involve removing plugins. Others involve changing default values and enforcing those values in the classes that read the .properties files. Some do require directly editing the code to remove buttons, options in pop menu, menu items or preferences.