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
@Test public void appendMustCorrectlyMoveChildrenInsideOneParentElement() { Document doc = new Document(""); Element body = doc.appendElement("body"); body.appendElement("div1"); body.appendElement("div2"); final Element div3 = body.appendElement("div3"); div3.tex...
org.jsoup.nodes.ElementTest::appendMustCorrectlyMoveChildrenInsideOneParentElement
src/test/java/org/jsoup/nodes/ElementTest.java
879
src/test/java/org/jsoup/nodes/ElementTest.java
appendMustCorrectlyMoveChildrenInsideOneParentElement
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.*; import static org.junit.Assert.*; /** * Tests for Element (DOM stuff mostly). * * @author Jonathan Hedley */ public class ElementT...
// You are a professional Java test case writer, please create a test case named `appendMustCorrectlyMoveChildrenInsideOneParentElement` for the issue `Jsoup-689`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-689 // // ## Issue-Title: // Bug in Element.i...
879
49
860
src/test/java/org/jsoup/nodes/ElementTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-689 ## Issue-Title: Bug in Element.insertChildren() ## Issue-Description: When using org.jsoup.nodes.Element.insertChildren(int, Collection<? extends Node>) to move (more than one!) child-elements from one parent-element to the same parent, but different index then it produces wrong r...
860
[ "org.jsoup.nodes.Node" ]
021c78a789592d6afbc95eeb73663d951c5109c229ab25610349c0ffef564ce1
@Test public void appendMustCorrectlyMoveChildrenInsideOneParentElement()
// You are a professional Java test case writer, please create a test case named `appendMustCorrectlyMoveChildrenInsideOneParentElement` for the issue `Jsoup-689`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-689 // // ## Issue-Title: // Bug in Element.i...
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.*; import static org.junit.Assert.*; /** * Tests for Element (DOM stuff mostly). * * @author Jonathan Hedley */ public class ElementT...
@Test public void testEscapeNull1() throws IOException { StringWriter sw = new StringWriter(); try (final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.DEFAULT.withEscape(null))) { printer.print("\\"); } assertEquals("\\", sw.toString()); }
org.apache.commons.csv.CSVPrinterTest::testEscapeNull1
src/test/java/org/apache/commons/csv/CSVPrinterTest.java
346
src/test/java/org/apache/commons/csv/CSVPrinterTest.java
testEscapeNull1
/* * 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 `testEscapeNull1` for the issue `Csv-CSV-171`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-171 // // ## Issue-Title: // Negative numeric values in the first column are al...
346
14
339
src/test/java/org/apache/commons/csv/CSVPrinterTest.java
src/test/java
```markdown ## Issue-ID: Csv-CSV-171 ## Issue-Title: Negative numeric values in the first column are always quoted in minimal mode ## Issue-Description: Negative Numeric values are always quoted in minimal mode if (and only if) they are in the first column. i.e. long,lat,data "-92.222",43.333,3 Looking a...
339
[ "org.apache.commons.csv.CSVFormat" ]
02fe4403d96ec0bdd25c23d282e89bcdffb04daeb609bf922ed558bc1139023e
@Test public void testEscapeNull1() throws IOException
// You are a professional Java test case writer, please create a test case named `testEscapeNull1` for the issue `Csv-CSV-171`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-171 // // ## Issue-Title: // Negative numeric values in the first column are al...
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 testChainedRemoveAttributes() { String html = "<a one two three four>Text</a>"; Document doc = Jsoup.parse(html); Element a = doc.select("a").first(); a .removeAttr("zero") .removeAttr("one") .removeAttr("two") .re...
org.jsoup.nodes.ElementTest::testChainedRemoveAttributes
src/test/java/org/jsoup/nodes/ElementTest.java
973
src/test/java/org/jsoup/nodes/ElementTest.java
testChainedRemoveAttributes
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.*; import static org.junit.Assert.*; /** * Tests for Element (DOM stuff mostly). * * @author Jonathan Hedley */ public class ElementT...
// You are a professional Java test case writer, please create a test case named `testChainedRemoveAttributes` for the issue `Jsoup-759`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-759 // // ## Issue-Title: // removeIgnoreCase ConcurrentModificationExc...
973
57
960
src/test/java/org/jsoup/nodes/ElementTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-759 ## Issue-Title: removeIgnoreCase ConcurrentModificationException ## Issue-Description: When testing out the removeIgnoreCase method, I'm now seeing a ConcurrentModificationException with code like: element.select("abc").first().removeAttr("attr1").removeAttr("attr2"); It appears...
960
[ "org.jsoup.nodes.Attributes" ]
03861a74fcf192e0e0543153e3e1885a9c95b0146e24fe30efe83a989d95bccb
@Test public void testChainedRemoveAttributes()
// You are a professional Java test case writer, please create a test case named `testChainedRemoveAttributes` for the issue `Jsoup-759`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-759 // // ## Issue-Title: // removeIgnoreCase ConcurrentModificationExc...
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.*; import static org.junit.Assert.*; /** * Tests for Element (DOM stuff mostly). * * @author Jonathan Hedley */ public class ElementT...
public void testWithUnwrappedAndCreatorSingleParameterAtBeginning() throws Exception { final String json = aposToQuotes("{'person_id':1234,'first_name':'John','last_name':'Doe','years_old':30,'living':true}"); final ObjectMapper mapper = new ObjectMapper(); Person person = mapper.readValue(...
com.fasterxml.jackson.databind.deser.builder.BuilderWithUnwrappedTest::testWithUnwrappedAndCreatorSingleParameterAtBeginning
src/test/java/com/fasterxml/jackson/databind/deser/builder/BuilderWithUnwrappedTest.java
179
src/test/java/com/fasterxml/jackson/databind/deser/builder/BuilderWithUnwrappedTest.java
testWithUnwrappedAndCreatorSingleParameterAtBeginning
package com.fasterxml.jackson.databind.deser.builder; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonUnwrapped; 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 `testWithUnwrappedAndCreatorSingleParameterAtBeginning` for the issue `JacksonDatabind-1573`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1573 // // ## Issue-Title...
179
/* ************************************* * Unit tests ************************************* */
76
168
src/test/java/com/fasterxml/jackson/databind/deser/builder/BuilderWithUnwrappedTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1573 ## Issue-Title: Missing properties when deserializing using a builder class with a non-default constructor and a mutator annotated with @JsonUnwrapped ## Issue-Description: When deserializing using a builder class with a non-default constructor and any number of mutator...
168
[ "com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer" ]
0401bac6c0aa608166d12da47792008573fda3176ab1774de2b9f86ea7aabd03
public void testWithUnwrappedAndCreatorSingleParameterAtBeginning() throws Exception
// You are a professional Java test case writer, please create a test case named `testWithUnwrappedAndCreatorSingleParameterAtBeginning` for the issue `JacksonDatabind-1573`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1573 // // ## Issue-Title...
JacksonDatabind
package com.fasterxml.jackson.databind.deser.builder; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonUnwrapped; import com.fasterxml.jackson.databind.BaseMapTest; import com.fasterxml.jackson.databind.ObjectMapper; ...
@Test public void survivesPaxHeaderWithNameEndingInSlash() throws Exception { final TarArchiveInputStream is = getTestStream("/COMPRESS-356.tar"); try { final TarArchiveEntry entry = is.getNextTarEntry(); assertEquals("package/package.json", entry.getName()); ...
org.apache.commons.compress.archivers.tar.TarArchiveInputStreamTest::survivesPaxHeaderWithNameEndingInSlash
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
328
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
survivesPaxHeaderWithNameEndingInSlash
/* * 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 `survivesPaxHeaderWithNameEndingInSlash` for the issue `Compress-COMPRESS-356`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-356 // // ## Issue-Title: // PAX hea...
328
/** * @link "https://issues.apache.org/jira/browse/COMPRESS-356" */
38
318
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-356 ## Issue-Title: PAX header entry name ending with / causes problems ## Issue-Description: There seems to be a problem when a PAX header entry (link flag is 'x') has a name ending with "/". The TarArchiveEntry.isDirectory() check ends up returning true because of the t...
318
[ "org.apache.commons.compress.archivers.tar.TarArchiveEntry" ]
0415194838d24fbbc7c6bba450f676fa746588c1e44179aae34c4601d66b3b6b
@Test public void survivesPaxHeaderWithNameEndingInSlash() throws Exception
// You are a professional Java test case writer, please create a test case named `survivesPaxHeaderWithNameEndingInSlash` for the issue `Compress-COMPRESS-356`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-356 // // ## Issue-Title: // PAX hea...
Compress
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
@Test public void testReadingOfFirstStoredEntry() throws Exception { ZipArchiveInputStream in = new ZipArchiveInputStream(new FileInputStream(getFile("COMPRESS-264.zip"))); try { ZipArchiveEntry ze = in.getNextZipEntry(); assertEquals(5, ze.getSize()); ...
org.apache.commons.compress.archivers.zip.ZipArchiveInputStreamTest::testReadingOfFirstStoredEntry
src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
170
src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
testReadingOfFirstStoredEntry
/* * 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 `testReadingOfFirstStoredEntry` for the issue `Compress-COMPRESS-264`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-264 // // ## Issue-Title: // ZIP reads correc...
170
/** * Test case for * <a href="https://issues.apache.org/jira/browse/COMPRESS-264" * >COMPRESS-264</a>. */
25
158
src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-264 ## Issue-Title: ZIP reads correctly with commons-compress 1.6, gives NUL bytes in 1.7 ## Issue-Description: When running the code below, commons-compress 1.6 writes: Content of test.txt: data By comparison, commons-compress 1.7 writes Content of test.txt: ...
158
[ "org.apache.commons.compress.archivers.zip.ZipArchiveInputStream" ]
050b4d4132e91fd034ea46a90712ff55907adde1c1012bec705211fb26cb04ce
@Test public void testReadingOfFirstStoredEntry() throws Exception
// You are a professional Java test case writer, please create a test case named `testReadingOfFirstStoredEntry` for the issue `Compress-COMPRESS-264`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-264 // // ## Issue-Title: // ZIP reads correc...
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 testBug4944818() { test( "var getDomServices_ = function(self) {\n" + " if (!self.domServices_) {\n" + " self.domServices_ = goog$component$DomServices.get(" + " self.appContext_);\n" + " }\n" + "\n" + " return self.domServices_;\n" ...
com.google.javascript.jscomp.InlineFunctionsTest::testBug4944818
test/com/google/javascript/jscomp/InlineFunctionsTest.java
2,093
test/com/google/javascript/jscomp/InlineFunctionsTest.java
testBug4944818
/* * 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 `testBug4944818` for the issue `Closure-1101`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1101 // // ## Issue-Title: // Erroneous optimization in ADVANCED_OPTIMIZATIONS ...
2,093
115
2,058
test/com/google/javascript/jscomp/InlineFunctionsTest.java
test
```markdown ## Issue-ID: Closure-1101 ## Issue-Title: Erroneous optimization in ADVANCED_OPTIMIZATIONS mode ## Issue-Description: **What steps will reproduce the problem?** 1. Create a file input.js with the following "minimal" test case: window["anchor"] = function (obj, modifiesProp) { return (function (s...
2,058
[ "com.google.javascript.jscomp.FunctionInjector" ]
0547be5ae0ee0bb59db0bd6db5e5b39ba3eb97b4572678f7c8ca2d9687baeea0
public void testBug4944818()
// You are a professional Java test case writer, please create a test case named `testBug4944818` for the issue `Closure-1101`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1101 // // ## Issue-Title: // Erroneous optimization in ADVANCED_OPTIMIZATIONS ...
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 testPrintWrapped() throws Exception { StringBuffer sb = new StringBuffer(); HelpFormatter hf = new HelpFormatter(); String text = "This is a test."; String expected; expected = "This is a" + hf.getNewLine() + "test."; hf.renderWrappedText(sb, 12, 0, text); ...
org.apache.commons.cli.HelpFormatterTest::testPrintWrapped
src/test/org/apache/commons/cli/HelpFormatterTest.java
114
src/test/org/apache/commons/cli/HelpFormatterTest.java
testPrintWrapped
/** * 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 `testPrintWrapped` for the issue `Cli-CLI-151`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-151 // // ## Issue-Title: // HelpFormatter wraps incorrectly on every line bey...
114
8
67
src/test/org/apache/commons/cli/HelpFormatterTest.java
src/test
```markdown ## Issue-ID: Cli-CLI-151 ## Issue-Title: HelpFormatter wraps incorrectly on every line beyond the first ## Issue-Description: The method findWrapPos(...) in the HelpFormatter is a couple of bugs in the way that it deals with the "startPos" variable. This causes it to format every line beyond the first ...
67
[ "org.apache.commons.cli.HelpFormatter" ]
06a4b1a5880e47010b28e5cb1d3de6798c92c7a0d4113e697e16d87a8f5c04a0
public void testPrintWrapped() throws Exception
// You are a professional Java test case writer, please create a test case named `testPrintWrapped` for the issue `Cli-CLI-151`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-151 // // ## Issue-Title: // HelpFormatter wraps incorrectly on every line bey...
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 testPropertyOptionFlags() throws Exception { Properties properties = new Properties(); properties.setProperty( "a", "true" ); properties.setProperty( "c", "yes" ); properties.setProperty( "e", "1" ); Parser parser = new PosixParser(); CommandLine cmd...
org.apache.commons.cli.ValueTest::testPropertyOptionFlags
src/test/org/apache/commons/cli/ValueTest.java
236
src/test/org/apache/commons/cli/ValueTest.java
testPropertyOptionFlags
/** * 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 `testPropertyOptionFlags` for the issue `Cli-CLI-201`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-201 // // ## Issue-Title: // Default options may be partially processed...
236
28
191
src/test/org/apache/commons/cli/ValueTest.java
src/test
```markdown ## Issue-ID: Cli-CLI-201 ## Issue-Title: Default options may be partially processed ## Issue-Description: The Properties instance passed to the Parser.parse() method to initialize the default options may be partially processed. This happens when the properties contains an option that doesn't accept arg...
191
[ "org.apache.commons.cli.Parser" ]
07be9f5a2dc338177219f9e05b441b6c77b4d7baec421c9c82e25c28a1683513
public void testPropertyOptionFlags() throws Exception
// You are a professional Java test case writer, please create a test case named `testPropertyOptionFlags` for the issue `Cli-CLI-201`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-201 // // ## Issue-Title: // Default options may be partially processed...
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 testIssue1047() throws Exception { testTypes( "/**\n" + " * @constructor\n" + " */\n" + "function C2() {}\n" + "\n" + "/**\n" + " * @constructor\n" + " */\n" + "function C3(c2) {\n" + " /**\n" + " * @type {C2} \...
com.google.javascript.jscomp.TypeCheckTest::testIssue1047
test/com/google/javascript/jscomp/TypeCheckTest.java
6,870
test/com/google/javascript/jscomp/TypeCheckTest.java
testIssue1047
/* * 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 `testIssue1047` for the issue `Closure-1047`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1047 // // ## Issue-Title: // Wrong type name reported on missing property error...
6,870
117
6,850
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-1047 ## Issue-Title: Wrong type name reported on missing property error. ## Issue-Description: /\*\* \* @constructor \*/ function C2() {} /\*\* \* @constructor \*/ function C3(c2) { /\*\* \* @type {C2} \* @private \*/ this.c2\_; use(this.c2\_.prop); } ...
6,850
[ "com.google.javascript.jscomp.TypeValidator" ]
07cf137f8e93b1b3ea8d9d5deb05baafa7244be45fb719b13791f8e28a6b7d8e
public void testIssue1047() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue1047` for the issue `Closure-1047`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1047 // // ## Issue-Title: // Wrong type name reported on missing property 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...
@SuppressWarnings({ "unchecked", "rawtypes" }) public void testCustomEnumValueAndKeyViaModifier() throws IOException { SimpleModule module = new SimpleModule(); module.setDeserializerModifier(new BeanDeserializerModifier() { @Override public JsonDeserializer<E...
com.fasterxml.jackson.databind.module.TestCustomEnumKeyDeserializer::testCustomEnumValueAndKeyViaModifier
src/test/java/com/fasterxml/jackson/databind/module/TestCustomEnumKeyDeserializer.java
279
src/test/java/com/fasterxml/jackson/databind/module/TestCustomEnumKeyDeserializer.java
testCustomEnumValueAndKeyViaModifier
package com.fasterxml.jackson.databind.module; import java.io.File; import java.io.IOException; import java.util.*; import org.junit.Test; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.dat...
// You are a professional Java test case writer, please create a test case named `testCustomEnumValueAndKeyViaModifier` for the issue `JacksonDatabind-1445`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1445 // // ## Issue-Title: // Map key des...
279
// [databind#1445]
67
228
src/test/java/com/fasterxml/jackson/databind/module/TestCustomEnumKeyDeserializer.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1445 ## Issue-Title: Map key deserializerModifiers ignored ## Issue-Description: We have a module that extends simple model to allow us to accept enum names in lower case in a fairly generic manner Inside that we add the `modifyKeyDeserializer` The incoming class (using...
228
[ "com.fasterxml.jackson.databind.deser.BasicDeserializerFactory" ]
07eae1ed4d266e930fc9bee30abaffb2bf09fcdb47d1a7a371337c99c601b4a0
@SuppressWarnings({ "unchecked", "rawtypes" }) public void testCustomEnumValueAndKeyViaModifier() throws IOException
// You are a professional Java test case writer, please create a test case named `testCustomEnumValueAndKeyViaModifier` for the issue `JacksonDatabind-1445`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1445 // // ## Issue-Title: // Map key des...
JacksonDatabind
package com.fasterxml.jackson.databind.module; import java.io.File; import java.io.IOException; import java.util.*; import org.junit.Test; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.dat...
public void testDisappearingMixins515() throws Exception { ObjectMapper mapper = new ObjectMapper(); mapper.disable(MapperFeature.ALLOW_FINAL_FIELDS_AS_MUTATORS) .disable(MapperFeature.AUTO_DETECT_FIELDS) .disable(MapperFeature.AUTO_DETECT_GETTERS) .disable(Ma...
com.fasterxml.jackson.databind.introspect.TestMixinMerging::testDisappearingMixins515
src/test/java/com/fasterxml/jackson/databind/introspect/TestMixinMerging.java
48
src/test/java/com/fasterxml/jackson/databind/introspect/TestMixinMerging.java
testDisappearingMixins515
package com.fasterxml.jackson.databind.introspect; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.module.SimpleModule; public class TestMixinMerging extends BaseMapTest { public interface Contact { String getCity(); ...
// You are a professional Java test case writer, please create a test case named `testDisappearingMixins515` for the issue `JacksonDatabind-515`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-515 // // ## Issue-Title: // Mixin annotations lost w...
48
// for [Issue#515] /* /********************************************************** /* Unit tests /********************************************************** */
5
35
src/test/java/com/fasterxml/jackson/databind/introspect/TestMixinMerging.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-515 ## Issue-Title: Mixin annotations lost when using a mixin class hierarchy with non-mixin interfaces ## Issue-Description: In summary, mixin annotations are lost when Jackson scans a parent mixin class with Json annotations followed by an interface implemented by the pare...
35
[ "com.fasterxml.jackson.databind.introspect.AnnotatedClass" ]
087f36d21997ef4790c74a98f969082973773cace36a3204ae644d604f73103c
public void testDisappearingMixins515() throws Exception
// You are a professional Java test case writer, please create a test case named `testDisappearingMixins515` for the issue `JacksonDatabind-515`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-515 // // ## Issue-Title: // Mixin annotations lost w...
JacksonDatabind
package com.fasterxml.jackson.databind.introspect; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.module.SimpleModule; public class TestMixinMerging extends BaseMapTest { public interface Contact { String getCity(); ...
public void testEscapeHtmlHighUnicode() throws java.io.UnsupportedEncodingException { // this is the utf8 representation of the character: // COUNTING ROD UNIT DIGIT THREE // in unicode // codepoint: U+1D362 byte[] data = new byte[] { (byte)0xF0, (byte)0x9D, (byte)0x8D, (byte...
org.apache.commons.lang.StringEscapeUtilsTest::testEscapeHtmlHighUnicode
src/test/org/apache/commons/lang/StringEscapeUtilsTest.java
430
src/test/org/apache/commons/lang/StringEscapeUtilsTest.java
testEscapeHtmlHighUnicode
/* * 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 `testEscapeHtmlHighUnicode` for the issue `Lang-LANG-480`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-480 // // ## Issue-Title: // StringEscapeUtils.escapeHtml incorre...
430
// https://issues.apache.org/jira/browse/LANG-480
42
419
src/test/org/apache/commons/lang/StringEscapeUtilsTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-480 ## Issue-Title: StringEscapeUtils.escapeHtml incorrectly converts unicode characters above U+00FFFF into 2 characters ## Issue-Description: Characters that are represented as a 2 characters internaly by java are incorrectly converted by the function. The following test displa...
419
[ "org.apache.commons.lang.Entities" ]
09e21fc9f93ec3b58ce73a20100c02baa5b8011972117677c0d29019423b3d43
public void testEscapeHtmlHighUnicode() throws java.io.UnsupportedEncodingException
// You are a professional Java test case writer, please create a test case named `testEscapeHtmlHighUnicode` for the issue `Lang-LANG-480`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-480 // // ## Issue-Title: // StringEscapeUtils.escapeHtml incorre...
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(expected = IllegalArgumentException.class) public void testGetStringInconsistentRecord() { header.put("fourth", Integer.valueOf(4)); recordWithHeader.get("fourth"); }
org.apache.commons.csv.CSVRecordTest::testGetStringInconsistentRecord
src/test/java/org/apache/commons/csv/CSVRecordTest.java
69
src/test/java/org/apache/commons/csv/CSVRecordTest.java
testGetStringInconsistentRecord
/* * 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 `testGetStringInconsistentRecord` for the issue `Csv-CSV-96`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-96 // // ## Issue-Title: // CSVRecord does not verify that the l...
69
2
65
src/test/java/org/apache/commons/csv/CSVRecordTest.java
src/test/java
```markdown ## Issue-ID: Csv-CSV-96 ## Issue-Title: CSVRecord does not verify that the length of the header mapping matches the number of values ## Issue-Description: CSVRecord does not verify that the size of the header mapping matches the number of values. The following test will produce a ArrayOutOfBoundsExcept...
65
[ "org.apache.commons.csv.CSVRecord" ]
0a2f6014ca50ba51e4edfca75d3e15e95f8108af79f28766048809a9bf6fd911
@Test(expected = IllegalArgumentException.class) public void testGetStringInconsistentRecord()
// You are a professional Java test case writer, please create a test case named `testGetStringInconsistentRecord` for the issue `Csv-CSV-96`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-96 // // ## Issue-Title: // CSVRecord does not verify that the l...
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 testSymbolTableExpansionBytes() throws Exception { _testSymbolTableExpansion(true); }
com.fasterxml.jackson.core.sym.SymbolsViaParserTest::testSymbolTableExpansionBytes
src/test/java/com/fasterxml/jackson/core/sym/SymbolsViaParserTest.java
32
src/test/java/com/fasterxml/jackson/core/sym/SymbolsViaParserTest.java
testSymbolTableExpansionBytes
package com.fasterxml.jackson.core.sym; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.HashSet; import com.fasterxml.jackson.core.*; /** * Tests that use symbol table functionality through parser. */ public class SymbolsViaParserTest extends com.fasterxml.jackson.core.BaseTes...
// You are a professional Java test case writer, please create a test case named `testSymbolTableExpansionBytes` for the issue `JacksonCore-216`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-216 // // ## Issue-Title: // ArrayIndexOutOfBoundsExcepti...
32
// for [jackson-core#216]
11
30
src/test/java/com/fasterxml/jackson/core/sym/SymbolsViaParserTest.java
src/test/java
```markdown ## Issue-ID: JacksonCore-216 ## Issue-Title: ArrayIndexOutOfBoundsException: 128 when repeatedly serializing to a byte array ## Issue-Description: ``` java.lang.ArrayIndexOutOfBoundsException: 128 at com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer.addName(ByteQuadsCanonicalizer.java:853) ...
30
[ "com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer" ]
0a65e0609f40f9f4ca3a294cb7a25a7f8be29dea86533bc5633d37a768f6352f
public void testSymbolTableExpansionBytes() throws Exception
// You are a professional Java test case writer, please create a test case named `testSymbolTableExpansionBytes` for the issue `JacksonCore-216`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-216 // // ## Issue-Title: // ArrayIndexOutOfBoundsExcepti...
JacksonCore
package com.fasterxml.jackson.core.sym; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.HashSet; import com.fasterxml.jackson.core.*; /** * Tests that use symbol table functionality through parser. */ public class SymbolsViaParserTest extends com.fasterxml.jackson.core.BaseTes...
public void testIssue925() { test( "if (x[--y] === 1) {\n" + " x[y] = 0;\n" + "} else {\n" + " x[y] = 1;\n" + "}", "(x[--y] === 1) ? x[y] = 0 : x[y] = 1;"); test( "if (x[--y]) {\n" + " a = 0;\n" + "} else {\n" + " a =...
com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntaxTest::testIssue925
test/com/google/javascript/jscomp/PeepholeSubstituteAlternateSyntaxTest.java
987
test/com/google/javascript/jscomp/PeepholeSubstituteAlternateSyntaxTest.java
testIssue925
/* * 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 `testIssue925` for the issue `Closure-925`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-925 // // ## Issue-Title: // if statement // // ## Issue-Description: // **What ...
987
132
965
test/com/google/javascript/jscomp/PeepholeSubstituteAlternateSyntaxTest.java
test
```markdown ## Issue-ID: Closure-925 ## Issue-Title: if statement ## Issue-Description: **What steps will reproduce the problem?** INPUT: if( es[--esi][ es[esi+1] ] === 1) { es[esi] = 0; } else { es[esi] = 1; } OUTPUT: es[esi] = 1 === es[--esi][es[esi + 1]] ? 0 : 1; BUT MUST BE es[--esi] = 1 === e...
965
[ "com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntax" ]
0a901c2d99ba7e71ce4fe08c81a6650b2301e27afd561ada89f37c1462772bc8
public void testIssue925()
// You are a professional Java test case writer, please create a test case named `testIssue925` for the issue `Closure-925`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-925 // // ## Issue-Title: // if statement // // ## Issue-Description: // **What ...
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 testExternalIssue1053() { testSame( "var u; function f() { u = Random(); var x = u; f(); alert(x===u)}"); }
com.google.javascript.jscomp.InlineVariablesTest::testExternalIssue1053
test/com/google/javascript/jscomp/InlineVariablesTest.java
1,070
test/com/google/javascript/jscomp/InlineVariablesTest.java
testExternalIssue1053
/* * 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 `testExternalIssue1053` for the issue `Closure-1053`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1053 // // ## Issue-Title: // Overzealous optimization confuses variable...
1,070
120
1,067
test/com/google/javascript/jscomp/InlineVariablesTest.java
test
```markdown ## Issue-ID: Closure-1053 ## Issue-Title: Overzealous optimization confuses variables ## Issue-Description: The following code: // ==ClosureCompiler== // @compilation\_level ADVANCED\_OPTIMIZATIONS // ==/ClosureCompiler== var uid; function reset() { uid = Math.random(); } function doSt...
1,067
[ "com.google.javascript.jscomp.ReferenceCollectingCallback" ]
0b1e20643f18c1d4b2d447b868dc0741f9002554dc8286d52f2b5af3d6439a05
public void testExternalIssue1053()
// You are a professional Java test case writer, please create a test case named `testExternalIssue1053` for the issue `Closure-1053`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1053 // // ## Issue-Title: // Overzealous optimization confuses variable...
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 testEncoder() throws EncoderException { Encoder enc = new Base64(); for (int i = 0; i < STRINGS.length; i++) { if (STRINGS[i] != null) { byte[] base64 = utf8(STRINGS[i]); byte[] binary = BYTES[i]; boolean b = Arrays.equals(base6...
org.apache.commons.codec.binary.Base64Codec13Test::testEncoder
src/test/org/apache/commons/codec/binary/Base64Codec13Test.java
380
src/test/org/apache/commons/codec/binary/Base64Codec13Test.java
testEncoder
/* * 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 `testEncoder` for the issue `Codec-CODEC-89`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-89 // // ## Issue-Title: // new Base64().encode() appends a CRLF, and chunks...
380
/** * Tests to make sure Base64's implementation of the org.apache.commons.codec.Encoder * interface is behaving identical to commons-codec-1.3.jar. * * @throws EncoderException problem */
4
370
src/test/org/apache/commons/codec/binary/Base64Codec13Test.java
src/test
```markdown ## Issue-ID: Codec-CODEC-89 ## Issue-Title: new Base64().encode() appends a CRLF, and chunks results into 76 character lines ## Issue-Description: The instance encode() method (e.g. new Base64().encode()) appends a CRLF. Actually it's fully chunking the output into 76 character lines. Commons-Codec-1.3...
370
[ "org.apache.commons.codec.binary.Base64" ]
0b3bc7e2a53390a7136932f4a52cf0474b8e7aee8becedf935d9469cdddca796
public void testEncoder() throws EncoderException
// You are a professional Java test case writer, please create a test case named `testEncoder` for the issue `Codec-CODEC-89`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-89 // // ## Issue-Title: // new Base64().encode() appends a CRLF, and chunks...
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 testBigDecimal() { BigDecimal o1 = new BigDecimal("2.0"); BigDecimal o2 = new BigDecimal("2.00"); assertTrue(new EqualsBuilder().append(o1, o1).isEquals()); assertTrue(new EqualsBuilder().append(o1, o2).isEquals()); }
org.apache.commons.lang.builder.EqualsBuilderTest::testBigDecimal
src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java
385
src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java
testBigDecimal
/* * 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 `testBigDecimal` for the issue `Lang-LANG-393`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-393 // // ## Issue-Title: // EqualsBuilder don't compare BigDecimals correct...
385
// https://issues.apache.org/jira/browse/LANG-393
48
380
src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-393 ## Issue-Title: EqualsBuilder don't compare BigDecimals correctly ## Issue-Description: When comparing a BigDecimal, the comparing is made using equals, not compareTo, which is more appropriate in the case of BigDecimal. ``` You are a professional Java test case writer...
380
[ "org.apache.commons.lang.builder.EqualsBuilder" ]
0be03ff601b5b4e22dfe2c53c818917daf5b757cc8a1c7a3c0cc641c5578a373
public void testBigDecimal()
// You are a professional Java test case writer, please create a test case named `testBigDecimal` for the issue `Lang-LANG-393`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-393 // // ## Issue-Title: // EqualsBuilder don't compare BigDecimals correct...
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 testPolymorphicTypeViaCustom() throws Exception { Base1270<Poly1> req = new Base1270<Poly1>(); Poly1 o = new Poly1(); o.val = "optionValue"; req.options = o; req.val = "some value"; Top1270 top = new Top1270(); top.b = req; String json = MA...
com.fasterxml.jackson.databind.jsontype.TestCustomTypeIdResolver::testPolymorphicTypeViaCustom
src/test/java/com/fasterxml/jackson/databind/jsontype/TestCustomTypeIdResolver.java
228
src/test/java/com/fasterxml/jackson/databind/jsontype/TestCustomTypeIdResolver.java
testPolymorphicTypeViaCustom
package com.fasterxml.jackson.databind.jsontype; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.annotation.JsonTypeInfo.As; import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind....
// You are a professional Java test case writer, please create a test case named `testPolymorphicTypeViaCustom` for the issue `JacksonDatabind-1270`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1270 // // ## Issue-Title: // Generic type return...
228
// for [databind#1270]
51
210
src/test/java/com/fasterxml/jackson/databind/jsontype/TestCustomTypeIdResolver.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1270 ## Issue-Title: Generic type returned from type id resolver seems to be ignored ## Issue-Description: <https://github.com/benson-basis/jackson-custom-mess-tc> Here's the situation, with Jackson 2.7.4. I have a TypeIdResolver that returns a JavaType for a generic typ...
210
[ "com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase" ]
0bf0b58e9d52cb0c7335793fbbef44cca00395ba2db2f9b50753c308d0075f92
public void testPolymorphicTypeViaCustom() throws Exception
// You are a professional Java test case writer, please create a test case named `testPolymorphicTypeViaCustom` for the issue `JacksonDatabind-1270`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1270 // // ## Issue-Title: // Generic type return...
JacksonDatabind
package com.fasterxml.jackson.databind.jsontype; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.annotation.JsonTypeInfo.As; import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind....
public void testCauseOfThrowableIgnoral() throws Exception { final SecurityManager origSecMan = System.getSecurityManager(); try { System.setSecurityManager(new CauseBlockingSecurityManager()); _testCauseOfThrowableIgnoral(); } finally { System.setSecu...
com.fasterxml.jackson.databind.misc.AccessFixTest::testCauseOfThrowableIgnoral
src/test/java/com/fasterxml/jackson/databind/misc/AccessFixTest.java
32
src/test/java/com/fasterxml/jackson/databind/misc/AccessFixTest.java
testCauseOfThrowableIgnoral
package com.fasterxml.jackson.databind.misc; import java.io.IOException; import java.security.Permission; import com.fasterxml.jackson.databind.*; // Test(s) to verify that forced access works as expected public class AccessFixTest extends BaseMapTest { static class CauseBlockingSecurityManager extends S...
// You are a professional Java test case writer, please create a test case named `testCauseOfThrowableIgnoral` for the issue `JacksonDatabind-877`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-877 // // ## Issue-Title: // @JsonIgnoreProperties:...
32
// as it is never actually used (always call `initCause()` instead) // [databind#877]: avoid forcing access to `cause` field of `Throwable`
58
23
src/test/java/com/fasterxml/jackson/databind/misc/AccessFixTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-877 ## Issue-Title: @JsonIgnoreProperties: ignoring the "cause" property of Throwable on GAE ## Issue-Description: Deserializing an exception class from json on Google App Engine causes this error: ``` Caused by: java.lang.IllegalArgumentException: Can not access private ...
23
[ "com.fasterxml.jackson.databind.deser.BeanDeserializerFactory" ]
0c321bf5e5a5b298337890281c78200331904ba91798249836158efdc396d20f
public void testCauseOfThrowableIgnoral() throws Exception
// You are a professional Java test case writer, please create a test case named `testCauseOfThrowableIgnoral` for the issue `JacksonDatabind-877`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-877 // // ## Issue-Title: // @JsonIgnoreProperties:...
JacksonDatabind
package com.fasterxml.jackson.databind.misc; import java.io.IOException; import java.security.Permission; import com.fasterxml.jackson.databind.*; // Test(s) to verify that forced access works as expected public class AccessFixTest extends BaseMapTest { static class CauseBlockingSecurityManager extends S...
public void testOffsetWithInputOffset() throws Exception { final JsonFactory f = new JsonFactory(); JsonLocation loc; JsonParser p; // 3 spaces before, 2 after, just for padding byte[] b = " { } ".getBytes("UTF-8"); // and then peel them off p = f.crea...
com.fasterxml.jackson.core.json.TestLocation::testOffsetWithInputOffset
src/test/java/com/fasterxml/jackson/core/json/TestLocation.java
79
src/test/java/com/fasterxml/jackson/core/json/TestLocation.java
testOffsetWithInputOffset
package com.fasterxml.jackson.core.json; import com.fasterxml.jackson.core.*; // NOTE: just a stub so for, fill me! public class TestLocation extends com.fasterxml.jackson.test.BaseTest { // Trivially simple unit test for basics wrt offsets public void testSimpleInitialOffsets() throws Exception { ...
// You are a professional Java test case writer, please create a test case named `testOffsetWithInputOffset` for the issue `JacksonCore-111`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-111 // // ## Issue-Title: // _currInputRowStart isn't initial...
79
// for [Issue#111]
3
54
src/test/java/com/fasterxml/jackson/core/json/TestLocation.java
src/test/java
```markdown ## Issue-ID: JacksonCore-111 ## Issue-Title: _currInputRowStart isn't initialized in UTF8StreamJsonParser() constructor. The column position will be wrong. ## Issue-Description: The UTF8StreamJson Parser constructor allows to specify the start position. But it doesn't set the "\_currInputRowStart" as th...
54
[ "com.fasterxml.jackson.core.json.UTF8StreamJsonParser" ]
0c9c4815231007cb0481f58f73678fcf99ede10d957e82300e3b609e4623b460
public void testOffsetWithInputOffset() throws Exception
// You are a professional Java test case writer, please create a test case named `testOffsetWithInputOffset` for the issue `JacksonCore-111`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-111 // // ## Issue-Title: // _currInputRowStart isn't initial...
JacksonCore
package com.fasterxml.jackson.core.json; import com.fasterxml.jackson.core.*; // NOTE: just a stub so for, fill me! public class TestLocation extends com.fasterxml.jackson.test.BaseTest { // Trivially simple unit test for basics wrt offsets public void testSimpleInitialOffsets() throws Exception { ...
public void testMapToProperties() throws Exception { Bean bean = new Bean(); bean.A = 129; bean.B = "13"; Properties props = MAPPER.convertValue(bean, Properties.class); assertEquals(2, props.size()); assertEquals("13", props.getProperty("B")); // should...
com.fasterxml.jackson.databind.convert.TestMapConversions::testMapToProperties
src/test/java/com/fasterxml/jackson/databind/convert/TestMapConversions.java
113
src/test/java/com/fasterxml/jackson/databind/convert/TestMapConversions.java
testMapToProperties
package com.fasterxml.jackson.databind.convert; import java.util.*; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.util.StdConverter; public class TestMapConversions ...
// You are a professional Java test case writer, please create a test case named `testMapToProperties` for the issue `JacksonDatabind-810`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-810 // // ## Issue-Title: // Force value coercion for java....
113
// [databind#810]
19
101
src/test/java/com/fasterxml/jackson/databind/convert/TestMapConversions.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-810 ## Issue-Title: Force value coercion for java.util.Properties, so that values are Strings ## Issue-Description: Currently there is no custom handling for `java.util.Properties`, and although it is possible to use it (since it really is a `Map` under the hood), results ar...
101
[ "com.fasterxml.jackson.databind.type.TypeFactory" ]
0cc038c14964d85eb2eb9e02db66d57cc6b055ec4a629f3b9049ab079f6d05e9
public void testMapToProperties() throws Exception
// You are a professional Java test case writer, please create a test case named `testMapToProperties` for the issue `JacksonDatabind-810`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-810 // // ## Issue-Title: // Force value coercion for java....
JacksonDatabind
package com.fasterxml.jackson.databind.convert; import java.util.*; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.util.StdConverter; public class TestMapConversions ...
public void testGetprop4() throws Exception { testTypes("var x = null; x.prop = 3;", "No properties on this expression\n" + "found : null\n" + "required: Object"); }
com.google.javascript.jscomp.TypeCheckTest::testGetprop4
test/com/google/javascript/jscomp/TypeCheckTest.java
3,930
test/com/google/javascript/jscomp/TypeCheckTest.java
testGetprop4
/* * 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 `testGetprop4` for the issue `Closure-810`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-810 // // ## Issue-Title: // Record type invalid property not reported on function...
3,930
11
3,925
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-810 ## Issue-Title: Record type invalid property not reported on function with @this annotation ## Issue-Description: Code: var makeClass = function(protoMethods) { var clazz = function() { this.initialize.apply(this, arguments); } for (var i in protoMethods) { clazz.pr...
3,925
[ "com.google.javascript.jscomp.TypeCheck" ]
0d6678696c911b9ae38c26f9ee00702e7b83d41b3a130f91b31408e84639cbb6
public void testGetprop4() throws Exception
// You are a professional Java test case writer, please create a test case named `testGetprop4` for the issue `Closure-810`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-810 // // ## Issue-Title: // Record type invalid property not reported on function...
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 testNumberAsStringDeserialization() { Number value = gson.fromJson("\"18\"", Number.class); assertEquals(18, value.intValue()); }
com.google.gson.functional.PrimitiveTest::testNumberAsStringDeserialization
gson/src/test/java/com/google/gson/functional/PrimitiveTest.java
163
gson/src/test/java/com/google/gson/functional/PrimitiveTest.java
testNumberAsStringDeserialization
/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// You are a professional Java test case writer, please create a test case named `testNumberAsStringDeserialization` for the issue `Gson-964`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-964 // // ## Issue-Title: // Allow deserialization of a Number repr...
163
11
160
gson/src/test/java/com/google/gson/functional/PrimitiveTest.java
gson/src/test/java
```markdown ## Issue-ID: Gson-964 ## Issue-Title: Allow deserialization of a Number represented as a String ## Issue-Description: This works: ``` gson.fromJson("\"15\"", int.class) ``` This doesn't: ``` gson.fromJson("\"15\"", Number.class) ``` This PR makes it so the second case works too. ``` You a...
160
[ "com.google.gson.internal.bind.TypeAdapters" ]
0d9b16bc3594690dc6a4d30050f52a520430c540d44ff39a4e60a10c232357e6
public void testNumberAsStringDeserialization()
// You are a professional Java test case writer, please create a test case named `testNumberAsStringDeserialization` for the issue `Gson-964`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-964 // // ## Issue-Title: // Allow deserialization of a Number repr...
Gson
/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
public void testLongLineChunkingIndentIgnored() throws ParseException, IOException { Options options = new Options(); options.addOption("x", "extralongarg", false, "This description is Long." ); HelpFormatter formatter = new HelpFormatter(); StringWriter sw = new StringWriter(); ...
org.apache.commons.cli.bug.BugCLI162Test::testLongLineChunkingIndentIgnored
src/test/org/apache/commons/cli/bug/BugCLI162Test.java
280
src/test/org/apache/commons/cli/bug/BugCLI162Test.java
testLongLineChunkingIndentIgnored
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// You are a professional Java test case writer, please create a test case named `testLongLineChunkingIndentIgnored` for the issue `Cli-CLI-162`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-162 // // ## Issue-Title: // infinite loop in the wrapping co...
280
25
263
src/test/org/apache/commons/cli/bug/BugCLI162Test.java
src/test
```markdown ## Issue-ID: Cli-CLI-162 ## Issue-Title: infinite loop in the wrapping code of HelpFormatter ## Issue-Description: If there is not enough space to display a word on a single line, HelpFormatter goes into a infinite loops until the JVM crashes with an OutOfMemoryError. Test case: ``` Options optio...
263
[ "org.apache.commons.cli.HelpFormatter" ]
0db33056a501a1f41b22e9a9ea8468dcdcb04e835d513f7a80372e82b0788b17
public void testLongLineChunkingIndentIgnored() throws ParseException, IOException
// You are a professional Java test case writer, please create a test case named `testLongLineChunkingIndentIgnored` for the issue `Cli-CLI-162`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-162 // // ## Issue-Title: // infinite loop in the wrapping co...
Cli
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
public void testCreateNumber() { // a lot of things can go wrong assertEquals("createNumber(String) 1 failed", new Float("1234.5"), NumberUtils.createNumber("1234.5")); assertEquals("createNumber(String) 2 failed", new Integer("12345"), NumberUtils.createNumber("12345")); assertEqual...
org.apache.commons.lang3.math.NumberUtilsTest::testCreateNumber
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
216
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
testCreateNumber
/* * 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 `testCreateNumber` for the issue `Lang-LANG-638`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-638 // // ## Issue-Title: // NumberUtils createNumber throws a StringIndex...
216
27
175
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-638 ## Issue-Title: NumberUtils createNumber throws a StringIndexOutOfBoundsException when argument containing "e" and "E" is passed in ## Issue-Description: NumberUtils createNumber throws a StringIndexOutOfBoundsException instead of NumberFormatException when a String containin...
175
[ "org.apache.commons.lang3.math.NumberUtils" ]
0e775b0e1b955e52c4aa702af1630060a82ba36598d01a18b929143336124559
public void testCreateNumber()
// You are a professional Java test case writer, please create a test case named `testCreateNumber` for the issue `Lang-LANG-638`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-638 // // ## Issue-Title: // NumberUtils createNumber throws a StringIndex...
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 testMath718() { // for large trials the evaluation of ContinuedFraction was inaccurate // do a sweep over several large trials to test if the current implementation is // numerically stable. for (int trials = 500000; trials < 20000000; trials += 100000) { ...
org.apache.commons.math3.distribution.BinomialDistributionTest::testMath718
src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java
143
src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java
testMath718
/* * 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 `testMath718` for the issue `Math-MATH-718`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-718 // // ## Issue-Title: // inverseCumulativeProbability of BinomialDistributi...
143
31
131
src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-718 ## Issue-Title: inverseCumulativeProbability of BinomialDistribution returns wrong value for large trials. ## Issue-Description: The inverseCumulativeProbability method of the BinomialDistributionImpl class returns wrong value for large trials. Following code will be reproduc...
131
[ "org.apache.commons.math3.util.ContinuedFraction" ]
0eceeb94c3061dbedfb0f08ec976aea989d49d3dba7c81e628fb8d65f1136578
@Test public void testMath718()
// You are a professional Java test case writer, please create a test case named `testMath718` for the issue `Math-MATH-718`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-718 // // ## Issue-Title: // inverseCumulativeProbability of BinomialDistributi...
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...
@Test public void discardsSpuriousByteOrderMarkWhenNoCharsetSet() { String html = "\uFEFF<html><head><title>One</title></head><body>Two</body></html>"; ByteBuffer buffer = Charset.forName("UTF-8").encode(html); Document doc = DataUtil.parseByteData(buffer, null, "http://foo.com/", Parser.htm...
org.jsoup.helper.DataUtilTest::discardsSpuriousByteOrderMarkWhenNoCharsetSet
src/test/java/org/jsoup/helper/DataUtilTest.java
43
src/test/java/org/jsoup/helper/DataUtilTest.java
discardsSpuriousByteOrderMarkWhenNoCharsetSet
package org.jsoup.helper; import org.jsoup.nodes.Document; import org.jsoup.parser.Parser; import org.junit.Test; import java.nio.ByteBuffer; import java.nio.charset.Charset; import static org.junit.Assert.assertEquals; public class DataUtilTest { @Test public void testCharset() { assertEquals("utf-...
// You are a professional Java test case writer, please create a test case named `discardsSpuriousByteOrderMarkWhenNoCharsetSet` for the issue `Jsoup-348`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-348 // // ## Issue-Title: // JSoup incorrectly moves ...
43
39
37
src/test/java/org/jsoup/helper/DataUtilTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-348 ## Issue-Title: JSoup incorrectly moves content from the <head> section into <body> for sample URL ## Issue-Description: If you load the following URL: ``` http://jornutzon.sydneyoperahouse.com/home.htm ``` into: ``` http://try.jsoup.org/ ``` then it will move the conten...
37
[ "org.jsoup.helper.DataUtil" ]
0ef1d441e2b50fd5fd41ba1f387a6759a0f1a35b65ab93fdb57319f26803b6c5
@Test public void discardsSpuriousByteOrderMarkWhenNoCharsetSet()
// You are a professional Java test case writer, please create a test case named `discardsSpuriousByteOrderMarkWhenNoCharsetSet` for the issue `Jsoup-348`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-348 // // ## Issue-Title: // JSoup incorrectly moves ...
Jsoup
package org.jsoup.helper; import org.jsoup.nodes.Document; import org.jsoup.parser.Parser; import org.junit.Test; import java.nio.ByteBuffer; import java.nio.charset.Charset; import static org.junit.Assert.assertEquals; public class DataUtilTest { @Test public void testCharset() { assertEquals("utf-...
public void testNullSafeBugDeserialize() throws Exception { Device device = gson.fromJson("{'id':'ec57803e2'}", Device.class); assertEquals("ec57803e2", device.id); }
com.google.gson.regression.JsonAdapterNullSafeTest::testNullSafeBugDeserialize
gson/src/test/java/com/google/gson/regression/JsonAdapterNullSafeTest.java
36
gson/src/test/java/com/google/gson/regression/JsonAdapterNullSafeTest.java
testNullSafeBugDeserialize
/* * Copyright (C) 2016 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 `testNullSafeBugDeserialize` for the issue `Gson-800`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-800 // // ## Issue-Title: // Fixed a regression in Gson 2.6 where Gson cau...
36
6
33
gson/src/test/java/com/google/gson/regression/JsonAdapterNullSafeTest.java
gson/src/test/java
```markdown ## Issue-ID: Gson-800 ## Issue-Title: Fixed a regression in Gson 2.6 where Gson caused NPE if the TypeAdapt… ## Issue-Description: …erFactory.create() returned null. ``` You are a professional Java test case writer, please create a test case named `testNullSafeBugDeserialize` for the issue `Gson-80...
33
[ "com.google.gson.internal.bind.JsonAdapterAnnotationTypeAdapterFactory" ]
0fe67d3707dfee04d2a96e1ee61958f0026324d109d4fb0a6db95de64330b511
public void testNullSafeBugDeserialize() throws Exception
// You are a professional Java test case writer, please create a test case named `testNullSafeBugDeserialize` for the issue `Gson-800`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-800 // // ## Issue-Title: // Fixed a regression in Gson 2.6 where Gson cau...
Gson
/* * Copyright (C) 2016 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 testUnivariateDistribution() { final double[] mu = { -1.5 }; final double[][] sigma = { { 1 } }; final MultivariateNormalDistribution multi = new MultivariateNormalDistribution(mu, sigma); final NormalDistribution uni = new NormalDistribution(mu[0], sigma[0][...
org.apache.commons.math3.distribution.MultivariateNormalDistributionTest::testUnivariateDistribution
src/test/java/org/apache/commons/math3/distribution/MultivariateNormalDistributionTest.java
152
src/test/java/org/apache/commons/math3/distribution/MultivariateNormalDistributionTest.java
testUnivariateDistribution
/* * 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 `testUnivariateDistribution` for the issue `Math-MATH-929`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-929 // // ## Issue-Title: // MultivariateNormalDistribution.dens...
152
/** * Test the accuracy of the distribution when calculating densities. */
11
137
src/test/java/org/apache/commons/math3/distribution/MultivariateNormalDistributionTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-929 ## Issue-Title: MultivariateNormalDistribution.density(double[]) returns wrong value when the dimension is odd ## Issue-Description: To reproduce: ``` Assert.assertEquals(0.398942280401433, new MultivariateNormalDistribution(new double[]{0}, new double[][]{{1}}).density(n...
137
[ "org.apache.commons.math3.distribution.MultivariateNormalDistribution" ]
10242451b83c50d9aa25fb2900dbbdaf211cead024c525cac6dba584fadc8d1e
@Test public void testUnivariateDistribution()
// You are a professional Java test case writer, please create a test case named `testUnivariateDistribution` for the issue `Math-MATH-929`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-929 // // ## Issue-Title: // MultivariateNormalDistribution.dens...
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 readOfLength0ShouldReturn0() throws Exception { // Create a big random piece of data byte[] rawData = new byte[1048576]; for (int i=0; i < rawData.length; ++i) { rawData[i] = (byte) Math.floor(Math.random()*256); } // Compress it Byt...
org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStreamTest::readOfLength0ShouldReturn0
src/test/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStreamTest.java
69
src/test/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStreamTest.java
readOfLength0ShouldReturn0
/* * 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 `readOfLength0ShouldReturn0` for the issue `Compress-COMPRESS-309`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-309 // // ## Issue-Title: // BZip2CompressorInpu...
69
/** * @see "https://issues.apache.org/jira/browse/COMPRESS-309" */
30
44
src/test/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStreamTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-309 ## Issue-Title: BZip2CompressorInputStream return value wrong when told to read to a full buffer. ## Issue-Description: BZip2CompressorInputStream.read(buffer, offset, length) returns -1 when given an offset equal to the length of the buffer. This indicates, not tha...
44
[ "org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream" ]
108d2f37ad1c176b66edf107c27b8bda3a7ef20b2351330d43624fb1a40dff5f
@Test public void readOfLength0ShouldReturn0() throws Exception
// You are a professional Java test case writer, please create a test case named `readOfLength0ShouldReturn0` for the issue `Compress-COMPRESS-309`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-309 // // ## Issue-Title: // BZip2CompressorInpu...
Compress
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
@Test public void shouldStubbingWork() { Mockito.when(iterable.iterator()).thenReturn(myIterator); Assert.assertNotNull(((Iterable) iterable).iterator()); Assert.assertNotNull(iterable.iterator()); }
org.mockitousage.bugs.InheritedGenericsPolimorphicCallTest::shouldStubbingWork
test/org/mockitousage/bugs/InheritedGenericsPolimorphicCallTest.java
40
test/org/mockitousage/bugs/InheritedGenericsPolimorphicCallTest.java
shouldStubbingWork
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.bugs; import static org.mockito.Mockito.*; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Iter...
// You are a professional Java test case writer, please create a test case named `shouldStubbingWork` for the issue `Mockito-200`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-200 // // ## Issue-Title: // ArgumentCaptor.fromClass's return type should m...
40
33
35
test/org/mockitousage/bugs/InheritedGenericsPolimorphicCallTest.java
test
```markdown ## Issue-ID: Mockito-200 ## Issue-Title: ArgumentCaptor.fromClass's return type should match a parameterized type ## Issue-Description: `ArgumentCaptor.fromClass`'s return type should match a parameterized type. I.e. the expression `ArgumentCaptor.fromClass(Class<S>)` should be of type `ArgumentCaptor<U...
35
[ "org.mockito.internal.invocation.InvocationMatcher" ]
10c7e110d2b238047b73953054906e4d0ab2403bc092e28ef69199c0888709c3
@Test public void shouldStubbingWork()
// You are a professional Java test case writer, please create a test case named `shouldStubbingWork` for the issue `Mockito-200`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-200 // // ## Issue-Title: // ArgumentCaptor.fromClass's return type should m...
Mockito
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.bugs; import static org.mockito.Mockito.*; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Iter...
public void testBug1955483() { XYSeries series = new XYSeries("Series", true, true); series.addOrUpdate(1.0, 1.0); series.addOrUpdate(1.0, 2.0); assertEquals(new Double(1.0), series.getY(0)); assertEquals(new Double(2.0), series.getY(1)); assertEquals(2, series.getIte...
org.jfree.data.xy.junit.XYSeriesTests::testBug1955483
tests/org/jfree/data/xy/junit/XYSeriesTests.java
482
tests/org/jfree/data/xy/junit/XYSeriesTests.java
testBug1955483
/* =========================================================== * 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 `testBug1955483` for the issue `Chart-862`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-862 // // ## Issue-Title: // #862 XYSeries.addOrUpdate() should add if duplicates ar...
482
/** * Another test for the addOrUpdate() method. */
5
475
tests/org/jfree/data/xy/junit/XYSeriesTests.java
tests
```markdown ## Issue-ID: Chart-862 ## Issue-Title: #862 XYSeries.addOrUpdate() should add if duplicates are allowed ## Issue-Description: Copied from this post (by Ted Schwartz) in the forum: <http://www.jfree.org/phpBB2/viewtopic.php?t=24523> I've found a bug in jfreechart-1.0.9 code for org.jfree.data.xy....
475
[ "org.jfree.data.xy.XYSeries" ]
10dc7c852f4654a2d3a8d795bdafb0279c7ee6ddc3e5bf6415a6b52c06fc188f
public void testBug1955483()
// You are a professional Java test case writer, please create a test case named `testBug1955483` for the issue `Chart-862`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-862 // // ## Issue-Title: // #862 XYSeries.addOrUpdate() should add if duplicates ar...
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 testCheckGlobalThisOff() { args.add("--warning_level=VERBOSE"); args.add("--jscomp_off=globalThis"); testSame("function f() { this.a = 3; }"); }
com.google.javascript.jscomp.CommandLineRunnerTest::testCheckGlobalThisOff
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
160
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
testCheckGlobalThisOff
/* * 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 `testCheckGlobalThisOff` for the issue `Closure-521`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-521 // // ## Issue-Title: // Cannot exclude globalThis checks through co...
160
59
156
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
test
```markdown ## Issue-ID: Closure-521 ## Issue-Title: Cannot exclude globalThis checks through command line ## Issue-Description: **What steps will reproduce the problem?** 1. Run command line utility 2. Supply flags --warning\_level VERBOSE --jscomp\_off globalThis --jscomp\_off nonStandardJsDocs **What is the ...
156
[ "com.google.javascript.jscomp.Compiler" ]
12f30b16a8c5b8d4120b385b1791f80f2776d1638d08f71db98c57eb1d84b33d
public void testCheckGlobalThisOff()
// You are a professional Java test case writer, please create a test case named `testCheckGlobalThisOff` for the issue `Closure-521`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-521 // // ## Issue-Title: // Cannot exclude globalThis checks through co...
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 testBrokenAnnotation() throws Exception { try { serializeAsString(MAPPER, new BrokenClass()); } catch (Exception e) { verifyException(e, "types not related"); } }
com.fasterxml.jackson.databind.ser.TestJsonSerialize::testBrokenAnnotation
src/test/java/com/fasterxml/jackson/databind/ser/TestJsonSerialize.java
153
src/test/java/com/fasterxml/jackson/databind/ser/TestJsonSerialize.java
testBrokenAnnotation
package com.fasterxml.jackson.databind.ser; import java.io.IOException; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.*; import com.fasterxml.jacks...
// You are a professional Java test case writer, please create a test case named `testBrokenAnnotation` for the issue `JacksonDatabind-1231`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1231 // // ## Issue-Title: // @JsonSerialize(as=superType...
153
47
146
src/test/java/com/fasterxml/jackson/databind/ser/TestJsonSerialize.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1231 ## Issue-Title: @JsonSerialize(as=superType) behavior disallowed in 2.7.4 ## Issue-Description: [#1178](https://github.com/FasterXML/jackson-databind/issues/1178) fixed the problem with collections, but I'm seeing a problem with individual objects. I'm getting: ```...
146
[ "com.fasterxml.jackson.databind.AnnotationIntrospector" ]
1499e12d0c8376f9d50aff4fadc8681d6c6cb744170331913fc44d7e9938fd34
public void testBrokenAnnotation() throws Exception
// You are a professional Java test case writer, please create a test case named `testBrokenAnnotation` for the issue `JacksonDatabind-1231`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1231 // // ## Issue-Title: // @JsonSerialize(as=superType...
JacksonDatabind
package com.fasterxml.jackson.databind.ser; import java.io.IOException; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.*; import com.fasterxml.jacks...
public void testStringJoinAdd() { fold("x = ['a', 'b', 'c'].join('')", "x = \"abc\""); fold("x = [].join(',')", "x = \"\""); fold("x = ['a'].join(',')", "x = \"a\""); fold("x = ['a', 'b', 'c'].join(',')", "x = \"a,b,c\""); fold("x = ['a', foo, 'b', 'c'].join(',')", "x = [\"a\",foo,\"b,c\"]...
com.google.javascript.jscomp.PeepholeReplaceKnownMethodsTest::testStringJoinAdd
test/com/google/javascript/jscomp/PeepholeReplaceKnownMethodsTest.java
126
test/com/google/javascript/jscomp/PeepholeReplaceKnownMethodsTest.java
testStringJoinAdd
/* * 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 `testStringJoinAdd` for the issue `Closure-558`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-558 // // ## Issue-Title: // Optimisation: convert array.join(",") to array.j...
126
50
81
test/com/google/javascript/jscomp/PeepholeReplaceKnownMethodsTest.java
test
```markdown ## Issue-ID: Closure-558 ## Issue-Title: Optimisation: convert array.join(",") to array.join() ## Issue-Description: **What steps will reproduce the problem?** Compile this code: var variable = confirm("value from user"); var array = [ "constant", variable ]; alert( array.join(",") ); **What...
81
[ "com.google.javascript.jscomp.PeepholeReplaceKnownMethods" ]
14dd45fd946d71103e88a9c15e037999fc0065fb44fabea64ff230dcfa790ecc
public void testStringJoinAdd()
// You are a professional Java test case writer, please create a test case named `testStringJoinAdd` for the issue `Closure-558`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-558 // // ## Issue-Title: // Optimisation: convert array.join(",") to array.j...
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 testUselessCode() { test("function f(x) { if(x) return; }", ok); test("function f(x) { if(x); }", "function f(x) { if(x); }", e); test("if(x) x = y;", ok); test("if(x) x == bar();", "if(x) JSCOMPILER_PRESERVE(x == bar());", e); test("x = 3;", ok); test("x == 3;", "JSCOMPILER_PRES...
com.google.javascript.jscomp.CheckSideEffectsTest::testUselessCode
test/com/google/javascript/jscomp/CheckSideEffectsTest.java
79
test/com/google/javascript/jscomp/CheckSideEffectsTest.java
testUselessCode
/* * Copyright 2006 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// You are a professional Java test case writer, please create a test case named `testUselessCode` for the issue `Closure-753`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-753 // // ## Issue-Title: // Classify non-rightmost expressions as problematic ...
79
final DiagnosticType ok = null; // no warning
22
48
test/com/google/javascript/jscomp/CheckSideEffectsTest.java
test
```markdown ## Issue-ID: Closure-753 ## Issue-Title: Classify non-rightmost expressions as problematic ## Issue-Description: **Purpose of code changes:** When it comes to an expression involving the comma operator, only the first element of such a sequence is checked for being free of side effects. If the element...
48
[ "com.google.javascript.jscomp.CheckSideEffects" ]
156bc91f96f5b059e61f1ca504b2a24ff02ea351f8b80c89a6a5730bef5b79bf
public void testUselessCode()
// You are a professional Java test case writer, please create a test case named `testUselessCode` for the issue `Closure-753`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-753 // // ## Issue-Title: // Classify non-rightmost expressions as problematic ...
Closure
/* * Copyright 2006 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
public void testIssue1002() throws Exception { testTypes( "/** @interface */" + "var I = function() {};" + "/** @constructor @implements {I} */" + "var A = function() {};" + "/** @constructor @implements {I} */" + "var B = function() {};" + "var f = function...
com.google.javascript.jscomp.TypeCheckTest::testIssue1002
test/com/google/javascript/jscomp/TypeCheckTest.java
6,752
test/com/google/javascript/jscomp/TypeCheckTest.java
testIssue1002
/* * 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 `testIssue1002` for the issue `Closure-1002`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1002 // // ## Issue-Title: // IllegalStateException at com.google.javascript.rhi...
6,752
125
6,739
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-1002 ## Issue-Title: IllegalStateException at com.google.javascript.rhino.jstype.FunctionType.getInstanceType ## Issue-Description: > What steps will reproduce the problem? 1. Unpack attached test case. 2. Ensure make, wget, unzip, and java are on your PATH 3. make prep (or just ...
6,739
[ "com.google.javascript.jscomp.TypeCheck" ]
158898ff6d956c43d2753fa96973ca0399173d14b4d4e9e760530c998ce20a28
public void testIssue1002() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue1002` for the issue `Closure-1002`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1002 // // ## Issue-Title: // IllegalStateException at com.google.javascript.rhi...
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 testCopyWith() throws Exception { XmlMapper xmlMapper = newMapper(); final ObjectMapper xmlMapperNoAnno = xmlMapper.copy() .disable(MapperFeature.USE_ANNOTATIONS) .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); String xml1 = xmlMapper.writ...
com.fasterxml.jackson.dataformat.xml.MapperCopyTest::testCopyWith
src/test/java/com/fasterxml/jackson/dataformat/xml/MapperCopyTest.java
90
src/test/java/com/fasterxml/jackson/dataformat/xml/MapperCopyTest.java
testCopyWith
package com.fasterxml.jackson.dataformat.xml; import java.io.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.ser.DefaultSerializerProvider; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; im...
// You are a professional Java test case writer, please create a test case named `testCopyWith` for the issue `JacksonXml-282`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonXml-282 // // ## Issue-Title: // @JacksonXmlRootElement malfunction when using i...
90
// [dataformat-xml#282]
5
73
src/test/java/com/fasterxml/jackson/dataformat/xml/MapperCopyTest.java
src/test/java
```markdown ## Issue-ID: JacksonXml-282 ## Issue-Title: @JacksonXmlRootElement malfunction when using it with multiple XmlMappers and disabling annotations ## Issue-Description: Found this in version 2.9.4 running some tests that go back and forth serializing with an XML mapper that uses annotations, and another on...
73
[ "com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider" ]
159cf5e1205d28f2d81d0975c400bc4178e2bcc775e289e0e111d588d15d5a94
public void testCopyWith() throws Exception
// You are a professional Java test case writer, please create a test case named `testCopyWith` for the issue `JacksonXml-282`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonXml-282 // // ## Issue-Title: // @JacksonXmlRootElement malfunction when using i...
JacksonXml
package com.fasterxml.jackson.dataformat.xml; import java.io.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.ser.DefaultSerializerProvider; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; im...
public void testIssue942() { assertPrint("var x = {0: 1};", "var x={0:1}"); }
com.google.javascript.jscomp.CodePrinterTest::testIssue942
test/com/google/javascript/jscomp/CodePrinterTest.java
1,423
test/com/google/javascript/jscomp/CodePrinterTest.java
testIssue942
/* * 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 `testIssue942` for the issue `Closure-942`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-942 // // ## Issue-Title: // The compiler quotes the "0" keys in object literals /...
1,423
128
1,421
test/com/google/javascript/jscomp/CodePrinterTest.java
test
```markdown ## Issue-ID: Closure-942 ## Issue-Title: The compiler quotes the "0" keys in object literals ## Issue-Description: **What steps will reproduce the problem?** 1. Compile alert({0:0, 1:1}); What is the expected output? alert({0:0, 1:1}); What do you see instead? alert({"0":0, 1:1}); **What vers...
1,421
[ "com.google.javascript.jscomp.CodeGenerator" ]
15d60e6645b093549e8c3de4539bca0e969d9c49f179eabf2a0ff154411dd46d
public void testIssue942()
// You are a professional Java test case writer, please create a test case named `testIssue942` for the issue `Closure-942`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-942 // // ## Issue-Title: // The compiler quotes the "0" keys in object literals /...
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 testGenericSignature1195() throws Exception { TypeFactory tf = TypeFactory.defaultInstance(); Method m; JavaType t; m = Generic1195.class.getMethod("getList"); t = tf.constructType(m.getGenericReturnType()); assertEquals("Ljava/util/List<Ljava/lang/S...
com.fasterxml.jackson.databind.type.TestJavaType::testGenericSignature1195
src/test/java/com/fasterxml/jackson/databind/type/TestJavaType.java
56
src/test/java/com/fasterxml/jackson/databind/type/TestJavaType.java
testGenericSignature1195
package com.fasterxml.jackson.databind.type; import java.lang.reflect.Method; import java.util.*; import java.util.concurrent.atomic.AtomicReference; import com.fasterxml.jackson.databind.BaseMapTest; import com.fasterxml.jackson.databind.JavaType; /** * Simple tests to verify that {@link JavaType} types work to *...
// You are a professional Java test case writer, please create a test case named `testGenericSignature1195` for the issue `JacksonDatabind-1194`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1194 // // ## Issue-Title: // Incorrect signature for...
56
46
38
src/test/java/com/fasterxml/jackson/databind/type/TestJavaType.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1194 ## Issue-Title: Incorrect signature for generic type via `JavaType.getGenericSignature ## Issue-Description: (see [FasterXML/jackson-modules-base#8](https://github.com/FasterXML/jackson-modules-base/issues/8) for background) It looks like generic signature generation ...
38
[ "com.fasterxml.jackson.databind.type.ReferenceType" ]
15f1707f5eb0b9d6cebece154c25df4a7aae8d618c89e22ab738e0d1b2a6fc59
public void testGenericSignature1195() throws Exception
// You are a professional Java test case writer, please create a test case named `testGenericSignature1195` for the issue `JacksonDatabind-1194`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1194 // // ## Issue-Title: // Incorrect signature for...
JacksonDatabind
package com.fasterxml.jackson.databind.type; import java.lang.reflect.Method; import java.util.*; import java.util.concurrent.atomic.AtomicReference; import com.fasterxml.jackson.databind.BaseMapTest; import com.fasterxml.jackson.databind.JavaType; /** * Simple tests to verify that {@link JavaType} types work to *...
public void testEqualsAfterSerializationOfDerivedClass() throws IOException, ClassNotFoundException { final DerivedMultiKey<?> mk = new DerivedMultiKey<String>("A", "B"); // serialize final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ObjectOutputStream out = ...
org.apache.commons.collections4.keyvalue.MultiKeyTest::testEqualsAfterSerializationOfDerivedClass
src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java
292
src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java
testEqualsAfterSerializationOfDerivedClass
/* * 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 `testEqualsAfterSerializationOfDerivedClass` for the issue `Collections-COLLECTIONS-576`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Collections-COLLECTIONS-576 // // ## Issue-Ti...
292
26
275
src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java
src/test/java
```markdown ## Issue-ID: Collections-COLLECTIONS-576 ## Issue-Title: MultiKey subclassing has deserialization problem since COLLECTIONS-266: either declare protected readResolve() or MultiKey must be final ## Issue-Description: MultiKey from collections 4 provides a transient hashCode and a **private** readResolve...
275
[ "org.apache.commons.collections4.keyvalue.MultiKey" ]
17672c8b1b39290675eea755b8b75fa120a2edb3265e497b9c7cb8422c0079db
public void testEqualsAfterSerializationOfDerivedClass() throws IOException, ClassNotFoundException
// You are a professional Java test case writer, please create a test case named `testEqualsAfterSerializationOfDerivedClass` for the issue `Collections-COLLECTIONS-576`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Collections-COLLECTIONS-576 // // ## Issue-Ti...
Collections
/* * 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 testIssue931() { collapsePropertiesOnExternTypes = true; testSame( "function f() {\n" + " return function () {\n" + " var args = arguments;\n" + " setTimeout(function() { alert(args); }, 0);\n" + " }\n" + "};\n"); }
com.google.javascript.jscomp.CollapsePropertiesTest::testIssue931
test/com/google/javascript/jscomp/CollapsePropertiesTest.java
1,107
test/com/google/javascript/jscomp/CollapsePropertiesTest.java
testIssue931
/* * 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 `testIssue931` for the issue `Closure-931`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-931 // // ## Issue-Title: // arguments is moved to another scope // // ## Issue-D...
1,107
130
1,098
test/com/google/javascript/jscomp/CollapsePropertiesTest.java
test
```markdown ## Issue-ID: Closure-931 ## Issue-Title: arguments is moved to another scope ## Issue-Description: Using ADVANCED\_OPTIMIZATIONS with CompilerOptions.collapsePropertiesOnExternTypes = true a script I used broke, it was something like: function () { return function () { var arg = arguments; setT...
1,098
[ "com.google.javascript.jscomp.CollapseProperties" ]
176b90f24eeb20bb5a4e01bcaa636646fb00e26cad9d44637802fca6f2764861
public void testIssue931()
// You are a professional Java test case writer, please create a test case named `testIssue931` for the issue `Closure-931`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-931 // // ## Issue-Title: // arguments is moved to another scope // // ## Issue-D...
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 testFoldArithmetic() { fold("x = 10 + 20", "x = 30"); fold("x = 2 / 4", "x = 0.5"); fold("x = 2.25 * 3", "x = 6.75"); fold("z = x * y", "z = x * y"); fold("x = y * 5", "x = y * 5"); fold("x = 1 / 0", "x = 1 / 0"); fold("x = 3 % 2", "x = 1"); fold("x = 3 % -2", "x = 1"); ...
com.google.javascript.jscomp.PeepholeFoldConstantsTest::testFoldArithmetic
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
562
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
testFoldArithmetic
/* * 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 `testFoldArithmetic` for the issue `Closure-381`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-381 // // ## Issue-Title: // division by zero wrongly throws JSC_DIVIDE_BY_0...
562
78
551
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
test
```markdown ## Issue-ID: Closure-381 ## Issue-Title: division by zero wrongly throws JSC_DIVIDE_BY_0_ERROR ## Issue-Description: **What steps will reproduce the problem?** unaliased division by zero `1/0` **What is the expected output? What do you see instead?** I expect minified code, but an error is thrown...
551
[ "com.google.javascript.jscomp.PeepholeFoldConstants" ]
18f5e363d1e14f733ef65c50b9a988d7c29b781dd496742aeb67b3a83d914e7d
public void testFoldArithmetic()
// You are a professional Java test case writer, please create a test case named `testFoldArithmetic` for the issue `Closure-381`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-381 // // ## Issue-Title: // division by zero wrongly throws JSC_DIVIDE_BY_0...
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 testIssue726() throws Exception { testTypes( "/** @constructor */ function Foo() {}" + "/** @param {number} x */ Foo.prototype.bar = function(x) {};" + "/** @return {!Function} */ " + "Foo.prototype.getDeferredBar = function() { " + " var self = this;" + ...
com.google.javascript.jscomp.TypeCheckTest::testIssue726
test/com/google/javascript/jscomp/TypeCheckTest.java
5,989
test/com/google/javascript/jscomp/TypeCheckTest.java
testIssue726
/* * 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 `testIssue726` for the issue `Closure-726`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-726 // // ## Issue-Title: // Wrong argument count error not reported on this alias...
5,989
168
5,975
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-726 ## Issue-Title: Wrong argument count error not reported on this aliasing (on function with @this annotation) ## Issue-Description: The following code (attached as test2-1.js) when compiled with: java -jar build/compiler.jar --compilation\_level=ADVANCED\_OPTIMIZATIONS --jscomp\...
5,975
[ "com.google.javascript.jscomp.TypedScopeCreator" ]
199ea3e222d53f8385e5d247529ebad222638a89260bf6a32925b33cffaf35dc
public void testIssue726() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue726` for the issue `Closure-726`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-726 // // ## Issue-Title: // Wrong argument count error not reported on this alias...
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 testNotPretty() { Document doc = Jsoup.parse("<div> \n<p>Hello\n there\n</p></div>"); doc.outputSettings().prettyPrint(false); assertEquals("<html><head></head><body><div> \n<p>Hello\n there\n</p></div></body></html>", doc.html()); Element div = doc.select("div...
org.jsoup.nodes.ElementTest::testNotPretty
src/test/java/org/jsoup/nodes/ElementTest.java
247
src/test/java/org/jsoup/nodes/ElementTest.java
testNotPretty
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.List; import java.util.Set; import java....
// You are a professional Java test case writer, please create a test case named `testNotPretty` for the issue `Jsoup-368`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-368 // // ## Issue-Title: // Whitespaces are discared in Element.html() method // //...
247
37
240
src/test/java/org/jsoup/nodes/ElementTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-368 ## Issue-Title: Whitespaces are discared in Element.html() method ## Issue-Description: Hi, I'm trying to make an exact copy of a document (changing just a couple of attributes and appending a few nodes) and the trim() inside the Element.html() is killing me. I'm using Parse...
240
[ "org.jsoup.nodes.Element" ]
1a67e98d48a7e92a0da7a26a747d8248340f4873358e9fbb706312ade8adab08
@Test public void testNotPretty()
// You are a professional Java test case writer, please create a test case named `testNotPretty` for the issue `Jsoup-368`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-368 // // ## Issue-Title: // Whitespaces are discared in Element.html() method // //...
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.List; import java.util.Set; import java....
public void testIssue297() { args.add("--compilation_level=SIMPLE_OPTIMIZATIONS"); test("function f(p) {" + " var x;" + " return ((x=p.id) && (x=parseInt(x.substr(1))) && x>0);" + "}", "function f(b) {" + " var a;" + " return ((a=b.id) && (a=parseInt(a.sub...
com.google.javascript.jscomp.CommandLineRunnerTest::testIssue297
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
259
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
testIssue297
/* * 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 `testIssue297` for the issue `Closure-297`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-297 // // ## Issue-Title: // Incorrect assignment removal from expression in simpl...
259
88
249
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
test
```markdown ## Issue-ID: Closure-297 ## Issue-Title: Incorrect assignment removal from expression in simple mode. ## Issue-Description: function closureCompilerTest(someNode) { var nodeId; return ((nodeId=someNode.id) && (nodeId=parseInt(nodeId.substr(1))) && nodeId>0); } COMPILES TO: function closureCom...
249
[ "com.google.javascript.jscomp.DeadAssignmentsElimination" ]
1a7621aa9995bb1d06cd00c4dd0280fa19d399730a2e625b9c1ce6a5ed26b5e6
public void testIssue297()
// You are a professional Java test case writer, please create a test case named `testIssue297` for the issue `Closure-297`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-297 // // ## Issue-Title: // Incorrect assignment removal from expression in simpl...
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 test_printParseZoneDawsonCreek() { // clashes with shorter Dawson DateTimeFormatterBuilder bld = new DateTimeFormatterBuilder() .appendPattern("yyyy-MM-dd HH:mm ").appendTimeZoneId(); DateTimeFormatter f = bld.toFormatter(); DateTime dt = new DateTime(2007, ...
org.joda.time.format.TestDateTimeFormatterBuilder::test_printParseZoneDawsonCreek
src/test/java/org/joda/time/format/TestDateTimeFormatterBuilder.java
262
src/test/java/org/joda/time/format/TestDateTimeFormatterBuilder.java
test_printParseZoneDawsonCreek
/* * 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 `test_printParseZoneDawsonCreek` for the issue `Time-126`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-126 // // ## Issue-Title: // #126 Errors creating/parsing dates with s...
262
20
254
src/test/java/org/joda/time/format/TestDateTimeFormatterBuilder.java
src/test/java
```markdown ## Issue-ID: Time-126 ## Issue-Title: #126 Errors creating/parsing dates with specific time zones. ## Issue-Description: Consider the following test code using Joda 2.0 import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; import org...
254
[ "org.joda.time.format.DateTimeFormatterBuilder" ]
1b0e880585fbed52665bcfe24cfad4dab0088a0011b334831eea21f79cfd511f
public void test_printParseZoneDawsonCreek()
// You are a professional Java test case writer, please create a test case named `test_printParseZoneDawsonCreek` for the issue `Time-126`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-126 // // ## Issue-Title: // #126 Errors creating/parsing dates with s...
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...
@Test public void testLang865() { assertValidToLocale("_GB", "", "GB", ""); assertValidToLocale("_GB_P", "", "GB", "P"); assertValidToLocale("_GB_POSIX", "", "GB", "POSIX"); try { LocaleUtils.toLocale("_G"); fail("Must be at least 3 chars if starts with un...
org.apache.commons.lang3.LocaleUtilsTest::testLang865
src/test/java/org/apache/commons/lang3/LocaleUtilsTest.java
542
src/test/java/org/apache/commons/lang3/LocaleUtilsTest.java
testLang865
/* * 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 `testLang865` for the issue `Lang-LANG-865`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-865 // // ## Issue-Title: // LocaleUtils.toLocale does not parse strings starti...
542
/** * Tests #LANG-865, strings starting with an underscore. */
5
502
src/test/java/org/apache/commons/lang3/LocaleUtilsTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-865 ## Issue-Title: LocaleUtils.toLocale does not parse strings starting with an underscore ## Issue-Description: Hi, Javadocs of Locale.toString() states that "If the language is missing, the string will begin with an underbar.". This is not handled in the LocaleUtils.toLocale...
502
[ "org.apache.commons.lang3.LocaleUtils" ]
1b593893d4222634b37867e70b3d4dbb16746a55cf72fbd809ed123623e57211
@Test public void testLang865()
// You are a professional Java test case writer, please create a test case named `testLang865` for the issue `Lang-LANG-865`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-865 // // ## Issue-Title: // LocaleUtils.toLocale does not parse strings starti...
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(expected=NumberIsTooLargeException.class) public void testBoundaryRangeTooLarge() { final CMAESOptimizer optimizer = new CMAESOptimizer(); final MultivariateFunction fitnessFunction = new MultivariateFunction() { public double value(double[] parameters) { ...
org.apache.commons.math3.optimization.direct.CMAESOptimizerTest::testBoundaryRangeTooLarge
src/test/java/org/apache/commons/math3/optimization/direct/CMAESOptimizerTest.java
431
src/test/java/org/apache/commons/math3/optimization/direct/CMAESOptimizerTest.java
testBoundaryRangeTooLarge
/* * 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 `testBoundaryRangeTooLarge` for the issue `Math-MATH-865`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-865 // // ## Issue-Title: // Wide bounds to CMAESOptimizer result...
431
/** * Cf. MATH-865 */
19
407
src/test/java/org/apache/commons/math3/optimization/direct/CMAESOptimizerTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-865 ## Issue-Title: Wide bounds to CMAESOptimizer result in NaN parameters passed to fitness function ## Issue-Description: If you give large values as lower/upper bounds (for example -Double.MAX\_VALUE as a lower bound), the optimizer can call the fitness function with parameter...
407
[ "org.apache.commons.math3.optimization.direct.CMAESOptimizer" ]
1b6a56c7454019a3520d75cd976c3f3cf577c479632964a6d106ca6532ddb021
@Test(expected=NumberIsTooLargeException.class) public void testBoundaryRangeTooLarge()
// You are a professional Java test case writer, please create a test case named `testBoundaryRangeTooLarge` for the issue `Math-MATH-865`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-865 // // ## Issue-Title: // Wide bounds to CMAESOptimizer result...
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 testEmptyNodeSetOperations() { assertXPathValue(context, "/idonotexist = 0", Boolean.FALSE, Boolean.class); assertXPathValue(context, "/idonotexist != 0", Boolean.FALSE, Boolean.class); assertXPathValue(context, "/idonotexist < 0", Boolean.FALSE, Boolean.class); assertXPa...
org.apache.commons.jxpath.ri.compiler.CoreOperationTest::testEmptyNodeSetOperations
src/test/org/apache/commons/jxpath/ri/compiler/CoreOperationTest.java
127
src/test/org/apache/commons/jxpath/ri/compiler/CoreOperationTest.java
testEmptyNodeSetOperations
/* * 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 `testEmptyNodeSetOperations` for the issue `JxPath-JXPATH-93`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-93 // // ## Issue-Title: // Binary operators behaviour in...
127
10
114
src/test/org/apache/commons/jxpath/ri/compiler/CoreOperationTest.java
src/test
```markdown ## Issue-ID: JxPath-JXPATH-93 ## Issue-Title: Binary operators behaviour involving node-sets is incorrect ## Issue-Description: According to XPath specification: "If both objects to be compared are node-sets, then the comparison will be true if and only if there is a node in the first node-set and a...
114
[ "org.apache.commons.jxpath.ri.compiler.CoreOperationRelationalExpression" ]
1ba5768921cc37e5f1537562cb80b66637d038c9dc16621317051effd33bbf8f
public void testEmptyNodeSetOperations()
// You are a professional Java test case writer, please create a test case named `testEmptyNodeSetOperations` for the issue `JxPath-JXPATH-93`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-93 // // ## Issue-Title: // Binary operators behaviour in...
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 ...
public void testCanonicalNames() { TypeFactory tf = TypeFactory.defaultInstance(); JavaType t = tf.constructType(java.util.Calendar.class); String can = t.toCanonical(); assertEquals("java.util.Calendar", can); assertEquals(t, tf.constructFromCanonical(can)); // ...
com.fasterxml.jackson.databind.type.TestTypeFactory::testCanonicalNames
src/test/java/com/fasterxml/jackson/databind/type/TestTypeFactory.java
255
src/test/java/com/fasterxml/jackson/databind/type/TestTypeFactory.java
testCanonicalNames
package com.fasterxml.jackson.databind.type; import java.lang.reflect.Field; import java.util.*; import java.util.concurrent.atomic.AtomicReference; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.*; /** * Simple tests to verify that the {@link TypeFactory} constructs * ...
// You are a professional Java test case writer, please create a test case named `testCanonicalNames` for the issue `JacksonDatabind-2109`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2109 // // ## Issue-Title: // Canonical string for referenc...
255
/** * Test for checking that canonical name handling works ok */
99
208
src/test/java/com/fasterxml/jackson/databind/type/TestTypeFactory.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-2109 ## Issue-Title: Canonical string for reference type is built incorrectly ## Issue-Description: Canonical string for reference type is built incorrectly. E.g.: `new ReferenceType(new TypeFactory(new LRUMap<Object, JavaType>(0, 10000)).constructType(Object.class), n...
208
[ "com.fasterxml.jackson.databind.type.ReferenceType" ]
1c444f66eb72a23b9b413cda62b8427cccf4239865dc76a9428d985cf3385103
public void testCanonicalNames()
// You are a professional Java test case writer, please create a test case named `testCanonicalNames` for the issue `JacksonDatabind-2109`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2109 // // ## Issue-Title: // Canonical string for referenc...
JacksonDatabind
package com.fasterxml.jackson.databind.type; import java.lang.reflect.Field; import java.util.*; import java.util.concurrent.atomic.AtomicReference; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.*; /** * Simple tests to verify that the {@link TypeFactory} constructs * ...
public void testEqualGeneralPaths() { GeneralPath g1 = new GeneralPath(); g1.moveTo(1.0f, 2.0f); g1.lineTo(3.0f, 4.0f); g1.curveTo(5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f); g1.quadTo(1.0f, 2.0f, 3.0f, 4.0f); g1.closePath(); GeneralPath g2 = new GeneralPath(); ...
org.jfree.chart.util.junit.ShapeUtilitiesTests::testEqualGeneralPaths
tests/org/jfree/chart/util/junit/ShapeUtilitiesTests.java
245
tests/org/jfree/chart/util/junit/ShapeUtilitiesTests.java
testEqualGeneralPaths
/* =========================================================== * 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 `testEqualGeneralPaths` for the issue `Chart-868`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-868 // // ## Issue-Title: // #868 JCommon 1.0.12 ShapeUtilities.equal(path1,p...
245
/** * Some checks for the equal(GeneralPath, GeneralPath) method. */
11
190
tests/org/jfree/chart/util/junit/ShapeUtilitiesTests.java
tests
```markdown ## Issue-ID: Chart-868 ## Issue-Title: #868 JCommon 1.0.12 ShapeUtilities.equal(path1,path2) ## Issue-Description: The comparison of two GeneralPath objects uses the same PathIterator for both objects. equal(GeneralPath path1, GeneralPath path2) will thus return true for any pair of non-null General...
190
[ "org.jfree.chart.util.ShapeUtilities" ]
1c62e0459299c55b8a9bf134b41605dd2c630c2e5732c233c6cddd45d35b39b4
public void testEqualGeneralPaths()
// You are a professional Java test case writer, please create a test case named `testEqualGeneralPaths` for the issue `Chart-868`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-868 // // ## Issue-Title: // #868 JCommon 1.0.12 ShapeUtilities.equal(path1,p...
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...
@Test public void discardsSpuriousByteOrderMark() { String html = "\uFEFF<html><head><title>One</title></head><body>Two</body></html>"; ByteBuffer buffer = Charset.forName("UTF-8").encode(html); Document doc = DataUtil.parseByteData(buffer, "UTF-8", "http://foo.com/", Parser.htmlParser()); ...
org.jsoup.helper.DataUtilTest::discardsSpuriousByteOrderMark
src/test/java/org/jsoup/helper/DataUtilTest.java
32
src/test/java/org/jsoup/helper/DataUtilTest.java
discardsSpuriousByteOrderMark
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 `discardsSpuriousByteOrderMark` for the issue `Jsoup-134`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-134 // // ## Issue-Title: // Some html file's head element will be em...
32
20
27
src/test/java/org/jsoup/helper/DataUtilTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-134 ## Issue-Title: Some html file's head element will be empty ## Issue-Description: Hello, Jonathan I love Jsoup, and handling many html files. But today, I'm under the problem. When parse with Jsoup, some html file's head element will be empty. Sample html is here -> <http...
27
[ "org.jsoup.helper.DataUtil" ]
1d09ce78d0f8e64f118ec7e66fb06138803fa5caf1f13185a9f5347a0f8fe771
@Test public void discardsSpuriousByteOrderMark()
// You are a professional Java test case writer, please create a test case named `discardsSpuriousByteOrderMark` for the issue `Jsoup-134`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-134 // // ## Issue-Title: // Some html file's head element will be em...
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 testOneType4() { String js = "" + "/** @constructor */ function Foo() {}\n" + "Foo.prototype = {'a': 0};\n" + "/** @type Foo */\n" + "var F = new Foo;\n" + "F['a'] = 0;"; String expected = "{}"; testSets(false, js, js, expected); testSets(true, js, j...
com.google.javascript.jscomp.DisambiguatePropertiesTest::testOneType4
test/com/google/javascript/jscomp/DisambiguatePropertiesTest.java
129
test/com/google/javascript/jscomp/DisambiguatePropertiesTest.java
testOneType4
/* * 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 `testOneType4` for the issue `Closure-1024`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1024 // // ## Issue-Title: // Prototype method incorrectly removed // // ## Issu...
129
118
119
test/com/google/javascript/jscomp/DisambiguatePropertiesTest.java
test
```markdown ## Issue-ID: Closure-1024 ## Issue-Title: Prototype method incorrectly removed ## Issue-Description: // ==ClosureCompiler== // @compilation\_level ADVANCED\_OPTIMIZATIONS // @output\_file\_name default.js // @formatting pretty\_print // ==/ClosureCompiler== /\*\* @const \*/ var foo = {}; foo.ba...
119
[ "com.google.javascript.jscomp.DisambiguateProperties" ]
1d50ee35cebcf6452f7cdf1d7eafed61f5a114b96f1659e2a13211be5e20ccfb
public void testOneType4()
// You are a professional Java test case writer, please create a test case named `testOneType4` for the issue `Closure-1024`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1024 // // ## Issue-Title: // Prototype method incorrectly removed // // ## Issu...
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...
@Test public void testEscapedMySqlNullValue() throws Exception { // MySQL uses \N to symbolize null values. We have to restore this final Lexer lexer = getLexer("character\\NEscaped", formatWithEscaping); assertThat(lexer.nextToken(new Token()), hasContent("character\\NEscaped")); }
org.apache.commons.csv.CSVLexerTest::testEscapedMySqlNullValue
src/test/java/org/apache/commons/csv/CSVLexerTest.java
335
src/test/java/org/apache/commons/csv/CSVLexerTest.java
testEscapedMySqlNullValue
/* * 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 `testEscapedMySqlNullValue` for the issue `Csv-CSV-58`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-58 // // ## Issue-Title: // Unescape handling needs rethinking // // ...
335
3
330
src/test/java/org/apache/commons/csv/CSVLexerTest.java
src/test/java
```markdown ## Issue-ID: Csv-CSV-58 ## Issue-Title: Unescape handling needs rethinking ## Issue-Description: The current escape parsing converts <esc><char> to plain <char> if the <char> is not one of the special characters to be escaped. This can affect unicode escapes if the <esc> character is backslash. One...
330
[ "org.apache.commons.csv.Lexer" ]
1df3353e84e8d8aedab388963a4bb9de8a3e8563bf8af58a4a8d9cd014425f81
@Test public void testEscapedMySqlNullValue() throws Exception
// You are a professional Java test case writer, please create a test case named `testEscapedMySqlNullValue` for the issue `Csv-CSV-58`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-58 // // ## Issue-Title: // Unescape handling needs rethinking // // ...
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 hasClassCaseInsensitive() { Elements els = Jsoup.parse("<p Class=One>One <p class=Two>Two <p CLASS=THREE>THREE").select("p"); Element one = els.get(0); Element two = els.get(1); Element thr = els.get(2); assertTrue(one.hasClass("One")); assertTrue(o...
org.jsoup.select.ElementsTest::hasClassCaseInsensitive
src/test/java/org/jsoup/select/ElementsTest.java
111
src/test/java/org/jsoup/select/ElementsTest.java
hasClassCaseInsensitive
package org.jsoup.select; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.FormElement; import org.jsoup.nodes.Node; import org.junit.Test; import java.util.List; import static org.junit.Assert.assertEquals; import static org.j...
// You are a professional Java test case writer, please create a test case named `hasClassCaseInsensitive` for the issue `Jsoup-814`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-814 // // ## Issue-Title: // Unexpected case sensitivity for CSS class sele...
111
61
97
src/test/java/org/jsoup/select/ElementsTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-814 ## Issue-Title: Unexpected case sensitivity for CSS class selector ## Issue-Description: Hi, i use JSoup version 1.10.2 and noticed an unexpected case sensitivity for a CSS class selector. I tried to parse the following HTML document with capitalized class attributes: ``` <!...
97
[ "org.jsoup.nodes.Element" ]
1e8c9722e02137baca9999c7be9776c511ddd53193320ec9ea4982dd21bddfad
@Test public void hasClassCaseInsensitive()
// You are a professional Java test case writer, please create a test case named `hasClassCaseInsensitive` for the issue `Jsoup-814`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-814 // // ## Issue-Title: // Unexpected case sensitivity for CSS class sele...
Jsoup
package org.jsoup.select; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.FormElement; import org.jsoup.nodes.Node; import org.junit.Test; import java.util.List; import static org.junit.Assert.assertEquals; import static org.j...
public void testCall1() { test("Math.sin(0);", ""); }
com.google.javascript.jscomp.PeepholeRemoveDeadCodeTest::testCall1
test/com/google/javascript/jscomp/PeepholeRemoveDeadCodeTest.java
544
test/com/google/javascript/jscomp/PeepholeRemoveDeadCodeTest.java
testCall1
/* * 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 `testCall1` for the issue `Closure-501`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-501 // // ## Issue-Title: // Closure removes needed code. // // ## Issue-Description...
544
61
542
test/com/google/javascript/jscomp/PeepholeRemoveDeadCodeTest.java
test
```markdown ## Issue-ID: Closure-501 ## Issue-Title: Closure removes needed code. ## Issue-Description: **What steps will reproduce the problem?** 1. Try the following code, in Simple mode Math.blah = function(test) { test.a = 5; }; var test = new Object(); Math.blah(test); 2. The output is Math.blah=function...
542
[ "com.google.javascript.jscomp.NodeUtil" ]
1ecbec3d59855936727a8b41e297fe5a5876dce4c601934e1c15746fb289ad53
public void testCall1()
// You are a professional Java test case writer, please create a test case named `testCall1` for the issue `Closure-501`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-501 // // ## Issue-Title: // Closure removes needed code. // // ## Issue-Description...
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 testIterateVariable() throws Exception { assertXPathValueIterator(context, "$d", list("a", "b")); assertXPathValue(context, "$d = 'a'", Boolean.TRUE); assertXPathValue(context, "$d = 'b'", Boolean.TRUE); }
org.apache.commons.jxpath.ri.compiler.VariableTest::testIterateVariable
src/test/org/apache/commons/jxpath/ri/compiler/VariableTest.java
279
src/test/org/apache/commons/jxpath/ri/compiler/VariableTest.java
testIterateVariable
/* * 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 `testIterateVariable` for the issue `JxPath-JXPATH-94`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-94 // // ## Issue-Title: // equality test for multi-valued varia...
279
6
275
src/test/org/apache/commons/jxpath/ri/compiler/VariableTest.java
src/test
```markdown ## Issue-ID: JxPath-JXPATH-94 ## Issue-Title: equality test for multi-valued variables does not conform to spec ## Issue-Description: given e.g. variable d= {"a", "b"} , the spec implies that "$d = 'a'" and that "$d = 'b'". Instead of iterating the variable's components its immediate content (here, t...
275
[ "org.apache.commons.jxpath.ri.compiler.CoreOperationCompare" ]
1fdd450f7357ec0fdac76033fcb27d7cc77e21f223a1d474ffc048165667f08d
public void testIterateVariable() throws Exception
// You are a professional Java test case writer, please create a test case named `testIterateVariable` for the issue `JxPath-JXPATH-94`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-94 // // ## Issue-Title: // equality test for multi-valued varia...
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 should_return_zero_if_mock_is_compared_to_itself() { //given Date d = mock(Date.class); d.compareTo(d); Invocation compareTo = this.getLastInvocation(); //when Object result = values.answer(compareTo); //then assertEquals(0, result)...
org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValuesTest::should_return_zero_if_mock_is_compared_to_itself
test/org/mockito/internal/stubbing/defaultanswers/ReturnsEmptyValuesTest.java
77
test/org/mockito/internal/stubbing/defaultanswers/ReturnsEmptyValuesTest.java
should_return_zero_if_mock_is_compared_to_itself
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.stubbing.defaultanswers; import org.junit.Test; import org.mockito.invocation.Invocation; import org.mockitoutil.TestBase; import java.util.*; import static org.mockit...
// You are a professional Java test case writer, please create a test case named `should_return_zero_if_mock_is_compared_to_itself` for the issue `Mockito-467`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-467 // // ## Issue-Title: // fix some rawtype ...
77
24
66
test/org/mockito/internal/stubbing/defaultanswers/ReturnsEmptyValuesTest.java
test
```markdown ## Issue-ID: Mockito-467 ## Issue-Title: fix some rawtype warnings in tests ## Issue-Description: [Current coverage](https://codecov.io/gh/mockito/mockito/pull/467?src=pr) is **87.76%** --------------------------------------------------------------------------------------- > > Merging [#467](https:/...
66
[ "org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValues" ]
1feb4722e3bc81035ba45f5710a63f530ef2f276664e1e59e4ffa960677f5fb6
@Test public void should_return_zero_if_mock_is_compared_to_itself()
// You are a professional Java test case writer, please create a test case named `should_return_zero_if_mock_is_compared_to_itself` for the issue `Mockito-467`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-467 // // ## Issue-Title: // fix some rawtype ...
Mockito
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.stubbing.defaultanswers; import org.junit.Test; import org.mockito.invocation.Invocation; import org.mockitoutil.TestBase; import java.util.*; import static org.mockit...
@Test public void testStringCreateNumberEnsureNoPrecisionLoss(){ String shouldBeFloat = "1.23"; String shouldBeDouble = "3.40282354e+38"; String shouldBeBigDecimal = "1.797693134862315759e+308"; assertTrue(NumberUtils.createNumber(shouldBeFloat) instanceof Float); ...
org.apache.commons.lang3.math.NumberUtilsTest::testStringCreateNumberEnsureNoPrecisionLoss
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
130
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
testStringCreateNumberEnsureNoPrecisionLoss
/* * 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 `testStringCreateNumberEnsureNoPrecisionLoss` for the issue `Lang-LANG-693`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-693 // // ## Issue-Title: // Method createNumbe...
130
/** * Test for {(@link NumberUtils#createNumber(String)} */
3
121
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-693 ## Issue-Title: Method createNumber from NumberUtils doesn't work for floating point numbers other than Float ## Issue-Description: Method createNumber from NumberUtils is trying to parse a string with a floating point number always first as a Float, that will cause that if w...
121
[ "org.apache.commons.lang3.math.NumberUtils" ]
1ff7808e53586a507ce0cab68037e6efc233130fc93540a12de151573fe53ce9
@Test public void testStringCreateNumberEnsureNoPrecisionLoss()
// You are a professional Java test case writer, please create a test case named `testStringCreateNumberEnsureNoPrecisionLoss` for the issue `Lang-LANG-693`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-693 // // ## Issue-Title: // Method createNumbe...
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 testUnmodifiable() throws Exception { ObjectMapper mapper = new ObjectMapper(); Class<?> unmodSetType = Collections.unmodifiableSet(Collections.<String>emptySet()).getClass(); mapper.addMixIn(unmodSetType, UnmodifiableSetMixin.class); mapper.enableDefaultTyping(Object...
com.fasterxml.jackson.databind.creators.ArrayDelegatorCreatorForCollectionTest::testUnmodifiable
src/test/java/com/fasterxml/jackson/databind/creators/ArrayDelegatorCreatorForCollectionTest.java
29
src/test/java/com/fasterxml/jackson/databind/creators/ArrayDelegatorCreatorForCollectionTest.java
testUnmodifiable
package com.fasterxml.jackson.databind.creators; import java.util.Collections; import java.util.Set; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; public class ArrayDelegatorCreatorForCollectionTest extends BaseMapTest { @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = ...
// You are a professional Java test case writer, please create a test case named `testUnmodifiable` for the issue `JacksonDatabind-1392`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1392 // // ## Issue-Title: // Custom UnmodifiableSetMixin Fai...
29
62
18
src/test/java/com/fasterxml/jackson/databind/creators/ArrayDelegatorCreatorForCollectionTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1392 ## Issue-Title: Custom UnmodifiableSetMixin Fails in Jackson 2.7+ but works in Jackson 2.6 ## Issue-Description: I'd like to be able to deserialize an `UnmodifiableSet` with default typing enabled. To do this I have created an `UnmodifiableSetMixin` as shown below: **...
18
[ "com.fasterxml.jackson.databind.deser.std.CollectionDeserializer" ]
2124dddf6cf64e8a0bc0555354851bf3746407e41d911f2ae60cd70f0a2d17e0
public void testUnmodifiable() throws Exception
// You are a professional Java test case writer, please create a test case named `testUnmodifiable` for the issue `JacksonDatabind-1392`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1392 // // ## Issue-Title: // Custom UnmodifiableSetMixin Fai...
JacksonDatabind
package com.fasterxml.jackson.databind.creators; import java.util.Collections; import java.util.Set; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; public class ArrayDelegatorCreatorForCollectionTest extends BaseMapTest { @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = ...
public void testCOMPRESS178() throws Exception { final File input = getFile("COMPRESS-178.tar"); final InputStream is = new FileInputStream(input); final ArchiveInputStream in = new ArchiveStreamFactory().createArchiveInputStream("tar", is); try { in.getNextEntry(); ...
org.apache.commons.compress.archivers.TarTestCase::testCOMPRESS178
src/test/java/org/apache/commons/compress/archivers/TarTestCase.java
315
src/test/java/org/apache/commons/compress/archivers/TarTestCase.java
testCOMPRESS178
/* * 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 `testCOMPRESS178` for the issue `Compress-COMPRESS-178`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-178 // // ## Issue-Title: // TarArchiveInputStream throws I...
315
12
303
src/test/java/org/apache/commons/compress/archivers/TarTestCase.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-178 ## Issue-Title: TarArchiveInputStream throws IllegalArgumentException instead of IOException ## Issue-Description: TarArchiveInputStream is throwing IllegalArgumentException instead of IOException on corrupt files, in direct contradiction to the Javadoc. Here is a sta...
303
[ "org.apache.commons.compress.archivers.tar.TarArchiveInputStream" ]
22152716d4c3b9e09249c67636c90d2e9f0ee3737e4396b93201a7d612082f89
public void testCOMPRESS178() throws Exception
// You are a professional Java test case writer, please create a test case named `testCOMPRESS178` for the issue `Compress-COMPRESS-178`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-178 // // ## Issue-Title: // TarArchiveInputStream throws I...
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 testWeirdStringHandling() throws Exception { ObjectMapper mapper = new ObjectMapper() .addHandler(new WeirdStringHandler(SingleValuedEnum.A)) ; SingleValuedEnum result = mapper.readValue("\"B\"", SingleValuedEnum.class); assertEquals(SingleValuedEnum.A...
com.fasterxml.jackson.databind.filter.ProblemHandlerTest::testWeirdStringHandling
src/test/java/com/fasterxml/jackson/databind/filter/ProblemHandlerTest.java
248
src/test/java/com/fasterxml/jackson/databind/filter/ProblemHandlerTest.java
testWeirdStringHandling
package com.fasterxml.jackson.databind.filter; import java.io.IOException; import java.util.Map; import java.util.UUID; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.*; import com.f...
// You are a professional Java test case writer, please create a test case named `testWeirdStringHandling` for the issue `JacksonDatabind-1629`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1629 // // ## Issue-Title: // FromStringDeserializer i...
248
83
235
src/test/java/com/fasterxml/jackson/databind/filter/ProblemHandlerTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1629 ## Issue-Title: FromStringDeserializer ignores registered DeserializationProblemHandler for java.util.UUID ## Issue-Description: Culprit appears to be [lines 155-161 of FromStringDeserializer](https://github.com/FasterXML/jackson-databind/blob/60ae6000d361f910ab0d7d269a...
235
[ "com.fasterxml.jackson.databind.deser.std.FromStringDeserializer" ]
221c9eecaee2abdb3eb96414023a3a01fb0613d1636b8adb62e4ac2cd1e9056f
public void testWeirdStringHandling() throws Exception
// You are a professional Java test case writer, please create a test case named `testWeirdStringHandling` for the issue `JacksonDatabind-1629`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1629 // // ## Issue-Title: // FromStringDeserializer i...
JacksonDatabind
package com.fasterxml.jackson.databind.filter; import java.io.IOException; import java.util.Map; import java.util.UUID; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.*; import com.f...
@Test public void testSingleVariableAndConstraint() throws OptimizationException { LinearObjectiveFunction f = new LinearObjectiveFunction(new double[] { 3 }, 0); Collection<LinearConstraint> constraints = new ArrayList<LinearConstraint>(); constraints.add(new LinearConstraint(new double...
org.apache.commons.math.optimization.linear.SimplexSolverTest::testSingleVariableAndConstraint
src/test/org/apache/commons/math/optimization/linear/SimplexSolverTest.java
76
src/test/org/apache/commons/math/optimization/linear/SimplexSolverTest.java
testSingleVariableAndConstraint
/* * 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 `testSingleVariableAndConstraint` for the issue `Math-MATH-273`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-273 // // ## Issue-Title: // Basic variable is not found co...
76
87
66
src/test/org/apache/commons/math/optimization/linear/SimplexSolverTest.java
src/test
```markdown ## Issue-ID: Math-MATH-273 ## Issue-Title: Basic variable is not found correctly in simplex tableau ## Issue-Description: The last patch to SimplexTableau caused an automated test suite I'm running at work to go down a new code path and uncover what is hopefully the last bug remaining in the Simplex co...
66
[ "org.apache.commons.math.optimization.linear.SimplexTableau" ]
22840ec9ef83e966f8ce23e2f25780c5d9ea97f55ed3ae99f9eaaa99645effb8
@Test public void testSingleVariableAndConstraint() throws OptimizationException
// You are a professional Java test case writer, please create a test case named `testSingleVariableAndConstraint` for the issue `Math-MATH-273`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-273 // // ## Issue-Title: // Basic variable is not found co...
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 testIssue2088UnwrappedFieldsAfterLastCreatorProp() throws Exception { Issue2088Bean bean = MAPPER.readValue("{\"x\":1,\"a\":2,\"y\":3,\"b\":4}", Issue2088Bean.class); assertEquals(1, bean.x); assertEquals(2, bean.w.a); assertEquals(3, bean.y); assertEquals(4, ...
com.fasterxml.jackson.databind.struct.TestUnwrapped::testIssue2088UnwrappedFieldsAfterLastCreatorProp
src/test/java/com/fasterxml/jackson/databind/struct/TestUnwrapped.java
254
src/test/java/com/fasterxml/jackson/databind/struct/TestUnwrapped.java
testIssue2088UnwrappedFieldsAfterLastCreatorProp
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 `testIssue2088UnwrappedFieldsAfterLastCreatorProp` for the issue `JacksonDatabind-2088`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2088 // // ## Issue-Title: //...
254
// [databind#2088]: accidental skipping of values
101
247
src/test/java/com/fasterxml/jackson/databind/struct/TestUnwrapped.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-2088 ## Issue-Title: @JsonUnwrapped fields are skipped when using PropertyBasedCreator if they appear after the last creator property ## Issue-Description: Example: ``` static class Bean { int x; int y; @JsonUnwrapped UnwrappedBean w; ...
247
[ "com.fasterxml.jackson.databind.deser.BeanDeserializer" ]
23c3231a04637e1b0e3a229640e3dbc37194d70a7c5ab7e4665ddbdbdaba7500
public void testIssue2088UnwrappedFieldsAfterLastCreatorProp() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue2088UnwrappedFieldsAfterLastCreatorProp` for the issue `JacksonDatabind-2088`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-2088 // // ## Issue-Title: //...
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...
@Test public void testExactOptionNameMatch() throws ParseException { new DefaultParser().parse(getOptions(), new String[]{"--prefix"}); }
org.apache.commons.cli.bug.BugCLI252Test::testExactOptionNameMatch
src/test/java/org/apache/commons/cli/bug/BugCLI252Test.java
10
src/test/java/org/apache/commons/cli/bug/BugCLI252Test.java
testExactOptionNameMatch
package org.apache.commons.cli.bug; import org.apache.commons.cli.*; import org.junit.Test; public class BugCLI252Test extends DefaultParserTest { @Test public void testExactOptionNameMatch() throws ParseException { new DefaultParser().parse(getOptions(), new String[]{"--prefix"}); } @Test(e...
// You are a professional Java test case writer, please create a test case named `testExactOptionNameMatch` for the issue `Cli-CLI-252`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-252 // // ## Issue-Title: // LongOpt falsely detected as ambiguous // ...
10
35
7
src/test/java/org/apache/commons/cli/bug/BugCLI252Test.java
src/test/java
```markdown ## Issue-ID: Cli-CLI-252 ## Issue-Title: LongOpt falsely detected as ambiguous ## Issue-Description: Options options = new Options(); options.addOption(Option.builder().longOpt("importToOpen").hasArg().argName("FILE").build()); options.addOption(Option.builder("i").longOpt("import").hasArg().argN...
7
[ "org.apache.commons.cli.Options" ]
2404c7d8c81bde7f47d1fa98525ecc6f3ac02a0aa03e9e5161d40458c7e0980b
@Test public void testExactOptionNameMatch() throws ParseException
// You are a professional Java test case writer, please create a test case named `testExactOptionNameMatch` for the issue `Cli-CLI-252`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-252 // // ## Issue-Title: // LongOpt falsely detected as ambiguous // ...
Cli
package org.apache.commons.cli.bug; import org.apache.commons.cli.*; import org.junit.Test; public class BugCLI252Test extends DefaultParserTest { @Test public void testExactOptionNameMatch() throws ParseException { new DefaultParser().parse(getOptions(), new String[]{"--prefix"}); } @Test(e...
public void testStringBuilder() throws Exception { StringBuilder sb = MAPPER.readValue(quote("abc"), StringBuilder.class); assertEquals("abc", sb.toString()); }
com.fasterxml.jackson.databind.deser.TestJdkTypes::testStringBuilder
src/test/java/com/fasterxml/jackson/databind/deser/TestJdkTypes.java
426
src/test/java/com/fasterxml/jackson/databind/deser/TestJdkTypes.java
testStringBuilder
package com.fasterxml.jackson.databind.deser; import java.io.*; import java.net.*; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.Currency; import java.util.List; import java.util.Locale; import java.util.regex.Pattern; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jac...
// You are a professional Java test case writer, please create a test case named `testStringBuilder` for the issue `JacksonDatabind-667`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-667 // // ## Issue-Title: // Problem with bogus conflict betw...
426
8
422
src/test/java/com/fasterxml/jackson/databind/deser/TestJdkTypes.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-667 ## Issue-Title: Problem with bogus conflict between single-arg-String vs CharSequence constructor ## Issue-Description: Although it is good idea to allow recognizing `CharSequence` as almost like an alias for `String`, this can cause problems for classes like `StringBuil...
422
[ "com.fasterxml.jackson.databind.deser.impl.CreatorCollector" ]
240718e3a471571164791f059150dda9b5e88d4fc6cf4ca7e81ef1f433252762
public void testStringBuilder() throws Exception
// You are a professional Java test case writer, please create a test case named `testStringBuilder` for the issue `JacksonDatabind-667`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-667 // // ## Issue-Title: // Problem with bogus conflict betw...
JacksonDatabind
package com.fasterxml.jackson.databind.deser; import java.io.*; import java.net.*; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.Currency; import java.util.List; import java.util.Locale; import java.util.regex.Pattern; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jac...
@Test public void testMath789() { final RealMatrix m1 = MatrixUtils.createRealMatrix(new double[][]{ {0.013445532, 0.010394690, 0.009881156, 0.010499559}, {0.010394690, 0.023006616, 0.008196856, 0.010732709}, {0.009881156, 0.008196856, 0.019023866, 0.009210099}, ...
org.apache.commons.math3.linear.RectangularCholeskyDecompositionTest::testMath789
src/test/java/org/apache/commons/math3/linear/RectangularCholeskyDecompositionTest.java
109
src/test/java/org/apache/commons/math3/linear/RectangularCholeskyDecompositionTest.java
testMath789
/* * 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 `testMath789` for the issue `Math-MATH-789`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-789 // // ## Issue-Title: // Correlated random vector generator fails (silently...
109
21
74
src/test/java/org/apache/commons/math3/linear/RectangularCholeskyDecompositionTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-789 ## Issue-Title: Correlated random vector generator fails (silently) when faced with zero rows in covariance matrix ## Issue-Description: The following three matrices (which are basically permutations of each other) produce different results when sampling a multi-variate Gauss...
74
[ "org.apache.commons.math3.linear.RectangularCholeskyDecomposition" ]
25ce6f904e47dc9c04734dc916bd41f91530199ea50d7316ad0bef227ada4a73
@Test public void testMath789()
// You are a professional Java test case writer, please create a test case named `testMath789` for the issue `Math-MATH-789`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-789 // // ## Issue-Title: // Correlated random vector generator fails (silently...
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 testIssue586() throws Exception { testTypes( "/** @constructor */" + "var MyClass = function() {};" + "/** @param {boolean} success */" + "MyClass.prototype.fn = function(success) {};" + "MyClass.prototype.test = function() {" + " this.fn();" + ...
com.google.javascript.jscomp.TypeCheckTest::testIssue586
test/com/google/javascript/jscomp/TypeCheckTest.java
5,454
test/com/google/javascript/jscomp/TypeCheckTest.java
testIssue586
/* * 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 `testIssue586` for the issue `Closure-586`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-586 // // ## Issue-Title: // Type checking error when replacing a function with a ...
5,454
48
5,441
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-586 ## Issue-Title: Type checking error when replacing a function with a stub after calling. ## Issue-Description: Given the following Javascript: /\*\* @constructor \*/ var myclass = function() { } /\*\* @param {boolean} success \*/ myclass.prototype.fn = function(su...
5,441
[ "com.google.javascript.jscomp.TypedScopeCreator" ]
26bc0c2808e473ff6e6caf715fee92c23783be55508a0e5d77ee80a304b4eb69
public void testIssue586() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue586` for the issue `Closure-586`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-586 // // ## Issue-Title: // Type checking error when replacing a function with a ...
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 testSevenEmptyFiles() throws Exception { testCompress252(7, 0); }
org.apache.commons.compress.archivers.sevenz.SevenZOutputFileTest::testSevenEmptyFiles
src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
183
src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
testSevenEmptyFiles
/* * 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 `testSevenEmptyFiles` for the issue `Compress-COMPRESS-252`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-252 // // ## Issue-Title: // Writing 7z empty entries p...
183
21
181
src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-252 ## Issue-Title: Writing 7z empty entries produces incorrect or corrupt archive ## Issue-Description: I couldn't find an exact rule that causes this incorrect behavior, but I tried to reduce it to some simple scenarios to reproduce it: Input: A folder with certain fi...
181
[ "org.apache.commons.compress.archivers.sevenz.SevenZOutputFile" ]
272c97e4ee0c7cfde081b872001292c9757bb65de33ad2b8559ded884889824b
public void testSevenEmptyFiles() throws Exception
// You are a professional Java test case writer, please create a test case named `testSevenEmptyFiles` for the issue `Compress-COMPRESS-252`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-252 // // ## Issue-Title: // Writing 7z empty entries p...
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 testExceptions() { final char[] DUMMY = new char[]{'a'}; // valid char array try { RandomStringUtils.random(-1); fail(); } catch (IllegalArgumentException ex) {} try { RandomStringUtils.random(-1, true, true); fail(); ...
org.apache.commons.lang3.RandomStringUtilsTest::testExceptions
src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java
170
src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java
testExceptions
/* * 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 `testExceptions` for the issue `Lang-LANG-805`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-805 // // ## Issue-Title: // RandomStringUtils.random(count, 0, 0, false, fa...
170
12
132
src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-805 ## Issue-Title: RandomStringUtils.random(count, 0, 0, false, false, universe, random) always throws java.lang.ArrayIndexOutOfBoundsException ## Issue-Description: In commons-lang 2.6 line 250 : ``` ch = chars[random.nextInt(gap) + start]; ``` ~~This line of code takes a...
132
[ "org.apache.commons.lang3.RandomStringUtils" ]
27495b08596937e1eeb3c272e56e2e273a10f2806ba33c0469796d8e8ef555b5
public void testExceptions()
// You are a professional Java test case writer, please create a test case named `testExceptions` for the issue `Lang-LANG-805`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-805 // // ## Issue-Title: // RandomStringUtils.random(count, 0, 0, false, fa...
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 testLang538() { final String dateTime = "2009-10-16T16:42:16.000Z"; // more commonly constructed with: cal = new GregorianCalendar(2009, 9, 16, 8, 42, 16) // for the unit test to work in any time zone, constructing with GMT-8 rather than default locale time zone Gregoria...
org.apache.commons.lang3.time.FastDateFormatTest::testLang538
src/test/org/apache/commons/lang3/time/FastDateFormatTest.java
349
src/test/org/apache/commons/lang3/time/FastDateFormatTest.java
testLang538
/* * 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 `testLang538` for the issue `Lang-LANG-538`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-538 // // ## Issue-Title: // DateFormatUtils.format does not correctly change C...
349
38
338
src/test/org/apache/commons/lang3/time/FastDateFormatTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-538 ## Issue-Title: DateFormatUtils.format does not correctly change Calendar TimeZone in certain situations ## Issue-Description: If a Calendar object is constructed in certain ways a call to Calendar.setTimeZone does not correctly change the Calendars fields. Calling Calenar.ge...
338
[ "org.apache.commons.lang3.time.FastDateFormat" ]
27b70638cd9688fa24588d5bdfe52c136c8025fe13381321ceda294042517d12
public void testLang538()
// You are a professional Java test case writer, please create a test case named `testLang538` for the issue `Lang-LANG-538`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-538 // // ## Issue-Title: // DateFormatUtils.format does not correctly change C...
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 testIssue688() throws Exception { testTypes( "/** @const */ var SOME_DEFAULT =\n" + " /** @type {TwoNumbers} */ ({first: 1, second: 2});\n" + "/**\n" + "* Class defining an interface with two numbers.\n" + "* @interface\n" + "*/\n" + "function...
com.google.javascript.jscomp.TypeCheckTest::testIssue688
test/com/google/javascript/jscomp/TypeCheckTest.java
5,921
test/com/google/javascript/jscomp/TypeCheckTest.java
testIssue688
/* * 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 `testIssue688` for the issue `Closure-688`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-688 // // ## Issue-Title: // @const dumps type cast information // // ## Issue-De...
5,921
17
5,904
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-688 ## Issue-Title: @const dumps type cast information ## Issue-Description: The following code compiles fine: /\*\* \* Class defining an interface with two numbers. \* @interface \*/ function TwoNumbers() {} /\*\* @type number \*/ TwoNumbers.prototype.first; /\*\* @ty...
5,904
[ "com.google.javascript.jscomp.TypedScopeCreator" ]
28136ab5f0788dad90d13c40547f7f0cb8f8ba4698f9c433f4fbf81df351da8f
public void testIssue688() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue688` for the issue `Closure-688`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-688 // // ## Issue-Title: // @const dumps type cast information // // ## Issue-De...
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...
@SuppressWarnings("resource") public void testTokensSingleMatchWithPath() throws Exception { JsonParser p0 = JSON_F.createParser(SIMPLE); JsonParser p = new FilteringParserDelegate(p0, new NameMatchFilter("value"), true, // includePath fal...
com.fasterxml.jackson.core.filter.TokenVerifyingParserFiltering330Test::testTokensSingleMatchWithPath
src/test/java/com/fasterxml/jackson/core/filter/TokenVerifyingParserFiltering330Test.java
117
src/test/java/com/fasterxml/jackson/core/filter/TokenVerifyingParserFiltering330Test.java
testTokensSingleMatchWithPath
package com.fasterxml.jackson.core.filter; import java.util.Arrays; import java.util.HashSet; import java.util.Set; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.JsonParser.NumberType; import com.fasterxml.jackson.core.filter.FilteringParserDelegate; import com.fasterxml.jackson.core.filter.T...
// You are a professional Java test case writer, please create a test case named `testTokensSingleMatchWithPath` for the issue `JacksonCore-330`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-330 // // ## Issue-Title: // FilteringParserDelegate seem...
117
21
64
src/test/java/com/fasterxml/jackson/core/filter/TokenVerifyingParserFiltering330Test.java
src/test/java
```markdown ## Issue-ID: JacksonCore-330 ## Issue-Title: FilteringParserDelegate seems to miss last closing END_OBJECT ## Issue-Description: (note: adding a failing test for this case) Looks like with settings like: ``` JsonParser p = new FilteringParserDelegate(p0, new NameMatchFilter("...
64
[ "com.fasterxml.jackson.core.filter.FilteringParserDelegate" ]
28b79e0076fe1770f142c14476b41d8a293693d11fc512d08a46c4ae66f117d7
@SuppressWarnings("resource") public void testTokensSingleMatchWithPath() throws Exception
// You are a professional Java test case writer, please create a test case named `testTokensSingleMatchWithPath` for the issue `JacksonCore-330`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-330 // // ## Issue-Title: // FilteringParserDelegate seem...
JacksonCore
package com.fasterxml.jackson.core.filter; import java.util.Arrays; import java.util.HashSet; import java.util.Set; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.JsonParser.NumberType; import com.fasterxml.jackson.core.filter.FilteringParserDelegate; import com.fasterxml.jackson.core.filter.T...
@Test public void testMath288() throws OptimizationException { LinearObjectiveFunction f = new LinearObjectiveFunction(new double[] { 7, 3, 0, 0 }, 0 ); Collection<LinearConstraint> constraints = new ArrayList<LinearConstraint>(); constraints.add(new LinearConstraint(new double[] { 3, 0,...
org.apache.commons.math.optimization.linear.SimplexSolverTest::testMath288
src/test/java/org/apache/commons/math/optimization/linear/SimplexSolverTest.java
73
src/test/java/org/apache/commons/math/optimization/linear/SimplexSolverTest.java
testMath288
/* * 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 `testMath288` for the issue `Math-MATH-288`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-288 // // ## Issue-Title: // SimplexSolver not working as expected 2 // // ## ...
73
82
60
src/test/java/org/apache/commons/math/optimization/linear/SimplexSolverTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-288 ## Issue-Title: SimplexSolver not working as expected 2 ## Issue-Description: SimplexSolver didn't find the optimal solution. Program for Lpsolve: ===================== /\* Objective function \*/ max: 7 a 3 b; /\* Constraints \*/ R1: +3 a -5 c <= 0; R2: +2 ...
60
[ "org.apache.commons.math.optimization.linear.SimplexSolver" ]
28f4977fb9075e3935a5ccce1360d2cd68d45e9922f4c151444f2fce7ae3f399
@Test public void testMath288() throws OptimizationException
// You are a professional Java test case writer, please create a test case named `testMath288` for the issue `Math-MATH-288`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-288 // // ## Issue-Title: // SimplexSolver not working as expected 2 // // ## ...
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 testNullCommentEqualsEmptyComment() { ZipArchiveEntry entry1 = new ZipArchiveEntry("foo"); ZipArchiveEntry entry2 = new ZipArchiveEntry("foo"); ZipArchiveEntry entry3 = new ZipArchiveEntry("foo"); entry1.setComment(null); entry2.setComment(""); entry3.setC...
org.apache.commons.compress.archivers.zip.ZipArchiveEntryTest::testNullCommentEqualsEmptyComment
src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
252
src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
testNullCommentEqualsEmptyComment
/* * 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 `testNullCommentEqualsEmptyComment` for the issue `Compress-COMPRESS-187`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-187 // // ## Issue-Title: // ZipArchiveIn...
252
/** * Tests comment's influence on equals comparisons. * @see https://issues.apache.org/jira/browse/COMPRESS-187 */
15
242
src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-187 ## Issue-Title: ZipArchiveInputStream and ZipFile don't produce equals ZipArchiveEntry instances ## Issue-Description: I'm trying to use a ZipArchiveEntry coming from ZipArchiveInputStream that I stored somwhere for later with a ZipFile and it does not work. The rea...
242
[ "org.apache.commons.compress.archivers.zip.ZipArchiveEntry" ]
2a28f9a7db5afb47ea6f8908ec3dbac04732487006712a04c79563debd125361
public void testNullCommentEqualsEmptyComment()
// You are a professional Java test case writer, please create a test case named `testNullCommentEqualsEmptyComment` for the issue `Compress-COMPRESS-187`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-187 // // ## Issue-Title: // ZipArchiveIn...
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 testNoInlineDeletedProperties() { testSameLocal( "var foo = {bar:1};" + "delete foo.bar;" + "return foo.bar;"); }
com.google.javascript.jscomp.InlineObjectLiteralsTest::testNoInlineDeletedProperties
test/com/google/javascript/jscomp/InlineObjectLiteralsTest.java
355
test/com/google/javascript/jscomp/InlineObjectLiteralsTest.java
testNoInlineDeletedProperties
/* * 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 `testNoInlineDeletedProperties` for the issue `Closure-851`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-851 // // ## Issue-Title: // Compiler ignores 'delete' statements...
355
5
350
test/com/google/javascript/jscomp/InlineObjectLiteralsTest.java
test
```markdown ## Issue-ID: Closure-851 ## Issue-Title: Compiler ignores 'delete' statements, can break functionality. ## Issue-Description: When the compiler rewrites internally-referenced object variables to non-object variables, as in the example below, it ignores 'delete' statements. These delete statements work a...
350
[ "com.google.javascript.jscomp.InlineObjectLiterals" ]
2a7d0885682151baefb02b0462350cc54e033dae81c9a0eb2d9ce2241130d4f2
public void testNoInlineDeletedProperties()
// You are a professional Java test case writer, please create a test case named `testNoInlineDeletedProperties` for the issue `Closure-851`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-851 // // ## Issue-Title: // Compiler ignores 'delete' statements...
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...
@Test public void survivesBlankLinesInPaxHeader() throws Exception { final TarArchiveInputStream is = getTestStream("/COMPRESS-355.tar"); try { final TarArchiveEntry entry = is.getNextTarEntry(); assertEquals("package/package.json", entry.getName()); assertNul...
org.apache.commons.compress.archivers.tar.TarArchiveInputStreamTest::survivesBlankLinesInPaxHeader
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
313
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
survivesBlankLinesInPaxHeader
/* * 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 `survivesBlankLinesInPaxHeader` for the issue `Compress-COMPRESS-355`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-355 // // ## Issue-Title: // Parsing PAX head...
313
/** * @link "https://issues.apache.org/jira/browse/COMPRESS-355" */
37
303
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-355 ## Issue-Title: Parsing PAX headers fails with NegativeArraySizeException ## Issue-Description: The TarArchiveInputStream.parsePaxHeaders method fails with a NegativeArraySizeException when there is an empty line at the end of the headers. The inner loop starts read...
303
[ "org.apache.commons.compress.archivers.tar.TarArchiveInputStream" ]
2a821ddae469c8d04c524ea3a83eab5940f91705b47262803bd0662867789631
@Test public void survivesBlankLinesInPaxHeader() throws Exception
// You are a professional Java test case writer, please create a test case named `survivesBlankLinesInPaxHeader` for the issue `Compress-COMPRESS-355`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-355 // // ## Issue-Title: // Parsing PAX head...
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 testUnnamedFunctionStatement() { // Statements parseError("function() {};", "unnamed function statement"); parseError("if (true) { function() {}; }", "unnamed function statement"); parse("function f() {};"); // Expressions parse("(function f() {});"); parse("(function () {});")...
com.google.javascript.jscomp.parsing.ParserTest::testUnnamedFunctionStatement
test/com/google/javascript/jscomp/parsing/ParserTest.java
781
test/com/google/javascript/jscomp/parsing/ParserTest.java
testUnnamedFunctionStatement
/* * 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 `testUnnamedFunctionStatement` for the issue `Closure-251`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-251 // // ## Issue-Title: // An unnamed function statement stateme...
781
81
773
test/com/google/javascript/jscomp/parsing/ParserTest.java
test
```markdown ## Issue-ID: Closure-251 ## Issue-Title: An unnamed function statement statements should generate a parse error ## Issue-Description: An unnamed function statement statements should generate a parse error, but it does not, for example: function () {}; Note: Unnamed function expression are legal: ...
773
[ "com.google.javascript.jscomp.parsing.IRFactory" ]
2afaabc62f10edb58cb2b2597ab9840a7284d1e017bd1944b2c812bf77e33789
public void testUnnamedFunctionStatement()
// You are a professional Java test case writer, please create a test case named `testUnnamedFunctionStatement` for the issue `Closure-251`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-251 // // ## Issue-Title: // An unnamed function statement stateme...
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(expected=TooManyEvaluationsException.class) public void testIssue631() { final UnivariateRealFunction f = new UnivariateRealFunction() { /** {@inheritDoc} */ public double value(double x) { return Math.exp(x) - Math.pow(Math.PI, 3.0); ...
org.apache.commons.math.analysis.solvers.RegulaFalsiSolverTest::testIssue631
src/test/java/org/apache/commons/math/analysis/solvers/RegulaFalsiSolverTest.java
55
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...
55
50
43
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) { ...
43
[ "org.apache.commons.math.analysis.solvers.BaseSecantSolver" ]
2b1591dc177aeaa4fe01f19febd23a25f69aa1edc5d0a1cfd4d5d6fb0eeffee9
@Test(expected=TooManyEvaluationsException.class) 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 testBackwardsTypedefUse1() throws Exception { testTypes( "/** @this {MyTypedef} */ function f() {}" + "/** @typedef {string} */ var MyTypedef;", "@this type of a function must be an object\n" + "Actual type: string"); }
com.google.javascript.jscomp.TypeCheckTest::testBackwardsTypedefUse1
test/com/google/javascript/jscomp/TypeCheckTest.java
2,614
test/com/google/javascript/jscomp/TypeCheckTest.java
testBackwardsTypedefUse1
/* * 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 `testBackwardsTypedefUse1` for the issue `Closure-268`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-268 // // ## Issue-Title: // resolveTypes: jstype.UnionType cannot be ...
2,614
152
2,608
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-268 ## Issue-Title: resolveTypes: jstype.UnionType cannot be cast to jstype.ObjectType ## Issue-Description: **What steps will reproduce the problem?** 1. Compile a bunch of JavaScript files that I can't release with these options: ['--create\_name\_map\_files', 'true', '--jscomp\...
2,608
[ "com.google.javascript.rhino.jstype.FunctionType" ]
2bb981fe5fc7851af800c7bb4c8784a13043f36f373e65ebfa2e7a12f7297ffd
public void testBackwardsTypedefUse1() throws Exception
// You are a professional Java test case writer, please create a test case named `testBackwardsTypedefUse1` for the issue `Closure-268`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-268 // // ## Issue-Title: // resolveTypes: jstype.UnionType cannot be ...
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 testIssue1017() { testSame("x = x.parentNode.parentNode; x = x.parentNode.parentNode;"); }
com.google.javascript.jscomp.ExploitAssignsTest::testIssue1017
test/com/google/javascript/jscomp/ExploitAssignsTest.java
161
test/com/google/javascript/jscomp/ExploitAssignsTest.java
testIssue1017
/* * 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 `testIssue1017` for the issue `Closure-1017`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1017 // // ## Issue-Title: // Different output from RestAPI and command line jar...
161
124
159
test/com/google/javascript/jscomp/ExploitAssignsTest.java
test
```markdown ## Issue-ID: Closure-1017 ## Issue-Title: Different output from RestAPI and command line jar ## Issue-Description: When I compile using the jar file from the command line I get a result that is not correct. However, when I test it via the REST API or the Web UI I get a correct output. I've attached a fi...
159
[ "com.google.javascript.jscomp.ExploitAssigns" ]
2bc49469aea20518aa60986f6924f15475d1ca003f9bc1e7d800b7ef3589570f
public void testIssue1017()
// You are a professional Java test case writer, please create a test case named `testIssue1017` for the issue `Closure-1017`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1017 // // ## Issue-Title: // Different output from RestAPI and command line jar...
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 testRootBeans() throws Exception { for (Source src : Source.values()) { _testRootBeans(src); } }
com.fasterxml.jackson.databind.seq.ReadValuesTest::testRootBeans
src/test/java/com/fasterxml/jackson/databind/seq/ReadValuesTest.java
50
src/test/java/com/fasterxml/jackson/databind/seq/ReadValuesTest.java
testRootBeans
package com.fasterxml.jackson.databind.seq; import java.io.*; import java.util.*; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.BaseMapTest; import com.fasterxml.jackson.databind.MappingIterator; import com.fasterxml.jackson.databind....
// You are a professional Java test case writer, please create a test case named `testRootBeans` for the issue `JacksonDatabind-1362`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1362 // // ## Issue-Title: // ObjectReader.readValues() ignores ...
50
57
45
src/test/java/com/fasterxml/jackson/databind/seq/ReadValuesTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1362 ## Issue-Title: ObjectReader.readValues() ignores offset and length when reading an array ## Issue-Description: ObjectReader.readValues ignores offset and length when reading an array. If \_dataFormatReaders it will always use the full array: <https://github.com/Faste...
45
[ "com.fasterxml.jackson.databind.ObjectReader" ]
2bd123ba79c62252138620d6ee25bf7c4cc445a4c4041dc8e96fe345d80382e3
public void testRootBeans() throws Exception
// You are a professional Java test case writer, please create a test case named `testRootBeans` for the issue `JacksonDatabind-1362`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1362 // // ## Issue-Title: // ObjectReader.readValues() ignores ...
JacksonDatabind
package com.fasterxml.jackson.databind.seq; import java.io.*; import java.util.*; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.BaseMapTest; import com.fasterxml.jackson.databind.MappingIterator; import com.fasterxml.jackson.databind....
public void testBug1864222() { TimeSeries s = new TimeSeries("S"); s.add(new Day(19, 8, 2005), 1); s.add(new Day(31, 1, 2006), 1); boolean pass = true; try { s.createCopy(new Day(1, 12, 2005), new Day(18, 1, 2006)); } catch (CloneNotSupportedExcept...
org.jfree.data.time.junit.TimeSeriesTests::testBug1864222
tests/org/jfree/data/time/junit/TimeSeriesTests.java
834
tests/org/jfree/data/time/junit/TimeSeriesTests.java
testBug1864222
/* =========================================================== * 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 `testBug1864222` for the issue `Chart-818`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-818 // // ## Issue-Title: // #818 Error on TimeSeries createCopy() method // // //...
834
/** * Test for bug report 1864222. */
9
822
tests/org/jfree/data/time/junit/TimeSeriesTests.java
tests
```markdown ## Issue-ID: Chart-818 ## Issue-Title: #818 Error on TimeSeries createCopy() method ## Issue-Description: The test case at the end fails with : java.lang.IllegalArgumentException: Requires start <= end. The problem is in that the int start and end indexes corresponding to given timePeriod are co...
822
[ "org.jfree.data.time.TimeSeries" ]
2c5c58b25e1ed2c397339c551257aacde8b6af3fdec9f290867a48a13ee5af2b
public void testBug1864222()
// You are a professional Java test case writer, please create a test case named `testBug1864222` for the issue `Chart-818`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Chart-818 // // ## Issue-Title: // #818 Error on TimeSeries createCopy() method // // //...
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 testMath369() throws Exception { UnivariateRealFunction f = new SinFunction(); UnivariateRealSolver solver = new BisectionSolver(); assertEquals(Math.PI, solver.solve(f, 3.0, 3.2, 3.1), solver.getAbsoluteAccuracy()); }
org.apache.commons.math.analysis.solvers.BisectionSolverTest::testMath369
src/test/java/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java
101
src/test/java/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java
testMath369
/* * 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 `testMath369` for the issue `Math-MATH-369`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-369 // // ## Issue-Title: // BisectionSolver.solve(final UnivariateRealFunction...
101
70
97
src/test/java/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-369 ## Issue-Title: BisectionSolver.solve(final UnivariateRealFunction f, double min, double max, double initial) throws NullPointerException ## Issue-Description: Method BisectionSolver.solve(final UnivariateRealFunction f, double min, double max, double initial) invokes ...
97
[ "org.apache.commons.math.analysis.solvers.BisectionSolver" ]
2d74eab122b5278c2012a64c9a801d8c9a27951fc1fc2001e8419d988034e5fe
public void testMath369() throws Exception
// You are a professional Java test case writer, please create a test case named `testMath369` for the issue `Math-MATH-369`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-369 // // ## Issue-Title: // BisectionSolver.solve(final UnivariateRealFunction...
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 testIssue1101a() { helperCanInlineReferenceToFunction(CanInlineResult.NO, "function foo(a){return modifiyX() + a;} foo(x);", "foo", INLINE_DIRECT); }
com.google.javascript.jscomp.FunctionInjectorTest::testIssue1101a
test/com/google/javascript/jscomp/FunctionInjectorTest.java
1,349
test/com/google/javascript/jscomp/FunctionInjectorTest.java
testIssue1101a
/* * 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 `testIssue1101a` for the issue `Closure-1101`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1101 // // ## Issue-Title: // Erroneous optimization in ADVANCED_OPTIMIZATIONS ...
1,349
116
1,345
test/com/google/javascript/jscomp/FunctionInjectorTest.java
test
```markdown ## Issue-ID: Closure-1101 ## Issue-Title: Erroneous optimization in ADVANCED_OPTIMIZATIONS mode ## Issue-Description: **What steps will reproduce the problem?** 1. Create a file input.js with the following "minimal" test case: window["anchor"] = function (obj, modifiesProp) { return (function (s...
1,345
[ "com.google.javascript.jscomp.FunctionInjector" ]
2da75de178835c52badfc41da5e7461f6ba6480e062b15b287874fdb26842c39
public void testIssue1101a()
// You are a professional Java test case writer, please create a test case named `testIssue1101a` for the issue `Closure-1101`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1101 // // ## Issue-Title: // Erroneous optimization in ADVANCED_OPTIMIZATIONS ...
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 testQuotedProps() { testSame("({'':0})"); testSame("({'1.0':0})"); testSame("({'\u1d17A':0})"); testSame("({'a\u0004b':0})"); }
com.google.javascript.jscomp.ConvertToDottedPropertiesTest::testQuotedProps
test/com/google/javascript/jscomp/ConvertToDottedPropertiesTest.java
72
test/com/google/javascript/jscomp/ConvertToDottedPropertiesTest.java
testQuotedProps
/* * 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 `testQuotedProps` for the issue `Closure-921`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-921 // // ## Issue-Title: // unicode characters in property names result in inv...
72
131
67
test/com/google/javascript/jscomp/ConvertToDottedPropertiesTest.java
test
```markdown ## Issue-ID: Closure-921 ## Issue-Title: unicode characters in property names result in invalid output ## Issue-Description: **What steps will reproduce the problem?** 1. use unicode characters in a property name for an object, like this: var test={"a\u0004b":"c"}; 2. compile **What is the expect...
67
[ "com.google.javascript.rhino.TokenStream" ]
2f0fd5f1b5f677e16617471bb21047234e23cf4433d4b3fd4bd86a82491bf954
public void testQuotedProps()
// You are a professional Java test case writer, please create a test case named `testQuotedProps` for the issue `Closure-921`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-921 // // ## Issue-Title: // unicode characters in property names result in inv...
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 testCompareTo() { Fraction first = new Fraction(1, 2); Fraction second = new Fraction(1, 3); Fraction third = new Fraction(1, 2); assertEquals(0, first.compareTo(first)); assertEquals(0, first.compareTo(third)); assertEquals(1, first.compareTo(sec...
org.apache.commons.math.fraction.FractionTest::testCompareTo
src/test/org/apache/commons/math/fraction/FractionTest.java
180
src/test/org/apache/commons/math/fraction/FractionTest.java
testCompareTo
/* * 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 `testCompareTo` for the issue `Math-MATH-252`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-252 // // ## Issue-Title: // Fraction.comparTo returns 0 for some differente ...
180
91
162
src/test/org/apache/commons/math/fraction/FractionTest.java
src/test
```markdown ## Issue-ID: Math-MATH-252 ## Issue-Title: Fraction.comparTo returns 0 for some differente fractions ## Issue-Description: If two different fractions evaluate to the same double due to limited precision, the compareTo methode returns 0 as if they were identical. ``` // value is roughly PI - 3.07...
162
[ "org.apache.commons.math.fraction.Fraction" ]
2f6d21de689b5ecced32930ed695549019139e7f73e1ce736858bf829a257a54
public void testCompareTo()
// You are a professional Java test case writer, please create a test case named `testCompareTo` for the issue `Math-MATH-252`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-252 // // ## Issue-Title: // Fraction.comparTo returns 0 for some differente ...
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 treatsUndeclaredNamespaceAsLocalName() { String html = "<fb:like>One</fb:like>"; org.jsoup.nodes.Document doc = Jsoup.parse(html); Document w3Doc = new W3CDom().fromJsoup(doc); Node htmlEl = w3Doc.getFirstChild(); assertNull(htmlEl.getNamespaceURI()); ...
org.jsoup.helper.W3CDomTest::treatsUndeclaredNamespaceAsLocalName
src/test/java/org/jsoup/helper/W3CDomTest.java
155
src/test/java/org/jsoup/helper/W3CDomTest.java
treatsUndeclaredNamespaceAsLocalName
package org.jsoup.helper; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.integration.ParseTest; import org.jsoup.nodes.Element; import org.junit.Test; import org.w3c.dom.Document; import org.w3c.dom.Node; import java.io.File; import java.io.IOException; import static org.junit.Assert.assertEqual...
// You are a professional Java test case writer, please create a test case named `treatsUndeclaredNamespaceAsLocalName` for the issue `Jsoup-848`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-848 // // ## Issue-Title: // W3CDom Helper fails to convert wh...
155
84
139
src/test/java/org/jsoup/helper/W3CDomTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-848 ## Issue-Title: W3CDom Helper fails to convert whenever some namespace declarations are missing ## Issue-Description: Hello I've been running into an issue where if I convert my Jsoup parsed document into a org.w3c.dom.Document with the W3CDom helper and that document happens to...
139
[ "org.jsoup.helper.W3CDom" ]
2ffc9bb2e59ef1fd96112a97ec5f51eb56dd7cd0bfebc3adc58f22201c08ee51
@Test public void treatsUndeclaredNamespaceAsLocalName()
// You are a professional Java test case writer, please create a test case named `treatsUndeclaredNamespaceAsLocalName` for the issue `Jsoup-848`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-848 // // ## Issue-Title: // W3CDom Helper fails to convert wh...
Jsoup
package org.jsoup.helper; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.integration.ParseTest; import org.jsoup.nodes.Element; import org.junit.Test; import org.w3c.dom.Document; import org.w3c.dom.Node; import java.io.File; import java.io.IOException; import static org.junit.Assert.assertEqual...
public void testBadEndpoints() throws Exception { UnivariateRealFunction f = new SinFunction(); UnivariateRealSolver solver = new BrentSolver(); try { // bad interval solver.solve(f, 1, -1); fail("Expecting IllegalArgumentException - bad interval"); } catch (...
org.apache.commons.math.analysis.solvers.BrentSolverTest::testBadEndpoints
src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
337
src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
testBadEndpoints
/* * 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 `testBadEndpoints` for the issue `Math-MATH-343`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-343 // // ## Issue-Title: // Brent solver doesn't throw IllegalArgumentExc...
337
73
316
src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-343 ## Issue-Title: Brent solver doesn't throw IllegalArgumentException when initial guess has the wrong sign ## Issue-Description: Javadoc for "public double solve(final UnivariateRealFunction f, final double min, final double max, final double initial)" claims that "if the valu...
316
[ "org.apache.commons.math.analysis.solvers.BrentSolver" ]
310e5fccd103ed5ca2bac1a0023d0fab9def70ab67cc38db59356dba6d219c9c
public void testBadEndpoints() throws Exception
// You are a professional Java test case writer, please create a test case named `testBadEndpoints` for the issue `Math-MATH-343`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-343 // // ## Issue-Title: // Brent solver doesn't throw IllegalArgumentExc...
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 testLang645() { Locale locale = new Locale("sv", "SE"); Calendar cal = Calendar.getInstance(); cal.set(2010, 0, 1, 12, 0, 0); Date d = cal.getTime(); FastDateFormat fdf = FastDateFormat.getInstance("EEEE', week 'ww", locale); assertEquals("fredag, week ...
org.apache.commons.lang3.time.FastDateFormatTest::testLang645
src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
337
src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
testLang645
/* * 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 `testLang645` for the issue `Lang-LANG-645`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-645 // // ## Issue-Title: // FastDateFormat.format() outputs incorrect week of ...
337
26
327
src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-645 ## Issue-Title: FastDateFormat.format() outputs incorrect week of year because locale isn't respected ## Issue-Description: FastDateFormat apparently doesn't respect the locale it was sent on creation when outputting week in year (e.g. "ww") in format(). It seems to use the s...
327
[ "org.apache.commons.lang3.time.FastDateFormat" ]
313ffa31096b6493a3649c925831a756eb2e4e1ad4a9b536f146f29a8f9c204c
public void testLang645()
// You are a professional Java test case writer, please create a test case named `testLang645` for the issue `Lang-LANG-645`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-645 // // ## Issue-Title: // FastDateFormat.format() outputs incorrect week of ...
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 testNamespacedFunctionStubLocal() { testSame( "(function() {" + "var goog = {};" + "/** @param {number} x */ goog.foo;" + "});"); ObjectType goog = (ObjectType) findNameType("goog", lastLocalScope); assertTrue(goog.hasProperty("foo")); assertEquals("functio...
com.google.javascript.jscomp.TypedScopeCreatorTest::testNamespacedFunctionStubLocal
test/com/google/javascript/jscomp/TypedScopeCreatorTest.java
257
test/com/google/javascript/jscomp/TypedScopeCreatorTest.java
testNamespacedFunctionStubLocal
/* * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// You are a professional Java test case writer, please create a test case named `testNamespacedFunctionStubLocal` for the issue `Closure-61`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-61 // // ## Issue-Title: // Type checker misses annotations on f...
257
150
242
test/com/google/javascript/jscomp/TypedScopeCreatorTest.java
test
```markdown ## Issue-ID: Closure-61 ## Issue-Title: Type checker misses annotations on functions defined within functions ## Issue-Description: **What steps will reproduce the problem?** 1. Compile the following code under --warning\_level VERBOSE var ns = {}; /\*\* @param {string=} b \*/ ns.a = function(b) ...
242
[ "com.google.javascript.jscomp.TypedScopeCreator" ]
31710e92354a041c25caff68b7c071586dfc075d667c59f16c65a72cc6256117
public void testNamespacedFunctionStubLocal()
// You are a professional Java test case writer, please create a test case named `testNamespacedFunctionStubLocal` for the issue `Closure-61`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-61 // // ## Issue-Title: // Type checker misses annotations on f...
Closure
/* * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
@Test public void discoverDeepMockingOfGenerics() { MyClass1 myMock1 = mock(MyClass1.class, RETURNS_DEEP_STUBS); when(myMock1.getNested().getNested().returnSomething()).thenReturn("Hello World."); }
org.mockitousage.bugs.deepstubs.DeepStubFailingWhenGenricNestedAsRawTypeTest::discoverDeepMockingOfGenerics
test/org/mockitousage/bugs/deepstubs/DeepStubFailingWhenGenricNestedAsRawTypeTest.java
26
test/org/mockitousage/bugs/deepstubs/DeepStubFailingWhenGenricNestedAsRawTypeTest.java
discoverDeepMockingOfGenerics
package org.mockitousage.bugs.deepstubs; import static org.mockito.Mockito.RETURNS_DEEP_STUBS; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import org.junit.Test; public class DeepStubFailingWhenGenricNestedAsRawTypeTest { interface MyClass1<MC2 extends MyClass2> { MC2 getNe...
// You are a professional Java test case writer, please create a test case named `discoverDeepMockingOfGenerics` for the issue `Mockito-128`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-128 // // ## Issue-Title: // Deep stubbing with generic responses...
26
7
22
test/org/mockitousage/bugs/deepstubs/DeepStubFailingWhenGenricNestedAsRawTypeTest.java
test
```markdown ## Issue-ID: Mockito-128 ## Issue-Title: Deep stubbing with generic responses in the call chain is not working ## Issue-Description: Deep stubbing will throw an Exception if multiple generics occur in the call chain. For instance, consider having a mock `myMock1` that provides a function that returns a ...
22
[ "org.mockito.internal.util.reflection.GenericMetadataSupport" ]
3218dca4fd2bccc1b6a5dcf6bdd7a2ae6dfa9c3562a145a587bfb754dce70313
@Test public void discoverDeepMockingOfGenerics()
// You are a professional Java test case writer, please create a test case named `discoverDeepMockingOfGenerics` for the issue `Mockito-128`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-128 // // ## Issue-Title: // Deep stubbing with generic responses...
Mockito
package org.mockitousage.bugs.deepstubs; import static org.mockito.Mockito.RETURNS_DEEP_STUBS; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import org.junit.Test; public class DeepStubFailingWhenGenricNestedAsRawTypeTest { interface MyClass1<MC2 extends MyClass2> { MC2 getNe...
@Test public void handlesDodgyXmlDecl() { String xml = "<?xml version='1.0'><val>One</val>"; Document doc = Jsoup.parse(xml, "", Parser.xmlParser()); assertEquals("One", doc.select("val").text()); }
org.jsoup.parser.XmlTreeBuilderTest::handlesDodgyXmlDecl
src/test/java/org/jsoup/parser/XmlTreeBuilderTest.java
228
src/test/java/org/jsoup/parser/XmlTreeBuilderTest.java
handlesDodgyXmlDecl
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.nodes.CDataNode; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.Node; import org.jsoup.nodes.TextNode; import org.jsoup.nodes.XmlDeclaration; import...
// You are a professional Java test case writer, please create a test case named `handlesDodgyXmlDecl` for the issue `Jsoup-1015`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1015 // // ## Issue-Title: // Faulty Xml Causes IndexOutOfBoundsException // ...
228
80
223
src/test/java/org/jsoup/parser/XmlTreeBuilderTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-1015 ## Issue-Title: Faulty Xml Causes IndexOutOfBoundsException ## Issue-Description: ``` @Test public void parseFaultyXml() { String xml = "<?xml version='1.0'><val>One</val>"; Document doc = Jsoup.parse(xml, "", Parser.xmlParser()); } ``` Results in: ``` java.lang.Inde...
223
[ "org.jsoup.parser.XmlTreeBuilder" ]
3249b6f3eb9e734ac0bdf0884f592724752b381381dd1bad793a1eb108a5315f
@Test public void handlesDodgyXmlDecl()
// You are a professional Java test case writer, please create a test case named `handlesDodgyXmlDecl` for the issue `Jsoup-1015`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1015 // // ## Issue-Title: // Faulty Xml Causes IndexOutOfBoundsException // ...
Jsoup
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.helper.StringUtil; import org.jsoup.nodes.CDataNode; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.Node; import org.jsoup.nodes.TextNode; import org.jsoup.nodes.XmlDeclaration; import...
@Test public void shouldDealWithNestedGenerics() throws Exception { assertEquals(Set.class, m.getGenericType(field("nested"))); assertEquals(Set.class, m.getGenericType(field("multiNested"))); }
org.mockito.internal.util.reflection.GenericMasterTest::shouldDealWithNestedGenerics
test/org/mockito/internal/util/reflection/GenericMasterTest.java
39
test/org/mockito/internal/util/reflection/GenericMasterTest.java
shouldDealWithNestedGenerics
package org.mockito.internal.util.reflection; import static org.junit.Assert.*; import java.lang.reflect.Field; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Set; import org.junit.Test; public class GenericMasterTest { GenericMaster m = new GenericMaster(); ...
// You are a professional Java test case writer, please create a test case named `shouldDealWithNestedGenerics` for the issue `Mockito-188`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-188 // // ## Issue-Title: // ArgumentCaptor no longer working for ...
39
12
35
test/org/mockito/internal/util/reflection/GenericMasterTest.java
test
```markdown ## Issue-ID: Mockito-188 ## Issue-Title: ArgumentCaptor no longer working for varargs ## Issue-Description: I ran into the issue described here: <http://stackoverflow.com/questions/27303562/why-does-upgrading-mockito-from-1-9-5-to-1-10-8-break-this-captor> ``` You are a professional Java test case ...
35
[ "org.mockito.internal.util.reflection.GenericMaster" ]
32dbc6836b7de0e1d86e5a86954e713eea25c946a7d8c7f85afb875b1363a171
@Test public void shouldDealWithNestedGenerics() throws Exception
// You are a professional Java test case writer, please create a test case named `shouldDealWithNestedGenerics` for the issue `Mockito-188`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-188 // // ## Issue-Title: // ArgumentCaptor no longer working for ...
Mockito
package org.mockito.internal.util.reflection; import static org.junit.Assert.*; import java.lang.reflect.Field; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Set; import org.junit.Test; public class GenericMasterTest { GenericMaster m = new GenericMaster(); ...
public void testIssue1024() throws Exception { testTypes( "/** @param {Object} a */\n" + "function f(a) {\n" + " a.prototype = '__proto'\n" + "}\n" + "/** @param {Object} b\n" + " * @return {!Object}\n" + " */\n" + "function g(b) {\n" + " ...
com.google.javascript.jscomp.TypeCheckTest::testIssue1024
test/com/google/javascript/jscomp/TypeCheckTest.java
12,020
test/com/google/javascript/jscomp/TypeCheckTest.java
testIssue1024
/* * 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 `testIssue1024` for the issue `Closure-1042`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1042 // // ## Issue-Title: // Type of prototype property incorrectly inferred to...
12,020
172
11,991
test/com/google/javascript/jscomp/TypeCheckTest.java
test
```markdown ## Issue-ID: Closure-1042 ## Issue-Title: Type of prototype property incorrectly inferred to string ## Issue-Description: **What steps will reproduce the problem?** 1. Compile the following code: /\*\* @param {Object} a \*/ function f(a) { a.prototype = '\_\_proto'; } /\*\* @param {Object} a \...
11,991
[ "com.google.javascript.jscomp.TypedScopeCreator" ]
33160e7ccb5e2fd8f543cba3ad9b7dc46f121fb1f5fa65006325c7262373aa8d
public void testIssue1024() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue1024` for the issue `Closure-1042`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1042 // // ## Issue-Title: // Type of prototype property incorrectly inferred to...
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 testIsSameLocalTime_Cal() { GregorianCalendar cal1 = new GregorianCalendar(TimeZone.getTimeZone("GMT+1")); GregorianCalendar cal2 = new GregorianCalendar(TimeZone.getTimeZone("GMT-1")); cal1.set(2004, 6, 9, 13, 45, 0); cal1.set(Calendar.MILLISECOND, 0); cal2.set(2...
org.apache.commons.lang3.time.DateUtilsTest::testIsSameLocalTime_Cal
src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
244
src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
testIsSameLocalTime_Cal
/* * 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 `testIsSameLocalTime_Cal` for the issue `Lang-LANG-677`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-677 // // ## Issue-Title: // DateUtils.isSameLocalTime does not wor...
244
//-----------------------------------------------------------------------
21
221
src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-677 ## Issue-Title: DateUtils.isSameLocalTime does not work correct ## Issue-Description: Hi, I think I found a bug in the DateUtils class in the method isSameLocalTime. Example: Calendar a = Calendar.getInstance(); a.setTimeInMillis(1297364400000L); Calendar b = Calen...
221
[ "org.apache.commons.lang3.time.DateUtils" ]
335c4ab1bf42d5808e6173fe45acac4b9ddff34c7fa98f7c16109594fe493046
public void testIsSameLocalTime_Cal()
// You are a professional Java test case writer, please create a test case named `testIsSameLocalTime_Cal` for the issue `Lang-LANG-677`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-677 // // ## Issue-Title: // DateUtils.isSameLocalTime does not wor...
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 testBug3476684_adjustOffset() { final DateTimeZone zone = DateTimeZone.forID("America/Sao_Paulo"); DateTime base = new DateTime(2012, 2, 25, 22, 15, zone); DateTime baseBefore = base.plusHours(1); // 23:15 (first) DateTime baseAfter = base.plusHours(2); // 23:15 (second...
org.joda.time.TestDateTimeZoneCutover::testBug3476684_adjustOffset
src/test/java/org/joda/time/TestDateTimeZoneCutover.java
1,262
src/test/java/org/joda/time/TestDateTimeZoneCutover.java
testBug3476684_adjustOffset
/* * Copyright 2001-2012 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 `testBug3476684_adjustOffset` for the issue `Time-141`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-141 // // ## Issue-Title: // #141 Bug on withLaterOffsetAtOverlap method ...
1,262
17
1,248
src/test/java/org/joda/time/TestDateTimeZoneCutover.java
src/test/java
```markdown ## Issue-ID: Time-141 ## Issue-Title: #141 Bug on withLaterOffsetAtOverlap method ## Issue-Description: The method withLaterOffsetAtOverlap created to workaround the issue 3192457 seems to not be working at all. I won´t write many info about the problem to solve because the issue 3192457 have thi...
1,248
[ "org.joda.time.DateTimeZone" ]
3364e07e2c87857a9618fc246e9cf1ce9781b6c471ae7da8cecba7984da3f0f9
public void testBug3476684_adjustOffset()
// You are a professional Java test case writer, please create a test case named `testBug3476684_adjustOffset` for the issue `Time-141`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-141 // // ## Issue-Title: // #141 Bug on withLaterOffsetAtOverlap method ...
Time
/* * Copyright 2001-2012 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...