#vulnerable code 
                             @Override
	public Expression encode(int index, FieldName name){
		List<?> classes = getClasses();

		Object value = classes.get(index);

		Number posLabel = getPosLabel();
		Number negLabel = getNegLabel();

		if(Double.compare(posLabel.doubleValue(), 1d) == 0 && Double.compare(negLabel.doubleValue(), 0d) == 0){
			NormDiscrete normDiscrete = new NormDiscrete(name, String.valueOf(value));

			return normDiscrete;
		}

		// "($name == value) ? pos_label : neg_label"
		return PMMLUtil.createApply("if", PMMLUtil.createApply("equal", new FieldRef(name), PMMLUtil.createConstant(value)), PMMLUtil.createConstant(posLabel), PMMLUtil.createConstant(negLabel));
	} 
                            #location 10 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Override
	public Expression encode(int index, FieldName name){
		List<?> classes = getClasses();

		Object value = classes.get(index);

		Number posLabel = getPosLabel();
		Number negLabel = getNegLabel();

		if(ValueUtil.isOne(posLabel) && ValueUtil.isZero(negLabel)){
			NormDiscrete normDiscrete = new NormDiscrete(name, String.valueOf(value));

			return normDiscrete;
		}

		// "($name == value) ? pos_label : neg_label"
		return PMMLUtil.createApply("if", PMMLUtil.createApply("equal", new FieldRef(name), PMMLUtil.createConstant(value)), PMMLUtil.createConstant(posLabel), PMMLUtil.createConstant(negLabel));
	}