{"task": {"agent_timeout": 3000, "task": "testgen__alibaba__fastjson2-1245", "verifier_timeout": 3000, "instruction": "The following text contains a user issue (in <issue/> brackets) posted at a repository. Further, you are provided with file contents of several files in the repository that contain relevant code (in <code> brackets). It may be necessary to use code from third party dependencies or files not contained in the attached documents however. Your task is to identify the issue and implement a test case that verifies a proposed solution to this issue. More details at the end of this text.\n<issue>\n      ### \u95ee\u9898\u63cf\u8ff0\n\n\u4f7f\u7528\u52a8\u6001\u4ee3\u7406\uff0c\u5982\u679cjavabean\u91cc\u9762\u6709EnumSet\uff0c\u53cd\u5e8f\u5217\u5316\u65f6\u4f1a\u5931\u8d25\u3002\n\n### \u73af\u5883\u4fe1\u606f\n*\u8bf7\u586b\u5199\u4ee5\u4e0b\u4fe1\u606f\uff1a*\n\n - OS\u4fe1\u606f\uff1a  MacBook pro M1\n - JDK\u4fe1\u606f\uff1a jdk1.8.0_321.jdk\n - \u7248\u672c\u4fe1\u606f\uff1a2.0.25\n\n### \u91cd\u73b0\u6b65\u9aa4\n\u8f93\u5165\u6570\u636e\u5982\u4e0b\uff1a\n```java\n@Data\npublic class ParamsDTO implements Serializable {\n    private EnumSet<TimeUnit> paramsItemSet;\n}\n\n@Test\n  public void testEnumSet() {\n      ParamsDTO paramsDTO = new ParamsDTO();\n      EnumSet<TimeUnit> timeUnitSet = EnumSet.of(TimeUnit.DAYS);\n      paramsDTO.setParamsItemSet(timeUnitSet);\n\n      AdvisedSupport config = new AdvisedSupport();\n      config.setTarget(paramsDTO);\n      DefaultAopProxyFactory factory = new DefaultAopProxyFactory();\n      Object proxy = factory.createAopProxy(config).getProxy();\n      Object proxy1 = factory.createAopProxy(config).getProxy();\n\n      ObjectWriter objectWriter = JSONFactory.getDefaultObjectWriterProvider().getObjectWriter(proxy.getClass());\n      ObjectWriter objectWriter1 = JSONFactory.getDefaultObjectWriterProvider().getObjectWriter(proxy1.getClass());\n      assertSame(objectWriter, objectWriter1);\n\n      byte[] jsonbBytes = JSONB.toBytes(proxy, writerFeatures);\n      ContextAutoTypeBeforeHandler contextAutoTypeBeforeHandler = new ContextAutoTypeBeforeHandler(true,\n              ParamsDTO.class.getName());\n      ParamsDTO paramsDTO1 = (ParamsDTO) JSONB.parseObject(jsonbBytes, Object.class, contextAutoTypeBeforeHandler, readerFeatures);\n      assertEquals(paramsDTO.getParamsItemSet().size(), paramsDTO1.getParamsItemSet().size());\n      assertEquals(paramsDTO.getParamsItemSet().iterator().next(), paramsDTO1.getParamsItemSet().iterator().next());\n  }\n\nJSONWriter.Feature[] writerFeatures = {\n            JSONWriter.Feature.WriteClassName,\n            JSONWriter.Feature.FieldBased,\n            JSONWriter.Feature.ErrorOnNoneSerializable,\n            JSONWriter.Feature.ReferenceDetection,\n            JSONWriter.Feature.WriteNulls,\n            JSONWriter.Feature.NotWriteDefaultValue,\n            JSONWriter.Feature.NotWriteHashMapArrayListClassName,\n            JSONWriter.Feature.WriteNameAsSymbol\n    };\n\n    JSONReader.Feature[] readerFeatures = {\n            JSONReader.Feature.UseDefaultConstructorAsPossible,\n            JSONReader.Feature.ErrorOnNoneSerializable,\n            JSONReader.Feature.UseNativeObject,\n            JSONReader.Feature.FieldBased\n    };\n```\n\n### \u671f\u5f85\u7684\u6b63\u786e\u7ed3\u679c\n\u53cd\u5e8f\u5217\u5316\u6b63\u5e38\uff0c\u6ca1\u6709\u62a5\u9519\u3002\n\n### \u76f8\u5173\u65e5\u5fd7\u8f93\u51fa\n```\ncom.alibaba.fastjson2.JSONException: create instance error class java.util.RegularEnumSet, offset 90\n    at com.alibaba.fastjson2.reader.ObjectReaderImplList.readJSONBObject(ObjectReaderImplList.java:395)\n    at com.alibaba.fastjson2.reader.ORG_1_2_ParamsDTO.readJSONBObject(Unknown Source)\n    at com.alibaba.fastjson2.JSONB.parseObject(JSONB.java:519)\n    at com.alibaba.fastjson2.dubbo.DubboTest6.testEnumSet(DubboTest6.java:81)\n    ...\nCaused by: java.lang.InstantiationException: java.util.RegularEnumSet\n    at java.lang.Class.newInstance(Class.java:427)\n    at com.alibaba.fastjson2.reader.ObjectReaderImplList.readJSONBObject(ObjectReaderImplList.java:393)\n    ... 73 more\nCaused by: java.lang.NoSuchMethodException: java.util.RegularEnumSet.<init>()\n    at java.lang.Class.getConstructor0(Class.java:3082)\n    at java.lang.Class.newInstance(Class.java:412)\n    ... 74 more\n```\n\n\n#### \u9644\u52a0\u4fe1\u606f\n\u6211\u5df2\u7ecf\u9a8c\u8bc1\u6b64\u95ee\u9898\uff0cObjectReaderImplList\u7f3a\u5c11\u5224\u65ad\u5bfc\u81f4\uff0c\u6211\u63d0\u4ea4\u4e86bugfix PR\uff0c\u8bf7\u8bc4\u5ba1\u3002\n\n</issue>\nPlease generate test cases that check whether an implemented solution resolves the issue of the user (at the top, within <issue/> brackets).\nYou may apply changes to several files.\nApply as much reasoning as you please and see necessary.\nMake sure to implement only test cases and don't try to fix the issue itself.\nYou are not allowed to read git history.\n", "memory": "8192m", "runnable": false, "difficulty": "hard", "language": "", "cpus": "", "instruction_truncated": false, "category": "test-generation", "compose": false, "has_solution": true, "oracle": null, "docker_image": "", "taskset": "devopsgym", "tags": ["test-generation", "devops-bench"]}, "runs": []}