arrow
Return

Will Dependency Conflicts Affect My Program's Semantics?

delete2022-07-01
delete14
delete
OA
AI
Y
Ying Wang
吴荣新 (Rongxin Wu)
C
Chao Wang
文明 (Ming Wen)
Y
Yepang Liu
S
Shing-Chi Cheung
H
Hai Yu *
C
Chang Xu
Z
Zhiliang Zhu
DOI:10.1109/TSE.2021.3057767delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
Java projects are often built on top of various third-party libraries. If multiple versions of a library exist on the classpath, JVM will only load one version and shadow the others, which we refer to as dependency conflicts. This would give rise to semantic conflict (SC) issues, if the library APIs referenced by a project have identical method signatures but inconsistent semantics across the loaded and shadowed versions of libraries. SC issues are difficult for developers to diagnose in practice, since understanding them typically requires domain knowledge. Although adapting the existing test generation technique for dependency conflict issues, RIDDLE, to detect SC issues is feasible, its effectiveness is greatly compromised. This is mainly because RIDDLE randomly generates test inputs, while the SC issues typically require specific arguments in the tests to be exposed. To address that, we conducted an empirical study of 316 real SC issues to understand the characteristics of such specific arguments in the test cases that can capture the SC issues. Inspired by our empirical findings, we propose an automated testing technique SENSOR, which synthesizes test cases using ingredients from the project under test to trigger inconsistent behaviors of the APIs with the same signatures in conflicting library versions. Our evaluation results show that SENSOR is effective and useful: it achieved a Precision of 0.898 and a Recall of 0.725 on open-source projects and a Precision of 0.821 on industrial projects; it detected 306 semantic conflict issues in 50 projects, 70.4 percent of which had been confirmed as real bugs, and 84.2 percent of the confirmed issues have been fixed quickly.
Keywords:
Third-party libraries
test generation
empirical study
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.8K
Citations:
1.1W

Organization

N
nanjing university
Scholars:
7.7W
Papers: 5.6W
Citations: 87
X
xiamen university
Scholars:
5.8W
Papers: 3.7W
Citations: 67