A file that contains many lines that are similar to other code within the code base is problematic for the same reasons as a file that contains a lot of (exactly) duplicated code.

Refactor similar code snippets by extracting common functionality into methods that can be reused across classes.

  • Wikipedia: Duplicate code.
  • M. Fowler, Refactoring. Addison-Wesley, 1999.