microsoft / nail_agent
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:
    • 1,893 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 80 duplicated lines
  • 6 duplicates
system4% (80 lines)
Duplication per Extension
py4% (80 lines)
Duplication per Component (primary)
agent/affordance_extractors9% (42 lines)
agent/decision_modules4% (26 lines)
agent1% (12 lines)
agent/entity_detectors0% (0 lines)
agent/valid_detectors0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
8 x 2 agent/affordance_extractors
agent/affordance_extractors
lm_affordance_extractor.py
lm_affordance_extractor.py
183:190 (1%)
200:207 (1%)
view
7 x 2 agent/affordance_extractors
agent/affordance_extractors
lm_affordance_extractor.py
lm_affordance_extractor.py
383:389 (1%)
395:401 (1%)
view
7 x 2 agent/decision_modules
agent/decision_modules
navigator.py
navigator.py
170:176 (5%)
207:213 (5%)
view
6 x 2 agent/affordance_extractors
agent/affordance_extractors
lm_affordance_extractor.py
lm_affordance_extractor.py
471:476 (1%)
495:500 (1%)
view
6 x 2 agent
agent
entity.py
location.py
48:54 (5%)
22:28 (5%)
view
6 x 2 agent/decision_modules
agent/decision_modules
hoarder.py
restart.py
12:19 (15%)
13:21 (27%)
view