Software bloat is code that is packaged in an application but is actually not necessary to run the application. The presence of software bloat is an issue for security, for performance, and for maintenance. In this paper, we introduce a novel technique for debloating Java bytecode, which we call coverage-based debloating. We leverage a combination of state-of-the-art Java bytecode coverage tools to precisely capture what parts of a project and its dependencies are used at runtime. Then, we automatically remove the parts that are not covered to generate a debloated version of the compiled project. We successfully generate debloated versions of 220 open-source Java libraries, which are syntactically correct and preserve their original behavior according to the workload. Our results indicate that 68.3% of the libraries' bytecode and 20.5% of their total dependencies can be removed through coverage-based debloating. Meanwhile, we present the first experiment that assesses the utility of debloated libraries with respect to client applications that reuse them. We show that 80.9% of the clients with at least one test that uses the library successfully compile and pass their test suite when the original library is replaced by its debloated version.
翻译:软件 bloat 是应用程序中包装的代码, 但实际上并不需要运行应用程序 。 软件 bloat 的存在是一个安全、 性能和维护问题 。 在本文中, 我们引入了一种新颖的拆解 Java 位数代码的新技术, 我们称之为基于覆盖的拆解。 我们利用了一套最新水平的 Java 位数覆盖工具来精确地捕捉运行时使用项目的各个部分及其依赖性 。 然后, 我们自动删除了未覆盖的部分, 以生成已编集的项目的拆解版本 。 我们成功地生成了220 个开源 Java 图书馆的拆解版本, 这些图书馆在同步性上是正确的, 并根据工作量来保存原始行为 。 我们的结果表明, 图书馆的68. 3% 的源数和 20. 5% 的总依赖性可以通过基于覆盖的拆解解密来去除 。 同时, 我们展示了第一次实验, 评估拆解的图书馆对客户应用程序的效用, 来再利用它们。 我们展示了80.9%的客户, 在一次测试时, 其原始版本中, 将使用图书馆的版本成功的版本替换。