Lune

ASE2023顶会

MELT: Mining Effective Lightweight Transformations from Pull Requests

Daniel Ramos, Hailie Mitchell, Inês Lynce, Vasco Manquinho, Ruben Martins, Claire Le Goues

摘要

Software developers often struggle to update APIs, leading to manual, time-consuming, and error-prone processes. We introduce Melt, a new approach that generates lightweight API migration rules directly from pull requests in popular library repositories. Our key insight is that pull requests merged into open-source libraries are a rich source of information sufficient to mine API migration rules. By leveraging code examples mined from the library source and automatically generated code examples based on the pull requests, we infer transformation rules in Comby, a language for structural code search and replace. Since inferred rules from single code examples may be too specific, we propose a generalization procedure to make the rules more applicable to client projects. Melt rules are syntax-driven, interpretable, and easily adaptable. Moreover, unlike previous work, our approach enables rule inference to seamlessly integrate into the library workflow, removing the need to wait for client code migrations. We evaluated Melt on pull requests from four popular libraries, successfully mining 461 migration rules from code examples in pull requests and 114 rules from auto-generated code examples. Our generalization procedure increases the number of matches for mined rules by 9×. We applied these rules to client projects and ran their tests, which led to an overall decrease in the number of warnings and fixing some test cases demonstrating MELT's effectiveness in real-world scenarios.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

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

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Automatically Fixing Dependency Breaking Changes 引用了 APIfix: output-oriented program synthesis for combating breaking changes in libraries
  • PYEVOLVE: Automating Frequent Code Changes in Python ML Systems 引用了 Inferring and Applying Type Changes
  • PYEVOLVE: Automating Frequent Code Changes in Python ML Systems 引用了 APIfix: output-oriented program synthesis for combating breaking changes in libraries
  • A Lightweight Polyglot Code Transformation Language 引用了 Inferring and Applying Type Changes
  • A Lightweight Polyglot Code Transformation Language 引用了 SOAR: A Synthesis Approach for Data Science API Refactoring
  • Unprecedented Code Change Automation: The Fusion of LLMs and Transformation by Example 引用了 PYEVOLVE: Automating Frequent Code Changes in Python ML Systems
  • Unprecedented Code Change Automation: The Fusion of LLMs and Transformation by Example 引用了 Inferring and Applying Type Changes
  • Unprecedented Code Change Automation: The Fusion of LLMs and Transformation by Example 引用了 APIfix: output-oriented program synthesis for combating breaking changes in libraries
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. Unprecedented Code Change Automation: The Fusion of LLMs and Transformation by ExampleMalinda Dilhara, Abhiram Bellur, Timofey Bryksin, Danny DigFSE 2024 · 18 次引用
  2. Towards Diverse Program Transformations for Program SimplificationHaibo Wang, Zezhong Xing, Chengnian Sun, Zheng Wang 等FSE 2025 · 1 次引用
  3. A Lightweight Polyglot Code Transformation LanguageAmeya Ketkar, Daniel Ramos, Lazaro Clapp, Raj Barik 等PLDI 2024 · 1 次引用
  4. Automatically Fixing Dependency Breaking ChangesLukas Fruntke, Jens KrinkeFSE 2025

它引用的 Paper6

  1. NEZHA: Efficient Domain-Independent Differential TestingTheofilos Petsios, Adrian Tang, Salvatore J. Stolfo, Angelos D. Keromytis 等S&P 2017 · 132 次引用
  2. PYEVOLVE: Automating Frequent Code Changes in Python ML SystemsMalinda Dilhara, Danny Dig, Ameya KetkarICSE 2023 · 46 次引用
  3. SOAR: A Synthesis Approach for Data Science API RefactoringAnsong Ni, Daniel Ramos, Aidan Z. H. Yang, Inês Lynce 等ICSE 2021 · 27 次引用
  4. Inferring and Applying Type ChangesAmeya Ketkar, Oleg Smirnov, Nikolaos Tsantalis, Danny Dig 等ICSE 2022 · 17 次引用
  5. APIfix: output-oriented program synthesis for combating breaking changes in librariesXiang Gao, Arjun Radhakrishna, Gustavo Soares, Ridwan Shariffdeen 等OOPSLA 2021 · 17 次引用

相关 Paper

  1. M3: Semantic API MigrationsBruce Collie, Philip Ginsbach, Jackson Woodruff, Ajitha Rajan 等ASE 2020 · 14 次引用
  2. Compiler-directed Migrating API Callsite of Client CodeHao Zhong, Na MengICSE 2024 · 5 次引用
  3. The Fix Is Right at Hand: Fixing Incompatibility Errors Guided by Library Knowledge for Automatic Library UpgradeZhuotong Zhou, Susheng Wu, Junpeng Zhao, Bihuan Chen 等ISSTA 2026
  4. Syntax Is All You Need: A Universal-Language Approach to Mutant GenerationSourav Deb, Kush Jain, Rijnard van Tonder, Claire Le Goues 等FSE 2024 · 7 次引用
  5. An empirical study on API parameter rulesHao Zhong, Na Meng, Zexuan Li, Li JiaICSE 2020 · 16 次引用
黄昏的海面,两侧是细线勾勒的悬崖