Merge pull request #14553 from github/kaeluka/fix-positive-example-query

Java: Automodel Framework Mode Extraction Bug
This commit is contained in:
Stephan Brandauer
2023-10-23 09:48:49 +02:00
committed by GitHub

View File

@@ -13,17 +13,17 @@ private import AutomodelEndpointTypes
private import AutomodelJavaUtil private import AutomodelJavaUtil
from from
Endpoint endpoint, SinkType sinkType, FrameworkModeMetadataExtractor meta, DollarAtString package, Endpoint endpoint, EndpointType endpointType, FrameworkModeMetadataExtractor meta,
DollarAtString type, DollarAtString subtypes, DollarAtString name, DollarAtString signature, DollarAtString package, DollarAtString type, DollarAtString subtypes, DollarAtString name,
DollarAtString input, DollarAtString output, DollarAtString parameterName, DollarAtString signature, DollarAtString input, DollarAtString output,
DollarAtString extensibleType DollarAtString parameterName, DollarAtString extensibleType
where where
endpoint.getExtensibleType() = extensibleType and endpoint.getExtensibleType() = extensibleType and
meta.hasMetadata(endpoint, package, type, subtypes, name, signature, input, output, parameterName) and meta.hasMetadata(endpoint, package, type, subtypes, name, signature, input, output, parameterName) and
// Extract positive examples of sinks belonging to the existing ATM query configurations. // Extract positive examples of sinks belonging to the existing ATM query configurations.
CharacteristicsImpl::isKnownAs(endpoint, sinkType, _) CharacteristicsImpl::isKnownAs(endpoint, endpointType, _)
select endpoint, select endpoint,
sinkType + "\nrelated locations: $@, $@." + "\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@.", // endpointType + "\nrelated locations: $@, $@." + "\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@.", //
CharacteristicsImpl::getRelatedLocationOrCandidate(endpoint, MethodDoc()), "MethodDoc", // CharacteristicsImpl::getRelatedLocationOrCandidate(endpoint, MethodDoc()), "MethodDoc", //
CharacteristicsImpl::getRelatedLocationOrCandidate(endpoint, ClassDoc()), "ClassDoc", // CharacteristicsImpl::getRelatedLocationOrCandidate(endpoint, ClassDoc()), "ClassDoc", //
package, "package", // package, "package", //