Recently I spent 2 Weeks helping a project clear its Technical Debt. Here are some results:
Topic |
Before |
After |
Project Size |
Production Code
- Package = 7
- Classes = 23
- Methods = 104 (average 4.52/class)
- LOC = 912 (average 8.77/method and 39.65/class)
- Average Cyclomatic Complexity/Method = 2.04
Test Code
- Package = 1
- Classes = 10
- Methods = 92
- LOC = 410
|
Production Code
- Package = 4
- Classes = 20
- Methods = 89 (average 4.45/class)
- LOC = 627 (average 7.04/method and 31.35/class)
- Average Cyclomatic Complexity/Method = 1.79
Test Code
- Package = 4
- Classes = 18
- Methods = 120
- LOC = 771
|
Code Coverage |
- Line Coverage: 46%
- Block Coverage: 43%
|
- Line Coverage: 94%
- Block Coverage: 96%
|
Cyclomatic Complexity |
|
|
Obvious Dead Code |
Following public methods:
- class CryptoUtils: String getSHA1HashOfString(String), String encryptString(String), String decryptString(String)
- class DbLogger: writeToTable(String, String)
- class DebugUtils: String convertListToString(java.util.List), String convertStrArrayToString(String)
- class FileSystem: int getNumLinesInFile(String)
Total: 7 methods in 4 classes |
Following public methods:
- class BackgroundDBWriter: stop()
Total: 1 method in 1 class
Note: This method is required by the tests. |
Automation |
|
|
Version Control Usage |
- Average Commits Per Day = 1
- Average # of Files Changed Per Commit = 2
|
- Average Commits Per Day = 4
- Average # of Files Changed Per Commit = 9
Note: Since we are heavily refactoring, lots of files are touched for each commit. But the frequency of commit is fairly high to ensure we are not taking big leaps. |
Coding Convention Violation |
976 |
0 |
Something interesting to watch out is how the production code becomes more crisp (fewer packages, classes and LOC) and how the amount of test code becomes greater than the production code.
Another similar report.
This entry was posted
on Monday, February 2nd, 2009 at 1:13 PM and is filed under Agile, Coaching, Design, Metrics, Programming, Testing, Tools.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.