#vulnerable code 
                             public Number getWeight(int index){
		CSRMatrix idfDiag = (CSRMatrix)get("_idf_diag");

		List<?> data = idfDiag.getData();

		return (Number)data.get(index);
	} 
                            #location 4 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             public Number getWeight(int index){
		CSRMatrix idfDiag = get("_idf_diag", CSRMatrix.class);

		List<?> data = idfDiag.getData();

		return (Number)data.get(index);
	}