#vulnerable code 
                              void VerifyEmptyCurrentState(ClusterDataAccessor accessor, ZkClient client, String clusterName, String instanceName, String dbName)
  {
    String path = CMUtil.getInstancePropertyPath(clusterName, instanceName, InstancePropertyType.CURRENTSTATES);
    List<String> subPaths = accessor.getInstancePropertySubPaths(instanceName, InstancePropertyType.CURRENTSTATES);
    
    for(String previousSessionId : subPaths)
    {
      if(client.exists(path+"/"+previousSessionId+"/" + dbName))
      {
        ZNRecord previousCurrentState = accessor.getInstanceProperty(instanceName, InstancePropertyType.CURRENTSTATES, previousSessionId, dbName);
        AssertJUnit.assertTrue(previousCurrentState.getMapFields().size() == 0);
      }
    }
  } 
                            #location 11 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                              void verifyEmptyCurrentState(ClusterDataAccessor accessor, ZkClient client, String clusterName, String instanceName, String dbName)
  {
    String path = CMUtil.getInstancePropertyPath(clusterName, instanceName, InstancePropertyType.CURRENTSTATES);
    List<String> subPaths = accessor.getInstancePropertySubPaths(instanceName, InstancePropertyType.CURRENTSTATES);
    
    for(String previousSessionId : subPaths)
    {
      if(client.exists(path+"/"+previousSessionId+"/" + dbName))
      {
        ZNRecord previousCurrentState = accessor.getInstanceProperty(instanceName, InstancePropertyType.CURRENTSTATES, previousSessionId, dbName);
        AssertJUnit.assertTrue(previousCurrentState.getMapFields().size() == 0);
      }
    }
  }