function
stringlengths
61
9.1k
testmethod
stringlengths
42
143
location_fixed
stringlengths
43
98
end_buggy
int64
10
12k
location
stringlengths
43
98
function_name
stringlengths
4
73
source_buggy
stringlengths
655
442k
prompt_complete
stringlengths
433
4.3k
end_fixed
int64
10
12k
comment
stringlengths
0
763
bug_id
stringlengths
1
3
start_fixed
int64
7
12k
location_buggy
stringlengths
43
98
source_dir
stringclasses
5 values
prompt_chat
stringlengths
420
3.86k
start_buggy
int64
7
12k
classes_modified
list
task_id
stringlengths
64
64
function_signature
stringlengths
22
150
prompt_complete_without_signature
stringlengths
404
4.23k
project
stringclasses
17 values
indent
stringclasses
4 values
source_fixed
stringlengths
655
442k
public void testFormatWithoutPattern() throws Exception { ObjectMapper mapper = new ObjectMapper(); mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd'X'HH:mm:ss")); String json = mapper.writeValueAsString(new DateAsDefaultBeanWithTimezone(0L)); assertEquals(aposToQuotes("{'da...
com.fasterxml.jackson.databind.ser.DateSerializationTest::testFormatWithoutPattern
src/test/java/com/fasterxml/jackson/databind/ser/DateSerializationTest.java
316
src/test/java/com/fasterxml/jackson/databind/ser/DateSerializationTest.java
testFormatWithoutPattern
package com.fasterxml.jackson.databind.ser; import java.io.*; import java.text.*; import java.util.*; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.*; public class DateSerializationTest extends BaseMapTest { static class TimeZoneBean { private TimeZone tz; ...
// You are a professional Java test case writer, please create a test case named `testFormatWithoutPattern` for the issue `JacksonDatabind-1648`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1648 // // ## Issue-Title: // DateTimeSerializerBase ...
316
// [databind#1648]: contextual default format should be used
85
310
src/test/java/com/fasterxml/jackson/databind/ser/DateSerializationTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1648 ## Issue-Title: DateTimeSerializerBase ignores configured date format when creating contextual ## Issue-Description: `DateTimeSerializerBase#createContextual` creates a new serializer with `StdDateFormat.DATE_FORMAT_STR_ISO8601` format instead of re-using the actual for...
310
[ "com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase" ]
e73e44934e4f872e5d084f25c36cd51d8859712bbc4425f78bd9a7898ccf5264
public void testFormatWithoutPattern() throws Exception
// You are a professional Java test case writer, please create a test case named `testFormatWithoutPattern` for the issue `JacksonDatabind-1648`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1648 // // ## Issue-Title: // DateTimeSerializerBase ...
JacksonDatabind
package com.fasterxml.jackson.databind.ser; import java.io.*; import java.text.*; import java.util.*; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.*; public class DateSerializationTest extends BaseMapTest { static class TimeZoneBean { private TimeZone tz; ...
@Test public void testMath1021() { final int N = 43130568; final int m = 42976365; final int n = 50; final HypergeometricDistribution dist = new HypergeometricDistribution(N, m, n); for (int i = 0; i < 100; i++) { final int sample = dist.sample(); ...
org.apache.commons.math3.distribution.HypergeometricDistributionTest::testMath1021
src/test/java/org/apache/commons/math3/distribution/HypergeometricDistributionTest.java
299
src/test/java/org/apache/commons/math3/distribution/HypergeometricDistributionTest.java
testMath1021
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testMath1021` for the issue `Math-MATH-1021`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-1021 // // ## Issue-Title: // HypergeometricDistribution.sample suffers from ...
299
2
287
src/test/java/org/apache/commons/math3/distribution/HypergeometricDistributionTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-1021 ## Issue-Title: HypergeometricDistribution.sample suffers from integer overflow ## Issue-Description: Hi, I have an application which broke when ported from commons math 2.2 to 3.2. It looks like the HypergeometricDistribution.sample() method doesn't work as well as it used ...
287
[ "org.apache.commons.math3.distribution.HypergeometricDistribution" ]
e74c92afcb0524e0fa900f22edf2c42dcde6a9aadedf4e0277ae78b03eb28834
@Test public void testMath1021()
// You are a professional Java test case writer, please create a test case named `testMath1021` for the issue `Math-MATH-1021`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-1021 // // ## Issue-Title: // HypergeometricDistribution.sample suffers from ...
Math
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
public void testIssue1125WithDefault() throws Exception { Issue1125Wrapper result = MAPPER.readValue(aposToQuotes("{'value':{'a':3,'def':9,'b':5}}"), Issue1125Wrapper.class); assertNotNull(result.value); assertEquals(Default1125.class, result.value.getClass()); Default1...
com.fasterxml.jackson.databind.jsontype.TestSubtypes::testIssue1125WithDefault
src/test/java/com/fasterxml/jackson/databind/jsontype/TestSubtypes.java
326
src/test/java/com/fasterxml/jackson/databind/jsontype/TestSubtypes.java
testIssue1125WithDefault
package com.fasterxml.jackson.databind.jsontype; import com.fasterxml.jackson.core.Version; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonTypeInfo.As; import ...
// You are a professional Java test case writer, please create a test case named `testIssue1125WithDefault` for the issue `JacksonDatabind-1125`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1125 // // ## Issue-Title: // Problem with polymorphi...
326
44
316
src/test/java/com/fasterxml/jackson/databind/jsontype/TestSubtypes.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1125 ## Issue-Title: Problem with polymorphic types, losing properties from base type(s) ## Issue-Description: (background, see: [dropwizard/dropwizard#1449](https://github.com/dropwizard/dropwizard/pull/1449)) Looks like sub-type resolution may be broken for one particula...
316
[ "com.fasterxml.jackson.databind.type.SimpleType" ]
e75b45fd73c0453bbb1a55ad03e01efea928eecc043a114b98487ec26aa5e27b
public void testIssue1125WithDefault() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue1125WithDefault` for the issue `JacksonDatabind-1125`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1125 // // ## Issue-Title: // Problem with polymorphi...
JacksonDatabind
package com.fasterxml.jackson.databind.jsontype; import com.fasterxml.jackson.core.Version; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonTypeInfo.As; import ...
@Test public void testKeepsPreTextAtDepth() { String h = "<pre><code><span><b>code\n\ncode</b></span></code></pre>"; Document doc = Jsoup.parse(h); assertEquals("code\n\ncode", doc.text()); assertEquals("<pre><code><span><b>code\n\ncode</b></span></code></pre>", doc.body().html()); ...
org.jsoup.nodes.ElementTest::testKeepsPreTextAtDepth
src/test/java/org/jsoup/nodes/ElementTest.java
111
src/test/java/org/jsoup/nodes/ElementTest.java
testKeepsPreTextAtDepth
package org.jsoup.nodes; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.parser.Tag; import org.jsoup.select.Elements; import org.junit.Test; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.M...
// You are a professional Java test case writer, please create a test case named `testKeepsPreTextAtDepth` for the issue `Jsoup-722`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-722 // // ## Issue-Title: // Whitespaces not properly handled in <pre> tag ...
111
70
106
src/test/java/org/jsoup/nodes/ElementTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-722 ## Issue-Title: Whitespaces not properly handled in <pre> tag ## Issue-Description: If a "pre" tag contains deep nested tags, whitespaces in nested tags are not preserved. Example: -------- ``` String s = "<pre><code>\n" + " message <span style=\"color:red\"> other ...
106
[ "org.jsoup.nodes.Element" ]
e8159b1e3426a49b2d460550ef7da662d65dfcdd019925a2ff47a55bb1aaf661
@Test public void testKeepsPreTextAtDepth()
// You are a professional Java test case writer, please create a test case named `testKeepsPreTextAtDepth` for the issue `Jsoup-722`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-722 // // ## Issue-Title: // Whitespaces not properly handled in <pre> tag ...
Jsoup
package org.jsoup.nodes; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.parser.Tag; import org.jsoup.select.Elements; import org.junit.Test; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.M...
public void testBuilderIsResettedAlways() { try { OptionBuilder.withDescription("JUnit").create('"'); fail("IllegalArgumentException expected"); } catch (IllegalArgumentException e) { // expected } assertNull("we inherited a...
org.apache.commons.cli.OptionBuilderTest::testBuilderIsResettedAlways
src/test/org/apache/commons/cli/OptionBuilderTest.java
175
src/test/org/apache/commons/cli/OptionBuilderTest.java
testBuilderIsResettedAlways
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
// You are a professional Java test case writer, please create a test case named `testBuilderIsResettedAlways` for the issue `Cli-CLI-177`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-177 // // ## Issue-Title: // OptionBuilder is not reseted in case o...
175
26
153
src/test/org/apache/commons/cli/OptionBuilderTest.java
src/test
```markdown ## Issue-ID: Cli-CLI-177 ## Issue-Title: OptionBuilder is not reseted in case of an IAE at create ## Issue-Description: If the call to OptionBuilder.create() fails with an IllegalArgumentException, the OptionBuilder is not resetted and its next usage may contain unwanted settings. Actually this let the...
153
[ "org.apache.commons.cli.OptionBuilder" ]
e849723b9a305801a19d59892d50d676d595d19fe5f77f0ac61dca9ab809b32e
public void testBuilderIsResettedAlways()
// You are a professional Java test case writer, please create a test case named `testBuilderIsResettedAlways` for the issue `Cli-CLI-177`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-177 // // ## Issue-Title: // OptionBuilder is not reseted in case o...
Cli
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
public void testRequire() { assertRequire("goog.require('foo')"); assertNotRequire("goog.require(foo)"); assertNotRequire("goog.require()"); assertNotRequire("foo()"); }
com.google.javascript.jscomp.ClosureCodingConventionTest::testRequire
test/com/google/javascript/jscomp/ClosureCodingConventionTest.java
198
test/com/google/javascript/jscomp/ClosureCodingConventionTest.java
testRequire
/* * Copyright 2007 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// You are a professional Java test case writer, please create a test case named `testRequire` for the issue `Closure-530`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-530 // // ## Issue-Title: // compiler crashes when goog.provide used with non stri...
198
57
193
test/com/google/javascript/jscomp/ClosureCodingConventionTest.java
test
```markdown ## Issue-ID: Closure-530 ## Issue-Title: compiler crashes when goog.provide used with non string ## Issue-Description: **What steps will reproduce the problem?** 1. insert goog.provide(some.function); 2. compile. **3.** **What is the expected output? What do you see instead?** This should give an e...
193
[ "com.google.javascript.jscomp.ClosureCodingConvention" ]
e86bbc18afdc58c4266f956d36bb8dcc142cd07ccfa83ce0854496367c43af93
public void testRequire()
// You are a professional Java test case writer, please create a test case named `testRequire` for the issue `Closure-530`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-530 // // ## Issue-Title: // compiler crashes when goog.provide used with non stri...
Closure
/* * Copyright 2007 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
public void testDeserializeBagOfStrings() throws Exception { WithBagOfStrings result = MAPPER.readerFor(WithBagOfStrings.class) .readValue("{\"strings\": [ \"a\", \"b\", \"c\"]}"); assertEquals(3, result.getStrings().size()); }
com.fasterxml.jackson.databind.deser.creators.DelegatingArrayCreator2324Test::testDeserializeBagOfStrings
src/test/java/com/fasterxml/jackson/databind/deser/creators/DelegatingArrayCreator2324Test.java
61
src/test/java/com/fasterxml/jackson/databind/deser/creators/DelegatingArrayCreator2324Test.java
testDeserializeBagOfStrings
package com.fasterxml.jackson.databind.deser.creators; import java.util.AbstractCollection; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotati...
// You are a professional Java test case writer, please create a test case named `testDeserializeBagOfStrings` for the issue `JacksonDatabind-2324`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2324 // // ## Issue-Title: // StringCollectionDese...
61
112
57
src/test/java/com/fasterxml/jackson/databind/deser/creators/DelegatingArrayCreator2324Test.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-2324 ## Issue-Title: StringCollectionDeserializer fails with custom collection ## Issue-Description: Seeing this with Jackson 2.9.8. We have a custom collection implementation, which is wired to use its "immutable" version for deserialization. The rationale is that we don'...
57
[ "com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer" ]
e938c5663d7983d2cd9aedf3be871304d14b947a20a3bb064e21e1ef8821c9bb
public void testDeserializeBagOfStrings() throws Exception
// You are a professional Java test case writer, please create a test case named `testDeserializeBagOfStrings` for the issue `JacksonDatabind-2324`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2324 // // ## Issue-Title: // StringCollectionDese...
JacksonDatabind
package com.fasterxml.jackson.databind.deser.creators; import java.util.AbstractCollection; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotati...
public void testUnexpectedToken() throws Exception { try { DefaultDateTypeAdapter adapter = new DefaultDateTypeAdapter(Date.class); adapter.fromJson("{}"); fail("Unexpected token should fail."); } catch (IllegalStateException expected) { } }
com.google.gson.DefaultDateTypeAdapterTest::testUnexpectedToken
gson/src/test/java/com/google/gson/DefaultDateTypeAdapterTest.java
175
gson/src/test/java/com/google/gson/DefaultDateTypeAdapterTest.java
testUnexpectedToken
/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// You are a professional Java test case writer, please create a test case named `testUnexpectedToken` for the issue `Gson-1100`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-1100 // // ## Issue-Title: // Fixed DefaultDateTypeAdapter nullability issue and...
175
17
169
gson/src/test/java/com/google/gson/DefaultDateTypeAdapterTest.java
gson/src/test/java
```markdown ## Issue-ID: Gson-1100 ## Issue-Title: Fixed DefaultDateTypeAdapter nullability issue and JSON primitives contract ## Issue-Description: Regression in: * [b8f616c](https://github.com/google/gson/commit/b8f616c939c652b8540c95fa2b377b8c628ef3ff) - Migrate DefaultDateTypeAdapter to streaming adapter ([#1...
169
[ "com.google.gson.DefaultDateTypeAdapter" ]
e9e4b4e89cd8de82ea6e4a2653acd2efffc9ae21f4bf6f1eb248221a36614f24
public void testUnexpectedToken() throws Exception
// You are a professional Java test case writer, please create a test case named `testUnexpectedToken` for the issue `Gson-1100`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-1100 // // ## Issue-Title: // Fixed DefaultDateTypeAdapter nullability issue and...
Gson
/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
public void testDoubleMetaphoneAlternate() { String value = null; for (int i = 0; i < TEST_DATA.length; i++) { value = TEST_DATA[i][0]; assertEquals("Test [" + i + "]=" + value, TEST_DATA[i][2], doubleMetaphone.doubleMetaphone(value, true)); } }
org.apache.commons.codec.language.DoubleMetaphone2Test::testDoubleMetaphoneAlternate
src/test/org/apache/commons/codec/language/DoubleMetaphone2Test.java
85
src/test/org/apache/commons/codec/language/DoubleMetaphone2Test.java
testDoubleMetaphoneAlternate
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testDoubleMetaphoneAlternate` for the issue `Codec-CODEC-84`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-84 // // ## Issue-Title: // Double Metaphone bugs in altern...
85
/** * Test alternative encoding. */
3
79
src/test/org/apache/commons/codec/language/DoubleMetaphone2Test.java
src/test
```markdown ## Issue-ID: Codec-CODEC-84 ## Issue-Title: Double Metaphone bugs in alternative encoding ## Issue-Description: The new test case ([~~CODEC-83~~](https://issues.apache.org/jira/browse/CODEC-83 "Improve Double Metaphone test coverage")) has highlighted a number of issues with the "alternative" encoding ...
79
[ "org.apache.commons.codec.language.DoubleMetaphone" ]
ea110531fb67fb2b886a3c9e29ea440aaeee5b7c6af5604db4b8527274cbbf94
public void testDoubleMetaphoneAlternate()
// You are a professional Java test case writer, please create a test case named `testDoubleMetaphoneAlternate` for the issue `Codec-CODEC-84`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-84 // // ## Issue-Title: // Double Metaphone bugs in altern...
Codec
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
@Test(expected = AssertionError.class) public void shouldNotThrowNPEWhenNullPassedToSame() { mock.objectArgMethod("not null"); verify(mock).objectArgMethod(same(null)); }
org.mockitousage.bugs.NPEWithCertainMatchersTest::shouldNotThrowNPEWhenNullPassedToSame
test/org/mockitousage/bugs/NPEWithCertainMatchersTest.java
65
test/org/mockitousage/bugs/NPEWithCertainMatchersTest.java
shouldNotThrowNPEWhenNullPassedToSame
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.bugs; import org.junit.After; import org.junit.Test; import org.mockito.Mock; import org.mockitousage.IMethods; import org.mockitoutil.TestBase; import static org.mockito.Ma...
// You are a professional Java test case writer, please create a test case named `shouldNotThrowNPEWhenNullPassedToSame` for the issue `Mockito-229`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-229 // // ## Issue-Title: // Fixes #228: fixed a verify()...
65
29
60
test/org/mockitousage/bugs/NPEWithCertainMatchersTest.java
test
```markdown ## Issue-ID: Mockito-229 ## Issue-Title: Fixes #228: fixed a verify() call example in @Captor javadoc ## Issue-Description: Thanks for the fix :) ``` You are a professional Java test case writer, please create a test case named `shouldNotThrowNPEWhenNullPassedToSame` for the issue `Mockito-229`, ut...
60
[ "org.mockito.internal.matchers.Same" ]
ea546db1d5c2be48d811671a413d8d67a24293a6a57e22370855c6245afe3327
@Test(expected = AssertionError.class) public void shouldNotThrowNPEWhenNullPassedToSame()
// You are a professional Java test case writer, please create a test case named `shouldNotThrowNPEWhenNullPassedToSame` for the issue `Mockito-229`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-229 // // ## Issue-Title: // Fixes #228: fixed a verify()...
Mockito
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.bugs; import org.junit.After; import org.junit.Test; import org.mockito.Mock; import org.mockitousage.IMethods; import org.mockitoutil.TestBase; import static org.mockito.Ma...
public void testNonAliasLocal() { testScopedFailure("var x = 10", ScopedAliases.GOOG_SCOPE_NON_ALIAS_LOCAL); testScopedFailure("var x = goog.dom + 10", ScopedAliases.GOOG_SCOPE_NON_ALIAS_LOCAL); testScopedFailure("var x = goog['dom']", ScopedAliases.GOOG_SCOPE_NON_ALIAS_LOCAL); testSco...
com.google.javascript.jscomp.ScopedAliasesTest::testNonAliasLocal
test/com/google/javascript/jscomp/ScopedAliasesTest.java
414
test/com/google/javascript/jscomp/ScopedAliasesTest.java
testNonAliasLocal
/* * Copyright 2010 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// You are a professional Java test case writer, please create a test case named `testNonAliasLocal` for the issue `Closure-737`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-737 // // ## Issue-Title: // goog.scope doesn't properly check declared funct...
414
24
404
test/com/google/javascript/jscomp/ScopedAliasesTest.java
test
```markdown ## Issue-ID: Closure-737 ## Issue-Title: goog.scope doesn't properly check declared functions ## Issue-Description: The following code is a compiler error: goog.scope(function() { var x = function(){}; }); but the following code is not: goog.scope(function() { function x() {} }); Both ...
404
[ "com.google.javascript.jscomp.ScopedAliases" ]
ea6c8479d3ab77df450f99b7bcf89cff67946a2fb9ab26443cab9e0165305b69
public void testNonAliasLocal()
// You are a professional Java test case writer, please create a test case named `testNonAliasLocal` for the issue `Closure-737`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-737 // // ## Issue-Title: // goog.scope doesn't properly check declared funct...
Closure
/* * Copyright 2010 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
public void testUselessCode() { test("function f(x) { if(x) return; }", ok); test("function f(x) { if(x); }", "function f(x) { if(x); }", e); test("if(x) x = y;", ok); test("if(x) x == bar();", "if(x) JSCOMPILER_PRESERVE(x == bar());", e); test("x = 3;", ok); test("x == 3;", "JSCOMPILER_PRES...
com.google.javascript.jscomp.CheckSideEffectsTest::testUselessCode
test/com/google/javascript/jscomp/CheckSideEffectsTest.java
79
test/com/google/javascript/jscomp/CheckSideEffectsTest.java
testUselessCode
/* * Copyright 2006 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// You are a professional Java test case writer, please create a test case named `testUselessCode` for the issue `Closure-753`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-753 // // ## Issue-Title: // Classify non-rightmost expressions as problematic ...
79
final DiagnosticType ok = null; // no warning
21
48
test/com/google/javascript/jscomp/CheckSideEffectsTest.java
test
```markdown ## Issue-ID: Closure-753 ## Issue-Title: Classify non-rightmost expressions as problematic ## Issue-Description: **Purpose of code changes:** When it comes to an expression involving the comma operator, only the first element of such a sequence is checked for being free of side effects. If the element...
48
[ "com.google.javascript.jscomp.CheckSideEffects" ]
eadf41bf0836bae2cc8528e908f57b4ddf5866d08583ed46cdcf0d613d307fde
public void testUselessCode()
// You are a professional Java test case writer, please create a test case named `testUselessCode` for the issue `Closure-753`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-753 // // ## Issue-Title: // Classify non-rightmost expressions as problematic ...
Closure
/* * Copyright 2006 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
@Test public void testIssue639(){ Vector3D u1 = new Vector3D(-1321008684645961.0 / 268435456.0, -5774608829631843.0 / 268435456.0, -3822921525525679.0 / 4294967296.0); Vector3D u2 =new Vector3D( -5712344449280879.0 / 2097152.0, ...
org.apache.commons.math.geometry.euclidean.threed.RotationTest::testIssue639
src/test/java/org/apache/commons/math/geometry/euclidean/threed/RotationTest.java
491
src/test/java/org/apache/commons/math/geometry/euclidean/threed/RotationTest.java
testIssue639
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testIssue639` for the issue `Math-MATH-639`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-639 // // ## Issue-Title: // numerical problems in rotation creation // // ##...
491
52
478
src/test/java/org/apache/commons/math/geometry/euclidean/threed/RotationTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-639 ## Issue-Title: numerical problems in rotation creation ## Issue-Description: building a rotation from the following vector pairs leads to NaN: u1 = -4921140.837095533, -2.1512094250440013E7, -890093.279426377 u2 = -2.7238580938724895E9, -2.169664921341876E9, 6.74968870...
478
[ "org.apache.commons.math.geometry.euclidean.threed.Rotation" ]
ecf7ca082969563e14eaad29e15cc995af182ffb036f75f1f9a5137360916435
@Test public void testIssue639()
// You are a professional Java test case writer, please create a test case named `testIssue639` for the issue `Math-MATH-639`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-639 // // ## Issue-Title: // numerical problems in rotation creation // // ##...
Math
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
@Test public void booleanAttributesAreEmptyStringValues() { Document doc = Jsoup.parse("<div hidden>"); Attributes attributes = doc.body().child(0).attributes(); assertEquals("", attributes.get("hidden")); Attribute first = attributes.iterator().next(); assertEquals("hidden"...
org.jsoup.nodes.AttributeTest::booleanAttributesAreEmptyStringValues
src/test/java/org/jsoup/nodes/AttributeTest.java
38
src/test/java/org/jsoup/nodes/AttributeTest.java
booleanAttributesAreEmptyStringValues
package org.jsoup.nodes; import org.jsoup.Jsoup; import org.junit.Test; import static org.junit.Assert.assertEquals; public class AttributeTest { @Test public void html() { Attribute attr = new Attribute("key", "value &"); assertEquals("key=\"value &amp;\"", attr.html()); assertEquals(att...
// You are a professional Java test case writer, please create a test case named `booleanAttributesAreEmptyStringValues` for the issue `Jsoup-1065`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1065 // // ## Issue-Title: // Attribute.getValue() broken fo...
38
88
30
src/test/java/org/jsoup/nodes/AttributeTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-1065 ## Issue-Title: Attribute.getValue() broken for empty attributes since 1.11.1 ## Issue-Description: ``` Document doc = Jsoup.parse("<div hidden>"); Attributes attributes = doc.body().child(0).attributes(); System.out.println(String.format("Attr: '%s', val...
30
[ "org.jsoup.nodes.Attribute" ]
ed2dcd1ee20aaaae04c21a35c2042edfea14d405a3c895e308f5ffefc36b7e57
@Test public void booleanAttributesAreEmptyStringValues()
// You are a professional Java test case writer, please create a test case named `booleanAttributesAreEmptyStringValues` for the issue `Jsoup-1065`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1065 // // ## Issue-Title: // Attribute.getValue() broken fo...
Jsoup
package org.jsoup.nodes; import org.jsoup.Jsoup; import org.junit.Test; import static org.junit.Assert.assertEquals; public class AttributeTest { @Test public void html() { Attribute attr = new Attribute("key", "value &"); assertEquals("key=\"value &amp;\"", attr.html()); assertEquals(att...
@Test public void mock_should_be_injected_once_and_in_the_best_matching_type() { assertSame(REFERENCE, illegalInjectionExample.mockShouldNotGoInHere); assertSame(mockedBean, illegalInjectionExample.mockShouldGoInHere); }
org.mockitousage.bugs.InjectionByTypeShouldFirstLookForExactTypeThenAncestorTest::mock_should_be_injected_once_and_in_the_best_matching_type
test/org/mockitousage/bugs/InjectionByTypeShouldFirstLookForExactTypeThenAncestorTest.java
34
test/org/mockitousage/bugs/InjectionByTypeShouldFirstLookForExactTypeThenAncestorTest.java
mock_should_be_injected_once_and_in_the_best_matching_type
package org.mockitousage.bugs; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import java.lang.reflect.Field; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; @RunW...
// You are a professional Java test case writer, please create a test case named `mock_should_be_injected_once_and_in_the_best_matching_type` for the issue `Mockito-236`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-236 // // ## Issue-Title: // nicer t...
34
28
30
test/org/mockitousage/bugs/InjectionByTypeShouldFirstLookForExactTypeThenAncestorTest.java
test
```markdown ## Issue-ID: Mockito-236 ## Issue-Title: nicer textual printing of typed parameters ## Issue-Description: When matchers fail but yield the same toString(), Mockito prints extra type information. However, the type information is awkwardly printed for Strings. I've encountered this issue while working on ...
30
[ "org.mockito.internal.configuration.DefaultInjectionEngine" ]
ed59e20baeac60d029f56fb10b5b941cbe08c8d5daa7ef45ac3daad0ac62d942
@Test public void mock_should_be_injected_once_and_in_the_best_matching_type()
// You are a professional Java test case writer, please create a test case named `mock_should_be_injected_once_and_in_the_best_matching_type` for the issue `Mockito-236`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-236 // // ## Issue-Title: // nicer t...
Mockito
package org.mockitousage.bugs; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import java.lang.reflect.Field; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; @RunW...
@Test public void skipUsingRead() throws Exception { skip(new StreamWrapper() { public InputStream wrap(InputStream toWrap) { return new FilterInputStream(toWrap) { public long skip(long s) { return 0; ...
org.apache.commons.compress.utils.IOUtilsTest::skipUsingRead
src/test/java/org/apache/commons/compress/utils/IOUtilsTest.java
53
src/test/java/org/apache/commons/compress/utils/IOUtilsTest.java
skipUsingRead
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `skipUsingRead` for the issue `Compress-COMPRESS-277`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-277 // // ## Issue-Title: // IOUtils.skip does not work as ad...
53
26
42
src/test/java/org/apache/commons/compress/utils/IOUtilsTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-277 ## Issue-Title: IOUtils.skip does not work as advertised ## Issue-Description: I am trying to feed a TarInputStream from a CipherInputStream. It does not work, because IOUtils.skip() does not adhere to the contract it claims in javadoc: " \* <p>This method will o...
42
[ "org.apache.commons.compress.utils.IOUtils" ]
ee0fdea5bbbb50bfa8f3cfb14be68751809d23906bb97d423e5855d45a161fb1
@Test public void skipUsingRead() throws Exception
// You are a professional Java test case writer, please create a test case named `skipUsingRead` for the issue `Compress-COMPRESS-277`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-277 // // ## Issue-Title: // IOUtils.skip does not work as ad...
Compress
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
public void testLang720() { String input = new StringBuilder("\ud842\udfb7").append("A").toString(); String escaped = StringEscapeUtils.escapeXml(input); assertEquals(input, escaped); }
org.apache.commons.lang3.StringEscapeUtilsTest::testLang720
src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
431
src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
testLang720
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testLang720` for the issue `Lang-LANG-720`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-720 // // ## Issue-Title: // StringEscapeUtils.escapeXml(input) outputs wrong r...
431
// https://issues.apache.org/jira/browse/LANG-720
17
427
src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-720 ## Issue-Title: StringEscapeUtils.escapeXml(input) outputs wrong results when an input contains characters in Supplementary Planes. ## Issue-Description: Hello. I use StringEscapeUtils.escapeXml(input) to escape special characters for XML. This method outputs wrong resul...
427
[ "org.apache.commons.lang3.text.translate.CharSequenceTranslator" ]
ee15e17485b0bf65b578a8097d9af5ad29ee6691945fdc7b766d4fb71dde26d5
public void testLang720()
// You are a professional Java test case writer, please create a test case named `testLang720` for the issue `Lang-LANG-720`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-720 // // ## Issue-Title: // StringEscapeUtils.escapeXml(input) outputs wrong r...
Lang
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
public void testPValueNearZero() throws Exception { /* * Create a dataset that has r -> 1, p -> 0 as dimension increases. * Prior to the fix for MATH-371, p vanished for dimension >= 14. * Post fix, p-values diminish smoothly, vanishing at dimension = 127. * Tested value ...
org.apache.commons.math.stat.correlation.PearsonsCorrelationTest::testPValueNearZero
src/test/java/org/apache/commons/math/stat/correlation/PearsonsCorrelationTest.java
181
src/test/java/org/apache/commons/math/stat/correlation/PearsonsCorrelationTest.java
testPValueNearZero
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testPValueNearZero` for the issue `Math-MATH-371`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-371 // // ## Issue-Title: // PearsonsCorrelation.getCorrelationPValues()...
181
/** * Test p-value near 0. JIRA: MATH-371 */
69
166
src/test/java/org/apache/commons/math/stat/correlation/PearsonsCorrelationTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-371 ## Issue-Title: PearsonsCorrelation.getCorrelationPValues() precision limited by machine epsilon ## Issue-Description: Similar to the issue described in [~~MATH-201~~](https://issues.apache.org/jira/browse/MATH-201 "T-test p-value precision hampered by machine epsilon"), usin...
166
[ "org.apache.commons.math.stat.correlation.PearsonsCorrelation" ]
eefaf2784b85ed584e0b4cb52d300851276dd8d9a8fdaabe0eb748da83a61ae6
public void testPValueNearZero() throws Exception
// You are a professional Java test case writer, please create a test case named `testPValueNearZero` for the issue `Math-MATH-371`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-371 // // ## Issue-Title: // PearsonsCorrelation.getCorrelationPValues()...
Math
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
public void testStructuralConstructor2() throws Exception { JSType type = testParseType( "function (new:?)", // toString skips unknowns, but isConstructor reveals the truth. "function (): ?"); assertTrue(type.isConstructor()); assertFalse(type.isNominalConstructor()); }
com.google.javascript.jscomp.parsing.JsDocInfoParserTest::testStructuralConstructor2
test/com/google/javascript/jscomp/parsing/JsDocInfoParserTest.java
590
test/com/google/javascript/jscomp/parsing/JsDocInfoParserTest.java
testStructuralConstructor2
/* * Copyright 2007 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// You are a professional Java test case writer, please create a test case named `testStructuralConstructor2` for the issue `Closure-1105`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1105 // // ## Issue-Title: // Constructor types that return all or ...
590
109
583
test/com/google/javascript/jscomp/parsing/JsDocInfoParserTest.java
test
```markdown ## Issue-ID: Closure-1105 ## Issue-Title: Constructor types that return all or unknown fail to parse ## Issue-Description: Constructor types that return the all type or the unknown type currently fail to parse: /\*\* @type {function(new:?)} \*/ var foo = function() {}; /\*\* @type {function(new:\*)}...
583
[ "com.google.javascript.jscomp.parsing.JsDocInfoParser" ]
ef05e7088ae3c867d80c5e864e5d9e0b050b6a4aba5204b1f8bb6120d6c595d9
public void testStructuralConstructor2() throws Exception
// You are a professional Java test case writer, please create a test case named `testStructuralConstructor2` for the issue `Closure-1105`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1105 // // ## Issue-Title: // Constructor types that return all or ...
Closure
/* * Copyright 2007 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
public void testIssue1351() throws Exception { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT); assertEquals(aposToQuotes("{}"), mapper.writeValueAsString(new Issue1351Bean(null, (double) 0))); // [databi...
com.fasterxml.jackson.databind.filter.JsonIncludeTest::testIssue1351
src/test/java/com/fasterxml/jackson/databind/filter/JsonIncludeTest.java
321
src/test/java/com/fasterxml/jackson/databind/filter/JsonIncludeTest.java
testIssue1351
package com.fasterxml.jackson.databind.filter; import java.io.IOException; import java.util.*; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; impo...
// You are a professional Java test case writer, please create a test case named `testIssue1351` for the issue `JacksonDatabind-1417`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1417 // // ## Issue-Title: // Further issues with @JsonInclude w...
321
// [databind#1351], [databind#1417]
64
312
src/test/java/com/fasterxml/jackson/databind/filter/JsonIncludeTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1417 ## Issue-Title: Further issues with @JsonInclude with NON_DEFAULT ## Issue-Description: (follow-up to [#1351](https://github.com/FasterXML/jackson-databind/issues/1351)) Looks like there are still cases where class annotation like: ``` @JsonInclude(JsonInclude.Incl...
312
[ "com.fasterxml.jackson.databind.ser.PropertyBuilder" ]
ef5d2c377980a049322b51532e7dac0efcd94f7ccc3ef792a7294f03fa766cce
public void testIssue1351() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue1351` for the issue `JacksonDatabind-1417`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1417 // // ## Issue-Title: // Further issues with @JsonInclude w...
JacksonDatabind
package com.fasterxml.jackson.databind.filter; import java.io.IOException; import java.util.*; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; impo...
public void testRecursiveTypeVariablesResolve12() throws Exception { TypeAdapter<TestType2> adapter = new Gson().getAdapter(TestType2.class); assertNotNull(adapter); }
com.google.gson.internal.bind.RecursiveTypesResolveTest::testRecursiveTypeVariablesResolve12
gson/src/test/java/com/google/gson/internal/bind/RecursiveTypesResolveTest.java
109
gson/src/test/java/com/google/gson/internal/bind/RecursiveTypesResolveTest.java
testRecursiveTypeVariablesResolve12
/* * Copyright (C) 2017 Gson Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
// You are a professional Java test case writer, please create a test case named `testRecursiveTypeVariablesResolve12` for the issue `Gson-1128`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-1128 // // ## Issue-Title: // Fix StackOverflowError on resolvin...
109
16
106
gson/src/test/java/com/google/gson/internal/bind/RecursiveTypesResolveTest.java
gson/src/test/java
```markdown ## Issue-ID: Gson-1128 ## Issue-Title: Fix StackOverflowError on resolving types with TypeVariable recursion ## Issue-Description: Sample failing code: private static class TestType { TestType<? super X> superType; } ... new Gson().getAdapter(TestType.class); ``` You are a profession...
106
[ "com.google.gson.internal.$Gson$Types" ]
efe15fbfc20d65cf79a1cc91778b573b1c6a88b0cd70c4abc9ff5dd17a6ec4b9
public void testRecursiveTypeVariablesResolve12() throws Exception
// You are a professional Java test case writer, please create a test case named `testRecursiveTypeVariablesResolve12` for the issue `Gson-1128`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-1128 // // ## Issue-Title: // Fix StackOverflowError on resolvin...
Gson
/* * Copyright (C) 2017 Gson Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
public void testParseOctalInvalid() throws Exception{ byte [] buffer; buffer=new byte[0]; // empty byte array try { TarUtils.parseOctal(buffer,0, buffer.length); fail("Expected IllegalArgumentException - should be at least 2 bytes long"); } catch (IllegalArgum...
org.apache.commons.compress.archivers.tar.TarUtilsTest::testParseOctalInvalid
src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
110
src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
testParseOctalInvalid
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testParseOctalInvalid` for the issue `Compress-COMPRESS-113`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-113 // // ## Issue-Title: // TarArchiveEntry.parseTar...
110
8
60
src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-113 ## Issue-Title: TarArchiveEntry.parseTarHeader() includes the trailing space/NUL when parsing the octal size ## Issue-Description: TarArchiveEntry.parseTarHeader() includes the trailing space/NUL when parsing the octal size. Although the size field in the header is ...
60
[ "org.apache.commons.compress.archivers.tar.TarUtils" ]
efeec0f7ab742cf8cdcd7d80e93f26c004d443e2ae0a6732cd79c7910cc964f0
public void testParseOctalInvalid() throws Exception
// You are a professional Java test case writer, please create a test case named `testParseOctalInvalid` for the issue `Compress-COMPRESS-113`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-113 // // ## Issue-Title: // TarArchiveEntry.parseTar...
Compress
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
@Test public void testIssue942() { List<Pair<Object,Double>> list = new ArrayList<Pair<Object, Double>>(); list.add(new Pair<Object, Double>(new Object() {}, new Double(0))); list.add(new Pair<Object, Double>(new Object() {}, new Double(1))); Assert.assertEquals(1, new DiscreteDi...
org.apache.commons.math3.distribution.DiscreteRealDistributionTest::testIssue942
src/test/java/org/apache/commons/math3/distribution/DiscreteRealDistributionTest.java
212
src/test/java/org/apache/commons/math3/distribution/DiscreteRealDistributionTest.java
testIssue942
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testIssue942` for the issue `Math-MATH-942`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-942 // // ## Issue-Title: // DiscreteDistribution.sample(int) may throw an exc...
212
8
206
src/test/java/org/apache/commons/math3/distribution/DiscreteRealDistributionTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-942 ## Issue-Title: DiscreteDistribution.sample(int) may throw an exception if first element of singletons of sub-class type ## Issue-Description: Creating an array with Array.newInstance(singletons.get(0).getClass(), sampleSize) in DiscreteDistribution.sample(int) is risky. An e...
206
[ "org.apache.commons.math3.distribution.DiscreteDistribution" ]
f0b708410a3bf7a2d2d37cf581931ae6f59d3a12463ed1b1e42c19abaf5b5f2b
@Test public void testIssue942()
// You are a professional Java test case writer, please create a test case named `testIssue942` for the issue `Math-MATH-942`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-942 // // ## Issue-Title: // DiscreteDistribution.sample(int) may throw an exc...
Math
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
public void testIssue701() { // Check ASCII art in license comments. String ascii = "/**\n" + " * @preserve\n" + " This\n" + " is\n" + " ASCII ART\n" + "*/"; String result = "/*\n\n" + " This\n" + " is\n" + " ASCII ...
com.google.javascript.jscomp.IntegrationTest::testIssue701
test/com/google/javascript/jscomp/IntegrationTest.java
1,674
test/com/google/javascript/jscomp/IntegrationTest.java
testIssue701
/* * Copyright 2009 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// You are a professional Java test case writer, please create a test case named `testIssue701` for the issue `Closure-701`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-701 // // ## Issue-Title: // Preserve doesn't preserve whitespace at start of line...
1,674
32
1,659
test/com/google/javascript/jscomp/IntegrationTest.java
test
```markdown ## Issue-ID: Closure-701 ## Issue-Title: Preserve doesn't preserve whitespace at start of line ## Issue-Description: **What steps will reproduce the problem?** Code such as: /\*\* \* @preserve This was ASCII Art \*/ **What is the expected output? What do you see instead?** The word...
1,659
[ "com.google.javascript.jscomp.parsing.JsDocInfoParser" ]
f1900fd309e8b96b735507fc9388967988ccadc68eea2606437250bf30acc903
public void testIssue701()
// You are a professional Java test case writer, please create a test case named `testIssue701` for the issue `Closure-701`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-701 // // ## Issue-Title: // Preserve doesn't preserve whitespace at start of line...
Closure
/* * Copyright 2009 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
public void testPrintOptionWithEmptyArgNameUsage() { Option option = new Option("f", true, null); option.setArgName(""); option.setRequired(true); Options options = new Options(); options.addOption(option); StringWriter out = new StringWriter(); HelpFormatt...
org.apache.commons.cli.HelpFormatterTest::testPrintOptionWithEmptyArgNameUsage
src/test/org/apache/commons/cli/HelpFormatterTest.java
273
src/test/org/apache/commons/cli/HelpFormatterTest.java
testPrintOptionWithEmptyArgNameUsage
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
// You are a professional Java test case writer, please create a test case named `testPrintOptionWithEmptyArgNameUsage` for the issue `Cli-cli-1`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-cli-1 // // ## Issue-Title: // PosixParser interupts "-target op...
273
11
259
src/test/org/apache/commons/cli/HelpFormatterTest.java
src/test
```markdown ## Issue-ID: Cli-cli-1 ## Issue-Title: PosixParser interupts "-target opt" as "-t arget opt" ## Issue-Description: This was posted on the Commons-Developer list and confirmed as a bug. > Is this a bug? Or am I using this incorrectly? > I have an option with short and long values. Given code that i...
259
[ "org.apache.commons.cli.HelpFormatter" ]
f1b56a398fc12c3d3d6d11d38ba53eef5c26b1d2e7d3494c3c19ab273505339e
public void testPrintOptionWithEmptyArgNameUsage()
// You are a professional Java test case writer, please create a test case named `testPrintOptionWithEmptyArgNameUsage` for the issue `Cli-cli-1`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-cli-1 // // ## Issue-Title: // PosixParser interupts "-target op...
Cli
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
@Test public void testMath272() throws OptimizationException { LinearObjectiveFunction f = new LinearObjectiveFunction(new double[] { 2, 2, 1 }, 0); Collection<LinearConstraint> constraints = new ArrayList<LinearConstraint>(); constraints.add(new LinearConstraint(new double[] { 1, 1, 0 }...
org.apache.commons.math.optimization.linear.SimplexSolverTest::testMath272
src/test/org/apache/commons/math/optimization/linear/SimplexSolverTest.java
48
src/test/org/apache/commons/math/optimization/linear/SimplexSolverTest.java
testMath272
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testMath272` for the issue `Math-MATH-272`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-272 // // ## Issue-Title: // Simplex Solver arrives at incorrect solution // /...
48
88
33
src/test/org/apache/commons/math/optimization/linear/SimplexSolverTest.java
src/test
```markdown ## Issue-ID: Math-MATH-272 ## Issue-Title: Simplex Solver arrives at incorrect solution ## Issue-Description: I have reduced the problem reported to me down to a minimal test case which I will attach. ``` You are a professional Java test case writer, please create a test case named `testMath272` ...
33
[ "org.apache.commons.math.optimization.linear.SimplexTableau" ]
f1b768669ce7276966f8dddb1908c1bc07d04ad14208c0b6d30b88e454242f05
@Test public void testMath272() throws OptimizationException
// You are a professional Java test case writer, please create a test case named `testMath272` for the issue `Math-MATH-272`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-272 // // ## Issue-Title: // Simplex Solver arrives at incorrect solution // /...
Math
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
@Test public void testIterationConsistency() { final MultidimensionalCounter c = new MultidimensionalCounter(2, 3, 4); final int[][] expected = new int[][] { { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 2 }, { 0, 0, 3 }, { 0, 1, 0 }, {...
org.apache.commons.math.util.MultidimensionalCounterTest::testIterationConsistency
src/test/java/org/apache/commons/math/util/MultidimensionalCounterTest.java
179
src/test/java/org/apache/commons/math/util/MultidimensionalCounterTest.java
testIterationConsistency
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testIterationConsistency` for the issue `Math-MATH-552`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-552 // // ## Issue-Title: // MultidimensionalCounter.getCounts(int...
179
56
121
src/test/java/org/apache/commons/math/util/MultidimensionalCounterTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-552 ## Issue-Title: MultidimensionalCounter.getCounts(int) returns wrong array of indices ## Issue-Description: MultidimensionalCounter counter = new MultidimensionalCounter(2, 4); for (Integer i : counter) { int[] x = counter.getCounts![](/jira/images/icons/emoticons/info...
121
[ "org.apache.commons.math.util.MultidimensionalCounter" ]
f22ccea39031ccd64c2f8b3b0130c4f045ba920c7c9b06ccb6735621d91c196f
@Test public void testIterationConsistency()
// You are a professional Java test case writer, please create a test case named `testIterationConsistency` for the issue `Math-MATH-552`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-552 // // ## Issue-Title: // MultidimensionalCounter.getCounts(int...
Math
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
@Test public void normalizesDiscordantTags() { Parser parser = Parser.xmlParser().settings(ParseSettings.htmlDefault); Document document = Jsoup.parse("<div>test</DIV><p></p>", "", parser); assertEquals("<div>\n test\n</div>\n<p></p>", document.html()); // was failing -> toString() =...
org.jsoup.parser.XmlTreeBuilderTest::normalizesDiscordantTags
src/test/java/org/jsoup/parser/XmlTreeBuilderTest.java
198
src/test/java/org/jsoup/parser/XmlTreeBuilderTest.java
normalizesDiscordantTags
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.nodes.CDataNode; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.Node; import org.jsoup.nodes.TextNode; import org.jsoup.nodes.XmlDeclaration; import...
// You are a professional Java test case writer, please create a test case named `normalizesDiscordantTags` for the issue `Jsoup-998`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-998 // // ## Issue-Title: // xmlParser() with ParseSettings.htmlDefault do...
198
77
193
src/test/java/org/jsoup/parser/XmlTreeBuilderTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-998 ## Issue-Title: xmlParser() with ParseSettings.htmlDefault does not put end tag to lower case ## Issue-Description: ``` @Test public void test() { Parser parser = Parser.xmlParser().settings(ParseSettings.htmlDefault); Document document = Jsoup.parse("<div>test</DIV><p></...
193
[ "org.jsoup.parser.XmlTreeBuilder" ]
f2ec9f3167dd5ddfb7793d7268af786b865a7c7ccf6d79069c43ca1aafbde19e
@Test public void normalizesDiscordantTags()
// You are a professional Java test case writer, please create a test case named `normalizesDiscordantTags` for the issue `Jsoup-998`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-998 // // ## Issue-Title: // xmlParser() with ParseSettings.htmlDefault do...
Jsoup
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.nodes.CDataNode; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.Node; import org.jsoup.nodes.TextNode; import org.jsoup.nodes.XmlDeclaration; import...
@Test public void winzipBackSlashWorkaround() throws Exception { URL zip = getClass().getResource("/test-winzip.zip"); ZipArchiveInputStream in = null; try { in = new ZipArchiveInputStream(new FileInputStream(new File(new URI(zip.toString())))); ZipArchiveEntry za...
org.apache.commons.compress.archivers.zip.ZipArchiveInputStreamTest::winzipBackSlashWorkaround
src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
48
src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
winzipBackSlashWorkaround
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
// You are a professional Java test case writer, please create a test case named `winzipBackSlashWorkaround` for the issue `Compress-COMPRESS-176`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-176 // // ## Issue-Title: // ArchiveInputStream#g...
48
/** * @see https://issues.apache.org/jira/browse/COMPRESS-176 */
13
33
src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-176 ## Issue-Title: ArchiveInputStream#getNextEntry(): Problems with WinZip directories with Umlauts ## Issue-Description: There is a problem when handling a WinZip-created zip with Umlauts in directories. I'm accessing a zip file created with WinZip containing a direct...
33
[ "org.apache.commons.compress.archivers.zip.ZipArchiveEntry" ]
f40da3e464d452b2a447654e5ac98053ddfdeac553f8fb23fda89931a23aa883
@Test public void winzipBackSlashWorkaround() throws Exception
// You are a professional Java test case writer, please create a test case named `winzipBackSlashWorkaround` for the issue `Compress-COMPRESS-176`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-176 // // ## Issue-Title: // ArchiveInputStream#g...
Compress
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
@Test public void testLargeSample() { Random randomizer = new Random(0x5551480dca5b369bl); double maxError = 0; for (int degree = 0; degree < 10; ++degree) { PolynomialFunction p = buildRandomPolynomial(degree, randomizer); PolynomialFitter fitter = new Polynomia...
org.apache.commons.math3.optimization.fitting.PolynomialFitterTest::testLargeSample
src/test/java/org/apache/commons/math3/optimization/fitting/PolynomialFitterTest.java
250
src/test/java/org/apache/commons/math3/optimization/fitting/PolynomialFitterTest.java
testLargeSample
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
// You are a professional Java test case writer, please create a test case named `testLargeSample` for the issue `Math-MATH-924`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-924 // // ## Issue-Title: // new multivariate vector optimizers cannot be u...
250
13
225
src/test/java/org/apache/commons/math3/optimization/fitting/PolynomialFitterTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-924 ## Issue-Title: new multivariate vector optimizers cannot be used with large number of weights ## Issue-Description: When using the Weigth class to pass a large number of weights to multivariate vector optimizers, an nxn full matrix is created (and copied) when a n elements v...
225
[ "org.apache.commons.math3.optimization.general.AbstractLeastSquaresOptimizer" ]
f47710dced977e97163c19c4849ad7352941f6009076e325da61e3a76ffdecf7
@Test public void testLargeSample()
// You are a professional Java test case writer, please create a test case named `testLargeSample` for the issue `Math-MATH-924`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-924 // // ## Issue-Title: // new multivariate vector optimizers cannot be u...
Math
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
@Test public void testGettersSetters() { // X5455 is concerned with time, so let's // get a timestamp to play with (Jan 1st, 2000). final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC")); cal.set(Calendar.YEAR, 2000); cal.set(Calendar.MONTH, Calendar.JANUA...
org.apache.commons.compress.archivers.zip.X5455_ExtendedTimestampTest::testGettersSetters
src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java
339
src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java
testGettersSetters
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
// You are a professional Java test case writer, please create a test case named `testGettersSetters` for the issue `Compress-COMPRESS-416`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-416 // // ## Issue-Title: // Tests failing under jdk 9 :...
339
46
198
src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-416 ## Issue-Title: Tests failing under jdk 9 : one reflection issue, one change to ZipEntry related issue ## Issue-Description: X5455\_ExtendedTimestampTest is failing under JDK 9 , due to what appears to be a bogus value returned from getTime(). It seems like the test f...
198
[ "org.apache.commons.compress.archivers.zip.X5455_ExtendedTimestamp" ]
f51c4f841f4e522795f38c8046f8617f348bf16f24a5b07683ee2d525499bb5b
@Test public void testGettersSetters()
// You are a professional Java test case writer, please create a test case named `testGettersSetters` for the issue `Compress-COMPRESS-416`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-416 // // ## Issue-Title: // Tests failing under jdk 9 :...
Compress
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
public void testProcessClosurePrimitives() { test("var goog = {}; goog.provide('goog.dom');", "var goog = {}; goog.dom = {};"); args.add("--process_closure_primitives=false"); testSame("var goog = {}; goog.provide('goog.dom');"); }
com.google.javascript.jscomp.CommandLineRunnerTest::testProcessClosurePrimitives
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
158
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
testProcessClosurePrimitives
/* * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// You are a professional Java test case writer, please create a test case named `testProcessClosurePrimitives` for the issue `Closure-130`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-130 // // ## Issue-Title: // --process_closure_primitives can't be...
158
101
153
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
test
```markdown ## Issue-ID: Closure-130 ## Issue-Title: --process_closure_primitives can't be set to false ## Issue-Description: **What steps will reproduce the problem?** 1. compile a file with "--process\_closure\_primitives false" 2. compile a file with "--process\_closure\_primitives true" (default) 3. result: p...
153
[ "com.google.javascript.jscomp.CommandLineRunner" ]
f547896e58c6bf89d52c37239ceaa07662fb2ad6aa6cf698b3ac8312e598ef2f
public void testProcessClosurePrimitives()
// You are a professional Java test case writer, please create a test case named `testProcessClosurePrimitives` for the issue `Closure-130`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-130 // // ## Issue-Title: // --process_closure_primitives can't be...
Closure
/* * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
@Test public void shortTextFilesAreNoTARs() throws Exception { try { new ArchiveStreamFactory() .createArchiveInputStream(new ByteArrayInputStream("This certainly is not a tar archive, really, no kidding".getBytes())); fail("created an input stream for a non-archi...
org.apache.commons.compress.archivers.ArchiveStreamFactoryTest::shortTextFilesAreNoTARs
src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
39
src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
shortTextFilesAreNoTARs
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
// You are a professional Java test case writer, please create a test case named `shortTextFilesAreNoTARs` for the issue `Compress-COMPRESS-171`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-171 // // ## Issue-Title: // createArchiveInputStre...
39
/** * see https://issues.apache.org/jira/browse/COMPRESS-171 */
11
30
src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-171 ## Issue-Title: createArchiveInputStream detects text files less than 100 bytes as tar archives ## Issue-Description: The fix for [~~COMPRESS-117~~](https://issues.apache.org/jira/browse/COMPRESS-117 "Certain tar files not recognised by ArchiveStreamFactory") which mo...
30
[ "org.apache.commons.compress.archivers.ArchiveStreamFactory" ]
f55593eff8fc3370d997e5f954bcb6694fda3c98c5b3d0a120112bca1cecc352
@Test public void shortTextFilesAreNoTARs() throws Exception
// You are a professional Java test case writer, please create a test case named `shortTextFilesAreNoTARs` for the issue `Compress-COMPRESS-171`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-171 // // ## Issue-Title: // createArchiveInputStre...
Compress
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
public void testLongLineChunkingIndentIgnored() throws ParseException, IOException { Options options = new Options(); options.addOption("x", "extralongarg", false, "This description is Long." ); HelpFormatter formatter = new HelpFormatter(); StringWriter sw = new StringWriter(); ...
org.apache.commons.cli.bug.BugCLI162Test::testLongLineChunkingIndentIgnored
src/test/org/apache/commons/cli/bug/BugCLI162Test.java
299
src/test/org/apache/commons/cli/bug/BugCLI162Test.java
testLongLineChunkingIndentIgnored
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testLongLineChunkingIndentIgnored` for the issue `Cli-CLI-162`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-162 // // ## Issue-Title: // infinite loop in the wrapping co...
299
24
263
src/test/org/apache/commons/cli/bug/BugCLI162Test.java
src/test
```markdown ## Issue-ID: Cli-CLI-162 ## Issue-Title: infinite loop in the wrapping code of HelpFormatter ## Issue-Description: If there is not enough space to display a word on a single line, HelpFormatter goes into a infinite loops until the JVM crashes with an OutOfMemoryError. Test case: ``` Options optio...
263
[ "org.apache.commons.cli.HelpFormatter" ]
f63432c2b52a60a65a1af5fa80484bd8b308e5c4e0b8eddea9149eec5c1650e0
public void testLongLineChunkingIndentIgnored() throws ParseException, IOException
// You are a professional Java test case writer, please create a test case named `testLongLineChunkingIndentIgnored` for the issue `Cli-CLI-162`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-162 // // ## Issue-Title: // infinite loop in the wrapping co...
Cli
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
@Test public void testIssue716() { BracketingNthOrderBrentSolver solver = new BracketingNthOrderBrentSolver(1.0e-12, 1.0e-10, 1.0e-22, 5); UnivariateFunction sharpTurn = new UnivariateFunction() { public double value(double x) { return (2 * x + 1) / (1...
org.apache.commons.math.analysis.solvers.BracketingNthOrderBrentSolverTest::testIssue716
src/test/java/org/apache/commons/math/analysis/solvers/BracketingNthOrderBrentSolverTest.java
96
src/test/java/org/apache/commons/math/analysis/solvers/BracketingNthOrderBrentSolverTest.java
testIssue716
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testIssue716` for the issue `Math-MATH-716`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-716 // // ## Issue-Title: // BracketingNthOrderBrentSolver exceeds maxIteratio...
96
40
83
src/test/java/org/apache/commons/math/analysis/solvers/BracketingNthOrderBrentSolverTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-716 ## Issue-Title: BracketingNthOrderBrentSolver exceeds maxIterationCount while updating always the same boundary ## Issue-Description: In some cases, the aging feature in BracketingNthOrderBrentSolver fails. It attempts to balance the bracketing points by targeting a non-ze...
83
[ "org.apache.commons.math.analysis.solvers.BracketingNthOrderBrentSolver" ]
f6c6873476534d59df4930d59000eb7ae94fdeae070bf66a4c7308d593d296d7
@Test public void testIssue716()
// You are a professional Java test case writer, please create a test case named `testIssue716` for the issue `Math-MATH-716`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-716 // // ## Issue-Title: // BracketingNthOrderBrentSolver exceeds maxIteratio...
Math
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
public void testThisTypeOfFunction2() throws Exception { testTypes( "/** @constructor */ function F() {}" + "/** @type {function(this:F)} */ function f() {}" + "f();", "\"function (this:F): ?\" must be called with a \"this\" type"); }
com.google.javascript.jscomp.TypeCheckTest::testThisTypeOfFunction2
test/com/google/javascript/jscomp/TypeCheckTest.java
4,557
test/com/google/javascript/jscomp/TypeCheckTest.java
testThisTypeOfFunction2
/* * Copyright 2006 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// You are a professional Java test case writer, please create a test case named `testThisTypeOfFunction2` for the issue `Closure-440`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-440 // // ## Issue-Title: // Compiler should warn/error when instance m...
4,557
69
4,551
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-440 ## Issue-Title: Compiler should warn/error when instance methods are operated on ## Issue-Description: **What steps will reproduce the problem?** 1. Compile and run the following code: goog.require('goog.graphics.Path'); function demo() { var path = new goog.graphics.Path(...
4,551
[ "com.google.javascript.jscomp.TypeCheck" ]
f6da714c2a13ff4d106fbc8d33b2c17b6203613375e6c3cf9b336da7ea32fb51
public void testThisTypeOfFunction2() throws Exception
// You are a professional Java test case writer, please create a test case named `testThisTypeOfFunction2` for the issue `Closure-440`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-440 // // ## Issue-Title: // Compiler should warn/error when instance m...
Closure
/* * Copyright 2006 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
@Test public void consumeToNonexistentEndWhenAtAnd() { CharacterReader r = new CharacterReader("<!"); assertTrue(r.matchConsume("<!")); assertTrue(r.isEmpty()); String after = r.consumeTo('>'); assertEquals("", after); assertTrue(r.isEmpty()); }
org.jsoup.parser.CharacterReaderTest::consumeToNonexistentEndWhenAtAnd
src/test/java/org/jsoup/parser/CharacterReaderTest.java
268
src/test/java/org/jsoup/parser/CharacterReaderTest.java
consumeToNonexistentEndWhenAtAnd
package org.jsoup.parser; import org.junit.Test; import static org.junit.Assert.*; /** * Test suite for character reader. * * @author Jonathan Hedley, jonathan@hedley.net */ public class CharacterReaderTest { @Test public void consume() { CharacterReader r = new CharacterReader("one"); asser...
// You are a professional Java test case writer, please create a test case named `consumeToNonexistentEndWhenAtAnd` for the issue `Jsoup-972`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-972 // // ## Issue-Title: // StringIndexOutOfBoundsException as of...
268
72
258
src/test/java/org/jsoup/parser/CharacterReaderTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-972 ## Issue-Title: StringIndexOutOfBoundsException as of jsoup 1.11.1 ## Issue-Description: Example: ``` Jsoup.parse(new URL("https://gist.githubusercontent.com/valodzka/91ed27043628e9023009e503d41f1aad/raw/a15f68671e6f0517e48fdac812983b85fea27c16/test.html"), 10_000); ``` ```...
258
[ "org.jsoup.parser.CharacterReader" ]
f79066f7d91a1f159be25085b7c6ef51ac4a68a311f0bd0c07a1adb2615eb34c
@Test public void consumeToNonexistentEndWhenAtAnd()
// You are a professional Java test case writer, please create a test case named `consumeToNonexistentEndWhenAtAnd` for the issue `Jsoup-972`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-972 // // ## Issue-Title: // StringIndexOutOfBoundsException as of...
Jsoup
package org.jsoup.parser; import org.junit.Test; import static org.junit.Assert.*; /** * Test suite for character reader. * * @author Jonathan Hedley, jonathan@hedley.net */ public class CharacterReaderTest { @Test public void consume() { CharacterReader r = new CharacterReader("one"); asser...
@Test public void handlesFramesets() { String dirty = "<html><head><script></script><noscript></noscript></head><frameset><frame src=\"foo\" /><frame src=\"foo\" /></frameset></html>"; String clean = Jsoup.clean(dirty, Whitelist.basic()); assertEquals("", clean); // nothing good can come out...
org.jsoup.safety.CleanerTest::handlesFramesets
src/test/java/org/jsoup/safety/CleanerTest.java
178
src/test/java/org/jsoup/safety/CleanerTest.java
handlesFramesets
package org.jsoup.safety; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.nodes.Document; import org.jsoup.nodes.Entities; import org.jsoup.safety.Whitelist; import org.junit.Test; import static org.junit.Assert.*; /** Tests for the cleaner. @author Jonathan Hedley, jonathan@hedley.net */ publi...
// You are a professional Java test case writer, please create a test case named `handlesFramesets` for the issue `Jsoup-154`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-154 // // ## Issue-Title: // NullpointerException when applying Cleaner to a frame...
178
26
169
src/test/java/org/jsoup/safety/CleanerTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-154 ## Issue-Title: NullpointerException when applying Cleaner to a frameset ## Issue-Description: To reproduce: 1. Create/find a html document of a frameset. 2. Parse the html. 3. Create a Cleaner instance and call the clean method with the document from step 2. 4. NullPointerExcep...
169
[ "org.jsoup.safety.Cleaner" ]
f8e577863d701f80d266aeb57617bbbd0e10b11eeebb68c8879bf49289a853c6
@Test public void handlesFramesets()
// You are a professional Java test case writer, please create a test case named `handlesFramesets` for the issue `Jsoup-154`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-154 // // ## Issue-Title: // NullpointerException when applying Cleaner to a frame...
Jsoup
package org.jsoup.safety; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.nodes.Document; import org.jsoup.nodes.Entities; import org.jsoup.safety.Whitelist; import org.junit.Test; import static org.junit.Assert.*; /** Tests for the cleaner. @author Jonathan Hedley, jonathan@hedley.net */ publi...
@Test public void fallbackToUtfIfCantEncode() throws IOException { // that charset can't be encoded, so make sure we flip to utf String in = "<html><meta charset=\"ISO-2022-CN\"/>One</html>"; Document doc = Jsoup.parse(new ByteArrayInputStream(in.getBytes()), null, ""); assertEqual...
org.jsoup.parser.HtmlParserTest::fallbackToUtfIfCantEncode
src/test/java/org/jsoup/parser/HtmlParserTest.java
1,211
src/test/java/org/jsoup/parser/HtmlParserTest.java
fallbackToUtfIfCantEncode
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.integration.ParseTest; import org.jsoup.nodes.CDataNode; import org.jsoup.nodes.Comment; import org.jsoup.nodes.DataNode; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; im...
// You are a professional Java test case writer, please create a test case named `fallbackToUtfIfCantEncode` for the issue `Jsoup-1007`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1007 // // ## Issue-Title: // UnsupportedOperationException thrown for c...
1,211
82
1,200
src/test/java/org/jsoup/parser/HtmlParserTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-1007 ## Issue-Title: UnsupportedOperationException thrown for charsets that don't support encoding ## Issue-Description: ``` public static void main(String[] args) throws IOException { String html = "<html><meta charset=\"ISO-2022-CN\"/></html>"; System.out.println( ...
1,200
[ "org.jsoup.helper.DataUtil" ]
f8eb0b3aa2554d42e7ed966329113c8b3b77de3661646f8d80b1ab74d267900e
@Test public void fallbackToUtfIfCantEncode() throws IOException
// You are a professional Java test case writer, please create a test case named `fallbackToUtfIfCantEncode` for the issue `Jsoup-1007`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1007 // // ## Issue-Title: // UnsupportedOperationException thrown for c...
Jsoup
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.integration.ParseTest; import org.jsoup.nodes.CDataNode; import org.jsoup.nodes.Comment; import org.jsoup.nodes.DataNode; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; im...
public void testZero() { assertPrint("var x ='\\0';", "var x=\"\\0\""); assertPrint("var x ='\\x00';", "var x=\"\\0\""); assertPrint("var x ='\\u0000';", "var x=\"\\0\""); }
com.google.javascript.jscomp.CodePrinterTest::testZero
test/com/google/javascript/jscomp/CodePrinterTest.java
1,181
test/com/google/javascript/jscomp/CodePrinterTest.java
testZero
/* * Copyright 2004 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// You are a professional Java test case writer, please create a test case named `testZero` for the issue `Closure-383`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-383 // // ## Issue-Title: // \0 \x00 and \u0000 are translated to null character // /...
1,181
77
1,177
test/com/google/javascript/jscomp/CodePrinterTest.java
test
```markdown ## Issue-ID: Closure-383 ## Issue-Title: \0 \x00 and \u0000 are translated to null character ## Issue-Description: **What steps will reproduce the problem?** 1. write script with string constant "\0" or "\x00" or "\u0000" **What is the expected output? What do you see instead?** I expected a string l...
1,177
[ "com.google.javascript.jscomp.CodeGenerator" ]
f9199e80c0f7c7eb1afb10cd607a4eba106017f72b23ce24a858b10f7ca1ba53
public void testZero()
// You are a professional Java test case writer, please create a test case named `testZero` for the issue `Closure-383`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-383 // // ## Issue-Title: // \0 \x00 and \u0000 are translated to null character // /...
Closure
/* * Copyright 2004 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
@Test public void handlesControlCodeInAttributeName() { Document doc = Jsoup.parse("<p><a \06=foo>One</a><a/\06=bar><a foo\06=bar>Two</a></p>"); assertEquals("<p><a>One</a><a></a><a foo=\"bar\">Two</a></p>", doc.body().html()); }
org.jsoup.parser.HtmlParserTest::handlesControlCodeInAttributeName
src/test/java/org/jsoup/parser/HtmlParserTest.java
947
src/test/java/org/jsoup/parser/HtmlParserTest.java
handlesControlCodeInAttributeName
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.integration.ParseTest; import org.jsoup.nodes.*; import org.jsoup.select.Elements; import org.junit.Test; import java.io.File; import java.io.IOException; import java.util.List; import st...
// You are a professional Java test case writer, please create a test case named `handlesControlCodeInAttributeName` for the issue `Jsoup-793`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-793 // // ## Issue-Title: // Jsoup.clean control characters throw...
947
59
944
src/test/java/org/jsoup/parser/HtmlParserTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-793 ## Issue-Title: Jsoup.clean control characters throws: IllegalArgumentException: String must not be empty ## Issue-Description: I found that when running Jsoup.clean() on a string that contains the format below, Jsoup throws: `IllegalArgumentException: String must not be empty`. ...
944
[ "org.jsoup.parser.Token" ]
fa63e413cd9f40ec8ce9e9f410d82bc7ea2685ef26363118ac6291df597c3f32
@Test public void handlesControlCodeInAttributeName()
// You are a professional Java test case writer, please create a test case named `handlesControlCodeInAttributeName` for the issue `Jsoup-793`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-793 // // ## Issue-Title: // Jsoup.clean control characters throw...
Jsoup
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.integration.ParseTest; import org.jsoup.nodes.*; import org.jsoup.select.Elements; import org.junit.Test; import java.io.File; import java.io.IOException; import java.util.List; import st...
@Test public void readEntriesOfSize0() throws IOException { final SevenZFile sevenZFile = new SevenZFile(getFile("COMPRESS-348.7z")); try { int entries = 0; SevenZArchiveEntry entry = sevenZFile.getNextEntry(); while (entry != null) { entries++...
org.apache.commons.compress.archivers.sevenz.SevenZFileTest::readEntriesOfSize0
src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
285
src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
readEntriesOfSize0
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
// You are a professional Java test case writer, please create a test case named `readEntriesOfSize0` for the issue `Compress-COMPRESS-348`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-348 // // ## Issue-Title: // Calling SevenZFile.read() o...
285
/** * @see "https://issues.apache.org/jira/browse/COMPRESS-348" */
36
265
src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-348 ## Issue-Title: Calling SevenZFile.read() on empty SevenZArchiveEntry throws IllegalStateException ## Issue-Description: I'm pretty sure [~~COMPRESS-340~~](https://issues.apache.org/jira/browse/COMPRESS-340 "Provide an efficient way to skip over 7zip entries without d...
265
[ "org.apache.commons.compress.archivers.sevenz.SevenZFile" ]
fb5e83c2952d71efa56dfd762c1053589fc2199486cf683b77c79573e1f88fe3
@Test public void readEntriesOfSize0() throws IOException
// You are a professional Java test case writer, please create a test case named `readEntriesOfSize0` for the issue `Compress-COMPRESS-348`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-348 // // ## Issue-Title: // Calling SevenZFile.read() o...
Compress
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
public void testIssue941() throws Exception { ObjectNode object = MAPPER.createObjectNode(); String json = MAPPER.writeValueAsString(object); System.out.println("json: "+json); ObjectNode de1 = MAPPER.readValue(json, ObjectNode.class); // this works System.out.println(...
com.fasterxml.jackson.databind.node.TestObjectNode::testIssue941
src/test/java/com/fasterxml/jackson/databind/node/TestObjectNode.java
412
src/test/java/com/fasterxml/jackson/databind/node/TestObjectNode.java
testIssue941
package com.fasterxml.jackson.databind.node; import java.math.BigDecimal; import java.util.*; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.databind.*; import com.fasterxml.jacks...
// You are a professional Java test case writer, please create a test case named `testIssue941` for the issue `JacksonDatabind-941`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-941 // // ## Issue-Title: // Deserialization from "{}" to ObjectNo...
412
28
400
src/test/java/com/fasterxml/jackson/databind/node/TestObjectNode.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-941 ## Issue-Title: Deserialization from "{}" to ObjectNode field causes "out of END_OBJECT token" error ## Issue-Description: I found that deserializing from an empty object (`{}`) to ObjectNode field in a class field fails. Here is the minimum code to reproduce: ``` p...
400
[ "com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer" ]
fbad6fc02162b1f032b4603476f6284b76a055ed4ce938bd926712a0f80b0bee
public void testIssue941() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue941` for the issue `JacksonDatabind-941`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-941 // // ## Issue-Title: // Deserialization from "{}" to ObjectNo...
JacksonDatabind
package com.fasterxml.jackson.databind.node; import java.math.BigDecimal; import java.util.*; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.databind.*; import com.fasterxml.jacks...
public void testIssue1056() throws Exception { testTypes( "/** @type {Array} */ var x = null;" + "x.push('hi');", "No properties on this expression\n" + "found : null\n" + "required: Object"); }
com.google.javascript.jscomp.TypeCheckTest::testIssue1056
test/com/google/javascript/jscomp/TypeCheckTest.java
6,916
test/com/google/javascript/jscomp/TypeCheckTest.java
testIssue1056
/* * Copyright 2006 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// You are a professional Java test case writer, please create a test case named `testIssue1056` for the issue `Closure-1056`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1056 // // ## Issue-Title: // initial type of variable wrong when initialize in ...
6,916
176
6,909
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-1056 ## Issue-Title: initial type of variable wrong when initialize in a "var" statement with type declaration. ## Issue-Description: The following code doesn't give any warning even though it is an obvious bug: -------------===============================--------- /\*\* \* @c...
6,909
[ "com.google.javascript.jscomp.TypeInference" ]
fc74772c2f52a07443dfc60ebedeeddbba5dcee59e5eac8e6b9e9e5a9feaa6f9
public void testIssue1056() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue1056` for the issue `Closure-1056`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1056 // // ## Issue-Title: // initial type of variable wrong when initialize in ...
Closure
/* * Copyright 2006 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
public void testFunctionArguments16() throws Exception { testTypes( "/** @param {...number} var_args */" + "function g(var_args) {} g(1, true);", "actual parameter 2 of g does not match formal parameter\n" + "found : boolean\n" + "required: (number|undefined)"); }
com.google.javascript.jscomp.TypeCheckTest::testFunctionArguments16
test/com/google/javascript/jscomp/TypeCheckTest.java
1,367
test/com/google/javascript/jscomp/TypeCheckTest.java
testFunctionArguments16
/* * Copyright 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// You are a professional Java test case writer, please create a test case named `testFunctionArguments16` for the issue `Closure-229`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-229 // // ## Issue-Title: // Missing type-checks for var_args notation ...
1,367
96
1,360
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-229 ## Issue-Title: Missing type-checks for var_args notation ## Issue-Description: **What steps will reproduce the problem?** 1. Compile this: //------------------------------------- // ==ClosureCompiler== // @compilation\_level SIMPLE\_OPTIMIZATIONS // @warning\_level VERBOSE ...
1,360
[ "com.google.javascript.jscomp.TypeCheck" ]
fcf4538a3fb1a01fee7c72f543d330094297e2c53d09a9b21c6c2f805e4372c6
public void testFunctionArguments16() throws Exception
// You are a professional Java test case writer, please create a test case named `testFunctionArguments16` for the issue `Closure-229`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-229 // // ## Issue-Title: // Missing type-checks for var_args notation ...
Closure
/* * Copyright 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
public void testMinusNegativeZero() { // Negative zero is weird, because we have to be able to distinguish // it from positive zero (there are some subtle differences in behavior). assertPrint("x- -0", "x- -0.0"); }
com.google.javascript.jscomp.CodePrinterTest::testMinusNegativeZero
test/com/google/javascript/jscomp/CodePrinterTest.java
1,374
test/com/google/javascript/jscomp/CodePrinterTest.java
testMinusNegativeZero
/* * Copyright 2004 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// You are a professional Java test case writer, please create a test case named `testMinusNegativeZero` for the issue `Closure-657`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-657 // // ## Issue-Title: // Identifier minus a negative number needs a s...
1,374
38
1,370
test/com/google/javascript/jscomp/CodePrinterTest.java
test
```markdown ## Issue-ID: Closure-657 ## Issue-Title: Identifier minus a negative number needs a space between the "-"s ## Issue-Description: **What steps will reproduce the problem?** 1. Compile the attached file with java -jar build/compiler.jar --compilation\_level ADVANCED\_OPTIMIZATIONS --js bulletfail.js --js\...
1,370
[ "com.google.javascript.jscomp.CodeConsumer" ]
fdc04975ec59f8975fb692fdc1713ee1ea3c0789ae0f0312b462e728cecd89f8
public void testMinusNegativeZero()
// You are a professional Java test case writer, please create a test case named `testMinusNegativeZero` for the issue `Closure-657`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-657 // // ## Issue-Title: // Identifier minus a negative number needs a s...
Closure
/* * Copyright 2004 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
public void testPropertyOfMethod() { testFailure("a.protoype.b = {}; " + "a.prototype.b.c = function() { this.foo = 3; };"); }
com.google.javascript.jscomp.CheckGlobalThisTest::testPropertyOfMethod
test/com/google/javascript/jscomp/CheckGlobalThisTest.java
159
test/com/google/javascript/jscomp/CheckGlobalThisTest.java
testPropertyOfMethod
/* * Copyright 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// You are a professional Java test case writer, please create a test case named `testPropertyOfMethod` for the issue `Closure-125`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-125 // // ## Issue-Title: // Prototypes declared with quotes produce a JSC...
159
99
156
test/com/google/javascript/jscomp/CheckGlobalThisTest.java
test
```markdown ## Issue-ID: Closure-125 ## Issue-Title: Prototypes declared with quotes produce a JSC_USED_GLOBAL_THIS warning. ## Issue-Description: Compiling the following code (in advanced optimizations with VERBOSE warning levels): /\*\* @constructor \*/ function MyClass() {} MyClass.prototype["MyMethod"] = ...
156
[ "com.google.javascript.jscomp.CheckGlobalThis" ]
fe825b7466bc979ab51cc846792f1289edfc95151867605e9af2f15fca2b7622
public void testPropertyOfMethod()
// You are a professional Java test case writer, please create a test case named `testPropertyOfMethod` for the issue `Closure-125`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-125 // // ## Issue-Title: // Prototypes declared with quotes produce a JSC...
Closure
/* * Copyright 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
public void testBase64EmptyInputStream() throws Exception { byte[] emptyEncoded = new byte[0]; byte[] emptyDecoded = new byte[0]; testByteByByte(emptyEncoded, emptyDecoded, 76, CRLF); testByChunk(emptyEncoded, emptyDecoded, 76, CRLF); }
org.apache.commons.codec.binary.Base64InputStreamTest::testBase64EmptyInputStream
src/test/org/apache/commons/codec/binary/Base64InputStreamTest.java
54
src/test/org/apache/commons/codec/binary/Base64InputStreamTest.java
testBase64EmptyInputStream
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testBase64EmptyInputStream` for the issue `Codec-CODEC-77`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-77 // // ## Issue-Title: // Base64 bug with empty input (new ...
54
/** * Test the Base64InputStream implementation against empty input. * * @throws Exception for some failure scenarios. */
2
49
src/test/org/apache/commons/codec/binary/Base64InputStreamTest.java
src/test
```markdown ## Issue-ID: Codec-CODEC-77 ## Issue-Title: Base64 bug with empty input (new byte[0]) ## Issue-Description: Base64.encode(new byte[0]) doesn't return an empty byte array back! It returns CRLF. ``` You are a professional Java test case writer, please create a test case named `testBase64EmptyInputS...
49
[ "org.apache.commons.codec.binary.Base64" ]
fea846f282fd5c507075ba8f7249a7e72856405a9783ab711f46ab3319d3439d
public void testBase64EmptyInputStream() throws Exception
// You are a professional Java test case writer, please create a test case named `testBase64EmptyInputStream` for the issue `Codec-CODEC-77`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-77 // // ## Issue-Title: // Base64 bug with empty input (new ...
Codec
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
public void testFormat() { Locale realDefaultLocale = Locale.getDefault(); TimeZone realDefaultZone = TimeZone.getDefault(); try { Locale.setDefault(Locale.US); TimeZone.setDefault(TimeZone.getTimeZone("America/New_York")); GregorianCalendar cal1 = new Gr...
org.apache.commons.lang3.time.FastDateFormatTest::testFormat
src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
225
src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
testFormat
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testFormat` for the issue `Lang-LANG-719`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-719 // // ## Issue-Title: // FastDateFormat formats year differently than Simple...
225
18
172
src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-719 ## Issue-Title: FastDateFormat formats year differently than SimpleDateFormat in Java 7 ## Issue-Description: Starting with Java 7 does SimpleDateFormat format a year pattern of 'Y' or 'YYY' as '2003' instead of '03' as in former Java releases. According Javadoc this pattern ...
172
[ "org.apache.commons.lang3.time.FastDateFormat" ]
fec544dcf14f8541d7bf7111738de24ced64f2fd0a56652b323c93e68dccc80f
public void testFormat()
// You are a professional Java test case writer, please create a test case named `testFormat` for the issue `Lang-LANG-719`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-719 // // ## Issue-Title: // FastDateFormat formats year differently than Simple...
Lang
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
public void testLocalValue1() throws Exception { // Names are not known to be local. assertFalse(testLocalValue("x")); assertFalse(testLocalValue("x()")); assertFalse(testLocalValue("this")); assertFalse(testLocalValue("arguments")); // We can't know if new objects are local unless we know ...
com.google.javascript.jscomp.NodeUtilTest::testLocalValue1
test/com/google/javascript/jscomp/NodeUtilTest.java
1,108
test/com/google/javascript/jscomp/NodeUtilTest.java
testLocalValue1
/* * Copyright 2004 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// You are a professional Java test case writer, please create a test case named `testLocalValue1` for the issue `Closure-303`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-303 // // ## Issue-Title: // side-effects analysis incorrectly removing functio...
1,108
86
1,013
test/com/google/javascript/jscomp/NodeUtilTest.java
test
```markdown ## Issue-ID: Closure-303 ## Issue-Title: side-effects analysis incorrectly removing function calls with side effects ## Issue-Description: Sample Code: --- /\*\* @constructor \*/ function Foo() { var self = this; window.setTimeout(function() { window.location = self.location; }, 0); } Foo...
1,013
[ "com.google.javascript.jscomp.NodeUtil" ]
fee568c2289096948779d7ab9ec10bc3c6b08d4a2be623e6e65b9d8ead9a3e25
public void testLocalValue1() throws Exception
// You are a professional Java test case writer, please create a test case named `testLocalValue1` for the issue `Closure-303`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-303 // // ## Issue-Title: // side-effects analysis incorrectly removing functio...
Closure
/* * Copyright 2004 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
@Test public void shouldMatchCaptureArgumentsWhenArgsCountDoesNOTMatch() throws Exception { //given mock.varargs(); Invocation invocation = getLastInvocation(); //when InvocationMatcher invocationMatcher = new InvocationMatcher(invocation, (List) asList(new LocalizedMatc...
org.mockito.internal.invocation.InvocationMatcherTest::shouldMatchCaptureArgumentsWhenArgsCountDoesNOTMatch
test/org/mockito/internal/invocation/InvocationMatcherTest.java
152
test/org/mockito/internal/invocation/InvocationMatcherTest.java
shouldMatchCaptureArgumentsWhenArgsCountDoesNOTMatch
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.invocation; import org.hamcrest.Matcher; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.internal.matchers.*; import org.mocki...
// You are a professional Java test case writer, please create a test case named `shouldMatchCaptureArgumentsWhenArgsCountDoesNOTMatch` for the issue `Mockito-157`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-157 // // ## Issue-Title: // Source files ...
152
34
141
test/org/mockito/internal/invocation/InvocationMatcherTest.java
test
```markdown ## Issue-ID: Mockito-157 ## Issue-Title: Source files should not be put in binary JAR ## Issue-Description: Source files (`*.java`) should not be put into binary `mockito-core.jar`. It stupefies Idea to show decompiled file even when source jar is available. ``` You are a professional Java test cas...
141
[ "org.mockito.internal.invocation.InvocationMatcher" ]
ff5d5673d84afa7e81c05657887fc762368c350c5675cfa3c920c1d6ba1335a2
@Test public void shouldMatchCaptureArgumentsWhenArgsCountDoesNOTMatch() throws Exception
// You are a professional Java test case writer, please create a test case named `shouldMatchCaptureArgumentsWhenArgsCountDoesNOTMatch` for the issue `Mockito-157`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-157 // // ## Issue-Title: // Source files ...
Mockito
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.invocation; import org.hamcrest.Matcher; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.internal.matchers.*; import org.mocki...