5
• : phpcpd
• Copy/Paste Detector (CPD) for PHP code.
• 2023 1
•
• Don t Repeat Yourself
•
Slide 6
Slide 6 text
6
phpcpd 6.0.3 by Sebastian Bergmann.
Found 184 clones with 9893 duplicated lines in 142 files:
- /app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:166-524 (358 lines)
/app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:170-528
~~~~~~~~~~
- /app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:321-561 (240 lines)
/app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:334-574
~~~~~~~~~~~
- /app/xxxxxx/controllers/xxxxxx.php:909-1084 (175 lines)
/app/xxxxxx/controllers/xxxxxx.php:1247-1422
~~~~~~~~~~
8.41% duplicated lines out of 112932 total lines of code.
Average size of duplication is 54 lines, largest clone has 358 of lines
184 142 9,893
Slide 7
Slide 7 text
7
phpcpd 6.0.3 by Sebastian Bergmann.
Found 184 clones with 9893 duplicated lines in 142 files:
- /app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:166-524 (358 lines)
/app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:170-528
~~~~~~~~~~
- /app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:321-561 (240 lines)
/app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:334-574
~~~~~~~~~~~
- /app/xxxxxx/controllers/xxxxxx.php:909-1084 (175 lines)
/app/xxxxxx/controllers/xxxxxx.php:1247-1422
~~~~~~~~~~
8.41% duplicated lines out of 112932 total lines of code.
Average size of duplication is 54 lines, largest clone has 358 of lines
View
Slide 8
Slide 8 text
8
phpcpd 6.0.3 by Sebastian Bergmann.
Found 184 clones with 9893 duplicated lines in 142 files:
- /app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:166-524 (358 lines)
/app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:170-528
~~~~~~~~~~
- /app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:321-561 (240 lines)
/app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:334-574
~~~~~~~~~~~
- /app/xxxxxx/controllers/xxxxxx.php:909-1084 (175 lines)
/app/xxxxxx/controllers/xxxxxx.php:1247-1422
~~~~~~~~~~
8.41% duplicated lines out of 112932 total lines of code.
Average size of duplication is 54 lines, largest clone has 358 of lines
Fat
Slide 9
Slide 9 text
9
phpcpd 6.0.3 by Sebastian Bergmann.
Found 184 clones with 9893 duplicated lines in 142 files:
- /app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:166-524 (358 lines)
/app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:170-528
~~~~~~~~~~
- /app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:321-561 (240 lines)
/app/xxxxxx/xxxxxx/xxxxxx/xxxxxx.php:334-574
~~~~~~~~~~~
- /app/xxxxxx/controllers/xxxxxx.php:909-1084 (175 lines)
/app/xxxxxx/controllers/xxxxxx.php:1247-1422
~~~~~~~~~~
8.41% duplicated lines out of 112932 total lines of code.
Average size of duplication is 54 lines, largest clone has 358 of lines
112,932 8.41%
54 358
61
• The core assumption behind GQM is simple:to measure something well, you must
understand why you re measuring
•
• Improve system availability from the users point of view.
• Decrease the development time for new microservices from the product managers viewpoint.
• Reduce technical debt in the architecture from the perspective of software developers.
• Reduce the number of bugs being released into production.
• Detect more problems in production before our users do.
• Improve the machine learning model s accuracy from the users viewpoint.
• Make better design decisions in the architecture from the development team s perspective.