Lune

ASE2021顶会

Why Do Developers Remove Lambda Expressions in Java?

Mingwei Zheng, Jun Yang, Ming Wen, Hengcheng Zhu, Yepang Liu, Hai Jin

摘要

Java 8 has introduced lambda expressions, a core feature of functional programming. Since its introduction, there is an increasing trend of lambda adoptions in Java projects. Developers often adopt lambda expressions to simplify code, avoid code duplication or simulate other functional features. However, we observe that lambda expressions can also incur different types of side effects (i.e., performance issues and memory leakages) or even severe bugs, and developers also frequently remove lambda expressions in their implementations. Consequently, the advantages of utilizing lambda expressions can be significantly compromised by the collateral side effects. In this study, we present the first large-scale, quantitative and qualitative empirical study to characterize and understand inappropriate usages of lambda expressions. Particularly, we summarized seven main reasons for the removal of lambdas as well as seven common migration patterns. For instance, we observe that lambdas using customized functional interfaces are more likely to be removed by developers. Moreover, from a complementary perspective, we performed a user study over 30 developers to seek the underlying reasons why they remove lambda expressions in practice. Finally, based on our empirical results, we made suggestions on scenarios to avoid lambda usages for Java developers and also pointed out future directions for researchers.

问 Lune

几分钟看清这篇 Paper 的位置,不用再花一下午。

Lune 能读引用它和与它最相关的顶会 Paper,讲清它说了什么、后来怎样、哪里站不住,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

摘要 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • A Study on the Pythonic Functional Constructs' Understandability 引用了 An exploratory study on the predominant programming paradigms in Python code
  • RFCAudit: AI Agent for Auditing Protocol Implementations Against RFC Specifications 引用了 Validating Network Protocol Parsers with Traceable RFC Document Interpretation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper5

  1. An exploratory study on the predominant programming paradigms in Python codeRobert Dyer, Jigyasa ChauhanFSE 2022 · 6 次引用
  2. RFCAudit: AI Agent for Auditing Protocol Implementations Against RFC SpecificationsMingwei Zheng, Chengpeng Wang, Xuwei Liu, Jinyao Guo 等ASE 2025 · 5 次引用
  3. A Study on the Pythonic Functional Constructs' UnderstandabilityCyrine Zid, Fiorella Zampetti, Giuliano Antoniol, Massimiliano Di PentaICSE 2024 · 4 次引用
  4. Validating Network Protocol Parsers with Traceable RFC Document InterpretationMingwei Zheng, Danning Xie, Qingkai Shi, Chengpeng Wang 等ISSTA 2025 · 4 次引用
  5. Breaking Strong Encapsulation: A Comprehensive Study of Java Module AbuseYirui He, Yongbo Chen, Jessy Ayala, Yecheng Zhou 等ICSE 2026 · 1 次引用

相关 Paper

  1. Imperative versus Declarative Collection Processing: An RCT on the Understandability of Traditional Loops versus the Stream API in JavaNils Mehlhorn, Stefan HanenbergICSE 2022 · 4 次引用
  2. Eliminating abstraction overhead of Java stream pipelines using ahead-of-time program optimizationAnders Møller, Oskar Haarklou VeileborgOOPSLA 2020 · 9 次引用
  3. Understanding type changes in JavaAmeya Ketkar, Nikolaos Tsantalis, Danny DigFSE 2020 · 17 次引用
  4. Studying the use of Java logging utilities in the wildBoyuan Chen, Zhen Ming (Jack) JiangICSE 2020 · 28 次引用
  5. Studying Test Annotation Maintenance in the WildDong Jae Kim, Nikolaos Tsantalis, Tse-Hsun Peter Chen, Jinqiu YangICSE 2021 · 20 次引用
黄昏的海面,两侧是细线勾勒的悬崖