1
1
private import semmle.code.java.dataflow.FlowSummary
2
- private import utils.modelgenerator. internal.CaptureModels
2
+ private import semmle.code.java.dataflow. internal.ModelExclusions
3
3
private import TopJdkApis
4
4
5
5
/**
6
- * Returns the number of `DataFlowTargetApi `s with Summary MaD models
6
+ * Returns the number of `ModelApi `s with Summary MaD models
7
7
* for a given package and provenance.
8
8
*/
9
9
bindingset [ package, apiSubset]
@@ -13,7 +13,7 @@ private int getNumMadModeledApis(string package, string provenance, string apiSu
13
13
count ( SummarizedCallable sc |
14
14
callableSubset ( sc .asCallable ( ) , apiSubset ) and
15
15
package = sc .asCallable ( ) .getCompilationUnit ( ) .getPackage ( ) .getName ( ) and
16
- sc .asCallable ( ) instanceof DataFlowTargetApi and
16
+ sc .asCallable ( ) instanceof ModelApi and
17
17
(
18
18
// "auto-only"
19
19
not sc .hasManualModel ( ) and
@@ -34,12 +34,12 @@ private int getNumMadModeledApis(string package, string provenance, string apiSu
34
34
)
35
35
}
36
36
37
- /** Returns the total number of `DataFlowTargetApi `s for a given package. */
37
+ /** Returns the total number of `ModelApi `s for a given package. */
38
38
private int getNumApis ( string package , string apiSubset ) {
39
39
result =
40
- strictcount ( DataFlowTargetApi dataFlowTargApi |
41
- callableSubset ( dataFlowTargApi , apiSubset ) and
42
- package = dataFlowTargApi .getCompilationUnit ( ) .getPackage ( ) .getName ( )
40
+ strictcount ( ModelApi api |
41
+ callableSubset ( api , apiSubset ) and
42
+ package = api .getCompilationUnit ( ) .getPackage ( ) .getName ( )
43
43
)
44
44
}
45
45
@@ -70,7 +70,7 @@ predicate modelCoverageGenVsMan(
70
70
// calculate the total generated and total manual numbers
71
71
generated = generatedOnly + both and
72
72
manual = manualOnly + both and
73
- // count the total number of `DataFlowTargetApi `s for each package
73
+ // count the total number of `ModelApi `s for each package
74
74
all = getNumApis ( package , apiSubset ) and
75
75
non = all - ( generatedOnly + both + manualOnly ) and
76
76
// Proportion of coverage
0 commit comments