microsoft / thrifty
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 4% duplication:
    • 10,177 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 472 duplicated lines
  • 28 duplicates
system4% (472 lines)
Duplication per Extension
kt4% (458 lines)
java2% (14 lines)
Duplication per Component (primary)
thrifty-kotlin-codegen/src/main10% (183 lines)
thrifty-runtime/src/commonTest15% (122 lines)
thrifty-runtime/src/commonMain4% (92 lines)
thrifty-schema/src/main1% (54 lines)
thrifty-gradle-plugin/src/main2% (14 lines)
thrifty-java-codegen/src/main<1% (7 lines)
thrifty-compiler-plugins/src/main0% (0 lines)
thrifty-compiler0% (0 lines)
thrifty-compiler/src/main0% (0 lines)
thrifty-example-postprocessor/src/main0% (0 lines)
thrifty-runtime/src/jvmMain0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 28 duplicates...
Size#FoldersFilesLinesCode
20 x 2 thrifty-runtime/src/comm...rosoft/thrifty/protocol
thrifty-runtime/src/comm...rosoft/thrifty/protocol
JsonProtocolTest.kt
SimpleJsonProtocolTest.kt
35:62 (18%)
36:63 (19%)
view
19 x 2 thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
KotlinCodeGenerator.kt
KotlinCodeGenerator.kt
997:1024 (1%)
1180:1207 (1%)
view
16 x 2 thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
KotlinCodeGenerator.kt
KotlinCodeGenerator.kt
1965:1987 (<1%)
2229:2251 (<1%)
view
12 x 2 thrifty-runtime/src/comm...rosoft/thrifty/protocol
thrifty-runtime/src/comm...rosoft/thrifty/protocol
JsonProtocolTest.kt
SimpleJsonProtocolTest.kt
110:121 (11%)
111:122 (11%)
view
11 x 2 thrifty-runtime/src/comm...rosoft/thrifty/protocol
thrifty-runtime/src/comm...rosoft/thrifty/protocol
JsonProtocolTest.kt
SimpleJsonProtocolTest.kt
125:135 (10%)
126:136 (10%)
view
11 x 2 thrifty-runtime/src/comm...rosoft/thrifty/protocol
thrifty-runtime/src/comm...rosoft/thrifty/protocol
CompactProtocolTest.kt
JsonProtocolTest.kt
80:90 (22%)
152:162 (10%)
view
10 x 2 thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
KotlinCodeGenerator.kt
KotlinCodeGenerator.kt
1063:1077 (<1%)
1246:1260 (<1%)
view
10 x 2 thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
KotlinCodeGenerator.kt
KotlinCodeGenerator.kt
1156:1167 (<1%)
1298:1309 (<1%)
view
9 x 2 thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
KotlinCodeGenerator.kt
KotlinCodeGenerator.kt
604:614 (<1%)
746:756 (<1%)
view
9 x 2 thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
KotlinCodeGenerator.kt
KotlinCodeGenerator.kt
1113:1124 (<1%)
1283:1294 (<1%)
view
8 x 2 thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
KotlinCodeGenerator.kt
KotlinCodeGenerator.kt
1363:1373 (<1%)
1382:1392 (<1%)
view
8 x 2 thrifty-runtime/src/comm...rosoft/thrifty/protocol
thrifty-runtime/src/comm...rosoft/thrifty/protocol
CompactProtocol.kt
CompactProtocol.kt
255:266 (2%)
271:282 (2%)
view
7 x 2 thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
KotlinCodeGenerator.kt
KotlinCodeGenerator.kt
1937:1945 (<1%)
2207:2214 (<1%)
view
7 x 2 thrifty-gradle-plugin/sr...icrosoft/thrifty/gradle
thrifty-gradle-plugin/sr...icrosoft/thrifty/gradle
SerializableThriftOptions.java
ThriftOptions.java
73:79 (9%)
34:40 (11%)
view
7 x 2 thrifty-java-codegen/src...m/microsoft.thrifty.gen
thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
TypeNames.kt
TypeUtils.kt
130:136 (8%)
65:71 (10%)
view
7 x 2 thrifty-runtime/src/comm...rosoft/thrifty/protocol
thrifty-runtime/src/comm...rosoft/thrifty/protocol
BinaryProtocolTest.kt
Xtruct.kt
177:184 (5%)
191:198 (3%)
view
7 x 2 thrifty-runtime/src/comm...rosoft/thrifty/protocol
thrifty-runtime/src/comm...rosoft/thrifty/protocol
BinaryProtocol.kt
CompactProtocol.kt
344:350 (3%)
488:494 (1%)
view
7 x 2 thrifty-runtime/src/comm...rosoft/thrifty/protocol
thrifty-runtime/src/comm...rosoft/thrifty/protocol
BinaryProtocol.kt
CompactProtocol.kt
89:99 (3%)
127:138 (1%)
view
6 x 2 thrifty-runtime/src/comm...rosoft/thrifty/protocol
thrifty-runtime/src/comm...rosoft/thrifty/protocol
JsonProtocol.kt
JsonProtocol.kt
158:169 (1%)
183:192 (1%)
view
6 x 2 thrifty-schema/src/main/...t/thrifty/schema/render
thrifty-schema/src/main/...t/thrifty/schema/render
SchemaRendering.kt
SchemaRendering.kt
205:210 (1%)
225:230 (1%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
12 x 2 thrifty-runtime/src/comm...rosoft/thrifty/protocol
thrifty-runtime/src/comm...rosoft/thrifty/protocol
JsonProtocolTest.kt
SimpleJsonProtocolTest.kt
111:123 
112:124 
view
6 x 2 thrifty-java-codegen/src...m/microsoft.thrifty.gen
thrifty-java-codegen/src...m/microsoft.thrifty.gen
ConstantBuilder.kt
ConstantBuilder.kt
195:201 
203:209 
view
6 x 2 thrifty-java-codegen/src...m/microsoft.thrifty.gen
thrifty-java-codegen/src...m/microsoft.thrifty.gen
ThriftyCodeGenerator.kt
ThriftyCodeGenerator.kt
903:909 
911:917 
view
6 x 2 thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
thrifty-kotlin-codegen/s.../microsoft/thrifty/kgen
KotlinCodeGenerator.kt
KotlinCodeGenerator.kt
1664:1670 
1672:1678 
view