# Application of Blockchain Technologies in Verification of Software Metrics
## 3 Methodology
### Software Metric Selection  
Software metrics serve as fundamental indicators of software quality. They come in various forms, such as size metrics, object-oriented metrics, service-oriented metrics, and metrics specific to component-based software engineering [18]. This paper focuses on object-oriented metrics, as they offer valuable insights into software quality by facilitating the evaluation of crucial attributes like modularity, maintainability, and extensibility.  
The metrics listed in Table 1 were not chosen at random; they are the result of an analysis identifying the most relevant indicators for assessing modularity, maintainability, and extensibility in object-oriented code [19; 20; 21]. In languages like Python, these metrics have shown to be highly effective in the early identification of anomalies--such as deep inheritance hierarchies or tightly coupled classes--that, if left unresolved, may cause significant problems in later stages of system development [22; 23]. Python's flexibility and dynamic typing, while conducive to rapid prototyping and streamlined development, simultaneously heighten the risk of anomalies [24].  
Moreover, the selected software metrics provide a valuable identification of the previously mentioned indicators for software written in Python v3.13. Metrics such as Lines of Code (LOC), Cyclomatic Complexity (at both method and class levels), and Total Methods per Class offer insights into code size and structural complexity, which are key indicators of maintainability and potential defect-proneness. Meanwhile, inheritance-related metrics--including Depth of Inheritance Tree (DIT), Number of Children (NOC), Method Inheritance Factor (MIF), and Attribute Inheritance Factor (AIF)--help assess the extent and clarity of class hierarchies, which is particularly relevant in Python, where multiple inheritance and dynamic behaviors can obscure control flow and method resolution.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Metric Name** & **Recommended Values** \\ \hline Lines of Code & / \\ Number of Children & 3–5 \\ Depth of Inheritance Tree & \textless{}5 \\ Total Methods Per Class & 5–15 \\ Inheritance Coupling & 0–2 \\ Cyclomatic Complexity (class) & \textless{}50 \\ Cyclomatic Complexity (Method) & 1–10 \\ LCOM1 & 0 \\ LCOM2 & 0–1 \\ LCOM3 & 0–2 \\ LCOM4 & 1 \\ LCOM5 & 0–1 \\ MIF & 0.8 \\ AIF & 0.8 \\ Coupling Factor & 0.1 \\ Response For Class & 100 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Recommended metric values.  
Figure 1: Overview of the proposed methodology.  
Coupling and cohesion metrics such as Coupling Factor (CF), Inheritance Coupling, and Lack of Cohesion of Methods (LCOM1-LCOM5) are critical in identifying tightly bound or poorly structured classes that can hinder reuse, testing, and modular design. In dynamically typed languages like Python, these metrics are especially valuable for detecting architectural issues that may not be immediately evident through static analysis alone. Lastly, Response for Class (RFC) measures the breadth of behavior encapsulated by a class and serves as a proxy for interface complexity--helpful in evaluating how predictable and manageable a class is during runtime. Collectively, these metrics enable an effective, quantifiable analysis of code quality, extensibility, and maintainability in Python systems.  
As can be observed, the \"Lines of Code\" metric does not include a recommended value because the method of counting LOC can vary depending on factors such as the programming language, coding practices, and counting standards. Only after selecting the appropriate standards and tools can a programmer accurately count the lines of code in a program, thereby making the metric relevant. Recommended values for other selected metrics are chosen based on literature analysis and are given at the beginning of this section.