Java: remove previous uses of isUninteresting

This commit is contained in:
Jami Cogswell
2022-12-08 16:56:43 -05:00
parent 29046e7960
commit f48cc9f40e
6 changed files with 6 additions and 20 deletions

View File

@@ -14,8 +14,7 @@ private predicate getRelevantUsages(string jarname, int usages) {
strictcount(Call c, ExternalApi a |
c.getCallee().getSourceDeclaration() = a and
not c.getFile() instanceof GeneratedFile and
a.jarContainer() = jarname and
not a.isUninteresting()
a.jarContainer() = jarname
)
}

View File

@@ -11,11 +11,8 @@ import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
import ExternalApi
private predicate relevant(ExternalApi api) {
not api.isUninteresting() and
(
api.isSupported() or
api = any(FlowSummaryImpl::Public::NegativeSummarizedCallable nsc).asCallable()
)
api.isSupported() or
api = any(FlowSummaryImpl::Public::NegativeSummarizedCallable nsc).asCallable()
}
from string apiName, int usages

View File

@@ -9,10 +9,7 @@
import java
import ExternalApi
private predicate relevant(ExternalApi api) {
not api.isUninteresting() and
api.isSink()
}
private predicate relevant(ExternalApi api) { api.isSink() }
from string apiName, int usages
where Results<relevant/1>::restrict(apiName, usages)

View File

@@ -9,10 +9,7 @@
import java
import ExternalApi
private predicate relevant(ExternalApi api) {
not api.isUninteresting() and
api.isSource()
}
private predicate relevant(ExternalApi api) { api.isSource() }
from string apiName, int usages
where Results<relevant/1>::restrict(apiName, usages)

View File

@@ -9,10 +9,7 @@
import java
import ExternalApi
private predicate relevant(ExternalApi api) {
not api.isUninteresting() and
api.hasSummary()
}
private predicate relevant(ExternalApi api) { api.hasSummary() }
from string apiName, int usages
where Results<relevant/1>::restrict(apiName, usages)

View File

@@ -11,7 +11,6 @@ import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
import ExternalApi
private predicate relevant(ExternalApi api) {
not api.isUninteresting() and
not api.isSupported() and
not api = any(FlowSummaryImpl::Public::NegativeSummarizedCallable nsc).asCallable()
}