Buggy code:
public double getDistance ( RealVector v ) throws IllegalArgumentException { } public double getDistance ( double [ ] v ) throws IllegalArgumentException { } public double getEntry ( int index ) throws MatrixIndexException { } public double getL1Distance ( SparseRealVector v ) { } public double getL1Distance ( RealVector v ) throws IllegalArgumentException { } public double getL1Distance ( double [ ] v ) throws IllegalArgumentException { } public double getL1Norm ( ) { } private double getLInfDistance ( SparseRealVector v ) { } public double getLInfDistance ( RealVector v ) throws IllegalArgumentException { } public double getLInfDistance ( double [ ] v ) throws IllegalArgumentException { } public double getLInfNorm ( ) { } public double getNorm ( ) { } public boolean isInfinite ( ) { } public boolean isNaN ( ) { } public RealVector mapAbs ( ) { } public RealVector mapAbsToSelf ( ) { } public RealVector mapAcos ( ) { } public RealVector mapAcosToSelf ( ) { } public RealVector mapAdd ( double d ) { } public RealVector mapAddToSelf ( double d ) { } public RealVector mapAsin ( ) { } public RealVector mapAsinToSelf ( ) { } public RealVector mapAtan ( ) { } public RealVector mapAtanToSelf ( ) { } public RealVector mapCbrt ( ) { } public RealVector mapCbrtToSelf ( ) { } public RealVector mapCeil ( ) { } public RealVector mapCeilToSelf ( ) { } public RealVector mapCos ( ) { } public RealVector mapCosToSelf ( ) { } public RealVector mapCosh ( ) { } public RealVector mapCoshToSelf ( ) { } public RealVector mapDivide ( double d ) { } public RealVector mapDivideToSelf ( double d ) { } public RealVector mapExp ( ) { } public RealVector mapExpToSelf ( ) { } public RealVector mapExpm1 ( ) { } public RealVector mapExpm1ToSelf ( ) { } public RealVector mapFloor ( ) { } public RealVector mapFloorToSelf ( ) { } public RealVector mapInv ( ) { } public RealVector mapInvToSelf ( ) { } public RealVector mapLog ( ) { } public RealVector mapLog10 ( ) { } public RealVector mapLog10ToSelf ( ) { } public RealVector mapLog1p ( ) { } public RealVector mapLog1pToSelf ( ) { } public RealVector mapLogToSelf ( ) { } public RealVector mapMultiply ( double d ) { } public RealVector mapMultiplyToSelf ( double d ) { } public RealVector mapPow ( double d ) { } public RealVector mapPowToSelf ( double d ) { } public RealVector mapRint ( ) { } public RealVector mapRintToSelf ( ) { } public RealVector mapSignum ( ) { } public RealVector mapSignumToSelf ( ) { } public RealVector mapSin ( ) { } public RealVector mapSinToSelf ( ) { } public RealVector mapSinh ( ) { } public RealVector mapSinhToSelf ( ) { } public RealVector mapSqrt ( ) { } public RealVector mapSqrtToSelf ( ) { } public RealVector mapSubtract ( double d ) { } public RealVector mapSubtractToSelf ( double d ) { } public RealVector mapTan ( ) { } public RealVector mapTanToSelf ( ) { } public RealVector mapTanh ( ) { } public RealVector mapTanhToSelf ( ) { } public RealVector mapUlp ( ) { } public RealVector mapUlpToSelf ( ) { } public SparseRealMatrix outerproduct ( SparseRealVector v ) throws IllegalArgumentException { } public RealMatrix outerProduct ( RealVector v ) throws IllegalArgumentException { } public RealMatrix outerProduct ( double [ ] v ) throws IllegalArgumentException { } public RealVector projection ( RealVector v ) throws IllegalArgumentException { } public RealVector projection ( double [ ] v ) throws IllegalArgumentException { } public void setEntry ( int index , double value ) throws MatrixIndexException { } public void setSubVector ( int index , RealVector v ) throws MatrixIndexException { } public void setSubVector ( int index , double [ ] v ) throws MatrixIndexException { } public void set ( double value ) { } public SparseRealVector subtract ( SparseRealVector v ) throws IllegalArgumentException { } public RealVector subtract ( RealVector v ) throws IllegalArgumentException { } public RealVector subtract ( double [ ] v ) throws IllegalArgumentException { } public RealVector unitVector ( ) { } public void unitize ( ) { } private void checkIndex ( final int index ) throws MatrixIndexException { } protected void checkVectorDimensions ( int n ) throws IllegalArgumentException { } public double [ ] toArray ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ! ( obj instanceof SparseRealVector ) ) { return false ; } SparseRealVector other = ( ( SparseRealVector ) ( obj ) ) ; if ( ( virtualSize ) != ( other . virtualSize ) ) { return false ; } if ( ( Double . doubleToLongBits ( epsilon ) ) != ( Double . doubleToLongBits ( other . epsilon ) ) ) { return false ; } Iterator iter = entries . iterator ( ) ; while ( iter . hasNext ( ) ) { iter . advance ( ) ; double test = other . getEntry ( iter . key ( ) ) ; if ( ( Double . doubleToLongBits ( test ) ) != ( Double . doubleToLongBits ( iter . value ( ) ) ) ) { return false ; } } iter = other . getEntries ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { iter . advance ( ) ; double test = iter . value ( ) ; <START_BUG> if ( ( Double . doubleToLongBits ( test ) ) != ( Double . doubleToLongBits ( iter . value ( ) ) ) ) { <END_BUG> return false ; } } return true ; } }

Fix:
if ( ( Double . doubleToLongBits ( test ) ) != ( Double . doubleToLongBits ( getEntry ( iter . key ( ) ) ) ) ) {