output: #fixed code
                               public static void main(String[] args) {
  		AppUtil appUtil = new AppUtil();
  		AService service = (AService) appUtil.getComponentInstance("aService");
  		AggregateRootA aggregateRootA = service.getAggregateRootA("11");
  		DomainMessage res = service.commandA("11", aggregateRootA, 100);
  
  		long start = System.currentTimeMillis();
  		int result = 0;
  		DomainMessage res1 = (DomainMessage) res.getBlockEventResult();
  		if (res1 != null && res1.getBlockEventResult() != null)
  			result = (Integer) res1.getBlockEventResult();
  
  		long stop = System.currentTimeMillis();
  		Assert.assertEquals(result, 400);
  		System.out.print("\n ok \n" + result + " time:" + (stop - start));
  	}
input: #vulnerable code 
                               public static void main(String[] args) {
  		AppUtil appUtil = new AppUtil();
  		AService service = (AService) appUtil.getComponentInstance("aService");
  		AggregateRootA aggregateRootA = service.getAggregateRootA("11");
  		DomainMessage res = service.commandA("11", aggregateRootA, 100);
  
  		long start = System.currentTimeMillis();
  		int result = 0;
  		DomainMessage res1 = (DomainMessage) res.getBlockEventResult();
  		if (res1.getBlockEventResult() != null)
  			result = (Integer) res1.getBlockEventResult();
  
  		long stop = System.currentTimeMillis();
  		Assert.assertEquals(result, 400);
  		System.out.print("\n ok \n" + result + (stop - start));
  	} 
                              #location 10 
                              #vulnerability type NULL_DEREFERENCE