diff --git a/java/ql/lib/semmle/code/java/JDK.qll b/java/ql/lib/semmle/code/java/JDK.qll index a10ee6e2f33..e8891577147 100644 --- a/java/ql/lib/semmle/code/java/JDK.qll +++ b/java/ql/lib/semmle/code/java/JDK.qll @@ -52,9 +52,9 @@ class StringPartialMatchMethod extends Method { * The index of the parameter that is being matched against. */ int getMatchParameterIndex() { - if not this.hasName("regionMatches") - then result = 0 - else this.getParameterType(result) instanceof TypeString + if this.hasName("regionMatches") + then this.getParameterType(result) instanceof TypeString + else result = 0 } } diff --git a/java/ql/lib/semmle/code/java/environment/SystemProperty.qll b/java/ql/lib/semmle/code/java/environment/SystemProperty.qll index dd8373a5b4f..ba1c9dca4e4 100644 --- a/java/ql/lib/semmle/code/java/environment/SystemProperty.qll +++ b/java/ql/lib/semmle/code/java/environment/SystemProperty.qll @@ -2,7 +2,7 @@ import java private import semmle.code.java.frameworks.apache.Lang /** - * Gets Expr that return the value of `propertyName` from `System.getProperty()`. + * Gets an expression that retrieves the value of `propertyName` from `System.getProperty()`. */ Expr getSystemProperty(string propertyName) { result = getSystemPropertyFromSystem(propertyName) or diff --git a/java/ql/lib/semmle/code/java/os/OSCheck.qll b/java/ql/lib/semmle/code/java/os/OSCheck.qll index 73365bd5d3d..d284329716f 100644 --- a/java/ql/lib/semmle/code/java/os/OSCheck.qll +++ b/java/ql/lib/semmle/code/java/os/OSCheck.qll @@ -37,7 +37,7 @@ abstract class IsUnixGuard extends Guard { } abstract class IsAnyUnixGuard extends Guard { } /** - * Holds when the MethodAccess is a call to check the current OS using either the upper case `osUpperCase` or lower case `osLowerCase` string constants. + * Holds when `ma` compares the current OS against the string constant `osString`. */ bindingset[osString] private predicate isOsFromSystemProp(MethodAccess ma, string osString) { diff --git a/java/ql/src/Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql b/java/ql/src/Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql index f924588ea69..fec2c3c11a2 100644 --- a/java/ql/src/Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql +++ b/java/ql/src/Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql @@ -104,7 +104,7 @@ private class FileCreateTempFileSink extends FileCreationSink { } /** - * A guard that checks whether or not the the program is running on the Windows OS. + * A guard that holds when the program is definitely running under some version of Windows. */ abstract private class WindowsOsBarrierGuard extends DataFlow::BarrierGuard { }