@@ -25,17 +25,19 @@ private import AutomodelJavaUtil
25
25
bindingset [ limit]
26
26
private Endpoint getSampleForSignature (
27
27
int limit , string package , string type , string subtypes , string name , string signature ,
28
- string input , string isVarargs
28
+ string input , string isVarargs , string extensibleType
29
29
) {
30
30
exists ( int n , int num_endpoints , ApplicationModeMetadataExtractor meta |
31
31
num_endpoints =
32
32
count ( Endpoint e |
33
+ e .getExtensibleType ( ) = extensibleType and
33
34
meta .hasMetadata ( e , package , type , subtypes , name , signature , input , isVarargs )
34
35
)
35
36
|
36
37
result =
37
38
rank [ n ] ( Endpoint e , Location loc |
38
39
loc = e .asTop ( ) .getLocation ( ) and
40
+ e .getExtensibleType ( ) = extensibleType and
39
41
meta .hasMetadata ( e , package , type , subtypes , name , signature , input , isVarargs )
40
42
|
41
43
e
@@ -55,13 +57,14 @@ private Endpoint getSampleForSignature(
55
57
from
56
58
Endpoint endpoint , string message , ApplicationModeMetadataExtractor meta , DollarAtString package ,
57
59
DollarAtString type , DollarAtString subtypes , DollarAtString name , DollarAtString signature ,
58
- DollarAtString input , DollarAtString isVarargsArray , DollarAtString alreadyAiModeled
60
+ DollarAtString input , DollarAtString isVarargsArray , DollarAtString alreadyAiModeled , DollarAtString extensibleType
59
61
where
62
+ endpoint .getExtensibleType ( ) = "sinkModel" and
60
63
not exists ( CharacteristicsImpl:: UninterestingToModelCharacteristic u |
61
64
u .appliesToEndpoint ( endpoint )
62
65
) and
63
66
endpoint =
64
- getSampleForSignature ( 9 , package , type , subtypes , name , signature , input , isVarargsArray ) and
67
+ getSampleForSignature ( 9 , package , type , subtypes , name , signature , input , isVarargsArray , extensibleType ) and
65
68
// If a node is already a known sink for any of our existing ATM queries and is already modeled as a MaD sink, we
66
69
// don't include it as a candidate. Otherwise, we might include it as a candidate for query A, but the model will
67
70
// label it as a sink for one of the sink types of query B, for which it's already a known sink. This would result in
@@ -95,4 +98,4 @@ select endpoint.asNode(),
95
98
input , "input" , //
96
99
isVarargsArray , "isVarargsArray" , //
97
100
alreadyAiModeled , "alreadyAiModeled" , //
98
- endpoint . getExtensibleType ( ) . ( DollarAtString ) , "extensibleType"
101
+ extensibleType , "extensibleType"
0 commit comments