Skip to content

Commit 9ed14b4

Browse files
author
Benjamin Muskalla
committed
Use readble format for APIs
1 parent 4b02e26 commit 9ed14b4

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

java/ql/src/Telemetry/ExternalAPI.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ class ExternalAPI extends Callable {
1616
/**
1717
* Gets information about the external API in the form expected by the CSV modeling framework.
1818
*/
19-
string asCsv(ExternalAPI api) {
19+
string asHumanReadbleString(ExternalAPI api) {
2020
result =
21-
api.getDeclaringType().getPackage() + ";?;" + api.getDeclaringType().getSourceDeclaration() +
22-
";" + api.getName() + ";" + paramsString(api)
21+
api.getDeclaringType().getPackage() + "." + api.getDeclaringType().getSourceDeclaration() +
22+
"#" + api.getName() + paramsString(api)
2323
}
2424

2525
/** Holds if this API is not yet supported by existing CodeQL libraries */

java/ql/src/Telemetry/SupportedExternalSinks.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ where
2020
c.getCallee().getSourceDeclaration() = api and
2121
not c.getFile() instanceof GeneratedFile
2222
)
23-
select api.asCsv(api) as csv, usages order by usages desc
23+
select api.asHumanReadbleString(api) as apiname, usages order by usages desc

java/ql/src/Telemetry/SupportedExternalSources.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ where
2020
c.getCallee().getSourceDeclaration() = api and
2121
not c.getFile() instanceof GeneratedFile
2222
)
23-
select api.asCsv(api) as csv, usages order by usages desc
23+
select api.asHumanReadbleString(api) as apiname, usages order by usages desc

java/ql/src/Telemetry/SupportedExternalTaint.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ where
2020
c.getCallee().getSourceDeclaration() = api and
2121
not c.getFile() instanceof GeneratedFile
2222
)
23-
select api.asCsv(api) as csv, usages order by usages desc
23+
select api.asHumanReadbleString(api) as apiname, usages order by usages desc

java/ql/src/Telemetry/UnsupportedExternalAPIs.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ where
2020
c.getCallee().getSourceDeclaration() = api and
2121
not c.getFile() instanceof GeneratedFile
2222
)
23-
select api.asCsv(api) as csv, usages order by usages desc
23+
select api.asHumanReadbleString(api) as apiname, usages order by usages desc
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| java.io;?;FileWriter;FileWriter;(File) | 1 |
2-
| java.net;?;URL;openStream;() | 1 |
1+
| java.io.FileWriter#FileWriter(File) | 1 |
2+
| java.net.URL#openStream() | 1 |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| java.net;?;URLConnection;getInputStream;() | 1 |
1+
| java.net.URLConnection#getInputStream() | 1 |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| java.lang;?;StringBuilder;append;(String) | 1 |
2-
| java.lang;?;StringBuilder;toString;() | 1 |
1+
| java.lang.StringBuilder#append(String) | 1 |
2+
| java.lang.StringBuilder#toString() | 1 |
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| java.io;?;PrintStream;println;(Object) | 3 |
2-
| java.lang;?;Object;Object;() | 2 |
3-
| java.lang;?;String;length;() | 1 |
4-
| java.time;?;Duration;ofMillis;(long) | 1 |
1+
| java.io.PrintStream#println(Object) | 3 |
2+
| java.lang.Object#Object() | 2 |
3+
| java.lang.String#length() | 1 |
4+
| java.time.Duration#ofMillis(long) | 1 |

0 commit comments

Comments
 (0)