Showing 6,500 of 6,500 total issues
File _continuous_distns.py
has 5642 lines of code (exceeds 1000 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
#
# Author: Travis Oliphant 2002-2011 with contributions from
# SciPy Developers 2004-2011
#
Similar blocks of code found in 3 locations. Consider refactoring. Open
true_yy2 = [5001, 5000, 4994, 5000, 5002, 5000, 5000, 5000, 5000, 5003, 5000, 5000, 5000, 5003, 5003, 5003, 4997, 5004, 5007, 5004, 5001, 5001, 5001, 5002, 5002, 5001, 5001, 5001, 4998, 5001, 4998, 4996, 4998, 4998, 5002, 5002, 4996, 4997, 5003, 5003, 5002, 5001, 5002, 5003, 5003, 5002, 5001, 4998, 4998, 4995, 4995, 4998, 4999, 4999, 5007, 5009, 5009, 5009, 5007, 4996, 4996, 4994, 4994, 4994, 4994, 4995, 5007, 5008, 5008, 5009, 5008, 5008, 5008, 5001, 5000, 5001, 5001, 5004, 5004, 5005, 5005, 5005, 5005, 5000, 4994, 4994, 4994, 4993, 4994, 4995, 4995, 4995, 4995, 4995, 4999, 4995, 4995, 4999, 4999, 4997, 4997, 4993, 4997, 5009, 4997, 4997, 4999, 4999, 4999, 4999, 4997, 4987, 4999, 5002, 5001, 5002, 5001, 5001, 5002, 5001, 4998, 4996, 4996, 4996, 4998, 4998, 4998, 4998, 5001, 5001, 5001, 5001, 5004, 5004, 5004, 5004, 5002, 5004, 5008, 5002, 5010, 5002, 5002, 5009, 5002, 5002, 5002, 5002, 5008, 5008, 5008, 5008, 5008, 5008, 5008, 5004, 5004, 5004, 5004, 5004, 5000, 4999, 5000, 4998, 4998, 4998, 5000, 5000, 5000, 5000, 5000, 5000, 4997, 4997, 4997, 5000, 5003, 5003, 5005, 5009, 5009, 5009, 5010, 5011, 5011, 5011, 5004, 5011, 5004, 5000, 5000, 5000, 5000, 5001, 5001, 5001, 5001, 5001, 4997, 4995, 4995, 4995, 4997, 4997, 4997, 5000, 5007, 5000, 4998, 5000, 5000, 5000, 4998, 4995, 4995, 4995, 4995, 4995, 5003, 5003, 5003, 5003, 5003, 5008, 5001, 5001, 4998, 4994, 4994, 5008, 4993, 4993, 4993, 4994, 4994, 4994, 4994, 5002, 5002, 5002, 5000, 5000, 5000, 5000, 5000, 4999, 5000, 4999, 4994, 4994, 5000, 5000, 5000, 5000, 5001, 5001, 5001, 5001, 5001, 5002, 5001, 5001, 5001, 5001, 4999, 4999, 4996, 4997, 4997, 4999, 5005, 5005, 5005, 5005, 5005, 5000, 5000, 5000, 5001, 5000, 5000, 5000, 5001, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5001, 5000, 5000, 5000, 5006, 5006, 5006, 5006, 5006, 5006, 5007, 5006, 5000, 5000, 5000, 5000, 4994, 4994, 4994, 5000, 5005, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 4995, 5000, 4998, 4998, 4998, 4996, 4998, 5000, 5000, 5000, 5002, 5002, 5002, 5007, 5007, 5010, 5007, 5007, 5010, 5010, 4997, 4997, 4996, 4996, 5004, 4995, 5004, 5004, 5004, 5004, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 4995, 4995, 4995, 4995, 4995, 5000, 5000, 5001, 5000, 5001, 5001, 5001, 5001, 5001, 4995, 5001, 4998, 4998, 4998, 4998, 4998, 4998, 4998, 4998, 5000, 5000, 5000, 4998, 5000, 5002, 5003, 5003, 5003, 5002, 5003, 5006, 5003, 5002, 4998, 4998, 4995, 4995, 4994, 4995, 4998, 4998, 4994, 5001, 5001, 5001, 4991, 4991, 5001, 5004, 5004, 5001, 5001, 5001, 5000, 5000, 4997, 4996, 4996, 5000, 4999, 4996, 4999, 4999, 5001, 5001, 4999, 5001, 5001, 5001, 5002, 5006, 5002, 5006, 5005, 5002, 5005, 5005, 5002, 5002, 5000, 5000, 5000, 4999, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5003, 5003, 5003, 5003, 5009, 5009, 5009, 5002, 5000, 4999, 4999, 4999, 4999, 4999, 4999, 5001, 5001, 5001, 5000, 5001, 5000, 5001, 5001, 5001, 4999, 5001, 4997, 5001, 5001, 4999, 5002, 5002, 5000, 5000, 4999, 4999, 5000, 4999, 4999, 4999, 5000, 5002, 5002, 5000, 5000, 4994, 4999, 4994, 4994, 4999, 4999, 4999, 5000, 5008, 5008, 5004, 5002, 5004, 5004, 5002, 5002, 5002, 5002, 5004, 5004, 5004, 5004, 5004, 5009, 5007, 5007, 5007, 5007, 5003, 5003, 5003, 5001, 5000, 4998, 4998, 4998, 4998, 4998, 4998, 4997, 4998, 5001, 5001, 5001, 5003, 5003, 5003, 5003, 5003, 5005, 5003, 5001, 5003, 5003, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5000, 5000, 5001, 5001, 5003, 5003, 5000, 5000, 5000, 5000, 4998, 4998, 4998, 4998, 5007, 5007, 5007, 5007, 4997, 5006, 5003, 5003, 5003, 5003, 5003, 5003, 4998, 4997, 4997, 4997, 4997, 4998, 5004, 5004, 5006, 5009, 5009, 5008, 5009, 5008, 5008, 5008, 5008, 5008, 5008, 5002, 5002, 5002, 4993, 4990, 4993, 4993, 4994, 4994, 4994, 4997, 4999, 5000, 4999, 5000, 5000, 5003, 5003, 5003, 4998, 4998, 4995, 4992, 4992, 4987, 4995, 4995, 4996, 4998, 5000, 5000, 5000, 5008, 5008, 5009, 5009, 5000, 4999, 4999, 4999, 4998, 4998, 4998, 4998, 5009, 5009, 5003, 5003, 5003, 4997, 4995, 4995, 4995, 4995, 4995, 4995, 4996, 5000, 4996, 5000, 5000, 5000, 5000, 5002, 5002, 5002, 5000, 5000, 5000, 5000, 5000, 4998, 4997, 4998, 4999, 4999, 5002, 5002, 5002, 5002, 5002, 5002, 5002, 5001, 5000, 5000, 5004, 5004, 5000, 5004, 5004, 5004, 5004, 5005, 5005, 5005, 5005, 5005, 5005, 5005, 5000, 5000, 5000, 5000, 4999, 4999, 4999, 4999, 4999, 5000, 5000, 5002, 5000, 5000, 5000, 5000, 5000, 5002, 5000, 4997, 4997, 4999, 4999, 4997, 4997, 4997, 4999, 4999, 4999, 4999, 4999, 5003, 5010, 5010, 5003, 5010, 5010, 5000, 5000, 4995, 5000, 5003, 5000, 5000, 5000, 5000, 5003, 5003, 5002, 5004, 5004, 5007, 5004, 5002, 5000, 4999, 4999, 5000, 4996, 5000, 5000, 4996, 4996, 4996, 4996, 4997, 4997, 4999, 5000, 5000, 4999, 4999, 4998, 4998, 4998, 4998, 4998, 5000, 5000, 5001, 5001, 5001, 5001, 5003, 5003, 5005, 5005, 5005, 5003, 5003, 5000, 5000, 5000, 4991, 4991, 4998, 4998, 4998, 4998, 4998, 5004, 5001, 5004, 5004, 5004, 5001, 5001, 5001, 5003, 5000, 5003, 5003, 5003, 5000, 5000, 5000, 5000, 4998, 4998, 4996, 4998, 4998, 4998, 5004, 5006, 5007, 5007, 5006, 5004, 5002, 5000, 4999, 4999, 4999, 4992, 4992, 4999, 5001, 5004, 5004, 5004, 5004, 5004, 5004, 4995, 4995, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5003, 5003, 5003, 5003, 5009, 5010, 5010, 5010, 5010, 5010, 5002, 5002, 5000, 5002, 5000, 5002, 5004, 5004, 4998, 5004, 4998, 4998, 4994, 4991, 4994, 4991, 4991, 4991, 4991, 4994, 5002, 5004, 5004, 5002, 5004, 5004, 5004, 4998, 4994, 4998, 5003, 5003, 5003, 5003, 5003, 5009, 5003, 5003, 4997, 4997, 4997, 4996, 4996, 4996, 4996, 4999, 4999, 4996, 4999, 4999, 5000, 5000, 5000, 5000, 5000, 4997, 5000, 5000, 4997, 4997, 5002, 5003, 5003, 5003, 5002, 5002, 5002, 5002, 5001, 5002, 5002, 5006, 5009, 5009, 5006, 5006, 5006, 5000, 5000, 5000, 4991, 5000, 5002, 5002, 5002, 5003, 5003, 5003, 5002, 5001, 5000, 5001, 5000, 5000, 5000, 5000, 5000, 4997, 4994, 4994, 4994, 4995, 4995, 4995, 5000, 5000, 5007, 5003, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000] # nopep8
- Read upRead up
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).
Tuning
This issue has a mass of 1006.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
true_yy = [5001, 5002, 5004, 5000, 4987, 4989, 5008, 5013, 5000, 4996, 5000, 5000, 5003, 4988, 4991, 5017, 4997, 5004, 4990, 4997, 5010, 5007, 5001, 4970, 5002, 4986, 5032, 5003, 4994, 5001, 4988, 4998, 5002, 4996, 4988, 5009, 5003, 4997, 4996, 4994, 4997, 5003, 5012, 5002, 5001, 5006, 5006, 4986, 4998, 4978, 4995, 4999, 4987, 5015, 5009, 5016, 4995, 5007, 5013, 4996, 5018, 4992, 4989, 4994, 4991, 4995, 5018, 5007, 5008, 5009, 5010, 5008, 5009, 4999, 5000, 5000, 5001, 5000, 5004, 5005, 5009, 5005, 5014, 5000, 4992, 4994, 4991, 4993, 5000, 5005, 4993, 5003, 4995, 4980, 4995, 4999, 5007, 5000, 4988, 4982, 5030, 4997, 4993, 5009, 4993, 5020, 5010, 4997, 4987, 4999, 5006, 4984, 4999, 4987, 4986, 5006, 5002, 5001, 5003, 4996, 4994, 5002, 4989, 4998, 4996, 5007, 4993, 4998, 5001, 4989, 5012, 5001, 5010, 4996, 5004, 5008, 5002, 5004, 4997, 5001, 5010, 5023, 4996, 5018, 5002, 4990, 5009, 4997, 5016, 5000, 5013, 5008, 4990, 5011, 4996, 5010, 5004, 5023, 4999, 5004, 4996, 5011, 4998, 5000, 4998, 5000, 4993, 4998, 5000, 5006, 5010, 4988, 5000, 4997, 4995, 4996, 5005, 5003, 5009, 5009, 4997, 5010, 5014, 5011, 5013, 5015, 5011, 4987, 5004, 4999, 5000, 5000, 5000, 4999, 5001, 5012, 5001, 5012, 4995, 4997, 4995, 4985, 4989, 5007, 5010, 4997, 5011, 4995, 5000, 5011, 4998, 4991, 5021, 5003, 4985, 4991, 4995, 5018, 4979, 5003, 5011, 5009, 5001, 4998, 5008, 4994, 5016, 4992, 5008, 4993, 4983, 5010, 5023, 4975, 4987, 4994, 5002, 5002, 5005, 5006, 5005, 5000, 4996, 5000, 4999, 5004, 5000, 5000, 4981, 5001, 4994, 4993, 5000, 5004, 5001, 4992, 5002, 5006, 4997, 4987, 5001, 5008, 5011, 4995, 5006, 4976, 4999, 4989, 5008, 4996, 4997, 5006, 5005, 5007, 4990, 5010, 4996, 4998, 5000, 5000, 5002, 5001, 4996, 4997, 5000, 5003, 5000, 5000, 5013, 5001, 4990, 4990, 5010, 5000, 5021, 5000, 5006, 4995, 5012, 5019, 5000, 5006, 4999, 5007, 5014, 5000, 4994, 4991, 5010, 4985, 4988, 5007, 5005, 5000, 5005, 4997, 4995, 4987, 5000, 5000, 5000, 5000, 4999, 5011, 5018, 4994, 5000, 4995, 5000, 5008, 4994, 4992, 5000, 4998, 4992, 5006, 4996, 5000, 5018, 5000, 5002, 5002, 5007, 5000, 5012, 5014, 5010, 4997, 4996, 5014, 4995, 4991, 5006, 4992, 5008, 5004, 4995, 5016, 5000, 5005, 5000, 4985, 5002, 5000, 5009, 4991, 4995, 5004, 4987, 5014, 4986, 5008, 4985, 4995, 5010, 5000, 5001, 5001, 5001, 5001, 5002, 4986, 5001, 5001, 4995, 5004, 4998, 4998, 4992, 5003, 5000, 4991, 4998, 5002, 5011, 5000, 5013, 4997, 5000, 5003, 5003, 5014, 4998, 5002, 5006, 5015, 4992, 4992, 4995, 4998, 4994, 5007, 4977, 5004, 5005, 4990, 4991, 4991, 4991, 4991, 5004, 5006, 5004, 5004, 4997, 5001, 4992, 5000, 5000, 4996, 4987, 4993, 5001, 5006, 4999, 4993, 4999, 5001, 5001, 5014, 4985, 5010, 5006, 4989, 5002, 5011, 4999, 5010, 5005, 5002, 5010, 4990, 4994, 5000, 4985, 5000, 5000, 4999, 5000, 5000, 5007, 5005, 4990, 5000, 4985, 5003, 5009, 5012, 5012, 5000, 5002, 4997, 5002, 4992, 4999, 4997, 5005, 5009, 4989, 5005, 4988, 5001, 5000, 5000, 4999, 5005, 4997, 5015, 5001, 4988, 4983, 5013, 4992, 5002, 5012, 4999, 5013, 5000, 4988, 4989, 4996, 5000, 5002, 4999, 5002, 4991, 5009, 5005, 4994, 5000, 4994, 4985, 4999, 4980, 5013, 5014, 5000, 4996, 5008, 5002, 5002, 5004, 4999, 5012, 4992, 5002, 4987, 5004, 5009, 5004, 5013, 4989, 5027, 4992, 5016, 5007, 5003, 5013, 5003, 5001, 5000, 4987, 5001, 4998, 4994, 4998, 4997, 4997, 4971, 5001, 4990, 5001, 5003, 4996, 5006, 5005, 4995, 5005, 5023, 5003, 5005, 4991, 5001, 5001, 4996, 5001, 5005, 5001, 5001, 5001, 5001, 5000, 5005, 5001, 4999, 5003, 5001, 5000, 5012, 5011, 5008, 5000, 4998, 4994, 4988, 5013, 4998, 5017, 4991, 5007, 5016, 5007, 4997, 5003, 4997, 5006, 5003, 5010, 5003, 4997, 4997, 4994, 4998, 4987, 5004, 5004, 5009, 5006, 5009, 5009, 5010, 5023, 5000, 5008, 5008, 5008, 4993, 5010, 5012, 4989, 5002, 4993, 4990, 4985, 4990, 4988, 4997, 5000, 4994, 5004, 5000, 5000, 4999, 5003, 5003, 5006, 5019, 5003, 4992, 4977, 4998, 4987, 4995, 4987, 5000, 4986, 4998, 4996, 5008, 5011, 5009, 5000, 5009, 5010, 4999, 5009, 5010, 4992, 4998, 4994, 5009, 4998, 5013, 5011, 4997, 5016, 4995, 5003, 4986, 5010, 4995, 4986, 5025, 4990, 5010, 4990, 4996, 5000, 5002, 4994, 5002, 5000, 5002, 4995, 5003, 5006, 5000, 4997, 4996, 4998, 4992, 5013, 4998, 4988, 4999, 5004, 5004, 5002, 5002, 5001, 4986, 5011, 5012, 4988, 5000, 5000, 5012, 5004, 5004, 4984, 5004, 5005, 5005, 5005, 5005, 5005, 5005, 5006, 5000, 5008, 5015, 4999, 4999, 4996, 5000, 4992, 5019, 5020, 4999, 4991, 5000, 5000, 5002, 5000, 5003, 4985, 4990, 5011, 5012, 4997, 4989, 4999, 4997, 4997, 4992, 4999, 4985, 4999, 5012, 5003, 5010, 5010, 5010, 5012, 5010, 4986, 5014, 5000, 4994, 5017, 4995, 5005, 5003, 5000, 5000, 4988, 5018, 5007, 5009, 5002, 5004, 4999, 5000, 4987, 4986, 5000, 4994, 5012, 5022, 4996, 5002, 4986, 4990, 4989, 4997, 4997, 5002, 5004, 4999, 5000, 4992, 4998, 4997, 4998, 5000, 5000, 5032, 4998, 5014, 4978, 5001, 5003, 5006, 5003, 5005, 5005, 5005, 5000, 5003, 4990, 4991, 4990, 5016, 5006, 4981, 4998, 4998, 4989, 4995, 5007, 5004, 5004, 5001, 5004, 5000, 4996, 4988, 5000, 5003, 5009, 4998, 5003, 4991, 5000, 4988, 5004, 5002, 4991, 4998, 4996, 4991, 5013, 5007, 5010, 5004, 5006, 5007, 4993, 5000, 5002, 4992, 4999, 4992, 5001, 4989, 4992, 5015, 5011, 5008, 5004, 4990, 4995, 4993, 5004, 5000, 4982, 5008, 5000, 4993, 5000, 5000, 4991, 5005, 5008, 5003, 4994, 4997, 5012, 4995, 5009, 5020, 5010, 5019, 4979, 5013, 4990, 5002, 5000, 5015, 4989, 5009, 4998, 5004, 5010, 4988, 4994, 5004, 4985, 4998, 4991, 4985, 4994, 4986, 5010, 4990, 5002, 5005, 5008, 5004, 4988, 5004, 5005, 4994, 5004, 4998, 4990, 5010, 5003, 5011, 4992, 5009, 5003, 5013, 4996, 4997, 4989, 4992, 5002, 4992, 4996, 4999, 5000, 5009, 4990, 4992, 5020, 4981, 5011, 5000, 5008, 4997, 4994, 4982, 5014, 5013, 4996, 5002, 5011, 5003, 5000, 5002, 4999, 5001, 5002, 5018, 4984, 5022, 5009, 5006, 5009, 5000, 4974, 4991, 5020, 5000, 4987, 5003, 5002, 5003, 5002, 5016, 4997, 5002, 5005, 4998, 4999, 5001, 5000, 5000, 5000, 5001, 4994, 4991, 4997, 4990, 4991, 4995, 5008, 5007, 4994, 5000, 5007, 4988, 5014, 5003, 4998, 4995, 5000, 5000, 5004] # nopep8
- Read upRead up
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).
Tuning
This issue has a mass of 1006.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
true_yy1 = [4999, 5002, 5004, 5000, 4987, 4989, 5008, 5013, 5000, 4996, 5026, 5000, 5003, 4988, 4991, 5017, 5003, 5004, 4990, 4997, 5010, 5007, 5001, 4970, 5002, 4986, 5032, 5003, 4994, 5001, 4988, 4998, 5002, 4996, 4988, 5009, 5003, 5001, 4996, 4994, 4997, 5003, 5012, 5002, 5001, 5006, 5006, 4986, 4998, 4978, 4995, 4999, 4987, 5015, 5009, 5016, 4995, 5007, 5013, 4996, 5018, 4992, 4989, 4994, 4991, 4995, 5018, 5007, 5008, 5006, 5010, 4986, 5009, 4999, 5008, 5000, 5001, 5000, 5004, 5004, 5009, 5005, 5014, 5000, 4992, 4994, 4991, 4993, 5000, 5005, 4993, 5003, 4995, 4980, 4995, 4999, 5007, 5000, 4988, 4982, 5030, 4997, 4993, 5009, 4993, 5020, 5010, 4997, 4987, 4999, 5006, 4984, 4998, 4987, 4986, 5006, 5002, 5001, 5003, 4996, 4994, 5002, 4989, 4998, 4996, 5007, 4993, 4998, 5001, 4989, 5012, 5001, 5010, 4996, 5004, 5008, 5002, 5024, 4997, 5001, 5010, 5023, 4996, 5018, 5002, 4990, 5009, 4997, 5016, 5000, 5013, 5008, 4990, 5011, 4996, 5010, 5004, 5023, 4999, 5004, 4996, 5011, 4998, 5000, 4988, 5000, 4993, 4998, 5000, 5006, 5010, 4988, 5000, 4997, 4995, 4996, 5005, 5003, 5009, 5009, 4997, 5010, 5014, 5009, 5013, 5015, 5011, 5005, 5004, 4999, 5002, 5000, 5000, 4999, 5013, 5012, 5001, 5012, 4995, 4997, 4995, 4985, 4989, 5007, 5010, 4997, 5011, 4995, 5000, 5011, 4998, 4991, 5021, 5003, 4985, 4991, 4995, 5018, 4979, 5003, 5011, 5009, 5001, 4998, 5008, 4994, 5016, 4992, 5008, 4993, 4983, 5010, 5023, 4975, 4987, 4994, 5002, 4984, 5005, 5006, 5005, 5000, 4996, 5000, 4999, 5004, 4994, 5000, 4981, 5001, 4994, 4993, 5000, 5004, 5001, 4992, 5002, 5006, 4997, 4987, 5001, 5008, 5011, 4995, 5006, 4976, 4999, 4989, 5008, 4996, 4997, 5006, 5005, 5007, 4990, 5010, 4996, 4998, 5000, 5000, 5002, 5001, 4996, 4997, 5000, 5003, 5000, 4986, 5013, 5001, 4990, 4990, 5010, 5000, 5021, 5000, 5006, 4995, 5012, 5019, 5000, 5006, 4999, 5007, 5014, 5000, 4994, 4991, 5010, 4985, 4988, 5007, 5005, 5000, 5005, 4997, 4995, 4999, 5000, 5000, 5009, 5000, 4999, 5011, 5018, 4994, 5000, 4995, 5000, 5008, 4994, 4992, 5000, 4998, 4992, 5006, 4996, 5000, 5018, 5000, 5022, 5002, 5007, 5000, 5012, 5014, 5010, 4997, 4996, 5014, 4995, 4991, 5006, 4992, 5008, 5004, 4995, 5016, 5000, 5005, 5000, 4985, 5002, 5000, 5009, 4991, 4995, 5004, 4987, 5014, 4986, 5008, 4985, 4995, 5010, 5000, 5001, 5013, 4988, 5001, 5002, 4986, 4985, 5001, 4995, 5004, 4998, 4998, 4992, 5003, 5000, 4991, 4998, 5002, 5011, 4986, 5013, 4997, 5000, 5002, 5003, 5014, 4998, 5002, 5006, 5015, 4992, 4992, 4995, 4998, 4994, 5007, 4977, 5004, 5005, 4990, 4991, 5001, 5010, 4991, 4990, 5006, 5004, 5004, 4997, 5001, 4992, 5000, 5000, 4996, 4987, 4993, 5001, 5006, 4999, 4993, 4999, 5001, 5001, 5014, 4985, 5010, 5006, 4989, 5002, 5011, 4999, 5010, 5005, 5002, 5010, 4990, 4994, 5000, 4985, 5010, 5000, 4999, 5000, 4977, 5007, 5005, 4990, 5000, 4985, 5003, 5009, 5012, 5012, 5000, 5003, 4997, 5002, 4992, 4999, 4997, 5005, 5009, 4989, 5005, 4988, 5001, 5000, 5000, 4999, 5005, 4997, 5015, 5001, 4988, 4983, 5013, 4992, 5002, 5012, 4999, 5013, 5000, 4988, 4989, 4996, 5000, 5002, 4999, 5021, 4991, 5009, 5005, 4994, 5000, 4994, 4985, 4999, 4980, 5013, 5014, 5000, 4996, 5008, 5028, 5002, 5004, 4999, 5012, 4992, 5002, 4987, 5004, 5009, 5004, 5013, 4989, 5027, 4992, 5016, 5007, 5003, 5013, 5003, 4999, 5000, 4987, 5001, 4998, 4994, 4998, 4997, 4998, 4998, 5001, 4990, 5025, 5003, 4996, 5006, 5005, 4995, 4994, 5023, 5003, 5005, 4991, 5001, 5001, 4996, 5001, 5005, 5001, 5001, 5000, 5000, 5000, 5005, 5001, 4999, 5003, 4982, 5000, 5012, 5011, 5008, 5000, 4998, 4994, 4988, 5013, 4998, 5017, 4991, 5007, 5016, 5007, 4997, 4974, 4997, 5006, 5003, 5010, 5003, 4997, 4997, 4994, 4998, 4987, 5004, 5001, 5009, 5006, 5009, 4984, 5010, 5023, 5000, 5008, 5007, 5008, 4993, 5010, 5012, 4989, 5002, 4993, 5007, 4985, 4990, 4988, 4997, 5000, 4994, 5004, 4981, 5000, 4999, 5003, 4988, 5006, 5019, 5003, 4992, 4977, 4998, 4987, 4995, 4987, 5000, 4986, 4998, 4996, 5008, 5011, 5009, 5000, 4999, 5010, 4999, 5009, 5010, 4992, 4998, 4994, 5009, 4998, 5013, 5011, 4997, 5016, 4995, 5003, 4986, 5010, 4995, 4986, 5025, 4990, 5010, 4990, 4996, 5000, 5002, 4994, 5002, 5000, 5001, 4995, 5003, 5006, 5000, 4997, 4996, 5010, 4992, 5013, 4998, 4988, 4999, 5004, 5004, 5002, 5002, 5001, 4986, 5011, 5012, 4988, 5000, 5000, 5012, 5004, 5004, 4984, 5012, 4998, 5005, 5005, 5005, 4995, 5004, 5006, 5000, 5008, 5015, 4999, 4999, 4996, 5000, 4992, 5019, 5020, 4999, 4991, 5020, 5000, 5002, 5000, 5003, 4985, 4990, 5011, 5012, 4997, 4989, 4999, 5006, 4997, 4992, 4999, 4985, 4999, 5012, 5003, 4989, 5010, 5010, 5012, 4990, 4986, 5014, 5000, 4994, 5017, 4995, 5005, 5003, 5000, 5000, 4988, 5018, 5007, 5009, 5002, 5004, 4999, 5026, 4987, 4986, 5000, 4994, 5012, 5022, 4996, 5002, 4986, 4990, 4989, 4997, 4997, 5002, 5004, 4999, 5000, 4992, 4999, 4997, 4998, 5000, 5002, 5032, 4998, 5014, 4978, 5001, 4988, 5006, 5003, 5005, 5002, 5005, 5000, 5003, 4990, 4991, 4990, 5016, 5006, 4981, 4999, 4998, 4989, 4995, 5007, 5004, 5019, 5001, 5004, 5000, 4996, 4988, 5001, 5003, 5009, 4998, 5003, 4991, 5000, 4988, 5004, 5002, 4991, 4998, 4996, 4991, 5013, 5007, 5010, 5004, 5006, 5007, 4993, 5000, 5002, 4992, 4999, 4992, 5001, 4989, 4992, 5015, 5011, 5008, 5004, 4990, 4995, 4993, 5004, 5000, 4982, 5008, 5000, 4993, 5000, 5000, 4991, 5005, 5008, 5003, 4994, 4997, 5012, 4995, 5009, 5020, 5010, 5019, 4979, 5013, 4990, 5002, 5000, 5015, 4989, 5009, 4998, 5004, 5010, 4988, 4994, 5004, 4985, 4998, 4991, 4985, 4994, 4986, 5010, 4990, 5002, 5005, 5008, 5004, 4988, 4980, 5005, 4994, 5004, 4998, 4990, 5010, 5003, 5011, 4992, 5009, 5003, 5013, 4996, 4997, 4989, 4992, 5002, 4992, 4996, 4999, 5000, 5009, 4990, 4992, 5020, 4981, 5011, 5000, 5008, 4997, 4994, 4982, 5014, 5013, 4996, 5002, 5011, 5003, 5000, 5015, 4999, 5001, 5002, 5018, 4984, 5022, 5009, 5006, 5009, 5000, 4974, 4991, 5020, 5000, 4987, 5003, 4987, 5003, 5002, 5016, 4997, 5022, 5005, 4998, 4999, 5001, 5000, 4999, 5000, 5001, 4994, 4991, 4997, 4990, 4991, 4995, 5008, 5007, 4994, 5000, 5007, 4988, 5014, 5003, 4998, 4995, 5000, 5000, 5004] # nopep8
- Read upRead up
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).
Tuning
This issue has a mass of 1006.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
class frechet_l_gen(weibull_max_gen):
"""A Frechet left (or Weibull maximum) continuous random variable.
%(before_notes)s
- Read upRead up
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).
Tuning
This issue has a mass of 743.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
class frechet_r_gen(weibull_min_gen):
"""A Frechet right (or Weibull minimum) continuous random variable.
%(before_notes)s
- Read upRead up
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).
Tuning
This issue has a mass of 743.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File core.py
has 2966 lines of code (exceeds 1000 allowed). Consider refactoring. Open
import warnings
import os
import numpy as np
from numpy import (pi, inf, zeros, ones, where, nonzero,
flatnonzero, ceil, sqrt, exp, log, arctan2,
Similar blocks of code found in 2 locations. Consider refactoring. Open
def setlabels(self):
''' Set automatic title, x-,y- and z- labels on SPECDATA object
based on type, angletype, freqtype
'''
- Read upRead up
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).
Tuning
This issue has a mass of 517.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
def setlabels(self):
''' Set automatic title, x-,y- and z- labels on SPECDATA object
based on type, angletype, freqtype
'''
- Read upRead up
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).
Tuning
This issue has a mass of 517.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File misc.py
has 2355 lines of code (exceeds 1000 allowed). Consider refactoring. Open
'''
Misc
'''
try:
Similar blocks of code found in 2 locations. Consider refactoring. Open
def test_prbnormndpc():
rho2 = np.random.rand(2)
a2 = np.zeros(2)
b2 = np.repeat(np.inf, 2)
- Read upRead up
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).
Tuning
This issue has a mass of 320.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
def test_prbnormtndpc():
rho2 = np.random.rand(2)
a2 = np.zeros(2)
b2 = np.repeat(np.inf, 2)
- Read upRead up
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).
Tuning
This issue has a mass of 320.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File polynomial.py
has 1993 lines of code (exceeds 1000 allowed). Consider refactoring. Open
"""
Extended functions to operate on polynomials
"""
# ------------------------------------------------------------------------
# Name: polynomial
Function _cov2mmtpdf
has a Cognitive Complexity of 165 (exceeds 15 allowed). Consider refactoring. Open
def _cov2mmtpdf(self, R, dt, u, def_nr, Nstart, hg, options):
'''
COV2MMTPDF Joint density of Maximum, minimum and period.
CALL [pdf, err, options] = cov2mmtpdf(R,dt,u,def,Nstart,hg,options)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File objects.py
has 1859 lines of code (exceeds 1000 allowed). Consider refactoring. Open
# Name: module1
# Purpose:
#
# Author: pab
#
File models.py
has 1719 lines of code (exceeds 1000 allowed). Consider refactoring. Open
#!/usr/bin/env python
"""
Models module
-------------
Similar blocks of code found in 2 locations. Consider refactoring. Open
if def_nr in [3, 4]:
if (Nx == 1):
# Joint density (TMd,TMm) given the Max and min
# Note the density is not scaled to unity
pdf[0, ts, tn] = fxind[0] # *CC
- Read upRead up
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).
Tuning
This issue has a mass of 223.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
elif def_nr == 5:
if (Nx == 1):
# Joint density (Tdm,TMm) given the Max and min
# Note the density is not scaled to unity
pdf[0, tns, tn] = fxind[0] # *CC
- Read upRead up
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).
Tuning
This issue has a mass of 223.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if k >= 6:
q_v = np.hstack((vals0[k], vals1[k], vals2[k]))
q_w = np.hstack((vals0[k - 1], vals1[k - 1], vals2[k - 1]))
elif k >= 4:
q_v = np.hstack((vals0[k], vals1[k]))
- Read upRead up
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).
Tuning
This issue has a mass of 204.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if k >= 5:
q_v = np.hstack((q_0[k], q_1[k], q_2[k]))
q_w = np.hstack((q_0[k - 1], q_1[k - 1], q_2[k - 1]))
elif k >= 3:
q_v = np.hstack((q_0[k], q_1[k]))
- Read upRead up
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).
Tuning
This issue has a mass of 204.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76