Always practice DRY coding principles:
We have text editors. We have "rename this variable" macros. We have regular expressions.
We have forklifts, cranes, and bulldozers for moving code.
A file with some minor repetition is easier to read and understand than one whose Kolmogorov complexity is roughly equal to its length. You can apply Zip compression to your source tree, but that doesn't mean you should.
This is not Code Golf. It's not a contest to see who can get it done in the fewest characters.
Complex data structures, simple algorithms. Code is data. You understand.