#vulnerable code 
                             public void train(String dataFile, int maxite, float c) throws IOException {
		
		InstanceSet instset =  buildInstanceList(dataFile);
		IFeatureAlphabet features = factory.DefaultFeatureAlphabet();

		SFGenerator generator = new SFGenerator();
		int fsize = features.size();
		
		LabelAlphabet la = factory.DefaultLabelAlphabet();
		int ysize = la.size();
		System.out.printf("开始训练");
		LinearMax solver = new LinearMax(generator, ysize);
		ZeroOneLoss loss = new ZeroOneLoss();
		Update update = new LinearMaxPAUpdate(loss);
		OnlineTrainer trainer = new OnlineTrainer(solver, update, loss,
				fsize, maxite, c);
		Linear models = trainer.train(instset, null);
		instset = null;
		solver = null;
		loss = null;
		trainer = null;
		System.out.println();
		factory.setStopIncrement(true);
		models.saveTo(modelfile);

	} 
                            #location 7 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             public void train(String dataFile, int maxite, float c) throws IOException {
		
		InstanceSet instset =  buildInstanceList(dataFile);

		SFGenerator generator = new SFGenerator();
		
		LabelAlphabet la = factory.DefaultLabelAlphabet();
		int ysize = la.size();
		System.out.printf("开始训练");
		LinearMax solver = new LinearMax(generator, ysize);
		ZeroOneLoss loss = new ZeroOneLoss();
		Update update = new LinearMaxPAUpdate(loss);
		OnlineTrainer trainer = new OnlineTrainer(solver, update, loss,
				factory, maxite, c);
		Linear models = trainer.train(instset, null);
		instset = null;
		solver = null;
		loss = null;
		trainer = null;
		System.out.println();
		factory.setStopIncrement(true);
		models.saveTo(modelfile);

	}