Treude, Christoph (Singapore Management University)Baltes, SebastianRodrigues Figueiredo Torres, Adriano2025-04-112025-04-112024https://hdl.handle.net/2440/144189Information theory, though widely applied in various disciplines, remains underexplored in the field of software engineering and the evolution of code bases. This work seeks to address this gap by investigating the application of information theory to measure the ever-changing complexity of software projects. We examine two definitions of entropy, one based on natural language tokens and another based in Abstract Syntax Tree nodes, and apply them to the commit history of 95 open-source projects. Our analysis reveals a strong correlation between the two entropy measures and highlights their mostly weak correlations with established metrics of software complexity. Furthermore, our data from information-theoretic anomaly detection suggest that significant fluctuations in project information content may inform a definition of surprising change events. Building on this, we extend our analysis to measure the information content of source code using tokens and abstract syntax tree nodes as the elements of the communication system defined by the source code. Through an empirical assessment of 95 actively maintained open source projects, we demonstrate that entropy metrics capture distinct dimensions of complexity compared to traditional metrics. Finally, we showcase the efficacy of information theory in anomaly detection, indicating its potential in identifying unusual change commits generated software evolution, thus paving the way for automated detection of such events. This research offers valuable insights into the use of information theory for a comprehensive understanding of software complexity throughout its development life cycle.eninformation theorysoftware evolutionstatic analysisApplying Information Theory to Software Evolution: What can we Learn From Surprising Changes?Thesis