Domain-Specific Fixes for Flaky Tests with Wrong Assumptions on Underdetermined Specifications
Peilun Zhang, Yanjie Jiang, Anjiang Wei, Victoria Stodden, Darko Marinov, August Shi
摘要
Library developers can provide classes and methods with underdetermined specifications that allow flexibility in future implementations. Library users may write code that relies on a specific implementation rather than on the specification, e.g., assuming mistakenly that the order of elements cannot change in the future. Prior work proposed the NonDex approach that detects such wrong assumptions. We present a novel approach, called DexFix, to repair wrong assumptions on underdetermined specifications in an automated way. We run the NonDex tool on 200 open-source Java projects and detect 275 tests that fail due to wrong assumptions. The majority of failures are from iterating over HashMap/HashSet collections and the getDeclaredFields method. We provide several new repair strategies that can fix these violations in both the test code and the main code. DexFix proposes fixes for 119 tests from the detected 275 tests. We have already reported fixes for 102 tests as GitHub pull requests: 74 have been merged, with only 5 rejected, and the remaining pending.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source 引用了 FLEX: fixing flaky tests in machine learning projects by updating assertion bounds
- Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source 引用了 A large-scale longitudinal study of flaky tests
- FLEX: fixing flaky tests in machine learning projects by updating assertion bounds 引用了 TERA: optimizing stochastic regression tests in machine learning projects
- TERA: optimizing stochastic regression tests in machine learning projects 引用了 FLEX: fixing flaky tests in machine learning projects by updating assertion bounds
- FLEX: fixing flaky tests in machine learning projects by updating assertion bounds 引用了 A study on the lifecycle of flaky tests
- Preempting Flaky Tests via Non-Idempotent-Outcome Tests 引用了 FLEX: fixing flaky tests in machine learning projects by updating assertion bounds
- Preempting Flaky Tests via Non-Idempotent-Outcome Tests 引用了 A large-scale longitudinal study of flaky tests
- Preempting Flaky Tests via Non-Idempotent-Outcome Tests 引用了 Repairing Order-Dependent Flaky Tests via Test Generation
- Repairing Order-Dependent Flaky Tests via Test Generation 引用了 Preempting Flaky Tests via Non-Idempotent-Outcome Tests
- Preempting Flaky Tests via Non-Idempotent-Outcome Tests 引用了 A study on the lifecycle of flaky tests
- Repairing Order-Dependent Flaky Tests via Test Generation 引用了 FLEX: fixing flaky tests in machine learning projects by updating assertion bounds
- Repairing Order-Dependent Flaky Tests via Test Generation 引用了 A large-scale longitudinal study of flaky tests
- TERA: optimizing stochastic regression tests in machine learning projects 引用了 A study on the lifecycle of flaky tests
引用它的顶会 Paper8
- Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open SourceAnjiang Wei, Yinlin Deng, Chenyuan Yang, Lingming ZhangICSE 2022 · 91 次引用
- FLEX: fixing flaky tests in machine learning projects by updating assertion boundsSaikat Dutta, August Shi, Sasa MisailovicFSE 2021 · 33 次引用
- Repairing Order-Dependent Flaky Tests via Test GenerationChengpeng Li, Chenguang Zhu, Wenxi Wang, August ShiICSE 2022 · 22 次引用
- Preempting Flaky Tests via Non-Idempotent-Outcome TestsAnjiang Wei, Pu Yi, Zhengxi Li, Tao Xie 等ICSE 2022 · 20 次引用
- TERA: optimizing stochastic regression tests in machine learning projectsSaikat Dutta, Jeeva Selvam, Aryaman Jain, Sasa MisailovicISSTA 2021 · 12 次引用
它引用的 Paper2
相关 Paper
- NPEX: Repairing Java Null Pointer Exceptions without TestsJunhee Lee, Seongjoon Hong, Hakjoo OhICSE 2022 · 13 次引用
- API-Misuse Detection Driven by Fine-Grained API-Constraint Knowledge GraphXiaoxue Ren, Xinyuan Ye, Zhenchang Xing, Xin Xia 等ASE 2020 · 62 次引用
- Automated Program Repair, What Is It Good For? Not Absolutely Nothing!Hadeel Eladawy, Claire Le Goues, Yuriy BrunICSE 2024 · 15 次引用
- Inferring and Applying Def-Use Like Configuration Couplings in Deployment DescriptorsChengyuan Wen, Yaxuan Zhang, Xiao He, Na MengASE 2020 · 3 次引用
- UnitCon: Synthesizing Targeted Unit Tests for Java Runtime ExceptionsSujin Jang, Yeonhee Ryou, Heewon Lee, Kihong HeoFSE 2025
