File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 9
9
import java
10
10
import ExternalApi
11
11
12
- from int usages , string jarname
13
- where
12
+ private predicate getRelevantUsages ( string jarname , int usages ) {
14
13
usages =
15
14
strictcount ( Call c , ExternalApi a |
16
15
c .getCallee ( ) .getSourceDeclaration ( ) = a and
17
16
not c .getFile ( ) instanceof GeneratedFile and
18
17
a .jarContainer ( ) = jarname and
19
18
not a .isUninteresting ( )
20
19
)
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 ( )
21
36
select jarname , usages order by usages desc
You can’t perform that action at this time.
0 commit comments