#vulnerable code 
                             @Test
	public void whenInputIsValidKeePassXmlShouldParseFileAndReturnCorrectMetadata() throws FileNotFoundException {
		FileInputStream fileInputStream = new FileInputStream("target/test-classes/testDatabase_decrypted.xml");
		KeePassFile keePassFile = new XmlParser().parse(fileInputStream, Salsa20.createInstance(protectedStreamKey));
		Assert.assertEquals("KeePass", keePassFile.getMeta().getGenerator());
		Assert.assertEquals("TestDatabase", keePassFile.getMeta().getDatabaseName());
		Assert.assertEquals("Just a sample db", keePassFile.getMeta().getDatabaseDescription());
		Assert.assertEquals("2014-11-22 18:59:39", dateFormatter.format(keePassFile.getMeta().getDatabaseNameChanged().getTime()));
		Assert.assertEquals("2014-11-22 18:59:39", dateFormatter.format(keePassFile.getMeta().getDatabaseDescriptionChanged().getTime()));
		Assert.assertEquals(365, keePassFile.getMeta().getMaintenanceHistoryDays());
		Assert.assertEquals(true, keePassFile.getMeta().getRecycleBinEnabled());
		Assert.assertEquals("AAAAAAAAAAAAAAAAAAAAAA==", keePassFile.getMeta().getRecycleBinUuid()); 
		Assert.assertEquals("2014-11-22 18:58:56", dateFormatter.format(keePassFile.getMeta().getRecycleBinChanged().getTime()));
		Assert.assertEquals(10, keePassFile.getMeta().getHistoryMaxItems());
		Assert.assertEquals(6291456, keePassFile.getMeta().getHistoryMaxSize());
	} 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             @Test
	public void whenInputIsValidKeePassXmlShouldParseFileAndReturnCorrectMetadata() throws FileNotFoundException {
		KeePassFile keePassFile = parseKeePassXml();
		Assert.assertEquals("KeePass", keePassFile.getMeta().getGenerator());
		Assert.assertEquals("TestDatabase", keePassFile.getMeta().getDatabaseName());
		Assert.assertEquals("Just a sample db", keePassFile.getMeta().getDatabaseDescription());
		Assert.assertEquals("2014-11-22 18:59:39", dateFormatter.format(keePassFile.getMeta().getDatabaseNameChanged().getTime()));
		Assert.assertEquals("2014-11-22 18:59:39", dateFormatter.format(keePassFile.getMeta().getDatabaseDescriptionChanged().getTime()));
		Assert.assertEquals(365, keePassFile.getMeta().getMaintenanceHistoryDays());
		Assert.assertEquals(true, keePassFile.getMeta().getRecycleBinEnabled());
		Assert.assertEquals("AAAAAAAAAAAAAAAAAAAAAA==", keePassFile.getMeta().getRecycleBinUuid()); 
		Assert.assertEquals("2014-11-22 18:58:56", dateFormatter.format(keePassFile.getMeta().getRecycleBinChanged().getTime()));
		Assert.assertEquals(10, keePassFile.getMeta().getHistoryMaxItems());
		Assert.assertEquals(6291456, keePassFile.getMeta().getHistoryMaxSize());
	}