output: #fixed code
                               @Test
  	public void lotusNotesVCard() throws Exception {
  		VCardReader reader = new VCardReader(getClass().getResourceAsStream("John_Doe_LOTUS_NOTES.vcf"));
  		VCard vcard = reader.readNext();
  
  		//VERSION
  		assertEquals(VCardVersion.V3_0, vcard.getVersion());
  
  		//PRODID
  		{
  			ProdIdType f = vcard.getProdId();
  			assertEquals("-//Apple Inc.//Address Book 6.1//EN", f.getValue());
  		}
  
  		//N
  		{
  			StructuredNameType f = vcard.getStructuredName();
  			assertEquals("Doe", f.getFamily());
  			assertEquals("John", f.getGiven());
  			assertEquals(Arrays.asList("Johny"), f.getAdditional());
  			assertEquals(Arrays.asList("Mr."), f.getPrefixes());
  			assertEquals(Arrays.asList("I"), f.getSuffixes());
  		}
  
  		//FN
  		{
  			FormattedNameType f = vcard.getFormattedName();
  			assertEquals("Mr. Doe John I Johny", f.getValue());
  		}
  
  		//NICKNAME
  		{
  			NicknameType f = vcard.getNickname();
  			assertEquals(Arrays.asList("Johny,JayJay"), f.getValues());
  		}
  
  		//ORG
  		{
  			OrganizationType f = vcard.getOrganization();
  			assertEquals(Arrays.asList("IBM", "SUN"), f.getValues());
  		}
  
  		//TITLE
  		{
  			Iterator<TitleType> it = vcard.getTitles().iterator();
  
  			TitleType f = it.next();
  			assertEquals("Generic Accountant", f.getValue());
  
  			assertFalse(it.hasNext());
  		}
  
  		//EMAIL
  		{
  			Iterator<EmailType> it = vcard.getEmails().iterator();
  
  			EmailType f = it.next();
  			assertEquals("john.doe@ibm.com", f.getValue());
  			Set<EmailTypeParameter> types = f.getTypes();
  			assertEquals(3, types.size());
  			assertTrue(types.contains(EmailTypeParameter.INTERNET));
  			assertTrue(types.contains(new EmailTypeParameter("WORK")));
  			assertTrue(types.contains(EmailTypeParameter.PREF));
  
  			f = it.next();
  			assertEquals("billy_bob@gmail.com", f.getValue());
  			types = f.getTypes();
  			assertEquals(2, types.size());
  			assertTrue(types.contains(EmailTypeParameter.INTERNET));
  			assertTrue(types.contains(new EmailTypeParameter("WORK")));
  
  			assertFalse(it.hasNext());
  		}
  
  		//TEL
  		{
  			Iterator<TelephoneType> it = vcard.getTelephoneNumbers().iterator();
  			TelephoneType f = it.next();
  			assertEquals("+1 (212) 204-34456", f.getText());
  			Set<TelephoneTypeParameter> types = f.getTypes();
  			assertEquals(3, types.size());
  			assertTrue(types.contains(TelephoneTypeParameter.CELL));
  			assertTrue(types.contains(TelephoneTypeParameter.VOICE));
  			assertTrue(types.contains(TelephoneTypeParameter.PREF));
  
  			f = it.next();
  			assertEquals("00-1-212-555-7777", f.getText());
  			types = f.getTypes();
  			assertEquals(2, types.size());
  			assertTrue(types.contains(TelephoneTypeParameter.WORK));
  			assertTrue(types.contains(TelephoneTypeParameter.FAX));
  
  			assertFalse(it.hasNext());
  		}
  
  		//ADR
  		{
  			Iterator<AddressType> it = vcard.getAddresses().iterator();
  
  			AddressType f = it.next();
  			assertEquals("item1", f.getGroup());
  			assertEquals(null, f.getPoBox());
  			assertEquals(null, f.getExtendedAddress());
  			assertEquals("25334" + NEWLINE + "South cresent drive, Building 5, 3rd floo r", f.getStreetAddress());
  			assertEquals("New York", f.getLocality());
  			assertEquals("New York", f.getRegion());
  			assertEquals("NYC887", f.getPostalCode());
  			assertEquals("U.S.A.", f.getCountry());
  			assertNull(f.getLabel());
  
  			Set<AddressTypeParameter> types = f.getTypes();
  			assertEquals(2, types.size());
  			assertTrue(types.contains(AddressTypeParameter.HOME));
  			assertTrue(types.contains(AddressTypeParameter.PREF));
  
  			assertFalse(it.hasNext());
  		}
  
  		//NOTE
  		{
  			Iterator<NoteType> it = vcard.getNotes().iterator();
  
  			NoteType f = it.next();
  			assertEquals("THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"" + NEWLINE + "AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO , THE" + NEWLINE + "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR P URPOSE" + NEWLINE + "ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTOR S BE" + NEWLINE + "LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR" + NEWLINE + "CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF" + NEWLINE + " SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS " + NEWLINE + "INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN" + NEWLINE + " CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)" + NEWLINE + "A RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE" + NEWLINE + " POSSIBILITY OF SUCH DAMAGE.", f.getValue());
  
  			assertFalse(it.hasNext());
  		}
  
  		//URL
  		{
  			Iterator<UrlType> it = vcard.getUrls().iterator();
  
  			UrlType f = it.next();
  			assertEquals("item2", f.getGroup());
  			assertEquals("http://www.sun.com", f.getValue());
  			Set<String> types = f.getSubTypes().getTypes();
  			assertEquals(1, types.size());
  			assertTrue(types.contains("pref"));
  
  			assertFalse(it.hasNext());
  		}
  
  		//BDAY
  		{
  			BirthdayType f = vcard.getBirthday();
  			Calendar c = Calendar.getInstance();
  			c.clear();
  			c.set(Calendar.YEAR, 1980);
  			c.set(Calendar.MONTH, Calendar.MAY);
  			c.set(Calendar.DAY_OF_MONTH, 21);
  			assertEquals(c.getTime(), f.getDate());
  		}
  
  		//PHOTO
  		{
  			Iterator<PhotoType> it = vcard.getPhotos().iterator();
  
  			PhotoType f = it.next();
  			assertEquals(ImageTypeParameter.JPEG, f.getContentType());
  			assertEquals(7957, f.getData().length);
  
  			assertFalse(it.hasNext());
  		}
  
  		//UID
  		{
  			UidType f = vcard.getUid();
  			assertEquals("0e7602cc-443e-4b82-b4b1-90f62f99a199", f.getValue());
  		}
  
  		//GEO
  		{
  			GeoType f = vcard.getGeo();
  			assertEquals(-2.6, f.getLatitude(), .01);
  			assertEquals(3.4, f.getLongitude(), .01);
  		}
  
  		//CLASS
  		{
  			ClassificationType f = vcard.getClassification();
  			assertEquals("Public", f.getValue());
  		}
  
  		//PROFILE
  		{
  			ProfileType f = vcard.getProfile();
  			assertEquals("VCard", f.getValue());
  		}
  
  		//TZ
  		{
  			TimezoneType f = vcard.getTimezone();
  			assertIntEquals(1, f.getHourOffset());
  			assertIntEquals(0, f.getMinuteOffset());
  		}
  
  		//LABEL
  		{
  			Iterator<LabelType> it = vcard.getOrphanedLabels().iterator();
  
  			LabelType f = it.next();
  			assertEquals("John Doe" + NEWLINE + "New York, NewYork," + NEWLINE + "South Crecent Drive," + NEWLINE + "Building 5, floor 3," + NEWLINE + "USA", f.getValue());
  			Set<AddressTypeParameter> types = f.getTypes();
  			assertEquals(3, types.size());
  			assertTrue(types.contains(AddressTypeParameter.HOME));
  			assertTrue(types.contains(AddressTypeParameter.PARCEL));
  			assertTrue(types.contains(AddressTypeParameter.PREF));
  
  			assertFalse(it.hasNext());
  		}
  
  		//SORT-STRING
  		{
  			SortStringType f = vcard.getSortString();
  			assertEquals("JOHN", f.getValue());
  		}
  
  		//ROLE
  		{
  			Iterator<RoleType> it = vcard.getRoles().iterator();
  
  			RoleType f = it.next();
  			assertEquals("Counting Money", f.getValue());
  
  			assertFalse(it.hasNext());
  		}
  
  		//SOURCE
  		{
  			Iterator<SourceType> it = vcard.getSources().iterator();
  
  			SourceType f = it.next();
  			assertEquals("Whatever", f.getValue());
  
  			assertFalse(it.hasNext());
  		}
  
  		//MAILER
  		{
  			MailerType f = vcard.getMailer();
  			assertEquals("Mozilla Thunderbird", f.getValue());
  		}
  
  		//NAME
  		{
  			SourceDisplayTextType f = vcard.getSourceDisplayText();
  			assertEquals("VCard for John Doe", f.getValue());
  		}
  
  		//extended types
  		{
  			assertEquals(4, countExtTypes(vcard));
  
  			RawType f = vcard.getExtendedProperties("X-ABLABEL").get(0);
  			assertEquals("item2", f.getGroup());
  			assertEquals("X-ABLabel", f.getTypeName());
  			assertEquals("_$!<HomePage>!$_", f.getValue());
  
  			f = vcard.getExtendedProperties("X-ABUID").get(0);
  			assertEquals("X-ABUID", f.getTypeName());
  			assertEquals("0E7602CC-443E-4B82-B4B1-90F62F99A199:ABPerson", f.getValue());
  
  			f = vcard.getExtendedProperties("X-GENERATOR").get(0);
  			assertEquals("X-GENERATOR", f.getTypeName());
  			assertEquals("Cardme Generator", f.getValue());
  
  			f = vcard.getExtendedProperties("X-LONG-STRING").get(0);
  			assertEquals("X-LONG-STRING", f.getTypeName());
  			assertEquals("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", f.getValue());
  		}
  
  		assertWarnings(0, reader.getWarnings());
  		assertNull(reader.readNext());
  	}
input: #vulnerable code 
                               @Test
  	public void lotusNotesVCard() throws Exception {
  		VCardReader reader = new VCardReader(getClass().getResourceAsStream("John_Doe_LOTUS_NOTES.vcf"));
  		VCard vcard = reader.readNext();
  
  		//VERSION
  		assertEquals(VCardVersion.V3_0, vcard.getVersion());
  
  		//PRODID
  		{
  			ProdIdType f = vcard.getProdId();
  			assertEquals("-//Apple Inc.//Address Book 6.1//EN", f.getValue());
  		}
  
  		//N
  		{
  			StructuredNameType f = vcard.getStructuredName();
  			assertEquals("Doe", f.getFamily());
  			assertEquals("John", f.getGiven());
  			assertEquals(Arrays.asList("Johny"), f.getAdditional());
  			assertEquals(Arrays.asList("Mr."), f.getPrefixes());
  			assertEquals(Arrays.asList("I"), f.getSuffixes());
  		}
  
  		//FN
  		{
  			FormattedNameType f = vcard.getFormattedName();
  			assertEquals("Mr. Doe John I Johny", f.getValue());
  		}
  
  		//NICKNAME
  		{
  			NicknameType f = vcard.getNickname();
  			assertEquals(Arrays.asList("Johny,JayJay"), f.getValues());
  		}
  
  		//ORG
  		{
  			OrganizationType f = vcard.getOrganization();
  			assertEquals(Arrays.asList("IBM", "SUN"), f.getValues());
  		}
  
  		//TITLE
  		{
  			Iterator<TitleType> it = vcard.getTitles().iterator();
  
  			TitleType f = it.next();
  			assertEquals("Generic Accountant", f.getValue());
  
  			assertFalse(it.hasNext());
  		}
  
  		//EMAIL
  		{
  			Iterator<EmailType> it = vcard.getEmails().iterator();
  
  			EmailType f = it.next();
  			assertEquals("john.doe@ibm.com", f.getValue());
  			Set<EmailTypeParameter> types = f.getTypes();
  			assertEquals(3, types.size());
  			assertTrue(types.contains(EmailTypeParameter.INTERNET));
  			assertTrue(types.contains(new EmailTypeParameter("WORK")));
  			assertTrue(types.contains(EmailTypeParameter.PREF));
  
  			f = it.next();
  			assertEquals("billy_bob@gmail.com", f.getValue());
  			types = f.getTypes();
  			assertEquals(2, types.size());
  			assertTrue(types.contains(EmailTypeParameter.INTERNET));
  			assertTrue(types.contains(new EmailTypeParameter("WORK")));
  
  			assertFalse(it.hasNext());
  		}
  
  		//TEL
  		{
  			Iterator<TelephoneType> it = vcard.getTelephoneNumbers().iterator();
  			TelephoneType f = it.next();
  			assertEquals("+1 (212) 204-34456", f.getText());
  			Set<TelephoneTypeParameter> types = f.getTypes();
  			assertEquals(3, types.size());
  			assertTrue(types.contains(TelephoneTypeParameter.CELL));
  			assertTrue(types.contains(TelephoneTypeParameter.VOICE));
  			assertTrue(types.contains(TelephoneTypeParameter.PREF));
  
  			f = it.next();
  			assertEquals("00-1-212-555-7777", f.getText());
  			types = f.getTypes();
  			assertEquals(2, types.size());
  			assertTrue(types.contains(TelephoneTypeParameter.WORK));
  			assertTrue(types.contains(TelephoneTypeParameter.FAX));
  
  			assertFalse(it.hasNext());
  		}
  
  		//ADR
  		{
  			Iterator<AddressType> it = vcard.getAddresses().iterator();
  
  			AddressType f = it.next();
  			assertEquals("item1", f.getGroup());
  			assertEquals(null, f.getPoBox());
  			assertEquals(null, f.getExtendedAddress());
  			assertEquals("25334" + NEWLINE + "South cresent drive, Building 5, 3rd floo r", f.getStreetAddress());
  			assertEquals("New York", f.getLocality());
  			assertEquals("New York", f.getRegion());
  			assertEquals("NYC887", f.getPostalCode());
  			assertEquals("U.S.A.", f.getCountry());
  			assertNull(f.getLabel());
  
  			Set<AddressTypeParameter> types = f.getTypes();
  			assertEquals(2, types.size());
  			assertTrue(types.contains(AddressTypeParameter.HOME));
  			assertTrue(types.contains(AddressTypeParameter.PREF));
  
  			assertFalse(it.hasNext());
  		}
  
  		//NOTE
  		{
  			Iterator<NoteType> it = vcard.getNotes().iterator();
  
  			NoteType f = it.next();
  			assertEquals("THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"" + NEWLINE + "AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO , THE" + NEWLINE + "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR P URPOSE" + NEWLINE + "ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTOR S BE" + NEWLINE + "LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR" + NEWLINE + "CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF" + NEWLINE + " SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS " + NEWLINE + "INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN" + NEWLINE + " CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)" + NEWLINE + "A RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE" + NEWLINE + " POSSIBILITY OF SUCH DAMAGE.", f.getValue());
  
  			assertFalse(it.hasNext());
  		}
  
  		//URL
  		{
  			Iterator<UrlType> it = vcard.getUrls().iterator();
  
  			UrlType f = it.next();
  			assertEquals("item2", f.getGroup());
  			assertEquals("http://www.sun.com", f.getValue());
  			Set<String> types = f.getSubTypes().getTypes();
  			assertEquals(1, types.size());
  			assertTrue(types.contains("pref"));
  
  			assertFalse(it.hasNext());
  		}
  
  		//BDAY
  		{
  			BirthdayType f = vcard.getBirthday();
  			Calendar c = Calendar.getInstance();
  			c.clear();
  			c.set(Calendar.YEAR, 1980);
  			c.set(Calendar.MONTH, Calendar.MAY);
  			c.set(Calendar.DAY_OF_MONTH, 21);
  			assertEquals(c.getTime(), f.getDate());
  		}
  
  		//PHOTO
  		{
  			Iterator<PhotoType> it = vcard.getPhotos().iterator();
  
  			PhotoType f = it.next();
  			assertEquals(ImageTypeParameter.JPEG, f.getContentType());
  			assertEquals(7957, f.getData().length);
  
  			assertFalse(it.hasNext());
  		}
  
  		//UID
  		{
  			UidType f = vcard.getUid();
  			assertEquals("0e7602cc-443e-4b82-b4b1-90f62f99a199", f.getValue());
  		}
  
  		//GEO
  		{
  			GeoType f = vcard.getGeo();
  			assertEquals(-2.6, f.getLatitude(), .01);
  			assertEquals(3.4, f.getLongitude(), .01);
  		}
  
  		//CLASS
  		{
  			ClassificationType f = vcard.getClassification();
  			assertEquals("Public", f.getValue());
  		}
  
  		//PROFILE
  		{
  			ProfileType f = vcard.getProfile();
  			assertEquals("VCard", f.getValue());
  		}
  
  		//TZ
  		{
  			TimezoneType f = vcard.getTimezone();
  			assertIntEquals(1, f.getHourOffset());
  			assertIntEquals(0, f.getMinuteOffset());
  		}
  
  		//LABEL
  		{
  			Iterator<LabelType> it = vcard.getOrphanedLabels().iterator();
  
  			LabelType f = it.next();
  			assertEquals("John Doe" + NEWLINE + "New York, NewYork," + NEWLINE + "South Crecent Drive," + NEWLINE + "Building 5, floor 3," + NEWLINE + "USA", f.getValue());
  			Set<AddressTypeParameter> types = f.getTypes();
  			assertEquals(3, types.size());
  			assertTrue(types.contains(AddressTypeParameter.HOME));
  			assertTrue(types.contains(AddressTypeParameter.PARCEL));
  			assertTrue(types.contains(AddressTypeParameter.PREF));
  
  			assertFalse(it.hasNext());
  		}
  
  		//SORT-STRING
  		{
  			SortStringType f = vcard.getSortString();
  			assertEquals("JOHN", f.getValue());
  		}
  
  		//ROLE
  		{
  			Iterator<RoleType> it = vcard.getRoles().iterator();
  
  			RoleType f = it.next();
  			assertEquals("Counting Money", f.getValue());
  
  			assertFalse(it.hasNext());
  		}
  
  		//SOURCE
  		{
  			Iterator<SourceType> it = vcard.getSources().iterator();
  
  			SourceType f = it.next();
  			assertEquals("Whatever", f.getValue());
  
  			assertFalse(it.hasNext());
  		}
  
  		//MAILER
  		{
  			MailerType f = vcard.getMailer();
  			assertEquals("Mozilla Thunderbird", f.getValue());
  		}
  
  		//NAME
  		{
  			SourceDisplayTextType f = vcard.getSourceDisplayText();
  			assertEquals("VCard for John Doe", f.getValue());
  		}
  
  		//extended types
  		{
  			assertEquals(4, countExtTypes(vcard));
  
  			RawType f = vcard.getExtendedProperties("X-ABLABEL").get(0);
  			assertEquals("item2", f.getGroup());
  			assertEquals("X-ABLabel", f.getTypeName());
  			assertEquals("_$!<HomePage>!$_", f.getValue());
  
  			f = vcard.getExtendedProperties("X-ABUID").get(0);
  			assertEquals("X-ABUID", f.getTypeName());
  			assertEquals("0E7602CC-443E-4B82-B4B1-90F62F99A199:ABPerson", f.getValue());
  
  			f = vcard.getExtendedProperties("X-GENERATOR").get(0);
  			assertEquals("X-GENERATOR", f.getTypeName());
  			assertEquals("Cardme Generator", f.getValue());
  
  			f = vcard.getExtendedProperties("X-LONG-STRING").get(0);
  			assertEquals("X-LONG-STRING", f.getTypeName());
  			assertEquals("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", f.getValue());
  		}
  	} 
                              #location 4 
                              #vulnerability type RESOURCE_LEAK