Researchers have often commented on the high correlation between McCabe’s Cyclomatic Complexity (CC) and lines of code (LOC). Many have believed this correlation high enough to justify adjusting CC by LOC or even sub...Researchers have often commented on the high correlation between McCabe’s Cyclomatic Complexity (CC) and lines of code (LOC). Many have believed this correlation high enough to justify adjusting CC by LOC or even substituting LOC for CC. However, from an empirical standpoint the relationship of CC to LOC is still an open one. We undertake the largest statistical study of this relationship to date. Employing modern regression techniques, we find the linearity of this relationship has been severely underestimated, so much so that CC can be said to have absolutely no explana-tory power of its own. This research presents evidence that LOC and CC have a stable practically perfect linear rela-tionship that holds across programmers, languages, code paradigms (procedural versus object-oriented), and software processes. Linear models are developed relating LOC and CC. These models are verified against over 1.2 million randomly selected source files from the SourceForge code repository. These files represent software projects from three target languages (C, C++, and Java) and a variety of programmer experience levels, software architectures, and de-velopment methodologies. The models developed are found to successfully predict roughly 90% of CC’s variance by LOC alone. This suggest not only that the linear relationship between LOC and CC is stable, but the aspects of code complexity that CC measures, such as the size of the test case space, grow linearly with source code size across lan-guages and programming paradigms.展开更多
Letη(Γ)and c(Γ)be the nullity and the cyclomatic number of a signed graphΓ.A signed cycle-spliced graph is a connected signed graph in which every block is a cycle.In this paper,we prove that for every signed cycl...Letη(Γ)and c(Γ)be the nullity and the cyclomatic number of a signed graphΓ.A signed cycle-spliced graph is a connected signed graph in which every block is a cycle.In this paper,we prove that for every signed cycle-spliced graphΓ,η(Γ)≤c(Γ)+1 and the extremal graphsΓwith nullity c(Γ)+1 are characterized,which extend the related results of Wong,Zhou and Tian(2022)on simple cycle-spliced graphs.Moreover,we prove that for every signed cycle-spliced graphΓ,η(Γ)=/c(Γ).Some properties on signed cycle-spliced graphsΓwithη(Γ)=c(Γ)-1 are explored,as well as a structural characterization on signed cycle-spliced bipartite graphsΓsatisfyingη(Γ)=c(Γ)-1.展开更多
The demand for quality software expands as the business environment grows internationally. Common to all software development methodologies is a design phase that focuses on the physical software model. Design criteri...The demand for quality software expands as the business environment grows internationally. Common to all software development methodologies is a design phase that focuses on the physical software model. Design criteria used to evaluate these models are important for refinement and improvement. The purpose of this research is to apply transformations of McCabe’s cyclomatic complexity as a means for improving software design and assessing risks within a design. In this research, two metrics, the management (<em>C<sub>MGT</sub></em>) and maintenance (<em>C<sub>MN</sub></em>) coefficients are introduced, and they are used to address the architectural, size, and quality dimensions of a software design.展开更多
This paper applies software analytics to open source code. Open-source software gives both individuals and businesses the flexibility to work with different parts of available code to modify it or incorporate it into ...This paper applies software analytics to open source code. Open-source software gives both individuals and businesses the flexibility to work with different parts of available code to modify it or incorporate it into their own project. The open source software market is growing. Major companies such as AWS, Facebook, Google, IBM, Microsoft, Netflix, SAP, Cisco, Intel, and Tesla have joined the open source software community. In this study, a sample of 40 open source applications was selected. Traditional McCabe software metrics including cyclomatic and essential complexities were examined. An analytical comparison of this set of metrics and derived metrics for high risk software was utilized as a basis for addressing risk management in the adoption and integration decisions of open source software. From this comparison, refinements were added, and contemporary concepts of design and data metrics derived from cyclomatic complexity were integrated into a classification scheme for software quality. It was found that 84% of the sample open source applications were classified as moderate low risk or low risk indicating that open source software exhibits low risk characteristics. The 40 open source applications were the base data for the model resulting in a technique which is applicable to any open source code regardless of functionality, language, or size.展开更多
Over the past decade, open-source software use has grown. Today, many companies including Google, Microsoft, Meta, RedHat, MongoDB, and Apache are major participants of open-source contributions. With the increased us...Over the past decade, open-source software use has grown. Today, many companies including Google, Microsoft, Meta, RedHat, MongoDB, and Apache are major participants of open-source contributions. With the increased use of open-source software or integration of open-source software into custom-developed software, the quality of this software component increases in importance. This study examined a sample of open-source applications from GitHub. Static software analytics were conducted, and each application was classified for its risk level. In the analyzed applications, it was found that 90% of the applications were classified as low risk or moderate low risk indicating a high level of quality for open-source applications.展开更多
Let G be a simple graph and G~σ be the oriented graph with G as its underlying graph and orientation σ.The rank of the adjacency matrix of G is called the rank of G and is denoted by r(G).The rank of the skew-adjace...Let G be a simple graph and G~σ be the oriented graph with G as its underlying graph and orientation σ.The rank of the adjacency matrix of G is called the rank of G and is denoted by r(G).The rank of the skew-adjacency matrix of G~σ is called the skew-rank of G~σ and is denoted by sr(G~σ).Let V(G)be the vertex set and E(G) be the edge set of G.The cyclomatic number of G,denoted by c(G),is equal to |E(G)|-|V(G)|+ω(G),where ω(G) is the number of the components of G.It is proved for any oriented graph G~σ that-2c(G)≤sr(G~σ)-r(G)≤2c(G).In this paper,we prove that there is no oriented graph G~σwith sr(G~σ)-r(G)=2c(G)-1,and in addition,there are infinitely many oriented graphs G~σ with connected underlying graphs such that c(G)=k and sr(G~σ)-r(G)=2c(G)-l for every integers k,l satisfying 0 ≤l≤4k and l≠1.展开更多
Tile basic features of object-oriented software makes it difficult to apply traditional testing methods in objectoriented systems. Control Flow Graph (CFG) is a well-known model used for identification of independen...Tile basic features of object-oriented software makes it difficult to apply traditional testing methods in objectoriented systems. Control Flow Graph (CFG) is a well-known model used for identification of independent paths in procedural software. This paper highlights the problem of constructing CFG in object-oriented systems and proposes a new model named Extended Control Flow Graph (ECFG) for code based analysis of Object-Oriented (OO) software. ECFG is a layered CFG where nodes refer to methods rather than statements. A new metrics Extended Cyclomatic Complexity (E-CC) is developed which is analogous to McCabe's Cyclomatic Complexity (CC) and refers to the number of independent execution paths within the OO software. The different ways in which CFG's of individual methods are connected in an ECFG are presented and formulas for E-CC for these different cases are proposed. Finally we have considered an example in Java and based on its ECFG, applied these cases to arrive at the E-CC of the total system as well as proposed a methodology for calculating the basis set, i.e., the set of independent paths for the OO system that will help in creation of test cases for code testing.展开更多
So far,the acyclic hypergraph has two different definitions.One is based on the cyclomatic number of the hypergraph,whereas the other arises from the acyclic schema of the relational database in the computer science.I...So far,the acyclic hypergraph has two different definitions.One is based on the cyclomatic number of the hypergraph,whereas the other arises from the acyclic schema of the relational database in the computer science.In this paper,it is first proved that these two definitions coincide with each other completely.Then we prove that a hypergraph H is not acyclic,or cyclic,if and only if it contains a special partial hypergraph named hypercircuit.In addition,we show that H has l(H) different hypercircuits,where l(H)is a parameter used to decide whether H is acyclic or cyclic.展开更多
The Wiener index W(G)of a graph G is a distance-based topological index defined as the sum of distances between all pairs of vertices in G.It is shown that forλ=2 there is an infinite family of planar bipartite chemi...The Wiener index W(G)of a graph G is a distance-based topological index defined as the sum of distances between all pairs of vertices in G.It is shown that forλ=2 there is an infinite family of planar bipartite chemical graphs G of girth 4 with the cyclomatic numberλ,but their line graphs are not chemical graphs,and forλ≥2 there are two infinite families of planar nonbipartite graphs G of girth 3 with the cyclomatic numberλ;the three classes of graphs have the property W(G)=W(L(G)),where L(G)is the line graph of G.展开更多
文摘Researchers have often commented on the high correlation between McCabe’s Cyclomatic Complexity (CC) and lines of code (LOC). Many have believed this correlation high enough to justify adjusting CC by LOC or even substituting LOC for CC. However, from an empirical standpoint the relationship of CC to LOC is still an open one. We undertake the largest statistical study of this relationship to date. Employing modern regression techniques, we find the linearity of this relationship has been severely underestimated, so much so that CC can be said to have absolutely no explana-tory power of its own. This research presents evidence that LOC and CC have a stable practically perfect linear rela-tionship that holds across programmers, languages, code paradigms (procedural versus object-oriented), and software processes. Linear models are developed relating LOC and CC. These models are verified against over 1.2 million randomly selected source files from the SourceForge code repository. These files represent software projects from three target languages (C, C++, and Java) and a variety of programmer experience levels, software architectures, and de-velopment methodologies. The models developed are found to successfully predict roughly 90% of CC’s variance by LOC alone. This suggest not only that the linear relationship between LOC and CC is stable, but the aspects of code complexity that CC measures, such as the size of the test case space, grow linearly with source code size across lan-guages and programming paradigms.
基金Supported by the Natural Science Foundation of Inner Mongolia Autonomous Region(Grant No.2020BS01011)the National Natural Science Foundation of China(Grant No.12171089)+1 种基金the Natural Science Foundation of Fujian Province(Grant No.2021J02048)the Research Fund of Xiamen University of Technology(Grant Nos.YKJ20018R,XPDKT20039)。
文摘Letη(Γ)and c(Γ)be the nullity and the cyclomatic number of a signed graphΓ.A signed cycle-spliced graph is a connected signed graph in which every block is a cycle.In this paper,we prove that for every signed cycle-spliced graphΓ,η(Γ)≤c(Γ)+1 and the extremal graphsΓwith nullity c(Γ)+1 are characterized,which extend the related results of Wong,Zhou and Tian(2022)on simple cycle-spliced graphs.Moreover,we prove that for every signed cycle-spliced graphΓ,η(Γ)=/c(Γ).Some properties on signed cycle-spliced graphsΓwithη(Γ)=c(Γ)-1 are explored,as well as a structural characterization on signed cycle-spliced bipartite graphsΓsatisfyingη(Γ)=c(Γ)-1.
文摘The demand for quality software expands as the business environment grows internationally. Common to all software development methodologies is a design phase that focuses on the physical software model. Design criteria used to evaluate these models are important for refinement and improvement. The purpose of this research is to apply transformations of McCabe’s cyclomatic complexity as a means for improving software design and assessing risks within a design. In this research, two metrics, the management (<em>C<sub>MGT</sub></em>) and maintenance (<em>C<sub>MN</sub></em>) coefficients are introduced, and they are used to address the architectural, size, and quality dimensions of a software design.
文摘This paper applies software analytics to open source code. Open-source software gives both individuals and businesses the flexibility to work with different parts of available code to modify it or incorporate it into their own project. The open source software market is growing. Major companies such as AWS, Facebook, Google, IBM, Microsoft, Netflix, SAP, Cisco, Intel, and Tesla have joined the open source software community. In this study, a sample of 40 open source applications was selected. Traditional McCabe software metrics including cyclomatic and essential complexities were examined. An analytical comparison of this set of metrics and derived metrics for high risk software was utilized as a basis for addressing risk management in the adoption and integration decisions of open source software. From this comparison, refinements were added, and contemporary concepts of design and data metrics derived from cyclomatic complexity were integrated into a classification scheme for software quality. It was found that 84% of the sample open source applications were classified as moderate low risk or low risk indicating that open source software exhibits low risk characteristics. The 40 open source applications were the base data for the model resulting in a technique which is applicable to any open source code regardless of functionality, language, or size.
文摘Over the past decade, open-source software use has grown. Today, many companies including Google, Microsoft, Meta, RedHat, MongoDB, and Apache are major participants of open-source contributions. With the increased use of open-source software or integration of open-source software into custom-developed software, the quality of this software component increases in importance. This study examined a sample of open-source applications from GitHub. Static software analytics were conducted, and each application was classified for its risk level. In the analyzed applications, it was found that 90% of the applications were classified as low risk or moderate low risk indicating a high level of quality for open-source applications.
基金supported by National Natural Science Foundation of China (Nos.12171002, 12331012, 12201559)。
文摘Let G be a simple graph and G~σ be the oriented graph with G as its underlying graph and orientation σ.The rank of the adjacency matrix of G is called the rank of G and is denoted by r(G).The rank of the skew-adjacency matrix of G~σ is called the skew-rank of G~σ and is denoted by sr(G~σ).Let V(G)be the vertex set and E(G) be the edge set of G.The cyclomatic number of G,denoted by c(G),is equal to |E(G)|-|V(G)|+ω(G),where ω(G) is the number of the components of G.It is proved for any oriented graph G~σ that-2c(G)≤sr(G~σ)-r(G)≤2c(G).In this paper,we prove that there is no oriented graph G~σwith sr(G~σ)-r(G)=2c(G)-1,and in addition,there are infinitely many oriented graphs G~σ with connected underlying graphs such that c(G)=k and sr(G~σ)-r(G)=2c(G)-l for every integers k,l satisfying 0 ≤l≤4k and l≠1.
文摘Tile basic features of object-oriented software makes it difficult to apply traditional testing methods in objectoriented systems. Control Flow Graph (CFG) is a well-known model used for identification of independent paths in procedural software. This paper highlights the problem of constructing CFG in object-oriented systems and proposes a new model named Extended Control Flow Graph (ECFG) for code based analysis of Object-Oriented (OO) software. ECFG is a layered CFG where nodes refer to methods rather than statements. A new metrics Extended Cyclomatic Complexity (E-CC) is developed which is analogous to McCabe's Cyclomatic Complexity (CC) and refers to the number of independent execution paths within the OO software. The different ways in which CFG's of individual methods are connected in an ECFG are presented and formulas for E-CC for these different cases are proposed. Finally we have considered an example in Java and based on its ECFG, applied these cases to arrive at the E-CC of the total system as well as proposed a methodology for calculating the basis set, i.e., the set of independent paths for the OO system that will help in creation of test cases for code testing.
基金This research is supported by the National Natural Science Foundation of China(No. 19831080).
文摘So far,the acyclic hypergraph has two different definitions.One is based on the cyclomatic number of the hypergraph,whereas the other arises from the acyclic schema of the relational database in the computer science.In this paper,it is first proved that these two definitions coincide with each other completely.Then we prove that a hypergraph H is not acyclic,or cyclic,if and only if it contains a special partial hypergraph named hypercircuit.In addition,we show that H has l(H) different hypercircuits,where l(H)is a parameter used to decide whether H is acyclic or cyclic.
基金This work was supported by the National Natural Science Foundation of China(No.11171273)The authors would like to express their sincere gratitude to the anonymous referees for their comments and remarks,which improved the presentation of this paper.
文摘The Wiener index W(G)of a graph G is a distance-based topological index defined as the sum of distances between all pairs of vertices in G.It is shown that forλ=2 there is an infinite family of planar bipartite chemical graphs G of girth 4 with the cyclomatic numberλ,but their line graphs are not chemical graphs,and forλ≥2 there are two infinite families of planar nonbipartite graphs G of girth 3 with the cyclomatic numberλ;the three classes of graphs have the property W(G)=W(L(G)),where L(G)is the line graph of G.