code: public static Thread findThreadById(final long threadId, final String threadGroupName) {
          Validate.isTrue(threadGroupName != null, "The thread group name must not be null");
          final Thread thread = findThreadById(threadId);
          if(thread != null && thread.getThreadGroup() != null && thread.getThreadGroup().getName().equals(threadGroupName)) {
              return thread;
          }
          return null;
      }
docs: Return the active thread with the specified id if it belongs to a thread group with the specified group name.
  
  @param threadId The thread id
  @param threadGroupName The thread group name
  @return The threads which belongs to a thread group with the specified group name and the thread's id match the specified id.
  {@code null} is returned if no such thread exists
  @throws IllegalArgumentException if the specified id is zero or negative or the group name is null
  @throws  SecurityException
  if the current thread cannot access the system thread group
  
  @throws  SecurityException  if the current thread cannot modify
  thread groups from this thread's thread group up to the system thread group