CodeQL queries 1.25
Skip to end of metadata
Go to start of metadata

Finds private methods that are not accessed

import java

from Method m
where
  m.isPrivate() and
  not exists(m.getAReference()) and
  not m instanceof InitializerMethod
select m