You are on page 1of 9

CSE566: Software Project, Process and Quality Management 4/18/ 2023

For assessing source code in C, ANSI C++, C#, and Java, RSM is a platform-independent
technique. The ability of RSM to run on practically every operating system makes it possible for
any business to standardize source code quality and analytics across the board, below is the
source code that I chose for Tic-Tac-Toe Game (Msquare technologies LLc )
Interpretation of metrics:
As we can see, the RSM calculates Function metrics. (LOC) line of code which is any line of
text that is not a comment or blank line in a piece of code, Effective lines of code, or eLOC, are
files that contain lines that aren't blank, just comments, or just parentheses or brackets, logical
lines of code(lLOC) those lines in a file that terminate in a semicolon and are considered code
statements because they contain a for a loop, I created an M2 report with the following metrics:
complexity metrics detail, cyclomatic, interface, and total: (Msquare technologies LLc, loc
summary )

The average lLOC and eLOC lines are not equal for this code.

Comment lines are lines that include comments, this category includes lines that include both
code and comments on the same physical line. Also, it displays how much LOC is shared across
functions and files, LOC, Comments, and Blanks are added to create logical lines,The stats for
this code demonstrate that the minimum, maximum, and average LOC are not near to one
another.

The cyclomatic complexity of the code is a metric to assess the stability of the program, it counts
the number of linearly unrelated pathways in a code.
The user can get a sense of the complexity of the code by looking at the cyclomatic complexity,
which for this code is 24.

Class Metrics are utilized to obtain a comprehensive examination of classes and other computer
code frames.

The eLOC, lLOC, and LOC for this code don't have comparable values, also the code has a 23.

Default: Complexity metrics Non-default: Class/Struct metrics

Report:
It may directly generate an inheritance tree from the source code, check for coding style
compliance in the source code, and examine class inheritance by depth and derivation.

Basically, the tool counts the number of executable statements, parameters, inherited data, and
cyclomatic complexity in the software. It also has the capacity to compute statistics like the
median value, maximum value, and range of each metric in the application.
The code has 127 LOC overall, 102 iLOC, 58 lLOC, and 23 comments with a cyclomatic
complexity of 24 derived from 1 Class and 3 Methods.
Measures are calculated for software reusability:

Adaptability: defines the ease with which software satisfies user or requirement requirements of
the new settings due to system and system limits, module focus on cohesion and coupling of the
module, when a module's coupling and cohesion are low and high, respectively, it indicates that
the module may quickly transition from one environment to another. (An Approach For
Calculation Of Reusability Metrics Of Object Oriented, p. 2645)
Understandability: Is the level of understanding that should be permitted for the user or
developer of the software system or module, understandability depends on the documentation
and the complexity and the size, complexity is measured by using the DIT (Depth of Inheritance
Tree) and NOC (Number of Children), and WMC(Weighted Method per Class) metrics, LOC
applied to measure the size and CP( Comment Percentage )applied for the documentation. (An
Approach For Calculation Of Reusability Metrics Of Object Oriented, p. 2646)
For each class and function, RSM calculates the cyclomatic complexity and interface
complexity, these complexity metrics can help the user determine the module's usability:
Cyclomatic Complexity
The quantity of linearly independent pathways in a code segment is known as its cyclomatic
complexity, it counts how many linearly distinct pathways there are through a program module, and less
complex cyclomatic programs are safer to change and easier to comprehend, It is calculated using the
program's Control Flow Graph. (Cyclomatic Complexity, Mar 13, 2023)
cc calculation cc=E-N+2p
where:
E= The number of edges
N=the number of nodes
P= the number of connected components

Halstead’s metrics
are currently found in many commercial solutions that track the number of lines of software
code, by tallying the tokens, identifying the operands, and operator, calculation: (Software
Engineering | Halstead’s Software Metrics, 05 Aug, 2020)

Program vocabulary: n=n1+n2

Program Length: N=N1+N2

Calculated estimated program length: 


Volume: V = Size * (log 2 vocabulary) = N * log 2(n)

Difficulty: D = (n1 / 2) * (N2 / n2)

Effort: E=D x V

RSM tool’s metrics:

The RSM tool analyzes software systems using reverse engineering techniques to produce
various software metrics like the number of lines of code, and cyclomatic complexity. The tool
can be used to help with software testing, code quality, and maintenance and evolution tasks. The
LOC, eLOC, lLOC, and cLOC estimations provided by the RSM tool are default and accurate.
Cyclomatic complexity, interface, and overall complexity are measured by the RSM tool.
(Report: Complexity, Functional Cyclomatic and Interface)
Reference:

1- (Msquare technologies LLc )

https://msquaredtechnologies.com/

2- (Msquare technologies LLc, loc summary )

https://msquaredtechnologies.com/LOC-Summary.html#:~:text=Lines%20of%20Code%2C
%20LOC%20is,stand%20alone%20parenthesis%20or%20braces.

3- (Cyclomatic Complexity, Mar 13, 2023)

https://www.geeksforgeeks.org/cyclomatic-complexity/

4- (Report: Complexity, Functional Cyclomatic and Interface)

https://www.ic.unicamp.br/~eliane/Cursos/RSM/rsm_exemplo2.htm

5- (Software Engineering | Halstead’s Software Metrics, 05 Aug, 2020)

http://jeffreypoulin.info/Papers/ICSR94/icsr94.pdf

https://www.geeksforgeeks.org/software-engineering-halsteads-software-metrics/

6- (An Approach For Calculation Of Reusability Metrics Of Object Oriented)

https://www.ijert.org/research/an-approach-for-calculation-of-reusability-metrics-of-object-
oriented-program-IJERTV2IS60942.pdf

7-source code

https://www.geeksforgeeks.org/tic-tac-toe-game-in-java/

https://www.ic.unicamp.br/~eliane/Cursos/RSM/rsm_descricao.htm

You might also like