Skip to content

Commit

Permalink
Enable S131, S1068, S1110, S1116, S1124, S1161, S1186 on Test code (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kaufco authored Jun 19, 2024
1 parent 75eb133 commit 67f97dc
Show file tree
Hide file tree
Showing 20 changed files with 418 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
{
"ruleKey": "S1161",
"hasTruePositives": true,
"falseNegatives": 7,
"falseNegatives": 15,
"falsePositives": 0
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ruleKey": "S1161",
"hasTruePositives": true,
"falseNegatives": 7,
"falseNegatives": 15,
"falsePositives": 0
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/locale/BaseLocaleConverter.java": [
156
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/BasicDynaBeanTestCase.java": [
60
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/PropertyUtilsTestCase.java": [
160
]
}
64 changes: 64 additions & 0 deletions its/ruling/src/test/resources/commons-beanutils/java-S1186.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,68 @@
"commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/expression/DefaultResolver.java": [
67
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/AlphaBean.java": [
44
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/BeanWithInnerBean.java": [
29
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/ExtendMapBean.java": [
32
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/IndexedTestBean.java": [
39
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/LazyDynaListTestCase.java": [
82,
89
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/MappedPropertyTestBean.java": [
90
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/MappedPropertyTestCase.java": [
53,
67
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/MethodUtilsTestCase.java": [
56,
71
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/TestBean.java": [
433
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/bugs/Jira359TestCase.java": [
151
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/bugs/Jira381TestCase.java": [
69,
75
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/converters/ArrayConverterTestCase.java": [
52,
57
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/converters/CharacterConverterTestCase.java": [
51,
56
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/converters/ClassConverterTestCase.java": [
51,
56
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/converters/DateConverterTestCase.java": [
50,
55
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/expression/DefaultResolverTestCase.java": [
70,
77
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/locale/LocaleBeanUtilsTestCase.java": [
52,
69
],
"commons-beanutils:commons-beanutils:src/test/java/org/apache/commons/beanutils2/locale/converters/BaseLocaleConverterTestCase.java": [
268
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
],
"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionDataStore.java": [
61
],
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"org.eclipse.jetty:jetty-project:jetty-http/src/test/java/org/eclipse/jetty/http/CookieCutterLenientTest.java": [
204
],
"org.eclipse.jetty:jetty-project:jetty-http/src/test/java/org/eclipse/jetty/http/HttpFieldsTest.java": [
940,
1008
],
"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/handler/BufferedResponseHandler.java": [
197
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java": [
1481
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
],
"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/OptionalSslConnectionFactory.java": [
64
],
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"org.eclipse.jetty:jetty-project:jetty-http/src/main/java/org/eclipse/jetty/http/MimeTypes.java": [
290
],
"org.eclipse.jetty:jetty-project:jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java": [
229,
253
],
"org.eclipse.jetty:jetty-project:jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferOutputStream.java": [
40,
44
Expand All @@ -13,6 +17,13 @@
"org.eclipse.jetty:jetty-project:jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java": [
795
],
"org.eclipse.jetty:jetty-project:jetty-io/src/test/java/org/eclipse/jetty/io/SelectorManagerTest.java": [
105
],
"org.eclipse.jetty:jetty-project:jetty-io/src/test/java/org/eclipse/jetty/io/WriteFlusherTest.java": [
394,
430
],
"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/CachedContentFactory.java": [
545
],
Expand Down Expand Up @@ -84,4 +95,45 @@
"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/session/NullSessionCache.java": [
49
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/AsyncStressTest.java": [
332,
344,
350
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/DetectorConnectionTest.java": [
528,
589
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/HalfCloseTest.java": [
147,
171
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/HttpChannelEventTest.java": [
283
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/HttpOutputTest.java": [
82,
785,
996
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/LocalAsyncContextTest.java": [
69,
270,
476,
481
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/MultiPartCaptureTest.java": [
347,
352,
357,
362,
367
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/MultiPartFormInputStreamTest.java": [
246
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/NotAcceptingTest.java": [
272,
427
]
}
13 changes: 13 additions & 0 deletions its/ruling/src/test/resources/eclipse-jetty/java-S1068.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"org.eclipse.jetty:jetty-project:jetty-jmx/src/test/java/com/acme/DerivedExtended.java": [
28
],
"org.eclipse.jetty:jetty-project:jetty-jmx/src/test/java/com/acme/jmx/DerivedMBean.java": [
32
],
"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java": [
1825
],
Expand All @@ -25,5 +31,12 @@
],
"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionDataStore.java": [
61
],
"org.eclipse.jetty:jetty-project:jetty-util/src/test/java/org/eclipse/jetty/util/PathWatcherTest.java": [
301
],
"org.eclipse.jetty:jetty-project:jetty-util/src/test/java/org/eclipse/jetty/util/TestIntrospectionUtil.java": [
55,
63
]
}
5 changes: 5 additions & 0 deletions its/ruling/src/test/resources/eclipse-jetty/java-S1110.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"org.eclipse.jetty:jetty-project:jetty-slf4j-impl/src/test/java/org/eclipse/jetty/logging/Slf4jEffort.java": [
72
]
}
13 changes: 13 additions & 0 deletions its/ruling/src/test/resources/eclipse-jetty/java-S1116.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
{
"org.eclipse.jetty:jetty-project:jetty-http/src/test/java/org/eclipse/jetty/http/CookieCutterLenientTest.java": [
204
],
"org.eclipse.jetty:jetty-project:jetty-http/src/test/java/org/eclipse/jetty/http/HttpFieldsTest.java": [
940,
1008
],
"org.eclipse.jetty:jetty-project:jetty-server/src/main/java/org/eclipse/jetty/server/handler/BufferedResponseHandler.java": [
197
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java": [
1481
],
"org.eclipse.jetty:jetty-project:jetty-server/src/test/java/org/eclipse/jetty/server/handler/NcsaRequestLogTest.java": [
867
]
}
7 changes: 7 additions & 0 deletions its/ruling/src/test/resources/eclipse-jetty/java-S1161.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,12 @@
"org.eclipse.jetty:jetty-project:jetty-util/src/main/java/org/eclipse/jetty/util/Callback.java": [
150,
169
],
"org.eclipse.jetty:jetty-project:jetty-util/src/test/java/org/eclipse/jetty/util/component/LifeCycleListenerTest.java": [
174,
185,
191,
208,
214
]
}
Loading

0 comments on commit 67f97dc

Please sign in to comment.