2019
DOI: 10.1587/transinf.2018edp7254
|View full text |Cite
|
Sign up to set email alerts
|

Consistency Checking between Java Equals and hashCode Methods Using Software Analysis Workbench

Abstract: Kozo OKANO †a) , Senior Member, Satoshi HARAUCHI † †b) , Toshifusa SEKIZAWA † † †c) , Shinpei OGATA †d) , Members, and Shin NAKAJIMA † † † †e) , Nonmember SUMMARY Java is one of important program language today. In Java, in order to build sound software, we have to carefully implement two fundamental methods hashCode and equals. This requirement, however, is not easy to follow in real software development. Some existing studies for ensuring the correctness of these two methods rely on static analysis, which ar… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1

Citation Types

0
2
0

Year Published

2023
2023
2023
2023

Publication Types

Select...
1

Relationship

0
1

Authors

Journals

citations
Cited by 1 publication
(2 citation statements)
references
References 25 publications
0
2
0
Order By: Relevance
“…Correctness issues concerned with the relationship between methods equals and hashCode are well-known in Java [6,23] and other object-oriented languages as C#, Kotlin, Scala, and Python supporting redefinition of object equality and hash code; however, less attention has been devoted to the potentially dangerous effects of the redefinition of hashCode in mutable classes when their instances are used in container objects implemented with hash tables.…”
Section: Hash Code and Mutable Classesmentioning
confidence: 99%
See 1 more Smart Citation
“…Correctness issues concerned with the relationship between methods equals and hashCode are well-known in Java [6,23] and other object-oriented languages as C#, Kotlin, Scala, and Python supporting redefinition of object equality and hash code; however, less attention has been devoted to the potentially dangerous effects of the redefinition of hashCode in mutable classes when their instances are used in container objects implemented with hash tables.…”
Section: Hash Code and Mutable Classesmentioning
confidence: 99%
“…While this problem is well known and there have been some attempts to detect it with verification techniques [6,23], hash code redefinition for mutable classes has been overlooked. When objects of such classes are used as keys in hash tables, programs may exhibit unexpected and unpredictable behavior.…”
mentioning
confidence: 99%