An empirical study of the design and implementation of object equality in Java

  • Authors:
  • Chandan R. Rupakheti;Daqing Hou

  • Affiliations:
  • Clarkson University, Potsdam, NY;Clarkson University, Potsdam, NY

  • Venue:
  • CASCON '08 Proceedings of the 2008 conference of the center for advanced studies on collaborative research: meeting of minds
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Applications built on top of an existing design and implementation are in general expected to collaborate well with that design and respect all of its intent. Failure in achieving this may result in buggy, fragile, and less maintainable code in the applications. When the dependence on an existing design becomes more wide-spread, this requirement on proper extension obviously becomes even more critical. As an instance of this general problem, the design for object equality in Java as well as its extensions is examined in detail and empirically. By examining how object equality is extended in a large amount of Java code, a set of typical problems are detected and their root causes analyzed. A set of design guidelines for object equality is proposed, which, if followed, will help programers systematically design and evolve rather than hack on a solution. Examples are drawn from a case study of multiple industrial and open source projects to illustrate the identified problems and how the proposed guidelines can help solve these problems.