Skip to main content
zenodoopen

Script and Quality Métrics Extracted from CK Calculator

<p>This project involves creating a script for mining data on code metrics, tests, and bugs from Java project repositories.</p> <p><strong>Technologies Used:</strong></p> <ul> <li><strong>Pydriller</strong>: To clone repositories and traverse releases.</li> <li><strong>CK</strong>: To extract code metrics.</li> <li><strong>JaCoCo</strong>: To extract test coverage metrics.</li> <li><strong>SpotBugs</strong>: To extract bug reports.</li> <li><strong>FindSecBugs</strong>: To include security bugs in the bug reports.</li> </ul> <h3><strong>How to Run</strong></h3> <p><strong>Requirements:</strong></p> <ul> <li>Python 3 installed.</li> <li>Java 17 or higher installed.</li> <li>SpotBugs installed and configured in the PATH.</li> <li>FindSecBugs plugin installed.</li> </ul> <p><strong>Steps:</strong></p> <ol> <li>Clone this repository to your machine.</li> <li>Run the Python script.</li> </ol> <p><strong>Note:</strong><br>When executing, the script will ask if you want to traverse releases.</p> <ul> <li>Type <strong>N</strong> if you already have generated reports and want to perform only the analyses and plots.</li> <li>Type <strong>S</strong> to perform the complete operation.</li> </ul> <h3><strong>Result Organization</strong></h3> <p>The results will be organized into three different folders:</p> <ol> <li> <p><strong>Reports</strong>:<br>Contains raw data generated by third-party tools (CK, JaCoCo, SpotBugs). This is where you'll find tool-generated outputs.</p> </li> <li> <p><strong>Analysis-results</strong>:<br>Includes numerical results derived from the reports, used for plot generation. It also provides detailed numerical insights for specific queries.</p> </li> <li> <p><strong>Plots</strong>:<br>Graphical representations of the analyses.</p> </li> </ol> <h3><strong>Interpreting Metrics</strong></h3> <h4><strong>Code Metrics</strong></h4> <ol> <li> <p><strong>WMC (Weighted Methods per Class)</strong></p> <ul> <li>Measures total method complexity in a class.</li> <li><strong>Increasing Mean/Median</strong>: Classes are generally becoming more complex.</li> <li><strong>Increasing/Decreasing Variance</strong>: Complexity dispersion among classes is growing/shrinking.</li> </ul> </li> <li> <p><strong>DIT (Depth of Inheritance Tree)</strong></p> <ul> <li>Measures maximum inheritance depth of a class.</li> <li><strong>Increasing/Decreasing Mean</strong>: Average inheritance depth is increasing/reducing.</li> </ul> </li> <li> <p><strong>NOC (Number of Children)</strong></p> <ul> <li>Number of subclasses derived directly from a class.</li> <li><strong>Increasing/Decreasing Mean</strong>: More/fewer classes are being used as superclasses.</li> </ul> </li> <li> <p><strong>CBO (Coupling Between Objects)</strong></p> <ul> <li>Number of other classes a class is directly coupled to.</li> <li><strong>Increasing/Decreasing Mean</strong>: Classes are becoming more/less interdependent.</li> </ul> </li> <li> <p><strong>LCOM1 (Lack of Cohesion of Methods)</strong></p> <ul> <li>Measures cohesion among methods within a class.</li> <li><strong>Increasing Mean</strong>: Classes are becoming less cohesive.</li> </ul> </li> <li> <p><strong>RFC (Response for a Class)</strong></p> <ul> <li>Number of methods that can be invoked in response to a call.</li> <li><strong>Increasing Mean</strong>: Classes are becoming more interconnected.</li> </ul> </li> <li> <p><strong>LOC (Lines of Code)</strong></p> <ul> <li>Total lines of code in a class.</li> <li><strong>Increasing Mean</strong>: Classes are generally growing in size.</li> </ul> </li> </ol> <h4><strong>Test Metrics</strong></h4> <ol> <li> <p><strong>Instruction Missed/Covered</strong>:</p> <ul> <li>Tracks instructions not covered or covered by tests.</li> <li><strong>Increasing/Decreasing Mean</strong>: Indicates changes in overall test coverage.</li> </ul> </li> <li> <p><strong>Branch Missed/Covered</strong>:</p> <ul> <li>Tracks decision branches not covered or covered by tests.</li> </ul> </li> <li> <p><strong>Line Missed/Covered</strong>:</p> <ul> <li>Tracks lines of code not covered or covered by tests.</li> </ul> </li> <li> <p><strong>Complexity Missed</strong>:</p> <ul> <li>Cyclomatic complexity not covered by tests.</li> </ul> </li> </ol>

ShareScore

32/100

Overall dataset sharing score

Score breakdown

These five areas show where the dataset supports — or may limit — practical reuse.

Stewardship
4
Harmonization
4
Access
16
Reuse readiness
8
Engagement
0

Dataset details

Repository
zenodo
Published
November 17, 2024
License
cc-by-4.0
DOI
10.5281/zenodo.14177091

Scored with release 0.9.0

ScienceDex for faculty

Your academic CV and NIH biosketch

Make your CV in your school's format and your NIH biosketch from it, then download both as Word files.