#vulnerable code 
                             public String getProperty(String name) {
		Properties properties = new Properties();
		Resource resource = new ClassPathResource("server.properties");
		FileInputStream fileInputStream = null;
		String value = null;
		try {
			fileInputStream = new FileInputStream(resource.getFile());
			properties.load(new FileInputStream(resource.getFile()));
			value = properties.getProperty(name);
		} catch (Exception e) {
			
		}finally {
			if(fileInputStream != null) {
				try {
					fileInputStream.close();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		}
		return value;
	} 
                            #location 8 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             public String getProperty(String name) {
		Properties properties = new Properties();
		FileInputStream fileInputStream = null;
		String value = null;
		try {
			fileInputStream = new FileInputStream(this.getProperties());
			properties.load(fileInputStream);
			value = properties.getProperty(name);
		} catch (Exception e) {
			e.printStackTrace();
		}finally {
			if(fileInputStream != null) {
				try {
					fileInputStream.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
		return value;
	}