output: #fixed code
                               public static final boolean isJOSMGenerated(File file) {
  		
  		try {
  			
  			BufferedReader reader = new BufferedReader(new FileReader(file));
  			
  			for (int i=0; i<100; i++) {
  				String line = reader.readLine();
  				if (line != null) {
  					if (line.contains("generator='JOSM'")) {
  						reader.close();
  						return true;
  					}
  				}
  			}
  			
  			reader.close();
  			
  		} catch (IOException e) { }
  		
  		return false;
  		
  	}
input: #vulnerable code 
                               public static final boolean isJOSMGenerated(File file) {
  		
  		try {
  			
  			BufferedReader reader = new BufferedReader(new FileReader(file));
  			
  			for (int i=0; i<100; i++) {
  				String line = reader.readLine();
  				if (line != null) {
  					if (line.contains("generator='JOSM'")) {
  						return true;
  					}
  				}
  			}
  			
  			reader.close();
  			
  		} catch (IOException e) { }
  		
  		return false;
  		
  	} 
                              #location 11 
                              #vulnerability type RESOURCE_LEAK