Get Equals Checker at Fast, secure and Free Open Source software downloads

SERL's Equals Checker (EQ)


EQ is a static analysis tool for checking problems related to the Object.equals(Object) method in Java. It works in two layers: The path-sensitive, inter-procedural analysis framework is built on top of Soot which forms the basis for high-level model generation in Alloy. Using this framework the checker detects programming errors such as NullPointerException and ClassCastException, and semantic problems related to equivalence relation (reflexivity, symmetry and transitivity) specified in java.lang.Object. EQ is implemented as an Eclipse Plugin and can be installed from the update site.

Update Site

User Manual

User manual can be downloaded from here [EQ-UserManual.pdf]. The user manual refers to a sample Java project that can be downloaded from here [].

Obtaining Source Code of EQ

EQ is an open source project distributed under the GNU GPL v 3.0 license. The bundled source code [] is an Eclipse plugin project that can be directly imported using Eclipse's Project Import Wizard.

If you want to check out the code from SVN, then use:

svn co eqchecker


EQ has been tested in four medium to large sized open source projects. The following are the reports and results generated by the tool:

In the error listings, each entry has two children representing classes participating in a violation. For reflexivity, symmetry, and transitivity violations, objects of the given two classes violate these properties. For other cases, the first child represents the class under analysis and the second child represents the class where the actual error has occurred with the given line number. In inter-procedural analyses, a class under analysis may call methods of the other classes resulting in a participation of more than one class in an error.

False Positives: The classification and the manual verification of the reported cases have been done using Bugzilla located at We have inspected all of the reported cases in the four projects and identified some false positives. The rate of false positives is reasonably low. They are caused due to the approximation of a non-standard function called on a field. The user manual discusses on how we can reduce such false positives iteratively.

False Negatives: The checker produces one Alloy model file per type hierarchy and checks for violations of equivalence in the type hierarchy. We have manually inspected all of the type hierarchies from Tomcat and Lucene, and randomly selected thirty type hierarchies each from JFreeChart and JDK for false negatives. There are a small number of cases when the checker gives up because its pattern detectors fail to identify any abstractions from the code. However, we did not find any false negatives for those cases that the checker reported as correct. That is, when the checker says that the equality in a type hierarchy is correct, the equals() implementations in that type hierarchy is indeed correct. The list of manually inspected type hierarchies with a summary of the inspection can be downloaded from here [FalseNegativeAnalysis.ods].

An access to Bugzilla can also be provided upon an email request to any team member. For interested individuals, the four benchmarks used in the project can also be provided upon request.

Project Development Site

Please visit Project Development Site for more details.


The PDF format of the following papers can be downloaded from here.


Copyright © 2010-2011 Chandan R. Rupakheti and Daqing Hou, SERL, Clarkson University, 8 Clarkson Avenue, Potsdam, NY 13699-5722, USA.