From 22df1417611f9380b02052a4040839ee251ea80a Mon Sep 17 00:00:00 2001 From: Benjamin Muskalla Date: Tue, 7 Sep 2021 14:17:13 +0200 Subject: [PATCH] Rename API name predicate --- java/ql/src/Telemetry/ExternalAPI.qll | 6 +++--- java/ql/src/Telemetry/SupportedExternalSinks.ql | 2 +- java/ql/src/Telemetry/SupportedExternalSources.ql | 2 +- java/ql/src/Telemetry/SupportedExternalTaint.ql | 2 +- java/ql/src/Telemetry/UnsupportedExternalAPIs.ql | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/java/ql/src/Telemetry/ExternalAPI.qll b/java/ql/src/Telemetry/ExternalAPI.qll index 23c61b01236..1b1385c4266 100644 --- a/java/ql/src/Telemetry/ExternalAPI.qll +++ b/java/ql/src/Telemetry/ExternalAPI.qll @@ -29,10 +29,10 @@ class ExternalAPI extends Callable { /** * Gets information about the external API in the form expected by the CSV modeling framework. */ - string asHumanReadbleString(ExternalAPI api) { + string getApiName() { result = - api.getDeclaringType().getPackage() + "." + api.getDeclaringType().getSourceDeclaration() + - "#" + api.getName() + paramsString(api) + this.getDeclaringType().getPackage() + "." + this.getDeclaringType().getSourceDeclaration() + + "#" + this.getName() + paramsString(this) } /** diff --git a/java/ql/src/Telemetry/SupportedExternalSinks.ql b/java/ql/src/Telemetry/SupportedExternalSinks.ql index 2d6db91939f..9f7d3faac25 100644 --- a/java/ql/src/Telemetry/SupportedExternalSinks.ql +++ b/java/ql/src/Telemetry/SupportedExternalSinks.ql @@ -19,4 +19,4 @@ where c.getCallee().getSourceDeclaration() = api and not c.getFile() instanceof GeneratedFile ) -select api.asHumanReadbleString(api) as apiname, usages order by usages desc +select api.getApiName() as apiname, usages order by usages desc diff --git a/java/ql/src/Telemetry/SupportedExternalSources.ql b/java/ql/src/Telemetry/SupportedExternalSources.ql index 4c09aa299da..2db7790b230 100644 --- a/java/ql/src/Telemetry/SupportedExternalSources.ql +++ b/java/ql/src/Telemetry/SupportedExternalSources.ql @@ -19,4 +19,4 @@ where c.getCallee().getSourceDeclaration() = api and not c.getFile() instanceof GeneratedFile ) -select api.asHumanReadbleString(api) as apiname, usages order by usages desc +select api.getApiName() as apiname, usages order by usages desc diff --git a/java/ql/src/Telemetry/SupportedExternalTaint.ql b/java/ql/src/Telemetry/SupportedExternalTaint.ql index 0430f63c537..25c849545e6 100644 --- a/java/ql/src/Telemetry/SupportedExternalTaint.ql +++ b/java/ql/src/Telemetry/SupportedExternalTaint.ql @@ -19,4 +19,4 @@ where c.getCallee().getSourceDeclaration() = api and not c.getFile() instanceof GeneratedFile ) -select api.asHumanReadbleString(api) as apiname, usages order by usages desc +select api.getApiName() as apiname, usages order by usages desc diff --git a/java/ql/src/Telemetry/UnsupportedExternalAPIs.ql b/java/ql/src/Telemetry/UnsupportedExternalAPIs.ql index 09cadfd0f2e..ae038cfa4db 100644 --- a/java/ql/src/Telemetry/UnsupportedExternalAPIs.ql +++ b/java/ql/src/Telemetry/UnsupportedExternalAPIs.ql @@ -19,4 +19,4 @@ where c.getCallee().getSourceDeclaration() = api and not c.getFile() instanceof GeneratedFile ) -select api.asHumanReadbleString(api) as apiname, usages order by usages desc +select api.getApiName() as apiname, usages order by usages desc