From 705cad2810c1a58f16b49bb1f279d75634b505db Mon Sep 17 00:00:00 2001 From: Tomasz Tylenda Date: Mon, 18 Nov 2024 17:58:08 +0100 Subject: [PATCH] Fix integration tests. --- .../resources/autoscan/diffs/diff_S7158.json | 6 + .../commons-beanutils/java-S7158.json | 46 +++++ .../java-S7158.json | 72 ++++++++ .../resources/eclipse-jetty/java-S7158.json | 161 ++++++++++++++++++ .../src/test/resources/guava/java-S7158.json | 28 +++ .../resources/sonar-server/java-S7158.json | 5 + 6 files changed, 318 insertions(+) create mode 100644 its/autoscan/src/test/resources/autoscan/diffs/diff_S7158.json create mode 100644 its/ruling/src/test/resources/commons-beanutils/java-S7158.json create mode 100644 its/ruling/src/test/resources/eclipse-jetty-similar-to-main/java-S7158.json create mode 100644 its/ruling/src/test/resources/eclipse-jetty/java-S7158.json create mode 100644 its/ruling/src/test/resources/guava/java-S7158.json create mode 100644 its/ruling/src/test/resources/sonar-server/java-S7158.json diff --git a/its/autoscan/src/test/resources/autoscan/diffs/diff_S7158.json b/its/autoscan/src/test/resources/autoscan/diffs/diff_S7158.json new file mode 100644 index 00000000000..5a1bc4f4019 --- /dev/null +++ b/its/autoscan/src/test/resources/autoscan/diffs/diff_S7158.json @@ -0,0 +1,6 @@ +{ + "ruleKey": "S7158", + "hasTruePositives": true, + "falseNegatives": 0, + "falsePositives": 0 +} diff --git a/its/ruling/src/test/resources/commons-beanutils/java-S7158.json b/its/ruling/src/test/resources/commons-beanutils/java-S7158.json new file mode 100644 index 00000000000..64396ac4e01 --- /dev/null +++ b/its/ruling/src/test/resources/commons-beanutils/java-S7158.json @@ -0,0 +1,46 @@ +{ +"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/BeanPropertyValueChangeClosure.java": [ +137 +], +"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/BeanPropertyValueEqualsPredicate.java": [ +167 +], +"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/BeanToPropertyValueTransformer.java": [ +122 +], +"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/JDBCDynaClass.java": [ +193 +], +"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/MappedPropertyDescriptor.java": [ +90, +157, +203, +326 +], +"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/PropertyUtilsBean.java": [ +477, +833, +1578, +1963 +], +"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/converters/CharacterConverter.java": [ +72 +], +"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/converters/DateTimeConverter.java": [ +329 +], +"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/converters/NumberConverter.java": [ +261 +], +"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/expression/DefaultResolver.java": [ +80, +93, +118, +144, +167, +182, +205, +228, +266 +] +} diff --git a/its/ruling/src/test/resources/eclipse-jetty-similar-to-main/java-S7158.json b/its/ruling/src/test/resources/eclipse-jetty-similar-to-main/java-S7158.json new file mode 100644 index 00000000000..1764b0743d3 --- /dev/null +++ b/its/ruling/src/test/resources/eclipse-jetty-similar-to-main/java-S7158.json @@ -0,0 +1,72 @@ +{ +"org.eclipse.jetty:jetty-project:jetty-http/src/main/java/org/eclipse/jetty/http/HttpCookie.java": [ +267, +298, +315, +317, +382, +396, +400, +508 +], +"org.eclipse.jetty:jetty-project:jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java": [ +202 +], +"org.eclipse.jetty:jetty-project:jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/ServletPathSpec.java": [ +69 +], +"org.eclipse.jetty:jetty-project:jetty-io/src/main/java/org/eclipse/jetty/io/AbstractEndPoint.java": [ +469 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/Cookies.java": [ +67 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java": [ +427, +476 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/PushBuilderImpl.java": [ +166, +174 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/RequestLogWriter.java": [ +80 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java": [ +262, +388 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/Response.java": [ +1299 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java": [ +1624, +1822, +2228 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/handler/jmx/AbstractHandlerMBean.java": [ +79, +83 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/session/DefaultSessionIdManager.java": [ +236 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/ConnectorTimeoutTest.java": [ +425, +468 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java": [ +719, +735, +768, +784 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java": [ +919, +934, +964, +1479, +1652, +1667 +] +} diff --git a/its/ruling/src/test/resources/eclipse-jetty/java-S7158.json b/its/ruling/src/test/resources/eclipse-jetty/java-S7158.json new file mode 100644 index 00000000000..b1fd0b5ab71 --- /dev/null +++ b/its/ruling/src/test/resources/eclipse-jetty/java-S7158.json @@ -0,0 +1,161 @@ +{ +"org.eclipse.jetty:jetty-project:jetty-http/src/main/java/org/eclipse/jetty/http/HttpCookie.java": [ +267, +298, +315, +317, +382, +396, +400, +508 +], +"org.eclipse.jetty:jetty-project:jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java": [ +202 +], +"org.eclipse.jetty:jetty-project:jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/ServletPathSpec.java": [ +69 +], +"org.eclipse.jetty:jetty-project:jetty-io/src/main/java/org/eclipse/jetty/io/AbstractEndPoint.java": [ +469 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/Cookies.java": [ +67 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java": [ +427, +476 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/PushBuilderImpl.java": [ +166, +174 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/RequestLogWriter.java": [ +80 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java": [ +262, +388 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/Response.java": [ +1299 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java": [ +1624, +1822, +2228 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/handler/jmx/AbstractHandlerMBean.java": [ +79, +83 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/session/DefaultSessionIdManager.java": [ +236 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/ConnectorTimeoutTest.java": [ +425, +468 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/DumpHandler.java": [ +158 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java": [ +719, +735, +768, +784 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java": [ +919, +934, +964, +1479, +1652, +1667 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/ResponseTest.java": [ +1149 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/StopTest.java": [ +210 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/handler/InetAccessHandlerTest.java": [ +93, +100, +107, +114, +123 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLCloseTest.java": [ +79 +], +"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLSelectChannelConnectorLoadTest.java": [ +290 +], +"org.eclipse.jetty:jetty-project:jetty-slf4j-impl/src/main/java/org/eclipse/jetty/logging/JettyLoggerConfiguration.java": [ +180 +], +"org.eclipse.jetty:jetty-project:jetty-slf4j-impl/src/main/java/org/eclipse/jetty/logging/JettyLoggerFactory.java": [ +85, +120 +], +"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/MultiReleaseJarFile.java": [ +243 +], +"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/PathWatcher.java": [ +420 +], +"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/QuotedStringTokenizer.java": [ +278, +342, +595 +], +"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java": [ +174 +], +"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java": [ +66, +300, +303, +344, +347, +625, +631, +680, +686, +1029, +1122 +], +"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/UrlEncoded.java": [ +131, +208, +242, +282, +365, +443, +588 +], +"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/component/AbstractLifeCycle.java": [ +339 +], +"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/resource/JarFileResource.java": [ +126 +], +"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/resource/PathResource.java": [ +341 +], +"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/resource/ResourceCollection.java": [ +103, +210, +251 +], +"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/security/Password.java": [ +219, +223, +234 +], +"org.eclipse.jetty:jetty-project:jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java": [ +1324, +1333, +1485 +] +} diff --git a/its/ruling/src/test/resources/guava/java-S7158.json b/its/ruling/src/test/resources/guava/java-S7158.json new file mode 100644 index 00000000000..72b47f1d0c8 --- /dev/null +++ b/its/ruling/src/test/resources/guava/java-S7158.json @@ -0,0 +1,28 @@ +{ +"com.google.guava:guava:src/com/google/common/base/Splitter.java": [ +176 +], +"com.google.guava:guava:src/com/google/common/base/Strings.java": [ +78 +], +"com.google.guava:guava:src/com/google/common/io/Files.java": [ +730 +], +"com.google.guava:guava:src/com/google/common/net/InetAddresses.java": [ +233, +247, +250 +], +"com.google.guava:guava:src/com/google/common/net/InternetDomainName.java": [ +259 +], +"com.google.guava:guava:src/com/google/common/primitives/ParseRequest.java": [ +36 +], +"com.google.guava:guava:src/com/google/common/primitives/UnsignedLongs.java": [ +304 +], +"com.google.guava:guava:src/com/google/thirdparty/publicsuffix/TrieParser.java": [ +85 +] +} diff --git a/its/ruling/src/test/resources/sonar-server/java-S7158.json b/its/ruling/src/test/resources/sonar-server/java-S7158.json new file mode 100644 index 00000000000..b62b0241e21 --- /dev/null +++ b/its/ruling/src/test/resources/sonar-server/java-S7158.json @@ -0,0 +1,5 @@ +{ +"org.sonarsource.sonarqube:sonar-server:src/main/java/org/sonar/server/user/UserUpdater.java": [ +325 +] +}