#vulnerable code 
                              @SuppressWarnings("WeakerAccess")
  public String findTopLevelFqn( String fqn )
  {
    while( true )
    {
      LocklessLazyVar<M> lazyModel = _fqnToModel.get().get( fqn );
      if( lazyModel != null )
      {
        return fqn;
      }
      int iDot = fqn.lastIndexOf( '.' );
      if( iDot <= 0 )
      {
        return null;
      }
      fqn = fqn.substring( 0, iDot );
    }
  } 
                            #location 6 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                              @SuppressWarnings("WeakerAccess")
  public String findTopLevelFqn( String fqn )
  {
    FqnCache<LocklessLazyVar<M>> fqnCache = _fqnToModel.get();
    if( fqnCache.isEmpty() )
    {
      return null;
    }

    while( true )
    {
      LocklessLazyVar<M> lazyModel = fqnCache.get( fqn );
      if( lazyModel != null )
      {
        return fqn;
      }
      int iDot = fqn.lastIndexOf( '.' );
      if( iDot <= 0 )
      {
        return null;
      }
      fqn = fqn.substring( 0, iDot );
    }
  }