lnu.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Optimized Dependency Weights in Source Code Clustering
Linnaeus University, Faculty of Technology, Department of computer science and media technology (CM). (DISA;DSIQ;DISTA)ORCID iD: 0000-0003-1154-5308
Linnaeus University, Faculty of Technology, Department of computer science and media technology (CM). (DISA;DSIQ;DISTA)ORCID iD: 0000-0003-1173-5187
Linnaeus University, Faculty of Technology, Department of computer science and media technology (CM). (DISA;DSIQ;DISTA)ORCID iD: 0000-0002-0835-823X
2021 (English)In: Software Architecture, ECSA 2021 / [ed] Biffl, S Navarro, E Lowe, W Sirjani, M Mirandola, R Weyns, D, Springer, 2021, Vol. 12857, p. 223-239Conference paper, Published paper (Refereed)
Abstract [en]

Some methods use the dependencies between source code entities to perform clustering to, e.g., automatically map to an intended modular architecture or reconstruct the implemented software architecture. However, there are many different ways that source code entities can depend on each other in an object-oriented system, and it is not likely that all dependencies are equally useful. We investigate how well an optimized set of weights for 14 different types of dependencies perform when automatically mapping source code to modules using an established mapping technique. The optimized weights were found using genetic optimization. We compare the F1 score of precision and recall to uniform weights and weights computed by module relation ratio in eight open-source systems to evaluate performance. Our experiments show that optimized weights significantly outperform the others, especially in systems that seem not to have been designed using the low coupling, high cohesion principle. We also find that dependencies based on method calls are not useful for automatic mapping in any of the eight systems.

Place, publisher, year, edition, pages
Springer, 2021. Vol. 12857, p. 223-239
Series
Lecture Notes in Computer Science, ISSN 0302-9743
Keywords [en]
Orphan adoption, Software architecture, Incremental clustering, Corrective clustering, Source code dependencies
National Category
Software Engineering
Research subject
Computer Science, Software Technology
Identifiers
URN: urn:nbn:se:lnu:diva-108067DOI: 10.1007/978-3-030-86044-8_16ISI: 000696174400016Scopus ID: 2-s2.0-85115124435ISBN: 9783030860448 (print)ISBN: 9783030860431 (print)OAI: oai:DiVA.org:lnu-108067DiVA, id: diva2:1611930
Conference
15th European Conference, ECSA 2021, Virtual Event, Sweden, September 13-17, 2021
Available from: 2021-11-16 Created: 2021-11-16 Last updated: 2024-05-06Bibliographically approved
In thesis
1. Incremental Clustering of Source Code: a Machine Learning Approach
Open this publication in new window or tab >>Incremental Clustering of Source Code: a Machine Learning Approach
2022 (English)Doctoral thesis, comprehensive summary (Other academic)
Abstract [en]

Technical debt at the architectural level is a severe threat to software development projects. Uncontrolled technical debt that is allowed to accumulate will undoubtedly hinder speedy development and maintenance, introduce bugs and problems in the software product, and may ultimately result in the abandonment of the source code. 

It is possible to detect debt accumulation by analyzing the source code and intended modules in the software architecture. However, this is seldom done in practice since it requires a correct and up-to-date mapping from source code to intended modules in the architecture. This mapping requires significant manual effort to create and maintain, something often considered too costly and laborsome. 

We investigate how to automate the mapping from source code to intended modules. The state-of-the-art considers it an incremental clustering problem, where source code entities should be clustered to the intended modules based on some similarity measure. As the system evolves and source code entities are added or modified, the clustering needs to be updated. 

The state-of-the-art techniques determine similarity based on either syntactic or semantic features, e.g., dependencies or identifier names. Large sets of parameters modify these features, e.g., weights for various types of dependencies. These parameters have a significant impact on how well the clustering performs. Unfortunately, we have not been able to identify any heuristics to help human experts determine a good set of parameters for a given system. Based on the parameters determined by, e.g., genetic optimization, it seems unlikely that general heuristics exist.

Instead, we compute the similarity using a multinomial na\"ive Bayes text classifier trained on tokens from the source code entities. We also include a novel feature that captures dependencies as text to add syntactic features. Our classifier, which relies on significantly fewer parameters, outperforms the state-of-the-art techniques, with their parameters set to near-optimal values.

We find that machine learning provides better mapping performance with fewer required parameters. We can successfully combine syntactic information with semantic information without additional parameters. We provide an open-source tool suite with a reference implementation of different techniques and a curated set of systems that can act as a ground truth benchmark.

Place, publisher, year, edition, pages
Linnaeus University Press, 2022. p. 46
Series
Linnaeus University Dissertations ; 436
Keywords
Machine Learning, Naive Bayes, Source Code Clustering, Incremental Clustering, Software Architecture, Technical Debt
National Category
Computer Sciences
Research subject
Computer and Information Sciences Computer Science, Computer Science
Identifiers
urn:nbn:se:lnu:diva-110142 (URN)9789189460638 (ISBN)9789189460645 (ISBN)
Public defence
2022-03-04, Ma135 (Fullriggaren), Hus Magna, Universitetskajen, Kalmar, 14:42 (English)
Opponent
Supervisors
Available from: 2022-02-08 Created: 2022-02-04 Last updated: 2025-03-11Bibliographically approved

Open Access in DiVA

No full text in DiVA

Other links

Publisher's full textScopus

Authority records

Olsson, TobiasEricsson, MorganWingkvist, Anna

Search in DiVA

By author/editor
Olsson, TobiasEricsson, MorganWingkvist, Anna
By organisation
Department of computer science and media technology (CM)
Software Engineering

Search outside of DiVA

GoogleGoogle Scholar

doi
isbn
urn-nbn

Altmetric score

doi
isbn
urn-nbn
Total: 250 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf