一句话:提出可视化分析工具 WebJShrink,基于 JShrink 定位并删除 Java 项目未用特性,并用单元测试验证行为保持。
软件项目日益复杂,常包含未充分利用的库而变得臃肿。现有去臃肿工具难以让开发者了解库的使用不足程度,也难以确信去臃肿后的行为保持。为此,作者提出 WebJShrink,一个分析和裁剪臃肿 Java 项目的可视化分析服务。它基于 JShrink,利用静态与动态可达性分析定位内部臃肿,提供丰富可视化,删除未使用特性并返回更安全、更精简的软件变体。为展示行为保持,工具用 JUnit 测试检查去臃肿后的软件并可视化结果。在 26 个真实系统上评估,WebJShrink 最多缩减 42% 体积,平均 11%,且去臃肿后仍通过 100% 单元测试。
As software projects grow in complexity, they come packaged with under-utilized libraries and therefore become bloated. Though several software debloating tools exist, none of them help developers gain insights into how under-utilized those libraries are nor help developers build confidence in the behavior preservation of software after debloating. To bridge this gap, we developed WebJShrink, a visual analytics tool for analyzing and pruning bloated software projects. WebJShrink is built on JShrink which uses static and dynamic reachability analysis to determine the extent of software bloat. WebJShrink provides rich visualizations of the bloat lurking within a target project's internal structure. It then removes unused features, and returns a safer, slimmer variant of the software project. To illustrate the target project's behavior preservation, WebJShrink examines the debloated software with its JUnit tests and visualizes the test results. In evaluating WebJShrink against 26 real world systems, we found WebJShrink could reduce software size by up to 42%, 11% on average, while still passing 100% of unit tests after debloating. We provide a video demonstrating WebJShrink at https://youtu.be/yzVzcd-MJ1w.