#vulnerable code 
                                public MatrixStore<N> getInverse(final DecompositionStore<N> preallocated) {

        if (myInverse == null) {

            preallocated.fillAll(this.scalar().zero().getNumber());
            final PhysicalStore<N> tmpMtrx = preallocated;

            final MatrixStore<N> tmpQ1 = this.getQ1();
            final MatrixStore<N> tmpD = this.getD();

            final int tmpColDim = (int) tmpQ1.countRows();

            double tmpSingularValue;
            final int rank = this.getRank();
            for (int i = 0; i < rank; i++) {
                tmpSingularValue = tmpD.doubleValue(i, i);
                for (int j = 0; j < tmpColDim; j++) {
                    tmpMtrx.set(i, j, tmpQ1.toScalar(j, i).conjugate().divide(tmpSingularValue).getNumber());
                }
            }

            myInverse = this.getQ2().multiply(tmpMtrx);
        }

        return myInverse;
    } 
                            #location 16 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                public MatrixStore<N> getInverse(final DecompositionStore<N> preallocated) {

        if (myInverse == null) {

            final MatrixStore<N> tmpQ1 = this.getQ1();
            final Array1D<Double> tmpSingulars = this.getSingularValues();
            final MatrixStore<N> tmpQ2 = this.getQ2();

            final int tmpRowDim = (int) tmpSingulars.count();
            final int tmpColDim = (int) tmpQ1.countRows();
            final PhysicalStore<N> tmpMtrx = this.makeZero(tmpRowDim, tmpColDim);

            double tmpValue;
            final int rank = this.getRank();
            for (int i = 0; i < rank; i++) {
                tmpValue = tmpSingulars.doubleValue(i);
                for (int j = 0; j < tmpColDim; j++) {
                    tmpMtrx.set(i, j, tmpQ1.toScalar(j, i).conjugate().divide(tmpValue).getNumber());
                }
            }

            preallocated.fillByMultiplying(tmpQ2, tmpMtrx);
            myInverse = preallocated;
        }

        return myInverse;
    }