Code duplication, also sometimes known as code cloning, is a programming practice consisting in repeating the same (or similar) sequences of code statements within a software same project.
int a, b, c; Constructor() { a = 5; b = 10; c = 15; //do stuff } Constructor(int x, int y) { a = x; b = y; c = 15; //…
c# parameters constructor this code-duplicationLet's say I have the following class X where I want to return access to an internal member: class Z { // …
c++ class constants code-duplication c++-faqSince version 15, IntelliJ warns me about code duplicates. In some cases this might be intentional, so I want to ignore/…
intellij-idea suppress-warnings code-duplicationWe have a fairly large code base, 400K LOC of C++, and code duplication is something of a problem. Are …
c++ code-duplicationAre there tools out there which could automatically find copy-and-paste code among a set of files? I was thinking of …
code-analysis copy-paste static-analysis code-duplicationYou can compare two revisions or files with Tortoise SVN. Is there also a way to compare two directories? I …
svn tortoisesvn diff compare code-duplicationI ruined several unit tests some time ago when I went through and refactored them to make them more DRY--the …
unit-testing dry code-duplicationIn a recent code review I spotted a few lines of duplicated logic in a class (less than 15 lines). When …
refactoring coding-style dry code-duplicationI wonder if it is possible to require that a java method parameter is of any type from finite set …
java design-patterns code-duplicationI'm looking for a code duplication tool that is language agnostic. It's easy to find language specific code duplication tools (…
language-agnostic duplicates code-analysis static-analysis code-duplication