Unveiling Hybrid Cyclomatic Complexity: A Comprehensive Analysis and Evaluation as an Integral Feature in Automatic Defect Prediction Models
- URL: http://arxiv.org/abs/2504.00477v1
- Date: Tue, 01 Apr 2025 07:07:17 GMT
- Title: Unveiling Hybrid Cyclomatic Complexity: A Comprehensive Analysis and Evaluation as an Integral Feature in Automatic Defect Prediction Models
- Authors: Laura Diana Cernau, Laura Diosan, Camelia Serban,
- Abstract summary: This paper aims to analyse a novel complexity metric, Hybrid Cyclomatic Complexity (HCC) and its efficiency as a feature in a defect prediction model.<n>We will present a comparative study between the HCC metric and its two components, the inherited complexity and the actual complexity of a class in the object-oriented context.
- Score: 0.5461938536945723
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: The complex software systems developed nowadays require assessing their quality and proneness to errors. Reducing code complexity is a never-ending problem, especially in today's fast pace of software systems development. Therefore, the industry needs to find a method to determine the qualities of a software system, the degree of difficulty in developing new functionalities, or the system's proneness to errors. One way of measuring and predicting the quality attributes of a software system is to analyse the software metrics values for it and the relationships between them. More precisely, we should study the metrics that measure and determine the degree of complexity of the code. This paper aims to analyse a novel complexity metric, Hybrid Cyclomatic Complexity (HCC) and its efficiency as a feature in a defect prediction model. The main idea behind this new metric is that inherited complexity should play a role in the complexity of a class, hence the need for a metric that calculates the total complexity of a class, taking into account the complexities of its descendants. Moreover, we will present a comparative study between the HCC metric and its two components, the inherited complexity and the actual complexity of a class in the object-oriented context. Since we want this metric to be as valuable as possible, the experiments will use data from open-source projects. One of the conclusions that can be drawn from these experiments is that inherited complexity is not correlated with class complexity. Therefore, HCC can be considered a valid metric from this point of view. Moreover, the evaluation of the efficiency of the prediction models shows us a similar efficiency for HCC and the inherited complexity. Additionally, there is a need for a clear distinction between a class's complexity and its inherited complexity when defining complexity metrics.
Related papers
- Efficient and Scalable Neural Symbolic Search for Knowledge Graph Complex Query Answering [50.1887329564127]
We propose an efficient and scalable symbolic search framework for complex queries.<n>Our framework reduces the computational load of symbolic methods by 90% while maintaining nearly the same performance.
arXiv Detail & Related papers (2025-05-13T01:24:09Z) - RV-Syn: Rational and Verifiable Mathematical Reasoning Data Synthesis based on Structured Function Library [58.404895570822184]
RV-Syn is a novel mathematical Synthesis approach.
It generates graphs as solutions by combining Python-formatted functions from this library.
Based on the constructed graph, we achieve solution-guided logic-aware problem generation.
arXiv Detail & Related papers (2025-04-29T04:42:02Z) - Learning K-U-Net with constant complexity: An Application to time series forecasting [1.8816077341295625]
Training deep models for time series forecasting is a critical task with an inherent challenge of time complexity.
We introduce a new exponentially weighted gradient descent algorithm designed to achieve constant time complexity in deep learning models.
arXiv Detail & Related papers (2024-10-03T12:35:17Z) - Adaptive-RAG: Learning to Adapt Retrieval-Augmented Large Language Models through Question Complexity [59.57065228857247]
Retrieval-augmented Large Language Models (LLMs) have emerged as a promising approach to enhancing response accuracy in several tasks, such as Question-Answering (QA)
We propose a novel adaptive QA framework, that can dynamically select the most suitable strategy for (retrieval-augmented) LLMs based on the query complexity.
We validate our model on a set of open-domain QA datasets, covering multiple query complexities, and show that ours enhances the overall efficiency and accuracy of QA systems.
arXiv Detail & Related papers (2024-03-21T13:52:30Z) - CoCoST: Automatic Complex Code Generation with Online Searching and Correctness Testing [51.00909683314142]
Large Language Models have revolutionized code generation ability by converting natural language descriptions into executable code.
CoCoST framework enhances complex code generation by online searching for more information with planned queries and correctness testing for code refinement.
CoCoST is validated through rigorous experiments on the DS-1000 and ClassEval datasets.
arXiv Detail & Related papers (2024-03-20T13:33:55Z) - Inducing Systematicity in Transformers by Attending to Structurally
Quantized Embeddings [60.698130703909804]
Transformers generalize to novel compositions of structures and entities after being trained on a complex dataset.
We propose SQ-Transformer that explicitly encourages systematicity in the embeddings and attention layers.
We show that SQ-Transformer achieves stronger compositional generalization than the vanilla Transformer on multiple low-complexity semantic parsing and machine translation datasets.
arXiv Detail & Related papers (2024-02-09T15:53:15Z) - CodeComplex: Dataset for Worst-Case Time Complexity Prediction [7.974618854858136]
Code time complexity prediction involves various intricate factors such as the input range of variables and conditional loops.<n>Current benchmarks fall short of providing a rigorous assessment due to limited data, language constraints, and insufficient labeling.<n>We introduce CodeComplex, the first robust and extensive dataset designed to evaluate LLMs' reasoning abilities in predicting code time complexity.
arXiv Detail & Related papers (2024-01-16T06:54:44Z) - When Do Program-of-Thoughts Work for Reasoning? [51.2699797837818]
We propose complexity-impacted reasoning score (CIRS) to measure correlation between code and reasoning abilities.
Specifically, we use the abstract syntax tree to encode the structural information and calculate logical complexity.
Code will be integrated into the EasyInstruct framework at https://github.com/zjunlp/EasyInstruct.
arXiv Detail & Related papers (2023-08-29T17:22:39Z) - An Exploration of Multicalibration Uniform Convergence Bounds [25.500680663483624]
We present a framework which yields multicalibration error uniform convergence bounds by reparametrizing sample complexities for Empirical Risk Minimization learning.
From this framework, we demonstrate that multicalibration error exhibits dependence on the classifier architecture as well as the underlying data distribution.
arXiv Detail & Related papers (2022-02-09T15:48:10Z) - Provable Reinforcement Learning with a Short-Term Memory [68.00677878812908]
We study a new subclass of POMDPs, whose latent states can be decoded by the most recent history of a short length $m$.
In particular, in the rich-observation setting, we develop new algorithms using a novel "moment matching" approach with a sample complexity that scales exponentially.
Our results show that a short-term memory suffices for reinforcement learning in these environments.
arXiv Detail & Related papers (2022-02-08T16:39:57Z) - Simple or Complex? Complexity-Controllable Question Generation with Soft
Templates and Deep Mixture of Experts Model [15.411214563867548]
We propose an end-to-end neural complexity-controllable question generation model, which incorporates a mixture of experts (MoE) as the selector of soft templates.
Our method introduces a novel, cross-domain complexity estimator to assess the complexity of a question.
The experimental results on two benchmark QA datasets demonstrate that our QG model is superior to state-of-the-art methods in both automatic and manual evaluation.
arXiv Detail & Related papers (2021-10-13T08:16:52Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.