#vulnerable code 
                             static
	public int[] getShape(NDArray array){
		Object[] shape = array.getShape();

		int[] result = new int[shape.length];

		for(int i = 0; i < shape.length; i++){
			result[i] = ValueUtil.asInteger((Number)shape[i]);
		}

		return result;
	} 
                            #location 5 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             static
	public int[] getShape(NDArray array){
		Object[] shape = array.getShape();

		List<? extends Number> values = (List)Arrays.asList(shape);

		return Ints.toArray(ValueUtil.asIntegers(values));
	}