#fixed code
                             public void execute() {
		
		if (control == null || !control.isDirectory()) {
			throw new BuildException("You need to point the 'control' attribute to the control directory.");
		}

		if (changes != null && changes.isDirectory()) {
			throw new BuildException("If you want the changes written out provide the file via 'changes' attribute.");			
		}
		
		if (dataProducers.size() == 0) {
			throw new BuildException("You need to provide at least one reference to a tgz or directory with data.");
		}

		if (deb == null) {
			throw new BuildException("You need to point the 'destfile' attribute to where the deb is supposed to be created.");
		}
		
		final File[] controlFiles = control.listFiles();
		
		final DataProducer[] data = new DataProducer[dataProducers.size()];
		dataProducers.toArray(data);
		
		final Processor processor = new Processor(new Console() {
			public void println(String s) {
				log(s);
			}			
		});
		
		try {
			final ChangesDescriptor changesDescriptor = processor.createDeb(controlFiles, data, new FileOutputStream(deb));

			log("created " + deb);

			if (changes != null) {
				processor.createChanges(changesDescriptor, new FileOutputStream(changes));

				log("created changes file " + changes);
			}			
		} catch (Exception e) {
			log("failed to create debian package " + e);
			e.printStackTrace();
		}
		
	}
#vulnerable code 
                             public void execute() {
		
		if (control == null || !control.isDirectory()) {
			throw new BuildException("You need to point the 'control' attribute to the control directory.");
		}

		if (changes != null && !changes.isFile()) {
			throw new BuildException("If you want the changes written out provide the file via 'changes' attribute.");			
		}
		
		if (dataProducers.size() == 0) {
			throw new BuildException("You need to provide at least one reference to a tgz or directory with data.");
		}

		if (deb == null) {
			throw new BuildException("You need to point the 'destfile' attribute to where the deb is supposed to be created.");
		}
		
		final File[] controlFiles = control.listFiles();
		
		final DataProducer[] data = new DataProducer[dataProducers.size()];
		dataProducers.toArray(data);
		
		final Processor processor = new Processor(new Console() {
			public void println(String s) {
				log(s);
			}			
		});
		
		try {
			final ChangesDescriptor changesDescriptor = processor.createDeb(controlFiles, data, new FileOutputStream(deb));

			if (changes != null) {
				processor.createChanges(changesDescriptor, new FileOutputStream(changes));
			}			
		} catch (Exception e) {
			log("failed to create debian package " + e);
			e.printStackTrace();
		}
		
		log("created " + deb);
	} 
                            #location 34 
                            #vulnerability type RESOURCE_LEAK