Till innehåll på sidan
Till KTH:s startsida

Debloating Java Dependencies

Tid: To 2023-06-01 kl 13.15

Plats: D2, Lindstedtsvägen 5, Stockholm

Språk: Engelska

Ämnesområde: Datalogi

Respondent: César Soto Valero , Programvaruteknik och datorsystem, SCS, ASSERT

Opponent: Professor Diomidis Spinellis, Athens University of Economics and Business, Athens, Greece

Handledare: Professor Benoit Baudry, Programvaruteknik och datorsystem, SCS; Professor Martin Monperrus, Teoretisk datalogi, TCS

Exportera till kalender

QC 20230510

Abstract

Software systems have a natural tendency to grow in size and complexity. A part of this growth comes with the addition of new features or bug fixes, while another part is due to useless code that accumulates over time. This phenomenon, known as "software bloat," increases with the practice of reusing software dependencies, which has exceeded the capacity of human developers to efficiently manage them. Software bloat in third-party dependencies presents a multifaceted challenge for application development, encompassing issues of security, performance, and maintenance. To address these issues, researchers have developed software debloating techniques that automatically remove unnecessary code. Despite significant progress has been made in the realm of software debloating, the pervasive issue of dependency bloat warrants special attention. In this thesis, we contribute to the field of software debloating by proposing novel techniques specifically targeting dependencies in the Java ecosystem.

First, we investigate the growth of completely unused software dependencies, which we call "bloated dependencies." We propose a technique to automatically detect and remove bloated dependencies in Java projects built with Maven. We empirically study the usage status of dependencies in the Maven Central repository and remove bloated dependencies in mature Java projects. We demonstrate that once a bloated dependency is detected, it can be safely removed as its future usage is unlikely.

Second, we focus on dependencies that are only partially used. We introduce a technique to specialize these dependencies in Java projects based on their actual usage. Our approach systematically identifies the subset of functionalities within each dependency that is sufficient to build the project and removes the rest. We demonstrate that our dependency specialization approach can halve the project classes to dependency classes ratio.

Last, we assess the impact of debloating projects with respect to client applications that reuse them. We present a novel coverage-based debloating technique that determines which class members in Java libraries and their dependencies are necessary for their clients. Our debloating technique effectively decreases the size of debloated libraries while preserving the essential functionalities required to successfully build their clients. 

urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-326755