amir9979 / bug_miner_runner

0 stars 0 forks source link

commons-lang #370

Closed amir9979 closed 3 years ago

amir9979 commented 3 years ago

1

github-actions[bot] commented 3 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-lang,3fadfdd69f4682f05563ce53e55743f55813f488,e7d16c27629722a93a9d36a0b5e0a3a793850544,org.apache.commons.lang3.builder.JsonToStringStyleTest.testLANG1396,False,[],,,,"org.apache.commons.lang3.builder.tostringstyle.appendfieldstart(stringbuffer,string)","u'diff --git a/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java\nindex 82467cbf6..2ae391e83 100644\n--- a/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java\n+++ b/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java\n@@ -387,6 +387,11 @@ public void testLANG1395() {\n assertEquals(""{\""name\"":\""Let\'s \\\""quote\\\"" this\""}"",new ToStringBuilder(base).append(""name"",""Let\'s \""quote\"" this"").toString());\n }\n \n+ @Test\n+ public void testLANG1396() {\n+ assertEquals(""{\""Let\'s \\\""quote\\\"" this\"":\""value\""}"",new ToStringBuilder(base).append(""Let\'s \""quote\"" this"",""value"").toString());\n+ }\n+\n /*\n An object with nested object structures used to test {@link ToStringStyle.JsonToStringStyle}.\n *'"

github-actions[bot] commented 3 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-lang,7d061e33e59e23dc4b03378f35f50a7d70f033b3,6049e77fdcd021544a60651fc6de4d80e2ef1c2d,org.apache.commons.lang3.concurrent.EventCountCircuitBreakerTest.testOpeningWhenThresholdReachedThroughBatch,False,[],,,,org.apache.commons.lang3.concurrent.eventcountcircuitbreaker.incrementandcheckstate(integer),"u'diff --git a/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java b/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java\nindex 1c9e79411..0053554e1 100644\n--- a/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java\n+++ b/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java\n@@ -154,6 +154,21 @@ public void testOpeningWhenThresholdReached() {\n assertFalse(""Closed"", breaker.isClosed());\n }\n \n+ /\n+ Tests that the circuit breaker opens if all conditions are met when using\n+ {@link EventCountCircuitBreaker#incrementAndCheckState(Integer increment)}.\n+ /\n+ @Test\n+ public void testOpeningWhenThresholdReachedThroughBatch() {\n+ final long timeIncrement = NANO_FACTOR / OPENING_THRESHOLD - 1;\n+ final EventCountCircuitBreakerTestImpl breaker = new EventCountCircuitBreakerTestImpl(OPENING_THRESHOLD, 1,\n+ TimeUnit.SECONDS, CLOSING_THRESHOLD, 1, TimeUnit.SECONDS);\n+ long startTime = timeIncrement (OPENING_THRESHOLD + 1);\n+ boolean open = !breaker.at(startTime).incrementAndCheckState(OPENING_THRESHOLD + 1);\n+ assertTrue(""Not open"", open);\n+ assertFalse(""Closed"", breaker.isClosed());\n+ }\n+\n /\n Tests that an open circuit breaker does not close itself when the number of events\n received is over the threshold.'"

github-actions[bot] commented 3 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Delta,-1,commons-lang,60412131f3679b720bcaaaf3dea4be666cefea7a,3a4ac357981283fd3a8817f9e6d57e8b181549be,org.apache.commons.lang3.exception.ExceptionUtilsTest.testGetRootCause_Throwable,False,[],,,,org.apache.commons.lang3.exception.exceptionutils.getrootcause(throwable),"u'diff --git a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java\nindex d6fb98a66..0af68a8fb 100644\n--- a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java\n+++ b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java\n@@ -147,10 +147,10 @@ public void testGetCause_ThrowableArray() {\n @Test\n public void testGetRootCause_Throwable() {\n assertSame(null, ExceptionUtils.getRootCause(null));\n- assertSame(null, ExceptionUtils.getRootCause(withoutCause));\n+ assertSame(withoutCause, ExceptionUtils.getRootCause(withoutCause));\n assertSame(withoutCause, ExceptionUtils.getRootCause(nested));\n assertSame(withoutCause, ExceptionUtils.getRootCause(withCause));\n- assertSame(null, ExceptionUtils.getRootCause(jdkNoCause));\n+ assertSame(jdkNoCause, ExceptionUtils.getRootCause(jdkNoCause));\n assertSame(cyclicCause.getCause().getCause(), ExceptionUtils.getRootCause(cyclicCause));\n }\n '"

github-actions[bot] commented 3 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-lang,2e9f3a80146262511ca7bcdd3411f095dff4951d,2ce40494073aa4e9bdcba4c39d24727b7141d227,org.apache.commons.lang3.builder.EqualsBuilderTest.testObjectRecursiveGenericString,False,[],,,,"org.apache.commons.lang3.builder.equalsbuilder.equalsbuilder()@org.apache.commons.lang3.builder.equalsbuilder.reflectionappend(object,object)","u'diff --git a/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java b/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java\nindex 23651f612..05f1da9a8 100644\n--- a/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java\n+++ b/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java\n@@ -168,6 +168,19 @@ public void setT(final int t) {\n }\n }\n \n+ static class TestRecursiveGenericObject {\n+\n+ private final T a;\n+\n+ TestRecursiveGenericObject(final T a) {\n+ this.a = a;\n+ }\n+\n+ public T getA() {\n+ return a;\n+ }\n+ }\n+\n static class TestRecursiveObject {\n private final TestRecursiveInnerObject a;\n private final TestRecursiveInnerObject b;\n@@ -418,6 +431,35 @@ public void testObjectBuild() {\n assertEquals(Boolean.TRUE, new EqualsBuilder().append((Object) null, null).build());\n }\n \n+ @Test\n+ public void testObjectRecursiveGenericInteger() {\n+ final TestRecursiveGenericObject o1_a = new TestRecursiveGenericObject(1);\n+ final TestRecursiveGenericObject o1_b = new TestRecursiveGenericObject(1);\n+ final TestRecursiveGenericObject o2 = new TestRecursiveGenericObject(2);\n+\n+ assertTrue(new EqualsBuilder().setTestRecursive(true).append(o1_a, o1_b).isEquals());\n+ assertTrue(new EqualsBuilder().setTestRecursive(true).append(o1_b, o1_a).isEquals());\n+\n+ assertFalse(new EqualsBuilder().setTestRecursive(true).append(o1_b, o2).isEquals());\n+ }\n+\n+ @Test\n+ public void testObjectRecursiveGenericString() {\n+ // Note: Do not use literals, because string literals are always mapped by same object (internal() of String))!\n+ String s1_a = String.valueOf(1);\n+ final TestRecursiveGenericObject o1_a = new TestRecursiveGenericObject(s1_a);\n+ final TestRecursiveGenericObject o1_b = new TestRecursiveGenericObject(String.valueOf(1));\n+ final TestRecursiveGenericObject o2 = new TestRecursiveGenericObject(String.valueOf(2));\n+\n+ // To trigger bug reported in LANG-1356, call hashCode only on string in instance o1_a\n+ s1_a.hashCode();\n+\n+ assertTrue(new EqualsBuilder().setTestRecursive(true).append(o1_a, o1_b).isEquals());\n+ assertTrue(new EqualsBuilder().setTestRecursive(true).append(o1_b, o1_a).isEquals());\n+\n+ assertFalse(new EqualsBuilder().setTestRecursive(true).append(o1_b, o2).isEquals());\n+ }\n+\n @Test\n public void testObjectRecursive() {\n final TestRecursiveInnerObject i1_1 = new TestRecursiveInnerObject(1);'"

github-actions[bot] commented 3 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Delta,-1,commons-lang,8cafd87c83f4197f7e8d14de8cba453c844266c0,314b6b56bec4af56dba667d66a25c1613f4bc800,org.apache.commons.lang3.reflect.MethodUtilsTest.testGetMethodsWithAnnotationSearchSupersAndIgnoreAccess,False,[],,,,"org.apache.commons.lang3.reflect.methodutils.getmethodslistwithannotation(class,class,boolean,boolean)",u'' True,Delta,-1,commons-lang,8cafd87c83f4197f7e8d14de8cba453c844266c0,314b6b56bec4af56dba667d66a25c1613f4bc800,org.apache.commons.lang3.reflect.MethodUtilsTest.testGetMethodsWithAnnotationSearchSupersButNotIgnoreAccess,False,[],,,,"org.apache.commons.lang3.reflect.methodutils.getmethodslistwithannotation(class,class,boolean,boolean)",u''

github-actions[bot] commented 3 years ago

valid,type,issue,module,commit,parent,testcase,has_test_annotation,traces,bugged_components,description,extra_description,blamed_components,diff True,Regression,-1,commons-lang,1661e5519c4836a5a940b13b7797263443156fc9,30c85ad05363767deeefee577063c2c432b971d4,org.apache.commons.lang3.reflect.TypeUtilsTest.testToStringLang1311,False,[],,,,org.apache.commons.lang3.reflect.typeutils.classtostring(class),"u'diff --git a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java\nindex b01bd0f45..afc5b74b0 100644\n--- a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java\n+++ b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java\n@@ -101,6 +101,8 @@\n \n public static URI uri;\n \n+ public static List[] stringListArray;\n+\n public void dummyMethod(final List list0, final List list1, final List<?> list2,\n final List<? super Object> list3, final List list4, final List<? extends String> list5,\n final List<? super String> list6, final List[] list7, final List[] list8, final List<?>[] list9,\n@@ -743,6 +745,14 @@ public void testGenericArrayType() throws Exception {\n Assert.assertEquals(""java.lang.Comparable<? extends java.lang.Integer>[]"", actual.toString());\n }\n \n+ @Test\n+ public void testToStringLang1311() {\n+ Assert.assertEquals(""int[]"", TypeUtils.toString(int[].class));\n+ Assert.assertEquals(""java.lang.Integer[]"", TypeUtils.toString(Integer[].class));\n+ Field stringListField = FieldUtils.getDeclaredField(getClass(), ""stringListArray"");\n+ Assert.assertEquals(""java.util.List[]"", TypeUtils.toString(stringListField.getGenericType()));\n+ }\n+\n @Test\n public void testToLongString() {\n Assert.assertEquals(getClass().getName() + "":B"", TypeUtils.toLongString(getClass().getTypeParameters()[0]));'"

github-actions[bot] commented 3 years ago

The issue you have reported seems to be resolved now. The extracted data can be found at releases by number commons-lang_370.