File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import java
1010import ExternalApi
1111
12- from int usages , string jarname
13- where
12+ private predicate getRelevantUsages ( string jarname , int usages ) {
1413 usages =
1514 strictcount ( Call c , ExternalApi a |
1615 c .getCallee ( ) .getSourceDeclaration ( ) = a and
1716 not c .getFile ( ) instanceof GeneratedFile and
1817 a .jarContainer ( ) = jarname and
1918 not a .isUninteresting ( )
2019 )
20+ }
21+
22+ private int getOrder ( string jarname ) {
23+ jarname =
24+ rank [ result ] ( string jar , int usages |
25+ exists ( ExternalApi api | jar = api .jarContainer ( ) ) and getRelevantUsages ( jar , usages )
26+ |
27+ jar order by usages desc , jar
28+ )
29+ }
30+
31+ from ExternalApi api , string jarname , int usages
32+ where
33+ jarname = api .jarContainer ( ) and
34+ getRelevantUsages ( jarname , usages ) and
35+ getOrder ( jarname ) <= resultLimit ( )
2136select jarname , usages order by usages desc
You can’t perform that action at this time.
0 commit comments