<commit_before>## Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

> Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

## Issue Mass

Duplicated code has a calculated mass, which can be thought of as a measure of how much logic has been duplicated.
This issue has a mass of `<%= mass %>`: if you would like to change the minimum mass that will be reported as an issue, please see the details in [`codeclimate-duplication`'s documentation](https://github.com/codeclimate/codeclimate-duplication).

## Refactorings

*   [Extract Method](http://sourcemaking.com/refactoring/extract-method)
*   [Extract Class](http://sourcemaking.com/refactoring/extract-class)
*   [Form Template Method](http://sourcemaking.com/refactoring/form-template-method)
*   [Introduce Null Object](http://sourcemaking.com/refactoring/introduce-null-object)
*   [Pull Up Method](http://sourcemaking.com/refactoring/pull-up-method)
*   [Pull Up Field](http://sourcemaking.com/refactoring/pull-up-field)
*   [Substitute Algorithm](http://sourcemaking.com/refactoring/substitute-algorithm)

## Further Reading

*   [Don't Repeat Yourself](http://c2.com/cgi/wiki?DontRepeatYourself) on the C2 Wiki
*   [Duplicated Code](http://sourcemaking.com/refactoring/duplicated-code) on SourceMaking
*   [Refactoring: Improving the Design of Existing Code](http://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672) by <NAME>. _Duplicated Code_, p76
<commit_msg>Link to docs instead of github repo<commit_after>## Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

> Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

## Issue Mass

Duplicated code has a calculated mass, which can be thought of as a measure of how much logic has been duplicated.
This issue has a mass of `<%= mass %>`: if you would like to change the minimum mass that will be reported as an issue, please see the details in [`codeclimate-duplication`'s documentation](https://docs.codeclimate.com/docs/duplication).

## Refactorings

*   [Extract Method](http://sourcemaking.com/refactoring/extract-method)
*   [Extract Class](http://sourcemaking.com/refactoring/extract-class)
*   [Form Template Method](http://sourcemaking.com/refactoring/form-template-method)
*   [Introduce Null Object](http://sourcemaking.com/refactoring/introduce-null-object)
*   [Pull Up Method](http://sourcemaking.com/refactoring/pull-up-method)
*   [Pull Up Field](http://sourcemaking.com/refactoring/pull-up-field)
*   [Substitute Algorithm](http://sourcemaking.com/refactoring/substitute-algorithm)

## Further Reading

*   [Don't Repeat Yourself](http://c2.com/cgi/wiki?DontRepeatYourself) on the C2 Wiki
*   [Duplicated Code](http://sourcemaking.com/refactoring/duplicated-code) on SourceMaking
*   [Refactoring: Improving the Design of Existing Code](http://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672) by <NAME>. _Duplicated Code_, p76

{'fraction_non_alphanumeric': 0.10204638472032743, 'fraction_numerical': 0.007639836289222374, 'mean_word_length': 5.059504132231405, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1995129', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1022, 'n_words': 350}