Repeated code

TitleDo not use the same block of code more than once in a function/in multiple functions.
PriorityStrongly recommended
Severity level4
DescriptionIf a function contains a block of code that is repeated more than one time, refactor it into a single function.
RationaleRefactoring of repeated blocks of code into single functions increases the maintainability, readability and reusability of the code.