code: public static void assertUnlocked(Object object, String name) {
          if (RUNTIME_ASSERTIONS) {
              if (Thread.holdsLock(object)) {
                  throw new RuntimeAssertion("Recursive lock of %s", name);
              }
          }
      }
docs: This is an assertion method that can be used by a thread to confirm that
  the thread isn't already holding lock for an object, before acquiring a
  lock
  
  @param object
  object to test for lock
  @param name
  tag associated with the lock