#vulnerable code 
                             @Test
	public void testComplexWorkitem() throws ParseException {

		InputStream inputStream = getClass()
				.getResourceAsStream("/json/workitem.json");

		ItemCollection itemCol = JSONParser.parseWorkitem(inputStream);

		Assert.assertNotNull(itemCol);

		Assert.assertEquals("worklist", itemCol.getItemValueString("txtworkflowresultmessage"));
		
		Assert.assertEquals("14194929161-1003e42a", itemCol.getItemValueString("$UniqueID"));
		
		
		
		List<?> list=itemCol.getItemValue("txtworkflowpluginlog");
		Assert.assertEquals(7, list.size());
		
		
	} 
                            #location 11 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void testComplexWorkitem() throws ParseException {

		InputStream inputStream = getClass()
				.getResourceAsStream("/json/workitem.json");

		ItemCollection itemCol = null;
		try {
			itemCol = JSONParser.parseWorkitem(inputStream,"UTF-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
			Assert.fail();
		}
		
		Assert.assertNotNull(itemCol);

		Assert.assertEquals("worklist", itemCol.getItemValueString("txtworkflowresultmessage"));
		
		Assert.assertEquals("14194929161-1003e42a", itemCol.getItemValueString("$UniqueID"));
		
		
		
		List<?> list=itemCol.getItemValue("txtworkflowpluginlog");
		Assert.assertEquals(7, list.size());
		
		
	}