Information-theoretic detection of unusual source code changes

Abstract The code base of software projects evolves essentially through inserting and removing information to and from the source code. We can measure this evolution via the elements of infor-mation—tokens, words, nodes—of the respective representation of the code. In this work, we approach the measurement of the information content of the source code of open-source projects from an information-theoretic standpoint. Our focus is on the entropy of two funda-mental representations of code: tokens and abstract syntax tree nodes, from which we derive definitions of textual and structural entropy. We proceed with an empirical assessment where we evaluate the evolution patterns of the entropy of 95 actively maintained open source pro-jects. We calculate the statistical relationships between our derived entropy metrics and classic methods of measuring code complexity and learn that entropy may capture different dimen-sions of complexity than classic metrics. Finally, we conduct entropy-based anomaly detection of unusual changes to demonstrate that our approach may effectively recognise unusual source code change events with over 60% precision, and lay the groundwork for improvements to information-theoretic measurement of source code evolution, thus paving the way for a new approach to statically gauging program complexity throughout its development.

Authors

Institutions

Publication Details

Journal
Empirical Software Engineering
Published
2025-08-08
DOI
https://doi.org/10.1007/s10664-025-10644-y
Citations
1
Primary Topic
Advanced Malware Detection Techniques
Type
article
Field-Weighted Citation Impact
1.49
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Information-theoretic detection of unusual source code changes

Sebastian Baltes, Markus Wagner, Christoph Treude, Adriano Torres
1 citations
Empirical Software Engineering
Advanced Malware Detection Techniques
1.49
article

Information-theoretic detection of unusual source code changes

Sebastian Baltes, Markus Wagner, Christoph Treude, Adriano Torres
article en
1 citations

Abstract

Abstract The code base of software projects evolves essentially through inserting and removing information to and from the source code. We can measure this evolution via the elements of infor-mation—tokens, words, nodes—of the respective representation of the code. In this work, we approach the measurement of the information content of the source code of open-source projects from an information-theoretic standpoint. Our focus is on the entropy of two funda-mental representations of code: tokens and abstract syntax tree nodes, from which we derive definitions of textual and structural entropy. We proceed with an empirical assessment where we evaluate the evolution patterns of the entropy of 95 actively maintained open source pro-jects. We calculate the statistical relationships between our derived entropy metrics and classic methods of measuring code complexity and learn that entropy may capture different dimen-sions of complexity than classic metrics. Finally, we conduct entropy-based anomaly detection of unusual changes to demonstrate that our approach may effectively recognise unusual source code change events with over 60% precision, and lay the groundwork for improvements to information-theoretic measurement of source code evolution, thus paving the way for a new approach to statically gauging program complexity throughout its development.

Empirical Software EngineeringVol. 30(5)
University of Bayreuth (DE), Monash University (AU), The University of Adelaide (AU), Singapore Management University (SG)
Openalex Percentile: Top 16%
Advanced Malware Detection Techniques
1.49
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Information-theoretic detection of unusual source code changes — Sebastian Baltes, Markus Wagner, et al. · Empirical Software Engineering (2025) | TGRS Research Map | TGRS