#vulnerable code 
                             @Test
	public void track1FormatTest() {
		EmvCard card = new EmvCard();
		boolean ret = TrackUtils
				.extractTrack1Data(
						card,
						BytesUtils
								.fromString("564C42353231313131313131313131313131315E202F2020202020202020202020202020202020202020202020205E31363038323032303030303030303030303030312020303030202020202030"));

		Assertions.assertThat(ret).isTrue();
		Assertions.assertThat(card).isNotNull();
		Assertions.assertThat(card.getCardNumber()).isEqualTo("5211111111111111");
		SimpleDateFormat sdf = new SimpleDateFormat("MM/yyyy");
		Assertions.assertThat(sdf.format(card.getExpireDate())).isEqualTo("08/2016");
		Assertions.assertThat(card.getTrack1()).isNotNull();
		Assertions.assertThat(card.getTrack1().getHolderFirstname()).isNull();
		Assertions.assertThat(card.getTrack1().getHolderLastname()).isNull();
		Assertions.assertThat(card.getTrack1().getService()).isNotNull();
		Assertions.assertThat(card.getTrack1().getService().getServiceCode1()).isEqualTo(ServiceCode1Enum.INTERNATIONNAL_ICC);
		Assertions.assertThat(card.getTrack1().getService().getServiceCode1().getInterchange()).isNotNull();
		Assertions.assertThat(card.getTrack1().getService().getServiceCode1().getTechnology()).isNotNull();
		Assertions.assertThat(card.getTrack1().getService().getServiceCode2()).isEqualTo(ServiceCode2Enum.NORMAL);
		Assertions.assertThat(card.getTrack1().getService().getServiceCode2().getAuthorizationProcessing()).isNotNull();
		Assertions.assertThat(card.getTrack1().getService().getServiceCode3()).isEqualTo(ServiceCode3Enum.GOODS_SERVICES);
		Assertions.assertThat(card.getTrack1().getService().getServiceCode3().getAllowedServices()).isNotNull();
		Assertions.assertThat(card.getTrack1().getService().getServiceCode3().getPinRequirements()).isNotNull();
	} 
                            #location 16 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void track1FormatTest() {
		EmvTrack1 track1 = TrackUtils
				.extractTrack1Data(
						BytesUtils
								.fromString("42353231313131313131313131313131315E202F2020202020202020202020202020202020202020202020205E31363038323032303030303030303030303030312020303030202020202030"));

		Assertions.assertThat(track1).isNotNull();
		Assertions.assertThat(track1.getCardNumber()).isEqualTo("5211111111111111");
		SimpleDateFormat sdf = new SimpleDateFormat("MM/yyyy");
		Assertions.assertThat(sdf.format(track1.getExpireDate())).isEqualTo("08/2016");
		Assertions.assertThat(track1.getHolderFirstname()).isNull();
		Assertions.assertThat(track1.getHolderLastname()).isNull();
		Assertions.assertThat(track1.getService()).isNotNull();
		Assertions.assertThat(track1.getService().getServiceCode1()).isEqualTo(ServiceCode1Enum.INTERNATIONNAL_ICC);
		Assertions.assertThat(track1.getService().getServiceCode1().getInterchange()).isNotNull();
		Assertions.assertThat(track1.getService().getServiceCode1().getTechnology()).isNotNull();
		Assertions.assertThat(track1.getService().getServiceCode2()).isEqualTo(ServiceCode2Enum.NORMAL);
		Assertions.assertThat(track1.getService().getServiceCode2().getAuthorizationProcessing()).isNotNull();
		Assertions.assertThat(track1.getService().getServiceCode3()).isEqualTo(ServiceCode3Enum.GOODS_SERVICES);
		Assertions.assertThat(track1.getService().getServiceCode3().getAllowedServices()).isNotNull();
		Assertions.assertThat(track1.getService().getServiceCode3().getPinRequirements()).isNotNull();
	}