#vulnerable code 
                             @Override
	public int getNumberOfFeatures(){
		return (Integer)get("rank_");
	} 
                            #location 3 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Override
	public int getNumberOfFeatures(){
		int[] shape = getCoefShape();

		if(shape.length != 1){
			throw new IllegalArgumentException();
		}

		return shape[0];
	}