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
@SuppressWarnings("resource") public void testNotAllowMultipleMatches() throws Exception { String jsonString = aposToQuotes("{'a':123,'array':[1,2],'ob':{'value0':2,'value':3,'value2':4},'value':4,'b':true}"); JsonParser p0 = JSON_F.createParser(jsonString); JsonParser p = new Filtering...
com.fasterxml.jackson.core.filter.BasicParserFilteringTest::testNotAllowMultipleMatches
src/test/java/com/fasterxml/jackson/core/filter/BasicParserFilteringTest.java
118
src/test/java/com/fasterxml/jackson/core/filter/BasicParserFilteringTest.java
testNotAllowMultipleMatches
package com.fasterxml.jackson.core.filter; import java.util.*; import com.fasterxml.jackson.core.*; public class BasicParserFilteringTest extends BaseTest { static class NameMatchFilter extends TokenFilter { private final Set<String> _names; public NameMatchFilter(String... names) { ...
// You are a professional Java test case writer, please create a test case named `testNotAllowMultipleMatches` for the issue `JacksonCore-209`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-209 // // ## Issue-Title: // Make use of _allowMultipleMatc...
118
15
106
src/test/java/com/fasterxml/jackson/core/filter/BasicParserFilteringTest.java
src/test/java
```markdown ## Issue-ID: JacksonCore-209 ## Issue-Title: Make use of _allowMultipleMatches in FilteringParserDelegate ## Issue-Description: Currently, it looks like that the \_allowMultipleMatches attribute in FilteringGeneratorDelegate is not utilised (i.e. no value is assigned to this variable). Re. the documenta...
106
[ "com.fasterxml.jackson.core.filter.FilteringParserDelegate" ]
a65cd145b90cf23d816237364328915c432bddd63059d5f21464aa24207a3823
@SuppressWarnings("resource") public void testNotAllowMultipleMatches() throws Exception
// You are a professional Java test case writer, please create a test case named `testNotAllowMultipleMatches` for the issue `JacksonCore-209`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-209 // // ## Issue-Title: // Make use of _allowMultipleMatc...
JacksonCore
package com.fasterxml.jackson.core.filter; import java.util.*; import com.fasterxml.jackson.core.*; public class BasicParserFilteringTest extends BaseTest { static class NameMatchFilter extends TokenFilter { private final Set<String> _names; public NameMatchFilter(String... names) { ...
public void testExcessDataInZip64ExtraField() throws Exception { File archive = getFile("COMPRESS-228.zip"); zf = new ZipFile(archive); // actually, if we get here, the test already has passed ZipArchiveEntry ze = zf.getEntry("src/main/java/org/apache/commons/compress/archivers/zip/...
org.apache.commons.compress.archivers.zip.ZipFileTest::testExcessDataInZip64ExtraField
src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
238
src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
testExcessDataInZip64ExtraField
/* * 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 `testExcessDataInZip64ExtraField` for the issue `Compress-COMPRESS-228`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-228 // // ## Issue-Title: // ZipException o...
238
/** * @see https://issues.apache.org/jira/browse/COMPRESS-228 */
19
231
src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-228 ## Issue-Title: ZipException on reading valid zip64 file ## Issue-Description: ZipFile zip = new ZipFile(new File("ordertest-64.zip")); throws ZipException "central directory zip64 extended information extra field's length doesn't match central directory data. Expecte...
231
[ "org.apache.commons.compress.archivers.zip.Zip64ExtendedInformationExtraField" ]
a6c0abaf530457e66f257e7095b67c7cc560ad33b4c407ee92359a341faa0a56
public void testExcessDataInZip64ExtraField() throws Exception
// You are a professional Java test case writer, please create a test case named `testExcessDataInZip64ExtraField` for the issue `Compress-COMPRESS-228`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-228 // // ## Issue-Title: // ZipException 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 testPOJONodeCustomSer() throws Exception { Data data = new Data(); data.aStr = "Hello"; Map<String, Object> mapTest = new HashMap<>(); mapTest.put("data", data); ObjectNode treeTest = MAPPER.createObjectNode(); treeTest.putPOJO("data", data); final String...
com.fasterxml.jackson.databind.node.POJONodeTest::testPOJONodeCustomSer
src/test/java/com/fasterxml/jackson/databind/node/POJONodeTest.java
53
src/test/java/com/fasterxml/jackson/databind/node/POJONodeTest.java
testPOJONodeCustomSer
package com.fasterxml.jackson.databind.node; import java.io.IOException; import java.util.*; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.node.ObjectNode; import com.faste...
// You are a professional Java test case writer, please create a test case named `testPOJONodeCustomSer` for the issue `JacksonDatabind-1991`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1991 // // ## Issue-Title: // Context attributes are not...
53
97
35
src/test/java/com/fasterxml/jackson/databind/node/POJONodeTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1991 ## Issue-Title: Context attributes are not passed/available to custom serializer if object is in POJO ## Issue-Description: Below is a test case where I create a custom serializer and use it to serialize an object 1) in a HashMap and 2) in an ObjectNode. In both cases I...
35
[ "com.fasterxml.jackson.databind.node.POJONode" ]
a721a6aa0411de7c03ea50ac7b3f90aac3606bc0fc025914717869c607781474
public void testPOJONodeCustomSer() throws Exception
// You are a professional Java test case writer, please create a test case named `testPOJONodeCustomSer` for the issue `JacksonDatabind-1991`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1991 // // ## Issue-Title: // Context attributes are not...
JacksonDatabind
package com.fasterxml.jackson.databind.node; import java.io.IOException; import java.util.*; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.node.ObjectNode; import com.faste...
@Test public void testToMapWithShortRecord() throws Exception { final CSVParser parser = CSVParser.parse("a,b", CSVFormat.DEFAULT.withHeader("A", "B", "C")); final CSVRecord shortRec = parser.iterator().next(); shortRec.toMap(); }
org.apache.commons.csv.CSVRecordTest::testToMapWithShortRecord
src/test/java/org/apache/commons/csv/CSVRecordTest.java
167
src/test/java/org/apache/commons/csv/CSVRecordTest.java
testToMapWithShortRecord
/* * 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 `testToMapWithShortRecord` for the issue `Csv-CSV-111`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-111 // // ## Issue-Title: // CSVRecord.toMap() fails if row length sho...
167
6
162
src/test/java/org/apache/commons/csv/CSVRecordTest.java
src/test/java
```markdown ## Issue-ID: Csv-CSV-111 ## Issue-Title: CSVRecord.toMap() fails if row length shorter than header length ## Issue-Description: Similar to [~~CSV-96~~](https://issues.apache.org/jira/browse/CSV-96 "CSVRecord does not verify that the length of the header mapping matches the number of values"), if .toMap...
162
[ "org.apache.commons.csv.CSVRecord" ]
a7476023a472496122c0f2766e394ea627ebf8f38e611bcdccd26ab62a6ced2c
@Test public void testToMapWithShortRecord() throws Exception
// You are a professional Java test case writer, please create a test case named `testToMapWithShortRecord` for the issue `Csv-CSV-111`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-111 // // ## Issue-Title: // CSVRecord.toMap() fails if row length sho...
Csv
/* * 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 testDontQuoteEuroFirstChar() throws IOException { final StringWriter sw = new StringWriter(); try (final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.RFC4180)) { printer.printRecord(EURO_CH, "Deux"); assertEquals(EURO_CH + ",Deux" + recordSeparator,...
org.apache.commons.csv.CSVPrinterTest::testDontQuoteEuroFirstChar
src/test/java/org/apache/commons/csv/CSVPrinterTest.java
1,041
src/test/java/org/apache/commons/csv/CSVPrinterTest.java
testDontQuoteEuroFirstChar
/* * 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 `testDontQuoteEuroFirstChar` for the issue `Csv-CSV-219`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-219 // // ## Issue-Title: // The behavior of quote char using is not...
1,041
15
1,034
src/test/java/org/apache/commons/csv/CSVPrinterTest.java
src/test/java
```markdown ## Issue-ID: Csv-CSV-219 ## Issue-Title: The behavior of quote char using is not similar as Excel does when the first string contains CJK char(s) ## Issue-Description: When using CSVFormat.EXCEL to print a CSV file, the behavior of quote char using is not similar as Microsoft Excel does when the first ...
1,034
[ "org.apache.commons.csv.CSVFormat" ]
a891fd450d7db7ba7a55b5af72b45ce12c069d808e49a88a558cd4e0bb3a39f2
@Test public void testDontQuoteEuroFirstChar() throws IOException
// You are a professional Java test case writer, please create a test case named `testDontQuoteEuroFirstChar` for the issue `Csv-CSV-219`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-219 // // ## Issue-Title: // The behavior of quote char using is not...
Csv
/* * 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 testNewStringNullInput_CODEC229() { Assert.assertNull(StringUtils.newStringUtf8(null)); Assert.assertNull(StringUtils.newStringIso8859_1(null)); Assert.assertNull(StringUtils.newStringUsAscii(null)); Assert.assertNull(StringUtils.newStringUtf16(null)); A...
org.apache.commons.codec.binary.StringUtilsTest::testNewStringNullInput_CODEC229
src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java
155
src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java
testNewStringNullInput_CODEC229
/* * 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 `testNewStringNullInput_CODEC229` for the issue `Codec-CODEC-229`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-229 // // ## Issue-Title: // StringUtils.newStringxxx(n...
155
17
147
src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java
src/test/java
```markdown ## Issue-ID: Codec-CODEC-229 ## Issue-Title: StringUtils.newStringxxx(null) should return null, not NPE ## Issue-Description: Method calls such as StringUtils.newStringIso8859\_1(null) should return null, not NPE. It looks like this capability was lost with the fix for [~~CODEC-136~~](https://issues....
147
[ "org.apache.commons.codec.binary.StringUtils" ]
a8da23162d77049002b3a847448e931bb6e3ea0f11bc8d1fb97963906a686d87
@Test public void testNewStringNullInput_CODEC229()
// You are a professional Java test case writer, please create a test case named `testNewStringNullInput_CODEC229` for the issue `Codec-CODEC-229`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-229 // // ## Issue-Title: // StringUtils.newStringxxx(n...
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 testCaseInsensitiveUnwrap() throws Exception { ObjectMapper mapper = new ObjectMapper(); mapper.enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES); Person p = mapper.readValue("{ }", Person.class); assertNotNull(p); }
com.fasterxml.jackson.databind.struct.TestUnwrapped::testCaseInsensitiveUnwrap
src/test/java/com/fasterxml/jackson/databind/struct/TestUnwrapped.java
216
src/test/java/com/fasterxml/jackson/databind/struct/TestUnwrapped.java
testCaseInsensitiveUnwrap
package com.fasterxml.jackson.databind.struct; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; /** * Unit tests for verifying that basic {@link JsonUnwrapped} annotation * handling works as expected; some more advanced tests are separated out * to more specific test classes (li...
// You are a professional Java test case writer, please create a test case named `testCaseInsensitiveUnwrap` for the issue `JacksonDatabind-1493`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1493 // // ## Issue-Title: // ACCEPT_CASE_INSENSITIV...
216
// [databind#1493]: case-insensitive handling
70
210
src/test/java/com/fasterxml/jackson/databind/struct/TestUnwrapped.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1493 ## Issue-Title: ACCEPT_CASE_INSENSITIVE_PROPERTIES fails with @JsonUnwrapped ## Issue-Description: (note: moved from [FasterXML/jackson-dataformat-csv#133](https://github.com/FasterXML/jackson-dataformat-csv/issues/133)) When trying to deserialize type like: ``` pu...
210
[ "com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap" ]
a946e4fe1679d4899bb78afb37e5cc6edce4e887efebc76ae3dd8216d32186c9
public void testCaseInsensitiveUnwrap() throws Exception
// You are a professional Java test case writer, please create a test case named `testCaseInsensitiveUnwrap` for the issue `JacksonDatabind-1493`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1493 // // ## Issue-Title: // ACCEPT_CASE_INSENSITIV...
JacksonDatabind
package com.fasterxml.jackson.databind.struct; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; /** * Unit tests for verifying that basic {@link JsonUnwrapped} annotation * handling works as expected; some more advanced tests are separated out * to more specific test classes (li...
public void testNan() { assertXPathValue(context, "$nan > $nan", Boolean.FALSE, Boolean.class); assertXPathValue(context, "$nan < $nan", Boolean.FALSE, Boolean.class); assertXPathValue(context, "$nan = $nan", Boolean.TRUE, Boolean.class); assertXPathValue(context, "$nan > 0", Boolean...
org.apache.commons.jxpath.ri.compiler.CoreOperationTest::testNan
src/test/org/apache/commons/jxpath/ri/compiler/CoreOperationTest.java
124
src/test/org/apache/commons/jxpath/ri/compiler/CoreOperationTest.java
testNan
/* * 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 `testNan` for the issue `JxPath-JXPATH-95`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-95 // // ## Issue-Title: // Comparing with NaN is incorrect // // ## Issue-...
124
8
114
src/test/org/apache/commons/jxpath/ri/compiler/CoreOperationTest.java
src/test
```markdown ## Issue-ID: JxPath-JXPATH-95 ## Issue-Title: Comparing with NaN is incorrect ## Issue-Description: 'NaN' > 'NaN' is true, but should be FALSE ``` You are a professional Java test case writer, please create a test case named `testNan` for the issue `JxPath-JXPATH-95`, utilizing the provided issue...
114
[ "org.apache.commons.jxpath.ri.compiler.CoreOperationRelationalExpression" ]
aa92c17cf84aba9051ea17a49235d92e0fbf76da585c4584c36beff583b78298
public void testNan()
// You are a professional Java test case writer, please create a test case named `testNan` for the issue `JxPath-JXPATH-95`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-95 // // ## Issue-Title: // Comparing with NaN is incorrect // // ## Issue-...
JxPath
/* * 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 attributeWithBrackets() { String html = "<div data='End]'>One</div> <div data='[Another)]]'>Two</div>"; Document doc = Jsoup.parse(html); assertEquals("One", doc.select("div[data='End]'").first().text()); assertEquals("Two", doc.select("div[data='[Another)]]'").firs...
org.jsoup.select.SelectorTest::attributeWithBrackets
src/test/java/org/jsoup/select/SelectorTest.java
669
src/test/java/org/jsoup/select/SelectorTest.java
attributeWithBrackets
package org.jsoup.select; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.junit.Test; import static org.junit.Assert.*; /** * Tests that the selector selects correctly. * * @author Jonathan Hedley, jonathan@hedley.net */ public class SelectorTest { @Test pu...
// You are a professional Java test case writer, please create a test case named `attributeWithBrackets` for the issue `Jsoup-611`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-611 // // ## Issue-Title: // Parse failed with org.jsoup.select.Selector$Sele...
669
53
664
src/test/java/org/jsoup/select/SelectorTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-611 ## Issue-Title: Parse failed with org.jsoup.select.Selector$SelectorParseException when selector has unbalanced '(' or '[' or ')' or ']' ## Issue-Description: Selector I am having as following div.card-content2:has(a.subtitle[title= MySubTitle:)]) OR a.title[title=MyTitle :] ] ...
664
[ "org.jsoup.parser.TokenQueue" ]
ab9bbc253c31183bf48c7b3bdca95f95c8d2666b3bf13d974f58fcf082ecedc5
@Test public void attributeWithBrackets()
// You are a professional Java test case writer, please create a test case named `attributeWithBrackets` for the issue `Jsoup-611`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-611 // // ## Issue-Title: // Parse failed with org.jsoup.select.Selector$Sele...
Jsoup
package org.jsoup.select; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.junit.Test; import static org.junit.Assert.*; /** * Tests that the selector selects correctly. * * @author Jonathan Hedley, jonathan@hedley.net */ public class SelectorTest { @Test pu...
@Test public void testAddNaN() { Complex x = new Complex(3.0, 4.0); Complex z = x.add(Complex.NaN); Assert.assertTrue(z.isNaN()); z = new Complex(1, nan); Complex w = x.add(z); Assert.assertTrue(Double.isNaN(w.getReal())); Assert.assertTrue(Double.isNaN(w....
org.apache.commons.math.complex.ComplexTest::testAddNaN
src/test/java/org/apache/commons/math/complex/ComplexTest.java
117
src/test/java/org/apache/commons/math/complex/ComplexTest.java
testAddNaN
/* * 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 `testAddNaN` for the issue `Math-MATH-618`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-618 // // ## Issue-Title: // Complex Add and Subtract handle NaN arguments diffe...
117
53
108
src/test/java/org/apache/commons/math/complex/ComplexTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-618 ## Issue-Title: Complex Add and Subtract handle NaN arguments differently, but javadoc contracts are the same ## Issue-Description: For both Complex add and subtract, the javadoc states that ``` * If either this or <code>rhs</code> has a NaN value in either part, ...
108
[ "org.apache.commons.math.complex.Complex" ]
abb23865a79c14162730e3cee3bef34dd1fbce8fa43fecd8b74d50ccdc1e137c
@Test public void testAddNaN()
// You are a professional Java test case writer, please create a test case named `testAddNaN` for the issue `Math-MATH-618`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-618 // // ## Issue-Title: // Complex Add and Subtract handle NaN arguments diffe...
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 testBadInterfaceExtendsNonExistentInterfaces() throws Exception { String js = "/** @interface \n" + " * @extends {nonExistent1} \n" + " * @extends {nonExistent2} \n" + " */function A() {}"; String[] expectedWarnings = { "Bad type annotation. Unknown type nonExistent1"...
com.google.javascript.jscomp.TypeCheckTest::testBadInterfaceExtendsNonExistentInterfaces
test/com/google/javascript/jscomp/TypeCheckTest.java
3,780
test/com/google/javascript/jscomp/TypeCheckTest.java
testBadInterfaceExtendsNonExistentInterfaces
/* * 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 `testBadInterfaceExtendsNonExistentInterfaces` for the issue `Closure-884`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-884 // // ## Issue-Title: // combining @interface ...
3,780
2
3,770
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-884 ## Issue-Title: combining @interface and multiple @extends can crash compiler ## Issue-Description: Compile this: --------------------------------- // ==ClosureCompiler== // @compilation\_level SIMPLE\_OPTIMIZATIONS // @warning\_level VERBOSE // @output\_file\_name default....
3,770
[ "com.google.javascript.jscomp.TypeCheck" ]
ad7ec3be40ca1b9241491fb1706fb3e062c517fb0ba406f4fa54b022c7efe863
public void testBadInterfaceExtendsNonExistentInterfaces() throws Exception
// You are a professional Java test case writer, please create a test case named `testBadInterfaceExtendsNonExistentInterfaces` for the issue `Closure-884`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-884 // // ## Issue-Title: // combining @interface ...
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 testParseOctal() throws Exception{ long value; byte [] buffer; final long MAX_OCTAL = 077777777777L; // Allowed 11 digits final long MAX_OCTAL_OVERFLOW = 0777777777777L; // in fact 12 for some implementations final String maxOctal = "777777777777"; // Maximum v...
org.apache.commons.compress.archivers.tar.TarUtilsTest::testParseOctal
src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
69
src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
testParseOctal
/* * 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 `testParseOctal` for the issue `Compress-COMPRESS-278`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-278 // // ## Issue-Title: // Incorrect handling of NUL usern...
69
27
45
src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-278 ## Issue-Title: Incorrect handling of NUL username and group Tar.gz entries ## Issue-Description: With version 1.8 of commons-compress it's no longer possible to decompress files from an archive if the archive contains entries having null (or being empty?) set as user...
45
[ "org.apache.commons.compress.archivers.tar.TarUtils" ]
ae561197f3ffd9aa1f92e02dd54e2a35ea104fe6ea6c574160aa74a9533eb92c
public void testParseOctal() throws Exception
// You are a professional Java test case writer, please create a test case named `testParseOctal` for the issue `Compress-COMPRESS-278`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-278 // // ## Issue-Title: // Incorrect handling of NUL usern...
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 testSqlDateConfigOverride() throws Exception { ObjectMapper mapper = newObjectMapper(); mapper.configOverride(java.sql.Date.class) .setFormat(JsonFormat.Value.forPattern("yyyy+MM+dd")); assertEquals("\"1980+04+14\"", mapper.writeValueAsString(j...
com.fasterxml.jackson.databind.ser.jdk.SqlDateSerializationTest::testSqlDateConfigOverride
src/test/java/com/fasterxml/jackson/databind/ser/jdk/SqlDateSerializationTest.java
105
src/test/java/com/fasterxml/jackson/databind/ser/jdk/SqlDateSerializationTest.java
testSqlDateConfigOverride
package com.fasterxml.jackson.databind.ser.jdk; import java.io.IOException; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; // Tests for `java.sql.Date`, `java.sql.Time` and `java.sql.Timestamp` public c...
// You are a professional Java test case writer, please create a test case named `testSqlDateConfigOverride` for the issue `JacksonDatabind-2064`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2064 // // ## Issue-Title: // Cannot set custom form...
105
// [databind#2064]
102
98
src/test/java/com/fasterxml/jackson/databind/ser/jdk/SqlDateSerializationTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-2064 ## Issue-Title: Cannot set custom format for SqlDateSerializer globally ## Issue-Description: Version: 2.9.5 After [#219](https://github.com/FasterXML/jackson-databind/issues/219) was fixed, the default format for `java.sql.Date` serialization switched from string to ...
98
[ "com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase" ]
af126d26381db5f1cdb097b358c26253d6f7bfd812896a1a7ed33339aa90571f
public void testSqlDateConfigOverride() throws Exception
// You are a professional Java test case writer, please create a test case named `testSqlDateConfigOverride` for the issue `JacksonDatabind-2064`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2064 // // ## Issue-Title: // Cannot set custom form...
JacksonDatabind
package com.fasterxml.jackson.databind.ser.jdk; import java.io.IOException; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; // Tests for `java.sql.Date`, `java.sql.Time` and `java.sql.Timestamp` public c...
@Test public void testHandlesDeepSpans() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < 200; i++) { sb.append("<span>"); } sb.append("<p>One</p>"); Document doc = Jsoup.parse(sb.toString()); assertEquals(200, doc.select("span").size()); ...
org.jsoup.parser.HtmlParserTest::testHandlesDeepSpans
src/test/java/org/jsoup/parser/HtmlParserTest.java
1,084
src/test/java/org/jsoup/parser/HtmlParserTest.java
testHandlesDeepSpans
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.Comment; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.Entities; import org.jsoup.nodes.FormElement; ...
// You are a professional Java test case writer, please create a test case named `testHandlesDeepSpans` for the issue `Jsoup-966`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-966 // // ## Issue-Title: // version 1.11.1 java.lang.StackOverflowError // /...
1,084
68
1,073
src/test/java/org/jsoup/parser/HtmlParserTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-966 ## Issue-Title: version 1.11.1 java.lang.StackOverflowError ## Issue-Description: version 1.10.3 no problem version 1.11.1 java.lang.StackOverflowError Example URL: <http://szshb.nxszs.gov.cn/> <http://www.lnfsfda.gov.cn/> <http://www.beihai.gov.cn/> <http://www....
1,073
[ "org.jsoup.parser.HtmlTreeBuilder" ]
afb69967487e5d537d472d6f9fda0ad1685fd6fd54c0c7d7b8703934112b7cf1
@Test public void testHandlesDeepSpans()
// You are a professional Java test case writer, please create a test case named `testHandlesDeepSpans` for the issue `Jsoup-966`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-966 // // ## Issue-Title: // version 1.11.1 java.lang.StackOverflowError // /...
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.Comment; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.Entities; import org.jsoup.nodes.FormElement; ...
@Test public void testRoundTripOctalOrBinary8() { testRoundTripOctalOrBinary(8); }
org.apache.commons.compress.archivers.tar.TarUtilsTest::testRoundTripOctalOrBinary8
src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
148
src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
testRoundTripOctalOrBinary8
/* * 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 `testRoundTripOctalOrBinary8` for the issue `Compress-COMPRESS-411`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-411 // // ## Issue-Title: // TarUtils.formatLon...
148
45
145
src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-411 ## Issue-Title: TarUtils.formatLongOctalOrBinaryBytes never uses result of formatLongBinary ## Issue-Description: if the length < 9, formatLongBinary is executed, then overwritten by the results of formatBigIntegerBinary. If the results are not ignored, a unit test...
145
[ "org.apache.commons.compress.archivers.tar.TarUtils" ]
b008ad6afec5773c0ece7e59503f0aad98986c1b5ed80ecdc8c3d481ba4328ba
@Test public void testRoundTripOctalOrBinary8()
// You are a professional Java test case writer, please create a test case named `testRoundTripOctalOrBinary8` for the issue `Compress-COMPRESS-411`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-411 // // ## Issue-Title: // TarUtils.formatLon...
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 testRootEndpoints() throws Exception { UnivariateRealFunction f = new SinFunction(); UnivariateRealSolver solver = new BrentSolver(); // endpoint is root double result = solver.solve(f, Math.PI, 4); assertEquals(Math.PI, result, solver.getAbsoluteAccuracy()); ...
org.apache.commons.math.analysis.solvers.BrentSolverTest::testRootEndpoints
src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
321
src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
testRootEndpoints
/* * 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 `testRootEndpoints` for the issue `Math-MATH-344`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-344 // // ## Issue-Title: // Brent solver returns the wrong value if eith...
321
72
304
src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-344 ## Issue-Title: Brent solver returns the wrong value if either bracket endpoint is root ## Issue-Description: The solve(final UnivariateRealFunction f, final double min, final double max, final double initial) function returns yMin or yMax if min or max are deemed to be roots...
304
[ "org.apache.commons.math.analysis.solvers.BrentSolver" ]
b00c45a46b2eca6acac4e801a1d8b70c17f92e2282b99afa8f09e99baeadd52e
public void testRootEndpoints() throws Exception
// You are a professional Java test case writer, please create a test case named `testRootEndpoints` for the issue `Math-MATH-344`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-344 // // ## Issue-Title: // Brent solver returns the wrong value if eith...
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 testOverrideMeanWithMathClass() throws Exception { double[] scores = {1, 2, 3, 4}; SummaryStatistics stats = new SummaryStatistics(); stats.setMeanImpl(new Mean()); for(double i : scores) { stats.addValue(i); } Assert.assertEquals((new...
org.apache.commons.math.stat.descriptive.SummaryStatisticsTest::testOverrideMeanWithMathClass
src/test/java/org/apache/commons/math/stat/descriptive/SummaryStatisticsTest.java
335
src/test/java/org/apache/commons/math/stat/descriptive/SummaryStatisticsTest.java
testOverrideMeanWithMathClass
/* * 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 `testOverrideMeanWithMathClass` for the issue `Math-MATH-691`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-691 // // ## Issue-Title: // Statistics.setVarianceImpl makes...
335
43
326
src/test/java/org/apache/commons/math/stat/descriptive/SummaryStatisticsTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-691 ## Issue-Title: Statistics.setVarianceImpl makes getStandardDeviation produce NaN ## Issue-Description: Invoking SummaryStatistics.setVarianceImpl(new Variance(true/false) makes getStandardDeviation produce NaN. The code to reproduce it: ``` int[] scores = {1, 2, 3, 4}; S...
326
[ "org.apache.commons.math.stat.descriptive.SummaryStatistics" ]
b015ba5d6b3f88dfb4048b064a55a604492de7472d47bebe43ca7153142ccb7a
@Test public void testOverrideMeanWithMathClass() throws Exception
// You are a professional Java test case writer, please create a test case named `testOverrideMeanWithMathClass` for the issue `Math-MATH-691`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-691 // // ## Issue-Title: // Statistics.setVarianceImpl makes...
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 testMethodInference7() throws Exception { testTypes( "/** @constructor */ function F() {}" + "F.prototype.foo = function() { };" + "/** @constructor \n * @extends {F} */ " + "function G() {}" + "/** @override */ G.prototype.foo = function(x, y) { };", "m...
com.google.javascript.jscomp.LooseTypeCheckTest::testMethodInference7
test/com/google/javascript/jscomp/LooseTypeCheckTest.java
1,791
test/com/google/javascript/jscomp/LooseTypeCheckTest.java
testMethodInference7
/* * 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 `testMethodInference7` for the issue `Closure-634`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-634 // // ## Issue-Title: // {function(number, string)} should not be assi...
1,791
164
1,780
test/com/google/javascript/jscomp/LooseTypeCheckTest.java
test
```markdown ## Issue-ID: Closure-634 ## Issue-Title: {function(number, string)} should not be assignable to {function(number)} ## Issue-Description: Consider the following snippet. I don't think the "second call" should compile. As a side note: it would be great if none of the compiled in some pseudo-strict compile...
1,780
[ "com.google.javascript.rhino.jstype.ArrowType" ]
b0f43f4a7c5dac5df6e31c4a1c3382c1ded360b75e72ceccc2376ef14b94c371
public void testMethodInference7() throws Exception
// You are a professional Java test case writer, please create a test case named `testMethodInference7` for the issue `Closure-634`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-634 // // ## Issue-Title: // {function(number, string)} should not be assi...
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 testIntegerOverflow() { checkIntegerOverflow(0.75000000001455192); checkIntegerOverflow(1.0e10); checkIntegerOverflow(-1.0e10); checkIntegerOverflow(-43979.60679604749); }
org.apache.commons.math3.fraction.FractionTest::testIntegerOverflow
src/test/java/org/apache/commons/math3/fraction/FractionTest.java
139
src/test/java/org/apache/commons/math3/fraction/FractionTest.java
testIntegerOverflow
/* * 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 `testIntegerOverflow` for the issue `Math-MATH-836`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-836 // // ## Issue-Title: // Fraction(double, int) constructor strange ...
139
26
133
src/test/java/org/apache/commons/math3/fraction/FractionTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-836 ## Issue-Title: Fraction(double, int) constructor strange behaviour ## Issue-Description: The Fraction constructor Fraction(double, int) takes a double value and a int maximal denominator, and approximates a fraction. When the double value is a large, negative number with man...
133
[ "org.apache.commons.math3.fraction.Fraction" ]
b18b08072f7a7b1697a28f59f75409b75765eaf5e177e814f18576eacd56a652
@Test public void testIntegerOverflow()
// You are a professional Java test case writer, please create a test case named `testIntegerOverflow` for the issue `Math-MATH-836`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-836 // // ## Issue-Title: // Fraction(double, int) constructor strange ...
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 testEscapeJavaScript() { assertEquals(null, StringEscapeUtils.escapeJavaScript(null)); try { StringEscapeUtils.escapeJavaScript(null, null); fail(); } catch (IOException ex) { fail(); } catch (IllegalArgumentException ex) { } ...
org.apache.commons.lang.StringEscapeUtilsTest::testEscapeJavaScript
src/test/org/apache/commons/lang/StringEscapeUtilsTest.java
188
src/test/org/apache/commons/lang/StringEscapeUtilsTest.java
testEscapeJavaScript
/* * 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 `testEscapeJavaScript` for the issue `Lang-LANG-363`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-363 // // ## Issue-Title: // StringEscapeUtils.escapeJavaScript() meth...
188
52
168
src/test/org/apache/commons/lang/StringEscapeUtilsTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-363 ## Issue-Title: StringEscapeUtils.escapeJavaScript() method did not escape '/' into '\/', it will make IE render page uncorrectly ## Issue-Description: If Javascripts including'/', IE will parse the scripts uncorrectly, actually '/' should be escaped to '\/'. For example, ...
168
[ "org.apache.commons.lang.StringEscapeUtils" ]
b5e4b6be56e6e0da70de161820ea62f3bc9a25192210ebce63b80a66b39fad2c
public void testEscapeJavaScript()
// You are a professional Java test case writer, please create a test case named `testEscapeJavaScript` for the issue `Lang-LANG-363`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-363 // // ## Issue-Title: // StringEscapeUtils.escapeJavaScript() meth...
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 testMath221() { assertEquals(new Complex(0,-1), new Complex(0,1).multiply(new Complex(-1,0))); }
org.apache.commons.math.complex.ComplexTest::testMath221
src/test/org/apache/commons/math/complex/ComplexTest.java
696
src/test/org/apache/commons/math/complex/ComplexTest.java
testMath221
/* * 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 `testMath221` for the issue `Math-MATH-221`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-221 // // ## Issue-Title: // Result of multiplying and equals for complex numbe...
696
/** test issue MATH-221 */
96
694
src/test/org/apache/commons/math/complex/ComplexTest.java
src/test
```markdown ## Issue-ID: Math-MATH-221 ## Issue-Title: Result of multiplying and equals for complex numbers is wrong ## Issue-Description: Hi. The bug relates on complex numbers. The methods "multiply" and "equals" of the class Complex are involved. mathematic background: (0,i) \* (-1,0i) = (0,-i). little...
694
[ "org.apache.commons.math.complex.Complex" ]
b6fd83df563ac2ee9a670a216844e821bb02ee7d278f6561e38dc532c546e75d
public void testMath221()
// You are a professional Java test case writer, please create a test case named `testMath221` for the issue `Math-MATH-221`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-221 // // ## Issue-Title: // Result of multiplying and equals for complex numbe...
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 listener() throws Exception { InvocationListener invocationListener = mock(InvocationListener.class); List mockedList = mock(List.class, withSettings().invocationListeners(invocationListener)); reset(mockedList); mockedList.clear(); verify(invocationL...
org.mockitousage.bugs.ListenersLostOnResetMockTest::listener
test/org/mockitousage/bugs/ListenersLostOnResetMockTest.java
23
test/org/mockitousage/bugs/ListenersLostOnResetMockTest.java
listener
package org.mockitousage.bugs; import org.junit.Test; import org.mockito.listeners.InvocationListener; import org.mockito.listeners.MethodInvocationReport; import java.util.List; import static org.mockito.Mockito.*; public class ListenersLostOnResetMockTest { @Test public void listener() throws Exception ...
// You are a professional Java test case writer, please create a test case named `listener` for the issue `Mockito-282`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-282 // // ## Issue-Title: // Exception when stubbing more than once with when...thenTh...
23
27
13
test/org/mockitousage/bugs/ListenersLostOnResetMockTest.java
test
```markdown ## Issue-ID: Mockito-282 ## Issue-Title: Exception when stubbing more than once with when...thenThrow ## Issue-Description: If I create a mock and stub a method so it throws an exception and do that twice the first exception will be thrown upon invoking the second stub instruction. Example: ``` @Te...
13
[ "org.mockito.internal.util.MockUtil" ]
b74e7e68b70d1da61135a8f91daf1b25cbfa79d32ded35fa5a793db61280f82d
@Test public void listener() throws Exception
// You are a professional Java test case writer, please create a test case named `listener` for the issue `Mockito-282`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-282 // // ## Issue-Title: // Exception when stubbing more than once with when...thenTh...
Mockito
package org.mockitousage.bugs; import org.junit.Test; import org.mockito.listeners.InvocationListener; import org.mockito.listeners.MethodInvocationReport; import java.util.List; import static org.mockito.Mockito.*; public class ListenersLostOnResetMockTest { @Test public void listener() throws Exception ...
@Test public void createsFormData() { String html = "<form><input name='one' value='two'><select name='three'><option value='not'>" + "<option value='four' selected><option value='five' selected><textarea name=six>seven</textarea>" + "<input name='seven' type='radio' value='o...
org.jsoup.nodes.FormElementTest::createsFormData
src/test/java/org/jsoup/nodes/FormElementTest.java
48
src/test/java/org/jsoup/nodes/FormElementTest.java
createsFormData
package org.jsoup.nodes; import org.jsoup.Connection; import org.jsoup.Jsoup; import org.junit.Test; import java.util.List; import static org.junit.Assert.*; /** * Tests for FormElement * * @author Jonathan Hedley */ public class FormElementTest { @Test public void hasAssociatedControls() { //"butto...
// You are a professional Java test case writer, please create a test case named `createsFormData` for the issue `Jsoup-1231`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1231 // // ## Issue-Title: // <input type="image"> is not special cased in formDat...
48
93
26
src/test/java/org/jsoup/nodes/FormElementTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-1231 ## Issue-Title: <input type="image"> is not special cased in formData method ## Issue-Description: The following code: ``` import org.jsoup.Jsoup; import org.jsoup.nodes.FormElement; class Scratch { public static void main(String[] args) { System.out.println(((For...
26
[ "org.jsoup.nodes.FormElement" ]
b7e5f4016bf4f09f8f361eaf3f693083dad381b9a96cf70d3ab701e6ab0132d6
@Test public void createsFormData()
// You are a professional Java test case writer, please create a test case named `createsFormData` for the issue `Jsoup-1231`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1231 // // ## Issue-Title: // <input type="image"> is not special cased in formDat...
Jsoup
package org.jsoup.nodes; import org.jsoup.Connection; import org.jsoup.Jsoup; import org.junit.Test; import java.util.List; import static org.junit.Assert.*; /** * Tests for FormElement * * @author Jonathan Hedley */ public class FormElementTest { @Test public void hasAssociatedControls() { //"butto...
public void testSuspiciousBlockCommentWarning3() { parse("/* \n *@type {number} */ var x = 3;", SUSPICIOUS_COMMENT_WARNING); }
com.google.javascript.jscomp.parsing.ParserTest::testSuspiciousBlockCommentWarning3
test/com/google/javascript/jscomp/parsing/ParserTest.java
695
test/com/google/javascript/jscomp/parsing/ParserTest.java
testSuspiciousBlockCommentWarning3
/* * 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 `testSuspiciousBlockCommentWarning3` for the issue `Closure-1037`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1037 // // ## Issue-Title: // Inconsistent handling of non-...
695
122
693
test/com/google/javascript/jscomp/parsing/ParserTest.java
test
```markdown ## Issue-ID: Closure-1037 ## Issue-Title: Inconsistent handling of non-JSDoc comments ## Issue-Description: **What steps will reproduce the problem?** **1.** **2.** **3.** **What is the expected output? What do you see instead?** When given: /\* @preserve Foo License \*/ alert("foo"); It spit...
693
[ "com.google.javascript.jscomp.parsing.IRFactory" ]
b7f731abbcea67c4e478eeb04ce33cedf1668427321c1d6b8022a8529117edcd
public void testSuspiciousBlockCommentWarning3()
// You are a professional Java test case writer, please create a test case named `testSuspiciousBlockCommentWarning3` for the issue `Closure-1037`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1037 // // ## Issue-Title: // Inconsistent handling of non-...
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 testArrayEquals() { assertFalse(MathUtils.equals(new double[] { 1d }, null)); assertFalse(MathUtils.equals(null, new double[] { 1d })); assertTrue(MathUtils.equals((double[]) null, (double[]) null)); assertFalse(MathUtils.equals(new double[] { 1d }, new double[0])); ...
org.apache.commons.math.util.MathUtilsTest::testArrayEquals
src/test/java/org/apache/commons/math/util/MathUtilsTest.java
462
src/test/java/org/apache/commons/math/util/MathUtilsTest.java
testArrayEquals
/* * 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 n...
// You are a professional Java test case writer, please create a test case named `testArrayEquals` for the issue `Math-MATH-370`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-370 // // ## Issue-Title: // NaN in "equals" methods // // ## Issue-Descri...
462
/** * @deprecated To be removed in release 3.0 (replaced by {@link * #testArrayEqualsIncludingNaN()}. */
63
441
src/test/java/org/apache/commons/math/util/MathUtilsTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-370 ## Issue-Title: NaN in "equals" methods ## Issue-Description: In "MathUtils", some "equals" methods will return true if both argument are NaN. Unless I'm mistaken, this contradicts the IEEE standard. If nobody objects, I'm going to make the changes. ``` You are a p...
441
[ "org.apache.commons.math.util.MathUtils" ]
b89ebd6fd1f0c0fe05c5dc4eb681591ac08ef76fdd4660f02448d4aad816ec04
public void testArrayEquals()
// You are a professional Java test case writer, please create a test case named `testArrayEquals` for the issue `Math-MATH-370`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-370 // // ## Issue-Title: // NaN in "equals" methods // // ## Issue-Descri...
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 n...
public void testUnfinishedEntity() { NumericEntityUnescaper neu = new NumericEntityUnescaper(); String input = "Test &#x30 not test"; String expected = "Test \u0030 not test"; String result = neu.translate(input); assertEquals("Failed to support unfinished entities (i.e. mis...
org.apache.commons.lang3.text.translate.NumericEntityUnescaperTest::testUnfinishedEntity
src/test/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaperTest.java
52
src/test/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaperTest.java
testUnfinishedEntity
/* * 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 `testUnfinishedEntity` for the issue `Lang-LANG-710`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-710 // // ## Issue-Title: // StringIndexOutOfBoundsException when call...
52
19
45
src/test/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaperTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-710 ## Issue-Title: StringIndexOutOfBoundsException when calling unescapeHtml4("&#03") ## Issue-Description: When calling unescapeHtml4() on the String "&#03" (or any String that contains these characters) an Exception is thrown: Exception in thread "main" java.lang.StringIndex...
45
[ "org.apache.commons.lang3.text.translate.NumericEntityUnescaper" ]
b8b415f4986b4fe3f5e39b6a0877dcffe3799435c3bdf4691ad02995cb233ba5
public void testUnfinishedEntity()
// You are a professional Java test case writer, please create a test case named `testUnfinishedEntity` for the issue `Lang-LANG-710`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-710 // // ## Issue-Title: // StringIndexOutOfBoundsException when call...
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 ...
@Test public void TestLang747() { assertEquals(Integer.valueOf(0x8000), NumberUtils.createNumber("0x8000")); assertEquals(Integer.valueOf(0x80000), NumberUtils.createNumber("0x80000")); assertEquals(Integer.valueOf(0x800000), NumberUtils.createNumber("0x800000")); ass...
org.apache.commons.lang3.math.NumberUtilsTest::TestLang747
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
283
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
TestLang747
/* * 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 `TestLang747` for the issue `Lang-LANG-747`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-747 // // ## Issue-Title: // NumberUtils does not handle Long Hex numbers // /...
283
1
248
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-747 ## Issue-Title: NumberUtils does not handle Long Hex numbers ## Issue-Description: NumberUtils.createLong() does not handle hex numbers, but createInteger() handles hex and octal. This seems odd. NumberUtils.createNumber() assumes that hex numbers can only be Integer. ...
248
[ "org.apache.commons.lang3.math.NumberUtils" ]
b8dcad25f49707ad1b320847f699f2853b233291eddec5793615df39006587aa
@Test public void TestLang747()
// You are a professional Java test case writer, please create a test case named `TestLang747` for the issue `Lang-LANG-747`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-747 // // ## Issue-Title: // NumberUtils does not handle Long Hex numbers // /...
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 testLendsAnnotation3() { testSame("/** @constructor */ function F() {}" + "dojo.declare(F, /** @lends {F.prototype} */ (" + " {foo: function() { return this.foo; }}));"); }
com.google.javascript.jscomp.CheckGlobalThisTest::testLendsAnnotation3
test/com/google/javascript/jscomp/CheckGlobalThisTest.java
238
test/com/google/javascript/jscomp/CheckGlobalThisTest.java
testLendsAnnotation3
/* * 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 `testLendsAnnotation3` for the issue `Closure-248`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-248 // // ## Issue-Title: // support @lends annotation // // ## Issue-Des...
238
91
234
test/com/google/javascript/jscomp/CheckGlobalThisTest.java
test
```markdown ## Issue-ID: Closure-248 ## Issue-Title: support @lends annotation ## Issue-Description: Some javascript toolkits (dojo, base, etc.) have a special way of declaring (what java calls) classes, for example in dojo: dojo.declare("MyClass", [superClass1, superClass2], { foo: function(){ ... } bar: ...
234
[ "com.google.javascript.jscomp.CheckGlobalThis" ]
b950b4be3c4afb59ea7f08ab3996ed594b7facbecec94f8c2483bc0b05ff466d
public void testLendsAnnotation3()
// You are a professional Java test case writer, please create a test case named `testLendsAnnotation3` for the issue `Closure-248`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-248 // // ## Issue-Title: // support @lends annotation // // ## Issue-Des...
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 testFoldBitShifts() { fold("x = 1 << 0", "x = 1"); fold("x = -1 << 0", "x = -1"); fold("x = 1 << 1", "x = 2"); fold("x = 3 << 1", "x = 6"); fold("x = 1 << 8", "x = 256"); fold("x = 1 >> 0", "x = 1"); fold("x = -1 >> 0", "x = -1"); fold("x = 1 >> 1", "x = 0"); fold("x =...
com.google.javascript.jscomp.PeepholeFoldConstantsTest::testFoldBitShifts
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
287
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
testFoldBitShifts
/* * Copyright 2004 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 `testFoldBitShifts` for the issue `Closure-200`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-200 // // ## Issue-Title: // Unsigned Shift Right (>>>) bug operating on nega...
287
97
239
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
test
```markdown ## Issue-ID: Closure-200 ## Issue-Title: Unsigned Shift Right (>>>) bug operating on negative numbers ## Issue-Description: **What steps will reproduce the problem?** i = -1 >>> 0 ; **What is the expected output? What do you see instead?** Expected: i = -1 >>> 0 ; // or // i = 4294967295 ; Instead: ...
239
[ "com.google.javascript.jscomp.PeepholeFoldConstants" ]
ba57a90e4e9b07697922e19e1de6d6e31eadd98d906d54a46f6cf5a0e8531f41
public void testFoldBitShifts()
// You are a professional Java test case writer, please create a test case named `testFoldBitShifts` for the issue `Closure-200`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-200 // // ## Issue-Title: // Unsigned Shift Right (>>>) bug operating on nega...
Closure
/* * Copyright 2004 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 handlesKnownEmptyBlocks() { // if a known tag, allow self closing outside of spec, but force an end tag. unknown tags can be self closing. String h = "<div id='1' /><script src='/foo' /><div id=2><img /><img></div><a id=3 /><i /><foo /><foo>One</foo> <hr /> hr text <hr> hr text two...
org.jsoup.parser.HtmlParserTest::handlesKnownEmptyBlocks
src/test/java/org/jsoup/parser/HtmlParserTest.java
331
src/test/java/org/jsoup/parser/HtmlParserTest.java
handlesKnownEmptyBlocks
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.nodes.*; import org.jsoup.select.Elements; import org.junit.Test; import java.util.List; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import sta...
// You are a professional Java test case writer, please create a test case named `handlesKnownEmptyBlocks` for the issue `Jsoup-305`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-305 // // ## Issue-Title: // Self-closing script tag causes remainder of do...
331
33
326
src/test/java/org/jsoup/parser/HtmlParserTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-305 ## Issue-Title: Self-closing script tag causes remainder of document to be html-escaped. ## Issue-Description: When a self-closing script block is encountered it appears that the state transitions do not account for the closing tag, so the rest of the document is considered to be ...
326
[ "org.jsoup.parser.HtmlTreeBuilder" ]
baa973bc8cf2d383b6320f2caf89e7b7a4f5954ed1f395b4f013bfd75b4e8395
@Test public void handlesKnownEmptyBlocks()
// You are a professional Java test case writer, please create a test case named `handlesKnownEmptyBlocks` for the issue `Jsoup-305`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-305 // // ## Issue-Title: // Self-closing script tag causes remainder of do...
Jsoup
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.nodes.*; import org.jsoup.select.Elements; import org.junit.Test; import java.util.List; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import sta...
@Test public void testMath864() { final CMAESOptimizer optimizer = new CMAESOptimizer(); final MultivariateFunction fitnessFunction = new MultivariateFunction() { @Override public double value(double[] parameters) { final double target = 1; ...
org.apache.commons.math3.optimization.direct.CMAESOptimizerTest::testMath864
src/test/java/org/apache/commons/math3/optimization/direct/CMAESOptimizerTest.java
401
src/test/java/org/apache/commons/math3/optimization/direct/CMAESOptimizerTest.java
testMath864
/* * 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 `testMath864` for the issue `Math-MATH-864`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-864 // // ## Issue-Title: // CMAESOptimizer does not enforce bounds // // ## I...
401
// } // 1e-10, 1e-4, 1000000, expected); // GoalType.MINIMIZE, LAMBDA, false, 1, 1e-13, // doTest(new Rosen(), startPoint, insigma, boundaries, // new PointValuePair(point(DIM,1.0),0.0); // PointValuePair expected = // double[][] boundaries = null...
20
382
src/test/java/org/apache/commons/math3/optimization/direct/CMAESOptimizerTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-864 ## Issue-Title: CMAESOptimizer does not enforce bounds ## Issue-Description: The CMAESOptimizer can exceed the bounds passed to optimize. Looking at the generationLoop in doOptimize(), it does a bounds check by calling isFeasible() but if checkFeasableCount is zero (the defau...
382
[ "org.apache.commons.math3.optimization.direct.CMAESOptimizer" ]
bcc3bde3a6903cad91ecda2023d882ad73e6195695655bdd38398de5dd48056a
@Test public void testMath864()
// You are a professional Java test case writer, please create a test case named `testMath864` for the issue `Math-MATH-864`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-864 // // ## Issue-Title: // CMAESOptimizer does not enforce bounds // // ## I...
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 testIssue631() { final UnivariateRealFunction f = new UnivariateRealFunction() { @Override public double value(double x) { return Math.exp(x) - Math.pow(Math.PI, 3.0); } }; final UnivariateRealSolv...
org.apache.commons.math.analysis.solvers.RegulaFalsiSolverTest::testIssue631
src/test/java/org/apache/commons/math/analysis/solvers/RegulaFalsiSolverTest.java
54
src/test/java/org/apache/commons/math/analysis/solvers/RegulaFalsiSolverTest.java
testIssue631
/* * 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 `testIssue631` for the issue `Math-MATH-631`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-631 // // ## Issue-Title: // "RegulaFalsiSolver" failure // // ## Issue-Descr...
54
51
42
src/test/java/org/apache/commons/math/analysis/solvers/RegulaFalsiSolverTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-631 ## Issue-Title: "RegulaFalsiSolver" failure ## Issue-Description: The following unit test: ``` @Test public void testBug() { final UnivariateRealFunction f = new UnivariateRealFunction() { @Override public double value(double x) { ...
42
[ "org.apache.commons.math.analysis.solvers.BaseSecantSolver" ]
bcdfc6d99123654a690cb2e2a55d42b1d948338ce720150f75ec7709951eed87
@Test public void testIssue631()
// You are a professional Java test case writer, please create a test case named `testIssue631` for the issue `Math-MATH-631`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-631 // // ## Issue-Title: // "RegulaFalsiSolver" failure // // ## Issue-Descr...
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 testReducedFactory_int_int() { Fraction f = null; // zero f = Fraction.getReducedFraction(0, 1); assertEquals(0, f.getNumerator()); assertEquals(1, f.getDenominator()); // normal f = Fraction.getReducedFraction(1, 1); asse...
org.apache.commons.lang3.math.FractionTest::testReducedFactory_int_int
src/test/java/org/apache/commons/lang3/math/FractionTest.java
337
src/test/java/org/apache/commons/lang3/math/FractionTest.java
testReducedFactory_int_int
/* * 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 `testReducedFactory_int_int` for the issue `Lang-LANG-662`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-662 // // ## Issue-Title: // org.apache.commons.lang3.math.Fract...
337
22
249
src/test/java/org/apache/commons/lang3/math/FractionTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-662 ## Issue-Title: org.apache.commons.lang3.math.Fraction does not reduce (Integer.MIN_VALUE, 2^k) ## Issue-Description: The greatestCommonDivisor method in class Fraction does not find the gcd of Integer.MIN\_VALUE and 2^k, and this case can be triggered by taking Integer.MIN\_...
249
[ "org.apache.commons.lang3.math.Fraction" ]
bdb7d5eed32a3133919fdeebbaa0e393fb3787de236c722b69fd7cb21dcf2f5d
public void testReducedFactory_int_int()
// You are a professional Java test case writer, please create a test case named `testReducedFactory_int_int` for the issue `Lang-LANG-662`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-662 // // ## Issue-Title: // org.apache.commons.lang3.math.Fract...
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 ...
public void testBug545() { testLocal("var a = {}", ""); testLocal("var a; a = {}", "true"); }
com.google.javascript.jscomp.InlineObjectLiteralsTest::testBug545
test/com/google/javascript/jscomp/InlineObjectLiteralsTest.java
361
test/com/google/javascript/jscomp/InlineObjectLiteralsTest.java
testBug545
/* * Copyright 2011 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 `testBug545` for the issue `Closure-545`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-545 // // ## Issue-Title: // compiler-20110811 crashes with index(1) must be less th...
361
53
358
test/com/google/javascript/jscomp/InlineObjectLiteralsTest.java
test
```markdown ## Issue-ID: Closure-545 ## Issue-Title: compiler-20110811 crashes with index(1) must be less than size(1) ## Issue-Description: **What steps will reproduce the problem?** Run compiler on https://raw.github.com/scottschiller/SoundManager2/master/script/soundmanager2-nodebug.js You can copy this into ...
358
[ "com.google.javascript.jscomp.InlineObjectLiterals" ]
be1ae31ec9f9616b9c4924c6cd511324dc84c58b620a99f05e2494b61bca10a9
public void testBug545()
// You are a professional Java test case writer, please create a test case named `testBug545` for the issue `Closure-545`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-545 // // ## Issue-Title: // compiler-20110811 crashes with index(1) must be less th...
Closure
/* * Copyright 2011 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 testPcts() { f.addValue(oneL); f.addValue(twoL); f.addValue(oneI); f.addValue(twoI); f.addValue(threeL); f.addValue(threeL); f.addValue(3); f.addValue(threeI); assertEquals("one pct",0.25,f.getPct(1),tolerance); assertEquals...
org.apache.commons.math.stat.FrequencyTest::testPcts
src/test/java/org/apache/commons/math/stat/FrequencyTest.java
157
src/test/java/org/apache/commons/math/stat/FrequencyTest.java
testPcts
/* * 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 `testPcts` for the issue `Math-MATH-329`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-329 // // ## Issue-Title: // In stat.Frequency, getPct(Object) uses getCumPct(Comp...
157
/** test pcts */
75
134
src/test/java/org/apache/commons/math/stat/FrequencyTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-329 ## Issue-Title: In stat.Frequency, getPct(Object) uses getCumPct(Comparable) instead of getPct(Comparable) ## Issue-Description: Drop in Replacement of 1.2 with 2.0 not possible because all getPct calls will be cummulative without code change Frequency.java /\*\* * Ret...
134
[ "org.apache.commons.math.stat.Frequency" ]
bef4a7f689fd026b79e3035271ebef442ac6f329258045d95e58c4bd594e8fff
public void testPcts()
// You are a professional Java test case writer, please create a test case named `testPcts` for the issue `Math-MATH-329`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-329 // // ## Issue-Title: // In stat.Frequency, getPct(Object) uses getCumPct(Comp...
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 testNullRecordSeparatorCsv106() { final CSVFormat format = CSVFormat.newFormat(';').withSkipHeaderRecord(true).withHeader("H1", "H2"); final String formatStr = format.format("A", "B"); assertNotNull(formatStr); assertFalse(formatStr.endsWith("null")); }
org.apache.commons.csv.CSVFormatTest::testNullRecordSeparatorCsv106
src/test/java/org/apache/commons/csv/CSVFormatTest.java
237
src/test/java/org/apache/commons/csv/CSVFormatTest.java
testNullRecordSeparatorCsv106
/* * 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 `testNullRecordSeparatorCsv106` for the issue `Csv-CSV-106`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-106 // // ## Issue-Title: // CSVFormat.format allways append null...
237
5
231
src/test/java/org/apache/commons/csv/CSVFormatTest.java
src/test/java
```markdown ## Issue-ID: Csv-CSV-106 ## Issue-Title: CSVFormat.format allways append null ## Issue-Description: When I now call CSVFormat.newFormat(';').withSkipHeaderRecord(true).withHeader("H1","H2").format("A","B") I get the output A;Bnull The expected output would be A;B ``` You are a professi...
231
[ "org.apache.commons.csv.CSVPrinter" ]
bf8df287b147dae0836de0a9bf911689ae0382100d79db0611263b5205e0a508
@Test public void testNullRecordSeparatorCsv106()
// You are a professional Java test case writer, please create a test case named `testNullRecordSeparatorCsv106` for the issue `Csv-CSV-106`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-106 // // ## Issue-Title: // CSVFormat.format allways append null...
Csv
/* * 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 testCachedSerialize() throws IOException { ObjectMapper mapper = new ObjectMapper(); String json = aposToQuotes("{'data':{'1st':'onedata','2nd':'twodata'}}"); // Do deserialization with non-annotated map property NonAnnotatedMapHolderClass ignored = mapper.readValue(json...
com.fasterxml.jackson.databind.deser.jdk.MapDeserializerCachingTest::testCachedSerialize
src/test/java/com/fasterxml/jackson/databind/deser/jdk/MapDeserializerCachingTest.java
50
src/test/java/com/fasterxml/jackson/databind/deser/jdk/MapDeserializerCachingTest.java
testCachedSerialize
package com.fasterxml.jackson.databind.deser.jdk; import java.io.IOException; import java.util.Map; import java.util.TreeMap; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; // for [databind#1807] public class MapDeserializerCachingTest extends BaseMapTest {...
// You are a professional Java test case writer, please create a test case named `testCachedSerialize` for the issue `JacksonDatabind-1809`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1809 // // ## Issue-Title: // 2.9.2 deserialization regres...
50
/* /********************************************************** /* Test methods /********************************************************** */
91
34
src/test/java/com/fasterxml/jackson/databind/deser/jdk/MapDeserializerCachingTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1809 ## Issue-Title: 2.9.2 deserialization regression ## Issue-Description: There seems to be a regression in the latest 2.9.2 release. Using `org.apache.logging.log4j.core.jackson.Log4jJsonObjectMapper` from `org.apache.logging.log4j:log4j-core:2.9.1` to deserialize the a...
34
[ "com.fasterxml.jackson.databind.deser.DeserializerCache" ]
bfb1f372aadf7e86746626a23d11f3c18a3d7de375039a8c18bc95fed4582261
public void testCachedSerialize() throws IOException
// You are a professional Java test case writer, please create a test case named `testCachedSerialize` for the issue `JacksonDatabind-1809`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1809 // // ## Issue-Title: // 2.9.2 deserialization regres...
JacksonDatabind
package com.fasterxml.jackson.databind.deser.jdk; import java.io.IOException; import java.util.Map; import java.util.TreeMap; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; // for [databind#1807] public class MapDeserializerCachingTest extends BaseMapTest {...
public void testSimple() throws Exception { Company comp = new Company(); comp.addComputer(new DesktopComputer("computer-1", "Bangkok")); comp.addComputer(new DesktopComputer("computer-2", "Pattaya")); comp.addComputer(new LaptopComputer("computer-3", "Apple")); final Ob...
com.fasterxml.jackson.databind.jsontype.WrapperObjectWithObjectIdTest::testSimple
src/test/java/com/fasterxml/jackson/databind/jsontype/WrapperObjectWithObjectIdTest.java
86
src/test/java/com/fasterxml/jackson/databind/jsontype/WrapperObjectWithObjectIdTest.java
testSimple
package com.fasterxml.jackson.databind.jsontype; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; // Test for [databind#1051], issue with combination of Type and Object ids, // if (but only if) `JsonTypeInfo.As.WRAPPER_OBJECT` used. public class WrapperObjectWi...
// You are a professional Java test case writer, please create a test case named `testSimple` for the issue `JacksonDatabind-1051`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1051 // // ## Issue-Title: // Problem with Object Id and Type Id as...
86
35
68
src/test/java/com/fasterxml/jackson/databind/jsontype/WrapperObjectWithObjectIdTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1051 ## Issue-Title: Problem with Object Id and Type Id as Wrapper Object (regression in 2.5.1) ## Issue-Description: (note: originally from [FasterXML/jackson-module-jaxb-annotations#51](https://github.com/FasterXML/jackson-module-jaxb-annotations/issues/51)) Looks like f...
68
[ "com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeDeserializer" ]
bfbaf1d311e89d6b4b5aaeada3c085a58ca573eabfc70a0126b10b2fda9b31d6
public void testSimple() throws Exception
// You are a professional Java test case writer, please create a test case named `testSimple` for the issue `JacksonDatabind-1051`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1051 // // ## Issue-Title: // Problem with Object Id and Type Id as...
JacksonDatabind
package com.fasterxml.jackson.databind.jsontype; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; // Test for [databind#1051], issue with combination of Type and Object ids, // if (but only if) `JsonTypeInfo.As.WRAPPER_OBJECT` used. public class WrapperObjectWi...
public void testQualifiedNameInference5() throws Exception { testTypes( "var ns = {}; " + "(function() { " + " /** @param {number} x */ ns.foo = function(x) {}; })();" + "(function() { ns.foo(true); })();", "actual parameter 1 of ns.foo does not match formal parameter\n"...
com.google.javascript.jscomp.TypeCheckTest::testQualifiedNameInference5
test/com/google/javascript/jscomp/TypeCheckTest.java
4,768
test/com/google/javascript/jscomp/TypeCheckTest.java
testQualifiedNameInference5
/* * 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 `testQualifiedNameInference5` for the issue `Closure-66`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-66 // // ## Issue-Title: // Use @public tag to prevent compression o...
4,768
95
4,759
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-66 ## Issue-Title: Use @public tag to prevent compression of symbol names ## Issue-Description: Given this input code: Glow = {}; /\*\* @public \*/ Glow.versions = [1,2,3]; Glow.showVersions = function() { alert(Glow.versions); } // exports window['Glow'] = Glow; Gl...
4,759
[ "com.google.javascript.jscomp.TypedScopeCreator" ]
bfbc014ab602774cd83c579202481870308a0394fb51d73b045b46e5a5638157
public void testQualifiedNameInference5() throws Exception
// You are a professional Java test case writer, please create a test case named `testQualifiedNameInference5` for the issue `Closure-66`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-66 // // ## Issue-Title: // Use @public tag to prevent compression o...
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 testBase64Text() throws Exception { // let's actually iterate over sets of encoding modes, lengths final int[] LENS = { 1, 2, 3, 4, 7, 9, 32, 33, 34, 35 }; final Base64Variant[] VARIANTS = { Base64Variants.MIME, Base64Variants.MIME_NO_...
com.fasterxml.jackson.databind.node.TestConversions::testBase64Text
src/test/java/com/fasterxml/jackson/databind/node/TestConversions.java
195
src/test/java/com/fasterxml/jackson/databind/node/TestConversions.java
testBase64Text
package com.fasterxml.jackson.databind.node; import java.io.IOException; import java.math.BigDecimal; import java.util.*; import static org.junit.Assert.*; import org.junit.Assert; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.type.Writa...
// You are a professional Java test case writer, please create a test case named `testBase64Text` for the issue `JacksonDatabind-2096`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2096 // // ## Issue-Title: // TreeTraversingParser does not tak...
195
100
154
src/test/java/com/fasterxml/jackson/databind/node/TestConversions.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-2096 ## Issue-Title: TreeTraversingParser does not take base64 variant into account ## Issue-Description: This affects at least 2.6.4 to current versions. In [TreeTraversingParser#getBinaryValue](https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fas...
154
[ "com.fasterxml.jackson.databind.node.TreeTraversingParser" ]
c0e9d9ffff9045a778ddb3fb22b5e908fdb6155b60b82042ddb3c2b6060ecd22
public void testBase64Text() throws Exception
// You are a professional Java test case writer, please create a test case named `testBase64Text` for the issue `JacksonDatabind-2096`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2096 // // ## Issue-Title: // TreeTraversingParser does not tak...
JacksonDatabind
package com.fasterxml.jackson.databind.node; import java.io.IOException; import java.math.BigDecimal; import java.util.*; import static org.junit.Assert.*; import org.junit.Assert; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.type.Writa...
public void testAddNonComparable(){ try { f.addValue(new Object()); // This was previously OK fail("Expected IllegalArgumentException"); } catch (IllegalArgumentException expected) { } f.clear(); f.addValue(1); try { f.addValue(new ...
org.apache.commons.math.stat.FrequencyTest::testAddNonComparable
src/test/org/apache/commons/math/stat/FrequencyTest.java
205
src/test/org/apache/commons/math/stat/FrequencyTest.java
testAddNonComparable
/* * 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 `testAddNonComparable` for the issue `Math-MATH-259`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-259 // // ## Issue-Title: // Bugs in Frequency API // // ## Issue-Des...
205
// Check what happens when non-Comparable objects are added
89
192
src/test/org/apache/commons/math/stat/FrequencyTest.java
src/test
```markdown ## Issue-ID: Math-MATH-259 ## Issue-Title: Bugs in Frequency API ## Issue-Description: I think the existing Frequency API has some bugs in it. The addValue(Object v) method allows one to add a plain Object, but one cannot add anything further to the instance, as the second add fails with IllegalArgum...
192
[ "org.apache.commons.math.stat.Frequency" ]
c1014e9d24b10cdd8cbb06333502a5ada785f563208a505df2fc455c44800ddb
public void testAddNonComparable()
// You are a professional Java test case writer, please create a test case named `testAddNonComparable` for the issue `Math-MATH-259`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-259 // // ## Issue-Title: // Bugs in Frequency API // // ## Issue-Des...
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 testIssue669() throws Exception { testTypes( "/** @return {{prop1: (Object|undefined)}} */" + "function f(a) {" + " var results;" + " if (a) {" + " results = {};" + " results.prop1 = {a: 3};" + " } else {" + " results =...
com.google.javascript.jscomp.TypeCheckTest::testIssue669
test/com/google/javascript/jscomp/TypeCheckTest.java
5,632
test/com/google/javascript/jscomp/TypeCheckTest.java
testIssue669
/* * 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 `testIssue669` for the issue `Closure-669`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-669 // // ## Issue-Title: // assignment to object in conditional causes type error...
5,632
35
5,619
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-669 ## Issue-Title: assignment to object in conditional causes type error on function w/ record type return type ## Issue-Description: slightly dodgy code :) /\*\* @returns {{prop1: (Object|undefined), prop2: (string|undefined), prop3: (string|undefined)}} \*/ function func(a, b...
5,619
[ "com.google.javascript.jscomp.TypeInference" ]
c529612217861f4eb83f8bcb1ba9db4bea48b1f6646f7aa3bf394ebfe4a7a831
public void testIssue669() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue669` for the issue `Closure-669`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-669 // // ## Issue-Title: // assignment to object in conditional causes type error...
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 booleanAttributeOutput() { Document doc = Jsoup.parse("<img src=foo noshade='' nohref async=async autofocus=false>"); Element img = doc.selectFirst("img"); assertEquals("<img src=\"foo\" noshade nohref async autofocus=\"false\">", img.outerHtml()); }
org.jsoup.nodes.ElementTest::booleanAttributeOutput
src/test/java/org/jsoup/nodes/ElementTest.java
1,318
src/test/java/org/jsoup/nodes/ElementTest.java
booleanAttributeOutput
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 `booleanAttributeOutput` for the issue `Jsoup-985`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-985 // // ## Issue-Title: // Regression - Boolean attributes not collapsed w...
1,318
75
1,312
src/test/java/org/jsoup/nodes/ElementTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-985 ## Issue-Title: Regression - Boolean attributes not collapsed when using HTML syntax ## Issue-Description: Hello, First off, thanks for a really useful library. So, upgrading from 1.10.2 to 1.11.2 we see that boolean attributes are no longer collapsed when using html syntax. E...
1,312
[ "org.jsoup.nodes.Attributes" ]
c5a4296fb5f4cee7c90beb49b086ba7eaf2d542541fd9ae66e973edd8b204bd7
@Test public void booleanAttributeOutput()
// You are a professional Java test case writer, please create a test case named `booleanAttributeOutput` for the issue `Jsoup-985`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-985 // // ## Issue-Title: // Regression - Boolean attributes not collapsed w...
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 testStripLeadingHyphens() { assertEquals("f", Util.stripLeadingHyphens("-f")); assertEquals("foo", Util.stripLeadingHyphens("--foo")); assertNull(Util.stripLeadingHyphens(null)); }
org.apache.commons.cli.UtilTest::testStripLeadingHyphens
src/test/org/apache/commons/cli/UtilTest.java
28
src/test/org/apache/commons/cli/UtilTest.java
testStripLeadingHyphens
/** * 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 `testStripLeadingHyphens` for the issue `Cli-CLI-133`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-133 // // ## Issue-Title: // NullPointerException in Util.stripLeadingH...
28
5
24
src/test/org/apache/commons/cli/UtilTest.java
src/test
```markdown ## Issue-ID: Cli-CLI-133 ## Issue-Title: NullPointerException in Util.stripLeadingHyphens when passed a null argument ## Issue-Description: If you try to do a hasOption(null), you get a NPE: java.lang.NullPointerException at org.apache.commons.cli.Util.stripLeadingHyphens(Util.java:39) at org...
24
[ "org.apache.commons.cli.Util" ]
c628185c3bba25b047ad02452b4ad8e6a437ca429dbe508e4e728882fc6c2e78
public void testStripLeadingHyphens()
// You are a professional Java test case writer, please create a test case named `testStripLeadingHyphens` for the issue `Cli-CLI-133`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-133 // // ## Issue-Title: // NullPointerException in Util.stripLeadingH...
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 createsStructureFromBodySnippet() { // the bar baz stuff naturally goes into the body, but the 'foo' goes into root, and the normalisation routine // needs to move into the start of the body String html = "foo <b>bar</b> baz"; Document doc = Jsoup.parse(html); ...
org.jsoup.parser.ParserTest::createsStructureFromBodySnippet
src/test/java/org/jsoup/parser/ParserTest.java
111
src/test/java/org/jsoup/parser/ParserTest.java
createsStructureFromBodySnippet
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.nodes.Comment; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.TextNode; import org.jsoup.select.Elements; import org.junit.Test; import java.util.List; import static org.junit.Assert...
// You are a professional Java test case writer, please create a test case named `createsStructureFromBodySnippet` for the issue `Jsoup-23`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-23 // // ## Issue-Title: // Parsing a HTML snippet causes the leadin...
111
1
104
src/test/java/org/jsoup/parser/ParserTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-23 ## Issue-Title: Parsing a HTML snippet causes the leading text to be moved to back ## Issue-Description: Code: ``` String html = "foo <b>bar</b> baz"; String text = Jsoup.parse(html).text(); System.out.println(text); ``` Result: ``` bar baz foo ``` Expected: ``` foo ba...
104
[ "org.jsoup.nodes.Document" ]
c6c5b2bfaed87ec8c03c60f3eb2ca4defe4b0a4c97b71e3ab614100f7fe2ba69
@Test public void createsStructureFromBodySnippet()
// You are a professional Java test case writer, please create a test case named `createsStructureFromBodySnippet` for the issue `Jsoup-23`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-23 // // ## Issue-Title: // Parsing a HTML snippet causes the leadin...
Jsoup
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.nodes.Comment; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.TextNode; import org.jsoup.select.Elements; import org.junit.Test; import java.util.List; import static org.junit.Assert...
public void testNullColumn() throws Exception { assertEquals("[null,\"bar\"]", MAPPER.writeValueAsString(new TwoStringsBean())); }
com.fasterxml.jackson.databind.struct.TestPOJOAsArray::testNullColumn
src/test/java/com/fasterxml/jackson/databind/struct/TestPOJOAsArray.java
151
src/test/java/com/fasterxml/jackson/databind/struct/TestPOJOAsArray.java
testNullColumn
package com.fasterxml.jackson.databind.struct; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonFormat.Shape; import com.fasterxml.jackson.databind.BaseMapTest; import com.fasterxml.jackson.databind.ObjectMapper;...
// You are a professional Java test case writer, please create a test case named `testNullColumn` for the issue `JacksonDatabind-223`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-223 // // ## Issue-Title: // NULL values are duplicated when ser...
151
// [Issue#223]
1
148
src/test/java/com/fasterxml/jackson/databind/struct/TestPOJOAsArray.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-223 ## Issue-Title: NULL values are duplicated when serializing as array [via @JsonFormat(shape = JsonFormat.Shape.ARRAY)] ## Issue-Description: Example: ``` public class TestOuter { @JsonFormat(shape = JsonFormat.Shape.ARRAY) public ArrayList<TestInner> array; ...
148
[ "com.fasterxml.jackson.databind.ser.BeanPropertyWriter" ]
c728f79e60ad3c073c0e6ce0ffad02c99442a6e84e27c193206c8dbce2d6222a
public void testNullColumn() throws Exception
// You are a professional Java test case writer, please create a test case named `testNullColumn` for the issue `JacksonDatabind-223`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-223 // // ## Issue-Title: // NULL values are duplicated when ser...
JacksonDatabind
package com.fasterxml.jackson.databind.struct; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonFormat.Shape; import com.fasterxml.jackson.databind.BaseMapTest; import com.fasterxml.jackson.databind.ObjectMapper;...
public void testEquals() { final CharSequence fooCs = FOO, barCs = BAR, foobarCs = FOOBAR; assertTrue(StringUtils.equals(null, null)); assertTrue(StringUtils.equals(fooCs, fooCs)); assertTrue(StringUtils.equals(fooCs, (CharSequence) new StringBuilder(FOO))); assertTrue(String...
org.apache.commons.lang3.StringUtilsEqualsIndexOfTest::testEquals
src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
499
src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
testEquals
/* * 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 `testEquals` for the issue `Lang-LANG-786`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-786 // // ## Issue-Title: // StringUtils equals() relies on undefined behavior /...
499
14
485
src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-786 ## Issue-Title: StringUtils equals() relies on undefined behavior ## Issue-Description: Since the java.lang.CharSequence class was first introduced in 1.4, the JavaDoc block has contained the following note: > > This interface does not refine the general contracts of the ...
485
[ "org.apache.commons.lang3.StringUtils" ]
c95b66f01336543c46e7d369c0f6bb05a0847a34aa47953da18676abe7bec7e8
public void testEquals()
// You are a professional Java test case writer, please create a test case named `testEquals` for the issue `Lang-LANG-786`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-786 // // ## Issue-Title: // StringUtils equals() relies on undefined behavior /...
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 testLANG807() { try { RandomStringUtils.random(3,5,5,false,false); fail("Expected IllegalArgumentException"); } catch (IllegalArgumentException ex) { // distinguish from Random#nextInt message final String msg = ex.getMessage(); assertTrue(...
org.apache.commons.lang3.RandomStringUtilsTest::testLANG807
src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java
141
src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java
testLANG807
/* * 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 `testLANG807` for the issue `Lang-LANG-807`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-807 // // ## Issue-Title: // RandomStringUtils throws confusing IAE when end <=...
141
11
132
src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-807 ## Issue-Title: RandomStringUtils throws confusing IAE when end <= start ## Issue-Description: RandomUtils invokes Random#nextInt![](/jira/images/icons/emoticons/thumbs_down.png) where n = end - start. If end <= start, then Random throws: java.lang.IllegalArgumentExceptio...
132
[ "org.apache.commons.lang3.RandomStringUtils" ]
c9b6544df2483679f6bdc02e3ff61da029bbeb90cd920ed9bf117107040d4d8d
public void testLANG807()
// You are a professional Java test case writer, please create a test case named `testLANG807` for the issue `Lang-LANG-807`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-807 // // ## Issue-Title: // RandomStringUtils throws confusing IAE when end <=...
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 ...
@Test public void testSupportsNonAsciiTags() { String body = "<進捗推移グラフ>Yes</進捗推移グラフ>"; Document doc = Jsoup.parse(body); Elements els = doc.select("進捗推移グラフ"); assertEquals("Yes", els.text()); }
org.jsoup.parser.HtmlParserTest::testSupportsNonAsciiTags
src/test/java/org/jsoup/parser/HtmlParserTest.java
891
src/test/java/org/jsoup/parser/HtmlParserTest.java
testSupportsNonAsciiTags
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 `testSupportsNonAsciiTags` for the issue `Jsoup-667`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-667 // // ## Issue-Title: // Problem in reading XML file containing Japane...
891
51
886
src/test/java/org/jsoup/parser/HtmlParserTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-667 ## Issue-Title: Problem in reading XML file containing Japanese tag names ## Issue-Description: Hello, I have XML file containing Japanese tag names and values. JSOUP is not parsing this Japanese tags. I am using JSOUP library (version: 1.8.3). Please help me to solve ...
886
[ "org.jsoup.parser.CharacterReader" ]
ca92fc18b70c4df8007396a1c02f3b8e1c9ca9184313adcca7f6fd168292ded3
@Test public void testSupportsNonAsciiTags()
// You are a professional Java test case writer, please create a test case named `testSupportsNonAsciiTags` for the issue `Jsoup-667`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-667 // // ## Issue-Title: // Problem in reading XML file containing Japane...
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...
public void testUnquotedIssue510() throws Exception { // NOTE! Requires longer input buffer to trigger longer codepath char[] fullChars = new char[4001]; for (int i = 0; i < 3998; i++) { fullChars[i] = ' '; } fullChars[3998] = '{'; fullChars[3999] = '...
com.fasterxml.jackson.core.read.NonStandardUnquotedNamesTest::testUnquotedIssue510
src/test/java/com/fasterxml/jackson/core/read/NonStandardUnquotedNamesTest.java
54
src/test/java/com/fasterxml/jackson/core/read/NonStandardUnquotedNamesTest.java
testUnquotedIssue510
package com.fasterxml.jackson.core.read; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; public class NonStandardUnquotedNamesTest extends com.fasterxml.jackson.core.Base...
// You are a professional Java test case writer, please create a test case named `testUnquotedIssue510` for the issue `JacksonCore-510`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-510 // // ## Issue-Title: // Fix ArrayIndexOutofBoundsException fo...
54
// [core#510]: ArrayIndexOutOfBounds
25
34
src/test/java/com/fasterxml/jackson/core/read/NonStandardUnquotedNamesTest.java
src/test/java
```markdown ## Issue-ID: JacksonCore-510 ## Issue-Title: Fix ArrayIndexOutofBoundsException found by LGTM.com ## Issue-Description: First of all, thank you for reporting this. But would it be possible to write a test that shows how this actually works? It would be great to have a regression test, to guard against...
34
[ "com.fasterxml.jackson.core.json.ReaderBasedJsonParser" ]
caa3a9ad98b7c62056981b8c42b3f1cc71633ba24267573c74baade4295da0d2
public void testUnquotedIssue510() throws Exception
// You are a professional Java test case writer, please create a test case named `testUnquotedIssue510` for the issue `JacksonCore-510`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-510 // // ## Issue-Title: // Fix ArrayIndexOutofBoundsException fo...
JacksonCore
package com.fasterxml.jackson.core.read; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; public class NonStandardUnquotedNamesTest extends com.fasterxml.jackson.core.Base...
@Test public void escapesGtInXmlAttributesButNotInHtml() { // https://github.com/jhy/jsoup/issues/528 - < is OK in HTML attribute values, but not in XML String docHtml = "<a title='<p>One</p>'>One</a>"; Document doc = Jsoup.parse(docHtml); Element element = doc.select("a").first();...
org.jsoup.nodes.EntitiesTest::escapesGtInXmlAttributesButNotInHtml
src/test/java/org/jsoup/nodes/EntitiesTest.java
102
src/test/java/org/jsoup/nodes/EntitiesTest.java
escapesGtInXmlAttributesButNotInHtml
package org.jsoup.nodes; import org.jsoup.Jsoup; import org.junit.Test; import static org.jsoup.nodes.Document.OutputSettings; import static org.jsoup.nodes.Entities.EscapeMode.*; import static org.junit.Assert.*; public class EntitiesTest { @Test public void escape() { String text = "Hello &<> Å å π 新 ...
// You are a professional Java test case writer, please create a test case named `escapesGtInXmlAttributesButNotInHtml` for the issue `Jsoup-528`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-528 // // ## Issue-Title: // Jsoup not retaining &lt in data a...
102
47
89
src/test/java/org/jsoup/nodes/EntitiesTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-528 ## Issue-Title: Jsoup not retaining &lt in data attributes ## Issue-Description: Jsoup not retaining &lt in data attributes value if there is < In the example below &lt; is converted to < in the output after parsing. Please let me know how to retain it. Example: <http:/...
89
[ "org.jsoup.nodes.Entities" ]
cb9f0d0abcd2987c6fe1545bc142032dbbc6e0685503ba66252edc49c7cbc60c
@Test public void escapesGtInXmlAttributesButNotInHtml()
// You are a professional Java test case writer, please create a test case named `escapesGtInXmlAttributesButNotInHtml` for the issue `Jsoup-528`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-528 // // ## Issue-Title: // Jsoup not retaining &lt in data a...
Jsoup
package org.jsoup.nodes; import org.jsoup.Jsoup; import org.junit.Test; import static org.jsoup.nodes.Document.OutputSettings; import static org.jsoup.nodes.Entities.EscapeMode.*; import static org.junit.Assert.*; public class EntitiesTest { @Test public void escape() { String text = "Hello &<> Å å π 新 ...
@Test(expected=MathIllegalStateException.class) public void testMath844() { final double[] y = { 0, 1, 2, 3, 2, 1, 0, -1, -2, -3, -2, -1, 0, 1, 2, 3, 2, 1, 0, -1, -2, -3, -2, -1, 0, 1, 2, ...
org.apache.commons.math3.optimization.fitting.HarmonicFitterTest::testMath844
src/test/java/org/apache/commons/math3/optimization/fitting/HarmonicFitterTest.java
202
src/test/java/org/apache/commons/math3/optimization/fitting/HarmonicFitterTest.java
testMath844
// 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 `testMath844` for the issue `Math-MATH-844`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-844 // // ## Issue-Title: // "HarmonicFitter.ParameterGuesser" sometimes fails ...
202
25
180
src/test/java/org/apache/commons/math3/optimization/fitting/HarmonicFitterTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-844 ## Issue-Title: "HarmonicFitter.ParameterGuesser" sometimes fails to return sensible values ## Issue-Description: The inner class "ParameterGuesser" in "HarmonicFitter" (package "o.a.c.m.optimization.fitting") fails to compute a usable guess for the "amplitude" parameter. ...
180
[ "org.apache.commons.math3.optimization.fitting.HarmonicFitter" ]
cba02968c7549104e746d48388ee23ad0e5eed4a58f0215849474d2c476eec67
@Test(expected=MathIllegalStateException.class) public void testMath844()
// You are a professional Java test case writer, please create a test case named `testMath844` for the issue `Math-MATH-844`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-844 // // ## Issue-Title: // "HarmonicFitter.ParameterGuesser" sometimes fails ...
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 testDuplicateLocalVarDecl() throws Exception { testClosureTypesMultipleWarnings( "/** @param {number} x */\n" + "function f(x) { /** @type {string} */ var x = ''; }", Lists.newArrayList( "variable x redefined with type string, original definition" + " at...
com.google.javascript.jscomp.LooseTypeCheckTest::testDuplicateLocalVarDecl
test/com/google/javascript/jscomp/LooseTypeCheckTest.java
1,978
test/com/google/javascript/jscomp/LooseTypeCheckTest.java
testDuplicateLocalVarDecl
/* * 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 `testDuplicateLocalVarDecl` for the issue `Closure-433`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-433 // // ## Issue-Title: // unexpected typed coverage of less than 1...
1,978
70
1,968
test/com/google/javascript/jscomp/LooseTypeCheckTest.java
test
```markdown ## Issue-ID: Closure-433 ## Issue-Title: unexpected typed coverage of less than 100% ## Issue-Description: **What steps will reproduce the problem?** 1. Create JavaScript file: /\*global window\*/ /\*jslint sub: true\*/ /\*\* \* @constructor \* @param {!Element} element \*/ function Example(el...
1,968
[ "com.google.javascript.jscomp.TypedScopeCreator" ]
cc0f9880d46ec30a413a7a2d03422c97d69462fec5790e14c92c75732ef741f7
public void testDuplicateLocalVarDecl() throws Exception
// You are a professional Java test case writer, please create a test case named `testDuplicateLocalVarDecl` for the issue `Closure-433`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-433 // // ## Issue-Title: // unexpected typed coverage of less than 1...
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 testIssue301() throws Exception { testTypes( "Array.indexOf = function() {};" + "var s = 'hello';" + "alert(s.toLowerCase.indexOf('1'));", "Property indexOf never defined on String.prototype.toLowerCase"); }
com.google.javascript.jscomp.TypeCheckTest::testIssue301
test/com/google/javascript/jscomp/TypeCheckTest.java
4,959
test/com/google/javascript/jscomp/TypeCheckTest.java
testIssue301
/* * 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 `testIssue301` for the issue `Closure-301`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-301 // // ## Issue-Title: // .indexOf fails to produce missing property warning //...
4,959
82
4,953
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-301 ## Issue-Title: .indexOf fails to produce missing property warning ## Issue-Description: The following code compiled with VERBOSE warnings or with the missingProperties check enabled fails to produce a warning or error: var s = new String("hello"); alert(s.toLowerCase.indexO...
4,953
[ "com.google.javascript.rhino.jstype.JSType" ]
cc3e6d8c7bbd4f82a926ffc07365debb13126a924c10d1d06bb63138a247ccdb
public void testIssue301() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue301` for the issue `Closure-301`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-301 // // ## Issue-Title: // .indexOf fails to produce missing property warning //...
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 testCharset() { assertEquals("utf-8", DataUtil.getCharsetFromContentType("text/html;charset=utf-8 ")); assertEquals("UTF-8", DataUtil.getCharsetFromContentType("text/html; charset=UTF-8")); assertEquals("ISO-8859-1", DataUtil.getCharsetFromContentType("text/html; charse...
org.jsoup.helper.DataUtilTest::testCharset
src/test/java/org/jsoup/helper/DataUtilTest.java
20
src/test/java/org/jsoup/helper/DataUtilTest.java
testCharset
package org.jsoup.helper; import static org.junit.Assert.assertEquals; import org.jsoup.nodes.Document; import org.jsoup.parser.Parser; import org.junit.Test; import java.nio.ByteBuffer; import java.nio.charset.Charset; public class DataUtilTest { @Test public void testCharset() { assertEquals("utf-...
// You are a professional Java test case writer, please create a test case named `testCharset` for the issue `Jsoup-215`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-215 // // ## Issue-Title: // Invalid HTTP-Response header leads to exception // // ## ...
20
27
12
src/test/java/org/jsoup/helper/DataUtilTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-215 ## Issue-Title: Invalid HTTP-Response header leads to exception ## Issue-Description: In particular case a HTTP-Webpage responses with a invalid HTTP-Charset field (delivered UFT8 instead of UTF8). This leads to an UnsupportedCharsetException in org.jsoup.helper.DataUtil at aro...
12
[ "org.jsoup.helper.DataUtil" ]
cc618dae9ddf90773344b171ba3c9c5d4ac9b9e4fad0841a5f14bcafb7950d29
@Test public void testCharset()
// You are a professional Java test case writer, please create a test case named `testCharset` for the issue `Jsoup-215`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-215 // // ## Issue-Title: // Invalid HTTP-Response header leads to exception // // ## ...
Jsoup
package org.jsoup.helper; import static org.junit.Assert.assertEquals; import org.jsoup.nodes.Document; import org.jsoup.parser.Parser; import org.junit.Test; import java.nio.ByteBuffer; import java.nio.charset.Charset; public class DataUtilTest { @Test public void testCharset() { assertEquals("utf-...
public void testWithDeserializationProblemHandler() throws Exception { final ObjectMapper mapper = new ObjectMapper() .enableDefaultTyping(); mapper.addHandler(new DeserializationProblemHandler() { @Override public JavaType handleUnknownTypeId(DeserializationC...
com.fasterxml.jackson.databind.deser.filter.ProblemHandlerUnknownTypeId2221Test::testWithDeserializationProblemHandler
src/test/java/com/fasterxml/jackson/databind/deser/filter/ProblemHandlerUnknownTypeId2221Test.java
97
src/test/java/com/fasterxml/jackson/databind/deser/filter/ProblemHandlerUnknownTypeId2221Test.java
testWithDeserializationProblemHandler
package com.fasterxml.jackson.databind.deser.filter; import java.io.*; import java.util.Collection; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.databind.*; import c...
// You are a professional Java test case writer, please create a test case named `testWithDeserializationProblemHandler` for the issue `JacksonDatabind-2221`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2221 // // ## Issue-Title: // Deserializ...
97
107
84
src/test/java/com/fasterxml/jackson/databind/deser/filter/ProblemHandlerUnknownTypeId2221Test.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-2221 ## Issue-Title: DeserializationProblemHandler.handleUnknownTypeId() returning Void.class, enableDefaultTyping causing NPE ## Issue-Description: Returning Void.class from com.fasterxml.jackson.databind.deser.HandleUnknowTypeIdTest.testDeserializationWithDeserializationPr...
84
[ "com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase" ]
cc6d6bdc2c05fd084102759cc7f456e31f5c00aa22936e3966c385082a2619ab
public void testWithDeserializationProblemHandler() throws Exception
// You are a professional Java test case writer, please create a test case named `testWithDeserializationProblemHandler` for the issue `JacksonDatabind-2221`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2221 // // ## Issue-Title: // Deserializ...
JacksonDatabind
package com.fasterxml.jackson.databind.deser.filter; import java.io.*; import java.util.Collection; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.databind.*; import c...
public void testIgnoreGetterNotSetter1595() throws Exception { ObjectMapper mapper = new ObjectMapper(); Simple1595 config = new Simple1595(); config.setId(123); config.setName("jack"); String json = mapper.writeValueAsString(config); assertEquals(aposToQuotes("{'...
com.fasterxml.jackson.databind.filter.IgnorePropertyOnDeserTest::testIgnoreGetterNotSetter1595
src/test/java/com/fasterxml/jackson/databind/filter/IgnorePropertyOnDeserTest.java
89
src/test/java/com/fasterxml/jackson/databind/filter/IgnorePropertyOnDeserTest.java
testIgnoreGetterNotSetter1595
package com.fasterxml.jackson.databind.filter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.databind.BaseMapTest; import com.fasterxml.jackson.databind.ObjectMapper; public class IgnorePropertyOnDeserTest extends ...
// You are a professional Java test case writer, please create a test case named `testIgnoreGetterNotSetter1595` for the issue `JacksonDatabind-1595`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1595 // // ## Issue-Title: // JsonIgnoreProperti...
89
// [databind#1595]
82
79
src/test/java/com/fasterxml/jackson/databind/filter/IgnorePropertyOnDeserTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1595 ## Issue-Title: JsonIgnoreProperties.allowSetters is not working in Jackson 2.8 ## Issue-Description: ``` @JsonIgnoreProperties(value = { "password" }, ignoreUnknown = true, allowSetters = true) public class JsonTest { private String username; private String password...
79
[ "com.fasterxml.jackson.databind.deser.BeanDeserializerFactory" ]
cc7a9b3ff29da22edd6bc4efd38bac5de505774421bc5049f4d6a3d461412c02
public void testIgnoreGetterNotSetter1595() throws Exception
// You are a professional Java test case writer, please create a test case named `testIgnoreGetterNotSetter1595` for the issue `JacksonDatabind-1595`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1595 // // ## Issue-Title: // JsonIgnoreProperti...
JacksonDatabind
package com.fasterxml.jackson.databind.filter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.databind.BaseMapTest; import com.fasterxml.jackson.databind.ObjectMapper; public class IgnorePropertyOnDeserTest extends ...
public void testIssue787() { CompilerOptions options = createCompilerOptions(); CompilationLevel level = CompilationLevel.SIMPLE_OPTIMIZATIONS; level.setOptionsForCompilationLevel(options); WarningLevel warnings = WarningLevel.DEFAULT; warnings.setOptionsForWarningLevel(options); String code ...
com.google.javascript.jscomp.IntegrationTest::testIssue787
test/com/google/javascript/jscomp/IntegrationTest.java
2,262
test/com/google/javascript/jscomp/IntegrationTest.java
testIssue787
/* * 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 `testIssue787` for the issue `Closure-787`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-787 // // ## Issue-Title: // true/false are not always replaced for !0/!1 // // #...
2,262
13
2,216
test/com/google/javascript/jscomp/IntegrationTest.java
test
```markdown ## Issue-ID: Closure-787 ## Issue-Title: true/false are not always replaced for !0/!1 ## Issue-Description: **What steps will reproduce the problem?** function some\_function() { var fn1; var fn2; if (any\_expression) { fn2 = external\_ref; fn1 = function (content) { return fn2(); } ...
2,216
[ "com.google.javascript.jscomp.PeepholeOptimizationsPass" ]
cd636ac8677e221ec6a8dffe5bd314e9509094dc60927a3181cb25670e332bf9
public void testIssue787()
// You are a professional Java test case writer, please create a test case named `testIssue787` for the issue `Closure-787`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-787 // // ## Issue-Title: // true/false are not always replaced for !0/!1 // // #...
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 testSimpleNumbers() throws Exception { final StringBuilder sb = new StringBuilder(); MAPPER.acceptJsonFormatVisitor(Numbers.class, new JsonFormatVisitorWrapper.Base() { @Override public JsonObjectFormatVisitor expectObjectFormat(final ...
com.fasterxml.jackson.databind.jsonschema.NewSchemaTest::testSimpleNumbers
src/test/java/com/fasterxml/jackson/databind/jsonschema/NewSchemaTest.java
205
src/test/java/com/fasterxml/jackson/databind/jsonschema/NewSchemaTest.java
testSimpleNumbers
package com.fasterxml.jackson.databind.jsonschema; import java.math.BigDecimal; import java.math.BigInteger; import java.util.*; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParser.NumberType; import com.fasterxml.j...
// You are a professional Java test case writer, please create a test case named `testSimpleNumbers` for the issue `JacksonDatabind-1045`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1045 // // ## Issue-Title: // Regression in 2.7.0-rc2, for s...
205
// [databind#1045], regression wrt BigDecimal
34
138
src/test/java/com/fasterxml/jackson/databind/jsonschema/NewSchemaTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1045 ## Issue-Title: Regression in 2.7.0-rc2, for schema/introspection for BigDecimal ## Issue-Description: (found via Avro module, but surprisingly json schema module has not test to catch it) Looks like schema type for `BigDecimal` is not correctly produced, due to an er...
138
[ "com.fasterxml.jackson.databind.ser.std.NumberSerializer" ]
cdc52201bdaf4ebc5354dfddebf515d262345fa23d644a0a4a58be51e3c2ed16
public void testSimpleNumbers() throws Exception
// You are a professional Java test case writer, please create a test case named `testSimpleNumbers` for the issue `JacksonDatabind-1045`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1045 // // ## Issue-Title: // Regression in 2.7.0-rc2, for s...
JacksonDatabind
package com.fasterxml.jackson.databind.jsonschema; import java.math.BigDecimal; import java.math.BigInteger; import java.util.*; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParser.NumberType; import com.fasterxml.j...
public void testIssue821() { foldSame("var a =(Math.random()>0.5? '1' : 2 ) + 3 + 4;"); foldSame("var a = ((Math.random() ? 0 : 1) ||" + "(Math.random()>0.5? '1' : 2 )) + 3 + 4;"); }
com.google.javascript.jscomp.PeepholeFoldConstantsTest::testIssue821
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
583
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
testIssue821
/* * 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 `testIssue821` for the issue `Closure-821`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-821 // // ## Issue-Title: // Wrong code generated if mixing types in ternary opera...
583
10
579
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
test
```markdown ## Issue-ID: Closure-821 ## Issue-Title: Wrong code generated if mixing types in ternary operator ## Issue-Description: **What steps will reproduce the problem?** 1. Use Google Closure Compiler to compile this code: var a =(Math.random()>0.5? '1' : 2 ) + 3 + 4; You can either simple or advanced. ...
579
[ "com.google.javascript.jscomp.NodeUtil" ]
cdd903b1f34b6ae0172ef7cb4b8f7642c2f520c66d48c9062a1c3fc70c30da8e
public void testIssue821()
// You are a professional Java test case writer, please create a test case named `testIssue821` for the issue `Closure-821`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-821 // // ## Issue-Title: // Wrong code generated if mixing types in ternary opera...
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 testElementSiblingIndexSameContent() { Document doc = Jsoup.parse("<div><p>One</p>...<p>One</p>...<p>One</p>"); Elements ps = doc.select("p"); assertTrue(0 == ps.get(0).elementSiblingIndex()); assertTrue(1 == ps.get(1).elementSiblingIndex()); assertTrue(2 ==...
org.jsoup.nodes.ElementTest::testElementSiblingIndexSameContent
src/test/java/org/jsoup/nodes/ElementTest.java
157
src/test/java/org/jsoup/nodes/ElementTest.java
testElementSiblingIndexSameContent
package org.jsoup.nodes; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.parser.Tag; import org.jsoup.select.Elements; import org.junit.Test; import static org.junit.Assert.*; import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; im...
// You are a professional Java test case writer, please create a test case named `testElementSiblingIndexSameContent` for the issue `Jsoup-554`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-554 // // ## Issue-Title: // Unexpected behavior in elementSibli...
157
43
151
src/test/java/org/jsoup/nodes/ElementTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-554 ## Issue-Title: Unexpected behavior in elementSiblingIndex ## Issue-Description: The documentation for elementSiblingIndex states "Get the list index of this element in its element sibling list. I.e. if this is the first element sibling, returns 0". This would imply that if `...
151
[ "org.jsoup.nodes.Element" ]
cf74c190d338428dbedb4c78d95ca9f4bcdf1984bee267d61ca62f31c9d2c312
@Test public void testElementSiblingIndexSameContent()
// You are a professional Java test case writer, please create a test case named `testElementSiblingIndexSameContent` for the issue `Jsoup-554`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-554 // // ## Issue-Title: // Unexpected behavior in elementSibli...
Jsoup
package org.jsoup.nodes; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.parser.Tag; import org.jsoup.select.Elements; import org.junit.Test; import static org.junit.Assert.*; import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; im...
public void testIssue522() { testSame("[][1] = 1;"); }
com.google.javascript.jscomp.PeepholeFoldConstantsTest::testIssue522
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
927
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
testIssue522
/* * 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 `testIssue522` for the issue `Closure-522`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-522 // // ## Issue-Title: // peephole constants folding pass is trying to fold [][...
927
161
925
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
test
```markdown ## Issue-ID: Closure-522 ## Issue-Title: peephole constants folding pass is trying to fold [][11] as if it were a property lookup instead of a property assignment ## Issue-Description: **What steps will reproduce the problem?** 1.Try on line CC with Advance 2.On the following 2-line code **3.** **What...
925
[ "com.google.javascript.jscomp.PeepholeFoldConstants" ]
cf79b0f45567d0dac31983a3d73d79de28eeed7bc9506f2c4e30f301489dd678
public void testIssue522()
// You are a professional Java test case writer, please create a test case named `testIssue522` for the issue `Closure-522`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-522 // // ## Issue-Title: // peephole constants folding pass is trying to fold [][...
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 testIssue423() { test( "(function($) {\n" + " $.fn.multicheck = function(options) {\n" + " initialize.call(this, options);\n" + " };\n" + "\n" + " function initialize(options) {\n" + " options.checkboxes = $(this).siblings(':checkbox');\...
com.google.javascript.jscomp.InlineFunctionsTest::testIssue423
test/com/google/javascript/jscomp/InlineFunctionsTest.java
1,692
test/com/google/javascript/jscomp/InlineFunctionsTest.java
testIssue423
/* * Copyright 2008 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 `testIssue423` for the issue `Closure-423`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-423 // // ## Issue-Title: // Closure Compiler failed to translate all instances of...
1,692
159
1,666
test/com/google/javascript/jscomp/InlineFunctionsTest.java
test
```markdown ## Issue-ID: Closure-423 ## Issue-Title: Closure Compiler failed to translate all instances of a function name ## Issue-Description: **What steps will reproduce the problem?** 1. Compile the attached jQuery Multicheck plugin using SIMPLE optimization. **What is the expected output? What do you see in...
1,666
[ "com.google.javascript.jscomp.InlineFunctions" ]
cf809dc1411772c0d5424cd13a09a2db1e0b32307a91a5bc4bc947cfe7c83dac
public void testIssue423()
// You are a professional Java test case writer, please create a test case named `testIssue423` for the issue `Closure-423`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-423 // // ## Issue-Title: // Closure Compiler failed to translate all instances of...
Closure
/* * Copyright 2008 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 testInfiniteLoop() { HelpFormatter formatter = new HelpFormatter(); formatter.setWidth(20); formatter.printHelp("app", options); // used to hang & crash }
org.apache.commons.cli.bug.BugCLI162Test::testInfiniteLoop
src/test/org/apache/commons/cli/bug/BugCLI162Test.java
45
src/test/org/apache/commons/cli/bug/BugCLI162Test.java
testInfiniteLoop
/* * 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 `testInfiniteLoop` 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 code of HelpFormatt...
45
23
41
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...
41
[ "org.apache.commons.cli.HelpFormatter" ]
d09fc3c5c2797149241ab2728d0e6b666d94448ddeaccb6ec3d6a25ceeee4965
public void testInfiniteLoop()
// You are a professional Java test case writer, please create a test case named `testInfiniteLoop` 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 code of HelpFormatt...
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 testExceptNoNewLine() throws Exception { assertEquals("foo2:first line", provider.getSourceLine("foo2", 1)); assertEquals("foo2:second line", provider.getSourceLine("foo2", 2)); assertEquals("foo2:third line", provider.getSourceLine("foo2", 3)); assertEquals(null, provider.getSourceLine("f...
com.google.javascript.jscomp.JSCompilerSourceExcerptProviderTest::testExceptNoNewLine
test/com/google/javascript/jscomp/JSCompilerSourceExcerptProviderTest.java
68
test/com/google/javascript/jscomp/JSCompilerSourceExcerptProviderTest.java
testExceptNoNewLine
/* * 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 `testExceptNoNewLine` for the issue `Closure-511`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-511 // // ## Issue-Title: // Last warning or error in output is truncated /...
68
56
63
test/com/google/javascript/jscomp/JSCompilerSourceExcerptProviderTest.java
test
```markdown ## Issue-ID: Closure-511 ## Issue-Title: Last warning or error in output is truncated ## Issue-Description: The last error or warning statement written to the output appears to be getting truncated. It's causing a problem for my error / warning parser. To reproduce, create a file called test.js and a...
63
[ "com.google.javascript.jscomp.SourceFile" ]
d0aac51ee96afccaf8ced74cfa5179fd85f8631f460c3ca1d304877e728ce036
public void testExceptNoNewLine() throws Exception
// You are a professional Java test case writer, please create a test case named `testExceptNoNewLine` for the issue `Closure-511`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-511 // // ## Issue-Title: // Last warning or error in output is truncated /...
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...
@Test public void testCOMPRESS335() throws Exception { final ArchiveInputStream tar = getStreamFor("COMPRESS-335.tar"); assertNotNull(tar); assertTrue(tar instanceof TarArchiveInputStream); }
org.apache.commons.compress.DetectArchiverTestCase::testCOMPRESS335
src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java
62
src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java
testCOMPRESS335
/* * 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 `testCOMPRESS335` for the issue `Compress-COMPRESS-335`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-335 // // ## Issue-Title: // TAR checksum fails when checks...
62
35
57
src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-335 ## Issue-Title: TAR checksum fails when checksum is right aligned ## Issue-Description: The linked TAR has a checksum with zero padding on the left instead of the expected NULL-SPACE terminator on the right. As a result the last two digits of the stored checksum are l...
57
[ "org.apache.commons.compress.archivers.tar.TarUtils" ]
d14a17cecd0574444c928158a483c2667610e59ca3930d756359503c99a013dc
@Test public void testCOMPRESS335() throws Exception
// You are a professional Java test case writer, please create a test case named `testCOMPRESS335` for the issue `Compress-COMPRESS-335`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-335 // // ## Issue-Title: // TAR checksum fails when checks...
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 testUnwrappedAsPropertyIndicator() throws Exception { Inner inner = new Inner(); inner.animal = "Zebra"; Outer outer = new Outer(); outer.inner = inner; String actual = MAPPER.writeValueAsString(outer); assertTrue(actual.contains("animal")); ...
com.fasterxml.jackson.databind.struct.TestUnwrapped::testUnwrappedAsPropertyIndicator
src/test/java/com/fasterxml/jackson/databind/struct/TestUnwrapped.java
193
src/test/java/com/fasterxml/jackson/databind/struct/TestUnwrapped.java
testUnwrappedAsPropertyIndicator
package com.fasterxml.jackson.databind.struct; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; /** * Unit tests for verifying that basic {@link JsonUnwrapped} annotation * handling works as expected; some more advanced tests are separated out * to more specific test classes (li...
// You are a professional Java test case writer, please create a test case named `testUnwrappedAsPropertyIndicator` for the issue `JacksonDatabind-1013`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1013 // // ## Issue-Title: // @JsonUnwrapped ...
193
33
180
src/test/java/com/fasterxml/jackson/databind/struct/TestUnwrapped.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1013 ## Issue-Title: @JsonUnwrapped is not treated as assuming @JsonProperty("") ## Issue-Description: See discussion [here](https://groups.google.com/forum/#!topic/jackson-user/QLpWb8YzIoE) but basically `@JsonUnwrapped` on a private field by itself does not cause that fiel...
180
[ "com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector" ]
d15c65e65a4ddeef657af3684ca7cd6d8240e4c858f5b25ec2c7204a856f3752
public void testUnwrappedAsPropertyIndicator() throws Exception
// You are a professional Java test case writer, please create a test case named `testUnwrappedAsPropertyIndicator` for the issue `JacksonDatabind-1013`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1013 // // ## Issue-Title: // @JsonUnwrapped ...
JacksonDatabind
package com.fasterxml.jackson.databind.struct; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; /** * Unit tests for verifying that basic {@link JsonUnwrapped} annotation * handling works as expected; some more advanced tests are separated out * to more specific test classes (li...
public void testJira567(){ Number[] n; // Valid array construction n = ArrayUtils.addAll(new Number[]{Integer.valueOf(1)}, new Long[]{Long.valueOf(2)}); assertEquals(2,n.length); assertEquals(Number.class,n.getClass().getComponentType()); try { // Invalid ...
org.apache.commons.lang3.ArrayUtilsAddTest::testJira567
src/test/org/apache/commons/lang3/ArrayUtilsAddTest.java
43
src/test/org/apache/commons/lang3/ArrayUtilsAddTest.java
testJira567
/* * 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 `testJira567` for the issue `Lang-LANG-567`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-567 // // ## Issue-Title: // ArrayUtils.addAll(T[] array1, T... array2) does no...
43
37
31
src/test/org/apache/commons/lang3/ArrayUtilsAddTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-567 ## Issue-Title: ArrayUtils.addAll(T[] array1, T... array2) does not handle mixed types very well ## Issue-Description: ArrayUtils.addAll(T[] array1, T... array2) does not handle mixed array types very well. The stack trace for Number[] st = ArrayUtils.addAll(new Integer[...
31
[ "org.apache.commons.lang3.ArrayUtils" ]
d26df486d2f301eb72b0e7163db9da1f3860db2f6f4fd09fef700ffa902cecc6
public void testJira567()
// You are a professional Java test case writer, please create a test case named `testJira567` for the issue `Lang-LANG-567`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-567 // // ## Issue-Title: // ArrayUtils.addAll(T[] array1, T... array2) does no...
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 ...
@Test public void absHandlesRelativeQuery() { Document doc = Jsoup.parse("<a href='?foo'>One</a> <a href='bar.html?foo'>Two</a>", "http://jsoup.org/path/file?bar"); Element a1 = doc.select("a").first(); assertEquals("http://jsoup.org/path/file?foo", a1.absUrl("href")); Element a2 =...
org.jsoup.nodes.NodeTest::absHandlesRelativeQuery
src/test/java/org/jsoup/nodes/NodeTest.java
52
src/test/java/org/jsoup/nodes/NodeTest.java
absHandlesRelativeQuery
package org.jsoup.nodes; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.parser.Tag; import org.junit.Test; import static org.junit.Assert.*; /** Tests Nodes @author Jonathan Hedley, jonathan@hedley.net */ public class NodeTest { @Test public void handlesBaseUri() { Tag tag = Tag.va...
// You are a professional Java test case writer, please create a test case named `absHandlesRelativeQuery` for the issue `Jsoup-49`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-49 // // ## Issue-Title: // attr("abs:href") , absUrl("href") // // ## Issu...
52
/* Test for an issue with Java's abs URL handler. */
10
44
src/test/java/org/jsoup/nodes/NodeTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-49 ## Issue-Title: attr("abs:href") , absUrl("href") ## Issue-Description: Document doc = Jsoup.parse(new URL("<http://www.oschina.net/bbs/thread/12975>"), 5\*1000); Elements es = doc.select("a[href]"); for(Iterator it = es.iterator();it.hasNext();){ Element e = it.next(); ...
44
[ "org.jsoup.nodes.Node" ]
d2bfbc7dee53fa8f21e3ac6ee9c27d9b420c9fe9eb25fd15fad41ca393b5c076
@Test public void absHandlesRelativeQuery()
// You are a professional Java test case writer, please create a test case named `absHandlesRelativeQuery` for the issue `Jsoup-49`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-49 // // ## Issue-Title: // attr("abs:href") , absUrl("href") // // ## Issu...
Jsoup
package org.jsoup.nodes; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.parser.Tag; import org.junit.Test; import static org.junit.Assert.*; /** Tests Nodes @author Jonathan Hedley, jonathan@hedley.net */ public class NodeTest { @Test public void handlesBaseUri() { Tag tag = Tag.va...
@Test public void testConstrainedRosenWithMoreInterpolationPoints() { final double[] startPoint = point(DIM, 0.1); final double[][] boundaries = boundaries(DIM, -1, 2); final RealPointValuePair expected = new RealPointValuePair(point(DIM, 1.0), 0.0); // This should have been 78 ...
org.apache.commons.math.optimization.direct.BOBYQAOptimizerTest::testConstrainedRosenWithMoreInterpolationPoints
src/test/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizerTest.java
261
src/test/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizerTest.java
testConstrainedRosenWithMoreInterpolationPoints
/* * 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 `testConstrainedRosenWithMoreInterpolationPoints` for the issue `Math-MATH-728`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-728 // // ## Issue-Title: // Errors in BOBY...
261
// See MATH-728
38
240
src/test/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizerTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-728 ## Issue-Title: Errors in BOBYQAOptimizer when numberOfInterpolationPoints is greater than 2*dim+1 ## Issue-Description: I've been having trouble getting BOBYQA to minimize a function (actually a non-linear least squares fit) so as one change I increased the number of interpo...
240
[ "org.apache.commons.math.optimization.direct.BOBYQAOptimizer" ]
d301af613de1198c85f614ed521961393b671b3cc8ad87d4b9b0867825e77088
@Test public void testConstrainedRosenWithMoreInterpolationPoints()
// You are a professional Java test case writer, please create a test case named `testConstrainedRosenWithMoreInterpolationPoints` for the issue `Math-MATH-728`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-728 // // ## Issue-Title: // Errors in BOBY...
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 testCpioUnarchive() throws Exception { final File output = new File(dir, "bla.cpio"); { final File file1 = getFile("test1.xml"); final File file2 = getFile("test2.xml"); final OutputStream out = new FileOutputStream(output); final ArchiveO...
org.apache.commons.compress.archivers.CpioTestCase::testCpioUnarchive
src/test/java/org/apache/commons/compress/archivers/CpioTestCase.java
101
src/test/java/org/apache/commons/compress/archivers/CpioTestCase.java
testCpioUnarchive
/* * 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 `testCpioUnarchive` for the issue `Compress-COMPRESS-28`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-28 // // ## Issue-Title: // CPIO reports unexpected EOF //...
101
1
53
src/test/java/org/apache/commons/compress/archivers/CpioTestCase.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-28 ## Issue-Title: CPIO reports unexpected EOF ## Issue-Description: When unpacking an CPIO archive (made with the compress classes or even made with OSX cpio comandline tool) an EOF exception is thrown. Here is the testcode: final File input = getFile("cmdcreated.c...
53
[ "org.apache.commons.compress.archivers.cpio.CpioArchiveOutputStream" ]
d426dcc571af2c18ce763609715ac0063cdd0048db0eb84485fa1df76c3ae3ea
public void testCpioUnarchive() throws Exception
// You are a professional Java test case writer, please create a test case named `testCpioUnarchive` for the issue `Compress-COMPRESS-28`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-28 // // ## Issue-Title: // CPIO reports unexpected EOF //...
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 test2947660() { AbstractCategoryItemRenderer r = new LineAndShapeRenderer(); assertNotNull(r.getLegendItems()); assertEquals(0, r.getLegendItems().getItemCount()); DefaultCategoryDataset dataset = new DefaultCategoryDataset(); CategoryPlot plot = new CategoryPlot...
org.jfree.chart.renderer.category.junit.AbstractCategoryItemRendererTests::test2947660
tests/org/jfree/chart/renderer/category/junit/AbstractCategoryItemRendererTests.java
410
tests/org/jfree/chart/renderer/category/junit/AbstractCategoryItemRendererTests.java
test2947660
/* =========================================================== * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * * (C) Copyright 2000-2010, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/in...
// You are a professional Java test case writer, please create a test case named `test2947660` for the issue `Chart-983`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-983 // // ## Issue-Title: // #983 Potential NPE in AbstractCategoryItemRender.getLegend...
410
/** * A test that reproduces the problem reported in bug 2947660. */
1
395
tests/org/jfree/chart/renderer/category/junit/AbstractCategoryItemRendererTests.java
tests
```markdown ## Issue-ID: Chart-983 ## Issue-Title: #983 Potential NPE in AbstractCategoryItemRender.getLegendItems() ## Issue-Description: Setting up a working copy of the current JFreeChart trunk in Eclipse I got a warning about a null pointer access in this bit of code from AbstractCategoryItemRender.java: ...
395
[ "org.jfree.chart.renderer.category.AbstractCategoryItemRenderer" ]
d5abc2cf62514de735b952a6ca1e1a5fb6ec4809537f4769ef61928f66bbace6
public void test2947660()
// You are a professional Java test case writer, please create a test case named `test2947660` for the issue `Chart-983`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-983 // // ## Issue-Title: // #983 Potential NPE in AbstractCategoryItemRender.getLegend...
Chart
/* =========================================================== * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * * (C) Copyright 2000-2010, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/in...
public void testIssue620() { assertPrint("alert(/ / / / /);", "alert(/ // / /)"); assertPrint("alert(/ // / /);", "alert(/ // / /)"); }
com.google.javascript.jscomp.CodePrinterTest::testIssue620
test/com/google/javascript/jscomp/CodePrinterTest.java
1,284
test/com/google/javascript/jscomp/CodePrinterTest.java
testIssue620
/* * 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 `testIssue620` for the issue `Closure-620`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-620 // // ## Issue-Title: // alert(/ / / / /) // // ## Issue-Description: // ale...
1,284
44
1,281
test/com/google/javascript/jscomp/CodePrinterTest.java
test
```markdown ## Issue-ID: Closure-620 ## Issue-Title: alert(/ / / / /) ## Issue-Description: alert(/ / / / /); output: alert(/ /// /); should be: alert(/ // / /); ``` You are a professional Java test case writer, please create a test case named `testIssue620` for the issue `Closure-620`, utilizing the provided ...
1,281
[ "com.google.javascript.jscomp.CodeConsumer" ]
d655699ec63ec9e6862fb7e122b6a5967236c80481a41b97538c76df7d43a8ad
public void testIssue620()
// You are a professional Java test case writer, please create a test case named `testIssue620` for the issue `Closure-620`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-620 // // ## Issue-Title: // alert(/ / / / /) // // ## Issue-Description: // ale...
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 testShiftJisRoundtrip() throws Exception { String input = "<html>" + "<head>" + "<meta http-equiv=\"content-type\" content=\"text/html; charset=Shift_JIS\" />" + "</head>" ...
org.jsoup.nodes.DocumentTest::testShiftJisRoundtrip
src/test/java/org/jsoup/nodes/DocumentTest.java
408
src/test/java/org/jsoup/nodes/DocumentTest.java
testShiftJisRoundtrip
package org.jsoup.nodes; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.integration.ParseTest; import org.jsoup.nodes.Document.OutputSettings.Syntax; i...
// You are a professional Java test case writer, please create a test case named `testShiftJisRoundtrip` for the issue `Jsoup-523`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-523 // // ## Issue-Title: // EscapeMode.xhtml no longer falls back to numeric...
408
46
387
src/test/java/org/jsoup/nodes/DocumentTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-523 ## Issue-Title: EscapeMode.xhtml no longer falls back to numeric escapes - Can cause '?' replacement in output ## Issue-Description: I've been using EscapeMode.xhtml with JSoup to avoid encoding things which don't (from my perspective) need to be encoded, like egrave in a UTF-8 do...
387
[ "org.jsoup.nodes.Entities" ]
d669f5d666e00f561fa76583567cef6e01ff4f717c76242a2e73559c70854bb1
@Test public void testShiftJisRoundtrip() throws Exception
// You are a professional Java test case writer, please create a test case named `testShiftJisRoundtrip` for the issue `Jsoup-523`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-523 // // ## Issue-Title: // EscapeMode.xhtml no longer falls back to numeric...
Jsoup
package org.jsoup.nodes; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.integration.ParseTest; import org.jsoup.nodes.Document.OutputSettings.Syntax; i...
@Test public void handlesTextAfterData() { String h = "<html><body>pre <script>inner</script> aft</body></html>"; Document doc = Jsoup.parse(h); assertEquals("<html><head></head><body>pre <script>inner</script> aft</body></html>", TextUtil.stripNewlines(doc.html())); }
org.jsoup.parser.ParserTest::handlesTextAfterData
src/test/java/org/jsoup/parser/ParserTest.java
138
src/test/java/org/jsoup/parser/ParserTest.java
handlesTextAfterData
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.nodes.Comment; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.TextNode; import org.jsoup.select.Elements; import org.junit.Test; import java.util.List; import static org.junit.Assert...
// You are a professional Java test case writer, please create a test case named `handlesTextAfterData` for the issue `Jsoup-22`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-22 // // ## Issue-Title: // Unadorned text following data-only tags doesn't par...
138
2
134
src/test/java/org/jsoup/parser/ParserTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-22 ## Issue-Title: Unadorned text following data-only tags doesn't parse properly ## Issue-Description: This HTML, parsed and immediately printed out, results in: <html> <body> <script type="text/javascript"> var inside = true; </script> this should be outside. </b...
134
[ "org.jsoup.parser.Parser" ]
d6b65e7ac11a8e6d68e44053fcd8409ebdc8ff2064a21a5d75cf4a17b8ec37bc
@Test public void handlesTextAfterData()
// You are a professional Java test case writer, please create a test case named `handlesTextAfterData` for the issue `Jsoup-22`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-22 // // ## Issue-Title: // Unadorned text following data-only tags doesn't par...
Jsoup
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.nodes.Comment; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.TextNode; import org.jsoup.select.Elements; import org.junit.Test; import java.util.List; import static org.junit.Assert...
public void testBug1832432() { TimeSeries s1 = new TimeSeries("Series"); TimeSeries s2 = null; try { s2 = (TimeSeries) s1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } assertTrue(s1 != s2); assertTrue(...
org.jfree.data.time.junit.TimeSeriesTests::testBug1832432
tests/org/jfree/data/time/junit/TimeSeriesTests.java
630
tests/org/jfree/data/time/junit/TimeSeriesTests.java
testBug1832432
/* =========================================================== * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/in...
// You are a professional Java test case writer, please create a test case named `testBug1832432` for the issue `Chart-803`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-803 // // ## Issue-Title: // #803 cloning of TimeSeries // // // // // // ## Is...
630
/** * A test for bug 1832432. */
17
614
tests/org/jfree/data/time/junit/TimeSeriesTests.java
tests
```markdown ## Issue-ID: Chart-803 ## Issue-Title: #803 cloning of TimeSeries ## Issue-Description: It's just a minor bug! When I clone a TimeSeries which has no items, I get an IllegalArgumentException ("Requires start <= end"). But I don't think the user should be responsible for checking whether the Tim...
614
[ "org.jfree.data.time.TimeSeries" ]
d737221796bc2e9ca8ddb86daea4e977636e847d01d653c7b6f66c21729d5c57
public void testBug1832432()
// You are a professional Java test case writer, please create a test case named `testBug1832432` for the issue `Chart-803`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-803 // // ## Issue-Title: // #803 cloning of TimeSeries // // // // // // ## Is...
Chart
/* =========================================================== * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/in...
public void testFormatErrorSpaceEndOfLine1() throws Exception { JSError error = JSError.make("javascript/complex.js", 1, 10, FOO_TYPE); LightweightMessageFormatter formatter = formatter("assert (1;"); assertEquals("javascript/complex.js:1: ERROR - error description here\n" + "assert (1;\n"...
com.google.javascript.jscomp.LightweightMessageFormatterTest::testFormatErrorSpaceEndOfLine1
test/com/google/javascript/jscomp/LightweightMessageFormatterTest.java
93
test/com/google/javascript/jscomp/LightweightMessageFormatterTest.java
testFormatErrorSpaceEndOfLine1
/* * 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 `testFormatErrorSpaceEndOfLine1` for the issue `Closure-487`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-487 // // ## Issue-Title: // Column-indicating caret is sometime...
93
62
86
test/com/google/javascript/jscomp/LightweightMessageFormatterTest.java
test
```markdown ## Issue-ID: Closure-487 ## Issue-Title: Column-indicating caret is sometimes not in error output ## Issue-Description: For some reason, the caret doesn't always show up in the output when there are errors. When test.js looks like this: >alert(1; , the output is this: >java -jar compil...
86
[ "com.google.javascript.jscomp.LightweightMessageFormatter" ]
d749060db16640f7a2f2f590c14d19cd9ae715a727851eda6fdbd34f52826ed6
public void testFormatErrorSpaceEndOfLine1() throws Exception
// You are a professional Java test case writer, please create a test case named `testFormatErrorSpaceEndOfLine1` for the issue `Closure-487`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-487 // // ## Issue-Title: // Column-indicating caret is sometime...
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 testNoUndeclaredVarWhenUsingClosurePass() { enableClosurePass(); // We don't want to get goog as an undeclared var here. test("goog.require('namespace.Class1');\n", null, ProcessClosurePrimitives.MISSING_PROVIDE_ERROR); }
com.google.javascript.jscomp.VarCheckTest::testNoUndeclaredVarWhenUsingClosurePass
test/com/google/javascript/jscomp/VarCheckTest.java
372
test/com/google/javascript/jscomp/VarCheckTest.java
testNoUndeclaredVarWhenUsingClosurePass
/* * Copyright 2005 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 `testNoUndeclaredVarWhenUsingClosurePass` for the issue `Closure-1079`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1079 // // ## Issue-Title: // Bug in require calls pro...
372
113
367
test/com/google/javascript/jscomp/VarCheckTest.java
test
```markdown ## Issue-ID: Closure-1079 ## Issue-Title: Bug in require calls processing ## Issue-Description: The Problem ProcessClosurePrimitives pass has a bug in processRequireCall method. The method processes goog.require calls. If a require symbol is invalid i.e is not provided anywhere, the method collects ...
367
[ "com.google.javascript.jscomp.ProcessClosurePrimitives" ]
d772e11b423ed011df2dcee692e6074fd58891f571cedb0a7e4338c43a03c897
public void testNoUndeclaredVarWhenUsingClosurePass()
// You are a professional Java test case writer, please create a test case named `testNoUndeclaredVarWhenUsingClosurePass` for the issue `Closure-1079`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1079 // // ## Issue-Title: // Bug in require calls pro...
Closure
/* * Copyright 2005 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 testMultiply() { test(field.newDfp("1").multiply(field.newDfp("1")), // Basic tests 1*1 = 1 field.newDfp("1"), 0, "Multiply #1"); test(field.newDfp("1").multiply(1), // Basic tests 1*1 = 1 field.newDfp("1"), ...
org.apache.commons.math3.dfp.DfpTest::testMultiply
src/test/java/org/apache/commons/math3/dfp/DfpTest.java
919
src/test/java/org/apache/commons/math3/dfp/DfpTest.java
testMultiply
/* * 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 `testMultiply` for the issue `Math-MATH-778`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-778 // // ## Issue-Title: // Dfp Dfp.multiply(int x) does not comply with the ...
919
// // Test multiplication //
17
754
src/test/java/org/apache/commons/math3/dfp/DfpTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-778 ## Issue-Title: Dfp Dfp.multiply(int x) does not comply with the general contract FieldElement.multiply(int n) ## Issue-Description: In class org.apache.commons.math3.Dfp, the method multiply(int n) is limited to 0 <= n <= 9999. This is not consistent with the general contrac...
754
[ "org.apache.commons.math3.dfp.Dfp" ]
d77b7a1156c43b7909fe681fde5d9ba690ffab0326dea68c6bbd1c2d5856dbb1
@Test public void testMultiply()
// You are a professional Java test case writer, please create a test case named `testMultiply` for the issue `Math-MATH-778`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-778 // // ## Issue-Title: // Dfp Dfp.multiply(int x) does not comply with the ...
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 testDateTimeCreation_london() { DateTimeZone zone = DateTimeZone.forID("Europe/London"); DateTime base = new DateTime(2011, 10, 30, 1, 15, zone); assertEquals("2011-10-30T01:15:00.000+01:00", base.toString()); assertEquals("2011-10-30T01:15:00.000Z", base.plusHours(1).toS...
org.joda.time.TestDateTimeZoneCutover::testDateTimeCreation_london
src/test/java/org/joda/time/TestDateTimeZoneCutover.java
1,267
src/test/java/org/joda/time/TestDateTimeZoneCutover.java
testDateTimeCreation_london
/* * Copyright 2001-2007 Stephen Colebourne * * 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 `testDateTimeCreation_london` for the issue `Time-124`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-124 // // ## Issue-Title: // #124 Inconsistent interpretation of ambiguou...
1,267
19
1,262
src/test/java/org/joda/time/TestDateTimeZoneCutover.java
src/test/java
```markdown ## Issue-ID: Time-124 ## Issue-Title: #124 Inconsistent interpretation of ambiguous time during DST ## Issue-Description: The inconsistency appears for timezone Europe/London. Consider the following code … DateTime britishDate = new DateTime(2011, 10, 30, 1, 59, 0, 0, DateTimeZone.forID("Eur...
1,262
[ "org.joda.time.DateTimeZone" ]
d99097be93bf90b1284e221dfd4c16e3d720fc073fce85e5c423330f208fec87
public void testDateTimeCreation_london()
// You are a professional Java test case writer, please create a test case named `testDateTimeCreation_london` for the issue `Time-124`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-124 // // ## Issue-Title: // #124 Inconsistent interpretation of ambiguou...
Time
/* * Copyright 2001-2007 Stephen Colebourne * * 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 testVersionFlag2() { lastArg = "--version"; testSame(""); assertEquals( 0, new String(errReader.toByteArray()).indexOf( "Closure Compiler (http://code.google.com/closure/compiler)\n" + "Version: ")); }
com.google.javascript.jscomp.CommandLineRunnerTest::testVersionFlag2
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
607
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
testVersionFlag2
/* * 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 `testVersionFlag2` for the issue `Closure-319`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-319 // // ## Issue-Title: // Cannot see version with --version // // ## Issue...
607
83
599
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
test
```markdown ## Issue-ID: Closure-319 ## Issue-Title: Cannot see version with --version ## Issue-Description: **What steps will reproduce the problem?** 1. Download sources of latest (r698) command-line version of closure compiler. 2. Build (with ant from command line). 3. Run compiler (java -jar compiler.jar --ve...
599
[ "com.google.javascript.jscomp.CommandLineRunner" ]
d9dc4817aa484b906fb43c192eeb0df0ed7eae6a8eae1aa6dc12bca52fa5c635
public void testVersionFlag2()
// You are a professional Java test case writer, please create a test case named `testVersionFlag2` for the issue `Closure-319`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-319 // // ## Issue-Title: // Cannot see version with --version // // ## Issue...
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...
@Test public void createsFormData() { String html = "<form><input name='one' value='two'><select name='three'><option value='not'>" + "<option value='four' selected><option value='five' selected><textarea name=six>seven</textarea>" + "<input name='seven' type='radio' value='o...
org.jsoup.nodes.FormElementTest::createsFormData
src/test/java/org/jsoup/nodes/FormElementTest.java
46
src/test/java/org/jsoup/nodes/FormElementTest.java
createsFormData
package org.jsoup.nodes; import org.jsoup.Connection; import org.jsoup.Jsoup; import org.junit.Test; import java.util.List; import static org.junit.Assert.*; /** * Tests for FormElement * * @author Jonathan Hedley */ public class FormElementTest { @Test public void hasAssociatedControls() { //"butto...
// You are a professional Java test case writer, please create a test case named `createsFormData` for the issue `Jsoup-489`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-489 // // ## Issue-Title: // FormElement's formData ignores input checkbox checked ...
46
42
26
src/test/java/org/jsoup/nodes/FormElementTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-489 ## Issue-Title: FormElement's formData ignores input checkbox checked without value. ## Issue-Description: When there is input: ``` <input type="checkbox" name="testCheckBox" checked="checked" /> ``` The "formData()" of FormElement's ignores that default value which should be...
26
[ "org.jsoup.nodes.FormElement" ]
daa8cded23e17c8ff9a208a7a9051d9d3ade9b66939ba7938438defa436689b4
@Test public void createsFormData()
// You are a professional Java test case writer, please create a test case named `createsFormData` for the issue `Jsoup-489`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-489 // // ## Issue-Title: // FormElement's formData ignores input checkbox checked ...
Jsoup
package org.jsoup.nodes; import org.jsoup.Connection; import org.jsoup.Jsoup; import org.junit.Test; import java.util.List; import static org.junit.Assert.*; /** * Tests for FormElement * * @author Jonathan Hedley */ public class FormElementTest { @Test public void hasAssociatedControls() { //"butto...
public void testGetTypedPercent5() throws Exception { String js = "/** @enum {number} */ keys = {A: 1,B: 2,C: 3};"; assertEquals(100.0, getTypedPercent(js), 0.1); }
com.google.javascript.jscomp.TypeCheckTest::testGetTypedPercent5
test/com/google/javascript/jscomp/TypeCheckTest.java
7,784
test/com/google/javascript/jscomp/TypeCheckTest.java
testGetTypedPercent5
/* * 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 `testGetTypedPercent5` for the issue `Closure-482`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-482 // // ## Issue-Title: // @enum does not type correctly // // ## Issue...
7,784
66
7,781
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-482 ## Issue-Title: @enum does not type correctly ## Issue-Description: **What steps will reproduce the problem?** 1. create an enum with any syntax my example: /\*\* @type {Object} \*/ var NS = {}; /\*\* @enum {number} \*/ NS.keys = { a: 1, b: 2, c: 3 }; ...
7,781
[ "com.google.javascript.jscomp.TypeCheck" ]
dabd59958b99491a2252f2afb4acefc837902bf9e0c33d3c445d5a8242d0f47e
public void testGetTypedPercent5() throws Exception
// You are a professional Java test case writer, please create a test case named `testGetTypedPercent5` for the issue `Closure-482`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-482 // // ## Issue-Title: // @enum does not type correctly // // ## Issue...
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 constructorValidationOkWithBlankName() { DocumentType fail = new DocumentType("","", "", ""); }
org.jsoup.nodes.DocumentTypeTest::constructorValidationOkWithBlankName
src/test/java/org/jsoup/nodes/DocumentTypeTest.java
15
src/test/java/org/jsoup/nodes/DocumentTypeTest.java
constructorValidationOkWithBlankName
package org.jsoup.nodes; import org.junit.Test; import static org.junit.Assert.*; /** * Tests for the DocumentType node * * @author Jonathan Hedley, http://jonathanhedley.com/ */ public class DocumentTypeTest { @Test public void constructorValidationOkWithBlankName() { DocumentType fail = new Doc...
// You are a professional Java test case writer, please create a test case named `constructorValidationOkWithBlankName` for the issue `Jsoup-460`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-460 // // ## Issue-Title: // "<!DOCTYPE>" IllegalArgumentExcep...
15
40
12
src/test/java/org/jsoup/nodes/DocumentTypeTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-460 ## Issue-Title: "<!DOCTYPE>" IllegalArgumentException: String must not be empty ## Issue-Description: While this may be a contrived example, Jsoup.parse("<!DOCTYPE>") throws an exception, this was unexpected. Possibly related, a proper document with <!DOCTYPE> (no name) is generat...
12
[ "org.jsoup.nodes.DocumentType" ]
db90c8fdc8d3e760b855b47a4354c6d040022d1518fea6907654cadd490331c2
@Test public void constructorValidationOkWithBlankName()
// You are a professional Java test case writer, please create a test case named `constructorValidationOkWithBlankName` for the issue `Jsoup-460`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-460 // // ## Issue-Title: // "<!DOCTYPE>" IllegalArgumentExcep...
Jsoup
package org.jsoup.nodes; import org.junit.Test; import static org.junit.Assert.*; /** * Tests for the DocumentType node * * @author Jonathan Hedley, http://jonathanhedley.com/ */ public class DocumentTypeTest { @Test public void constructorValidationOkWithBlankName() { DocumentType fail = new Doc...
public void testStopBursting() throws Exception { String[] args = new String[] { "-azc" }; CommandLine cl = parser.parse(options, args, true); assertTrue( "Confirm -a is set", cl.hasOption("a") ); assertFalse( "Confirm -c is not set", cl.hasOption("c") ); assertTrue( "C...
org.apache.commons.cli.PosixParserTest::testStopBursting
src/test/org/apache/commons/cli/PosixParserTest.java
142
src/test/org/apache/commons/cli/PosixParserTest.java
testStopBursting
/** * 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 `testStopBursting` for the issue `Cli-CLI-163`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-163 // // ## Issue-Title: // PosixParser keeps bursting tokens even if a non o...
142
17
132
src/test/org/apache/commons/cli/PosixParserTest.java
src/test
```markdown ## Issue-ID: Cli-CLI-163 ## Issue-Title: PosixParser keeps bursting tokens even if a non option character is found ## Issue-Description: PosixParser doesn't stop the bursting process of a token if stopAtNonOption is enabled and a non option character is encountered. For example if the options a and b...
132
[ "org.apache.commons.cli.PosixParser" ]
dbc9649d0fc7a2e46fd7f61d7ee7dc22f15a08e66d7682df6e836af9ee04ec9c
public void testStopBursting() throws Exception
// You are a professional Java test case writer, please create a test case named `testStopBursting` for the issue `Cli-CLI-163`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-163 // // ## Issue-Title: // PosixParser keeps bursting tokens even if a non 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 testMath280() throws MathException { NormalDistribution normal = new NormalDistributionImpl(0,1); double result = normal.inverseCumulativeProbability(0.9772498680518209); assertEquals(2.0, result, 1.0e-12); }
org.apache.commons.math.distribution.NormalDistributionTest::testMath280
src/test/org/apache/commons/math/distribution/NormalDistributionTest.java
170
src/test/org/apache/commons/math/distribution/NormalDistributionTest.java
testMath280
/* * 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 `testMath280` for the issue `Math-MATH-280`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-280 // // ## Issue-Title: // bug in inverseCumulativeProbability() for Normal D...
170
85
166
src/test/org/apache/commons/math/distribution/NormalDistributionTest.java
src/test
```markdown ## Issue-ID: Math-MATH-280 ## Issue-Title: bug in inverseCumulativeProbability() for Normal Distribution ## Issue-Description: * @version $Revision: 617953 $ $Date: 2008-02-02 22:54:00 -0700 (Sat, 02 Feb 2008) $ \*/ public class NormalDistributionImpl extends AbstractContinuousDistribution * @...
166
[ "org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils" ]
dbd253a14e2a2c62d2577282600ea489e854fe74f4d9dc5d43427675dba8b612
public void testMath280() throws MathException
// You are a professional Java test case writer, please create a test case named `testMath280` for the issue `Math-MATH-280`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-280 // // ## Issue-Title: // bug in inverseCumulativeProbability() for Normal D...
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 testEscapedQuote_LANG_477() { String pattern = "it''s a {0,lower} 'test'!"; ExtendedMessageFormat emf = new ExtendedMessageFormat(pattern, registry); assertEquals("it's a dummy test!", emf.format(new Object[] {"DUMMY"})); }
org.apache.commons.lang.text.ExtendedMessageFormatTest::testEscapedQuote_LANG_477
src/test/org/apache/commons/lang/text/ExtendedMessageFormatTest.java
101
src/test/org/apache/commons/lang/text/ExtendedMessageFormatTest.java
testEscapedQuote_LANG_477
/* * 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 `testEscapedQuote_LANG_477` for the issue `Lang-LANG-477`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-477 // // ## Issue-Title: // ExtendedMessageFormat: OutOfMemory w...
101
/** * Test Bug LANG-477 - out of memory error with escaped quote */
43
97
src/test/org/apache/commons/lang/text/ExtendedMessageFormatTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-477 ## Issue-Title: ExtendedMessageFormat: OutOfMemory with custom format registry and a pattern containing single quotes ## Issue-Description: When using ExtendedMessageFormat with a custom format registry and a pattern conatining single quotes, an OutOfMemoryError will occur. ...
97
[ "org.apache.commons.lang.text.ExtendedMessageFormat" ]
dd1d3a595e386dfececa305c3db068e5cb21d5851245c9453b97133a409192aa
public void testEscapedQuote_LANG_477()
// You are a professional Java test case writer, please create a test case named `testEscapedQuote_LANG_477` for the issue `Lang-LANG-477`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-477 // // ## Issue-Title: // ExtendedMessageFormat: OutOfMemory w...
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 testMissingOptionsException() throws ParseException { Options options = new Options(); options.addOption(OptionBuilder.isRequired().create("f")); options.addOption(OptionBuilder.isRequired().create("x")); try { new PosixParser().parse(options, new String[0]); ...
org.apache.commons.cli.OptionsTest::testMissingOptionsException
src/test/org/apache/commons/cli/OptionsTest.java
117
src/test/org/apache/commons/cli/OptionsTest.java
testMissingOptionsException
/** * 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 `testMissingOptionsException` 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 opt" as "-t...
117
4
107
src/test/org/apache/commons/cli/OptionsTest.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...
107
[ "org.apache.commons.cli.Parser" ]
de556e8eb2ddb50b6c559a52351868356be09603e9d53c7d0d0390e70184a58d
public void testMissingOptionsException() throws ParseException
// You are a professional Java test case writer, please create a test case named `testMissingOptionsException` 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 opt" as "-t...
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 testConstructor() { MultiplePiePlot plot = new MultiplePiePlot(); assertNull(plot.getDataset()); // the following checks that the plot registers itself as a listener // with the dataset passed to the constructor - see patch 1943021 DefaultCategoryDataset dataset = new DefaultCa...
org.jfree.chart.plot.junit.MultiplePiePlotTests::testConstructor
tests/org/jfree/chart/plot/junit/MultiplePiePlotTests.java
112
tests/org/jfree/chart/plot/junit/MultiplePiePlotTests.java
testConstructor
/* =========================================================== * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * * (C) Copyright 2000-2008, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/in...
// You are a professional Java test case writer, please create a test case named `testConstructor` for the issue `Chart-213`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-213 // // ## Issue-Title: // #213 Fix for MultiplePiePlot // // // // // // ##...
112
/** * Some checks for the constructors. */
12
103
tests/org/jfree/chart/plot/junit/MultiplePiePlotTests.java
tests
```markdown ## Issue-ID: Chart-213 ## Issue-Title: #213 Fix for MultiplePiePlot ## Issue-Description: When dataset is passed into constructor for MultiplePiePlot, the dataset is not wired to a listener, as it would be if setDataset is called. ``` You are a professional Java test case writer, please create ...
103
[ "org.jfree.chart.plot.MultiplePiePlot" ]
e001e965aae2cbd3c27fc2201ea95faa49af642eee998c9dbd1c4ae39b6a84cf
public void testConstructor()
// You are a professional Java test case writer, please create a test case named `testConstructor` for the issue `Chart-213`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-213 // // ## Issue-Title: // #213 Fix for MultiplePiePlot // // // // // // ##...
Chart
/* =========================================================== * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * * (C) Copyright 2000-2008, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/in...
public void testSmallDegreesOfFreedom() throws Exception { org.apache.commons.math.distribution.FDistributionImpl fd = new org.apache.commons.math.distribution.FDistributionImpl( 1.0, 1.0); double p = fd.cumulativeProbability(0.975); double x = fd.inverseCumulativ...
org.apache.commons.math.distribution.FDistributionTest::testSmallDegreesOfFreedom
src/test/org/apache/commons/math/distribution/FDistributionTest.java
120
src/test/org/apache/commons/math/distribution/FDistributionTest.java
testSmallDegreesOfFreedom
/* * 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 `testSmallDegreesOfFreedom` for the issue `Math-MATH-227`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-227 // // ## Issue-Title: // denominatorDegreeOfFreedom in FDistr...
120
95
108
src/test/org/apache/commons/math/distribution/FDistributionTest.java
src/test
```markdown ## Issue-ID: Math-MATH-227 ## Issue-Title: denominatorDegreeOfFreedom in FDistribution leads to IllegalArgumentsException in UnivariateRealSolverUtils.bracket ## Issue-Description: We are using the FDistributionImpl from the commons.math project to do some statistical calculations, namely receiving ...
108
[ "org.apache.commons.math.distribution.FDistributionImpl" ]
e0e659301e73957c9123fed72809825eb3a61fed6251d886c124bcf6ea8f5813
public void testSmallDegreesOfFreedom() throws Exception
// You are a professional Java test case writer, please create a test case named `testSmallDegreesOfFreedom` for the issue `Math-MATH-227`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-227 // // ## Issue-Title: // denominatorDegreeOfFreedom in FDistr...
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 testMath855() { final double minSin = 3 * Math.PI / 2; final double offset = 1e-8; final double delta = 1e-7; final UnivariateFunction f1 = new Sin(); final UnivariateFunction f2 = new StepFunction(new double[] { minSin, minSin + offset, minSin + 5 * off...
org.apache.commons.math3.optimization.univariate.BrentOptimizerTest::testMath855
src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java
213
src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java
testMath855
/* * 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 `testMath855` for the issue `Math-MATH-855`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-855 // // ## Issue-Title: // "BrentOptimizer" not always reporting the best poi...
213
/** * Contrived example showing that prior to the resolution of MATH-855, * the algorithm, by always returning the last evaluated point, would * sometimes not report the best point it had found. */
24
191
src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-855 ## Issue-Title: "BrentOptimizer" not always reporting the best point ## Issue-Description: BrentOptimizer (package "o.a.c.m.optimization.univariate") does not check that the point it is going to return is indeed the best one it has encountered. Indeed, the last evaluated poin...
191
[ "org.apache.commons.math3.optimization.univariate.BrentOptimizer" ]
e1c8ec977ab88b6d844e01320396afc74064fffc0489ca1d2d6e0eebedcc9e15
@Test public void testMath855()
// You are a professional Java test case writer, please create a test case named `testMath855` for the issue `Math-MATH-855`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-855 // // ## Issue-Title: // "BrentOptimizer" not always reporting the best poi...
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 testIsNumber() { String val = "12345"; assertTrue("isNumber(String) 1 failed", NumberUtils.isNumber(val)); assertTrue("isNumber(String)/createNumber(String) 1 failed", checkCreateNumber(val)); val = "1234.5"; assertTrue("isNumber(String) 2 failed", NumberUtils.isN...
org.apache.commons.lang3.math.NumberUtilsTest::testIsNumber
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
1,145
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
testIsNumber
/* * 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 `testIsNumber` for the issue `Lang-LANG-664`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-664 // // ## Issue-Title: // NumberUtils.isNumber(String) is not right when t...
1,145
/** * Tests isNumber(String) and tests that createNumber(String) returns * a valid number iff isNumber(String) returns false. */
24
1,004
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-664 ## Issue-Title: NumberUtils.isNumber(String) is not right when the String is "1.1L" ## Issue-Description: "1.1L" is not a Java Number . but NumberUtils.isNumber(String) return true. perhaps change: ``` if (chars[i] == 'l' || chars[i] == 'L')...
1,004
[ "org.apache.commons.lang3.math.NumberUtils" ]
e288b6477f0427ea56e26de05b3df30a5cea05706fd275540fb22fc66f9152a8
public void testIsNumber()
// You are a professional Java test case writer, please create a test case named `testIsNumber` for the issue `Lang-LANG-664`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-664 // // ## Issue-Title: // NumberUtils.isNumber(String) is not right when t...
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 testProvideInIndependentModules4() { // Regression test for bug 261: // http://code.google.com/p/closure-compiler/issues/detail?id=261 test( createModuleStar( "goog.provide('apps');", "goog.provide('apps.foo.bar.B');", "goog.provide('apps.foo.bar.C')...
com.google.javascript.jscomp.ProcessClosurePrimitivesTest::testProvideInIndependentModules4
test/com/google/javascript/jscomp/ProcessClosurePrimitivesTest.java
786
test/com/google/javascript/jscomp/ProcessClosurePrimitivesTest.java
testProvideInIndependentModules4
/* * 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 `testProvideInIndependentModules4` for the issue `Closure-261`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-261 // // ## Issue-Title: // bug with implicit namespaces acro...
786
92
773
test/com/google/javascript/jscomp/ProcessClosurePrimitivesTest.java
test
```markdown ## Issue-ID: Closure-261 ## Issue-Title: bug with implicit namespaces across modules ## Issue-Description: If there are three modules, the latter two of which depend on the root module: // Module A goog.provide('apps'); // Module B goog.provide('apps.foo.bar.B'); // Module C goog.provide('ap...
773
[ "com.google.javascript.jscomp.ProcessClosurePrimitives" ]
e50181bf61b8c59da27927c1c6faed443e60239b2b7c87ff55e9333ed8556421
public void testProvideInIndependentModules4()
// You are a professional Java test case writer, please create a test case named `testProvideInIndependentModules4` for the issue `Closure-261`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-261 // // ## Issue-Title: // bug with implicit namespaces acro...
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 testSkipValue_filledJsonObject() throws IOException { JsonObject jsonObject = new JsonObject(); JsonArray jsonArray = new JsonArray(); jsonArray.add('c'); jsonArray.add("text"); jsonObject.add("a", jsonArray); jsonObject.addProperty("b", true); jsonObject.addProperty("i", 1); ...
com.google.gson.internal.bind.JsonTreeReaderTest::testSkipValue_filledJsonObject
gson/src/test/java/com/google/gson/internal/bind/JsonTreeReaderTest.java
48
gson/src/test/java/com/google/gson/internal/bind/JsonTreeReaderTest.java
testSkipValue_filledJsonObject
/* * Copyright (C) 2017 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 agree...
// You are a professional Java test case writer, please create a test case named `testSkipValue_filledJsonObject` for the issue `Gson-1013`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-1013 // // ## Issue-Title: // Bug when skipping a value while using t...
48
12
32
gson/src/test/java/com/google/gson/internal/bind/JsonTreeReaderTest.java
gson/src/test/java
```markdown ## Issue-ID: Gson-1013 ## Issue-Title: Bug when skipping a value while using the JsonTreeReader ## Issue-Description: When using a `JsonReader` to read a JSON object, `skipValue()` skips the structure successfully. ``` @Test public void testSkipValue\_JsonReader() throws IOException { try (JsonRead...
32
[ "com.google.gson.internal.bind.JsonTreeReader" ]
e54a927b796bc95f7b02513e3771b7a1b3d536268635571acffe0c8542bf8032
public void testSkipValue_filledJsonObject() throws IOException
// You are a professional Java test case writer, please create a test case named `testSkipValue_filledJsonObject` for the issue `Gson-1013`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-1013 // // ## Issue-Title: // Bug when skipping a value while using t...
Gson
/* * Copyright (C) 2017 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 agree...
public void testTruncateLang59() throws Exception { // Set TimeZone to Mountain Time TimeZone MST_MDT = TimeZone.getTimeZone("MST7MDT"); TimeZone.setDefault(MST_MDT); DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS z"); format.setTimeZone(MST_MDT); ...
org.apache.commons.lang.time.DateUtilsTest::testTruncateLang59
src/test/org/apache/commons/lang/time/DateUtilsTest.java
963
src/test/org/apache/commons/lang/time/DateUtilsTest.java
testTruncateLang59
/* * Copyright 2002-2005 The Apache Software Foundation. * * 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...
// You are a professional Java test case writer, please create a test case named `testTruncateLang59` for the issue `Lang-LANG-59`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-59 // // ## Issue-Title: // [lang] DateUtils.truncate method is buggy whe...
963
/** * Tests for LANG-59 * * see http://issues.apache.org/jira/browse/LANG-59 */
65
895
src/test/org/apache/commons/lang/time/DateUtilsTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-59 ## Issue-Title: [lang] DateUtils.truncate method is buggy when dealing with DST switching hours ## Issue-Description: Try to truncate 2004-10-31 01:00:00 MDT by hour and you'll actually get 2004-10- 31 01:00:00 MST, which is one hour after the input hour. // truncate 200...
895
[ "org.apache.commons.lang.time.DateUtils" ]
e5a9ab2e170424f60b29f61e7d3f24a3301cd3bd8b01d4e6f7755dedebd60ef6
public void testTruncateLang59() throws Exception
// You are a professional Java test case writer, please create a test case named `testTruncateLang59` for the issue `Lang-LANG-59`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-59 // // ## Issue-Title: // [lang] DateUtils.truncate method is buggy whe...
Lang
/* * Copyright 2002-2005 The Apache Software Foundation. * * 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...
@Test public void testBigDataSet() throws Exception { double[] d1 = new double[1500]; double[] d2 = new double[1500]; for (int i = 0; i < 1500; i++) { d1[i] = 2 * i; d2[i] = 2 * i + 1; } double result = testStatistic.mannWhitneyUTest(d1, d2); ...
org.apache.commons.math3.stat.inference.MannWhitneyUTestTest::testBigDataSet
src/test/java/org/apache/commons/math3/stat/inference/MannWhitneyUTestTest.java
113
src/test/java/org/apache/commons/math3/stat/inference/MannWhitneyUTestTest.java
testBigDataSet
/* * 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 `testBigDataSet` for the issue `Math-MATH-790`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-790 // // ## Issue-Title: // Mann-Whitney U Test Suffers From Integer Overfl...
113
30
103
src/test/java/org/apache/commons/math3/stat/inference/MannWhitneyUTestTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-790 ## Issue-Title: Mann-Whitney U Test Suffers From Integer Overflow With Large Data Sets ## Issue-Description: When performing a Mann-Whitney U Test on large data sets (the attached test uses two 1500 element sets), intermediate integer values used in calculateAsymptoticPValue ...
103
[ "org.apache.commons.math3.stat.inference.MannWhitneyUTest" ]
e5adf127c05724e1dfb109eba2b13a8c2e99eeb6cf097ba5a3fd391d26d2a42e
@Test public void testBigDataSet() throws Exception
// You are a professional Java test case writer, please create a test case named `testBigDataSet` for the issue `Math-MATH-790`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-790 // // ## Issue-Title: // Mann-Whitney U Test Suffers From Integer Overfl...
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 sameHeadersCombineWithComma() { Map<String, List<String>> headers = new HashMap<String, List<String>>(); List<String> values = new ArrayList<String>(); values.add("no-cache"); values.add("no-store"); headers.put("Cache-Control", values); HttpConnecti...
org.jsoup.helper.HttpConnectionTest::sameHeadersCombineWithComma
src/test/java/org/jsoup/helper/HttpConnectionTest.java
63
src/test/java/org/jsoup/helper/HttpConnectionTest.java
sameHeadersCombineWithComma
package org.jsoup.helper; import static org.junit.Assert.*; import org.jsoup.integration.ParseTest; import org.junit.Test; import org.jsoup.Connection; import java.io.IOException; import java.util.*; import java.net.URL; import java.net.MalformedURLException; public class HttpConnectionTest { /* most actual net...
// You are a professional Java test case writer, please create a test case named `sameHeadersCombineWithComma` for the issue `Jsoup-618`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-618 // // ## Issue-Title: // A small bug for duplicate tuple in respons...
63
48
54
src/test/java/org/jsoup/helper/HttpConnectionTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-618 ## Issue-Title: A small bug for duplicate tuple in response header ## Issue-Description: for response headers have duplicate tuple, in this case X-Powered-By:PHP/5.2.8 X-Powered-By:ASP.NET Jsoup can only get the second one if I run header(“X-powered-by”) I got Asp...
54
[ "org.jsoup.helper.HttpConnection" ]
e5fe1665abb51f85cbfad7c113df6114d4880f720c06ea9e28822fa403646fc6
@Test public void sameHeadersCombineWithComma()
// You are a professional Java test case writer, please create a test case named `sameHeadersCombineWithComma` for the issue `Jsoup-618`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-618 // // ## Issue-Title: // A small bug for duplicate tuple in respons...
Jsoup
package org.jsoup.helper; import static org.junit.Assert.*; import org.jsoup.integration.ParseTest; import org.junit.Test; import org.jsoup.Connection; import java.io.IOException; import java.util.*; import java.net.URL; import java.net.MalformedURLException; public class HttpConnectionTest { /* most actual net...
public void testGetMsgWiringNoWarnings() throws Exception { args.add("--compilation_level=ADVANCED_OPTIMIZATIONS"); test("/** @desc A bad foo. */ var MSG_FOO = 1;", ""); }
com.google.javascript.jscomp.CommandLineRunnerTest::testGetMsgWiringNoWarnings
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
395
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
testGetMsgWiringNoWarnings
/* * 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 `testGetMsgWiringNoWarnings` for the issue `Closure-1135`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1135 // // ## Issue-Title: // Variable names prefixed with MSG_ cau...
395
107
392
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
test
```markdown ## Issue-ID: Closure-1135 ## Issue-Title: Variable names prefixed with MSG_ cause error with advanced optimizations ## Issue-Description: Variables named something with MSG\_ seem to cause problems with the module system, even if no modules are used in the code. $ echo "var MSG\_foo='bar'" | closure ...
392
[ "com.google.javascript.jscomp.CommandLineRunner" ]
e63954f5b95fe3de4fb85bdb6c4a6e8759398a8ae29a8384dec4ec6e35977d7a
public void testGetMsgWiringNoWarnings() throws Exception
// You are a professional Java test case writer, please create a test case named `testGetMsgWiringNoWarnings` for the issue `Closure-1135`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1135 // // ## Issue-Title: // Variable names prefixed with MSG_ cau...
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 testDateFormatConfig() throws Exception { ObjectMapper mapper = new ObjectMapper(); TimeZone tz1 = TimeZone.getTimeZone("America/Los_Angeles"); TimeZone tz2 = TimeZone.getTimeZone("Central Standard Time"); // sanity checks assertEquals(tz1, tz1); asse...
com.fasterxml.jackson.databind.ser.TestConfig::testDateFormatConfig
src/test/java/com/fasterxml/jackson/databind/ser/TestConfig.java
224
src/test/java/com/fasterxml/jackson/databind/ser/TestConfig.java
testDateFormatConfig
package com.fasterxml.jackson.databind.ser; import java.io.StringWriter; import java.text.SimpleDateFormat; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.JsonSeri...
// You are a professional Java test case writer, please create a test case named `testDateFormatConfig` for the issue `JacksonDatabind-889`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-889 // // ## Issue-Title: // Configuring an ObjectMapper's...
224
24
194
src/test/java/com/fasterxml/jackson/databind/ser/TestConfig.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-889 ## Issue-Title: Configuring an ObjectMapper's DateFormat changes time zone when serialising Joda DateTime ## Issue-Description: The serialisation of Joda `DateTime` instances behaves differently in 2.6.0 vs 2.5.4 when the `ObjectMapper`'s had its `DateFormat` configured....
194
[ "com.fasterxml.jackson.databind.cfg.BaseSettings" ]
e6623ad4cfc6a3e680bca00438de1240b149b519fcf0785b9f3c8cc91b13f658
public void testDateFormatConfig() throws Exception
// You are a professional Java test case writer, please create a test case named `testDateFormatConfig` for the issue `JacksonDatabind-889`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-889 // // ## Issue-Title: // Configuring an ObjectMapper's...
JacksonDatabind
package com.fasterxml.jackson.databind.ser; import java.io.StringWriter; import java.text.SimpleDateFormat; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.JsonSeri...
public void testParseInto_monthDay_feb29_newYork_startOfYear() { DateTimeFormatter f = DateTimeFormat.forPattern("M d").withLocale(Locale.UK); MutableDateTime result = new MutableDateTime(2004, 1, 1, 0, 0, 0, 0, NEWYORK); assertEquals(4, f.parseInto(result, "2 29", 0)); assertEquals(...
org.joda.time.format.TestDateTimeFormatter::testParseInto_monthDay_feb29_newYork_startOfYear
src/test/java/org/joda/time/format/TestDateTimeFormatter.java
933
src/test/java/org/joda/time/format/TestDateTimeFormatter.java
testParseInto_monthDay_feb29_newYork_startOfYear
/* * Copyright 2001-2011 Stephen Colebourne * * 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 `testParseInto_monthDay_feb29_newYork_startOfYear` for the issue `Time-21`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-21 // // ## Issue-Title: // DateTimeFormat.parseInto ...
933
7
928
src/test/java/org/joda/time/format/TestDateTimeFormatter.java
src/test/java
```markdown ## Issue-ID: Time-21 ## Issue-Title: DateTimeFormat.parseInto sometimes miscalculates year (2.2) ## Issue-Description: There appears to be a bug in the fix to <http://sourceforge.net/p/joda-time/bugs/148> (which I also reported). The following code (which can be added to org.joda.time.format.TestDateT...
928
[ "org.joda.time.format.DateTimeFormatter" ]
e6e9388dcae2ba1cd6f30af922dad93dc16f6e99953e0a3f278e4c314b492a07
public void testParseInto_monthDay_feb29_newYork_startOfYear()
// You are a professional Java test case writer, please create a test case named `testParseInto_monthDay_feb29_newYork_startOfYear` for the issue `Time-21`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-21 // // ## Issue-Title: // DateTimeFormat.parseInto ...
Time
/* * Copyright 2001-2011 Stephen Colebourne * * 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...