@@ -25,17 +25,19 @@ private import AutomodelJavaUtil
2525bindingset [ limit]
2626private Endpoint getSampleForSignature (
2727 int limit , string package , string type , string subtypes , string name , string signature ,
28- string input , string isVarargs
28+ string input , string isVarargs , string extensibleType
2929) {
3030 exists ( int n , int num_endpoints , ApplicationModeMetadataExtractor meta |
3131 num_endpoints =
3232 count ( Endpoint e |
33+ e .getExtensibleType ( ) = extensibleType and
3334 meta .hasMetadata ( e , package , type , subtypes , name , signature , input , isVarargs )
3435 )
3536 |
3637 result =
3738 rank [ n ] ( Endpoint e , Location loc |
3839 loc = e .asTop ( ) .getLocation ( ) and
40+ e .getExtensibleType ( ) = extensibleType and
3941 meta .hasMetadata ( e , package , type , subtypes , name , signature , input , isVarargs )
4042 |
4143 e
@@ -55,13 +57,14 @@ private Endpoint getSampleForSignature(
5557from
5658 Endpoint endpoint , string message , ApplicationModeMetadataExtractor meta , DollarAtString package ,
5759 DollarAtString type , DollarAtString subtypes , DollarAtString name , DollarAtString signature ,
58- DollarAtString input , DollarAtString isVarargsArray , DollarAtString alreadyAiModeled
60+ DollarAtString input , DollarAtString isVarargsArray , DollarAtString alreadyAiModeled , DollarAtString extensibleType
5961where
62+ endpoint .getExtensibleType ( ) = "sinkModel" and
6063 not exists ( CharacteristicsImpl:: UninterestingToModelCharacteristic u |
6164 u .appliesToEndpoint ( endpoint )
6265 ) and
6366 endpoint =
64- getSampleForSignature ( 9 , package , type , subtypes , name , signature , input , isVarargsArray ) and
67+ getSampleForSignature ( 9 , package , type , subtypes , name , signature , input , isVarargsArray , extensibleType ) and
6568 // If a node is already a known sink for any of our existing ATM queries and is already modeled as a MaD sink, we
6669 // don't include it as a candidate. Otherwise, we might include it as a candidate for query A, but the model will
6770 // 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(),
9598 input , "input" , //
9699 isVarargsArray , "isVarargsArray" , //
97100 alreadyAiModeled , "alreadyAiModeled" , //
98- endpoint . getExtensibleType ( ) . ( DollarAtString ) , "extensibleType"
101+ extensibleType , "extensibleType"
0 commit comments