SlideShare a Scribd company logo
ScaMaha:
A Tool for Parsing, Analyzing, and
Visualizing Object-Oriented Software
Systems
Dr. Ra'Fat Al-Msie'deen
Department of Software Engineering, Faculty of IT, Mutah University,
Mutah 61710, Karak, Jordan
rafatalmsiedeen@mutah.edu.jo
https://rafat66.github.io/Al-Msie-Deen/
➢ To cite this version:
R. Al-Msie’deen, “ScaMaha: A Tool for Parsing, Analyzing, and
Visualizing Object-Oriented Software Systems,” International Journal of
Computing and Digital Systems, vol. 17, no. 1, pp. 1-20, 2025.
• URL:
https://www.researchgate.net/publication/386985118_ScaMaha_A_Tool_for_
Parsing_Analyzing_and_Visualizing_Object-Oriented_Software_Systems
ScaMaha:
A Tool for Parsing, Analyzing, and Visualizing Object-Oriented
Software Systems
❖ ScaMaha is a tool for parsing, analyzing, and visualizing OO software systems.
❖ Keywords: Software engineering, Reverse engineering, Software re-engineering, Object-
Oriented source code, Static code analysis, Software visualization, Software metrics,
ScaMaha tool.
❖ ScaMaha tutorial:
▪ https://drive.google.com/drive/folders/11_CItJ2pPq_1CAWswcjRsAZnhmQO6OQ8
❖ ScaMaha: @github
▪ https://github.com/rafat66/ScaMaha
Abstract
• Reverse engineering tools are required to handle the complexity of
software products and the unique requirements of many different tasks,
like software analysis and visualization. Thus, reverse engineering tools
should adapt to a variety of cases.
• Static Code Analysis (SCA) is a technique for analyzing and exploring
software source code without running it.
• Manual review of software source code puts additional effort on
software developers and is a tedious, error-prone, and costly job.
• This paper proposes an original approach (called ScaMaha) for Object-
Oriented (OO) source code analysis and visualization based on SCA.
• ScaMaha is a modular, flexible, and extensible reverse engineering tool.
ScaMaha revolves around a new meta-model and a new code parser,
analyzer, and visualizer.
Abstract …
• ScaMaha parser extracts software source code based on the Abstract
Syntax Tree (AST) and stores this code as a code file.
• The code file includes all software code identifiers, relations, and structural
information.
• ScaMaha analyzer studies and exploits the code files to generate useful
information regarding software source code.
• The software metrics file gives unique metrics regarding software systems, such
as the number of method access relations.
• Software source code visualization plays an important role in software
comprehension.
• Thus, ScaMaha visualizer exploits code files to visualize different aspects of
software source code.
• The visualizer generates unique graphs about software source code, like the
visualization of inheritance relations.
Abstract …
• ScaMaha tool was applied to several case studies from small to large
software systems, such as drawing shapes, mobile photo, health
watcher, rhino, and ArgoUML.
• Results show the scalability, performance, soundness, and accuracy of
ScaMaha tool.
• Evaluation metrics, like precision and recall, demonstrate the accuracy
of ScaMaha in parsing, analyzing, and visualizing software source code,
as all code artifacts (i.e., code file, software metrics file, and code
visualizations) were correctly extracted.
Introduction and Overview
• Reverse engineering tools are necessary to cope with the complexity of software
systems.
• Also, such tools should cope with the specific requirements of the various reverse
engineering tasks, like software comprehension and visualization. Thus, these
tools should adapt to a wide range of cases.
• To analyze software code, tools need to represent it. Such a representation
should be comprehensive. Software comprehension is still a manual activity.
Thus, advanced tools will help developers fully understand complex systems.
• This paper presents ScaMaha tool, which is a reverse engineering tool for
performing software analysis and visualization.
• The core of ScaMaha tool revolves around the meta-model, code parser, code
analyzer, and code visualizer.
• With ScaMaha, tool developers can analyze and visualize software code.
• Also, developers can develop new, specific, and dedicated reverse engineering
tools based on the infrastructure of ScaMaha tool.
Repository
(aka. code
database)
Visualizer Other tools
Parser
Meta-model
Software source code
Corresponds to
Analyzer
Attribute
Method
Package
Class
Belongs to
Package
1..*
Belongs to Class
0..*
0..*
1 1
“Typical infrastructure for re-engineering tools”
Precision
F-measure
Recall
Software source code
Software code metrics file
OUTPUT Code visualizations
CASE STUDY
Drawing shapes software
Mobile photo software
Health watcher software
Rhino software
ArgoUML software
Static code analysis
MAIN ELEMENTS
Code visualizer
Code parser
Code analyzer
TYPE OF CODE ANALYSIS
EVALUATION METRICS
Code file
“The main elements of
ScaMaha approach.”
Use of Code Parser, Analyzer, and Visualizer in this Work
Software
Source Code
Input
ScaMaha
Code Parser
Parsed Code
(Metadata – i.e., an XML file)
Output
Code
Database
ScaMaha
Code Analyzer
Analyzed Code
E.g., Software Metrics
(Metadata – i.e., an XML file)
Output
ScaMaha
Database
ScaMaha Code
Visualizer
Visualized Code
E.g., Inheritance Relations
(Metadata – i.e., DOT file)
Output
An overview of
ScaMaha tool
“Software
engineer”
Browse and import
software code from
the workspace
Run the
ScaMaha tool
Parse software code
using the ScaMaha
parser
Calculate software
code metrics using
the ScaMaha analyzer
Visualize software
code using the
ScaMaha visualizer
Exit the ScaMaha
tool
ScaMaha tool
The use-case
diagram of
ScaMaha tool.
ScaMaha Tool
ScaMaha code parser
ScaMaha code analyzer
ScaMaha code visualizer
“Literature review”
Related Work
• ScaMaha* is a reverse engineering tool for parsing, analyzing, and visualizing
software source code.
• Moose is a well-known reverse engineering tool [1]. It began as a research
project around 24 years ago.
• MODMOOSE is the new version of Moose [2]. Tool developers can develop
specialized reverse engineering tools with MODMOOSE. Moose was based on the
Famix metamodel [3].
[ScaMaha] https://github.com/rafat66/ScaMaha
[1] O. Nierstrasz, S. Ducasse, and T. Gˆırba, “The story of moose: an agile reengineering environment,” in Proceedings of the
10th European Software Engineering Conference held jointly with 13th ACM SIGSOFT International Symposium on
Foundations of Software Engineering, 2005, Lisbon, Portugal, September 5-9, 2005, M. Wermelinger and H. C. Gall, Eds. ACM,
2005, pp. 1–10. [Online]. Available: https://doi.org/10.1145/1081706.1081707
[2] N. Anquetil, A. Etien, M. H. Houekpetodji, B. Verhaeghe, S. Ducasse, C. Toullec, F. Djareddir, J. Sudich, and M. Derras,
“Modular moose: A new generation of software reverse engineering platform,” in Reuse in Emerging Software Engineering
Practices, S. Ben Sassi, S. Ducasse, and H. Mili, Eds. Cham: Springer International Publishing, 2020, pp. 119–134.
https://link.springer.com/chapter/10.1007/978-3-030-64694-3_8
[3] S. Ducasse, N. Anquetil, M. U. Bhatti, A. C. Hora, J. Laval, and T. Gˆırba, “MSE and FAMIX 3.0: an interexchange format and
source code model family,” 2011, [Online]. Available: https://inria.hal.science/hal-00646884/document (Accessed: Feb. 5,
2024).
Related Work ... [continued]
• Bruneliere et al. [4] suggested a semantic and syntax analysis-based
parser for the creation of AST and metrics for multi-language
software systems. Their meta-modeling tool [5] is utilized to analyze
multi-language applications [6].
[4] H. Bruneliere, J. Cabot, F. Jouault, and F. Madiot, “Modisco: a generic and extensible framework for model driven reverse
engineering,” in ASE 2010, 25th IEEE / ACM International Conference on Automated Software Engineering, Antwerp, Belgium,
September 20-24, 2010, C. Pecheur, J. Andrews, and E. D. Nitto, Eds. ACM, 2010, pp. 173–174. [Online]. Available:
https://doi.org/10.1145/1858996.1859032
[5] H. Bruneliere. (2010) MoDisco. [Online]. Available: https://www.eclipse.org/MoDisco/ (Accessed: Feb. 5, 2024).
[6] H. Bruneliere, J. Cabot, G. Dup´e, and F. Madiot, “Modisco: A model driven reverse engineering framework,” Inf. Softw. Technol.,
vol. 56, no. 8, pp. 1012–1032, 2014. [Online]. Available: https://doi.org/10.1016/j.infsof.2014.04.007
Related Work ... [continued]
• VerveineJ is a parser developed in Java that constructs an MSE file from
software source code [7].
• Wettel and Lanza [8] have suggested an automatic tool called CodeCity.
This tool visualizes software source code as a city metaphor. CodeCity is an
interactive, three-dimensional software visualization tool [9].
[7] Moose VerveineJ. (2023) VerveineJ. [Online]. Available: https://modularmoose.org/moose-
wiki/Developers/Parsers/VerveineJ.html (Accessed: Feb. 5, 2024).
[8] R. Wettel and M. Lanza, “Visualizing software systems as cities,” in Proceedings of the 4th IEEE International Workshop on
Visualizing Software for Understanding and Analysis, VISSOFT 2007. IEEE Computer Society, 2007, pp. 92–99. [Online].
Available: https://doi.org/10.1109/VISSOF.2007.4290706
[9] D. Moreno-Lumbreras, R. Minelli, A. Villaverde, J. M. Gonz´alez-Barahona, and M. Lanza, “Codecity: A comparison of on-
screen and virtual reality,” Inf. Softw. Technol., vol. 153, p. 107064, 2023. [Online]. Available:
https://doi.org/10.1016/j.infsof.2022.107064
Related Work ... [continued]
• The Java language has a wide variety of parsers due to its long history of
development, popularity, and huge number of applications nowadays.
• Numerous tools exist that turn software code into a tree-like structure,
such as interpreters and compilers.
• There are several Java parsers for various contexts because there are so
many different Java applications, such as Spoon [10], SrcML [11], and
SuperParser [12].
[10] R. Pawlak, M. Monperrus, N. Petitprez, C. Noguera, and L. Seinturier, “SPOON: A library for implementing analyses and
transformations of java source code,” Softw. Pract. Exp., vol. 46, no. 9, pp. 1155–1179, 2016. [Online]. Available:
https://doi.org/10.1002/spe.2346
[11] M. L. Collard, M. J. Decker, and J. I. Maletic, “SrcML: An infrastructure for the exploration, analysis, and manipulation of
source code: A tool demonstration,” in 2013 IEEE International Conference on Software Maintenance, Eindhoven, The
Netherlands, September 22-28, 2013. IEEE Computer Society, 2013, pp. 516–519. [Online]. Available:
https://doi.org/10.1109/ICSM.2013.85
[12] I. Utkin, E. Spirin, E. Bogomolov, and T. Bryksin, “Evaluating the impact of source code parsers on ML4SE models,” CoRR,
vol. abs / 2206.08713, 2022. [Online]. Available: https://doi.org/10.48550/arXiv.2206.08713
Related Work ... [continued]
• The methods of software source code visualization have become increasingly
utilized to support software engineers in software understanding. In software
visualization, some methods aim at displaying software source code in a
recognized environment, like a forest [13] or a city.
• Another method is to generate what is called a polymetric view [14], described as
a lightweight visualization technique supplemented with several metrics
regarding software code.
• ScaMaha visualizes different aspects of software source code, such as code
organization and relations.
[13] U. Erra and G. Scanniello, “Towards the visualization of software systems as 3D forests: the codeTrees environment,” in
Proceedings of the ACM Symposium on Applied Computing, SAC 2012, Riva, Trento, Italy, March 26-30, 2012, S. Ossowski and
P. Lecca, Eds. ACM, 2012, pp. 981–988. [Online]. Available: https://doi.org/10.1145/2245276.2245467
[14] M. Lanza and S. Ducasse, “Polymetric views - A lightweight visual approach to reverse engineering,” IEEE Trans. Software
Eng., vol. 29, no. 9, pp. 782–795, 2003. [Online]. Available: https://doi.org/10.1109/TSE.2003.1232284
Related Work ... [continued]
• Lyons et al. [15] have suggested the lightweight multilingual software analysis
method to analyze software systems. They use several code parsers, one for
every programming language. The main goal of this work is to create a software
engineering tool that addresses large and complex software systems in a
lightweight and extensible style.
• The current version of the ScaMaha tool uses only one code parser for the Java
language.
[15] D. M. Lyons, A. M. Bogar, and D. Baird, “Lightweight multilingual software analysis,” in Proceedings of the 12th
International Conference on Software Technologies, ICSOFT 2017, Madrid, Spain, July 24-26, 2017, J. Cardoso, L. A.
Maciaszek, M. van Sinderen, and E. Cabello, Eds. SciTePress, 2017, pp. 201–207. [Online]. Available:
https://doi.org/10.5220/0006392502010207
“ScaMaha tool”
Browse and Select OO Software Systems
Parse Software Code with ScaMaha Parser
Code File
OO Source Code (e.g., Java and C++)
Perform Code Analysis &
Extract Code Metrics Via
ScaMaha Analyzer
select
parse
export
import
E.g., Software Metrics File E.g., Code Visualization
Visualize Software
Code Via ScaMaha
Visualizer
Code Identifiers
Code Relations
Code Meta-model
Static Code Analysis
Analyzing and visualizing OO
source code with ScaMaha tool
The core of ScaMaha meta-model
• ScaMaha operates on a model of software source code, namely
ScaMaha model.
• To analyze the OO software system, you must first create a model of it
using ScaMaha.
• Figure “The core of ScaMaha meta-model” shows the core of
ScaMaha meta-model.
• This meta model shows the main OO software identifiers, like
software packages, classes, attributes, and methods.
The core of ScaMaha meta-model
• Moreover, this meta model displays the main OO software
relationships, such as inheritance, method invocation, and attribute
access.
• The core of ScaMaha involves a language-independent meta-model
that can show several OO languages in a uniform style.
• In most cases, the developer gets sufficient information if he explores
the basic types of entities that model an OO software system. These
are code identifiers (e.g., package) and the relationships (e.g.,
inheritance) between them.
The core of ScaMaha meta-model
Name
Attribute
Name
Method
Method Invocation
Name
Parameter
Attribute Access
Accessed In
Has a
Software Product
Source Code
Name
Release
Name
Package
1..*
Name
Class
Belongs to
Package
1..*
Belongs to
Class
Text
Comment
0..*
0..*
0..*
Text
Comment
0..*
Name
Local Variable
Belongs to
Method
0..*
0..*
Has accesses
Has Candidates
0..*
1
0..*
0..*
Invoked
by
1
1
1 0..*
1
1
Inheritance
Has
superclass
1 0..*
1 Subclass
The core of
ScaMaha
meta-model.
ScaMaha tool - An overview of the core parts of the ScaMaha tool
Output
Code visualization
E.g., Inheritance Relations
(Metadata – i.e., png, svg, pdf)
Output
Code file
(Metadata – i.e., an XML file)
Data
Importer
Input
Software Source Code
Exporter
Output
Software metrics file
(Metadata – i.e., an XML file)
“ScaMaha tool”
Code Parser
Code Analyzer
Code Visualizer
Code meta-model
An overview of the
core parts of
ScaMaha tool.
Browse and Select Java Software
Parse Java Code with ScaMaha Parser
XML File
Java Source Code
export
parse
import
select
Source Code
load
Visualize Software
Code
Software code as an
XML file “code file”
Extract Main
Software Metrics
Software metrics
as an XML file
Code graphs (png,
svg, pdf, etc.)
Load ScaMaha Model of Java Source Code
ScaMaha Analyzer ScaMaha Visualizer
The Java
implementation of
ScaMaha tool.
XML format corresponding to ScaMaha meta-model
• In this work, XML is a generic file format that represents ScaMaha
code model.
• Thus, ScaMaha parser converts OO source code to an XML file format.
• ScaMaha parser produces an XML file for each software product.
• This file includes all code entities (or identifiers) and relationships (or
dependencies) between those entities.
• Listing “XML format corresponding to ScaMaha meta-model” shows
the XML format corresponding to ScaMaha meta-model.
XML format
corresponding to ScaMaha
meta-model.
The code file of
mobile photo
software as an XML
file (partial) [16].
Software code metrics of ScaMaha code analyzer
Software code metrics for Rhino software
ScaMaha tool in a nutshell
▪ ScaMaha is a tool for software code analysis and visualization.
▪ Also, it is a creative tool to navigate, analyze, and visualize OO
software systems.
▪ Moreover, ScaMaha helps software developers to cheaply construct
custom analyses of software code.
▪ ScaMaha implementation is based on Java, and it’s an open-source
tool.
ScaMaha tool in a nutshell
▪ ScaMaha can’t be used to analyze the dynamic execution of
software.
▪ So, it uses SCA, which is a method of exploring the software code
without running it.
▪ The current version of ScaMaha is shipped with a Java code parser.
▪ Also, this tool uses the XML structure to represent software code.
▪ Thus, XML is a file format that describes ScaMaha meta-model.
▪ XML is generated by an internally provided code parser.
▪ In this work, ScaMaha meta-model is an abstract representation of
software source code.
ScaMaha tool in a nutshell
▪ In general, it presents software code entities and relations.
▪ The code meta-model of ScaMaha is a generic model, and it may
describe software systems written in Java and C ++ (i.e., OO
languages).
▪ Also, ScaMaha tool includes a code analyzer and visualizer.
▪ The code analyzer (resp. visualizer) uses the generated XML file from
the code parser.
▪ ScaMaha analyzer (resp. visualizer) generates software code metrics
(resp. visualizations).
ScaMaha tool in a nutshell
▪ ScaMaha visualizer is an integral part of the tool that allows
developers to visualize dependencies between classes and methods.
▪ In addition, ScaMaha visualizer gives a polymetric view of software
based on its packages.
▪ Additionally, ScaMaha Visualizer generates tag clouds derived from
software source code, specifically from software identifiers.
▪ Also, it reveals, in a unique visualization, the organization (or
structure) of software code.
▪ Software engineers view and explore the generated code artifacts
via ScaMaha tool to understand and analyze the chosen software
systems.
An architectural view of ScaMaha
tool in a simplified structure.
<< Component >>
ScaMaha Parser
[Static Code Analysis]
<< Java Source Code >>
[Software Product]
<< Code File >>
[ScaMaha Meta-model,
XML File]
uses
produces
<< Component >>
ScaMaha Analyzer
uses
<< Software Metrics File >>
[XML File - Metadata]
<< Component >>
ScaMaha
<< Component >>
JDOM Library
uses
<< Component >>
ScaMaha Visualizer
uses
<< Component >>
Graphviz Library
produces
uses
uses
<< DOT File >>
[Graph Description Language]
produces
uses
<< Graph Visualization >>
[SVG, PNG, PDF, or GIF File]
produces
Software
source code
Metrics File
Code Graphs
Source Code
Code File
Dot File
<< Code File >>
[ScaMaha Meta-model,
XML File]
Code file,
metrics file, and
code graphs
uses produces
Experimentation
Experimentation
Visualization of method invocation relations
for mobile photo software (partial).
Visualization of class inheritance
relations for mobile photo software
(partial).
Polymetric view of mobile photo software
based on its packages.
This view uses the following metrics for each
package: LOC, NOC, NOA, NOM, NOCo, NOLv,
NOIn, NOI, and NOAc.
Code organization visualization of
mobile photo software (partial)
Software code metrics files
Polymetric view of drawing shapes software based on its packages. This
view uses the following metrics for each package: LOC, NOC, NOA, NOM,
NOCo, NOLv, NOIn, NOI, and NOAc.
Visualization of class
inheritance relations for
drawing shapes software.
Tag cloud extracted from the
drawing shapes software using
ScaMaha.
The figure above shows a tag cloud generated from the source code of the drawing shapes
software using ScaMaha. It highlights key software identifiers, including package names,
class names, attribute names, and method names. Larger tags represent higher frequency
and importance, with tag frequencies displayed in red within square brackets.
The code file of drawing shapes
software as an XML file (partial) [16].
Conclusion
• This paper has presented ScaMaha, a tool for parsing, analyzing, and
visualizing OO source code like Java.
• ScaMaha is designed to prevent software engineers from wasting
their resources, like effort and time, on manual review of software
source code in order to understand it.
• The main goal of ScaMaha tool is to assist software engineers in the
process of understanding complex and large-sized software systems.
• Various categories of users, such as scholars in the field of software
analysis and tool creators, will exploit ScaMaha tool in their works.
Conclusion …
• In summary, ScaMaha extracts code identifiers and relationships,
generates a metrics file with statistical data, and produces unique
graphs to effectively visualize software code.
• ScaMaha had been validated and evaluated on several case studies,
including drawing shapes, mobile photo, health watcher, rhino, and
ArgoUML software.
• The results of the experiments show the capacity of ScaMaha to
recover all software artifacts in an efficient and accurate manner.
• The evaluation metrics of ScaMaha, like precision and recall, show the
accuracy of ScaMaha in parsing, analyzing, and visualizing software
source code, as all source code artifacts were correctly obtained.
Future Work
• Regarding ScaMaha's future work, the author plans to extend the
current tool by developing a comprehensive tool's parser for all OO
languages, like Java and C++.
• Moreover, additional experimental tests can be performed to verify
ScaMaha contributions utilizing open-source and industrial software
systems.
• Also, the author plans to conduct a comprehensive survey regarding
current approaches that relate to ScaMaha contributions.
• Finally, the author of ScaMaha tool plans to extend the current work
by developing a general tool for performing various kinds of analyses
and visualizations of any OO software system.
References
[16] R. A. A. Al-Msie’deen. (2023) ScaMaha. [Online]. Available:
https://drive.google.com/drive/folders/11_CItJ2pPq_1CAWswcjRsAZnhmQO6OQ8
(Accessed: Feb. 5, 2024).
A Tool for Parsing,
Analyzing, and
Visualizing Object-
Oriented Software
Systems
ScaMaha tool
Dr. Ra'Fat Al-Msie'deen
ScaMaha:
A Tool for Parsing, Analyzing, and
Visualizing Object-Oriented Software
Systems
Dr. Ra'Fat Al-Msie'deen
Department of Software Engineering, Faculty of IT, Mutah University,
Mutah 61710, Karak, Jordan
rafatalmsiedeen@mutah.edu.jo
https://rafat66.github.io/Al-Msie-Deen/

More Related Content

Similar to ScaMaha: A Tool for Parsing, Analyzing, and Visualizing Object-Oriented Software Systems (20)

PDF
20080115 04 - La qualimétrie pour comprendre et appréhender les SI
LeClubQualiteLogicielle
 
PDF
A Taxonomy for Program Metamodels in Program Reverse Engineering
Hironori Washizaki
 
PDF
Recovery of Traceability Links and Behavior Models for Software Maintenance,...
Hironori Washizaki
 
PDF
Perspectives on Software Visualization
Förderverein Technische Fakultät
 
PDF
Analyze your software assets with Modisco par Frédéric Madiot
EclipseDayParis
 
PPTX
Source code visualization (SourceViz)
Anas Bilal
 
PDF
an analysis and new methodology for reverse engineering of uml behavioral
INFOGAIN PUBLICATION
 
PDF
Software Analytics - Achievements and Challenges
Tao Xie
 
PDF
CORRELATING FEATURES AND CODE BY DYNAMIC AND SEMANTIC ANALYSIS
ijseajournal
 
PDF
Graph-Based Analysis and Visualization of Software Traces [SSP 2019]
Richard Müller
 
PDF
Automating the Generation of Benchmark Suites
Ben Hermann
 
PDF
2011 famoosr
bergel
 
PDF
FAMOOSr 2011
ESUG
 
DOCX
V_Sound(Visualize Softwar and Understand the Document)
Imdad Ul Haq
 
PDF
Software Archaeology
Chris Bailey
 
PDF
Software Analytics: Data Analytics for Software Engineering
Tao Xie
 
PDF
SOFTWARE DESIGN ANALYSIS WITH DYNAMIC SYSTEM RUN-TIME ARCHITECTURE DECOMPOSITION
ijseajournal
 
PDF
Creating and Analyzing Source Code Repository Models - A Model-based Approach...
Markus Scheidgen
 
PPT
0329.emccormi.ppt
chmeghana1
 
PDF
Reference Representation in Large Metamodel-based Datasets
Markus Scheidgen
 
20080115 04 - La qualimétrie pour comprendre et appréhender les SI
LeClubQualiteLogicielle
 
A Taxonomy for Program Metamodels in Program Reverse Engineering
Hironori Washizaki
 
Recovery of Traceability Links and Behavior Models for Software Maintenance,...
Hironori Washizaki
 
Perspectives on Software Visualization
Förderverein Technische Fakultät
 
Analyze your software assets with Modisco par Frédéric Madiot
EclipseDayParis
 
Source code visualization (SourceViz)
Anas Bilal
 
an analysis and new methodology for reverse engineering of uml behavioral
INFOGAIN PUBLICATION
 
Software Analytics - Achievements and Challenges
Tao Xie
 
CORRELATING FEATURES AND CODE BY DYNAMIC AND SEMANTIC ANALYSIS
ijseajournal
 
Graph-Based Analysis and Visualization of Software Traces [SSP 2019]
Richard Müller
 
Automating the Generation of Benchmark Suites
Ben Hermann
 
2011 famoosr
bergel
 
FAMOOSr 2011
ESUG
 
V_Sound(Visualize Softwar and Understand the Document)
Imdad Ul Haq
 
Software Archaeology
Chris Bailey
 
Software Analytics: Data Analytics for Software Engineering
Tao Xie
 
SOFTWARE DESIGN ANALYSIS WITH DYNAMIC SYSTEM RUN-TIME ARCHITECTURE DECOMPOSITION
ijseajournal
 
Creating and Analyzing Source Code Repository Models - A Model-based Approach...
Markus Scheidgen
 
0329.emccormi.ppt
chmeghana1
 
Reference Representation in Large Metamodel-based Datasets
Markus Scheidgen
 

More from Ra'Fat Al-Msie'deen (20)

PDF
Smart City: Definitions, Architectures, Development Life Cycle, Technologies,...
Ra'Fat Al-Msie'deen
 
PDF
Software evolution understanding: Automatic extraction of software identifier...
Ra'Fat Al-Msie'deen
 
PDF
FeatureClouds: Naming the Identified Feature Implementation Blocks from Softw...
Ra'Fat Al-Msie'deen
 
PDF
Requirements Traceability: Recovering and Visualizing Traceability Links Betw...
Ra'Fat Al-Msie'deen
 
PDF
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
Ra'Fat Al-Msie'deen
 
PDF
Supporting software documentation with source code summarization
Ra'Fat Al-Msie'deen
 
PDF
SoftCloud: A Tool for Visualizing Software Artifacts as Tag Clouds.pdf
Ra'Fat Al-Msie'deen
 
PDF
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports.pdf
Ra'Fat Al-Msie'deen
 
PDF
Requirements Traceability: Recovering and Visualizing Traceability Links Betw...
Ra'Fat Al-Msie'deen
 
PDF
Automatic Labeling of the Object-oriented Source Code: The Lotus Approach
Ra'Fat Al-Msie'deen
 
PDF
Constructing a software requirements specification and design for electronic ...
Ra'Fat Al-Msie'deen
 
PDF
Detecting commonality and variability in use-case diagram variants
Ra'Fat Al-Msie'deen
 
PDF
Naming the Identified Feature Implementation Blocks from Software Source Code
Ra'Fat Al-Msie'deen
 
PPTX
Application architectures - Software Architecture and Design
Ra'Fat Al-Msie'deen
 
PPTX
Planning and writing your documents - Software documentation
Ra'Fat Al-Msie'deen
 
PPTX
Requirements management planning & Requirements change management
Ra'Fat Al-Msie'deen
 
PPTX
Requirements change - requirements engineering
Ra'Fat Al-Msie'deen
 
PPTX
Requirements validation - requirements engineering
Ra'Fat Al-Msie'deen
 
PPTX
Software Documentation - writing to support - references
Ra'Fat Al-Msie'deen
 
PPTX
Algorithms - "heap sort"
Ra'Fat Al-Msie'deen
 
Smart City: Definitions, Architectures, Development Life Cycle, Technologies,...
Ra'Fat Al-Msie'deen
 
Software evolution understanding: Automatic extraction of software identifier...
Ra'Fat Al-Msie'deen
 
FeatureClouds: Naming the Identified Feature Implementation Blocks from Softw...
Ra'Fat Al-Msie'deen
 
Requirements Traceability: Recovering and Visualizing Traceability Links Betw...
Ra'Fat Al-Msie'deen
 
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
Ra'Fat Al-Msie'deen
 
Supporting software documentation with source code summarization
Ra'Fat Al-Msie'deen
 
SoftCloud: A Tool for Visualizing Software Artifacts as Tag Clouds.pdf
Ra'Fat Al-Msie'deen
 
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports.pdf
Ra'Fat Al-Msie'deen
 
Requirements Traceability: Recovering and Visualizing Traceability Links Betw...
Ra'Fat Al-Msie'deen
 
Automatic Labeling of the Object-oriented Source Code: The Lotus Approach
Ra'Fat Al-Msie'deen
 
Constructing a software requirements specification and design for electronic ...
Ra'Fat Al-Msie'deen
 
Detecting commonality and variability in use-case diagram variants
Ra'Fat Al-Msie'deen
 
Naming the Identified Feature Implementation Blocks from Software Source Code
Ra'Fat Al-Msie'deen
 
Application architectures - Software Architecture and Design
Ra'Fat Al-Msie'deen
 
Planning and writing your documents - Software documentation
Ra'Fat Al-Msie'deen
 
Requirements management planning & Requirements change management
Ra'Fat Al-Msie'deen
 
Requirements change - requirements engineering
Ra'Fat Al-Msie'deen
 
Requirements validation - requirements engineering
Ra'Fat Al-Msie'deen
 
Software Documentation - writing to support - references
Ra'Fat Al-Msie'deen
 
Algorithms - "heap sort"
Ra'Fat Al-Msie'deen
 
Ad

Recently uploaded (20)

PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PDF
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
PDF
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PPTX
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PDF
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
Horarios de distribución de agua en julio
pegazohn1978
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Ad

ScaMaha: A Tool for Parsing, Analyzing, and Visualizing Object-Oriented Software Systems

  • 1. ScaMaha: A Tool for Parsing, Analyzing, and Visualizing Object-Oriented Software Systems Dr. Ra'Fat Al-Msie'deen Department of Software Engineering, Faculty of IT, Mutah University, Mutah 61710, Karak, Jordan [email protected] https://rafat66.github.io/Al-Msie-Deen/
  • 2. ➢ To cite this version: R. Al-Msie’deen, “ScaMaha: A Tool for Parsing, Analyzing, and Visualizing Object-Oriented Software Systems,” International Journal of Computing and Digital Systems, vol. 17, no. 1, pp. 1-20, 2025. • URL: https://www.researchgate.net/publication/386985118_ScaMaha_A_Tool_for_ Parsing_Analyzing_and_Visualizing_Object-Oriented_Software_Systems
  • 3. ScaMaha: A Tool for Parsing, Analyzing, and Visualizing Object-Oriented Software Systems ❖ ScaMaha is a tool for parsing, analyzing, and visualizing OO software systems. ❖ Keywords: Software engineering, Reverse engineering, Software re-engineering, Object- Oriented source code, Static code analysis, Software visualization, Software metrics, ScaMaha tool. ❖ ScaMaha tutorial: ▪ https://drive.google.com/drive/folders/11_CItJ2pPq_1CAWswcjRsAZnhmQO6OQ8 ❖ ScaMaha: @github ▪ https://github.com/rafat66/ScaMaha
  • 4. Abstract • Reverse engineering tools are required to handle the complexity of software products and the unique requirements of many different tasks, like software analysis and visualization. Thus, reverse engineering tools should adapt to a variety of cases. • Static Code Analysis (SCA) is a technique for analyzing and exploring software source code without running it. • Manual review of software source code puts additional effort on software developers and is a tedious, error-prone, and costly job. • This paper proposes an original approach (called ScaMaha) for Object- Oriented (OO) source code analysis and visualization based on SCA. • ScaMaha is a modular, flexible, and extensible reverse engineering tool. ScaMaha revolves around a new meta-model and a new code parser, analyzer, and visualizer.
  • 5. Abstract … • ScaMaha parser extracts software source code based on the Abstract Syntax Tree (AST) and stores this code as a code file. • The code file includes all software code identifiers, relations, and structural information. • ScaMaha analyzer studies and exploits the code files to generate useful information regarding software source code. • The software metrics file gives unique metrics regarding software systems, such as the number of method access relations. • Software source code visualization plays an important role in software comprehension. • Thus, ScaMaha visualizer exploits code files to visualize different aspects of software source code. • The visualizer generates unique graphs about software source code, like the visualization of inheritance relations.
  • 6. Abstract … • ScaMaha tool was applied to several case studies from small to large software systems, such as drawing shapes, mobile photo, health watcher, rhino, and ArgoUML. • Results show the scalability, performance, soundness, and accuracy of ScaMaha tool. • Evaluation metrics, like precision and recall, demonstrate the accuracy of ScaMaha in parsing, analyzing, and visualizing software source code, as all code artifacts (i.e., code file, software metrics file, and code visualizations) were correctly extracted.
  • 7. Introduction and Overview • Reverse engineering tools are necessary to cope with the complexity of software systems. • Also, such tools should cope with the specific requirements of the various reverse engineering tasks, like software comprehension and visualization. Thus, these tools should adapt to a wide range of cases. • To analyze software code, tools need to represent it. Such a representation should be comprehensive. Software comprehension is still a manual activity. Thus, advanced tools will help developers fully understand complex systems. • This paper presents ScaMaha tool, which is a reverse engineering tool for performing software analysis and visualization. • The core of ScaMaha tool revolves around the meta-model, code parser, code analyzer, and code visualizer. • With ScaMaha, tool developers can analyze and visualize software code. • Also, developers can develop new, specific, and dedicated reverse engineering tools based on the infrastructure of ScaMaha tool.
  • 8. Repository (aka. code database) Visualizer Other tools Parser Meta-model Software source code Corresponds to Analyzer Attribute Method Package Class Belongs to Package 1..* Belongs to Class 0..* 0..* 1 1 “Typical infrastructure for re-engineering tools”
  • 9. Precision F-measure Recall Software source code Software code metrics file OUTPUT Code visualizations CASE STUDY Drawing shapes software Mobile photo software Health watcher software Rhino software ArgoUML software Static code analysis MAIN ELEMENTS Code visualizer Code parser Code analyzer TYPE OF CODE ANALYSIS EVALUATION METRICS Code file “The main elements of ScaMaha approach.”
  • 10. Use of Code Parser, Analyzer, and Visualizer in this Work Software Source Code Input ScaMaha Code Parser Parsed Code (Metadata – i.e., an XML file) Output Code Database ScaMaha Code Analyzer Analyzed Code E.g., Software Metrics (Metadata – i.e., an XML file) Output ScaMaha Database ScaMaha Code Visualizer Visualized Code E.g., Inheritance Relations (Metadata – i.e., DOT file) Output An overview of ScaMaha tool
  • 11. “Software engineer” Browse and import software code from the workspace Run the ScaMaha tool Parse software code using the ScaMaha parser Calculate software code metrics using the ScaMaha analyzer Visualize software code using the ScaMaha visualizer Exit the ScaMaha tool ScaMaha tool The use-case diagram of ScaMaha tool.
  • 17. Related Work • ScaMaha* is a reverse engineering tool for parsing, analyzing, and visualizing software source code. • Moose is a well-known reverse engineering tool [1]. It began as a research project around 24 years ago. • MODMOOSE is the new version of Moose [2]. Tool developers can develop specialized reverse engineering tools with MODMOOSE. Moose was based on the Famix metamodel [3]. [ScaMaha] https://github.com/rafat66/ScaMaha [1] O. Nierstrasz, S. Ducasse, and T. Gˆırba, “The story of moose: an agile reengineering environment,” in Proceedings of the 10th European Software Engineering Conference held jointly with 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering, 2005, Lisbon, Portugal, September 5-9, 2005, M. Wermelinger and H. C. Gall, Eds. ACM, 2005, pp. 1–10. [Online]. Available: https://doi.org/10.1145/1081706.1081707 [2] N. Anquetil, A. Etien, M. H. Houekpetodji, B. Verhaeghe, S. Ducasse, C. Toullec, F. Djareddir, J. Sudich, and M. Derras, “Modular moose: A new generation of software reverse engineering platform,” in Reuse in Emerging Software Engineering Practices, S. Ben Sassi, S. Ducasse, and H. Mili, Eds. Cham: Springer International Publishing, 2020, pp. 119–134. https://link.springer.com/chapter/10.1007/978-3-030-64694-3_8 [3] S. Ducasse, N. Anquetil, M. U. Bhatti, A. C. Hora, J. Laval, and T. Gˆırba, “MSE and FAMIX 3.0: an interexchange format and source code model family,” 2011, [Online]. Available: https://inria.hal.science/hal-00646884/document (Accessed: Feb. 5, 2024).
  • 18. Related Work ... [continued] • Bruneliere et al. [4] suggested a semantic and syntax analysis-based parser for the creation of AST and metrics for multi-language software systems. Their meta-modeling tool [5] is utilized to analyze multi-language applications [6]. [4] H. Bruneliere, J. Cabot, F. Jouault, and F. Madiot, “Modisco: a generic and extensible framework for model driven reverse engineering,” in ASE 2010, 25th IEEE / ACM International Conference on Automated Software Engineering, Antwerp, Belgium, September 20-24, 2010, C. Pecheur, J. Andrews, and E. D. Nitto, Eds. ACM, 2010, pp. 173–174. [Online]. Available: https://doi.org/10.1145/1858996.1859032 [5] H. Bruneliere. (2010) MoDisco. [Online]. Available: https://www.eclipse.org/MoDisco/ (Accessed: Feb. 5, 2024). [6] H. Bruneliere, J. Cabot, G. Dup´e, and F. Madiot, “Modisco: A model driven reverse engineering framework,” Inf. Softw. Technol., vol. 56, no. 8, pp. 1012–1032, 2014. [Online]. Available: https://doi.org/10.1016/j.infsof.2014.04.007
  • 19. Related Work ... [continued] • VerveineJ is a parser developed in Java that constructs an MSE file from software source code [7]. • Wettel and Lanza [8] have suggested an automatic tool called CodeCity. This tool visualizes software source code as a city metaphor. CodeCity is an interactive, three-dimensional software visualization tool [9]. [7] Moose VerveineJ. (2023) VerveineJ. [Online]. Available: https://modularmoose.org/moose- wiki/Developers/Parsers/VerveineJ.html (Accessed: Feb. 5, 2024). [8] R. Wettel and M. Lanza, “Visualizing software systems as cities,” in Proceedings of the 4th IEEE International Workshop on Visualizing Software for Understanding and Analysis, VISSOFT 2007. IEEE Computer Society, 2007, pp. 92–99. [Online]. Available: https://doi.org/10.1109/VISSOF.2007.4290706 [9] D. Moreno-Lumbreras, R. Minelli, A. Villaverde, J. M. Gonz´alez-Barahona, and M. Lanza, “Codecity: A comparison of on- screen and virtual reality,” Inf. Softw. Technol., vol. 153, p. 107064, 2023. [Online]. Available: https://doi.org/10.1016/j.infsof.2022.107064
  • 20. Related Work ... [continued] • The Java language has a wide variety of parsers due to its long history of development, popularity, and huge number of applications nowadays. • Numerous tools exist that turn software code into a tree-like structure, such as interpreters and compilers. • There are several Java parsers for various contexts because there are so many different Java applications, such as Spoon [10], SrcML [11], and SuperParser [12]. [10] R. Pawlak, M. Monperrus, N. Petitprez, C. Noguera, and L. Seinturier, “SPOON: A library for implementing analyses and transformations of java source code,” Softw. Pract. Exp., vol. 46, no. 9, pp. 1155–1179, 2016. [Online]. Available: https://doi.org/10.1002/spe.2346 [11] M. L. Collard, M. J. Decker, and J. I. Maletic, “SrcML: An infrastructure for the exploration, analysis, and manipulation of source code: A tool demonstration,” in 2013 IEEE International Conference on Software Maintenance, Eindhoven, The Netherlands, September 22-28, 2013. IEEE Computer Society, 2013, pp. 516–519. [Online]. Available: https://doi.org/10.1109/ICSM.2013.85 [12] I. Utkin, E. Spirin, E. Bogomolov, and T. Bryksin, “Evaluating the impact of source code parsers on ML4SE models,” CoRR, vol. abs / 2206.08713, 2022. [Online]. Available: https://doi.org/10.48550/arXiv.2206.08713
  • 21. Related Work ... [continued] • The methods of software source code visualization have become increasingly utilized to support software engineers in software understanding. In software visualization, some methods aim at displaying software source code in a recognized environment, like a forest [13] or a city. • Another method is to generate what is called a polymetric view [14], described as a lightweight visualization technique supplemented with several metrics regarding software code. • ScaMaha visualizes different aspects of software source code, such as code organization and relations. [13] U. Erra and G. Scanniello, “Towards the visualization of software systems as 3D forests: the codeTrees environment,” in Proceedings of the ACM Symposium on Applied Computing, SAC 2012, Riva, Trento, Italy, March 26-30, 2012, S. Ossowski and P. Lecca, Eds. ACM, 2012, pp. 981–988. [Online]. Available: https://doi.org/10.1145/2245276.2245467 [14] M. Lanza and S. Ducasse, “Polymetric views - A lightweight visual approach to reverse engineering,” IEEE Trans. Software Eng., vol. 29, no. 9, pp. 782–795, 2003. [Online]. Available: https://doi.org/10.1109/TSE.2003.1232284
  • 22. Related Work ... [continued] • Lyons et al. [15] have suggested the lightweight multilingual software analysis method to analyze software systems. They use several code parsers, one for every programming language. The main goal of this work is to create a software engineering tool that addresses large and complex software systems in a lightweight and extensible style. • The current version of the ScaMaha tool uses only one code parser for the Java language. [15] D. M. Lyons, A. M. Bogar, and D. Baird, “Lightweight multilingual software analysis,” in Proceedings of the 12th International Conference on Software Technologies, ICSOFT 2017, Madrid, Spain, July 24-26, 2017, J. Cardoso, L. A. Maciaszek, M. van Sinderen, and E. Cabello, Eds. SciTePress, 2017, pp. 201–207. [Online]. Available: https://doi.org/10.5220/0006392502010207
  • 24. Browse and Select OO Software Systems Parse Software Code with ScaMaha Parser Code File OO Source Code (e.g., Java and C++) Perform Code Analysis & Extract Code Metrics Via ScaMaha Analyzer select parse export import E.g., Software Metrics File E.g., Code Visualization Visualize Software Code Via ScaMaha Visualizer Code Identifiers Code Relations Code Meta-model Static Code Analysis Analyzing and visualizing OO source code with ScaMaha tool
  • 25. The core of ScaMaha meta-model • ScaMaha operates on a model of software source code, namely ScaMaha model. • To analyze the OO software system, you must first create a model of it using ScaMaha. • Figure “The core of ScaMaha meta-model” shows the core of ScaMaha meta-model. • This meta model shows the main OO software identifiers, like software packages, classes, attributes, and methods.
  • 26. The core of ScaMaha meta-model • Moreover, this meta model displays the main OO software relationships, such as inheritance, method invocation, and attribute access. • The core of ScaMaha involves a language-independent meta-model that can show several OO languages in a uniform style. • In most cases, the developer gets sufficient information if he explores the basic types of entities that model an OO software system. These are code identifiers (e.g., package) and the relationships (e.g., inheritance) between them.
  • 27. The core of ScaMaha meta-model
  • 28. Name Attribute Name Method Method Invocation Name Parameter Attribute Access Accessed In Has a Software Product Source Code Name Release Name Package 1..* Name Class Belongs to Package 1..* Belongs to Class Text Comment 0..* 0..* 0..* Text Comment 0..* Name Local Variable Belongs to Method 0..* 0..* Has accesses Has Candidates 0..* 1 0..* 0..* Invoked by 1 1 1 0..* 1 1 Inheritance Has superclass 1 0..* 1 Subclass The core of ScaMaha meta-model.
  • 29. ScaMaha tool - An overview of the core parts of the ScaMaha tool Output Code visualization E.g., Inheritance Relations (Metadata – i.e., png, svg, pdf) Output Code file (Metadata – i.e., an XML file) Data Importer Input Software Source Code Exporter Output Software metrics file (Metadata – i.e., an XML file) “ScaMaha tool” Code Parser Code Analyzer Code Visualizer Code meta-model An overview of the core parts of ScaMaha tool.
  • 30. Browse and Select Java Software Parse Java Code with ScaMaha Parser XML File Java Source Code export parse import select Source Code load Visualize Software Code Software code as an XML file “code file” Extract Main Software Metrics Software metrics as an XML file Code graphs (png, svg, pdf, etc.) Load ScaMaha Model of Java Source Code ScaMaha Analyzer ScaMaha Visualizer The Java implementation of ScaMaha tool.
  • 31. XML format corresponding to ScaMaha meta-model • In this work, XML is a generic file format that represents ScaMaha code model. • Thus, ScaMaha parser converts OO source code to an XML file format. • ScaMaha parser produces an XML file for each software product. • This file includes all code entities (or identifiers) and relationships (or dependencies) between those entities. • Listing “XML format corresponding to ScaMaha meta-model” shows the XML format corresponding to ScaMaha meta-model.
  • 32. XML format corresponding to ScaMaha meta-model.
  • 33. The code file of mobile photo software as an XML file (partial) [16].
  • 34. Software code metrics of ScaMaha code analyzer
  • 35. Software code metrics for Rhino software
  • 36. ScaMaha tool in a nutshell ▪ ScaMaha is a tool for software code analysis and visualization. ▪ Also, it is a creative tool to navigate, analyze, and visualize OO software systems. ▪ Moreover, ScaMaha helps software developers to cheaply construct custom analyses of software code. ▪ ScaMaha implementation is based on Java, and it’s an open-source tool.
  • 37. ScaMaha tool in a nutshell ▪ ScaMaha can’t be used to analyze the dynamic execution of software. ▪ So, it uses SCA, which is a method of exploring the software code without running it. ▪ The current version of ScaMaha is shipped with a Java code parser. ▪ Also, this tool uses the XML structure to represent software code. ▪ Thus, XML is a file format that describes ScaMaha meta-model. ▪ XML is generated by an internally provided code parser. ▪ In this work, ScaMaha meta-model is an abstract representation of software source code.
  • 38. ScaMaha tool in a nutshell ▪ In general, it presents software code entities and relations. ▪ The code meta-model of ScaMaha is a generic model, and it may describe software systems written in Java and C ++ (i.e., OO languages). ▪ Also, ScaMaha tool includes a code analyzer and visualizer. ▪ The code analyzer (resp. visualizer) uses the generated XML file from the code parser. ▪ ScaMaha analyzer (resp. visualizer) generates software code metrics (resp. visualizations).
  • 39. ScaMaha tool in a nutshell ▪ ScaMaha visualizer is an integral part of the tool that allows developers to visualize dependencies between classes and methods. ▪ In addition, ScaMaha visualizer gives a polymetric view of software based on its packages. ▪ Additionally, ScaMaha Visualizer generates tag clouds derived from software source code, specifically from software identifiers. ▪ Also, it reveals, in a unique visualization, the organization (or structure) of software code. ▪ Software engineers view and explore the generated code artifacts via ScaMaha tool to understand and analyze the chosen software systems.
  • 40. An architectural view of ScaMaha tool in a simplified structure.
  • 41. << Component >> ScaMaha Parser [Static Code Analysis] << Java Source Code >> [Software Product] << Code File >> [ScaMaha Meta-model, XML File] uses produces << Component >> ScaMaha Analyzer uses << Software Metrics File >> [XML File - Metadata] << Component >> ScaMaha << Component >> JDOM Library uses << Component >> ScaMaha Visualizer uses << Component >> Graphviz Library produces uses uses << DOT File >> [Graph Description Language] produces uses << Graph Visualization >> [SVG, PNG, PDF, or GIF File] produces Software source code Metrics File Code Graphs Source Code Code File Dot File << Code File >> [ScaMaha Meta-model, XML File] Code file, metrics file, and code graphs uses produces
  • 44. Visualization of method invocation relations for mobile photo software (partial).
  • 45. Visualization of class inheritance relations for mobile photo software (partial).
  • 46. Polymetric view of mobile photo software based on its packages. This view uses the following metrics for each package: LOC, NOC, NOA, NOM, NOCo, NOLv, NOIn, NOI, and NOAc.
  • 47. Code organization visualization of mobile photo software (partial)
  • 49. Polymetric view of drawing shapes software based on its packages. This view uses the following metrics for each package: LOC, NOC, NOA, NOM, NOCo, NOLv, NOIn, NOI, and NOAc.
  • 50. Visualization of class inheritance relations for drawing shapes software.
  • 51. Tag cloud extracted from the drawing shapes software using ScaMaha. The figure above shows a tag cloud generated from the source code of the drawing shapes software using ScaMaha. It highlights key software identifiers, including package names, class names, attribute names, and method names. Larger tags represent higher frequency and importance, with tag frequencies displayed in red within square brackets.
  • 52. The code file of drawing shapes software as an XML file (partial) [16].
  • 53. Conclusion • This paper has presented ScaMaha, a tool for parsing, analyzing, and visualizing OO source code like Java. • ScaMaha is designed to prevent software engineers from wasting their resources, like effort and time, on manual review of software source code in order to understand it. • The main goal of ScaMaha tool is to assist software engineers in the process of understanding complex and large-sized software systems. • Various categories of users, such as scholars in the field of software analysis and tool creators, will exploit ScaMaha tool in their works.
  • 54. Conclusion … • In summary, ScaMaha extracts code identifiers and relationships, generates a metrics file with statistical data, and produces unique graphs to effectively visualize software code. • ScaMaha had been validated and evaluated on several case studies, including drawing shapes, mobile photo, health watcher, rhino, and ArgoUML software. • The results of the experiments show the capacity of ScaMaha to recover all software artifacts in an efficient and accurate manner. • The evaluation metrics of ScaMaha, like precision and recall, show the accuracy of ScaMaha in parsing, analyzing, and visualizing software source code, as all source code artifacts were correctly obtained.
  • 55. Future Work • Regarding ScaMaha's future work, the author plans to extend the current tool by developing a comprehensive tool's parser for all OO languages, like Java and C++. • Moreover, additional experimental tests can be performed to verify ScaMaha contributions utilizing open-source and industrial software systems. • Also, the author plans to conduct a comprehensive survey regarding current approaches that relate to ScaMaha contributions. • Finally, the author of ScaMaha tool plans to extend the current work by developing a general tool for performing various kinds of analyses and visualizations of any OO software system.
  • 56. References [16] R. A. A. Al-Msie’deen. (2023) ScaMaha. [Online]. Available: https://drive.google.com/drive/folders/11_CItJ2pPq_1CAWswcjRsAZnhmQO6OQ8 (Accessed: Feb. 5, 2024).
  • 57. A Tool for Parsing, Analyzing, and Visualizing Object- Oriented Software Systems ScaMaha tool Dr. Ra'Fat Al-Msie'deen
  • 58. ScaMaha: A Tool for Parsing, Analyzing, and Visualizing Object-Oriented Software Systems Dr. Ra'Fat Al-Msie'deen Department of Software Engineering, Faculty of IT, Mutah University, Mutah 61710, Karak, Jordan [email protected] https://rafat66.github.io/Al-Msie-Deen/