#vulnerable code 
                                public static List<TrainingSample<BxZoneLabel>> loadProblem(File file, FeatureVectorBuilder<BxZone, BxPage> fvb) throws IOException {
        List<TrainingSample<BxZoneLabel>> ret = new ArrayList<TrainingSample<BxZoneLabel>>();
        BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
        String line;
        final Pattern partsPattern = Pattern.compile(" ");
        final Pattern twopartPattern = Pattern.compile(":");
        while ((line = br.readLine()) != null) {
            String[] parts = partsPattern.split(line);
            BxZoneLabel label = BxZoneLabel.values()[Integer.parseInt(parts[0])];
            FeatureVector fv = new FeatureVector();
            List<String> featureNames = fvb.getFeatureNames();
            for (int partIdx = 1; partIdx < parts.length; ++partIdx) {
                String[] subparts = twopartPattern.split(parts[partIdx]);
                fv.addFeature(featureNames.get(partIdx - 1), Double.parseDouble(subparts[1]));
            }
            TrainingSample<BxZoneLabel> sample = new TrainingSample<BxZoneLabel>(fv, label);
            ret.add(sample);
        }
        br.close();
        return ret;
    } 
                            #location 20 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public static List<TrainingSample<BxZoneLabel>> loadProblem(File file, FeatureVectorBuilder<BxZone, BxPage> fvb) throws IOException {
        List<TrainingSample<BxZoneLabel>> ret = new ArrayList<TrainingSample<BxZoneLabel>>();
        BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
        String line;
        final Pattern partsPattern = Pattern.compile(" ");
        final Pattern twopartPattern = Pattern.compile(":");
        while ((line = br.readLine()) != null) {
            String[] parts = partsPattern.split(line);
            BxZoneLabel label = BxZoneLabel.values()[Integer.parseInt(parts[0])];
            FeatureVector fv = new FeatureVector();
            List<String> featureNames = fvb.getFeatureNames();
            for (int partIdx = 1; partIdx < parts.length; ++partIdx) {
                String[] subparts = twopartPattern.split(parts[partIdx]);
                fv.addFeature(featureNames.get(partIdx - 1), Double.parseDouble(subparts[1]));
            }
            TrainingSample<BxZoneLabel> sample = new TrainingSample<BxZoneLabel>(fv, label);
            ret.add(sample);
        }
        br.close();
        return ret;
    }