@@ -22,41 +22,39 @@ private class MadModeledCallable extends SummarizedCallableBase {
22
22
}
23
23
24
24
/** Returns the number of APIs with Summary MaD models for a given package and provenance. */
25
+ bindingset [ package]
25
26
private float getNumApisWithMadModels ( string package , string provenance ) {
26
- exists ( MadModeledCallable mc |
27
- package = mc .asCallable ( ) .getDeclaringType ( ) .getPackage ( ) .toString ( ) and
28
- provenance in [ "generated" , "manual" , "both" ]
29
- |
30
- result =
31
- count ( MadModeledCallable c |
32
- package = c .asCallable ( ) .getDeclaringType ( ) .getPackage ( ) .toString ( ) and
33
- (
34
- c .( SummarizedCallable ) .isAutoGenerated ( ) and // "auto-only"
35
- provenance = "generated"
36
- or
37
- c .( SummarizedCallable ) .isManuallyGenerated ( ) and // "manual-only"
38
- provenance = "manual"
39
- or
40
- c .( SummarizedCallable ) .isBothAutoAndManuallyGenerated ( ) and // "both"
41
- provenance = "both"
42
- )
27
+ provenance in [ "generated" , "manual" , "both" ] and
28
+ result =
29
+ count ( MadModeledCallable mc |
30
+ package = mc .asCallable ( ) .getDeclaringType ( ) .getPackage ( ) .toString ( ) and
31
+ (
32
+ mc .( SummarizedCallable ) .isAutoGenerated ( ) and // "auto-only"
33
+ provenance = "generated"
34
+ or
35
+ mc .( SummarizedCallable ) .isManuallyGenerated ( ) and // "manual-only"
36
+ provenance = "manual"
37
+ or
38
+ mc .( SummarizedCallable ) .isBothAutoAndManuallyGenerated ( ) and // "both"
39
+ provenance = "both"
43
40
)
44
- )
41
+ )
45
42
}
46
43
47
44
/** Returns the total number of `DataFlowTargetApi`s for a given package. */
45
+ bindingset [ package]
48
46
private float getNumApis ( string package ) {
49
- exists ( DataFlowTargetApi dataFlowTargApi |
50
- package = dataFlowTargApi .getDeclaringType ( ) .getPackage ( ) .toString ( )
51
- |
52
- result = count ( DataFlowTargetApi d | package = d .getDeclaringType ( ) .getPackage ( ) .toString ( ) )
53
- )
47
+ result =
48
+ count ( DataFlowTargetApi dataFlowTargApi |
49
+ package = dataFlowTargApi .getDeclaringType ( ) .getPackage ( ) .toString ( )
50
+ )
54
51
}
55
52
56
53
from
57
- string package , float generatedOnly , float both , float manualOnly , float non , float all ,
58
- float generatedCoverage , float manualCoverage
54
+ DataFlowTargetApi dataFlowTargApi , string package , float generatedOnly , float both ,
55
+ float manualOnly , float non , float all , float generatedCoverage , float manualCoverage
59
56
where
57
+ package = dataFlowTargApi .getDeclaringType ( ) .getPackage ( ) .toString ( ) and
60
58
generatedOnly = getNumApisWithMadModels ( package , "generated" ) and
61
59
manualOnly = getNumApisWithMadModels ( package , "manual" ) and
62
60
both = getNumApisWithMadModels ( package , "both" ) and
0 commit comments