#vulnerable code 
                             @Override
	public void executeAlgorithm(String algorithmName, List<InputParameter> parameters) throws AlgorithmConfigurationException, AlgorithmLoadingException, AlgorithmExecutionException {
		
		List<ConfigurationValue> configs = convertInputParameters(parameters);

		try {
			buildExecutor(algorithmName).executeAlgorithm(algorithmName, configs);
		} catch (FileNotFoundException e) {
			throw new AlgorithmExecutionException("Could not generate result file.");
		} catch (UnsupportedEncodingException e) {
			throw new AlgorithmExecutionException("Could not build temporary file generator.");
		}
	} 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             @Override
	public void executeAlgorithm(String algorithmName, List<InputParameter> parameters) throws AlgorithmConfigurationException, AlgorithmLoadingException, AlgorithmExecutionException {
		
		List<ConfigurationValue> configs = convertInputParameters(parameters);
		AlgorithmExecutor executor = null;
		
		try {
			executor = buildExecutor(algorithmName);
		} catch (FileNotFoundException e) {
			throw new AlgorithmExecutionException("Could not generate result file.");
		} catch (UnsupportedEncodingException e) {
			throw new AlgorithmExecutionException("Could not build temporary file generator.");
		}
		System.out.println("before execution");
		executor.executeAlgorithm(algorithmName, configs);
		System.out.println("after execution & wait");
	}