Method Chaining Redux: An Empirical Study of Method Chaining in Java, Kotlin, and Python
There are possible benefits and drawbacks to chaining methods together, as is often done in fluent APIs. A prior study investigated how Java developers chain methods in over 2.7k open-source projects. That study observed, for the dataset analyzed, that the use of method chaining in Java is popular and seems to be increasing over time. That study however was limited to a smaller sample of Java projects, and it is also not clear if the results generalize to other languages. In this work, we first replicate the prior results by building a similar dataset and our own analysis scripts. We then extend those results by analyzing a much larger dataset of 89k Java projects and generalizing to other programming languages by analyzing 26k Kotlin projects and 98k Python projects. The results show chaining is more popular in Java and Kotlin than Python, chaining use in Kotlin is not growing, and Python sees more use in non-testing code.
Tue 16 MayDisplayed time zone: Hobart change
13:45 - 14:30 | Software QualityData and Tool Showcase Track / Technical Papers at Meeting Room 110 Chair(s): Tushar Sharma Dalhousie University | ||
13:45 12mTalk | Helm Charts for Kubernetes Applications: Evolution, Outdatedness and Security Risks Technical Papers Ahmed Zerouali Vrije Universiteit Brussel, Ruben Opdebeeck Vrije Universiteit Brussel, Coen De Roover Vrije Universiteit Brussel Pre-print | ||
13:57 12mTalk | Control and Data Flow in Security Smell Detection for Infrastructure as Code: Is It Worth the Effort? Technical Papers Ruben Opdebeeck Vrije Universiteit Brussel, Ahmed Zerouali Vrije Universiteit Brussel, Coen De Roover Vrije Universiteit Brussel Pre-print | ||
14:09 12mTalk | Method Chaining Redux: An Empirical Study of Method Chaining in Java, Kotlin, and Python Technical Papers Pre-print Media Attached | ||
14:21 6mTalk | Snapshot Testing Dataset Data and Tool Showcase Track |