#fixed code
                                private static int evalPredict(DecisionTree tree, double[] x) throws HiveException, IOException {
        String script = tree.predictCodegen();
        System.out.println(script);
        TreePredictByJavascriptUDF udf = new TreePredictByJavascriptUDF();
        udf.initialize(new ObjectInspector[] {
                PrimitiveObjectInspectorFactory.javaStringObjectInspector,
                ObjectInspectorFactory.getStandardListObjectInspector(PrimitiveObjectInspectorFactory.javaDoubleObjectInspector) });
        IntWritable result = (IntWritable) udf.evaluate(script, x, true);
        result = (IntWritable) udf.evaluate(script, x, true);
        udf.close();
        return result.get();
    }
#vulnerable code 
                                private static int evalPredict(DecisionTree tree, double[] x) throws HiveException, IOException {
        String script = tree.predictCodegen();
        System.out.println(script);
        TreePredictTrustedUDF udf = new TreePredictTrustedUDF();
        udf.initialize(new ObjectInspector[] {
                PrimitiveObjectInspectorFactory.javaStringObjectInspector,
                ObjectInspectorFactory.getStandardListObjectInspector(PrimitiveObjectInspectorFactory.javaDoubleObjectInspector) });
        IntWritable result = (IntWritable) udf.evaluate(script, x, true);
        result = (IntWritable) udf.evaluate(script, x, true);
        udf.close();
        return result.get();
    } 
                            #location 11 
                            #vulnerability type RESOURCE_LEAK