YamenTrace
Requirements Traceability:
Recovering and Visualizing Traceability Links
Between Requirements and Source Code of
Object-oriented Software Systems
Ra’Fat Al-Msie’deen
Department of Software Engineering, Faculty of IT, Mutah University, Mutah 61710, Karak,
Jordan
E-mail address: rafatalmsiedeen@mutah.edu.jo
https://rafat66.github.io/Al-Msie-Deen/
YamenTrace
➢ To cite this version:
R. Al-Msie’deen, “Requirements Traceability: Recovering and Visualizing
Traceability Links Between Requirements and Source Code of Object-oriented
Software Systems,” International Journal of Computing and Digital Systems,
vol. 14, no. 1, pp. 279–295, 2023. [Online].Available:
https://journal.uob.edu.bh/handle/123456789/4892
YamenTrace
Abstract
Keywords
Introduction
• Requirements Engineering (RE) aims at discovering, documenting, and maintaining a
collection of requirements for the software system.
• Requirements Management (RM) helps in maintaining requirement evolution during
software development.
• RM is interested in all processes that lead to changing functional requirement of the
software system.
• Requirements Traceability (RT) is the key activity of RM process.
• RM process aims at finding and maintaining a traceability link of a particular
requirement from its origins (or sources), across its specification and development to
its, consequent deployment and use, and over a cycles of continuous improvement
and repetition in any of these stages.
Backward and forward directions of requirement traces
Requirements space Implementation space
Software Requirements
Specification (SRS) document
Software P
Design space
Class x
Forward traceability
Backward traceability
Requirement x
UML
Database
Reports
Dialogs
Forms
Interfaces
YamenTrace
• YamenTrace takes the software requirements and code as its inputs (See
Figure on next slide).
• Then, YamenTrace recovers and visualizes the identified TLs between
Requirements and Source code (RaS).
• The first step of YamenTrace aims at extracting software source code.
• The second step generates all class documents of a given software code.
• Then, in the third step, YamenTrace relies on LSI method to define the
similarity between requirement and class documents.
• Finally, in the fourth step, YamenTrace uses the similarity measure to
identify TLs between RaS by using FCA.
Extracting software source code
Code elements as
XML file
Measuring requirement
and class documents
similarity by using LSI
Constructing LSI corpus
Preprocessing of corpus
documents
Constructing the term-
document and the term-
query matrices for corpus
documents
Constructing the similarity
matrix
Identifying TLs using FCA
Software source
code
Inputs
Generating class documents
Software class
documents
Outputs
Similarity matrix as
binary formal context
3
4
Requirements traceability
1
2
&
Software
requirements
RT recovering
process -
YamenTrace
approach
Formal Concept Analysis (FCA)
Latent Semantic Indexing (LSI)
Latent Semantic Indexing (LSI) --- Cont.
Extracting software source code Code elements as XML file
Measuring requirement
and class documents
similarity by using LSI
Constructing the LSI corpus
Preprocessing of corpus
documents
Constructing the term-document
and the term-query matrices for
corpus documents
Constructing the similarity
matrix
Identifying TLs using FCA
Software source code
Inputs
Generating class documents
Software class documents
Outputs
Similarity matrix as binary
formal context
3
4
Requirements traceability
R1
R2
C1
C3
C2
1
2
Trace
links
Software engineer
Software requirement documents
A Literature
Review of RT
Recovery: A
Mini
Systematic
Survey
• A study of the literature and comparisons of current approaches
showed that there is no study or approach in the literature that uses
the code relations (resp. FCA) in the process of recovering TLs
between software RaS.
• In this paper, LSI is used to measure TS between requirement and
class documents. The use of LSI in YamenTrace is not considered a
novel aspect, as several studies have employed LSI to recover TLs
between RaS.
• On the other hand, FCA technique is used to cluster similar
requirement and class documents together based on TS measured by
LSI.
• The use of FCA here is considered a novel aspect of YamenTrace
approach where it has not been used before in RT studies, especially
in the context of RaS.
• Also, YamenTrace prepares the class document in a novel way, where
it exploits the identifier names, code relations and comments to
construct the class document.
• Existing approaches used class files as it without any preprocessing.
• Finally, YamenTrace visualizes the recovered TLs between RaS.
Summary of RT approaches
(comparison table)
An overview of RT approaches
(comparison table)
RT recovering
process -
YamenTrace
approach.
RT meta model
of YamenTrace
approach
The GUI of Drawing Shapes (DS) application
The code of MyLine class from DS software
The code
elements file
of DS
software
(partial)
Requirements
and their
description of
DS software.
An example of a
class document
(i.e., MyLine) from
DS software.
Extracting software source code Code elements as XML file
Measuring requirement and class
documents similarity by using
LSI
Constructing the LSI corpus
Preprocessing of corpus
documents
Constructing the term-document
and the term-query matrices for
corpus documents
Constructing the similarity
matrix
Identifying TLs using FCA
Software requirement documents
Software source code
Inputs
Generating class documents
Software class documents
Outputs
Similarity matrix as binary formal
context
3
4
Requirements traceability
R1
R2
C1
C3
C2
1
2
YamenTrace
visualization
of the
recovered
TLs from DS
software.
Running
YamenTrace
approach on
MM software
YamenTrace measures the
quality and soundness of
the recovered TLs using
precision and recall
measures.
Precision and recall are
two standard metrics
widely employed in IR
techniques.
YamenTrace Approach - step by step
A. Extracting software source code
B. Generating class documents
C. Measuring requirement and class documents similarity by using LSI
1. Constructing LSI corpus
2. Preprocessing of corpus documents
3. Constructing TDM and TQM for corpus documents
4. Constructing the similarity matrix
D. Identifying TLs using FCA
A. Extracting software source code
B. Generating class documents
C. Measuring requirement and class
documents similarity by using LSI
• To calculate Textual Similarity (TS) between software
requirements and classes, YamenTrace applied LSI technique in
four steps:
1) constructing LSI corpus,
2) preprocessing of corpus documents,
3) constructing TDM and Term-Query Matrix (TQM),
4) constructing the Cosine Similarity Matrix (CSM).
• The similarity of requirement and class documents is constructed
with LSI as detailed in the following.
1. Constructing LSI corpus
2. Preprocessing of corpus documents
3. Constructing TDM and Term-Query Matrix (TQM)
4. Constructing the Cosine Similarity Matrix (CSM).
D. Identifying TLs using FCA
YamenTrace visualization of the recovered TLs
from DS software.
Figure 12 shows
that precision
measure is equal
to 100% for all
recovered TLs,
which means that
all recovered links
are related.
Experimentation
• Mobile Media (MM) is a Java open-source software
system.
✓ This software manipulates media on mobile phones.
• Health Watcher (HW) is a public health system.
✓ It is a Java open-source software system.
✓ HW is a real health complaint software system.
DS, MM, and HW software metrics
RtC-TLs results for MM and HW case studies
Conclusion And Perspectives
• This paper suggested an approach
based on LSI and FCA to recover and
visualize RtC-TLs in a single software
system.
• YamenTrace has been implemented
and evaluated on three case studies
(DS, MM, and HW).
• Findings displayed that most of RtC-TLs
were recovered correctly.
YamenTrace
Future Work
• The current approach works only with
single software; therefor, one direction
for future work of YamenTrace approach
is to extend the current approach to
work with a collection of Product
Variants (PVs).
• Then, it is important to extend the
approach to identify the TLs between
features and code of these PVs (feature
location).
Cont.
• YamenTrace can be extended in many ways.
• For instance, YamenTrace approach is designed for product written in
Java language, thus, future work could aim on extending the current
implementation of YamenTrace to deal with other programming
languages (e.g., C++).
• Also, a further evaluation of YamenTrace can be done with other case
studies.
• To do this, it would be necessary to find suitable case studies whose
requirements and source code are freely available to carry out the
whole approach described in this paper.
Cont.
• YamenTrace also plans to exploit useful information available in
Software Requirements Specification (SRS) document (e.g.,
requirements dependency) in TLs recovery process.
• Requirements dependency is an important aspect in tracing software
requirements.
• Furthermore, there is an urgent need to convert YamenTrace to a
generic approach, in order to be able to find TLs between any kind of
software artifacts (e.g., design documents, or features) and source
code.
The key
elements of
YamenTrace
approach
References
[1] I. Sommerville and P. Sawyer, Requirements Engineering: A Good
Practice Guide, ser. The Kluwer International Series on Information
Retrieval. Wiley, 1997.
..
..
[83] G. Deshpande, “Requirements dependency extraction: Advanced
machine learning approaches and their ROI analysis,” Ph.D.
dissertation, University of Calgary, Alberta, Canada, 2022. [Online].
Available: http://hdl.handle.net/1880/114394
YamenTrace
Requirements Traceability:
Recovering and Visualizing Traceability Links Between Requirements
and Source Code of Object-oriented Software Systems
YamenTrace
Requirements Traceability:
Recovering and Visualizing Traceability Links
Between Requirements and Source Code of
Object-oriented Software Systems
Ra’Fat Al-Msie’deen
Department of Software Engineering, Faculty of IT, Mutah University, Mutah 61710, Karak,
Jordan
E-mail address: rafatalmsiedeen@mutah.edu.jo
https://rafat66.github.io/Al-Msie-Deen/

Requirements Traceability: Recovering and Visualizing Traceability Links Between Requirements and Source Code of Object-oriented Software Systems - YamenTrace

  • 1.
    YamenTrace Requirements Traceability: Recovering andVisualizing Traceability Links Between Requirements and Source Code of Object-oriented Software Systems Ra’Fat Al-Msie’deen Department of Software Engineering, Faculty of IT, Mutah University, Mutah 61710, Karak, Jordan E-mail address: rafatalmsiedeen@mutah.edu.jo https://rafat66.github.io/Al-Msie-Deen/
  • 2.
  • 3.
    ➢ To citethis version: R. Al-Msie’deen, “Requirements Traceability: Recovering and Visualizing Traceability Links Between Requirements and Source Code of Object-oriented Software Systems,” International Journal of Computing and Digital Systems, vol. 14, no. 1, pp. 279–295, 2023. [Online].Available: https://journal.uob.edu.bh/handle/123456789/4892
  • 4.
  • 5.
  • 7.
  • 8.
    Introduction • Requirements Engineering(RE) aims at discovering, documenting, and maintaining a collection of requirements for the software system. • Requirements Management (RM) helps in maintaining requirement evolution during software development. • RM is interested in all processes that lead to changing functional requirement of the software system. • Requirements Traceability (RT) is the key activity of RM process. • RM process aims at finding and maintaining a traceability link of a particular requirement from its origins (or sources), across its specification and development to its, consequent deployment and use, and over a cycles of continuous improvement and repetition in any of these stages.
  • 9.
    Backward and forwarddirections of requirement traces Requirements space Implementation space Software Requirements Specification (SRS) document Software P Design space Class x Forward traceability Backward traceability Requirement x UML Database Reports Dialogs Forms Interfaces
  • 10.
    YamenTrace • YamenTrace takesthe software requirements and code as its inputs (See Figure on next slide). • Then, YamenTrace recovers and visualizes the identified TLs between Requirements and Source code (RaS). • The first step of YamenTrace aims at extracting software source code. • The second step generates all class documents of a given software code. • Then, in the third step, YamenTrace relies on LSI method to define the similarity between requirement and class documents. • Finally, in the fourth step, YamenTrace uses the similarity measure to identify TLs between RaS by using FCA.
  • 11.
    Extracting software sourcecode Code elements as XML file Measuring requirement and class documents similarity by using LSI Constructing LSI corpus Preprocessing of corpus documents Constructing the term- document and the term- query matrices for corpus documents Constructing the similarity matrix Identifying TLs using FCA Software source code Inputs Generating class documents Software class documents Outputs Similarity matrix as binary formal context 3 4 Requirements traceability 1 2 & Software requirements RT recovering process - YamenTrace approach
  • 12.
  • 13.
  • 14.
    Latent Semantic Indexing(LSI) --- Cont.
  • 15.
    Extracting software sourcecode Code elements as XML file Measuring requirement and class documents similarity by using LSI Constructing the LSI corpus Preprocessing of corpus documents Constructing the term-document and the term-query matrices for corpus documents Constructing the similarity matrix Identifying TLs using FCA Software source code Inputs Generating class documents Software class documents Outputs Similarity matrix as binary formal context 3 4 Requirements traceability R1 R2 C1 C3 C2 1 2 Trace links Software engineer Software requirement documents
  • 16.
    A Literature Review ofRT Recovery: A Mini Systematic Survey • A study of the literature and comparisons of current approaches showed that there is no study or approach in the literature that uses the code relations (resp. FCA) in the process of recovering TLs between software RaS. • In this paper, LSI is used to measure TS between requirement and class documents. The use of LSI in YamenTrace is not considered a novel aspect, as several studies have employed LSI to recover TLs between RaS. • On the other hand, FCA technique is used to cluster similar requirement and class documents together based on TS measured by LSI. • The use of FCA here is considered a novel aspect of YamenTrace approach where it has not been used before in RT studies, especially in the context of RaS. • Also, YamenTrace prepares the class document in a novel way, where it exploits the identifier names, code relations and comments to construct the class document. • Existing approaches used class files as it without any preprocessing. • Finally, YamenTrace visualizes the recovered TLs between RaS.
  • 17.
    Summary of RTapproaches (comparison table)
  • 18.
    An overview ofRT approaches (comparison table)
  • 19.
  • 20.
    RT meta model ofYamenTrace approach
  • 21.
    The GUI ofDrawing Shapes (DS) application
  • 22.
    The code ofMyLine class from DS software
  • 23.
    The code elements file ofDS software (partial)
  • 24.
  • 25.
    An example ofa class document (i.e., MyLine) from DS software.
  • 26.
    Extracting software sourcecode Code elements as XML file Measuring requirement and class documents similarity by using LSI Constructing the LSI corpus Preprocessing of corpus documents Constructing the term-document and the term-query matrices for corpus documents Constructing the similarity matrix Identifying TLs using FCA Software requirement documents Software source code Inputs Generating class documents Software class documents Outputs Similarity matrix as binary formal context 3 4 Requirements traceability R1 R2 C1 C3 C2 1 2
  • 27.
  • 28.
  • 29.
    YamenTrace measures the qualityand soundness of the recovered TLs using precision and recall measures. Precision and recall are two standard metrics widely employed in IR techniques.
  • 30.
    YamenTrace Approach -step by step A. Extracting software source code B. Generating class documents C. Measuring requirement and class documents similarity by using LSI 1. Constructing LSI corpus 2. Preprocessing of corpus documents 3. Constructing TDM and TQM for corpus documents 4. Constructing the similarity matrix D. Identifying TLs using FCA
  • 31.
  • 32.
  • 33.
    C. Measuring requirementand class documents similarity by using LSI • To calculate Textual Similarity (TS) between software requirements and classes, YamenTrace applied LSI technique in four steps: 1) constructing LSI corpus, 2) preprocessing of corpus documents, 3) constructing TDM and Term-Query Matrix (TQM), 4) constructing the Cosine Similarity Matrix (CSM). • The similarity of requirement and class documents is constructed with LSI as detailed in the following.
  • 34.
  • 35.
    2. Preprocessing ofcorpus documents
  • 36.
    3. Constructing TDMand Term-Query Matrix (TQM)
  • 37.
    4. Constructing theCosine Similarity Matrix (CSM).
  • 38.
  • 39.
    YamenTrace visualization ofthe recovered TLs from DS software.
  • 40.
    Figure 12 shows thatprecision measure is equal to 100% for all recovered TLs, which means that all recovered links are related.
  • 41.
    Experimentation • Mobile Media(MM) is a Java open-source software system. ✓ This software manipulates media on mobile phones. • Health Watcher (HW) is a public health system. ✓ It is a Java open-source software system. ✓ HW is a real health complaint software system.
  • 42.
    DS, MM, andHW software metrics
  • 43.
    RtC-TLs results forMM and HW case studies
  • 44.
    Conclusion And Perspectives •This paper suggested an approach based on LSI and FCA to recover and visualize RtC-TLs in a single software system. • YamenTrace has been implemented and evaluated on three case studies (DS, MM, and HW). • Findings displayed that most of RtC-TLs were recovered correctly. YamenTrace
  • 45.
    Future Work • Thecurrent approach works only with single software; therefor, one direction for future work of YamenTrace approach is to extend the current approach to work with a collection of Product Variants (PVs). • Then, it is important to extend the approach to identify the TLs between features and code of these PVs (feature location).
  • 46.
    Cont. • YamenTrace canbe extended in many ways. • For instance, YamenTrace approach is designed for product written in Java language, thus, future work could aim on extending the current implementation of YamenTrace to deal with other programming languages (e.g., C++). • Also, a further evaluation of YamenTrace can be done with other case studies. • To do this, it would be necessary to find suitable case studies whose requirements and source code are freely available to carry out the whole approach described in this paper.
  • 47.
    Cont. • YamenTrace alsoplans to exploit useful information available in Software Requirements Specification (SRS) document (e.g., requirements dependency) in TLs recovery process. • Requirements dependency is an important aspect in tracing software requirements. • Furthermore, there is an urgent need to convert YamenTrace to a generic approach, in order to be able to find TLs between any kind of software artifacts (e.g., design documents, or features) and source code.
  • 48.
  • 49.
    References [1] I. Sommervilleand P. Sawyer, Requirements Engineering: A Good Practice Guide, ser. The Kluwer International Series on Information Retrieval. Wiley, 1997. .. .. [83] G. Deshpande, “Requirements dependency extraction: Advanced machine learning approaches and their ROI analysis,” Ph.D. dissertation, University of Calgary, Alberta, Canada, 2022. [Online]. Available: http://hdl.handle.net/1880/114394
  • 50.
    YamenTrace Requirements Traceability: Recovering andVisualizing Traceability Links Between Requirements and Source Code of Object-oriented Software Systems
  • 52.
    YamenTrace Requirements Traceability: Recovering andVisualizing Traceability Links Between Requirements and Source Code of Object-oriented Software Systems Ra’Fat Al-Msie’deen Department of Software Engineering, Faculty of IT, Mutah University, Mutah 61710, Karak, Jordan E-mail address: rafatalmsiedeen@mutah.edu.jo https://rafat66.github.io/Al-Msie-Deen/