#vulnerable code 
                             public static void main(String[] args) throws Exception {
		LangDescriptor[] languages = new LangDescriptor[] {
			JAVA_DESCR,
//			JAVA8_DESCR,
			ANTLR4_DESCR,
//			SQLITE_NOISY_DESCR,
//			SQLITE_CLEAN_DESCR,
//			TSQL_NOISY_DESCR,
//			TSQL_CLEAN_DESCR,
		};
		Map<String,Map<String, Float>> langToFeatureMedians = new HashMap<>();

		List<String> labels = new ArrayList<>();
		labels.add("curated");
		labels.add("all-in");
		for (FeatureMetaData f : FEATURES_ALL) {
			labels.add(Utils.join(f.abbrevHeaderRows, " "));
		}

		for (LangDescriptor language : languages) {
			System.out.println("###### "+language.name);
			Map<String, Float> featureToErrors = new LinkedHashMap<>();

			FeatureMetaData[] injectWSFeatures = deepCopy(FEATURES_ALL);
			FeatureMetaData[] alignmentFeatures = deepCopy(FEATURES_ALIGN);

			// do it first to get answer with curated features
			List<Float> errors = getErrorRates(language, FEATURES_INJECT_WS, alignmentFeatures);
			Collections.sort(errors);
			int n = errors.size();
			float quart = errors.get((int)(0.27*n));
			float median = errors.get(n/2);
			float quart3 = errors.get((int)(0.75*n));
			System.out.println("curated error median "+median);
			featureToErrors.put("curated", median);

			// do it again to get answer with all features
			errors = getErrorRates(language, FEATURES_ALL, alignmentFeatures);
			Collections.sort(errors);
			n = errors.size();
			median = errors.get(n/2);
			System.out.println("all-in error median "+median);
			featureToErrors.put("all-in", median);

			for (FeatureMetaData feature : injectWSFeatures) {
				if ( feature==FeatureMetaData.UNUSED || feature.type.toString().startsWith("INFO_") )
					continue;
				String name = Utils.join(feature.abbrevHeaderRows, " ");
				labels.add(name.trim());
				System.out.println("wack "+name);
				double saveCost = feature.mismatchCost;
				feature.mismatchCost = 0; // wack this feature

				errors = getErrorRates(language, injectWSFeatures, alignmentFeatures);
				Collections.sort(errors);
				n = errors.size();
				median = errors.get(n/2);
				featureToErrors.put(name, median);
				System.out.println("median error rates "+median);

				// reset feature
				feature.mismatchCost = saveCost;
			}
			System.out.println(featureToErrors);
			langToFeatureMedians.put(language.name, featureToErrors);
		}

		String python =
			"#\n"+
			"# AUTO-GENERATED FILE. DO NOT EDIT\n" +
			"# CodeBuff <version> '<date>'\n" +
			"#\n"+
			"import numpy as np\n"+
			"import matplotlib.pyplot as plt\n\n" +
			"fig = plt.figure()\n"+
			"ax = plt.subplot(111)\n"+
			"N = <numFeatures>\n" +
			"featureIndexes = range(0,N)\n" +
			"<langToMedians:{r |\n" +
			"<r> = [<langToMedians.(r); separator={, }>]\n"+
			"ax.plot(featureIndexes, <r>, label=\"<r>\")\n" +
			"}>\n" +
			"labels = [<labels:{l | '<l>'}; separator={, }>]\n" +
			"ax.set_xticklabels(labels, rotation=60, fontsize=8)\n"+
			"plt.xticks(featureIndexes, labels, rotation=60)\n" +
			"ax.yaxis.grid(True, linestyle='-', which='major', color='lightgrey', alpha=0.5)\n\n" +
			"ax.set_xlabel(\"Inject Whitespace Feature\")\n"+
			"ax.set_ylabel(\"Median Error rate\")\n" +
			"ax.set_title(\"Effect of Dropping One Feature on Whitespace Decision\\nMedian Leave-one-out Validation Error Rate\")\n"+
			"plt.legend()\n" +
			"plt.tight_layout()\n" +
			"plt.show()\n";
		ST pythonST = new ST(python);
		Map<String,Collection<Float>> langToMedians = new HashMap<>();
		int numFeatures = 0;
		for (String s : langToFeatureMedians.keySet()) {
			Map<String, Float> featureToErrors = langToFeatureMedians.get(s);
			langToMedians.put(s, featureToErrors.values());
			numFeatures = featureToErrors.values().size();
		}
		pythonST.add("langToMedians", langToMedians);
		pythonST.add("version", version);
		pythonST.add("date", new Date());
		pythonST.add("numFeatures", numFeatures);
		pythonST.add("labels", labels);

		String code = pythonST.render();

		String fileName = "python/src/drop_one_feature.py";
		Utils.writeFile(fileName, code);
		System.out.println("wrote python code to "+fileName);
	} 
                            #location 30 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             public static void main(String[] args) throws Exception {
		LangDescriptor[] languages = new LangDescriptor[] {
			JAVA_DESCR,
//			JAVA8_DESCR,
			ANTLR4_DESCR,
//			SQLITE_NOISY_DESCR,
//			SQLITE_CLEAN_DESCR,
//			TSQL_NOISY_DESCR,
//			TSQL_CLEAN_DESCR,
		};
		testFeatures(languages, false);
	}