| id
				 int32 0 12.9k | code
				 listlengths 2 264k | 
|---|---|
| 11,400 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "public",
  "class",
  "ParentBean",
  "extends",
  "ValueBean",
  "{",
  "private",
  "ChildBean",
  "child",
  ";",
  "public",
  "ChildBean",
  "getChild",
  "(",
  ")",
  "{",
  "return",
  "child",
  ";",
  "}",
  "public",
  "void",
  "setChild",
  "(",
  "ChildBean",
  "child",
  ")",
  "{",
  "this",
  ".",
  "child",
  "=",
  "child",
  ";",
  "child",
  ".",
  "setParent",
  "(",
  "this",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,401 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Date",
  ";",
  "public",
  "class",
  "DateBean",
  "extends",
  "ValueBean",
  "{",
  "private",
  "Date",
  "date",
  ";",
  "public",
  "Date",
  "getDate",
  "(",
  ")",
  "{",
  "return",
  "date",
  ";",
  "}",
  "public",
  "void",
  "setDate",
  "(",
  "Date",
  "date",
  ")",
  "{",
  "this",
  ".",
  "date",
  "=",
  "date",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,402 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "PackageProtectedBean",
  "{",
  "private",
  "int",
  "value",
  ";",
  "PackageProtectedBean",
  "(",
  ")",
  "{",
  "}",
  "public",
  "int",
  "getValue",
  "(",
  ")",
  "{",
  "return",
  "value",
  ";",
  "}",
  "public",
  "void",
  "setValue",
  "(",
  "int",
  "value",
  ")",
  "{",
  "this",
  ".",
  "value",
  "=",
  "value",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,403 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "MediaList",
  "{",
  "private",
  "ArrayList",
  "media",
  ";",
  "public",
  "ArrayList",
  "getMedia",
  "(",
  ")",
  "{",
  "return",
  "media",
  ";",
  "}",
  "public",
  "void",
  "setMedia",
  "(",
  "ArrayList",
  "media",
  ")",
  "{",
  "this",
  ".",
  "media",
  "=",
  "media",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,404 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "BeanC",
  "{",
  "private",
  "BeanA",
  "beanA",
  "=",
  "new",
  "BeanA",
  "(",
  ")",
  ";",
  "private",
  "BeanB",
  "beanB",
  "=",
  "new",
  "BeanB",
  "(",
  ")",
  ";",
  "public",
  "BeanA",
  "getBeanA",
  "(",
  ")",
  "{",
  "return",
  "beanA",
  ";",
  "}",
  "public",
  "BeanB",
  "getBeanB",
  "(",
  ")",
  "{",
  "return",
  "beanB",
  ";",
  "}",
  "public",
  "void",
  "setBeanA",
  "(",
  "BeanA",
  "beanA",
  ")",
  "{",
  "this",
  ".",
  "beanA",
  "=",
  "beanA",
  ";",
  "}",
  "public",
  "void",
  "setBeanB",
  "(",
  "BeanB",
  "beanB",
  ")",
  "{",
  "this",
  ".",
  "beanB",
  "=",
  "beanB",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,405 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "Player",
  "{",
  "private",
  "MediaList",
  "mediaList",
  ";",
  "public",
  "MediaList",
  "getMediaList",
  "(",
  ")",
  "{",
  "return",
  "mediaList",
  ";",
  "}",
  "public",
  "void",
  "setMediaList",
  "(",
  "MediaList",
  "mediaList",
  ")",
  "{",
  "this",
  ".",
  "mediaList",
  "=",
  "mediaList",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,406 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "public",
  "class",
  "MappedBean",
  "extends",
  "HashMap",
  "{",
  "private",
  "static",
  "final",
  "long",
  "serialVersionUID",
  "=",
  "-",
  "3372716996620968313L",
  ";",
  "public",
  "List",
  "getList",
  "(",
  ")",
  "{",
  "return",
  "(",
  "List",
  ")",
  "get",
  "(",
  "\"list\"",
  ")",
  ";",
  "}",
  "public",
  "String",
  "getName",
  "(",
  ")",
  "{",
  "return",
  "(",
  "String",
  ")",
  "get",
  "(",
  "\"name\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "setList",
  "(",
  "List",
  "list",
  ")",
  "{",
  "put",
  "(",
  "\"list\"",
  ",",
  "list",
  ")",
  ";",
  "}",
  "public",
  "void",
  "setName",
  "(",
  "String",
  "name",
  ")",
  "{",
  "put",
  "(",
  "\"name\"",
  ",",
  "name",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,407 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "PrivateConstructorBean",
  "{",
  "private",
  "int",
  "value",
  ";",
  "private",
  "PrivateConstructorBean",
  "(",
  ")",
  "{",
  "}",
  "public",
  "int",
  "getValue",
  "(",
  ")",
  "{",
  "return",
  "value",
  ";",
  "}",
  "public",
  "void",
  "setValue",
  "(",
  "int",
  "value",
  ")",
  "{",
  "this",
  ".",
  "value",
  "=",
  "value",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,408 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONFunction",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "PrimitiveBean",
  "{",
  "private",
  "Object",
  "[",
  "]",
  "oarray",
  ";",
  "private",
  "int",
  "[",
  "]",
  "parray",
  ";",
  "private",
  "ObjectBean",
  "pbean",
  ";",
  "private",
  "boolean",
  "pboolean",
  ";",
  "private",
  "byte",
  "pbyte",
  ";",
  "private",
  "char",
  "pchar",
  ";",
  "private",
  "Class",
  "pclass",
  ";",
  "private",
  "double",
  "pdouble",
  ";",
  "private",
  "String",
  "pexcluded",
  ";",
  "private",
  "float",
  "pfloat",
  ";",
  "private",
  "JSONFunction",
  "pfunction",
  ";",
  "private",
  "int",
  "pint",
  ";",
  "private",
  "List",
  "plist",
  ";",
  "private",
  "long",
  "plong",
  ";",
  "private",
  "Map",
  "pmap",
  ";",
  "private",
  "short",
  "pshort",
  ";",
  "private",
  "String",
  "pstring",
  ";",
  "public",
  "Object",
  "[",
  "]",
  "getOarray",
  "(",
  ")",
  "{",
  "return",
  "oarray",
  ";",
  "}",
  "public",
  "int",
  "[",
  "]",
  "getParray",
  "(",
  ")",
  "{",
  "return",
  "parray",
  ";",
  "}",
  "public",
  "ObjectBean",
  "getPbean",
  "(",
  ")",
  "{",
  "return",
  "pbean",
  ";",
  "}",
  "public",
  "byte",
  "getPbyte",
  "(",
  ")",
  "{",
  "return",
  "pbyte",
  ";",
  "}",
  "public",
  "char",
  "getPchar",
  "(",
  ")",
  "{",
  "return",
  "pchar",
  ";",
  "}",
  "public",
  "Class",
  "getPclass",
  "(",
  ")",
  "{",
  "return",
  "pclass",
  ";",
  "}",
  "public",
  "double",
  "getPdouble",
  "(",
  ")",
  "{",
  "return",
  "pdouble",
  ";",
  "}",
  "public",
  "String",
  "getPexcluded",
  "(",
  ")",
  "{",
  "return",
  "pexcluded",
  ";",
  "}",
  "public",
  "float",
  "getPfloat",
  "(",
  ")",
  "{",
  "return",
  "pfloat",
  ";",
  "}",
  "public",
  "JSONFunction",
  "getPfunction",
  "(",
  ")",
  "{",
  "return",
  "pfunction",
  ";",
  "}",
  "public",
  "int",
  "getPint",
  "(",
  ")",
  "{",
  "return",
  "pint",
  ";",
  "}",
  "public",
  "List",
  "getPlist",
  "(",
  ")",
  "{",
  "return",
  "plist",
  ";",
  "}",
  "public",
  "long",
  "getPlong",
  "(",
  ")",
  "{",
  "return",
  "plong",
  ";",
  "}",
  "public",
  "Map",
  "getPmap",
  "(",
  ")",
  "{",
  "return",
  "pmap",
  ";",
  "}",
  "public",
  "short",
  "getPshort",
  "(",
  ")",
  "{",
  "return",
  "pshort",
  ";",
  "}",
  "public",
  "String",
  "getPstring",
  "(",
  ")",
  "{",
  "return",
  "pstring",
  ";",
  "}",
  "public",
  "boolean",
  "isPboolean",
  "(",
  ")",
  "{",
  "return",
  "pboolean",
  ";",
  "}",
  "public",
  "void",
  "setOarray",
  "(",
  "Object",
  "[",
  "]",
  "oarray",
  ")",
  "{",
  "this",
  ".",
  "oarray",
  "=",
  "oarray",
  ";",
  "}",
  "public",
  "void",
  "setParray",
  "(",
  "int",
  "[",
  "]",
  "parray",
  ")",
  "{",
  "this",
  ".",
  "parray",
  "=",
  "parray",
  ";",
  "}",
  "public",
  "void",
  "setPbean",
  "(",
  "ObjectBean",
  "pbean",
  ")",
  "{",
  "this",
  ".",
  "pbean",
  "=",
  "pbean",
  ";",
  "}",
  "public",
  "void",
  "setPboolean",
  "(",
  "boolean",
  "pboolean",
  ")",
  "{",
  "this",
  ".",
  "pboolean",
  "=",
  "pboolean",
  ";",
  "}",
  "public",
  "void",
  "setPbyte",
  "(",
  "byte",
  "pbyte",
  ")",
  "{",
  "this",
  ".",
  "pbyte",
  "=",
  "pbyte",
  ";",
  "}",
  "public",
  "void",
  "setPchar",
  "(",
  "char",
  "pchar",
  ")",
  "{",
  "this",
  ".",
  "pchar",
  "=",
  "pchar",
  ";",
  "}",
  "public",
  "void",
  "setPclass",
  "(",
  "Class",
  "pclass",
  ")",
  "{",
  "this",
  ".",
  "pclass",
  "=",
  "pclass",
  ";",
  "}",
  "public",
  "void",
  "setPdouble",
  "(",
  "double",
  "pdouble",
  ")",
  "{",
  "this",
  ".",
  "pdouble",
  "=",
  "pdouble",
  ";",
  "}",
  "public",
  "void",
  "setPexcluded",
  "(",
  "String",
  "pexcluded",
  ")",
  "{",
  "this",
  ".",
  "pexcluded",
  "=",
  "pexcluded",
  ";",
  "}",
  "public",
  "void",
  "setPfloat",
  "(",
  "float",
  "pfloat",
  ")",
  "{",
  "this",
  ".",
  "pfloat",
  "=",
  "pfloat",
  ";",
  "}",
  "public",
  "void",
  "setPfunction",
  "(",
  "JSONFunction",
  "pfunction",
  ")",
  "{",
  "this",
  ".",
  "pfunction",
  "=",
  "pfunction",
  ";",
  "}",
  "public",
  "void",
  "setPint",
  "(",
  "int",
  "pint",
  ")",
  "{",
  "this",
  ".",
  "pint",
  "=",
  "pint",
  ";",
  "}",
  "public",
  "void",
  "setPlist",
  "(",
  "List",
  "plist",
  ")",
  "{",
  "this",
  ".",
  "plist",
  "=",
  "plist",
  ";",
  "}",
  "public",
  "void",
  "setPlong",
  "(",
  "long",
  "plong",
  ")",
  "{",
  "this",
  ".",
  "plong",
  "=",
  "plong",
  ";",
  "}",
  "public",
  "void",
  "setPmap",
  "(",
  "Map",
  "pmap",
  ")",
  "{",
  "this",
  ".",
  "pmap",
  "=",
  "pmap",
  ";",
  "}",
  "public",
  "void",
  "setPshort",
  "(",
  "short",
  "pshort",
  ")",
  "{",
  "this",
  ".",
  "pshort",
  "=",
  "pshort",
  ";",
  "}",
  "public",
  "void",
  "setPstring",
  "(",
  "String",
  "pstring",
  ")",
  "{",
  "this",
  ".",
  "pstring",
  "=",
  "pstring",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,409 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONString",
  ";",
  "public",
  "class",
  "ObjectJSONStringBean",
  "implements",
  "JSONString",
  "{",
  "private",
  "int",
  "id",
  ";",
  "private",
  "String",
  "name",
  ";",
  "public",
  "int",
  "getId",
  "(",
  ")",
  "{",
  "return",
  "id",
  ";",
  "}",
  "public",
  "String",
  "getName",
  "(",
  ")",
  "{",
  "return",
  "name",
  ";",
  "}",
  "public",
  "void",
  "setId",
  "(",
  "int",
  "id",
  ")",
  "{",
  "this",
  ".",
  "id",
  "=",
  "id",
  ";",
  "}",
  "public",
  "void",
  "setName",
  "(",
  "String",
  "name",
  ")",
  "{",
  "this",
  ".",
  "name",
  "=",
  "name",
  ";",
  "}",
  "public",
  "String",
  "toJSONString",
  "(",
  ")",
  "{",
  "return",
  "new",
  "StringBuffer",
  "(",
  ")",
  ".",
  "append",
  "(",
  "\"{\"",
  ")",
  ".",
  "append",
  "(",
  "\"\\\"name\\\":\\\"\"",
  ")",
  ".",
  "append",
  "(",
  "(",
  "name",
  "==",
  "null",
  ")",
  "?",
  "\"\"",
  ":",
  "name",
  ")",
  ".",
  "append",
  "(",
  "\"\\\"}\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,410 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "public",
  "class",
  "MappingBean",
  "{",
  "private",
  "Map",
  "attributes",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "public",
  "void",
  "addAttribute",
  "(",
  "Object",
  "key",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "this",
  ".",
  "attributes",
  ".",
  "put",
  "(",
  "key",
  ",",
  "value",
  ")",
  ";",
  "}",
  "public",
  "Map",
  "getAttributes",
  "(",
  ")",
  "{",
  "return",
  "attributes",
  ";",
  "}",
  "public",
  "void",
  "setAttributes",
  "(",
  "Map",
  "attributes",
  ")",
  "{",
  "this",
  ".",
  "attributes",
  "=",
  "attributes",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,411 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "BeanA1763699",
  "{",
  "private",
  "BeanB1763699",
  "[",
  "]",
  "bbeans",
  ";",
  "public",
  "BeanB1763699",
  "[",
  "]",
  "getBbeans",
  "(",
  ")",
  "{",
  "return",
  "bbeans",
  ";",
  "}",
  "public",
  "void",
  "setBbeans",
  "(",
  "BeanB1763699",
  "[",
  "]",
  "bbeans",
  ")",
  "{",
  "this",
  ".",
  "bbeans",
  "=",
  "bbeans",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,412 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "public",
  "class",
  "InterfaceBean",
  "{",
  "private",
  "Runnable",
  "runnable",
  ";",
  "public",
  "Runnable",
  "getRunnable",
  "(",
  ")",
  "{",
  "return",
  "runnable",
  ";",
  "}",
  "public",
  "void",
  "setRunnable",
  "(",
  "Runnable",
  "runnable",
  ")",
  "{",
  "this",
  ".",
  "runnable",
  "=",
  "runnable",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,413 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "Media",
  "{",
  "private",
  "String",
  "title",
  ";",
  "public",
  "String",
  "getTitle",
  "(",
  ")",
  "{",
  "return",
  "title",
  ";",
  "}",
  "public",
  "void",
  "setTitle",
  "(",
  "String",
  "title",
  ")",
  "{",
  "this",
  ".",
  "title",
  "=",
  "title",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,414 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "MediaBean",
  "{",
  "private",
  "String",
  "title",
  ";",
  "public",
  "String",
  "getTitle",
  "(",
  ")",
  "{",
  "return",
  "title",
  ";",
  "}",
  "public",
  "void",
  "setTitle",
  "(",
  "String",
  "title",
  ")",
  "{",
  "this",
  ".",
  "title",
  "=",
  "title",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,415 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "PlayerList",
  "{",
  "private",
  "ArrayList",
  "player",
  ";",
  "public",
  "ArrayList",
  "getPlayer",
  "(",
  ")",
  "{",
  "return",
  "player",
  ";",
  "}",
  "public",
  "void",
  "setPlayer",
  "(",
  "ArrayList",
  "player",
  ")",
  "{",
  "this",
  ".",
  "player",
  "=",
  "player",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,416 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "public",
  "class",
  "JSONTestBean",
  "{",
  "private",
  "String",
  "email",
  "=",
  "\"\"",
  ";",
  "private",
  "String",
  "inventoryID",
  "=",
  "\"\"",
  ";",
  "private",
  "String",
  "notes",
  "=",
  "\"\"",
  ";",
  "private",
  "Map",
  "options",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "private",
  "String",
  "rateID",
  "=",
  "\"\"",
  ";",
  "public",
  "String",
  "getEmail",
  "(",
  ")",
  "{",
  "return",
  "email",
  ";",
  "}",
  "public",
  "String",
  "getInventoryID",
  "(",
  ")",
  "{",
  "return",
  "inventoryID",
  ";",
  "}",
  "public",
  "String",
  "getNotes",
  "(",
  ")",
  "{",
  "return",
  "notes",
  ";",
  "}",
  "public",
  "Map",
  "getOptions",
  "(",
  ")",
  "{",
  "return",
  "options",
  ";",
  "}",
  "public",
  "String",
  "getRateID",
  "(",
  ")",
  "{",
  "return",
  "rateID",
  ";",
  "}",
  "public",
  "void",
  "setEmail",
  "(",
  "String",
  "email",
  ")",
  "{",
  "this",
  ".",
  "email",
  "=",
  "email",
  ";",
  "}",
  "public",
  "void",
  "setInventoryID",
  "(",
  "String",
  "inventoryID",
  ")",
  "{",
  "this",
  ".",
  "inventoryID",
  "=",
  "inventoryID",
  ";",
  "}",
  "public",
  "void",
  "setNotes",
  "(",
  "String",
  "notes",
  ")",
  "{",
  "this",
  ".",
  "notes",
  "=",
  "notes",
  ";",
  "}",
  "public",
  "void",
  "setOptions",
  "(",
  "Map",
  "options",
  ")",
  "{",
  "this",
  ".",
  "options",
  "=",
  "options",
  ";",
  "}",
  "public",
  "void",
  "setRateID",
  "(",
  "String",
  "rateID",
  ")",
  "{",
  "this",
  ".",
  "rateID",
  "=",
  "rateID",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,417 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "EqualsBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "HashCodeBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "UnstandardBean",
  "{",
  "private",
  "boolean",
  "bool",
  "=",
  "true",
  ";",
  "private",
  "int",
  "id",
  ";",
  "private",
  "int",
  "integer",
  "=",
  "42",
  ";",
  "private",
  "String",
  "string",
  "=",
  "\"json\"",
  ";",
  "public",
  "UnstandardBean",
  "(",
  "int",
  "id",
  ")",
  "{",
  "this",
  ".",
  "id",
  "=",
  "id",
  ";",
  "}",
  "public",
  "boolean",
  "equals",
  "(",
  "Object",
  "obj",
  ")",
  "{",
  "if",
  "(",
  "obj",
  "==",
  "this",
  ")",
  "{",
  "return",
  "true",
  ";",
  "}",
  "if",
  "(",
  "obj",
  "==",
  "null",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "if",
  "(",
  "!",
  "UnstandardBean",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "obj",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "return",
  "EqualsBuilder",
  ".",
  "reflectionEquals",
  "(",
  "this",
  ",",
  "obj",
  ")",
  ";",
  "}",
  "public",
  "int",
  "getId",
  "(",
  ")",
  "{",
  "return",
  "id",
  ";",
  "}",
  "public",
  "int",
  "getInteger",
  "(",
  ")",
  "{",
  "return",
  "integer",
  ";",
  "}",
  "public",
  "String",
  "getString",
  "(",
  ")",
  "{",
  "return",
  "string",
  ";",
  "}",
  "public",
  "int",
  "hashCode",
  "(",
  ")",
  "{",
  "return",
  "HashCodeBuilder",
  ".",
  "reflectionHashCode",
  "(",
  "this",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "isBool",
  "(",
  ")",
  "{",
  "return",
  "bool",
  ";",
  "}",
  "public",
  "void",
  "setBool",
  "(",
  "boolean",
  "bool",
  ")",
  "{",
  "this",
  ".",
  "bool",
  "=",
  "bool",
  ";",
  "}",
  "public",
  "void",
  "setInteger",
  "(",
  "int",
  "integer",
  ")",
  "{",
  "this",
  ".",
  "integer",
  "=",
  "integer",
  ";",
  "}",
  "public",
  "void",
  "setString",
  "(",
  "String",
  "string",
  ")",
  "{",
  "this",
  ".",
  "string",
  "=",
  "string",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,418 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "FieldBean",
  "{",
  "private",
  "int",
  "value",
  ";",
  "public",
  "String",
  "string",
  ";",
  "public",
  "int",
  "getValue",
  "(",
  ")",
  "{",
  "return",
  "value",
  ";",
  "}",
  "public",
  "void",
  "setValue",
  "(",
  "int",
  "value",
  ")",
  "{",
  "this",
  ".",
  "value",
  "=",
  "value",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,419 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "ArrayBean",
  "{",
  "private",
  "BeanA",
  "[",
  "]",
  "beans",
  ";",
  "public",
  "BeanA",
  "[",
  "]",
  "getBeans",
  "(",
  ")",
  "{",
  "return",
  "beans",
  ";",
  "}",
  "public",
  "void",
  "setBeans",
  "(",
  "BeanA",
  "[",
  "]",
  "beans",
  ")",
  "{",
  "this",
  ".",
  "beans",
  "=",
  "beans",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,420 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "public",
  "class",
  "BeanFoo",
  "{",
  "private",
  "String",
  "[",
  "]",
  "[",
  "]",
  "items",
  ";",
  "public",
  "String",
  "[",
  "]",
  "[",
  "]",
  "getItems",
  "(",
  ")",
  "{",
  "return",
  "items",
  ";",
  "}",
  "public",
  "void",
  "setItems",
  "(",
  "String",
  "[",
  "]",
  "[",
  "]",
  "items",
  ")",
  "{",
  "this",
  ".",
  "items",
  "=",
  "items",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,421 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "NumberArrayBean",
  "{",
  "private",
  "byte",
  "[",
  "]",
  "bytes",
  ";",
  "private",
  "double",
  "[",
  "]",
  "doubles",
  ";",
  "private",
  "float",
  "[",
  "]",
  "floats",
  ";",
  "private",
  "int",
  "[",
  "]",
  "ints",
  ";",
  "private",
  "long",
  "[",
  "]",
  "longs",
  ";",
  "private",
  "short",
  "[",
  "]",
  "shorts",
  ";",
  "public",
  "byte",
  "[",
  "]",
  "getBytes",
  "(",
  ")",
  "{",
  "return",
  "bytes",
  ";",
  "}",
  "public",
  "double",
  "[",
  "]",
  "getDoubles",
  "(",
  ")",
  "{",
  "return",
  "doubles",
  ";",
  "}",
  "public",
  "float",
  "[",
  "]",
  "getFloats",
  "(",
  ")",
  "{",
  "return",
  "floats",
  ";",
  "}",
  "public",
  "int",
  "[",
  "]",
  "getInts",
  "(",
  ")",
  "{",
  "return",
  "ints",
  ";",
  "}",
  "public",
  "long",
  "[",
  "]",
  "getLongs",
  "(",
  ")",
  "{",
  "return",
  "longs",
  ";",
  "}",
  "public",
  "short",
  "[",
  "]",
  "getShorts",
  "(",
  ")",
  "{",
  "return",
  "shorts",
  ";",
  "}",
  "public",
  "void",
  "setBytes",
  "(",
  "byte",
  "[",
  "]",
  "bytes",
  ")",
  "{",
  "this",
  ".",
  "bytes",
  "=",
  "bytes",
  ";",
  "}",
  "public",
  "void",
  "setDoubles",
  "(",
  "double",
  "[",
  "]",
  "doubles",
  ")",
  "{",
  "this",
  ".",
  "doubles",
  "=",
  "doubles",
  ";",
  "}",
  "public",
  "void",
  "setFloats",
  "(",
  "float",
  "[",
  "]",
  "floats",
  ")",
  "{",
  "this",
  ".",
  "floats",
  "=",
  "floats",
  ";",
  "}",
  "public",
  "void",
  "setInts",
  "(",
  "int",
  "[",
  "]",
  "ints",
  ")",
  "{",
  "this",
  ".",
  "ints",
  "=",
  "ints",
  ";",
  "}",
  "public",
  "void",
  "setLongs",
  "(",
  "long",
  "[",
  "]",
  "longs",
  ")",
  "{",
  "this",
  ".",
  "longs",
  "=",
  "longs",
  ";",
  "}",
  "public",
  "void",
  "setShorts",
  "(",
  "short",
  "[",
  "]",
  "shorts",
  ")",
  "{",
  "this",
  ".",
  "shorts",
  "=",
  "shorts",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,422 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "public",
  "class",
  "ChildBean",
  "extends",
  "ValueBean",
  "{",
  "private",
  "ParentBean",
  "parent",
  ";",
  "public",
  "ParentBean",
  "getParent",
  "(",
  ")",
  "{",
  "return",
  "parent",
  ";",
  "}",
  "public",
  "void",
  "setParent",
  "(",
  "ParentBean",
  "parent",
  ")",
  "{",
  "this",
  ".",
  "parent",
  "=",
  "parent",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,423 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "public",
  "class",
  "TransientBean",
  "extends",
  "ValueBean",
  "{",
  "private",
  "transient",
  "int",
  "transientValue",
  ";",
  "public",
  "int",
  "getTransientValue",
  "(",
  ")",
  "{",
  "return",
  "transientValue",
  ";",
  "}",
  "public",
  "void",
  "setTransientValue",
  "(",
  "int",
  "transientValue",
  ")",
  "{",
  "this",
  ".",
  "transientValue",
  "=",
  "transientValue",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,424 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "EqualsBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "HashCodeBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "BeanA",
  "{",
  "private",
  "boolean",
  "bool",
  "=",
  "true",
  ";",
  "private",
  "int",
  "integer",
  "=",
  "42",
  ";",
  "private",
  "String",
  "string",
  "=",
  "\"json\"",
  ";",
  "public",
  "BeanA",
  "(",
  ")",
  "{",
  "super",
  "(",
  ")",
  ";",
  "}",
  "public",
  "BeanA",
  "(",
  "boolean",
  "bool",
  ",",
  "int",
  "integer",
  ",",
  "String",
  "string",
  ")",
  "{",
  "super",
  "(",
  ")",
  ";",
  "this",
  ".",
  "bool",
  "=",
  "bool",
  ";",
  "this",
  ".",
  "integer",
  "=",
  "integer",
  ";",
  "this",
  ".",
  "string",
  "=",
  "string",
  ";",
  "}",
  "public",
  "boolean",
  "equals",
  "(",
  "Object",
  "obj",
  ")",
  "{",
  "if",
  "(",
  "obj",
  "==",
  "this",
  ")",
  "{",
  "return",
  "true",
  ";",
  "}",
  "if",
  "(",
  "obj",
  "==",
  "null",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "if",
  "(",
  "!",
  "BeanA",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "obj",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "return",
  "EqualsBuilder",
  ".",
  "reflectionEquals",
  "(",
  "this",
  ",",
  "obj",
  ")",
  ";",
  "}",
  "public",
  "int",
  "getInteger",
  "(",
  ")",
  "{",
  "return",
  "integer",
  ";",
  "}",
  "public",
  "String",
  "getString",
  "(",
  ")",
  "{",
  "return",
  "string",
  ";",
  "}",
  "public",
  "int",
  "hashCode",
  "(",
  ")",
  "{",
  "return",
  "HashCodeBuilder",
  ".",
  "reflectionHashCode",
  "(",
  "this",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "isBool",
  "(",
  ")",
  "{",
  "return",
  "bool",
  ";",
  "}",
  "public",
  "void",
  "setBool",
  "(",
  "boolean",
  "bool",
  ")",
  "{",
  "this",
  ".",
  "bool",
  "=",
  "bool",
  ";",
  "}",
  "public",
  "void",
  "setInteger",
  "(",
  "int",
  "integer",
  ")",
  "{",
  "this",
  ".",
  "integer",
  "=",
  "integer",
  ";",
  "}",
  "public",
  "void",
  "setString",
  "(",
  "String",
  "string",
  ")",
  "{",
  "this",
  ".",
  "string",
  "=",
  "string",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,425 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "public",
  "class",
  "ClassBean",
  "{",
  "private",
  "Class",
  "klass",
  ";",
  "public",
  "Class",
  "getKlass",
  "(",
  ")",
  "{",
  "return",
  "klass",
  ";",
  "}",
  "public",
  "void",
  "setKlass",
  "(",
  "Class",
  "klass",
  ")",
  "{",
  "this",
  ".",
  "klass",
  "=",
  "klass",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,426 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "public",
  "class",
  "PropertyBean",
  "{",
  "private",
  "String",
  "propertyWithNoReadMethod",
  ";",
  "private",
  "final",
  "String",
  "propertyWithNoWriteMethod",
  "=",
  "\"json\"",
  ";",
  "public",
  "String",
  "getPropertyWithNoWriteMethod",
  "(",
  ")",
  "{",
  "return",
  "propertyWithNoWriteMethod",
  ";",
  "}",
  "public",
  "void",
  "setPropertyWithNoReadMethod",
  "(",
  "String",
  "propertyWithNoReadMethod",
  ")",
  "{",
  "this",
  ".",
  "propertyWithNoReadMethod",
  "=",
  "propertyWithNoReadMethod",
  ";",
  "}",
  "public",
  "String",
  "valueOfPropertyWithNoReadMethod",
  "(",
  ")",
  "{",
  "return",
  "propertyWithNoReadMethod",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,427 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "BeanB",
  "extends",
  "BeanA",
  "{",
  "private",
  "int",
  "[",
  "]",
  "intarray",
  "=",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ";",
  "public",
  "int",
  "[",
  "]",
  "getIntarray",
  "(",
  ")",
  "{",
  "return",
  "intarray",
  ";",
  "}",
  "public",
  "void",
  "setIntarray",
  "(",
  "int",
  "[",
  "]",
  "intarray",
  ")",
  "{",
  "this",
  ".",
  "intarray",
  "=",
  "intarray",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,428 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "public",
  "class",
  "ListingBean",
  "{",
  "private",
  "List",
  "attributes",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "public",
  "void",
  "addAttribute",
  "(",
  "Object",
  "value",
  ")",
  "{",
  "this",
  ".",
  "attributes",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "}",
  "public",
  "List",
  "getAttributes",
  "(",
  ")",
  "{",
  "return",
  "attributes",
  ";",
  "}",
  "public",
  "void",
  "setAttributes",
  "(",
  "List",
  "attributes",
  ")",
  "{",
  "this",
  ".",
  "attributes",
  "=",
  "attributes",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,429 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringBuilder",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "builder",
  ".",
  "ToStringStyle",
  ";",
  "public",
  "class",
  "BeanB1763699",
  "{",
  "private",
  "String",
  "str",
  ";",
  "public",
  "String",
  "getStr",
  "(",
  ")",
  "{",
  "return",
  "str",
  ";",
  "}",
  "public",
  "void",
  "setStr",
  "(",
  "String",
  "str",
  ")",
  "{",
  "this",
  ".",
  "str",
  "=",
  "str",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "return",
  "ToStringBuilder",
  ".",
  "reflectionToString",
  "(",
  "this",
  ",",
  "ToStringStyle",
  ".",
  "MULTI_LINE_STYLE",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,430 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONException",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JsonEventListener",
  ";",
  "public",
  "class",
  "JsonEventAdpater",
  "implements",
  "JsonEventListener",
  "{",
  "private",
  "int",
  "arrayEnd",
  "=",
  "0",
  ";",
  "private",
  "int",
  "arrayStart",
  "=",
  "0",
  ";",
  "private",
  "int",
  "elementAdded",
  "=",
  "0",
  ";",
  "private",
  "int",
  "error",
  "=",
  "0",
  ";",
  "private",
  "int",
  "objectEnd",
  "=",
  "0",
  ";",
  "private",
  "int",
  "objectStart",
  "=",
  "0",
  ";",
  "private",
  "int",
  "propertySet",
  "=",
  "0",
  ";",
  "private",
  "int",
  "warning",
  "=",
  "0",
  ";",
  "public",
  "int",
  "getArrayEnd",
  "(",
  ")",
  "{",
  "return",
  "arrayEnd",
  ";",
  "}",
  "public",
  "int",
  "getArrayStart",
  "(",
  ")",
  "{",
  "return",
  "arrayStart",
  ";",
  "}",
  "public",
  "int",
  "getElementAdded",
  "(",
  ")",
  "{",
  "return",
  "elementAdded",
  ";",
  "}",
  "public",
  "int",
  "getError",
  "(",
  ")",
  "{",
  "return",
  "error",
  ";",
  "}",
  "public",
  "int",
  "getObjectEnd",
  "(",
  ")",
  "{",
  "return",
  "objectEnd",
  ";",
  "}",
  "public",
  "int",
  "getObjectStart",
  "(",
  ")",
  "{",
  "return",
  "objectStart",
  ";",
  "}",
  "public",
  "int",
  "getPropertySet",
  "(",
  ")",
  "{",
  "return",
  "propertySet",
  ";",
  "}",
  "public",
  "int",
  "getWarning",
  "(",
  ")",
  "{",
  "return",
  "warning",
  ";",
  "}",
  "public",
  "void",
  "onArrayEnd",
  "(",
  ")",
  "{",
  "arrayEnd",
  "++",
  ";",
  "}",
  "public",
  "void",
  "onArrayStart",
  "(",
  ")",
  "{",
  "arrayStart",
  "++",
  ";",
  "}",
  "public",
  "void",
  "onElementAdded",
  "(",
  "int",
  "index",
  ",",
  "Object",
  "element",
  ")",
  "{",
  "elementAdded",
  "++",
  ";",
  "}",
  "public",
  "void",
  "onError",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "error",
  "++",
  ";",
  "}",
  "public",
  "void",
  "onObjectEnd",
  "(",
  ")",
  "{",
  "objectEnd",
  "++",
  ";",
  "}",
  "public",
  "void",
  "onObjectStart",
  "(",
  ")",
  "{",
  "objectStart",
  "++",
  ";",
  "}",
  "public",
  "void",
  "onPropertySet",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "boolean",
  "accumulated",
  ")",
  "{",
  "propertySet",
  "++",
  ";",
  "}",
  "public",
  "void",
  "onWarning",
  "(",
  "String",
  "warning",
  ")",
  "{",
  "this",
  ".",
  "warning",
  "++",
  ";",
  "}",
  "public",
  "void",
  "reset",
  "(",
  ")",
  "{",
  "objectStart",
  "=",
  "0",
  ";",
  "objectEnd",
  "=",
  "0",
  ";",
  "arrayStart",
  "=",
  "0",
  ";",
  "arrayEnd",
  "=",
  "0",
  ";",
  "error",
  "=",
  "0",
  ";",
  "warning",
  "=",
  "0",
  ";",
  "propertySet",
  "=",
  "0",
  ";",
  "elementAdded",
  "=",
  "0",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,431 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "test",
  ".",
  "ArrayAssertions",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "test",
  ".",
  "JSONAssert",
  ";",
  "public",
  "class",
  "Assertions",
  "extends",
  "JSONAssert",
  "{",
  "public",
  "static",
  "void",
  "assertEquals",
  "(",
  "List",
  "expecteds",
  ",",
  "List",
  "actuals",
  ")",
  "{",
  "assertEquals",
  "(",
  "null",
  ",",
  "expecteds",
  ",",
  "actuals",
  ")",
  ";",
  "}",
  "public",
  "static",
  "void",
  "assertEquals",
  "(",
  "Object",
  "expected",
  ",",
  "Object",
  "actual",
  ")",
  "{",
  "assertEquals",
  "(",
  "null",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "static",
  "void",
  "assertEquals",
  "(",
  "String",
  "message",
  ",",
  "List",
  "expecteds",
  ",",
  "List",
  "actuals",
  ")",
  "{",
  "String",
  "header",
  "=",
  "message",
  "==",
  "null",
  "?",
  "\"\"",
  ":",
  "message",
  "+",
  "\":",
  "\"",
  ";",
  "if",
  "(",
  "expecteds",
  "==",
  "null",
  ")",
  "{",
  "fail",
  "(",
  "header",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "actuals",
  "==",
  "null",
  ")",
  "{",
  "fail",
  "(",
  "header",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "expecteds",
  "==",
  "actuals",
  "||",
  "expecteds",
  ".",
  "equals",
  "(",
  "actuals",
  ")",
  ")",
  "{",
  "return",
  ";",
  "}",
  "if",
  "(",
  "actuals",
  ".",
  "size",
  "(",
  ")",
  "!=",
  "expecteds",
  ".",
  "size",
  "(",
  ")",
  ")",
  "{",
  "fail",
  "(",
  "header",
  "+",
  "\"\"",
  "+",
  "expecteds",
  ".",
  "size",
  "(",
  ")",
  "+",
  "\"\"",
  "+",
  "actuals",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "}",
  "int",
  "max",
  "=",
  "expecteds",
  ".",
  "size",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "max",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Object",
  "o1",
  "=",
  "expecteds",
  ".",
  "get",
  "(",
  "i",
  ")",
  ";",
  "Object",
  "o2",
  "=",
  "actuals",
  ".",
  "get",
  "(",
  "i",
  ")",
  ";",
  "if",
  "(",
  "o1",
  "==",
  "null",
  ")",
  "{",
  "if",
  "(",
  "o2",
  "==",
  "null",
  ")",
  "{",
  "return",
  ";",
  "}",
  "else",
  "{",
  "fail",
  "(",
  "header",
  "+",
  "\"\"",
  "+",
  "i",
  "+",
  "\"];\"",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "o2",
  "==",
  "null",
  ")",
  "{",
  "fail",
  "(",
  "header",
  "+",
  "\"\"",
  "+",
  "i",
  "+",
  "\"];\"",
  ")",
  ";",
  "}",
  "}",
  "if",
  "(",
  "o1",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "isArray",
  "(",
  ")",
  "&&",
  "o2",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "isArray",
  "(",
  ")",
  ")",
  "{",
  "Object",
  "[",
  "]",
  "expected",
  "=",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "o1",
  ";",
  "Object",
  "[",
  "]",
  "actual",
  "=",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "o2",
  ";",
  "assertEquals",
  "(",
  "header",
  "+",
  "\"\"",
  "+",
  "i",
  "+",
  "\";\"",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "List",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "o1",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  "&&",
  "List",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "o2",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ")",
  "{",
  "assertEquals",
  "(",
  "header",
  "+",
  "\"\"",
  "+",
  "i",
  "+",
  "\"];\"",
  ",",
  "(",
  "List",
  ")",
  "o1",
  ",",
  "(",
  "List",
  ")",
  "o2",
  ")",
  ";",
  "}",
  "else",
  "{",
  "if",
  "(",
  "o1",
  "instanceof",
  "String",
  "&&",
  "o2",
  "instanceof",
  "JSONFunction",
  ")",
  "{",
  "assertEquals",
  "(",
  "header",
  "+",
  "\"\"",
  "+",
  "i",
  "+",
  "\"];\"",
  ",",
  "(",
  "String",
  ")",
  "o1",
  ",",
  "(",
  "JSONFunction",
  ")",
  "o2",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONFunction",
  "&&",
  "o2",
  "instanceof",
  "String",
  ")",
  "{",
  "assertEquals",
  "(",
  "header",
  "+",
  "\"\"",
  "+",
  "i",
  "+",
  "\"];\"",
  ",",
  "(",
  "JSONFunction",
  ")",
  "o1",
  ",",
  "(",
  "String",
  ")",
  "o2",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONObject",
  "&&",
  "o2",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "assertEquals",
  "(",
  "header",
  "+",
  "\"\"",
  "+",
  "i",
  "+",
  "\"];\"",
  ",",
  "(",
  "JSONObject",
  ")",
  "o1",
  ",",
  "(",
  "JSONObject",
  ")",
  "o2",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONArray",
  "&&",
  "o2",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "assertEquals",
  "(",
  "header",
  "+",
  "\"\"",
  "+",
  "i",
  "+",
  "\"];\"",
  ",",
  "(",
  "JSONArray",
  ")",
  "o1",
  ",",
  "(",
  "JSONArray",
  ")",
  "o2",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONFunction",
  "&&",
  "o2",
  "instanceof",
  "JSONFunction",
  ")",
  "{",
  "assertEquals",
  "(",
  "header",
  "+",
  "\"\"",
  "+",
  "i",
  "+",
  "\"];\"",
  ",",
  "(",
  "JSONFunction",
  ")",
  "o1",
  ",",
  "(",
  "JSONFunction",
  ")",
  "o2",
  ")",
  ";",
  "}",
  "else",
  "{",
  "assertEquals",
  "(",
  "header",
  "+",
  "\"\"",
  "+",
  "i",
  "+",
  "\"];\"",
  ",",
  "o1",
  ",",
  "o2",
  ")",
  ";",
  "}",
  "}",
  "}",
  "}",
  "public",
  "static",
  "void",
  "assertEquals",
  "(",
  "String",
  "message",
  ",",
  "Object",
  "expected",
  ",",
  "Object",
  "actual",
  ")",
  "{",
  "if",
  "(",
  "expected",
  "==",
  "null",
  "&&",
  "actual",
  "==",
  "null",
  ")",
  "return",
  ";",
  "if",
  "(",
  "expected",
  "!=",
  "null",
  "&&",
  "expected",
  ".",
  "equals",
  "(",
  "actual",
  ")",
  ")",
  "return",
  ";",
  "Class",
  "expectedClass",
  "=",
  "expected",
  ".",
  "getClass",
  "(",
  ")",
  ";",
  "Class",
  "actualClass",
  "=",
  "actual",
  ".",
  "getClass",
  "(",
  ")",
  ";",
  "if",
  "(",
  "expectedClass",
  ".",
  "isArray",
  "(",
  ")",
  "&&",
  "actualClass",
  ".",
  "isArray",
  "(",
  ")",
  ")",
  "{",
  "Class",
  "expectedInnerType",
  "=",
  "expectedClass",
  ".",
  "getComponentType",
  "(",
  ")",
  ";",
  "Class",
  "actualInnerType",
  "=",
  "actualClass",
  ".",
  "getComponentType",
  "(",
  ")",
  ";",
  "if",
  "(",
  "expectedInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "assertExpectedPrimitiveArrays",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ",",
  "expectedInnerType",
  ",",
  "actualInnerType",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "actualInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "assertActualPrimitiveArrays",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ",",
  "expectedInnerType",
  ",",
  "actualInnerType",
  ")",
  ";",
  "}",
  "else",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "private",
  "static",
  "void",
  "assertActualPrimitiveArrays",
  "(",
  "String",
  "message",
  ",",
  "Object",
  "expected",
  ",",
  "Object",
  "actual",
  ",",
  "Class",
  "expectedInnerType",
  ",",
  "Class",
  "actualInnerType",
  ")",
  "{",
  "if",
  "(",
  "Boolean",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Boolean",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "boolean",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "boolean",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Boolean",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Boolean",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "boolean",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "expectedInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "boolean",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Byte",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Byte",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "byte",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "byte",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Byte",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Byte",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "byte",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "expectedInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "byte",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Short",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Short",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "short",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "short",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Short",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Short",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "short",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "expectedInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "short",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Integer",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Integer",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "int",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "int",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Integer",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Integer",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "int",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "expectedInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "int",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Long",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Long",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "long",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "long",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Long",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Long",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "long",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "expectedInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "long",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Float",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Float",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "float",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "float",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Float",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Float",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "float",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "expectedInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "float",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Double",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Double",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "double",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "double",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Double",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Double",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "double",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "expectedInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "double",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Character",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Character",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "char",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "char",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Character",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Character",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "char",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "expectedInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "char",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "}",
  "private",
  "static",
  "void",
  "assertExpectedPrimitiveArrays",
  "(",
  "String",
  "message",
  ",",
  "Object",
  "expected",
  ",",
  "Object",
  "actual",
  ",",
  "Class",
  "expectedInnerType",
  ",",
  "Class",
  "actualInnerType",
  ")",
  "{",
  "if",
  "(",
  "Boolean",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Boolean",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "boolean",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "boolean",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Boolean",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "boolean",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Boolean",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "actualInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "boolean",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Byte",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Byte",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "byte",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "byte",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Byte",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "byte",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Byte",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "actualInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "byte",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Short",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Short",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "short",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "short",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Short",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "short",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Short",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "actualInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "short",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Integer",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Integer",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "int",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "int",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Integer",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "int",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Integer",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "actualInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "int",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Long",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Long",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "long",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "long",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Long",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "long",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Long",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "actualInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "long",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Float",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Float",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "float",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "float",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Float",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "float",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Float",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "actualInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "float",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Double",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Double",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "double",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "double",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Double",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "double",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Double",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "actualInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "double",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "Character",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "expectedInnerType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "Character",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "char",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "char",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Character",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "actualInnerType",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "char",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Character",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "actualInnerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "message",
  ",",
  "(",
  "char",
  "[",
  "]",
  ")",
  "expected",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "actual",
  ")",
  ";",
  "}",
  "else",
  "{",
  "failNotEquals",
  "(",
  "message",
  ",",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,432 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "test",
  ".",
  "JSONAssert",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "public",
  "class",
  "TestJSONFunction",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONFunction",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONFunction",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals",
  "(",
  ")",
  "{",
  "JSONFunction",
  "expected",
  "=",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "a;\"",
  ")",
  ";",
  "assertFalse",
  "(",
  "expected",
  ".",
  "equals",
  "(",
  "null",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "expected",
  ".",
  "equals",
  "(",
  "new",
  "Object",
  "(",
  ")",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "expected",
  ".",
  "equals",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "expected",
  ".",
  "equals",
  "(",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "a;\"",
  ")",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "expected",
  ".",
  "equals",
  "(",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "b;\"",
  ")",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "expected",
  ".",
  "equals",
  "(",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "a;\"",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHashCode",
  "(",
  ")",
  "{",
  "JSONFunction",
  "a",
  "=",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a,b\"",
  "}",
  ",",
  "\"return",
  "a+b;\"",
  ")",
  ";",
  "JSONFunction",
  "b",
  "=",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a,b\"",
  "}",
  ",",
  "\"return",
  "a+b;\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "a",
  ".",
  "hashCode",
  "(",
  ")",
  "==",
  "b",
  ".",
  "hashCode",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testParse_String",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testParse_String_withWhiteSpacechars",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testParse_withSingleArg",
  "(",
  ")",
  "{",
  "JSONFunction",
  "expected",
  "=",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "this\"",
  ")",
  ";",
  "JSONFunction",
  "actual",
  "=",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testParse_withMultipleArgs",
  "(",
  ")",
  "{",
  "JSONFunction",
  "expected",
  "=",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  ",",
  "\"b\"",
  "}",
  ",",
  "\"return",
  "this\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "JSONFunction",
  ".",
  "parse",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,433 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "public",
  "class",
  "TestJSONArrayStaticBuilders_JSONString",
  "extends",
  "AbstractJSONArrayStaticBuildersTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONArrayStaticBuilders_JSONString",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONArrayStaticBuilders_JSONString",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "Object",
  "getSource",
  "(",
  ")",
  "{",
  "return",
  "new",
  "JsonBean",
  "(",
  ")",
  ";",
  "}",
  "public",
  "static",
  "class",
  "JsonBean",
  "implements",
  "JSONString",
  "{",
  "public",
  "String",
  "toJSONString",
  "(",
  ")",
  "{",
  "return",
  "\"\"",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,434 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaClass",
  ";",
  "public",
  "class",
  "TestJSONArrayStaticBuilders_Collection_DynaBean",
  "extends",
  "AbstractJSONArrayStaticBuildersTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONArrayStaticBuilders_Collection_DynaBean",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONArrayStaticBuilders_Collection_DynaBean",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "Object",
  "getSource",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "String",
  "[",
  "]",
  "props",
  "=",
  "getProperties",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "props",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "map",
  ".",
  "put",
  "(",
  "props",
  "[",
  "i",
  "]",
  ",",
  "PropertyConstants",
  ".",
  "getPropertyClass",
  "(",
  "props",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "map",
  ".",
  "put",
  "(",
  "\"class\"",
  ",",
  "Class",
  ".",
  "class",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"pexcluded\"",
  ",",
  "String",
  ".",
  "class",
  ")",
  ";",
  "MorphDynaClass",
  "dynaClass",
  "=",
  "new",
  "MorphDynaClass",
  "(",
  "map",
  ")",
  ";",
  "MorphDynaBean",
  "dynaBean",
  "=",
  "null",
  ";",
  "try",
  "{",
  "dynaBean",
  "=",
  "(",
  "MorphDynaBean",
  ")",
  "dynaClass",
  ".",
  "newInstance",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "props",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "dynaBean",
  ".",
  "set",
  "(",
  "props",
  "[",
  "i",
  "]",
  ",",
  "PropertyConstants",
  ".",
  "getPropertyValue",
  "(",
  "props",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"class\"",
  ",",
  "Object",
  ".",
  "class",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"pexcluded\"",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "RuntimeException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "List",
  "list",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "dynaBean",
  ")",
  ";",
  "return",
  "list",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,435 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "Serializable",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "PrintWriter",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "StringWriter",
  ";",
  "import",
  "java",
  ".",
  "math",
  ".",
  "BigDecimal",
  ";",
  "import",
  "java",
  ".",
  "math",
  ".",
  "BigInteger",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Collections",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Iterator",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Set",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "MorphUtils",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaClass",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "test",
  ".",
  "ArrayAssertions",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "processors",
  ".",
  "DefaultValueProcessor",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "processors",
  ".",
  "DefaultValueProcessorMatcher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "processors",
  ".",
  "PropertyNameProcessor",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanA",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanB",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanC",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanFoo",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanWithFunc",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ChildBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ClassBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "EmptyBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "JavaIdentifierBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ListingBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "MappingBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "NumberBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ObjectBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ObjectJSONStringBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ParentBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "PrimitiveBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "PropertyBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "SetBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "TransientBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ValueBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "CycleDetectionStrategy",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JSONTokener",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JSONUtils",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JavaIdentifierTransformer",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "PropertyExclusionClassMatcher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "PropertyFilter",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "PropertySetStrategy",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "PropertyUtils",
  ";",
  "public",
  "class",
  "TestJSONObject",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONObject",
  ".",
  "class",
  ")",
  ";",
  "}",
  "private",
  "JsonConfig",
  "jsonConfig",
  ";",
  "public",
  "TestJSONObject",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testAccumulate",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "json",
  ".",
  "accumulate",
  "(",
  "\"key\"",
  ",",
  "\"1\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "1",
  ",",
  "json",
  ".",
  "getInt",
  "(",
  "\"key\"",
  ")",
  ")",
  ";",
  "json",
  ".",
  "accumulate",
  "(",
  "\"key\"",
  ",",
  "\"2\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"['1','2']\"",
  ")",
  ",",
  "json",
  ".",
  "getJSONArray",
  "(",
  "\"key\"",
  ")",
  ")",
  ";",
  "json",
  ".",
  "accumulate",
  "(",
  "\"key\"",
  ",",
  "\"3\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ",",
  "json",
  ".",
  "getJSONArray",
  "(",
  "\"key\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testAccumulate__nullObject",
  "(",
  ")",
  "{",
  "try",
  "{",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ".",
  "accumulate",
  "(",
  "\"key\"",
  ",",
  "\"value\"",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testConstructor_Object__nullJSONObject",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "(",
  "JSONObject",
  ")",
  "null",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_String_Array__nullObject",
  "(",
  ")",
  "{",
  "jsonConfig",
  ".",
  "setExcludes",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"bool\"",
  ",",
  "\"integer\"",
  "}",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "(",
  "Object",
  ")",
  "null",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCycleDetection_beans_noprop",
  "(",
  ")",
  "{",
  "jsonConfig",
  ".",
  "setCycleDetectionStrategy",
  "(",
  "CycleDetectionStrategy",
  ".",
  "NOPROP",
  ")",
  ";",
  "ParentBean",
  "parent",
  "=",
  "new",
  "ParentBean",
  "(",
  ")",
  ";",
  "parent",
  ".",
  "setChild",
  "(",
  "new",
  "ChildBean",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "parent",
  ",",
  "jsonConfig",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"value\"",
  ",",
  "0",
  ")",
  ".",
  "element",
  "(",
  "\"child\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"value\"",
  ",",
  "0",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCycleDetection_beans_null",
  "(",
  ")",
  "{",
  "jsonConfig",
  ".",
  "setCycleDetectionStrategy",
  "(",
  "CycleDetectionStrategy",
  ".",
  "LENIENT",
  ")",
  ";",
  "ParentBean",
  "parent",
  "=",
  "new",
  "ParentBean",
  "(",
  ")",
  ";",
  "parent",
  ".",
  "setChild",
  "(",
  "new",
  "ChildBean",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "parent",
  ",",
  "jsonConfig",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"value\"",
  ",",
  "0",
  ")",
  ".",
  "element",
  "(",
  "\"child\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"value\"",
  ",",
  "0",
  ")",
  ".",
  "element",
  "(",
  "\"parent\"",
  ",",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCycleDetection_beans_strict",
  "(",
  ")",
  "{",
  "ParentBean",
  "parent",
  "=",
  "new",
  "ParentBean",
  "(",
  ")",
  ";",
  "parent",
  ".",
  "setChild",
  "(",
  "new",
  "ChildBean",
  "(",
  ")",
  ")",
  ";",
  "try",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "parent",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "assertTrue",
  "(",
  "expected",
  ".",
  "getMessage",
  "(",
  ")",
  ".",
  "endsWith",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testDiscard",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"int\"",
  ",",
  "\"1\"",
  ")",
  ".",
  "element",
  "(",
  "\"long\"",
  ",",
  "\"1\"",
  ")",
  ".",
  "element",
  "(",
  "\"boolean\"",
  ",",
  "\"true\"",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"string\"",
  ")",
  ".",
  "element",
  "(",
  "\"func\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"array\"",
  ",",
  "\"[1,2,3]\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "6",
  ",",
  "jsonObject",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "jsonObject",
  ".",
  "discard",
  "(",
  "\"int\"",
  ")",
  ".",
  "discard",
  "(",
  "\"func\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "4",
  ",",
  "jsonObject",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonObject",
  ".",
  "has",
  "(",
  "\"int\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonObject",
  ".",
  "has",
  "(",
  "\"func\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement__duplicateProperty",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"duplicated\"",
  ",",
  "\"json1\"",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"duplicated\"",
  ",",
  "\"json2\"",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"duplicated\"",
  ")",
  ";",
  "assertFalse",
  "(",
  "o",
  "instanceof",
  "JSONArray",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json2\"",
  ",",
  "o",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement__duplicateProperty_2",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"duplicated\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "o",
  "instanceof",
  "JSONArray",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"json1\"",
  ")",
  ".",
  "element",
  "(",
  "\"json2\"",
  ")",
  ",",
  "o",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Bean",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"bean\"",
  ",",
  "new",
  "ObjectBean",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "jsonObject",
  ".",
  "getJSONObject",
  "(",
  "\"bean\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Bean_exclusions",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setExcludes",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"pexcluded\"",
  "}",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"bean\"",
  ",",
  "new",
  "ObjectBean",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "jsonObject",
  ".",
  "getJSONObject",
  "(",
  "\"bean\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"pexcluded\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Bean_exclusions_ignoreDefault",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setExcludes",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"pexcluded\"",
  "}",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setIgnoreDefaultExcludes",
  "(",
  "true",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"bean\"",
  ",",
  "new",
  "ObjectBean",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "jsonObject",
  ".",
  "getJSONObject",
  "(",
  "\"bean\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "actual",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"pexcluded\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_boolean",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"bool\"",
  ",",
  "true",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "getBoolean",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Boolean",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"bool\"",
  ",",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "getBoolean",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Class",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"class\"",
  ",",
  "Object",
  ".",
  "class",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Collection",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"list\"",
  ",",
  "Collections",
  ".",
  "EMPTY_LIST",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ",",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"list\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Collection2",
  "(",
  ")",
  "{",
  "List",
  "list",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "new",
  "ObjectBean",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"list\"",
  ",",
  "list",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"list\"",
  ")",
  ".",
  "getJSONObject",
  "(",
  "0",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Collection2_exclusions",
  "(",
  ")",
  "{",
  "List",
  "list",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "new",
  "ObjectBean",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setExcludes",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"pexcluded\"",
  "}",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"list\"",
  ",",
  "list",
  ",",
  "jsonConfig",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"list\"",
  ")",
  ".",
  "getJSONObject",
  "(",
  "0",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"pexcluded\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Collection2_exclusions_ignoreDefault",
  "(",
  ")",
  "{",
  "List",
  "list",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "new",
  "ObjectBean",
  "(",
  ")",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setExcludes",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"pexcluded\"",
  "}",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setIgnoreDefaultExcludes",
  "(",
  "true",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"list\"",
  ",",
  "list",
  ",",
  "jsonConfig",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"list\"",
  ")",
  ".",
  "getJSONObject",
  "(",
  "0",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "actual",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"pexcluded\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_double",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"double\"",
  ",",
  "1d",
  ")",
  ";",
  "assertEquals",
  "(",
  "1d",
  ",",
  "jsonObject",
  ".",
  "getDouble",
  "(",
  "\"double\"",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_int",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"int\"",
  ",",
  "1",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonObject",
  ".",
  "getInt",
  "(",
  "\"int\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_JSON",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"null\"",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"null\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_JSONFunction",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "JSONFunction",
  "f",
  "=",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"func\"",
  ",",
  "f",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "f",
  ",",
  "(",
  "JSONFunction",
  ")",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_JSONString",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "ObjectJSONStringBean",
  "bean",
  "=",
  "new",
  "ObjectJSONStringBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setName",
  "(",
  "\"json\"",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"bean\"",
  ",",
  "bean",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ",",
  "jsonObject",
  ".",
  "getJSONObject",
  "(",
  "\"bean\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_JSONTokener",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "JSONTokener",
  "tok",
  "=",
  "new",
  "JSONTokener",
  "(",
  "\"\"",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"obj\"",
  ",",
  "tok",
  ")",
  ";",
  "tok",
  ".",
  "reset",
  "(",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "tok",
  ")",
  ",",
  "jsonObject",
  ".",
  "getJSONObject",
  "(",
  "\"obj\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_long",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"long\"",
  ",",
  "1L",
  ")",
  ";",
  "assertEquals",
  "(",
  "1L",
  ",",
  "jsonObject",
  ".",
  "getLong",
  "(",
  "\"long\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Map",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"map\"",
  ",",
  "map",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "map",
  ")",
  ",",
  "jsonObject",
  ".",
  "getJSONObject",
  "(",
  "\"map\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Map2",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"class\"",
  ",",
  "\"\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"excluded\"",
  ",",
  "\"excluded\"",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"map\"",
  ",",
  "map",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "jsonObject",
  ".",
  "getJSONObject",
  "(",
  "\"map\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Map2_exclusions",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"class\"",
  ",",
  "\"\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"pexcluded\"",
  ",",
  "\"excluded\"",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setExcludes",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"pexcluded\"",
  "}",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"map\"",
  ",",
  "map",
  ",",
  "jsonConfig",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "jsonObject",
  ".",
  "getJSONObject",
  "(",
  "\"map\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"pexcluded\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Map2_exclusions_ignoreDefault",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"class\"",
  ",",
  "\"\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"pexcluded\"",
  ",",
  "\"excluded\"",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setExcludes",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"pexcluded\"",
  "}",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setIgnoreDefaultExcludes",
  "(",
  "true",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"map\"",
  ",",
  "map",
  ",",
  "jsonConfig",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "jsonObject",
  ".",
  "getJSONObject",
  "(",
  "\"map\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "actual",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "!",
  "actual",
  ".",
  "has",
  "(",
  "\"pexcluded\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_null_key",
  "(",
  ")",
  "{",
  "try",
  "{",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "null",
  ",",
  "\"value\"",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testElement_Number",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"num\"",
  ",",
  "new",
  "Double",
  "(",
  "2",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "2",
  ")",
  ".",
  "doubleValue",
  "(",
  ")",
  ",",
  "jsonObject",
  ".",
  "getDouble",
  "(",
  "\"num\"",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Object",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"bean\"",
  ",",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ",",
  "jsonObject",
  ".",
  "getJSONObject",
  "(",
  "\"bean\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_String",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"str\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "jsonObject",
  ".",
  "getString",
  "(",
  "\"str\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_String_JSON",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"str\"",
  ",",
  "\"[]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "jsonObject",
  ".",
  "getString",
  "(",
  "\"str\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_String_null",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"str\"",
  ",",
  "(",
  "String",
  ")",
  "null",
  ")",
  ";",
  "try",
  "{",
  "jsonObject",
  ".",
  "getString",
  "(",
  "\"str\"",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testFromBean_array",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "ArrayList",
  "(",
  ")",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "try",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"json\"",
  "}",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testFromBean_ClassBean",
  "(",
  ")",
  "{",
  "ClassBean",
  "classBean",
  "=",
  "new",
  "ClassBean",
  "(",
  ")",
  ";",
  "classBean",
  ".",
  "setKlass",
  "(",
  "Object",
  ".",
  "class",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "classBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"klass\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromBean_DynaBean",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "createDynaBean",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"name\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"[1,2]\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"str\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"{'id':'1'}\"",
  ")",
  ",",
  "json",
  ".",
  "getJSONObject",
  "(",
  "\"json\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"{'name':''}\"",
  ")",
  ",",
  "json",
  ".",
  "getJSONObject",
  "(",
  "\"jsonstr\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "(",
  "JSONFunction",
  ")",
  "json",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromBean_JSONObject",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "json",
  ",",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromBean_JSONString",
  "(",
  ")",
  "{",
  "ObjectJSONStringBean",
  "bean",
  "=",
  "new",
  "ObjectJSONStringBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setId",
  "(",
  "1",
  ")",
  ";",
  "bean",
  ".",
  "setName",
  "(",
  "\"json\"",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"name\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"id\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromBean_JSONTokener",
  "(",
  ")",
  "{",
  "JSONTokener",
  "jsonTokener",
  "=",
  "new",
  "JSONTokener",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "jsonTokener",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromBean_Map",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"bool\"",
  ",",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"integer\"",
  ",",
  "new",
  "Integer",
  "(",
  "42",
  ")",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "map",
  ")",
  ";",
  "assertEquals",
  "(",
  "true",
  ",",
  "json",
  ".",
  "getBoolean",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "42",
  ",",
  "json",
  ".",
  "getInt",
  "(",
  "\"integer\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromBean_noReadMethod",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "PropertyBean",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromBean_null",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "null",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "json",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromBean_String",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromBean_use_wrappers",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Byte",
  "(",
  "Byte",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Short",
  "(",
  "Short",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Integer",
  "(",
  "Integer",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Long",
  "(",
  "Long",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Float",
  "(",
  "Float",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Double",
  "(",
  "Double",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Character",
  "(",
  "'A'",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromBeanWithJsonPropertyNameProcessor",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "registerJsonPropertyNameProcessor",
  "(",
  "BeanA",
  ".",
  "class",
  ",",
  "new",
  "PrefixerPropertyNameProcessor",
  "(",
  "\"json\"",
  ")",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "3",
  ",",
  "jsonObject",
  ".",
  "names",
  "(",
  ")",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "has",
  "(",
  "\"jsonbool\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "has",
  "(",
  "\"jsonstring\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "has",
  "(",
  "\"jsoninteger\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromDynaBean_full",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "Map",
  "properties",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"string\"",
  ",",
  "String",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"number\"",
  ",",
  "Integer",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"array\"",
  ",",
  "Object",
  "[",
  "]",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"list\"",
  ",",
  "List",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"func\"",
  ",",
  "JSONFunction",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"boolean\"",
  ",",
  "Boolean",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"bean\"",
  ",",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "MorphDynaClass",
  "dynaClass",
  "=",
  "new",
  "MorphDynaClass",
  "(",
  "\"JSON\"",
  ",",
  "MorphDynaBean",
  ".",
  "class",
  ",",
  "properties",
  ")",
  ";",
  "MorphDynaBean",
  "dynaBean",
  "=",
  "(",
  "MorphDynaBean",
  ")",
  "dynaClass",
  ".",
  "newInstance",
  "(",
  ")",
  ";",
  "dynaBean",
  ".",
  "setDynaBeanClass",
  "(",
  "dynaClass",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"number\"",
  ",",
  "new",
  "Double",
  "(",
  "2",
  ")",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"array\"",
  ",",
  "new",
  "Integer",
  "[",
  "]",
  "{",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  "}",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"list\"",
  ",",
  "new",
  "ArrayList",
  "(",
  ")",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"func\"",
  ",",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "a;\"",
  ")",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"boolean\"",
  ",",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"bean\"",
  ",",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "dynaBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "2",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"number\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"boolean\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "(",
  "JSONFunction",
  ")",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromDynaBean_null",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "null",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromJSONTokener",
  "(",
  ")",
  "{",
  "JSONTokener",
  "jsonTokener",
  "=",
  "new",
  "JSONTokener",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "jsonTokener",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromMap_nested_null_object",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"nested\"",
  ",",
  "null",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "map",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "Object",
  "nested",
  "=",
  "json",
  ".",
  "get",
  "(",
  "\"nested\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "nested",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromMap_null_Map",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "null",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "json",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_array",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "ArrayList",
  "(",
  ")",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "try",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"json\"",
  "}",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testFromObject_Bean",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "true",
  ",",
  "json",
  ".",
  "getBoolean",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "42",
  ",",
  "json",
  ".",
  "getInt",
  "(",
  "\"integer\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_BeanWithFunc",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanWithFunc",
  "(",
  "\"return",
  "a;\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ".",
  "get",
  "(",
  "\"function\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isFunction",
  "(",
  "json",
  ".",
  "get",
  "(",
  "\"function\"",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"function\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_DynaBean",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "createDynaBean",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"name\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_emptyBean",
  "(",
  ")",
  "{",
  "EmptyBean",
  "bean",
  "=",
  "new",
  "EmptyBean",
  "(",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"arrayp\"",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"listp\"",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"bytep\"",
  ",",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"shortp\"",
  ",",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"intp\"",
  ",",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"longp\"",
  ",",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"floatp\"",
  ",",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"doublep\"",
  ",",
  "new",
  "Double",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"charp\"",
  ",",
  "\"\"",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"stringp\"",
  ",",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "json",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_ExtendedBean",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanB",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "true",
  ",",
  "json",
  ".",
  "getBoolean",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "42",
  ",",
  "json",
  ".",
  "getInt",
  "(",
  "\"integer\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ".",
  "get",
  "(",
  "\"intarray\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_ignoreTransientFields",
  "(",
  ")",
  "{",
  "jsonConfig",
  ".",
  "setIgnoreTransientFields",
  "(",
  "true",
  ")",
  ";",
  "TransientBean",
  "bean",
  "=",
  "new",
  "TransientBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setValue",
  "(",
  "42",
  ")",
  ";",
  "bean",
  ".",
  "setTransientValue",
  "(",
  "84",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "has",
  "(",
  "\"value\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonObject",
  ".",
  "has",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_JSONObject",
  "(",
  ")",
  "{",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"id\"",
  ",",
  "\"1\"",
  ")",
  ".",
  "element",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_JSONString",
  "(",
  ")",
  "{",
  "ObjectJSONStringBean",
  "bean",
  "=",
  "new",
  "ObjectJSONStringBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setId",
  "(",
  "1",
  ")",
  ";",
  "bean",
  ".",
  "setName",
  "(",
  "\"json\"",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"name\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"id\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_JSONTokener",
  "(",
  ")",
  "{",
  "JSONTokener",
  "jsonTokener",
  "=",
  "new",
  "JSONTokener",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "jsonTokener",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Map",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"bool\"",
  ",",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"integer\"",
  ",",
  "new",
  "Integer",
  "(",
  "42",
  ")",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"array\"",
  ",",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1]\"",
  ")",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"object\"",
  ",",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "map",
  ")",
  ";",
  "assertEquals",
  "(",
  "true",
  ",",
  "json",
  ".",
  "getBoolean",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "42",
  ",",
  "json",
  ".",
  "getInt",
  "(",
  "\"integer\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1]\"",
  ")",
  ",",
  "json",
  ".",
  "getJSONArray",
  "(",
  "\"array\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ",",
  "json",
  ".",
  "getJSONObject",
  "(",
  "\"object\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_nested_bean",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanC",
  "(",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ".",
  "get",
  "(",
  "\"beanA\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ".",
  "get",
  "(",
  "\"beanB\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_null",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "null",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "json",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_ObjectBean",
  "(",
  ")",
  "{",
  "ObjectBean",
  "bean",
  "=",
  "new",
  "ObjectBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setPbyte",
  "(",
  "Byte",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPshort",
  "(",
  "Short",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPint",
  "(",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPlong",
  "(",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPfloat",
  "(",
  "Float",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPdouble",
  "(",
  "Double",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPchar",
  "(",
  "new",
  "Character",
  "(",
  "'1'",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPboolean",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "bean",
  ".",
  "setPstring",
  "(",
  "\"json\"",
  ")",
  ";",
  "bean",
  ".",
  "setParray",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  ",",
  "\"b\"",
  "}",
  ")",
  ";",
  "bean",
  ".",
  "setPbean",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ";",
  "List",
  "list",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "\"1\"",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "\"2\"",
  ")",
  ";",
  "bean",
  ".",
  "setPlist",
  "(",
  "list",
  ")",
  ";",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "bean",
  ".",
  "setPmap",
  "(",
  "map",
  ")",
  ";",
  "bean",
  ".",
  "setPfunction",
  "(",
  "new",
  "JSONFunction",
  "(",
  "\"this;\"",
  ")",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "json",
  ".",
  "getInt",
  "(",
  "\"pbyte\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "json",
  ".",
  "getInt",
  "(",
  "\"pshort\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "json",
  ".",
  "getInt",
  "(",
  "\"pint\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "json",
  ".",
  "getInt",
  "(",
  "\"plong\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1d",
  ",",
  "json",
  ".",
  "getDouble",
  "(",
  "\"pfloat\"",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "assertEquals",
  "(",
  "1d",
  ",",
  "json",
  ".",
  "getDouble",
  "(",
  "\"pdouble\"",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "getBoolean",
  "(",
  "\"pboolean\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"pstring\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"['a','b']\"",
  ")",
  ",",
  "json",
  ".",
  "getJSONArray",
  "(",
  "\"parray\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"['1','2']\"",
  ")",
  ",",
  "json",
  ".",
  "getJSONArray",
  "(",
  "\"plist\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"1\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"pchar\"",
  ")",
  ")",
  ";",
  "JSONObject",
  "b",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "element",
  "(",
  "\"integer\"",
  ",",
  "\"42\"",
  ")",
  ".",
  "element",
  "(",
  "\"bool\"",
  ",",
  "\"true\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "b",
  ",",
  "json",
  ".",
  "getJSONObject",
  "(",
  "\"pbean\"",
  ")",
  ")",
  ";",
  "b",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "b",
  ",",
  "json",
  ".",
  "getJSONObject",
  "(",
  "\"pmap\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_ObjectBean_empty",
  "(",
  ")",
  "{",
  "ObjectBean",
  "bean",
  "=",
  "new",
  "ObjectBean",
  "(",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "String",
  "[",
  "]",
  "keys",
  "=",
  "{",
  "\"pbyte\"",
  ",",
  "\"pshort\"",
  ",",
  "\"pint\"",
  ",",
  "\"plong\"",
  ",",
  "\"pfloat\"",
  ",",
  "\"pdouble\"",
  ",",
  "\"pboolean\"",
  ",",
  "\"pchar\"",
  ",",
  "\"pstring\"",
  ",",
  "\"parray\"",
  ",",
  "\"plist\"",
  ",",
  "\"pmap\"",
  ",",
  "\"pbean\"",
  "}",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "keys",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "assertTrue",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "json",
  ".",
  "get",
  "(",
  "keys",
  "[",
  "i",
  "]",
  ")",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testFromObject_String",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_toBean_DynaBean",
  "(",
  ")",
  "{",
  "String",
  "jsondata",
  "=",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  ";",
  "JSONObject",
  "jsonobj",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "jsondata",
  ")",
  ";",
  "Object",
  "bean",
  "=",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonobj",
  ")",
  ";",
  "assertTrue",
  "(",
  "bean",
  "instanceof",
  "MorphDynaBean",
  ")",
  ";",
  "JSONObject",
  "jsonobj2",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonobj",
  ".",
  "getJSONObject",
  "(",
  "\"person\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "jsonobj",
  ".",
  "getJSONObject",
  "(",
  "\"person\"",
  ")",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonobj2",
  ".",
  "getJSONObject",
  "(",
  "\"person\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "jsonobj2",
  ".",
  "getJSONObject",
  "(",
  "\"person\"",
  ")",
  ")",
  ")",
  ";",
  "JSONObject",
  "person1",
  "=",
  "jsonobj",
  ".",
  "getJSONObject",
  "(",
  "\"person\"",
  ")",
  ";",
  "JSONObject",
  "person2",
  "=",
  "jsonobj2",
  ".",
  "getJSONObject",
  "(",
  "\"person\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "person1",
  ".",
  "get",
  "(",
  "\"name\"",
  ")",
  ",",
  "person2",
  ".",
  "get",
  "(",
  "\"name\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "person1",
  ".",
  "get",
  "(",
  "\"phone\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "person2",
  ".",
  "get",
  "(",
  "\"phone\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "person1",
  ".",
  "get",
  "(",
  "\"email\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "person2",
  ".",
  "get",
  "(",
  "\"email\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "address1",
  "=",
  "person1",
  ".",
  "getJSONObject",
  "(",
  "\"address\"",
  ")",
  ";",
  "JSONObject",
  "address2",
  "=",
  "person2",
  ".",
  "getJSONObject",
  "(",
  "\"address\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "address1",
  ".",
  "get",
  "(",
  "\"street\"",
  ")",
  ",",
  "address2",
  ".",
  "get",
  "(",
  "\"street\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "address1",
  ".",
  "get",
  "(",
  "\"zip\"",
  ")",
  ",",
  "address2",
  ".",
  "get",
  "(",
  "\"zip\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "address1",
  ".",
  "get",
  "(",
  "\"city\"",
  ")",
  ",",
  "address2",
  ".",
  "get",
  "(",
  "\"city\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_use_wrappers",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Byte",
  "(",
  "Byte",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Short",
  "(",
  "Short",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Integer",
  "(",
  "Integer",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Long",
  "(",
  "Long",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Float",
  "(",
  "Float",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Double",
  "(",
  "Double",
  ".",
  "MIN_VALUE",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "Character",
  "(",
  "'A'",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_withCustomDefaultValueProcessor",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "registerDefaultValueProcessor",
  "(",
  "Integer",
  ".",
  "class",
  ",",
  "new",
  "NumberDefaultValueProcessor",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "NumberBean",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwbyte\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwshort\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "NumberDefaultValueProcessor",
  ".",
  "NUMBER",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwint\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwlong\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwfloat\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwdouble\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pbigdec\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pbigint\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pbyte\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pshort\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pint\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"plong\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pfloat\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pdouble\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_withCustomDefaultValueProcessor_andMatcher",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "registerDefaultValueProcessor",
  "(",
  "Integer",
  ".",
  "class",
  ",",
  "new",
  "NumberDefaultValueProcessor",
  "(",
  ")",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setDefaultValueProcessorMatcher",
  "(",
  "new",
  "NumberDefaultValueProcessorMatcher",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "NumberBean",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "NumberDefaultValueProcessor",
  ".",
  "NUMBER",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pbigdec\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "NumberDefaultValueProcessor",
  ".",
  "NUMBER",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pbigint\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "NumberDefaultValueProcessor",
  ".",
  "NUMBER",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwbyte\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "NumberDefaultValueProcessor",
  ".",
  "NUMBER",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwshort\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "NumberDefaultValueProcessor",
  ".",
  "NUMBER",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwint\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "NumberDefaultValueProcessor",
  ".",
  "NUMBER",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwlong\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "NumberDefaultValueProcessor",
  ".",
  "NUMBER",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwfloat\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "NumberDefaultValueProcessor",
  ".",
  "NUMBER",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pwdouble\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pbyte\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pshort\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pint\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"plong\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pfloat\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "0",
  ")",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"pdouble\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_withExcludesPerClass",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "registerPropertyExclusion",
  "(",
  "BeanA",
  ".",
  "class",
  ",",
  "\"bool\"",
  ")",
  ";",
  "JSONObject",
  "jsonA",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "JSONObject",
  "jsonB",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanB",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonA",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonB",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonA",
  ".",
  "has",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonB",
  ".",
  "has",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_withExcludesPerClassAndMatcher",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "registerPropertyExclusion",
  "(",
  "BeanA",
  ".",
  "class",
  ",",
  "\"bool\"",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setPropertyExclusionClassMatcher",
  "(",
  "new",
  "BeanAPropertyExclusionClassMatcher",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "jsonA",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "JSONObject",
  "jsonB",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanB",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonA",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonB",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonA",
  ".",
  "has",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonB",
  ".",
  "has",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_withFilters",
  "(",
  ")",
  "{",
  "PrimitiveBean",
  "bean",
  "=",
  "new",
  "PrimitiveBean",
  "(",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setJsonPropertyFilter",
  "(",
  "new",
  "NumberPropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pbean\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pclass\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pexcluded\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pfunction\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"plist\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pmap\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pstring\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"parray\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pboolean\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pbyte\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pshort\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pint\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"plong\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pfloat\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pdouble\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pchar\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_withFiltersAndExcludes",
  "(",
  ")",
  "{",
  "PrimitiveBean",
  "bean",
  "=",
  "new",
  "PrimitiveBean",
  "(",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setJsonPropertyFilter",
  "(",
  "new",
  "NumberPropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setExcludes",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"pexcluded\"",
  "}",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pbean\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pclass\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pexcluded\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pfunction\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"plist\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pmap\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pstring\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"parray\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pboolean\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pbyte\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pshort\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pint\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"plong\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pfloat\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pdouble\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"pchar\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromString_null_String",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "null",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "json",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHas",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "has",
  "(",
  "\"any\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"any\"",
  ",",
  "\"value\"",
  ")",
  ".",
  "has",
  "(",
  "\"any\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testLength",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "0",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testLength_nullObject",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "0",
  ",",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptBoolean",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "optBoolean",
  "(",
  "\"any\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptBoolean_defaultValue",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "optBoolean",
  "(",
  "\"any\"",
  ",",
  "true",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptDouble",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "Double",
  ".",
  "isNaN",
  "(",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "optDouble",
  "(",
  "\"any\"",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptDouble_defaultValue",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "2d",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "optDouble",
  "(",
  "\"any\"",
  ",",
  "2d",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptInt",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "0",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "optInt",
  "(",
  "\"any\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptInt_defaultValue",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "1",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "optInt",
  "(",
  "\"any\"",
  ",",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptJSONArray",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "assertNull",
  "(",
  "json",
  ".",
  "optJSONArray",
  "(",
  "\"a\"",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"a\"",
  ",",
  "\"[]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ",",
  "json",
  ".",
  "optJSONArray",
  "(",
  "\"a\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptJSONObject",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "assertNull",
  "(",
  "json",
  ".",
  "optJSONObject",
  "(",
  "\"a\"",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"a\"",
  ",",
  "\"{}\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "JSONObject",
  "(",
  ")",
  ",",
  "json",
  ".",
  "optJSONObject",
  "(",
  "\"a\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptLong",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "0L",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "optLong",
  "(",
  "\"any\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptLong_defaultValue",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "1L",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "optLong",
  "(",
  "\"any\"",
  ",",
  "1L",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptString",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "optString",
  "(",
  "\"any\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testOptString_defaultValue",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "optString",
  "(",
  "\"any\"",
  ",",
  "\"json\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "Object",
  "bean",
  "=",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"name\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"name\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"bool\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"int\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"int\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"double\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"double\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"func\"",
  ")",
  ")",
  ";",
  "List",
  "expected",
  "=",
  "(",
  "List",
  ")",
  "JSONArray",
  ".",
  "toCollection",
  "(",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"array\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "(",
  "List",
  ")",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"array\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_BeanA",
  "(",
  ")",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "BeanA",
  "bean",
  "=",
  "(",
  "BeanA",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"bool\"",
  ")",
  ",",
  "Boolean",
  ".",
  "valueOf",
  "(",
  "bean",
  ".",
  "isBool",
  "(",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"integer\"",
  ")",
  ",",
  "new",
  "Integer",
  "(",
  "bean",
  ".",
  "getInteger",
  "(",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"string\"",
  ")",
  ",",
  "bean",
  ".",
  "getString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_BeanB",
  "(",
  ")",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "BeanB",
  "bean",
  "=",
  "(",
  "BeanB",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "BeanB",
  ".",
  "class",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"bool\"",
  ")",
  ",",
  "Boolean",
  ".",
  "valueOf",
  "(",
  "bean",
  ".",
  "isBool",
  "(",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"integer\"",
  ")",
  ",",
  "new",
  "Integer",
  "(",
  "bean",
  ".",
  "getInteger",
  "(",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"string\"",
  ")",
  ",",
  "bean",
  ".",
  "getString",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "bean",
  ".",
  "getIntarray",
  "(",
  ")",
  ",",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"intarray\"",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_ClassBean",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"klass\"",
  ",",
  "\"\"",
  ")",
  ";",
  "ClassBean",
  "bean",
  "=",
  "(",
  "ClassBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "ClassBean",
  ".",
  "class",
  ")",
  ";",
  "assertEquals",
  "(",
  "Object",
  ".",
  "class",
  ",",
  "bean",
  ".",
  "getKlass",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_DynaBean__BigInteger_BigDecimal",
  "(",
  ")",
  "{",
  "BigInteger",
  "l",
  "=",
  "new",
  "BigDecimal",
  "(",
  "\"\"",
  ")",
  ".",
  "toBigInteger",
  "(",
  ")",
  ";",
  "BigDecimal",
  "m",
  "=",
  "new",
  "BigDecimal",
  "(",
  "\"\"",
  ")",
  ".",
  "add",
  "(",
  "new",
  "BigDecimal",
  "(",
  "\"0.0001\"",
  ")",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"i\"",
  ",",
  "BigInteger",
  ".",
  "ZERO",
  ")",
  ".",
  "element",
  "(",
  "\"d\"",
  ",",
  "MorphUtils",
  ".",
  "BIGDECIMAL_ONE",
  ")",
  ".",
  "element",
  "(",
  "\"bi\"",
  ",",
  "l",
  ")",
  ".",
  "element",
  "(",
  "\"bd\"",
  ",",
  "m",
  ")",
  ";",
  "Object",
  "bean",
  "=",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ")",
  ";",
  "Object",
  "i",
  "=",
  "(",
  "(",
  "MorphDynaBean",
  ")",
  "bean",
  ")",
  ".",
  "get",
  "(",
  "\"i\"",
  ")",
  ";",
  "Object",
  "d",
  "=",
  "(",
  "(",
  "MorphDynaBean",
  ")",
  "bean",
  ")",
  ".",
  "get",
  "(",
  "\"d\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "i",
  "instanceof",
  "Integer",
  ")",
  ";",
  "assertTrue",
  "(",
  "d",
  "instanceof",
  "Integer",
  ")",
  ";",
  "Object",
  "bi",
  "=",
  "(",
  "(",
  "MorphDynaBean",
  ")",
  "bean",
  ")",
  ".",
  "get",
  "(",
  "\"bi\"",
  ")",
  ";",
  "Object",
  "bd",
  "=",
  "(",
  "(",
  "MorphDynaBean",
  ")",
  "bean",
  ")",
  ".",
  "get",
  "(",
  "\"bd\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "bi",
  "instanceof",
  "BigInteger",
  ")",
  ";",
  "assertTrue",
  "(",
  "bd",
  "instanceof",
  "BigDecimal",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_emptyBean",
  "(",
  ")",
  "{",
  "EmptyBean",
  "bean",
  "=",
  "new",
  "EmptyBean",
  "(",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"arrayp\"",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"listp\"",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"bytep\"",
  ",",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"shortp\"",
  ",",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"intp\"",
  ",",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"longp\"",
  ",",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"floatp\"",
  ",",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"doublep\"",
  ",",
  "new",
  "Double",
  "(",
  "0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"charp\"",
  ",",
  "\"\"",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"stringp\"",
  ",",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "json",
  ")",
  ";",
  "EmptyBean",
  "bean2",
  "=",
  "(",
  "EmptyBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "EmptyBean",
  ".",
  "class",
  ")",
  ";",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Object",
  "[",
  "0",
  "]",
  ",",
  "bean2",
  ".",
  "getArrayp",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "ArrayList",
  "(",
  ")",
  ",",
  "bean2",
  ".",
  "getListp",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Byte",
  "(",
  "(",
  "byte",
  ")",
  "0",
  ")",
  ",",
  "bean2",
  ".",
  "getBytep",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Short",
  "(",
  "(",
  "short",
  ")",
  "0",
  ")",
  ",",
  "bean2",
  ".",
  "getShortp",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "0",
  ")",
  ",",
  "bean2",
  ".",
  "getIntp",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Long",
  "(",
  "0",
  ")",
  ",",
  "bean2",
  ".",
  "getLongp",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Float",
  "(",
  "0",
  ")",
  ",",
  "bean2",
  ".",
  "getFloatp",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "0",
  ")",
  ",",
  "bean2",
  ".",
  "getDoublep",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Character",
  "(",
  "'\\0'",
  ")",
  ",",
  "bean2",
  ".",
  "getCharp",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "bean2",
  ".",
  "getStringp",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_interface",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"{\\\"int\\\":1}\"",
  ")",
  ",",
  "Serializable",
  ".",
  "class",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testToBean_Map",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "Object",
  "obj",
  "=",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "map",
  ")",
  ",",
  "Map",
  ".",
  "class",
  ")",
  ";",
  "assertTrue",
  "(",
  "obj",
  "instanceof",
  "Map",
  ")",
  ";",
  "assertEquals",
  "(",
  "map",
  ".",
  "get",
  "(",
  "\"name\"",
  ")",
  ",",
  "(",
  "(",
  "Map",
  ")",
  "obj",
  ")",
  ".",
  "get",
  "(",
  "\"name\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_nested",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "Object",
  "bean",
  "=",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"name\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"name\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"bool\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"int\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"int\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"double\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"double\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"func\"",
  ")",
  ")",
  ";",
  "JSONObject",
  "nestedJson",
  "=",
  "jsonObject",
  ".",
  "getJSONObject",
  "(",
  "\"nested\"",
  ")",
  ";",
  "Object",
  "nestedBean",
  "=",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"nested\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "nestedJson",
  ".",
  "get",
  "(",
  "\"nested\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "nestedBean",
  ",",
  "\"nested\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_nested_beans__null_object",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "BeanC",
  "bean",
  "=",
  "(",
  "BeanC",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "BeanC",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "BeanA",
  "beanA",
  "=",
  "bean",
  ".",
  "getBeanA",
  "(",
  ")",
  ";",
  "assertNotNull",
  "(",
  "beanA",
  ")",
  ";",
  "assertEquals",
  "(",
  "true",
  ",",
  "beanA",
  ".",
  "isBool",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "beanA",
  ".",
  "getInteger",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"jsonbean\"",
  ",",
  "beanA",
  ".",
  "getString",
  "(",
  ")",
  ")",
  ";",
  "BeanB",
  "beanB",
  "=",
  "bean",
  ".",
  "getBeanB",
  "(",
  ")",
  ";",
  "assertNull",
  "(",
  "beanB",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_nested_beans_in_list__beans",
  "(",
  ")",
  "{",
  "ListingBean",
  "listingBean",
  "=",
  "new",
  "ListingBean",
  "(",
  ")",
  ";",
  "ValueBean",
  "beanA1",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanA1",
  ".",
  "setValue",
  "(",
  "90000",
  ")",
  ";",
  "ValueBean",
  "beanA2",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanA2",
  ".",
  "setValue",
  "(",
  "91000",
  ")",
  ";",
  "listingBean",
  ".",
  "addAttribute",
  "(",
  "beanA1",
  ")",
  ";",
  "listingBean",
  ".",
  "addAttribute",
  "(",
  "beanA2",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "listingBean",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"attributes\"",
  ",",
  "ValueBean",
  ".",
  "class",
  ")",
  ";",
  "ListingBean",
  "listingBean2",
  "=",
  "(",
  "ListingBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "ListingBean",
  ".",
  "class",
  ",",
  "classMap",
  ")",
  ";",
  "List",
  "attributes",
  "=",
  "listingBean2",
  ".",
  "getAttributes",
  "(",
  ")",
  ";",
  "Object",
  "ba",
  "=",
  "attributes",
  ".",
  "get",
  "(",
  "0",
  ")",
  ";",
  "Object",
  "bb",
  "=",
  "attributes",
  ".",
  "get",
  "(",
  "1",
  ")",
  ";",
  "assertTrue",
  "(",
  "ba",
  "instanceof",
  "ValueBean",
  ")",
  ";",
  "assertTrue",
  "(",
  "bb",
  "instanceof",
  "ValueBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "beanA1",
  ".",
  "getValue",
  "(",
  ")",
  ",",
  "(",
  "(",
  "ValueBean",
  ")",
  "ba",
  ")",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "beanA2",
  ".",
  "getValue",
  "(",
  ")",
  ",",
  "(",
  "(",
  "ValueBean",
  ")",
  "bb",
  ")",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_nested_beans_in_list__DynaBean",
  "(",
  ")",
  "{",
  "ListingBean",
  "listingBean",
  "=",
  "new",
  "ListingBean",
  "(",
  ")",
  ";",
  "ValueBean",
  "beanA1",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanA1",
  ".",
  "setValue",
  "(",
  "90000",
  ")",
  ";",
  "ValueBean",
  "beanA2",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanA2",
  ".",
  "setValue",
  "(",
  "91000",
  ")",
  ";",
  "listingBean",
  ".",
  "addAttribute",
  "(",
  "beanA1",
  ")",
  ";",
  "listingBean",
  ".",
  "addAttribute",
  "(",
  "beanA2",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "listingBean",
  ")",
  ";",
  "ListingBean",
  "listingBean2",
  "=",
  "(",
  "ListingBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "ListingBean",
  ".",
  "class",
  ")",
  ";",
  "List",
  "attributes",
  "=",
  "listingBean2",
  ".",
  "getAttributes",
  "(",
  ")",
  ";",
  "Object",
  "ba",
  "=",
  "attributes",
  ".",
  "get",
  "(",
  "0",
  ")",
  ";",
  "Object",
  "bb",
  "=",
  "attributes",
  ".",
  "get",
  "(",
  "1",
  ")",
  ";",
  "assertTrue",
  "(",
  "ba",
  "instanceof",
  "MorphDynaBean",
  ")",
  ";",
  "assertTrue",
  "(",
  "bb",
  "instanceof",
  "MorphDynaBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "beanA1",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ",",
  "(",
  "(",
  "MorphDynaBean",
  ")",
  "ba",
  ")",
  ".",
  "get",
  "(",
  "\"value\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "beanA2",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ",",
  "(",
  "(",
  "MorphDynaBean",
  ")",
  "bb",
  ")",
  ".",
  "get",
  "(",
  "\"value\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_nested_beans_in_map__beans",
  "(",
  ")",
  "{",
  "MappingBean",
  "mappingBean",
  "=",
  "new",
  "MappingBean",
  "(",
  ")",
  ";",
  "ValueBean",
  "beanA",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanA",
  ".",
  "setValue",
  "(",
  "90000",
  ")",
  ";",
  "ValueBean",
  "beanB",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanB",
  ".",
  "setValue",
  "(",
  "91000",
  ")",
  ";",
  "mappingBean",
  ".",
  "addAttribute",
  "(",
  "\"beanA\"",
  ",",
  "beanA",
  ")",
  ";",
  "mappingBean",
  ".",
  "addAttribute",
  "(",
  "\"beanB\"",
  ",",
  "beanB",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "mappingBean",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"bean.*\"",
  ",",
  "ValueBean",
  ".",
  "class",
  ")",
  ";",
  "MappingBean",
  "mappingBean2",
  "=",
  "(",
  "MappingBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "MappingBean",
  ".",
  "class",
  ",",
  "classMap",
  ")",
  ";",
  "Object",
  "ba",
  "=",
  "mappingBean2",
  ".",
  "getAttributes",
  "(",
  ")",
  ".",
  "get",
  "(",
  "\"beanA\"",
  ")",
  ";",
  "Object",
  "bb",
  "=",
  "mappingBean2",
  ".",
  "getAttributes",
  "(",
  ")",
  ".",
  "get",
  "(",
  "\"beanB\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "ba",
  "instanceof",
  "ValueBean",
  ")",
  ";",
  "assertTrue",
  "(",
  "bb",
  "instanceof",
  "ValueBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "beanA",
  ".",
  "getValue",
  "(",
  ")",
  ",",
  "(",
  "(",
  "ValueBean",
  ")",
  "ba",
  ")",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "beanB",
  ".",
  "getValue",
  "(",
  ")",
  ",",
  "(",
  "(",
  "ValueBean",
  ")",
  "bb",
  ")",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_nested_beans_in_map__DynaBean",
  "(",
  ")",
  "{",
  "MappingBean",
  "mappingBean",
  "=",
  "new",
  "MappingBean",
  "(",
  ")",
  ";",
  "ValueBean",
  "beanA",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanA",
  ".",
  "setValue",
  "(",
  "90000",
  ")",
  ";",
  "ValueBean",
  "beanB",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanB",
  ".",
  "setValue",
  "(",
  "91000",
  ")",
  ";",
  "mappingBean",
  ".",
  "addAttribute",
  "(",
  "\"beanA\"",
  ",",
  "beanA",
  ")",
  ";",
  "mappingBean",
  ".",
  "addAttribute",
  "(",
  "\"beanB\"",
  ",",
  "beanB",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "mappingBean",
  ")",
  ";",
  "MappingBean",
  "mappingBean2",
  "=",
  "(",
  "MappingBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "MappingBean",
  ".",
  "class",
  ")",
  ";",
  "Object",
  "ba",
  "=",
  "mappingBean2",
  ".",
  "getAttributes",
  "(",
  ")",
  ".",
  "get",
  "(",
  "\"beanA\"",
  ")",
  ";",
  "Object",
  "bb",
  "=",
  "mappingBean2",
  ".",
  "getAttributes",
  "(",
  ")",
  ".",
  "get",
  "(",
  "\"beanB\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "ba",
  "instanceof",
  "MorphDynaBean",
  ")",
  ";",
  "assertTrue",
  "(",
  "bb",
  "instanceof",
  "MorphDynaBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "beanA",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ",",
  "(",
  "(",
  "MorphDynaBean",
  ")",
  "ba",
  ")",
  ".",
  "get",
  "(",
  "\"value\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "beanB",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ",",
  "(",
  "(",
  "MorphDynaBean",
  ")",
  "bb",
  ")",
  ".",
  "get",
  "(",
  "\"value\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_nested_beans_in_set__beans",
  "(",
  ")",
  "{",
  "SetBean",
  "setBean",
  "=",
  "new",
  "SetBean",
  "(",
  ")",
  ";",
  "ValueBean",
  "beanA1",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanA1",
  ".",
  "setValue",
  "(",
  "90000",
  ")",
  ";",
  "ValueBean",
  "beanA2",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanA2",
  ".",
  "setValue",
  "(",
  "91000",
  ")",
  ";",
  "setBean",
  ".",
  "addAttribute",
  "(",
  "beanA1",
  ")",
  ";",
  "setBean",
  ".",
  "addAttribute",
  "(",
  "beanA2",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "setBean",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"attributes\"",
  ",",
  "ValueBean",
  ".",
  "class",
  ")",
  ";",
  "SetBean",
  "setBean2",
  "=",
  "(",
  "SetBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "SetBean",
  ".",
  "class",
  ",",
  "classMap",
  ")",
  ";",
  "assertEquals",
  "(",
  "setBean",
  ",",
  "setBean2",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_nested_beans_in_set__DynaBean",
  "(",
  ")",
  "{",
  "SetBean",
  "setBean",
  "=",
  "new",
  "SetBean",
  "(",
  ")",
  ";",
  "ValueBean",
  "beanA1",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanA1",
  ".",
  "setValue",
  "(",
  "90000",
  ")",
  ";",
  "ValueBean",
  "beanA2",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanA2",
  ".",
  "setValue",
  "(",
  "91000",
  ")",
  ";",
  "setBean",
  ".",
  "addAttribute",
  "(",
  "beanA1",
  ")",
  ";",
  "setBean",
  ".",
  "addAttribute",
  "(",
  "beanA2",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "setBean",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_nested_dynabeans__null_object",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "Object",
  "bean",
  "=",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "Object",
  "beanA",
  "=",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"beanA\"",
  ")",
  ";",
  "assertNotNull",
  "(",
  "beanA",
  ")",
  ";",
  "assertEquals",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "beanA",
  ",",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "beanA",
  ",",
  "\"integer\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"jsonbean\"",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "beanA",
  ",",
  "\"string\"",
  ")",
  ")",
  ";",
  "Object",
  "beanB",
  "=",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"beanB\"",
  ")",
  ";",
  "assertNull",
  "(",
  "beanB",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testtoBean_noWriteMethod",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"\"",
  ",",
  "\"value\"",
  ")",
  ";",
  "PropertyBean",
  "bean",
  "=",
  "(",
  "PropertyBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "PropertyBean",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "bean",
  ".",
  "valueOfPropertyWithNoReadMethod",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "bean",
  ".",
  "getPropertyWithNoWriteMethod",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_null",
  "(",
  ")",
  "{",
  "assertNull",
  "(",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_null_2",
  "(",
  ")",
  "{",
  "assertNull",
  "(",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "null",
  ",",
  "BeanA",
  ".",
  "class",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_null_object",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "BeanA",
  "bean",
  "=",
  "(",
  "BeanA",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "assertNull",
  "(",
  "bean",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_null_values",
  "(",
  ")",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "BeanFoo",
  "foo",
  "=",
  "(",
  "BeanFoo",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "BeanFoo",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "foo",
  ")",
  ";",
  "assertNotNull",
  "(",
  "foo",
  ".",
  "getItems",
  "(",
  ")",
  ")",
  ";",
  "String",
  "[",
  "]",
  "[",
  "]",
  "items",
  "=",
  "foo",
  ".",
  "getItems",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "3",
  ",",
  "items",
  ".",
  "length",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"000\"",
  ",",
  "items",
  "[",
  "0",
  "]",
  "[",
  "0",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"010\"",
  ",",
  "items",
  "[",
  "1",
  "]",
  "[",
  "0",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"011\"",
  ",",
  "items",
  "[",
  "1",
  "]",
  "[",
  "1",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"020\"",
  ",",
  "items",
  "[",
  "2",
  "]",
  "[",
  "0",
  "]",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_NumberBean",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pbyte\"",
  ",",
  "new",
  "Byte",
  "(",
  "(",
  "byte",
  ")",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pshort\"",
  ",",
  "new",
  "Short",
  "(",
  "(",
  "short",
  ")",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pint\"",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"plong\"",
  ",",
  "new",
  "Long",
  "(",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pfloat\"",
  ",",
  "new",
  "Float",
  "(",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pdouble\"",
  ",",
  "new",
  "Double",
  "(",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pbigint\"",
  ",",
  "new",
  "BigInteger",
  "(",
  "\"2\"",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pbigdec\"",
  ",",
  "new",
  "BigDecimal",
  "(",
  "\"2\"",
  ")",
  ")",
  ";",
  "NumberBean",
  "bean",
  "=",
  "(",
  "NumberBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "NumberBean",
  ".",
  "class",
  ")",
  ";",
  "assertEquals",
  "(",
  "(",
  "byte",
  ")",
  "2",
  ",",
  "bean",
  ".",
  "getPbyte",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "(",
  "short",
  ")",
  "2",
  ",",
  "bean",
  ".",
  "getPshort",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "bean",
  ".",
  "getPint",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2L",
  ",",
  "bean",
  ".",
  "getPlong",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2f",
  ",",
  "bean",
  ".",
  "getPfloat",
  "(",
  ")",
  ",",
  "0f",
  ")",
  ";",
  "assertEquals",
  "(",
  "2d",
  ",",
  "bean",
  ".",
  "getPdouble",
  "(",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "BigInteger",
  "(",
  "\"2\"",
  ")",
  ",",
  "bean",
  ".",
  "getPbigint",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "BigDecimal",
  "(",
  "\"2\"",
  ")",
  ",",
  "bean",
  ".",
  "getPbigdec",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_NumberBean_2",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pbyte\"",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pshort\"",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pint\"",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"plong\"",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pfloat\"",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pdouble\"",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pbigint\"",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"pbigdec\"",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "NumberBean",
  "bean",
  "=",
  "(",
  "NumberBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "NumberBean",
  ".",
  "class",
  ")",
  ";",
  "assertEquals",
  "(",
  "(",
  "byte",
  ")",
  "2",
  ",",
  "bean",
  ".",
  "getPbyte",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "(",
  "short",
  ")",
  "2",
  ",",
  "bean",
  ".",
  "getPshort",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "bean",
  ".",
  "getPint",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2L",
  ",",
  "bean",
  ".",
  "getPlong",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2f",
  ",",
  "bean",
  ".",
  "getPfloat",
  "(",
  ")",
  ",",
  "0f",
  ")",
  ";",
  "assertEquals",
  "(",
  "2d",
  ",",
  "bean",
  ".",
  "getPdouble",
  "(",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "BigInteger",
  "(",
  "\"2\"",
  ")",
  ",",
  "bean",
  ".",
  "getPbigint",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "BigDecimal",
  "(",
  "\"2\"",
  ")",
  ",",
  "bean",
  ".",
  "getPbigdec",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_ObjectBean",
  "(",
  ")",
  "{",
  "ObjectBean",
  "bean",
  "=",
  "new",
  "ObjectBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setPbyte",
  "(",
  "Byte",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPshort",
  "(",
  "Short",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPint",
  "(",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPlong",
  "(",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPfloat",
  "(",
  "Float",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPdouble",
  "(",
  "Double",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPchar",
  "(",
  "new",
  "Character",
  "(",
  "'1'",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setPboolean",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "bean",
  ".",
  "setPstring",
  "(",
  "\"json\"",
  ")",
  ";",
  "bean",
  ".",
  "setParray",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  ",",
  "\"b\"",
  "}",
  ")",
  ";",
  "bean",
  ".",
  "setPbean",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ";",
  "List",
  "list",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "\"1\"",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "\"2\"",
  ")",
  ";",
  "bean",
  ".",
  "setPlist",
  "(",
  "list",
  ")",
  ";",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "bean",
  ".",
  "setPmap",
  "(",
  "map",
  ")",
  ";",
  "bean",
  ".",
  "setPfunction",
  "(",
  "new",
  "JSONFunction",
  "(",
  "\"this;\"",
  ")",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"pbean\"",
  ",",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "ObjectBean",
  "obj",
  "=",
  "(",
  "ObjectBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "ObjectBean",
  ".",
  "class",
  ",",
  "classMap",
  ")",
  ";",
  "assertEquals",
  "(",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ",",
  "obj",
  ".",
  "getPbyte",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ",",
  "obj",
  ".",
  "getPshort",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ",",
  "obj",
  ".",
  "getPint",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ",",
  "obj",
  ".",
  "getPlong",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "Double",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ",",
  "obj",
  ".",
  "getPfloat",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "Double",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ",",
  "obj",
  ".",
  "getPdouble",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"1\"",
  ",",
  "obj",
  ".",
  "getPchar",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "obj",
  ".",
  "getPstring",
  "(",
  ")",
  ")",
  ";",
  "List",
  "l",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "\"a\"",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "\"b\"",
  ")",
  ";",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "l",
  ".",
  "toArray",
  "(",
  ")",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "obj",
  ".",
  "getParray",
  "(",
  ")",
  ")",
  ";",
  "l",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "\"1\"",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "\"2\"",
  ")",
  ";",
  "ArrayAssertions",
  ".",
  "assertEquals",
  "(",
  "l",
  ".",
  "toArray",
  "(",
  ")",
  ",",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "obj",
  ".",
  "getPlist",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ",",
  "obj",
  ".",
  "getPbean",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "obj",
  ".",
  "getPmap",
  "(",
  ")",
  "instanceof",
  "MorphDynaBean",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_ObjectBean_empty",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "ObjectBean",
  "bean",
  "=",
  "new",
  "ObjectBean",
  "(",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"bean\"",
  ",",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "ObjectBean",
  "obj",
  "=",
  "(",
  "ObjectBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "ObjectBean",
  ".",
  "class",
  ",",
  "classMap",
  ")",
  ";",
  "String",
  "[",
  "]",
  "keys",
  "=",
  "{",
  "\"pbyte\"",
  ",",
  "\"pshort\"",
  ",",
  "\"pint\"",
  ",",
  "\"plong\"",
  ",",
  "\"pfloat\"",
  ",",
  "\"pdouble\"",
  ",",
  "\"pboolean\"",
  ",",
  "\"pchar\"",
  ",",
  "\"pstring\"",
  ",",
  "\"parray\"",
  ",",
  "\"plist\"",
  ",",
  "\"pmap\"",
  ",",
  "\"pbean\"",
  "}",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "keys",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "assertNull",
  "(",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "obj",
  ",",
  "keys",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testToBean_rootObject",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"bool\"",
  ",",
  "\"false\"",
  ")",
  ".",
  "element",
  "(",
  "\"integer\"",
  ",",
  "84",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"bean\"",
  ")",
  ";",
  "BeanA",
  "expected",
  "=",
  "new",
  "BeanA",
  "(",
  ")",
  ";",
  "BeanA",
  "actual",
  "=",
  "(",
  "BeanA",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "expected",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "actual",
  ")",
  ";",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "assertFalse",
  "(",
  "actual",
  ".",
  "isBool",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "84",
  ",",
  "actual",
  ".",
  "getInteger",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"bean\"",
  ",",
  "actual",
  ".",
  "getString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_withFilters",
  "(",
  ")",
  "{",
  "BeanA",
  "bean",
  "=",
  "new",
  "BeanA",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setBool",
  "(",
  "false",
  ")",
  ";",
  "bean",
  ".",
  "setInteger",
  "(",
  "84",
  ")",
  ";",
  "bean",
  ".",
  "setString",
  "(",
  "\"filter\"",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setJavaPropertyFilter",
  "(",
  "new",
  "BeanAPropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "BeanA",
  "actual",
  "=",
  "(",
  "BeanA",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "actual",
  ")",
  ";",
  "assertTrue",
  "(",
  "actual",
  ".",
  "isBool",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "42",
  ",",
  "actual",
  ".",
  "getInteger",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"filter\"",
  ",",
  "actual",
  ".",
  "getString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_withNonJavaIdentifier_camelCase_Strategy",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"camel",
  "case\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setJavaIdentifierTransformer",
  "(",
  "JavaIdentifierTransformer",
  ".",
  "CAMEL_CASE",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "JavaIdentifierBean",
  ".",
  "class",
  ")",
  ";",
  "JavaIdentifierBean",
  "bean",
  "=",
  "(",
  "JavaIdentifierBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "bean",
  ".",
  "getCamelCase",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_withNonJavaIdentifier_underScore_Strategy",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"under",
  "score\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setJavaIdentifierTransformer",
  "(",
  "JavaIdentifierTransformer",
  ".",
  "UNDERSCORE",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "JavaIdentifierBean",
  ".",
  "class",
  ")",
  ";",
  "JavaIdentifierBean",
  "bean",
  "=",
  "(",
  "JavaIdentifierBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "bean",
  ".",
  "getUnder_score",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_withNonJavaIdentifier_whitespace_Strategy",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setJavaIdentifierTransformer",
  "(",
  "JavaIdentifierTransformer",
  ".",
  "WHITESPACE",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "JavaIdentifierBean",
  ".",
  "class",
  ")",
  ";",
  "JavaIdentifierBean",
  "bean",
  "=",
  "(",
  "JavaIdentifierBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "bean",
  ".",
  "getWhitespace",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_withPropertySetStrategy",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"key\"",
  ",",
  "\"value\"",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "MappingBean",
  ".",
  "class",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setPropertySetStrategy",
  "(",
  "new",
  "MappingPropertySetStrategy",
  "(",
  ")",
  ")",
  ";",
  "MappingBean",
  "bean",
  "=",
  "(",
  "MappingBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"value\"",
  ",",
  "bean",
  ".",
  "getAttributes",
  "(",
  ")",
  ".",
  "get",
  "(",
  "\"key\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBeanWithJavaPropertyNameProcessor",
  "(",
  ")",
  "{",
  "String",
  "json",
  "=",
  "\"{bool:false}\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "registerJavaPropertyNameProcessor",
  "(",
  "BeanA",
  ".",
  "class",
  ",",
  "new",
  "SwapPropertyNameProcessor",
  "(",
  ")",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "BeanA",
  "bean",
  "=",
  "(",
  "BeanA",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertTrue",
  "(",
  "bean",
  ".",
  "isBool",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"false\"",
  ",",
  "bean",
  ".",
  "getString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSONArray",
  "(",
  ")",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONArray",
  "names",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "jsonObject",
  ".",
  "toJSONArray",
  "(",
  "names",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "jsonArray",
  ".",
  "getString",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "getInt",
  "(",
  "1",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonArray",
  ".",
  "getBoolean",
  "(",
  "2",
  ")",
  ")",
  ";",
  "}",
  "protected",
  "void",
  "setUp",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "}",
  "private",
  "MorphDynaBean",
  "createDynaBean",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "Map",
  "properties",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"name\"",
  ",",
  "String",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"func\"",
  ",",
  "JSONFunction",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"jsonstr\"",
  ",",
  "JSONString",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"json\"",
  ",",
  "JSON",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"str\"",
  ",",
  "String",
  ".",
  "class",
  ")",
  ";",
  "MorphDynaClass",
  "dynaClass",
  "=",
  "new",
  "MorphDynaClass",
  "(",
  "properties",
  ")",
  ";",
  "MorphDynaBean",
  "dynaBean",
  "=",
  "(",
  "MorphDynaBean",
  ")",
  "dynaClass",
  ".",
  "newInstance",
  "(",
  ")",
  ";",
  "dynaBean",
  ".",
  "setDynaBeanClass",
  "(",
  "dynaClass",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"func\"",
  ",",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"jsonstr\"",
  ",",
  "new",
  "ObjectJSONStringBean",
  "(",
  ")",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"json\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"id\"",
  ",",
  "\"1\"",
  ")",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"str\"",
  ",",
  "\"[1,2]\"",
  ")",
  ";",
  "return",
  "dynaBean",
  ";",
  "}",
  "public",
  "static",
  "class",
  "BeanAPropertyExclusionClassMatcher",
  "extends",
  "PropertyExclusionClassMatcher",
  "{",
  "public",
  "Object",
  "getMatch",
  "(",
  "Class",
  "target",
  ",",
  "Set",
  "set",
  ")",
  "{",
  "for",
  "(",
  "Iterator",
  "i",
  "=",
  "set",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "i",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Class",
  "c",
  "=",
  "(",
  "Class",
  ")",
  "i",
  ".",
  "next",
  "(",
  ")",
  ";",
  "if",
  "(",
  "BeanA",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "c",
  ")",
  ")",
  "{",
  "return",
  "c",
  ";",
  "}",
  "}",
  "return",
  "null",
  ";",
  "}",
  "}",
  "public",
  "static",
  "class",
  "BeanAPropertyFilter",
  "implements",
  "PropertyFilter",
  "{",
  "public",
  "boolean",
  "apply",
  "(",
  "Object",
  "source",
  ",",
  "String",
  "name",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "if",
  "(",
  "\"bool\"",
  ".",
  "equals",
  "(",
  "name",
  ")",
  "||",
  "\"integer\"",
  ".",
  "equals",
  "(",
  "name",
  ")",
  ")",
  "{",
  "return",
  "true",
  ";",
  "}",
  "return",
  "false",
  ";",
  "}",
  "}",
  "public",
  "static",
  "class",
  "MappingPropertySetStrategy",
  "extends",
  "PropertySetStrategy",
  "{",
  "public",
  "void",
  "setProperty",
  "(",
  "Object",
  "bean",
  ",",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ")",
  "throws",
  "JSONException",
  "{",
  "(",
  "(",
  "MappingBean",
  ")",
  "bean",
  ")",
  ".",
  "addAttribute",
  "(",
  "key",
  ",",
  "value",
  ")",
  ";",
  "}",
  "}",
  "public",
  "static",
  "class",
  "NumberDefaultValueProcessor",
  "implements",
  "DefaultValueProcessor",
  "{",
  "public",
  "static",
  "final",
  "Integer",
  "NUMBER",
  "=",
  "new",
  "Integer",
  "(",
  "42",
  ")",
  ";",
  "public",
  "Object",
  "getDefaultValue",
  "(",
  "Class",
  "type",
  ")",
  "{",
  "return",
  "NUMBER",
  ";",
  "}",
  "}",
  "public",
  "static",
  "class",
  "NumberDefaultValueProcessorMatcher",
  "extends",
  "DefaultValueProcessorMatcher",
  "{",
  "public",
  "Object",
  "getMatch",
  "(",
  "Class",
  "target",
  ",",
  "Set",
  "set",
  ")",
  "{",
  "for",
  "(",
  "Iterator",
  "i",
  "=",
  "set",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "i",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Class",
  "c",
  "=",
  "(",
  "Class",
  ")",
  "i",
  ".",
  "next",
  "(",
  ")",
  ";",
  "if",
  "(",
  "Number",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "c",
  ")",
  ")",
  "{",
  "return",
  "c",
  ";",
  "}",
  "}",
  "return",
  "null",
  ";",
  "}",
  "}",
  "public",
  "static",
  "class",
  "NumberPropertyFilter",
  "implements",
  "PropertyFilter",
  "{",
  "public",
  "boolean",
  "apply",
  "(",
  "Object",
  "source",
  ",",
  "String",
  "name",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "if",
  "(",
  "value",
  "!=",
  "null",
  "&&",
  "Number",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ")",
  "{",
  "return",
  "true",
  ";",
  "}",
  "return",
  "false",
  ";",
  "}",
  "}",
  "public",
  "static",
  "class",
  "SwapPropertyNameProcessor",
  "implements",
  "PropertyNameProcessor",
  "{",
  "public",
  "String",
  "processPropertyName",
  "(",
  "Class",
  "beanClass",
  ",",
  "String",
  "name",
  ")",
  "{",
  "if",
  "(",
  "name",
  ".",
  "equals",
  "(",
  "\"bool\"",
  ")",
  ")",
  "{",
  "return",
  "\"string\"",
  ";",
  "}",
  "return",
  "name",
  ";",
  "}",
  "}",
  "public",
  "void",
  "test_fromJSONObject",
  "(",
  ")",
  "{",
  "}",
  "public",
  "void",
  "testCanonicalWrite",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "a",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "a",
  ".",
  "add",
  "(",
  "true",
  ")",
  ";",
  "a",
  ".",
  "add",
  "(",
  "1",
  ")",
  ";",
  "a",
  ".",
  "add",
  "(",
  "5.3",
  ")",
  ";",
  "JSONObject",
  "o",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "o",
  ".",
  "put",
  "(",
  "\"key1\"",
  ",",
  "\"1\"",
  ")",
  ";",
  "o",
  ".",
  "put",
  "(",
  "\"key2\"",
  ",",
  "\"2\"",
  ")",
  ";",
  "o",
  ".",
  "put",
  "(",
  "\"key3\"",
  ",",
  "\"3\"",
  ")",
  ";",
  "o",
  ".",
  "put",
  "(",
  "\"string\"",
  ",",
  "\"\"",
  ")",
  ";",
  "a",
  ".",
  "add",
  "(",
  "o",
  ")",
  ";",
  "StringWriter",
  "sw",
  "=",
  "new",
  "StringWriter",
  "(",
  ")",
  ";",
  "a",
  ".",
  "writeCanonical",
  "(",
  "sw",
  ")",
  ";",
  "System",
  ".",
  "out",
  ".",
  "println",
  "(",
  "sw",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "sw",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,436 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "public",
  "class",
  "TestJSONArrayStaticBuilders_String",
  "extends",
  "AbstractJSONArrayStaticBuildersTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONArrayStaticBuilders_String",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONArrayStaticBuilders_String",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "Object",
  "getSource",
  "(",
  ")",
  "{",
  "return",
  "\"\"",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,437 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "filters",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "public",
  "class",
  "TestNotPropertyFilter",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestNotPropertyFilter",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestNotPropertyFilter",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply_true",
  "(",
  ")",
  "{",
  "NotPropertyFilter",
  "filter",
  "=",
  "new",
  "NotPropertyFilter",
  "(",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply_false",
  "(",
  ")",
  "{",
  "NotPropertyFilter",
  "filter",
  "=",
  "new",
  "NotPropertyFilter",
  "(",
  "new",
  "FalsePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,438 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "filters",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "public",
  "class",
  "TestCompositePropertyFilter",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestCompositePropertyFilter",
  ".",
  "class",
  ")",
  ";",
  "}",
  "private",
  "CompositePropertyFilter",
  "filter",
  ";",
  "public",
  "TestCompositePropertyFilter",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply_addFilter",
  "(",
  ")",
  "{",
  "filter",
  ".",
  "addPropertyFilter",
  "(",
  "new",
  "FalsePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "filter",
  ".",
  "addPropertyFilter",
  "(",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "protected",
  "void",
  "setUp",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "filter",
  "=",
  "new",
  "CompositePropertyFilter",
  "(",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,439 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "filters",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "PropertyFilter",
  ";",
  "public",
  "class",
  "TestOrPropertyFilter",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestOrPropertyFilter",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestOrPropertyFilter",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply_false_false",
  "(",
  ")",
  "{",
  "PropertyFilter",
  "filter",
  "=",
  "new",
  "OrPropertyFilter",
  "(",
  "new",
  "FalsePropertyFilter",
  "(",
  ")",
  ",",
  "new",
  "FalsePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply_false_true",
  "(",
  ")",
  "{",
  "PropertyFilter",
  "filter",
  "=",
  "new",
  "OrPropertyFilter",
  "(",
  "new",
  "FalsePropertyFilter",
  "(",
  ")",
  ",",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply_true_false",
  "(",
  ")",
  "{",
  "PropertyFilter",
  "filter",
  "=",
  "new",
  "OrPropertyFilter",
  "(",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ",",
  "new",
  "FalsePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply_true_true",
  "(",
  ")",
  "{",
  "PropertyFilter",
  "filter",
  "=",
  "new",
  "OrPropertyFilter",
  "(",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ",",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,440 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "filters",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "public",
  "class",
  "TestMappingPropertyFilter",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestMappingPropertyFilter",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestMappingPropertyFilter",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply",
  "(",
  ")",
  "{",
  "MappingPropertyFilter",
  "filter",
  "=",
  "new",
  "SampleMappingPropertyFilter",
  "(",
  ")",
  ";",
  "filter",
  ".",
  "addPropertyFilter",
  "(",
  "String",
  ".",
  "class",
  ",",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "filter",
  ".",
  "addPropertyFilter",
  "(",
  "Long",
  ".",
  "class",
  ",",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "\"String\"",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "new",
  "Long",
  "(",
  "1L",
  ")",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "static",
  "class",
  "SampleMappingPropertyFilter",
  "extends",
  "MappingPropertyFilter",
  "{",
  "protected",
  "boolean",
  "keyMatches",
  "(",
  "Object",
  "key",
  ",",
  "Object",
  "source",
  ",",
  "String",
  "name",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "return",
  "(",
  "(",
  "Class",
  ")",
  "key",
  ")",
  ".",
  "isAssignableFrom",
  "(",
  "source",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  "&&",
  "source",
  "instanceof",
  "Number",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,441 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "filters",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "PropertyFilter",
  ";",
  "public",
  "class",
  "TestAndPropertyFilter",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestAndPropertyFilter",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestAndPropertyFilter",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply_false_false",
  "(",
  ")",
  "{",
  "PropertyFilter",
  "filter",
  "=",
  "new",
  "AndPropertyFilter",
  "(",
  "new",
  "FalsePropertyFilter",
  "(",
  ")",
  ",",
  "new",
  "FalsePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply_false_true",
  "(",
  ")",
  "{",
  "PropertyFilter",
  "filter",
  "=",
  "new",
  "AndPropertyFilter",
  "(",
  "new",
  "FalsePropertyFilter",
  "(",
  ")",
  ",",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply_true_false",
  "(",
  ")",
  "{",
  "PropertyFilter",
  "filter",
  "=",
  "new",
  "AndPropertyFilter",
  "(",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ",",
  "new",
  "FalsePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testApply_true_true",
  "(",
  ")",
  "{",
  "PropertyFilter",
  "filter",
  "=",
  "new",
  "AndPropertyFilter",
  "(",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ",",
  "new",
  "TruePropertyFilter",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "filter",
  ".",
  "apply",
  "(",
  "null",
  ",",
  "null",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,442 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "filters",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestSuite",
  ";",
  "public",
  "class",
  "AllTests",
  "extends",
  "TestSuite",
  "{",
  "public",
  "static",
  "TestSuite",
  "suite",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "TestSuite",
  "suite",
  "=",
  "new",
  "TestSuite",
  "(",
  ")",
  ";",
  "suite",
  ".",
  "setName",
  "(",
  "\"filters\"",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestAndPropertyFilter",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestCompositePropertyFilter",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestNotPropertyFilter",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestOrPropertyFilter",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestMappingPropertyFilter",
  ".",
  "class",
  ")",
  ")",
  ";",
  "return",
  "suite",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,443 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestSuite",
  ";",
  "public",
  "class",
  "AllTests",
  "extends",
  "TestSuite",
  "{",
  "public",
  "static",
  "TestSuite",
  "suite",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "TestSuite",
  "suite",
  "=",
  "new",
  "TestSuite",
  "(",
  ")",
  ";",
  "suite",
  ".",
  "setName",
  "(",
  "\"util\"",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJavaIdentifierTransformer",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONUtils",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONTokener",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONBuilder",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONStringer",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestWebUtils",
  ".",
  "class",
  ")",
  ")",
  ";",
  "return",
  "suite",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,444 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "StringWriter",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONFunction",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONObject",
  ";",
  "public",
  "class",
  "TestJSONBuilder",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONBuilder",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONBuilder",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateArray",
  "(",
  ")",
  "{",
  "StringWriter",
  "w",
  "=",
  "new",
  "StringWriter",
  "(",
  ")",
  ";",
  "new",
  "JSONBuilder",
  "(",
  "w",
  ")",
  ".",
  "array",
  "(",
  ")",
  ".",
  "value",
  "(",
  "true",
  ")",
  ".",
  "value",
  "(",
  "1.1d",
  ")",
  ".",
  "value",
  "(",
  "2L",
  ")",
  ".",
  "value",
  "(",
  "\"text\"",
  ")",
  ".",
  "endArray",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "w",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateEmptyArray",
  "(",
  ")",
  "{",
  "StringWriter",
  "w",
  "=",
  "new",
  "StringWriter",
  "(",
  ")",
  ";",
  "new",
  "JSONBuilder",
  "(",
  "w",
  ")",
  ".",
  "array",
  "(",
  ")",
  ".",
  "endArray",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"[]\"",
  ",",
  "w",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateEmptyArrayWithNullObjects",
  "(",
  ")",
  "{",
  "StringWriter",
  "w",
  "=",
  "new",
  "StringWriter",
  "(",
  ")",
  ";",
  "new",
  "JSONBuilder",
  "(",
  "w",
  ")",
  ".",
  "array",
  "(",
  ")",
  ".",
  "value",
  "(",
  "null",
  ")",
  ".",
  "value",
  "(",
  "null",
  ")",
  ".",
  "endArray",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"[null,null]\"",
  ",",
  "w",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateEmptyObject",
  "(",
  ")",
  "{",
  "StringWriter",
  "w",
  "=",
  "new",
  "StringWriter",
  "(",
  ")",
  ";",
  "new",
  "JSONBuilder",
  "(",
  "w",
  ")",
  ".",
  "object",
  "(",
  ")",
  ".",
  "endObject",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"{}\"",
  ",",
  "w",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateFunctionArray",
  "(",
  ")",
  "{",
  "StringWriter",
  "w",
  "=",
  "new",
  "StringWriter",
  "(",
  ")",
  ";",
  "new",
  "JSONBuilder",
  "(",
  "w",
  ")",
  ".",
  "array",
  "(",
  ")",
  ".",
  "value",
  "(",
  "new",
  "JSONFunction",
  "(",
  "\"var",
  "a",
  "=",
  "1;\"",
  ")",
  ")",
  ".",
  "value",
  "(",
  "new",
  "JSONFunction",
  "(",
  "\"var",
  "b",
  "=",
  "2;\"",
  ")",
  ")",
  ".",
  "endArray",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "w",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateSimpleObject",
  "(",
  ")",
  "{",
  "StringWriter",
  "w",
  "=",
  "new",
  "StringWriter",
  "(",
  ")",
  ";",
  "new",
  "JSONBuilder",
  "(",
  "w",
  ")",
  ".",
  "object",
  "(",
  ")",
  ".",
  "key",
  "(",
  "\"bool\"",
  ")",
  ".",
  "value",
  "(",
  "true",
  ")",
  ".",
  "key",
  "(",
  "\"numDouble\"",
  ")",
  ".",
  "value",
  "(",
  "1.1d",
  ")",
  ".",
  "key",
  "(",
  "\"numInt\"",
  ")",
  ".",
  "value",
  "(",
  "2",
  ")",
  ".",
  "key",
  "(",
  "\"text\"",
  ")",
  ".",
  "value",
  "(",
  "\"text\"",
  ")",
  ".",
  "key",
  "(",
  "\"func\"",
  ")",
  ".",
  "value",
  "(",
  "new",
  "JSONFunction",
  "(",
  "\"var",
  "a",
  "=",
  "1;\"",
  ")",
  ")",
  ".",
  "endObject",
  "(",
  ")",
  ";",
  "JSONObject",
  "jsonObj",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "w",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ",",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "1.1d",
  ")",
  ",",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"numDouble\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Long",
  "(",
  "2",
  ")",
  ".",
  "longValue",
  "(",
  ")",
  ",",
  "(",
  "(",
  "Number",
  ")",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"numInt\"",
  ")",
  ")",
  ".",
  "longValue",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"text\"",
  ",",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"text\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isFunction",
  "(",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,445 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONException",
  ";",
  "public",
  "class",
  "TestJSONTokener",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONTokener",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONTokener",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testDehexchar",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "0",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'0'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'1'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'2'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "3",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'3'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "4",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'4'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "5",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'5'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "6",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'6'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "7",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'7'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "8",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'8'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "9",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'9'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "10",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'a'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "10",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'A'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "11",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'b'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "11",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'B'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "12",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'c'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "12",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'C'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "13",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'d'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "13",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'D'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "14",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'e'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "14",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'E'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "15",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'f'",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "15",
  ",",
  "JSONTokener",
  ".",
  "dehexchar",
  "(",
  "'F'",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testLength",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "0",
  ",",
  "new",
  "JSONTokener",
  "(",
  "null",
  ")",
  ".",
  "length",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "new",
  "JSONTokener",
  "(",
  "\"\"",
  ")",
  ".",
  "length",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "new",
  "JSONTokener",
  "(",
  "\"[]\"",
  ")",
  ".",
  "length",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testNextChar",
  "(",
  ")",
  "{",
  "JSONTokener",
  "tok",
  "=",
  "new",
  "JSONTokener",
  "(",
  "\"abc\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "'a'",
  ",",
  "tok",
  ".",
  "next",
  "(",
  "'a'",
  ")",
  ")",
  ";",
  "try",
  "{",
  "assertEquals",
  "(",
  "'e'",
  ",",
  "tok",
  ".",
  "next",
  "(",
  "'e'",
  ")",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testReset",
  "(",
  ")",
  "{",
  "JSONTokener",
  "tok",
  "=",
  "new",
  "JSONTokener",
  "(",
  "\"abc\"",
  ")",
  ";",
  "tok",
  ".",
  "next",
  "(",
  ")",
  ";",
  "tok",
  ".",
  "next",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "'c'",
  ",",
  "tok",
  ".",
  "next",
  "(",
  ")",
  ")",
  ";",
  "tok",
  ".",
  "reset",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "'a'",
  ",",
  "tok",
  ".",
  "next",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,446 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONArray",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONObject",
  ";",
  "public",
  "class",
  "TestWebUtils",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestWebUtils",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestWebUtils",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testProtect_comments",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"with:quotes\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "WebUtils",
  ".",
  "setWebHijackPreventionStrategy",
  "(",
  "WebHijackPreventionStrategy",
  ".",
  "COMMENTS",
  ")",
  ";",
  "String",
  "str",
  "=",
  "WebUtils",
  ".",
  "protect",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "str",
  ".",
  "compareTo",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testProtect_comments_and_shrink",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"noquotes\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "WebUtils",
  ".",
  "setWebHijackPreventionStrategy",
  "(",
  "WebHijackPreventionStrategy",
  ".",
  "COMMENTS",
  ")",
  ";",
  "String",
  "str",
  "=",
  "WebUtils",
  ".",
  "protect",
  "(",
  "jsonObject",
  ",",
  "true",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "str",
  ".",
  "compareTo",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testProtect_inifiniteLoop",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"with:quotes\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "WebUtils",
  ".",
  "setWebHijackPreventionStrategy",
  "(",
  "WebHijackPreventionStrategy",
  ".",
  "INFINITE_LOOP",
  ")",
  ";",
  "String",
  "str",
  "=",
  "WebUtils",
  ".",
  "protect",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "str",
  ".",
  "compareTo",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testProtect_inifiniteLoop_and_shrink",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"noquotes\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "WebUtils",
  ".",
  "setWebHijackPreventionStrategy",
  "(",
  "WebHijackPreventionStrategy",
  ".",
  "INFINITE_LOOP",
  ")",
  ";",
  "String",
  "str",
  "=",
  "WebUtils",
  ".",
  "protect",
  "(",
  "jsonObject",
  ",",
  "true",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "str",
  ".",
  "compareTo",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToString_array_noquotes",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"noquotes\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "jsonObject",
  ")",
  ";",
  "String",
  "str",
  "=",
  "WebUtils",
  ".",
  "toString",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "str",
  ".",
  "compareTo",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToString_array_withquotes1",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"with",
  "quotes\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "jsonObject",
  ")",
  ";",
  "String",
  "str",
  "=",
  "WebUtils",
  ".",
  "toString",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "str",
  ".",
  "compareTo",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToString_array_withquotes2",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"with:quotes\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "jsonObject",
  ")",
  ";",
  "String",
  "str",
  "=",
  "WebUtils",
  ".",
  "toString",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "str",
  ".",
  "compareTo",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToString_object_noquotes",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"noquotes\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "String",
  "str",
  "=",
  "WebUtils",
  ".",
  "toString",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "str",
  ".",
  "compareTo",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToString_object_withquotes1",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"with",
  "quotes\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "String",
  "str",
  "=",
  "WebUtils",
  ".",
  "toString",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "str",
  ".",
  "compareTo",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToString_object_withquotes2",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"with:quotes\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "String",
  "str",
  "=",
  "WebUtils",
  ".",
  "toString",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "str",
  ".",
  "compareTo",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,447 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "public",
  "class",
  "TestJavaIdentifierTransformer",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJavaIdentifierTransformer",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJavaIdentifierTransformer",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCamelCase",
  "(",
  ")",
  "{",
  "JavaIdentifierTransformer",
  "jit",
  "=",
  "JavaIdentifierTransformer",
  ".",
  "CAMEL_CASE",
  ";",
  "assertEquals",
  "(",
  "\"camelCase\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"camel",
  "case\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"camelCase\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"@camel",
  "case\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"$camelCase\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"$camel",
  "case\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"camelCase\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"camel@case\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"camelCase\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"camel",
  "@case\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"camelCase\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"camel@@case\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"camelCase\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"camel@",
  "@case\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testUnderscore",
  "(",
  ")",
  "{",
  "JavaIdentifierTransformer",
  "jit",
  "=",
  "JavaIdentifierTransformer",
  ".",
  "UNDERSCORE",
  ";",
  "assertEquals",
  "(",
  "\"under_score\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"under",
  "score\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"under_score\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"@under",
  "score\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"$under_score\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"$under",
  "score\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"under_score\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"under@score\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"under_score\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"under",
  "score\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"under_score\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"under@@score\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"under_score\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"under_score\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"under",
  "score",
  "\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWhitespace",
  "(",
  ")",
  "{",
  "JavaIdentifierTransformer",
  "jit",
  "=",
  "JavaIdentifierTransformer",
  ".",
  "WHITESPACE",
  ";",
  "assertEquals",
  "(",
  "\"whitespace\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"white",
  "space\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"whitespace\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"@white",
  "space\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"$whitespace\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"$white",
  "space\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"whitespace\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"white@space\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"whitespace\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"white@@space\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"whitespace\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"whitespace\"",
  ",",
  "jit",
  ".",
  "transformToJavaIdentifier",
  "(",
  "\"white",
  "space",
  "\"",
  ")",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,448 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONFunction",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONObject",
  ";",
  "public",
  "class",
  "TestJSONStringer",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONStringer",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONStringer",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateArray",
  "(",
  ")",
  "{",
  "JSONBuilder",
  "b",
  "=",
  "new",
  "JSONStringer",
  "(",
  ")",
  ".",
  "array",
  "(",
  ")",
  ".",
  "value",
  "(",
  "true",
  ")",
  ".",
  "value",
  "(",
  "1.1d",
  ")",
  ".",
  "value",
  "(",
  "2L",
  ")",
  ".",
  "value",
  "(",
  "\"text\"",
  ")",
  ".",
  "endArray",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "b",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateEmptyArray",
  "(",
  ")",
  "{",
  "JSONBuilder",
  "b",
  "=",
  "new",
  "JSONStringer",
  "(",
  ")",
  ".",
  "array",
  "(",
  ")",
  ".",
  "endArray",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"[]\"",
  ",",
  "b",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateEmptyArrayWithNullObjects",
  "(",
  ")",
  "{",
  "JSONBuilder",
  "b",
  "=",
  "new",
  "JSONStringer",
  "(",
  ")",
  ".",
  "array",
  "(",
  ")",
  ".",
  "value",
  "(",
  "null",
  ")",
  ".",
  "value",
  "(",
  "null",
  ")",
  ".",
  "endArray",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"[null,null]\"",
  ",",
  "b",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateEmptyObject",
  "(",
  ")",
  "{",
  "JSONBuilder",
  "b",
  "=",
  "new",
  "JSONStringer",
  "(",
  ")",
  ".",
  "object",
  "(",
  ")",
  ".",
  "endObject",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"{}\"",
  ",",
  "b",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateFunctionArray",
  "(",
  ")",
  "{",
  "JSONBuilder",
  "b",
  "=",
  "new",
  "JSONStringer",
  "(",
  ")",
  ".",
  "array",
  "(",
  ")",
  ".",
  "value",
  "(",
  "new",
  "JSONFunction",
  "(",
  "\"var",
  "a",
  "=",
  "1;\"",
  ")",
  ")",
  ".",
  "value",
  "(",
  "new",
  "JSONFunction",
  "(",
  "\"var",
  "b",
  "=",
  "2;\"",
  ")",
  ")",
  ".",
  "endArray",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "b",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCreateSimpleObject",
  "(",
  ")",
  "{",
  "JSONBuilder",
  "b",
  "=",
  "new",
  "JSONStringer",
  "(",
  ")",
  ".",
  "object",
  "(",
  ")",
  ".",
  "key",
  "(",
  "\"bool\"",
  ")",
  ".",
  "value",
  "(",
  "true",
  ")",
  ".",
  "key",
  "(",
  "\"numDouble\"",
  ")",
  ".",
  "value",
  "(",
  "1.1d",
  ")",
  ".",
  "key",
  "(",
  "\"numInt\"",
  ")",
  ".",
  "value",
  "(",
  "2",
  ")",
  ".",
  "key",
  "(",
  "\"text\"",
  ")",
  ".",
  "value",
  "(",
  "\"text\"",
  ")",
  ".",
  "key",
  "(",
  "\"func\"",
  ")",
  ".",
  "value",
  "(",
  "new",
  "JSONFunction",
  "(",
  "\"var",
  "a",
  "=",
  "1;\"",
  ")",
  ")",
  ".",
  "endObject",
  "(",
  ")",
  ";",
  "JSONObject",
  "jsonObj",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "b",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ",",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "1.1d",
  ")",
  ",",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"numDouble\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "Long",
  "(",
  "2",
  ")",
  ".",
  "longValue",
  "(",
  ")",
  ",",
  "(",
  "(",
  "Number",
  ")",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"numInt\"",
  ")",
  ")",
  ".",
  "longValue",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"text\"",
  ",",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"text\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isFunction",
  "(",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "jsonObj",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,449 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Collections",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONArray",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONException",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONFunction",
  ";",
  "public",
  "class",
  "TestJSONUtils",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONUtils",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONUtils",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testDoubleToString_infinite",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"null\"",
  ",",
  "JSONUtils",
  ".",
  "doubleToString",
  "(",
  "Double",
  ".",
  "POSITIVE_INFINITY",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testDoubleToString_nan",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"null\"",
  ",",
  "JSONUtils",
  ".",
  "doubleToString",
  "(",
  "Double",
  ".",
  "NaN",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testDoubleToString_trailingZeros",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"200\"",
  ",",
  "JSONUtils",
  ".",
  "doubleToString",
  "(",
  "200.00000",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetFunctionParams",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "JSONUtils",
  ".",
  "getFunctionParams",
  "(",
  "\"function()\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"a\"",
  ",",
  "JSONUtils",
  ".",
  "getFunctionParams",
  "(",
  "\"function(a)\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"a,b\"",
  ",",
  "JSONUtils",
  ".",
  "getFunctionParams",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "JSONUtils",
  ".",
  "getFunctionParams",
  "(",
  "\"notAFunction\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testIsArray",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "Object",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "boolean",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "byte",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "char",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "short",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "int",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "long",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "float",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "double",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "Object",
  "[",
  "0",
  "]",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "boolean",
  "[",
  "0",
  "]",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "byte",
  "[",
  "0",
  "]",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "char",
  "[",
  "0",
  "]",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "short",
  "[",
  "0",
  "]",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "int",
  "[",
  "0",
  "]",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "long",
  "[",
  "0",
  "]",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "float",
  "[",
  "0",
  "]",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "double",
  "[",
  "0",
  "]",
  "[",
  "0",
  "]",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "Collections",
  ".",
  "EMPTY_SET",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "Collections",
  ".",
  "EMPTY_LIST",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testIsFunction",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isFunction",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isFunction",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isFunction",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isFunction",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONUtils",
  ".",
  "isFunction",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testNumberToString_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONUtils",
  ".",
  "numberToString",
  "(",
  "null",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testQuote_emptyString",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"\\\"\\\"\"",
  ",",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testQuote_escapeChars",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"\\\"\\\\b\\\\t\\\\n\\\\r\\\\f\\\"\"",
  ",",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "\"\btnr",
  "\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testQuote_jsonFunction",
  "(",
  ")",
  "{",
  "JSONFunction",
  "jsonFunction",
  "=",
  "new",
  "JSONFunction",
  "(",
  "\"a\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "jsonFunction",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testQuote_nullString",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"\\\"\\\"\"",
  ",",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testStripQuotes_singleChar_doubleeQuote",
  "(",
  ")",
  "{",
  "String",
  "quoted",
  "=",
  "\"\\\"\"",
  ";",
  "String",
  "actual",
  "=",
  "JSONUtils",
  ".",
  "stripQuotes",
  "(",
  "quoted",
  ")",
  ";",
  "assertEquals",
  "(",
  "quoted",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testStripQuotes_singleChar_singleQuote",
  "(",
  ")",
  "{",
  "String",
  "quoted",
  "=",
  "\"'\"",
  ";",
  "String",
  "actual",
  "=",
  "JSONUtils",
  ".",
  "stripQuotes",
  "(",
  "quoted",
  ")",
  ";",
  "assertEquals",
  "(",
  "quoted",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testStripQuotes_twoChars_doubleeQuote",
  "(",
  ")",
  "{",
  "String",
  "quoted",
  "=",
  "\"\\\"\\\"\"",
  ";",
  "String",
  "actual",
  "=",
  "JSONUtils",
  ".",
  "stripQuotes",
  "(",
  "quoted",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testStripQuotes_twoChars_singleQuote",
  "(",
  ")",
  "{",
  "String",
  "quoted",
  "=",
  "\"''\"",
  ";",
  "String",
  "actual",
  "=",
  "JSONUtils",
  ".",
  "stripQuotes",
  "(",
  "quoted",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testValidity_inifiniteDouble",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONUtils",
  ".",
  "testValidity",
  "(",
  "new",
  "Double",
  "(",
  "Double",
  ".",
  "POSITIVE_INFINITY",
  ")",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testValidity_inifiniteFloat",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONUtils",
  ".",
  "testValidity",
  "(",
  "new",
  "Float",
  "(",
  "Float",
  ".",
  "POSITIVE_INFINITY",
  ")",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testValidity_nanDouble",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONUtils",
  ".",
  "testValidity",
  "(",
  "new",
  "Double",
  "(",
  "Double",
  ".",
  "NaN",
  ")",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testValidity_nanFloat",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONUtils",
  ".",
  "testValidity",
  "(",
  "new",
  "Float",
  "(",
  "Float",
  ".",
  "NaN",
  ")",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,450 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JSONTokener",
  ";",
  "public",
  "class",
  "TestJSONObjectStaticBuilders_JSONTokener",
  "extends",
  "AbstractJSONObjectStaticBuildersTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONObjectStaticBuilders_JSONTokener",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONObjectStaticBuilders_JSONTokener",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "Object",
  "getSource",
  "(",
  ")",
  "{",
  "return",
  "new",
  "JSONTokener",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,451 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestSuite",
  ";",
  "public",
  "class",
  "JSONTestSuite",
  "extends",
  "TestSuite",
  "{",
  "public",
  "static",
  "TestSuite",
  "suite",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "TestSuite",
  "suite",
  "=",
  "new",
  "TestSuite",
  "(",
  ")",
  ";",
  "suite",
  ".",
  "setName",
  "(",
  "\"json-lib\"",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "AllTests",
  ".",
  "suite",
  "(",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "regexp",
  ".",
  "AllTests",
  ".",
  "suite",
  "(",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "filters",
  ".",
  "AllTests",
  ".",
  "suite",
  "(",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "processors",
  ".",
  "AllTests",
  ".",
  "suite",
  "(",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "AllTests",
  ".",
  "suite",
  "(",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "xml",
  ".",
  "AllTests",
  ".",
  "suite",
  "(",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "test",
  ".",
  "AllTests",
  ".",
  "suite",
  "(",
  ")",
  ")",
  ";",
  "return",
  "suite",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,452 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ArrayJSONStringBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanA",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "MappingBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ObjectJSONStringBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ValueBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JSONTokener",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "DynaBean",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "PropertyUtils",
  ";",
  "public",
  "class",
  "TestJSONSerializer",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONSerializer",
  ".",
  "class",
  ")",
  ";",
  "}",
  "private",
  "JsonConfig",
  "jsonConfig",
  ";",
  "public",
  "TestJSONSerializer",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJava_JSONArray_1",
  "(",
  ")",
  "{",
  "setName",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[]\"",
  ")",
  ";",
  "Object",
  "java",
  "=",
  "JSONSerializer",
  ".",
  "toJava",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertNotNull",
  "(",
  "java",
  ")",
  ";",
  "assertTrue",
  "(",
  "java",
  "instanceof",
  "List",
  ")",
  ";",
  "List",
  "list",
  "=",
  "(",
  "List",
  ")",
  "java",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "list",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJava_JSONArray_2",
  "(",
  ")",
  "{",
  "setName",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[]\"",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setArrayMode",
  "(",
  "JsonConfig",
  ".",
  "MODE_OBJECT_ARRAY",
  ")",
  ";",
  "Object",
  "java",
  "=",
  "JSONSerializer",
  ".",
  "toJava",
  "(",
  "jsonArray",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "java",
  ")",
  ";",
  "assertTrue",
  "(",
  "Object",
  "[",
  "]",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "java",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ")",
  ";",
  "Object",
  "[",
  "]",
  "array",
  "=",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "java",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "array",
  ".",
  "length",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJava_JSONNull_1",
  "(",
  ")",
  "{",
  "setName",
  "(",
  "\"\"",
  ")",
  ";",
  "Object",
  "java",
  "=",
  "JSONSerializer",
  ".",
  "toJava",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "assertNull",
  "(",
  "java",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJava_JSONObject_1",
  "(",
  ")",
  "{",
  "setName",
  "(",
  "\"\"",
  ")",
  ";",
  "Object",
  "java",
  "=",
  "JSONSerializer",
  ".",
  "toJava",
  "(",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ")",
  ";",
  "assertNull",
  "(",
  "java",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJava_JSONObject_2",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "setName",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "Object",
  "bean",
  "=",
  "JSONSerializer",
  ".",
  "toJava",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertTrue",
  "(",
  "bean",
  "instanceof",
  "DynaBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"name\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"name\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"bool\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"int\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"int\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"double\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"double\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"func\"",
  ")",
  ")",
  ";",
  "List",
  "expected",
  "=",
  "(",
  "List",
  ")",
  "JSONArray",
  ".",
  "toCollection",
  "(",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"array\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "(",
  "List",
  ")",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"array\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJava_JSONObject_3",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "setName",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "Object",
  "java",
  "=",
  "JSONSerializer",
  ".",
  "toJava",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "java",
  ")",
  ";",
  "assertTrue",
  "(",
  "java",
  "instanceof",
  "BeanA",
  ")",
  ";",
  "BeanA",
  "bean",
  "=",
  "(",
  "BeanA",
  ")",
  "java",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"bool\"",
  ")",
  ",",
  "Boolean",
  ".",
  "valueOf",
  "(",
  "bean",
  ".",
  "isBool",
  "(",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"integer\"",
  ")",
  ",",
  "new",
  "Integer",
  "(",
  "bean",
  ".",
  "getInteger",
  "(",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"string\"",
  ")",
  ",",
  "bean",
  ".",
  "getString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJava_JSONObject_4",
  "(",
  ")",
  "{",
  "setName",
  "(",
  "\"\"",
  ")",
  ";",
  "MappingBean",
  "mappingBean",
  "=",
  "new",
  "MappingBean",
  "(",
  ")",
  ";",
  "ValueBean",
  "beanA",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanA",
  ".",
  "setValue",
  "(",
  "90000",
  ")",
  ";",
  "ValueBean",
  "beanB",
  "=",
  "new",
  "ValueBean",
  "(",
  ")",
  ";",
  "beanB",
  ".",
  "setValue",
  "(",
  "91000",
  ")",
  ";",
  "mappingBean",
  ".",
  "addAttribute",
  "(",
  "\"beanA\"",
  ",",
  "beanA",
  ")",
  ";",
  "mappingBean",
  ".",
  "addAttribute",
  "(",
  "\"beanB\"",
  ",",
  "beanB",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"bean.*\"",
  ",",
  "ValueBean",
  ".",
  "class",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "mappingBean",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "MappingBean",
  ".",
  "class",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "Object",
  "java",
  "=",
  "JSONSerializer",
  ".",
  "toJava",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "java",
  ")",
  ";",
  "assertTrue",
  "(",
  "java",
  "instanceof",
  "MappingBean",
  ")",
  ";",
  "MappingBean",
  "mappingBean2",
  "=",
  "(",
  "MappingBean",
  ")",
  "java",
  ";",
  "Object",
  "ba",
  "=",
  "mappingBean2",
  ".",
  "getAttributes",
  "(",
  ")",
  ".",
  "get",
  "(",
  "\"beanA\"",
  ")",
  ";",
  "Object",
  "bb",
  "=",
  "mappingBean2",
  ".",
  "getAttributes",
  "(",
  ")",
  ".",
  "get",
  "(",
  "\"beanB\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "ba",
  "instanceof",
  "ValueBean",
  ")",
  ";",
  "assertTrue",
  "(",
  "bb",
  "instanceof",
  "ValueBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "beanA",
  ".",
  "getValue",
  "(",
  ")",
  ",",
  "(",
  "(",
  "ValueBean",
  ")",
  "ba",
  ")",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "beanB",
  ".",
  "getValue",
  "(",
  ")",
  ",",
  "(",
  "(",
  "ValueBean",
  ")",
  "bb",
  ")",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJava_JSONObject_and_reset",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "Object",
  "java",
  "=",
  "JSONSerializer",
  ".",
  "toJava",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "java",
  ")",
  ";",
  "assertTrue",
  "(",
  "java",
  "instanceof",
  "BeanA",
  ")",
  ";",
  "BeanA",
  "bean",
  "=",
  "(",
  "BeanA",
  ")",
  "java",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"bool\"",
  ")",
  ",",
  "Boolean",
  ".",
  "valueOf",
  "(",
  "bean",
  ".",
  "isBool",
  "(",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"integer\"",
  ")",
  ",",
  "new",
  "Integer",
  "(",
  "bean",
  ".",
  "getInteger",
  "(",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"string\"",
  ")",
  ",",
  "bean",
  ".",
  "getString",
  "(",
  ")",
  ")",
  ";",
  "jsonConfig",
  ".",
  "reset",
  "(",
  ")",
  ";",
  "java",
  "=",
  "JSONSerializer",
  ".",
  "toJava",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "java",
  "instanceof",
  "DynaBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"bool\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "java",
  ",",
  "\"bool\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"integer\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "java",
  ",",
  "\"integer\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"string\"",
  ")",
  ",",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "java",
  ",",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSON_JSONString_array",
  "(",
  ")",
  "{",
  "ArrayJSONStringBean",
  "bean",
  "=",
  "new",
  "ArrayJSONStringBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setValue",
  "(",
  "\"\"",
  ")",
  ";",
  "JSON",
  "json",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  "instanceof",
  "JSONArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ",",
  "(",
  "JSONArray",
  ")",
  "json",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSON_JSONString_null",
  "(",
  ")",
  "{",
  "JSON",
  "json",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "(",
  "JSONString",
  ")",
  "null",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "json",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSON_JSONString_object",
  "(",
  ")",
  "{",
  "ObjectJSONStringBean",
  "bean",
  "=",
  "new",
  "ObjectJSONStringBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setName",
  "(",
  "\"json\"",
  ")",
  ";",
  "JSON",
  "json",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  "instanceof",
  "JSONObject",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ",",
  "(",
  "JSONObject",
  ")",
  "json",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSON_Object_array",
  "(",
  ")",
  "{",
  "JSON",
  "json",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  "}",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  "instanceof",
  "JSONArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2]\"",
  ")",
  ",",
  "(",
  "JSONArray",
  ")",
  "json",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSON_Object_JSONTokener_array",
  "(",
  ")",
  "{",
  "JSON",
  "json",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "new",
  "JSONTokener",
  "(",
  "\"[1,2]\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  "instanceof",
  "JSONArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2]\"",
  ")",
  ",",
  "(",
  "JSONArray",
  ")",
  "json",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSON_Object_null",
  "(",
  ")",
  "{",
  "JSON",
  "json",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "(",
  "Object",
  ")",
  "null",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "json",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSON_Object_object",
  "(",
  ")",
  "{",
  "JSON",
  "json",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  "instanceof",
  "JSONObject",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ",",
  "(",
  "JSONObject",
  ")",
  "json",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSON_String_array",
  "(",
  ")",
  "{",
  "JSON",
  "json",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "\"\"",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  "instanceof",
  "JSONArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ",",
  "(",
  "JSONArray",
  ")",
  "json",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSON_String_invalid",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "\"garbage\"",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testToJSON_String_null",
  "(",
  ")",
  "{",
  "JSON",
  "json",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "(",
  "String",
  ")",
  "null",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "json",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSON_String_null_literal",
  "(",
  ")",
  "{",
  "JSON",
  "json",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "\"null\"",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "json",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSON_String_object",
  "(",
  ")",
  "{",
  "JSON",
  "json",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "\"\"",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  "instanceof",
  "JSONObject",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ",",
  "(",
  "JSONObject",
  ")",
  "json",
  ")",
  ";",
  "}",
  "protected",
  "void",
  "setUp",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,453 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "public",
  "class",
  "TestJSONArrayAsJSON",
  "extends",
  "AbstractJSONTest",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONArrayAsJSON",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONArrayAsJSON",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "int",
  "getIndent",
  "(",
  ")",
  "{",
  "return",
  "2",
  ";",
  "}",
  "protected",
  "int",
  "getIndentFactor",
  "(",
  ")",
  "{",
  "return",
  "2",
  ";",
  "}",
  "protected",
  "Object",
  "[",
  "]",
  "getIsArrayExpectations",
  "(",
  ")",
  "{",
  "return",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "Boolean",
  ".",
  "TRUE",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  "}",
  ";",
  "}",
  "protected",
  "Object",
  "[",
  "]",
  "getToStringExpectations1",
  "(",
  ")",
  "{",
  "return",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "\"\"",
  ",",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  "}",
  ";",
  "}",
  "protected",
  "Object",
  "[",
  "]",
  "getToStringExpectations2",
  "(",
  ")",
  "{",
  "return",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "\"[n\"",
  "+",
  "\"",
  "1,n\"",
  "+",
  "\"",
  "true,n\"",
  "+",
  "\"",
  "\\\"json\\\"n\"",
  "+",
  "\"]\"",
  ",",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  "}",
  ";",
  "}",
  "protected",
  "Object",
  "[",
  "]",
  "getToStringExpectations3",
  "(",
  ")",
  "{",
  "return",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "\"",
  "[n\"",
  "+",
  "\"",
  "1,n\"",
  "+",
  "\"",
  "true,n\"",
  "+",
  "\"",
  "\\\"json\\\"n\"",
  "+",
  "\"",
  "]\"",
  ",",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  "}",
  ";",
  "}",
  "protected",
  "Object",
  "[",
  "]",
  "getWriteExpectations",
  "(",
  ")",
  "{",
  "return",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "\"\"",
  ",",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  "}",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,454 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "test",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "AssertionFailedError",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSON",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONArray",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONFunction",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONNull",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONObject",
  ";",
  "public",
  "class",
  "TestJSONAssert",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONAssert",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONAssert",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testArrayWithNullsShouldFail",
  "(",
  ")",
  "{",
  "JSONArray",
  "one",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "one",
  ".",
  "element",
  "(",
  "\"hello\"",
  ")",
  ";",
  "one",
  ".",
  "element",
  "(",
  "(",
  "Object",
  ")",
  "null",
  ")",
  ";",
  "one",
  ".",
  "element",
  "(",
  "\"world\"",
  ")",
  ";",
  "JSONArray",
  "two",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "two",
  ".",
  "element",
  "(",
  "\"hello\"",
  ")",
  ";",
  "two",
  ".",
  "element",
  "(",
  "(",
  "Object",
  ")",
  "null",
  ")",
  ";",
  "two",
  ".",
  "element",
  "(",
  "\"world!\"",
  ")",
  ";",
  "try",
  "{",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "one",
  ",",
  "two",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertTrue",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ".",
  "startsWith",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testArrayWithNullsShouldPass",
  "(",
  ")",
  "{",
  "JSONArray",
  "one",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "one",
  ".",
  "element",
  "(",
  "\"hello\"",
  ")",
  ";",
  "one",
  ".",
  "element",
  "(",
  "(",
  "Object",
  ")",
  "null",
  ")",
  ";",
  "one",
  ".",
  "element",
  "(",
  "\"world\"",
  ")",
  ";",
  "JSONArray",
  "two",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "two",
  ".",
  "element",
  "(",
  "\"hello\"",
  ")",
  ";",
  "two",
  ".",
  "element",
  "(",
  "(",
  "Object",
  ")",
  "null",
  ")",
  ";",
  "two",
  ".",
  "element",
  "(",
  "\"world\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "one",
  ",",
  "two",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testAssertEquals_JSON_JSON__actual_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "null",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSON_JSON__expected_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSON",
  "actual",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "null",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSON_JSON__JSONArray_JSONArray",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSON_JSON__JSONArray_JSONObject",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSON_JSON__JSONNull_JSONArray",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSON",
  "expected",
  "=",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSON_JSON__JSONNull_JSONNull",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSON",
  "expected",
  "=",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSON_JSON__JSONObject_JSONArray",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSON",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSON_JSON__JSONObject_JSONObject",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSON",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONArray_JSONArray",
  "(",
  ")",
  "{",
  "Object",
  "[",
  "]",
  "values",
  "=",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "Boolean",
  ".",
  "valueOf",
  "(",
  "true",
  ")",
  ",",
  "new",
  "Integer",
  "(",
  "Integer",
  ".",
  "MAX_VALUE",
  ")",
  ",",
  "new",
  "Long",
  "(",
  "Long",
  ".",
  "MAX_VALUE",
  ")",
  ",",
  "new",
  "Float",
  "(",
  "Float",
  ".",
  "MAX_VALUE",
  ")",
  ",",
  "new",
  "Double",
  "(",
  "Double",
  ".",
  "MAX_VALUE",
  ")",
  ",",
  "\"json\"",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  ",",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"str\"",
  ",",
  "\"json\"",
  ")",
  ",",
  "\"\"",
  ",",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "that;\"",
  ")",
  ",",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  "}",
  "}",
  ";",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "values",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "values",
  ")",
  ";",
  "try",
  "{",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONArray_JSONArray__actual_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "(",
  "JSONArray",
  ")",
  "null",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONArray_JSONArray__different_length",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONArray_JSONArray__expected_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "(",
  "JSONArray",
  ")",
  "null",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONArray_JSONArray__nulls",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "try",
  "{",
  "JSONArray",
  "expected",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1]\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONArray_String",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "String",
  "actual",
  "=",
  "\"[1,2,3]\"",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONArray_String_fail",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "String",
  "actual",
  "=",
  "\"{1,2,3}\"",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONFunction_String",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONFunction",
  "expected",
  "=",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ";",
  "String",
  "actual",
  "=",
  "\"\"",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONFunction_String__actual_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONFunction",
  "expected",
  "=",
  "new",
  "JSONFunction",
  "(",
  "\";\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "(",
  "String",
  ")",
  "null",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONFunction_String__expected_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "(",
  "JSONFunction",
  ")",
  "null",
  ",",
  "\";\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONFunction_String_fail",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONFunction",
  "expected",
  "=",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ";",
  "String",
  "actual",
  "=",
  "\"\"",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONNull_String",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONNull",
  "expected",
  "=",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ";",
  "String",
  "actual",
  "=",
  "\"null\"",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONNull_String__actual_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONNull",
  "expected",
  "=",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "(",
  "String",
  ")",
  "null",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONNull_String__expected_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "(",
  "JSONNull",
  ")",
  "null",
  ",",
  "\"null\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONObject_JSONObject_",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "[",
  "]",
  "names",
  "=",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"b\"",
  ",",
  "\"i\"",
  ",",
  "\"l\"",
  ",",
  "\"f\"",
  ",",
  "\"d\"",
  ",",
  "\"s\"",
  ",",
  "\"a1\"",
  ",",
  "\"o1\"",
  ",",
  "\"o2\"",
  ",",
  "\"o3\"",
  ",",
  "\"u1\"",
  ",",
  "\"u2\"",
  "}",
  ";",
  "Object",
  "[",
  "]",
  "values",
  "=",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "Boolean",
  ".",
  "valueOf",
  "(",
  "true",
  ")",
  ",",
  "new",
  "Integer",
  "(",
  "Integer",
  ".",
  "MAX_VALUE",
  ")",
  ",",
  "new",
  "Long",
  "(",
  "Long",
  ".",
  "MAX_VALUE",
  ")",
  ",",
  "new",
  "Float",
  "(",
  "Float",
  ".",
  "MAX_VALUE",
  ")",
  ",",
  "new",
  "Double",
  "(",
  "Double",
  ".",
  "MAX_VALUE",
  ")",
  ",",
  "\"json\"",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  ",",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"str\"",
  ",",
  "\"json\"",
  ")",
  ",",
  "\"\"",
  ",",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "that;\"",
  ")",
  "}",
  ";",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "names",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "map",
  ".",
  "put",
  "(",
  "names",
  "[",
  "i",
  "]",
  ",",
  "values",
  "[",
  "i",
  "]",
  ")",
  ";",
  "}",
  "JSONObject",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "map",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "map",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONObject_JSONObject__actual_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"{}\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "(",
  "JSONObject",
  ")",
  "null",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONObject_JSONObject__expected_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  "actual",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"{}\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "(",
  "JSONObject",
  ")",
  "null",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONObject_JSONObject_missingExpectedNamesAreGivenInErrorMessage",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"foo\"",
  ",",
  "\"fooValue\"",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONObject_JSONObject_unexpectedNamesAreGivenInErrorMessage",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"foo\"",
  ",",
  "\"fooValue\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONObject_JSONObject_missingExpectedAnUnexpectedNamesAreBothGivenInErrorMessage",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"foo\"",
  ",",
  "\"fooValue\"",
  ")",
  ".",
  "element",
  "(",
  "\"baz\"",
  ",",
  "\"bazValue\"",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"bar\"",
  ",",
  "\"barValue\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONObject_JSONObject_nullObjects",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONObject_JSONObject_nullObjects_fail1",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONObject_JSONObject_nullObjects_fail2",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONObject_String",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "actual",
  "=",
  "\"\"",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_JSONObject_String_fail",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "actual",
  "=",
  "\"[1,2,3]\"",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_String_JSONArray",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "expected",
  "=",
  "\"[1,2,3]\"",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_String_JSONArray_fail",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "expected",
  "=",
  "\"{1,2,3}\"",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_String_JSONFunction",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "JSONFunction",
  "actual",
  "=",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_String_JSONFunction_fail",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONFunction",
  "actual",
  "=",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_String_JSONNull",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "expected",
  "=",
  "\"null\"",
  ";",
  "JSONNull",
  "actual",
  "=",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_String_JSONObject",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "actual",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertEquals_String_JSONObject_fail",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "expected",
  "=",
  "\"[1,2,3]\"",
  ";",
  "JSONObject",
  "actual",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertJsonEquals_garbage_json",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "expected",
  "=",
  "\"garbage\"",
  ";",
  "String",
  "actual",
  "=",
  "\"null\"",
  ";",
  "JSONAssert",
  ".",
  "assertJsonEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertJsonEquals_json_garbage",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "expected",
  "=",
  "\"null\"",
  ";",
  "String",
  "actual",
  "=",
  "\"garbage\"",
  ";",
  "JSONAssert",
  ".",
  "assertJsonEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "assertEquals",
  "(",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertJsonEquals_jsonArray_jsonArray",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "expected",
  "=",
  "\"[1,2,3]\"",
  ";",
  "String",
  "actual",
  "=",
  "\"[1,2,3]\"",
  ";",
  "JSONAssert",
  ".",
  "assertJsonEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertJsonEquals_jsonNull_jsonNull",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "expected",
  "=",
  "\"null\"",
  ";",
  "String",
  "actual",
  "=",
  "\"null\"",
  ";",
  "JSONAssert",
  ".",
  "assertJsonEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertJsonEquals_jsonObject_jsonObject",
  "(",
  ")",
  "{",
  "try",
  "{",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "actual",
  "=",
  "\"\"",
  ";",
  "JSONAssert",
  ".",
  "assertJsonEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertNotNull_JSONNull",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONAssert",
  ".",
  "assertNotNull",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "if",
  "(",
  "!",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "\"\"",
  ")",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "}",
  "public",
  "void",
  "testAssertNotNull_jsonObject_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONAssert",
  ".",
  "assertNotNull",
  "(",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "if",
  "(",
  "!",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "\"\"",
  ")",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "}",
  "public",
  "void",
  "testAssertNotNull_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONAssert",
  ".",
  "assertNotNull",
  "(",
  "null",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "if",
  "(",
  "!",
  "e",
  ".",
  "getMessage",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "\"\"",
  ")",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "}",
  "public",
  "void",
  "testAssertNull_JSONNull",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONAssert",
  ".",
  "assertNull",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertNull_jsonObject_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONAssert",
  ".",
  "assertNull",
  "(",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testAssertNull_null",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONAssert",
  ".",
  "assertNull",
  "(",
  "null",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "AssertionFailedError",
  "e",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,455 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "test",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestSuite",
  ";",
  "public",
  "class",
  "AllTests",
  "extends",
  "TestSuite",
  "{",
  "public",
  "static",
  "TestSuite",
  "suite",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "TestSuite",
  "suite",
  "=",
  "new",
  "TestSuite",
  "(",
  ")",
  ";",
  "suite",
  ".",
  "setName",
  "(",
  "\"test\"",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONAssert",
  ".",
  "class",
  ")",
  ")",
  ";",
  "return",
  "suite",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,456 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "public",
  "class",
  "TestJSONObjectStaticBuilders_JSONObject",
  "extends",
  "AbstractJSONObjectStaticBuildersTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONObjectStaticBuilders_JSONObject",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONObjectStaticBuilders_JSONObject",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "Object",
  "getSource",
  "(",
  ")",
  "{",
  "String",
  "[",
  "]",
  "props",
  "=",
  "getProperties",
  "(",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "try",
  "{",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "props",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "jsonObject",
  ".",
  "element",
  "(",
  "props",
  "[",
  "i",
  "]",
  ",",
  "PropertyConstants",
  ".",
  "getPropertyValue",
  "(",
  "props",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"class\"",
  ",",
  "Object",
  ".",
  "class",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"pexcluded\"",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "RuntimeException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "return",
  "jsonObject",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,457 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ObjectBean",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "PropertyUtils",
  ";",
  "public",
  "class",
  "TestJSONObjectStaticBuilders_ObjectBean",
  "extends",
  "AbstractJSONObjectStaticBuildersTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONObjectStaticBuilders_ObjectBean",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONObjectStaticBuilders_ObjectBean",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "Object",
  "getSource",
  "(",
  ")",
  "{",
  "ObjectBean",
  "bean",
  "=",
  "new",
  "ObjectBean",
  "(",
  ")",
  ";",
  "String",
  "[",
  "]",
  "props",
  "=",
  "getProperties",
  "(",
  ")",
  ";",
  "try",
  "{",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "props",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "PropertyUtils",
  ".",
  "setProperty",
  "(",
  "bean",
  ",",
  "props",
  "[",
  "i",
  "]",
  ",",
  "PropertyConstants",
  ".",
  "getPropertyValue",
  "(",
  "props",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "RuntimeException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "return",
  "bean",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,458 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaClass",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanA",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "JsonEventAdpater",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "PropertyBean",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "DynaBean",
  ";",
  "public",
  "class",
  "TestJSONObjectEvents",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONObjectEvents",
  ".",
  "class",
  ")",
  ";",
  "}",
  "private",
  "JsonConfig",
  "jsonConfig",
  ";",
  "private",
  "JsonEventAdpater",
  "jsonEventAdpater",
  ";",
  "public",
  "TestJSONObjectEvents",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_bean",
  "(",
  ")",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertEvents",
  "(",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_bean2",
  "(",
  ")",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "PropertyBean",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getError",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonEventAdpater",
  ".",
  "getWarning",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getArrayStart",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getArrayEnd",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonEventAdpater",
  ".",
  "getObjectStart",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonEventAdpater",
  ".",
  "getObjectEnd",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getElementAdded",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonEventAdpater",
  ".",
  "getPropertySet",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_dynaBean",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "createDynaBean",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertEvents",
  "(",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_error",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"[]\"",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonEventAdpater",
  ".",
  "getError",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getWarning",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getArrayStart",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getArrayEnd",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getObjectStart",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getObjectEnd",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getElementAdded",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getPropertySet",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testFromObject_JSONObject",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "element",
  "(",
  "\"func\"",
  ",",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "\"int\"",
  ",",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertEvents",
  "(",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_map",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"func\"",
  ",",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"int\"",
  ",",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "map",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertEvents",
  "(",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_string",
  "(",
  ")",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertEvents",
  "(",
  ")",
  ";",
  "}",
  "protected",
  "void",
  "setUp",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "jsonEventAdpater",
  "=",
  "new",
  "JsonEventAdpater",
  "(",
  ")",
  ";",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "addJsonEventListener",
  "(",
  "jsonEventAdpater",
  ")",
  ";",
  "jsonConfig",
  ".",
  "enableEventTriggering",
  "(",
  ")",
  ";",
  "}",
  "protected",
  "void",
  "tearDown",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "jsonEventAdpater",
  ".",
  "reset",
  "(",
  ")",
  ";",
  "}",
  "private",
  "void",
  "assertEvents",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getError",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getWarning",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getArrayStart",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getArrayEnd",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonEventAdpater",
  ".",
  "getObjectStart",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonEventAdpater",
  ".",
  "getObjectEnd",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonEventAdpater",
  ".",
  "getElementAdded",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "3",
  ",",
  "jsonEventAdpater",
  ".",
  "getPropertySet",
  "(",
  ")",
  ")",
  ";",
  "}",
  "private",
  "DynaBean",
  "createDynaBean",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "Map",
  "properties",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"name\"",
  ",",
  "String",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"func\"",
  ",",
  "JSONFunction",
  ".",
  "class",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"int\"",
  ",",
  "Integer",
  ".",
  "class",
  ")",
  ";",
  "MorphDynaClass",
  "dynaClass",
  "=",
  "new",
  "MorphDynaClass",
  "(",
  "properties",
  ")",
  ";",
  "MorphDynaBean",
  "dynaBean",
  "=",
  "(",
  "MorphDynaBean",
  ")",
  "dynaClass",
  ".",
  "newInstance",
  "(",
  ")",
  ";",
  "dynaBean",
  ".",
  "setDynaBeanClass",
  "(",
  "dynaClass",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"func\"",
  ",",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"int\"",
  ",",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "return",
  "dynaBean",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,459 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "public",
  "abstract",
  "class",
  "AbstractJSONObjectStaticBuildersTestCase",
  "extends",
  "TestCase",
  "{",
  "public",
  "AbstractJSONObjectStaticBuildersTestCase",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "getSource",
  "(",
  ")",
  ")",
  ";",
  "assertJSONObject",
  "(",
  "json",
  ",",
  "getProperties",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_excludes",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setExcludes",
  "(",
  "getExclusions",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "getSource",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertJSONObject",
  "(",
  "json",
  ",",
  "getProperties",
  "(",
  ")",
  ")",
  ";",
  "String",
  "[",
  "]",
  "excluded",
  "=",
  "getExclusions",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "excluded",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "excluded",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pexcluded\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_excludes_ignoreDefaults",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setExcludes",
  "(",
  "getExclusions",
  "(",
  ")",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setIgnoreDefaultExcludes",
  "(",
  "true",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "getSource",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertJSONObject",
  "(",
  "json",
  ",",
  "getProperties",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"class\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "!",
  "json",
  ".",
  "has",
  "(",
  "\"pexcluded\"",
  ")",
  ")",
  ";",
  "}",
  "protected",
  "String",
  "[",
  "]",
  "getExclusions",
  "(",
  ")",
  "{",
  "return",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"pexcluded\"",
  "}",
  ";",
  "}",
  "protected",
  "String",
  "[",
  "]",
  "getProperties",
  "(",
  ")",
  "{",
  "return",
  "PropertyConstants",
  ".",
  "getProperties",
  "(",
  ")",
  ";",
  "}",
  "protected",
  "abstract",
  "Object",
  "getSource",
  "(",
  ")",
  ";",
  "private",
  "void",
  "assertJSONObject",
  "(",
  "JSONObject",
  "json",
  ",",
  "String",
  "[",
  "]",
  "properties",
  ")",
  "{",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "properties",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "assertTrue",
  "(",
  "json",
  ".",
  "has",
  "(",
  "properties",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,460 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "public",
  "class",
  "TestJSONObjectAsMap",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONObjectAsMap",
  ".",
  "class",
  ")",
  ";",
  "}",
  "private",
  "JSONObject",
  "jsonObject",
  ";",
  "public",
  "TestJSONObjectAsMap",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testClear",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "6",
  ",",
  "jsonObject",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "jsonObject",
  ".",
  "clear",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonObject",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testContainsKey",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"func\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"bogus\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testContainsValue",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "containsValue",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testIsEmpty",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "jsonObject",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testPut",
  "(",
  ")",
  "{",
  "String",
  "key",
  "=",
  "\"key\"",
  ";",
  "Object",
  "value",
  "=",
  "\"value\"",
  ";",
  "jsonObject",
  ".",
  "put",
  "(",
  "key",
  ",",
  "value",
  ")",
  ";",
  "assertEquals",
  "(",
  "value",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "key",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testPutAll",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"key\"",
  ",",
  "\"value\"",
  ")",
  ";",
  "json",
  ".",
  "putAll",
  "(",
  "map",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "json",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"value\"",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"key\"",
  ")",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"key\"",
  ",",
  "\"value2\"",
  ")",
  ";",
  "json",
  ".",
  "putAll",
  "(",
  "map",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "json",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"value2\"",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"key\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testRemove",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "has",
  "(",
  "\"func\"",
  ")",
  ")",
  ";",
  "jsonObject",
  ".",
  "remove",
  "(",
  "\"func\"",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonObject",
  ".",
  "has",
  "(",
  "\"func\"",
  ")",
  ")",
  ";",
  "}",
  "protected",
  "void",
  "setUp",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"int\"",
  ",",
  "\"1\"",
  ")",
  ".",
  "element",
  "(",
  "\"long\"",
  ",",
  "\"1\"",
  ")",
  ".",
  "element",
  "(",
  "\"boolean\"",
  ",",
  "\"true\"",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"string\"",
  ")",
  ".",
  "element",
  "(",
  "\"func\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"array\"",
  ",",
  "\"[1,2,3]\"",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,461 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "public",
  "class",
  "TestJSONNullAsJSON",
  "extends",
  "AbstractJSONTest",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONNullAsJSON",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONNullAsJSON",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "int",
  "getIndent",
  "(",
  ")",
  "{",
  "return",
  "2",
  ";",
  "}",
  "protected",
  "int",
  "getIndentFactor",
  "(",
  ")",
  "{",
  "return",
  "2",
  ";",
  "}",
  "protected",
  "Object",
  "[",
  "]",
  "getIsArrayExpectations",
  "(",
  ")",
  "{",
  "return",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "Boolean",
  ".",
  "FALSE",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  "}",
  ";",
  "}",
  "protected",
  "Object",
  "[",
  "]",
  "getToStringExpectations1",
  "(",
  ")",
  "{",
  "return",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "\"null\"",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  "}",
  ";",
  "}",
  "protected",
  "Object",
  "[",
  "]",
  "getToStringExpectations2",
  "(",
  ")",
  "{",
  "return",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "\"null\"",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  "}",
  ";",
  "}",
  "protected",
  "Object",
  "[",
  "]",
  "getToStringExpectations3",
  "(",
  ")",
  "{",
  "return",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "\"",
  "null\"",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  "}",
  ";",
  "}",
  "protected",
  "Object",
  "[",
  "]",
  "getWriteExpectations",
  "(",
  ")",
  "{",
  "return",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "\"null\"",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  "}",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,462 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "PrimitiveBean",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "PropertyUtils",
  ";",
  "public",
  "class",
  "TestJSONObjectStaticBuilders_PrimitiveBean",
  "extends",
  "AbstractJSONObjectStaticBuildersTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONObjectStaticBuilders_PrimitiveBean",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONObjectStaticBuilders_PrimitiveBean",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "Object",
  "getSource",
  "(",
  ")",
  "{",
  "PrimitiveBean",
  "bean",
  "=",
  "new",
  "PrimitiveBean",
  "(",
  ")",
  ";",
  "String",
  "[",
  "]",
  "props",
  "=",
  "getProperties",
  "(",
  ")",
  ";",
  "try",
  "{",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "props",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "PropertyUtils",
  ".",
  "setProperty",
  "(",
  "bean",
  ",",
  "props",
  "[",
  "i",
  "]",
  ",",
  "PropertyConstants",
  ".",
  "getPropertyValue",
  "(",
  "props",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "RuntimeException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "return",
  "bean",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,463 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "xml",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "Assertions",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSON",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONArray",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONNull",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONObject",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "test",
  ".",
  "JSONAssert",
  ";",
  "public",
  "class",
  "TestXMLSerializer_reads",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestXMLSerializer_reads",
  ".",
  "class",
  ")",
  ";",
  "}",
  "private",
  "XMLSerializer",
  "xmlSerializer",
  ";",
  "public",
  "TestXMLSerializer_reads",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testNullObjectArray",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testNullObjectArray_noTypeHintsCompatibility",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsCompatibility",
  "(",
  "false",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testRead_nullObject",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"<o/>\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testRead_nullObject_2",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testRead_nullObject_2_noTypeHintsCompatibility",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsCompatibility",
  "(",
  "false",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testRead_nullObject_3",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testRead_nullObject_3_noTypeHintsCompatibility",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsCompatibility",
  "(",
  "false",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testRead_nullObject_4",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testRead_nullObject_4_noTypeHintsCompatibility",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsCompatibility",
  "(",
  "false",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testRead_nullObject_5",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testRead_nullObject_5_noTypeHintsCompatibility",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsCompatibility",
  "(",
  "false",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadArray_forceTopLevelObject",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"<a>json</a>\"",
  ";",
  "xmlSerializer",
  ".",
  "setForceTopLevelObject",
  "(",
  "true",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"a\"",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"json\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadArray_withText",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"<a>json</a>\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"json\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadBooleanArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[true,false]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadBooleanArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[true,false]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadFloatArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadFloatArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadFunctionObject",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadFunctionObject_noTypeHintsCompatibility",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsCompatibility",
  "(",
  "false",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadFunctionObject_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadFunctionObject_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadIntegerArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadIntegerArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMixedArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMixedArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiBooleanArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiBooleanArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiFloatArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiFloatArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiIntegerArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiIntegerArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiMixedArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiMixedArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiNumberArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiNumberArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiStringArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadMultiStringArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadNestedObject",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "actual",
  "=",
  "(",
  "JSONObject",
  ")",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadNumberArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1.1,2.2,3]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadNumberArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1.1,2.2,3]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadObject_withAttributes",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"@string\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "element",
  "(",
  "\"@number\"",
  ",",
  "\"1\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadObject_withAttributes_noTypeHintsEnabled",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsEnabled",
  "(",
  "false",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"@class\"",
  ",",
  "\"Java.class\"",
  ")",
  ".",
  "element",
  "(",
  "\"@type\"",
  ",",
  "\"object\"",
  ")",
  ".",
  "element",
  "(",
  "\"@string\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "element",
  "(",
  "\"@number\"",
  ",",
  "\"1\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadObject_withAttributes_noTypeHintsEnabled_noTypeHintsCompatibility",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsEnabled",
  "(",
  "false",
  ")",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsCompatibility",
  "(",
  "false",
  ")",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"@json_class\"",
  ",",
  "\"Java.class\"",
  ")",
  ".",
  "element",
  "(",
  "\"@json_type\"",
  ",",
  "\"object\"",
  ")",
  ".",
  "element",
  "(",
  "\"@string\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "element",
  "(",
  "\"@number\"",
  ",",
  "\"1\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadObject_withText",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "element",
  "(",
  "\"#text\"",
  ",",
  "\"first\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadObject_withText_2",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "element",
  "(",
  "\"#text\"",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"first\"",
  ")",
  ".",
  "element",
  "(",
  "\"second\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadObjectFullTypes",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  ";",
  "JSONObject",
  "actual",
  "=",
  "(",
  "JSONObject",
  ")",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"int\"",
  ",",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"decimal\"",
  ",",
  "new",
  "Double",
  "(",
  "2.0",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"number\"",
  ",",
  "new",
  "Double",
  "(",
  "3.1416",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"bool\"",
  ",",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "expected",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadSimpleObject_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "actual",
  "=",
  "(",
  "JSONObject",
  ")",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadStringArray_withDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadStringArray_withoutDefaultType",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadWithNamespace_array",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns:ns\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"ns:string\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "accumulate",
  "(",
  "\"ns:string\"",
  ",",
  "\"1\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadWithNamespace_object",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  ";",
  "JSON",
  "actual",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns:ns\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"ns:string\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "element",
  "(",
  "\"ns:number\"",
  ",",
  "\"1\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testRemoveNameSpacePrefixFromElements",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "xmlSerializer",
  ".",
  "setRemoveNamespacePrefixFromElements",
  "(",
  "true",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "(",
  "JSONObject",
  ")",
  "xmlSerializer",
  ".",
  "readFromFile",
  "(",
  "\"\"",
  ")",
  ";",
  "assertFalse",
  "(",
  "json",
  ".",
  "getJSONObject",
  "(",
  "\"item\"",
  ")",
  ".",
  "has",
  "(",
  "\"@rdf:about\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "getJSONObject",
  "(",
  "\"item\"",
  ")",
  ".",
  "has",
  "(",
  "\"@about\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testSkipNamespaces",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "xmlSerializer",
  ".",
  "setSkipNamespaces",
  "(",
  "true",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "(",
  "JSONObject",
  ")",
  "xmlSerializer",
  ".",
  "readFromFile",
  "(",
  "\"\"",
  ")",
  ";",
  "assertFalse",
  "(",
  "json",
  ".",
  "getJSONObject",
  "(",
  "\"item\"",
  ")",
  ".",
  "has",
  "(",
  "\"@xmlns\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testTrimSpaces",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "json",
  "=",
  "(",
  "JSONObject",
  ")",
  "xmlSerializer",
  ".",
  "readFromFile",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "link",
  "=",
  "json",
  ".",
  "getJSONObject",
  "(",
  "\"item\"",
  ")",
  ".",
  "getString",
  "(",
  "\"link\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "link",
  ".",
  "startsWith",
  "(",
  "\"",
  "\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "link",
  ".",
  "endsWith",
  "(",
  "\"",
  "\"",
  ")",
  ")",
  ";",
  "xmlSerializer",
  ".",
  "setTrimSpaces",
  "(",
  "true",
  ")",
  ";",
  "json",
  "=",
  "(",
  "JSONObject",
  ")",
  "xmlSerializer",
  ".",
  "readFromFile",
  "(",
  "\"\"",
  ")",
  ";",
  "link",
  "=",
  "json",
  ".",
  "getJSONObject",
  "(",
  "\"item\"",
  ")",
  ".",
  "getString",
  "(",
  "\"link\"",
  ")",
  ";",
  "assertFalse",
  "(",
  "link",
  ".",
  "startsWith",
  "(",
  "\"",
  "\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "link",
  ".",
  "endsWith",
  "(",
  "\"",
  "\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testXmlConversionRules",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"</a>\"",
  "+",
  "\"</span>\"",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsCompatibility",
  "(",
  "false",
  ")",
  ";",
  "xmlSerializer",
  ".",
  "setForceTopLevelObject",
  "(",
  "true",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "(",
  "JSONObject",
  ")",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "assertNotNull",
  "(",
  "actual",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"span\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"@class\"",
  ",",
  "\"vevent\"",
  ")",
  ".",
  "element",
  "(",
  "\"a\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"@class\"",
  ",",
  "\"url\"",
  ")",
  ".",
  "element",
  "(",
  "\"@href\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"span\"",
  ",",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "\"abbr\"",
  ",",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ")",
  ".",
  "accumulate",
  "(",
  "\"abbr\"",
  ",",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ")",
  ".",
  "accumulate",
  "(",
  "\"span\"",
  ",",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ")",
  ")",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "protected",
  "void",
  "setUp",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "super",
  ".",
  "setUp",
  "(",
  ")",
  ";",
  "xmlSerializer",
  "=",
  "new",
  "XMLSerializer",
  "(",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,464 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "xml",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "Assertions",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSON",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONObject",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONSerializer",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "test",
  ".",
  "JSONAssert",
  ";",
  "public",
  "class",
  "TestUserSubmitted",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestUserSubmitted",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestUserSubmitted",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadFromXMLToJSON_1735732",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "XMLSerializer",
  "xmlSerializer",
  "=",
  "new",
  "XMLSerializer",
  "(",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "(",
  "JSONObject",
  ")",
  "xmlSerializer",
  ".",
  "readFromFile",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns:ns2\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"item\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"age\"",
  ",",
  "\"2",
  "5\"",
  ")",
  ".",
  "element",
  "(",
  "\"name\"",
  ",",
  "\"emp1\"",
  ")",
  ")",
  ".",
  "accumulate",
  "(",
  "\"item\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"age\"",
  ",",
  "\"2\"",
  ")",
  ".",
  "element",
  "(",
  "\"name\"",
  ",",
  "\"emp2\"",
  ")",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testReadFromXMLToJSON_1739066",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "XMLSerializer",
  "xmlSerializer",
  "=",
  "new",
  "XMLSerializer",
  "(",
  ")",
  ";",
  "xmlSerializer",
  ".",
  "setTrimSpaces",
  "(",
  "true",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "(",
  "JSONObject",
  ")",
  "xmlSerializer",
  ".",
  "readFromFile",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"Address\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"Metadata\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns:tns\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns:ns3\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"#text\"",
  ",",
  "\"\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "\"\"",
  ",",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"\"",
  ",",
  "\"GreetMePort\"",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns:tns\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns:ns3\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"#text\"",
  ",",
  "\"\"",
  ")",
  ")",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testIgnoreWhitespaceWhileReading",
  "(",
  ")",
  "{",
  "String",
  "xml",
  "=",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"<RESPONSE>n\"",
  "+",
  "\"<FEATURES>n\"",
  "+",
  "\"<FEATURE>n\"",
  "+",
  "\"\"",
  "+",
  "\"<FIELDS>n\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"</FIELDS>n\"",
  "+",
  "\"</FEATURE>n\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"</FEATURES>n\"",
  "+",
  "\"</RESPONSE>n\"",
  "+",
  "\"</ARCXML>n\"",
  ";",
  "XMLSerializer",
  "xmlSerializer",
  "=",
  "new",
  "XMLSerializer",
  "(",
  ")",
  ";",
  "xmlSerializer",
  ".",
  "setSkipWhitespace",
  "(",
  "true",
  ")",
  ";",
  "JSON",
  "json1",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "xml",
  "=",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"<RESPONSE>\"",
  "+",
  "\"<FEATURES>\"",
  "+",
  "\"<FEATURE>\"",
  "+",
  "\"\"",
  "+",
  "\"<FIELDS>\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"</FIELDS>\"",
  "+",
  "\"</FEATURE>\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"</FEATURES>\"",
  "+",
  "\"</RESPONSE>\"",
  "+",
  "\"</ARCXML>\"",
  ";",
  "JSON",
  "json2",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "json2",
  ",",
  "json1",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testXMLRoundtrip",
  "(",
  ")",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "json1",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "XMLSerializer",
  "xmlSerializer",
  "=",
  "new",
  "XMLSerializer",
  "(",
  ")",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "json1",
  ")",
  ";",
  "JSONObject",
  "json2",
  "=",
  "(",
  "JSONObject",
  ")",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "xml",
  ")",
  ";",
  "JSONAssert",
  ".",
  "assertEquals",
  "(",
  "json1",
  ",",
  "json2",
  ")",
  ";",
  "assertTrue",
  "(",
  "json1",
  ".",
  "getJSONArray",
  "(",
  "\"entries\"",
  ")",
  ".",
  "getJSONObject",
  "(",
  "0",
  ")",
  ".",
  "get",
  "(",
  "\"id\"",
  ")",
  "instanceof",
  "Integer",
  ")",
  ";",
  "assertTrue",
  "(",
  "json2",
  ".",
  "getJSONArray",
  "(",
  "\"entries\"",
  ")",
  ".",
  "getJSONObject",
  "(",
  "0",
  ")",
  ".",
  "get",
  "(",
  "\"id\"",
  ")",
  "instanceof",
  "Integer",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testXMLWithArraySingleElement",
  "(",
  ")",
  "{",
  "String",
  "testXML",
  "=",
  "\"",
  "<rate>\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"",
  "</rate>\"",
  ";",
  "JSON",
  "expected",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONObject",
  "actual",
  "=",
  "convertXML",
  "(",
  "testXML",
  ")",
  ";",
  "assertNotNull",
  "(",
  "actual",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "private",
  "JSONObject",
  "convertXML",
  "(",
  "String",
  "testXML",
  ")",
  "{",
  "XMLSerializer",
  "xmlSerializer",
  "=",
  "new",
  "XMLSerializer",
  "(",
  ")",
  ";",
  "xmlSerializer",
  ".",
  "setSkipWhitespace",
  "(",
  "true",
  ")",
  ";",
  "xmlSerializer",
  ".",
  "setArrayName",
  "(",
  "\"rate\"",
  ")",
  ";",
  "xmlSerializer",
  ".",
  "setForceTopLevelObject",
  "(",
  "true",
  ")",
  ";",
  "JSON",
  "jsonElement",
  "=",
  "xmlSerializer",
  ".",
  "read",
  "(",
  "testXML",
  ")",
  ";",
  "return",
  "(",
  "JSONObject",
  ")",
  "jsonElement",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,465 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "xml",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONArray",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONNull",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONObject",
  ";",
  "import",
  "org",
  ".",
  "custommonkey",
  ".",
  "xmlunit",
  ".",
  "XMLTestCase",
  ";",
  "public",
  "class",
  "TestXMLSerializer_writes",
  "extends",
  "XMLTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestXMLSerializer_writes",
  ".",
  "class",
  ")",
  ";",
  "}",
  "private",
  "XMLSerializer",
  "xmlSerializer",
  ";",
  "public",
  "TestXMLSerializer_writes",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWrite_null",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "null",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteBooleanArray",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[true,false]\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteEmptyObject",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"<o/>\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteFunctionArray",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteFunctionArray_noTypeHintsCompatibility",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsCompatibility",
  "(",
  "false",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteJSONArray_collapseProperties",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"duplicated\"",
  ",",
  "\"json1\"",
  ")",
  ";",
  "jsonObject",
  ".",
  "accumulate",
  "(",
  "\"duplicated\"",
  ",",
  "\"json2\"",
  ")",
  ";",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"duplicated\"",
  ")",
  ".",
  "setExpandElements",
  "(",
  "true",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "jsonObject",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setExpandableProperties",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"duplicated\"",
  "}",
  ")",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteJSONNull",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteJSONNull_encoding",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "\"ISO-8859-1\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "xml",
  ".",
  "startsWith",
  "(",
  "expected",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteJSONObject_collapseProperties",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"duplicated\"",
  ",",
  "\"json1\"",
  ")",
  ";",
  "jsonObject",
  ".",
  "accumulate",
  "(",
  "\"duplicated\"",
  ",",
  "\"json2\"",
  ")",
  ";",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"duplicated\"",
  ")",
  ".",
  "setExpandElements",
  "(",
  "true",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setExpandableProperties",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"duplicated\"",
  "}",
  ")",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteMultiBooleanArray",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteMultiNumberArray",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteMultiStringArray",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteNestedNullObject",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteNullObject",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteNullObject_noTypeHintsCompatibility",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsCompatibility",
  "(",
  "false",
  ")",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteNullObjectArray",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteNullObjectArray_noTypeHintsCompatibility",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setTypeHintsCompatibility",
  "(",
  "false",
  ")",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteNumberArray",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1.1,2]\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteObject",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteObject_full_types",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"</o>\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteObject_withAttributes",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"@name\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteObject_withNamespacePrefix",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setNamespaceLenient",
  "(",
  "true",
  ")",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertTrue",
  "(",
  "xml",
  ".",
  "trim",
  "(",
  ")",
  ".",
  "endsWith",
  "(",
  "expected",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteObject_withNamespaces",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  "+",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setNamespace",
  "(",
  "null",
  ",",
  "\"\"",
  ")",
  ";",
  "xmlSerializer",
  ".",
  "addNamespace",
  "(",
  "\"ns\"",
  ",",
  "\"\"",
  ")",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteObject_withNamespaces_element",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  "+",
  "\"\"",
  ";",
  "xmlSerializer",
  ".",
  "setNamespace",
  "(",
  "null",
  ",",
  "\"\"",
  ",",
  "\"ns:name\"",
  ")",
  ";",
  "xmlSerializer",
  ".",
  "addNamespace",
  "(",
  "\"ns\"",
  ",",
  "\"\"",
  ",",
  "\"ns:name\"",
  ")",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteObject_withText",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"#text\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteObject_withText_2",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"#text\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteObjectArray",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteStringArray",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"['1','2']\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonArray",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWriteWithNamespace",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"@xmlns:ns\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"ns:string\"",
  ",",
  "\"json\"",
  ")",
  ".",
  "element",
  "(",
  "\"ns:number\"",
  ",",
  "\"1\"",
  ")",
  ";",
  "String",
  "expected",
  "=",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  ";",
  "String",
  "xml",
  "=",
  "xmlSerializer",
  ".",
  "write",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertXMLEqual",
  "(",
  "expected",
  ",",
  "xml",
  ")",
  ";",
  "}",
  "protected",
  "void",
  "setUp",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "super",
  ".",
  "setUp",
  "(",
  ")",
  ";",
  "xmlSerializer",
  "=",
  "new",
  "XMLSerializer",
  "(",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,466 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "xml",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestSuite",
  ";",
  "public",
  "class",
  "AllTests",
  "extends",
  "TestSuite",
  "{",
  "public",
  "static",
  "TestSuite",
  "suite",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "TestSuite",
  "suite",
  "=",
  "new",
  "TestSuite",
  "(",
  ")",
  ";",
  "suite",
  ".",
  "setName",
  "(",
  "\"xml\"",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestXMLSerializer_reads",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestXMLSerializer_writes",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestUserSubmitted",
  ".",
  "class",
  ")",
  ")",
  ";",
  "return",
  "suite",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,467 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "StringWriter",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "IOException",
  ";",
  "import",
  "java",
  ".",
  "math",
  ".",
  "BigDecimal",
  ";",
  "import",
  "java",
  ".",
  "math",
  ".",
  "BigInteger",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "MorphUtils",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaClass",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ArrayJSONStringBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanA",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JSONTokener",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "DynaBean",
  ";",
  "public",
  "class",
  "TestJSONArray",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONArray",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONArray",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testDiscard",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"1\"",
  ")",
  ".",
  "element",
  "(",
  "\"true\"",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ")",
  ".",
  "element",
  "(",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "5",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "jsonArray",
  ".",
  "discard",
  "(",
  "\"string\"",
  ")",
  ".",
  "discard",
  "(",
  "0",
  ")",
  ";",
  "assertEquals",
  "(",
  "3",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonArray",
  ".",
  "contains",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonArray",
  ".",
  "contains",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Collection",
  "(",
  ")",
  "{",
  "List",
  "l",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "\"string\"",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "Object",
  ".",
  "class",
  ")",
  ";",
  "testJSONArray",
  "(",
  "l",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Collection_JSONArray",
  "(",
  ")",
  "{",
  "List",
  "l",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  "}",
  ")",
  ")",
  ";",
  "testJSONArray",
  "(",
  "l",
  ",",
  "\"[[1,2]]\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Collection_JSONFunction",
  "(",
  ")",
  "{",
  "List",
  "l",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "a;\"",
  ")",
  ")",
  ";",
  "testJSONArray",
  "(",
  "l",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Collection_JSONString",
  "(",
  ")",
  "{",
  "ArrayJSONStringBean",
  "bean",
  "=",
  "new",
  "ArrayJSONStringBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setValue",
  "(",
  "\"\"",
  ")",
  ";",
  "List",
  "l",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "bean",
  ")",
  ";",
  "testJSONArray",
  "(",
  "l",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Collection_nulls",
  "(",
  ")",
  "{",
  "List",
  "l",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "null",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "null",
  ")",
  ";",
  "testJSONArray",
  "(",
  "l",
  ",",
  "\"[null,null]\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_func",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"'\"",
  "+",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "a;\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  "+",
  "\"'\"",
  "}",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"\"",
  "}",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_func2",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"\\\"\"",
  "+",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "a;\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  "+",
  "\"\\\"\"",
  "}",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"\"",
  "}",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_JSONArray",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2]\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_JSONTokener_functions",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "new",
  "JSONTokener",
  "(",
  "\"\"",
  ")",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_JSONTokener_nulls",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "new",
  "JSONTokener",
  "(",
  "\"[,,]\"",
  ")",
  ",",
  "\"[null,null]\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_JSONTokener_syntax_errors",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[\\\"json\\\",1]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "\"json\"",
  ",",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  "}",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array_Array",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[[1,2]]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  "}",
  "}",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array_BigDecimal",
  "(",
  ")",
  "{",
  "Number",
  "[",
  "]",
  "numberArray",
  "=",
  "new",
  "Number",
  "[",
  "]",
  "{",
  "BigDecimal",
  ".",
  "valueOf",
  "(",
  "10000000000L",
  ",",
  "10",
  ")",
  ",",
  "new",
  "BigDecimal",
  "(",
  "\"-1.0\"",
  ")",
  ",",
  "new",
  "BigDecimal",
  "(",
  "\"99.99E-1\"",
  ")",
  "}",
  ";",
  "assertEquals",
  "(",
  "\"1.0000000000\"",
  ",",
  "numberArray",
  "[",
  "0",
  "]",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"-1.0\"",
  ",",
  "numberArray",
  "[",
  "1",
  "]",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"9.999\"",
  ",",
  "numberArray",
  "[",
  "2",
  "]",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonNumArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "numberArray",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"1.0000000000\"",
  ",",
  "jsonNumArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"-1.0\"",
  ",",
  "jsonNumArray",
  ".",
  "get",
  "(",
  "1",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"9.999\"",
  ",",
  "jsonNumArray",
  ".",
  "get",
  "(",
  "2",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array_BigInteger",
  "(",
  ")",
  "{",
  "Number",
  "[",
  "]",
  "numberArray",
  "=",
  "new",
  "Number",
  "[",
  "]",
  "{",
  "new",
  "BigInteger",
  "(",
  "\"\"",
  ")",
  ",",
  "new",
  "BigInteger",
  "(",
  "\"\"",
  ")",
  "}",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "numberArray",
  "[",
  "0",
  "]",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "numberArray",
  "[",
  "1",
  "]",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonNumArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "numberArray",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "jsonNumArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "jsonNumArray",
  ".",
  "get",
  "(",
  "1",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array_Class",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "Object",
  ".",
  "class",
  "}",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array_functions",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "JSONFunction",
  "[",
  "]",
  "{",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "a;\"",
  ")",
  "}",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array_functions_2",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "JSONFunction",
  "[",
  "]",
  "{",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "a;\"",
  ")",
  "}",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array_functions_3",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "JSONFunction",
  "[",
  "]",
  "{",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "a;\"",
  ")",
  "}",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"\"",
  "}",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array_JSONArray",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[[1,2]]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2]\"",
  ")",
  "}",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array_JSONString",
  "(",
  ")",
  "{",
  "ArrayJSONStringBean",
  "bean",
  "=",
  "new",
  "ArrayJSONStringBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setValue",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "bean",
  "}",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array_nulls",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "null",
  ",",
  "null",
  "}",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_boolean",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "new",
  "boolean",
  "[",
  "]",
  "{",
  "true",
  ",",
  "false",
  "}",
  ",",
  "\"[true,false]\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_byte",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "new",
  "byte",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "\"[1,2,3]\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_char",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "new",
  "char",
  "[",
  "]",
  "{",
  "'a'",
  ",",
  "'b'",
  ",",
  "'c'",
  "}",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_double",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "new",
  "double",
  "[",
  "]",
  "{",
  "1.1",
  ",",
  "2.2",
  ",",
  "3.3",
  "}",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_double_Infinity",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "double",
  "[",
  "]",
  "{",
  "Double",
  ".",
  "NEGATIVE_INFINITY",
  "}",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "try",
  "{",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "double",
  "[",
  "]",
  "{",
  "Double",
  ".",
  "POSITIVE_INFINITY",
  "}",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_double_NaNs",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "double",
  "[",
  "]",
  "{",
  "Double",
  ".",
  "NaN",
  "}",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_float",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "new",
  "float",
  "[",
  "]",
  "{",
  "1.1f",
  ",",
  "2.2f",
  ",",
  "3.3f",
  "}",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_float_Infinity",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "float",
  "[",
  "]",
  "{",
  "Float",
  ".",
  "NEGATIVE_INFINITY",
  "}",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "try",
  "{",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "float",
  "[",
  "]",
  "{",
  "Float",
  ".",
  "POSITIVE_INFINITY",
  "}",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_float_NaNs",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "float",
  "[",
  "]",
  "{",
  "Float",
  ".",
  "NaN",
  "}",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_int",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "\"[1,2,3]\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_long",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "new",
  "long",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "\"[1,2,3]\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_primitive_array_short",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "new",
  "short",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "\"[1,2,3]\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_String_functions",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "\"\"",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_String_functions_multi",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "\"\"",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCycleDetection_arrays",
  "(",
  ")",
  "{",
  "Object",
  "[",
  "]",
  "array1",
  "=",
  "new",
  "Object",
  "[",
  "2",
  "]",
  ";",
  "Object",
  "[",
  "]",
  "array2",
  "=",
  "new",
  "Object",
  "[",
  "2",
  "]",
  ";",
  "array1",
  "[",
  "0",
  "]",
  "=",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ";",
  "array1",
  "[",
  "1",
  "]",
  "=",
  "array2",
  ";",
  "array2",
  "[",
  "0",
  "]",
  "=",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ";",
  "array2",
  "[",
  "1",
  "]",
  "=",
  "array1",
  ";",
  "try",
  "{",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "array1",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "assertTrue",
  "(",
  "expected",
  ".",
  "getMessage",
  "(",
  ")",
  ".",
  "endsWith",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testElement_Array",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "int",
  "[",
  "]",
  "ints",
  "=",
  "{",
  "1",
  ",",
  "2",
  "}",
  ";",
  "array",
  ".",
  "element",
  "(",
  "ints",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "ints",
  ")",
  ",",
  "array",
  ".",
  "getJSONArray",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_boolean",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "true",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonArray",
  ".",
  "getBoolean",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Boolean",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "array",
  ".",
  "getBoolean",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Collection",
  "(",
  ")",
  "{",
  "List",
  "l",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "\"string\"",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "l",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ",",
  "jsonArray",
  ".",
  "getJSONArray",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_double",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "2.0d",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2.0d",
  ",",
  "jsonArray",
  ".",
  "getDouble",
  "(",
  "0",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_Array",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  ";",
  "int",
  "[",
  "]",
  "ints",
  "=",
  "{",
  "0",
  ",",
  "2",
  "}",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "ints",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "ints",
  ")",
  ",",
  "array",
  ".",
  "getJSONArray",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_Boolean",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "array",
  ".",
  "getBoolean",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_Class",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "Object",
  ".",
  "class",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "array",
  ".",
  "getString",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_JSON",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "array",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_JSONFunction",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "JSONFunction",
  "f",
  "=",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "f",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "f",
  ",",
  "(",
  "JSONFunction",
  ")",
  "array",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_JSONString",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "ArrayJSONStringBean",
  "bean",
  "=",
  "new",
  "ArrayJSONStringBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setValue",
  "(",
  "\"\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "bean",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ",",
  "array",
  ".",
  "getJSONArray",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_JSONTokener",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "JSONTokener",
  "tok",
  "=",
  "new",
  "JSONTokener",
  "(",
  "\"[0,2]\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "tok",
  ")",
  ";",
  "tok",
  ".",
  "reset",
  "(",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "tok",
  ")",
  ",",
  "array",
  ".",
  "getJSONArray",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_Number",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "new",
  "Double",
  "(",
  "2",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "2",
  ")",
  ".",
  "doubleValue",
  "(",
  ")",
  ",",
  "array",
  ".",
  "getDouble",
  "(",
  "0",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_Object",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ",",
  "array",
  ".",
  "getJSONObject",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_String",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "\"json\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "array",
  ".",
  "getString",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_String_JSON",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "\"[]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "array",
  ".",
  "getString",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_0_String_null",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "(",
  "String",
  ")",
  "null",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "array",
  ".",
  "getString",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_Array",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "int",
  "[",
  "]",
  "ints",
  "=",
  "{",
  "1",
  ",",
  "2",
  "}",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "ints",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "ints",
  ")",
  ",",
  "array",
  ".",
  "getJSONArray",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_boolean",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "1",
  ",",
  "true",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonArray",
  ".",
  "getBoolean",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_Boolean",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "Assertions",
  ".",
  "assertTrue",
  "(",
  "array",
  ".",
  "getBoolean",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_Class",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "Object",
  ".",
  "class",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "array",
  ".",
  "getString",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_Collection",
  "(",
  ")",
  "{",
  "List",
  "l",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "\"string\"",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "1",
  ",",
  "l",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ",",
  "jsonArray",
  ".",
  "getJSONArray",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_double",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "1",
  ",",
  "2.0d",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2.0d",
  ",",
  "jsonArray",
  ".",
  "getDouble",
  "(",
  "1",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_int",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "1",
  ",",
  "1",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "getInt",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_JSON",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "array",
  ".",
  "get",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_JSONFunction",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "JSONFunction",
  "f",
  "=",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "f",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "f",
  ",",
  "(",
  "JSONFunction",
  ")",
  "array",
  ".",
  "get",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_JSONString",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "ArrayJSONStringBean",
  "bean",
  "=",
  "new",
  "ArrayJSONStringBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setValue",
  "(",
  "\"\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "bean",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ",",
  "array",
  ".",
  "getJSONArray",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_JSONTokener",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "JSONTokener",
  "tok",
  "=",
  "new",
  "JSONTokener",
  "(",
  "\"[1,2]\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "tok",
  ")",
  ";",
  "tok",
  ".",
  "reset",
  "(",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "tok",
  ")",
  ",",
  "array",
  ".",
  "getJSONArray",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_long",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "1",
  ",",
  "1L",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1L",
  ",",
  "jsonArray",
  ".",
  "getLong",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_Map",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "1",
  ",",
  "map",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "map",
  ")",
  ",",
  "jsonArray",
  ".",
  "getJSONObject",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_Number",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "new",
  "Double",
  "(",
  "2",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "2",
  ")",
  ".",
  "doubleValue",
  "(",
  ")",
  ",",
  "array",
  ".",
  "getDouble",
  "(",
  "1",
  ")",
  ",",
  "1d",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_Object",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ",",
  "array",
  ".",
  "getJSONObject",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_String",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "\"json\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "array",
  ".",
  "getString",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_String_JSON",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "\"[]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "array",
  ".",
  "getString",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_index_1_String_null",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "1",
  ",",
  "(",
  "String",
  ")",
  "null",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "array",
  ".",
  "getString",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_int",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "1",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "getInt",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_JSON",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "array",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_JSONFunction",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "JSONFunction",
  "f",
  "=",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "f",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "f",
  ",",
  "(",
  "JSONFunction",
  ")",
  "array",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_JSONString",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "ArrayJSONStringBean",
  "bean",
  "=",
  "new",
  "ArrayJSONStringBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setValue",
  "(",
  "\"\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "bean",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ",",
  "array",
  ".",
  "getJSONArray",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_JSONTokener",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "JSONTokener",
  "tok",
  "=",
  "new",
  "JSONTokener",
  "(",
  "\"[1,2]\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "tok",
  ")",
  ";",
  "tok",
  ".",
  "reset",
  "(",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "tok",
  ")",
  ",",
  "array",
  ".",
  "getJSONArray",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_long",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "1L",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1L",
  ",",
  "jsonArray",
  ".",
  "getLong",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Map",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "map",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "map",
  ")",
  ",",
  "jsonArray",
  ".",
  "getJSONObject",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_negativeIndex",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "-",
  "1",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testElement_Number",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "new",
  "Double",
  "(",
  "2",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "Double",
  "(",
  "2",
  ")",
  ".",
  "doubleValue",
  "(",
  ")",
  ",",
  "array",
  ".",
  "getDouble",
  "(",
  "0",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_Object",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ",",
  "array",
  ".",
  "getJSONObject",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_replace",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "true",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonArray",
  ".",
  "getBoolean",
  "(",
  "0",
  ")",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "0",
  ",",
  "false",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonArray",
  ".",
  "getBoolean",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_String",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "\"json\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "array",
  ".",
  "getString",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_String_JSON",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "\"[]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "array",
  ".",
  "getString",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testElement_String_null",
  "(",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "(",
  "String",
  ")",
  "null",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "array",
  ".",
  "getString",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_BigDecimal",
  "(",
  ")",
  "{",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "BigDecimal",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "actual",
  ".",
  "get",
  "(",
  "0",
  ")",
  "instanceof",
  "BigDecimal",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_BigInteger",
  "(",
  ")",
  "{",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "BigInteger",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "actual",
  ".",
  "get",
  "(",
  "0",
  ")",
  "instanceof",
  "BigInteger",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Boolean",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[true]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Byte",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Byte",
  "(",
  "(",
  "byte",
  ")",
  "1",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Double",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1.0]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Double",
  "(",
  "1d",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Float",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1.0]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Float",
  "(",
  "1f",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Integer",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_JSONArray",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2]\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_JSONFunction",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "a;\"",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_JSONString",
  "(",
  ")",
  "{",
  "ArrayJSONStringBean",
  "bean",
  "=",
  "new",
  "ArrayJSONStringBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setValue",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Long",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Long",
  "(",
  "1L",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Map",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[{}]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "HashMap",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Short",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1]\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "Short",
  "(",
  "(",
  "short",
  ")",
  "1",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGet_exception",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[]\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "IndexOutOfBoundsException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testGetBoolean_exception",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[[]]\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "getBoolean",
  "(",
  "0",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testGetBoolean_false",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[false]\"",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonArray",
  ".",
  "getBoolean",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetBoolean_true",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[true]\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonArray",
  ".",
  "getBoolean",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetDimensions_empty_array",
  "(",
  ")",
  "{",
  "int",
  "[",
  "]",
  "dims",
  "=",
  "JSONArray",
  ".",
  "getDimensions",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "dims",
  ".",
  "length",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "dims",
  "[",
  "0",
  "]",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetDimensions_null_array",
  "(",
  ")",
  "{",
  "int",
  "[",
  "]",
  "dims",
  "=",
  "JSONArray",
  ".",
  "getDimensions",
  "(",
  "null",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "dims",
  ".",
  "length",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "dims",
  "[",
  "0",
  "]",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetDimensions_one_dimension",
  "(",
  ")",
  "{",
  "int",
  "[",
  "]",
  "dims",
  "=",
  "JSONArray",
  ".",
  "getDimensions",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2,3]\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "dims",
  ".",
  "length",
  ")",
  ";",
  "assertEquals",
  "(",
  "3",
  ",",
  "dims",
  "[",
  "0",
  "]",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetDimensions_pyramid",
  "(",
  ")",
  "{",
  "int",
  "[",
  "]",
  "dims",
  "=",
  "JSONArray",
  ".",
  "getDimensions",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "4",
  ",",
  "dims",
  ".",
  "length",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  "[",
  "0",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  "[",
  "1",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  "[",
  "2",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "dims",
  "[",
  "3",
  "]",
  ")",
  ";",
  "dims",
  "=",
  "JSONArray",
  ".",
  "getDimensions",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "4",
  ",",
  "dims",
  ".",
  "length",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  "[",
  "0",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  "[",
  "1",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  "[",
  "2",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "dims",
  "[",
  "3",
  "]",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetDimensions_two_dimension",
  "(",
  ")",
  "{",
  "int",
  "[",
  "]",
  "dims",
  "=",
  "JSONArray",
  ".",
  "getDimensions",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  ".",
  "length",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  "[",
  "0",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "3",
  ",",
  "dims",
  "[",
  "1",
  "]",
  ")",
  ";",
  "dims",
  "=",
  "JSONArray",
  ".",
  "getDimensions",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  ".",
  "length",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  "[",
  "0",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "3",
  ",",
  "dims",
  "[",
  "1",
  "]",
  ")",
  ";",
  "dims",
  "=",
  "JSONArray",
  ".",
  "getDimensions",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  ".",
  "length",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "dims",
  "[",
  "0",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "3",
  ",",
  "dims",
  "[",
  "1",
  "]",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetDouble_exception",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[[]]\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "getDouble",
  "(",
  "0",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testGetDouble_Number",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[2.0]\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "2.0d",
  ",",
  "jsonArray",
  ".",
  "getDouble",
  "(",
  "0",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetDouble_String",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[\\\"2.0\\\"]\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "2.0d",
  ",",
  "jsonArray",
  ".",
  "getDouble",
  "(",
  "0",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetInt_exception",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[[]]\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "getInt",
  "(",
  "0",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testGetInt_Number",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[2.0]\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "getInt",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetInt_String",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[\\\"2.0\\\"]\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "getInt",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetJSONArray",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[[1,2]]\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1,2]\"",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "getJSONArray",
  "(",
  "0",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetJSONArray_exception",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1]\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "getJSONArray",
  "(",
  "0",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testGetJSONObject",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ",",
  "jsonArray",
  ".",
  "getJSONObject",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetJSONObject_exception",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[1]\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "getJSONObject",
  "(",
  "0",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testGetLong_exception",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[[]]\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "getLong",
  "(",
  "0",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testGetLong_Number",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[2.0]\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "getLong",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetLong_String",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[\\\"2.0\\\"]\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "getLong",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetString",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[\\\"2.0\\\"]\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"2.0\"",
  ",",
  "jsonArray",
  ".",
  "getString",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetString_exception",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[]\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "getString",
  "(",
  "0",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "IndexOutOfBoundsException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testOptionalGet",
  "(",
  ")",
  "{",
  "Object",
  "[",
  "]",
  "params",
  "=",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "new",
  "JSONArray",
  "(",
  ")",
  ",",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"{\\\"int\\\":1}\"",
  ")",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "params",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonArray",
  ".",
  "optBoolean",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonArray",
  ".",
  "optBoolean",
  "(",
  "0",
  ",",
  "true",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "Double",
  ".",
  "isNaN",
  "(",
  "jsonArray",
  ".",
  "optDouble",
  "(",
  "0",
  ")",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0d",
  ",",
  "jsonArray",
  ".",
  "optDouble",
  "(",
  "0",
  ",",
  "0d",
  ")",
  ",",
  "0d",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonArray",
  ".",
  "optInt",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "optInt",
  "(",
  "0",
  ",",
  "1",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "null",
  ",",
  "jsonArray",
  ".",
  "optJSONArray",
  "(",
  "1",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "(",
  "JSONArray",
  ")",
  "params",
  "[",
  "0",
  "]",
  ",",
  "jsonArray",
  ".",
  "optJSONArray",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "null",
  ",",
  "jsonArray",
  ".",
  "optJSONObject",
  "(",
  "0",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "(",
  "JSONObject",
  ")",
  "params",
  "[",
  "1",
  "]",
  ",",
  "jsonArray",
  ".",
  "optJSONObject",
  "(",
  "1",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "jsonArray",
  ".",
  "optLong",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "optLong",
  "(",
  "0",
  ",",
  "1",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "jsonArray",
  ".",
  "optString",
  "(",
  "3",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"json\"",
  ",",
  "jsonArray",
  ".",
  "optString",
  "(",
  "3",
  ",",
  "\"json\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_bean_element",
  "(",
  ")",
  "{",
  "BeanA",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "BeanA",
  "[",
  "]",
  "{",
  "new",
  "BeanA",
  "(",
  ")",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ",",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_BigDecimal",
  "(",
  ")",
  "{",
  "BigDecimal",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "BigDecimal",
  "[",
  "]",
  "{",
  "MorphUtils",
  ".",
  "BIGDECIMAL_ZERO",
  ",",
  "MorphUtils",
  ".",
  "BIGDECIMAL_ONE",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_BigInteger",
  "(",
  ")",
  "{",
  "BigInteger",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "BigInteger",
  "[",
  "]",
  "{",
  "BigInteger",
  ".",
  "ZERO",
  ",",
  "BigInteger",
  ".",
  "ONE",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_boolean",
  "(",
  ")",
  "{",
  "boolean",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "boolean",
  "[",
  "]",
  "{",
  "true",
  ",",
  "false",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_Boolean",
  "(",
  ")",
  "{",
  "Boolean",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "Boolean",
  "[",
  "]",
  "{",
  "Boolean",
  ".",
  "TRUE",
  ",",
  "Boolean",
  ".",
  "FALSE",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_boolean_multi",
  "(",
  ")",
  "{",
  "boolean",
  "[",
  "]",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "boolean",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "true",
  ",",
  "false",
  "}",
  ",",
  "{",
  "false",
  ",",
  "true",
  "}",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_byte",
  "(",
  ")",
  "{",
  "byte",
  "[",
  "]",
  "input",
  "=",
  "new",
  "byte",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "int",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_Byte",
  "(",
  ")",
  "{",
  "Integer",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "Integer",
  "[",
  "]",
  "{",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  "}",
  ";",
  "Byte",
  "[",
  "]",
  "bytes",
  "=",
  "new",
  "Byte",
  "[",
  "]",
  "{",
  "new",
  "Byte",
  "(",
  "(",
  "byte",
  ")",
  "1",
  ")",
  ",",
  "new",
  "Byte",
  "(",
  "(",
  "byte",
  ")",
  "2",
  ")",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "bytes",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_byte_multi",
  "(",
  ")",
  "{",
  "byte",
  "[",
  "]",
  "[",
  "]",
  "input",
  "=",
  "new",
  "byte",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "{",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  "}",
  ";",
  "int",
  "[",
  "]",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "int",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "{",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_char",
  "(",
  ")",
  "{",
  "String",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"A\"",
  ",",
  "\"B\"",
  "}",
  ";",
  "char",
  "[",
  "]",
  "input",
  "=",
  "new",
  "char",
  "[",
  "]",
  "{",
  "'A'",
  ",",
  "'B'",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_char_multi",
  "(",
  ")",
  "{",
  "String",
  "[",
  "]",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "String",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "\"a\"",
  ",",
  "\"b\"",
  "}",
  ",",
  "{",
  "\"c\"",
  ",",
  "\"d\"",
  "}",
  "}",
  ";",
  "char",
  "[",
  "]",
  "[",
  "]",
  "input",
  "=",
  "new",
  "char",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "'a'",
  ",",
  "'b'",
  "}",
  ",",
  "{",
  "'c'",
  ",",
  "'d'",
  "}",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_Character",
  "(",
  ")",
  "{",
  "String",
  "[",
  "]",
  "expected",
  "=",
  "{",
  "\"A\"",
  ",",
  "\"B\"",
  "}",
  ";",
  "Character",
  "[",
  "]",
  "chars",
  "=",
  "new",
  "Character",
  "[",
  "]",
  "{",
  "new",
  "Character",
  "(",
  "'A'",
  ")",
  ",",
  "new",
  "Character",
  "(",
  "'B'",
  ")",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "chars",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_double",
  "(",
  ")",
  "{",
  "double",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "double",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_Double",
  "(",
  ")",
  "{",
  "Double",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "Double",
  "[",
  "]",
  "{",
  "new",
  "Double",
  "(",
  "1d",
  ")",
  ",",
  "new",
  "Double",
  "(",
  "2d",
  ")",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_double_multi",
  "(",
  ")",
  "{",
  "double",
  "[",
  "]",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "double",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "{",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_dynabean_element",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "DynaBean",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "DynaBean",
  "[",
  "]",
  "{",
  "createDynaBean",
  "(",
  ")",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_float",
  "(",
  ")",
  "{",
  "double",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "double",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "float",
  "[",
  "]",
  "input",
  "=",
  "new",
  "float",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_Float",
  "(",
  ")",
  "{",
  "Double",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "Double",
  "[",
  "]",
  "{",
  "new",
  "Double",
  "(",
  "1d",
  ")",
  ",",
  "new",
  "Double",
  "(",
  "2d",
  ")",
  "}",
  ";",
  "Float",
  "[",
  "]",
  "floats",
  "=",
  "new",
  "Float",
  "[",
  "]",
  "{",
  "new",
  "Float",
  "(",
  "1f",
  ")",
  ",",
  "new",
  "Float",
  "(",
  "2f",
  ")",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "floats",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_float_multi",
  "(",
  ")",
  "{",
  "double",
  "[",
  "]",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "double",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "{",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  "}",
  ";",
  "float",
  "[",
  "]",
  "[",
  "]",
  "input",
  "=",
  "new",
  "float",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "{",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_int",
  "(",
  ")",
  "{",
  "int",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_int_multi",
  "(",
  ")",
  "{",
  "int",
  "[",
  "]",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "int",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "{",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_Integer",
  "(",
  ")",
  "{",
  "Integer",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "Integer",
  "[",
  "]",
  "{",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_long",
  "(",
  ")",
  "{",
  "long",
  "[",
  "]",
  "input",
  "=",
  "new",
  "long",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "int",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_Long",
  "(",
  ")",
  "{",
  "Integer",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "Integer",
  "[",
  "]",
  "{",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  "}",
  ";",
  "Long",
  "[",
  "]",
  "longs",
  "=",
  "new",
  "Long",
  "[",
  "]",
  "{",
  "new",
  "Long",
  "(",
  "1L",
  ")",
  ",",
  "new",
  "Long",
  "(",
  "2L",
  ")",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "longs",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_long_multi",
  "(",
  ")",
  "{",
  "long",
  "[",
  "]",
  "[",
  "]",
  "input",
  "=",
  "new",
  "long",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "{",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  "}",
  ";",
  "int",
  "[",
  "]",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "int",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "{",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_Long2",
  "(",
  ")",
  "{",
  "Long",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "Long",
  "[",
  "]",
  "{",
  "new",
  "Long",
  "(",
  "Integer",
  ".",
  "MAX_VALUE",
  "+",
  "1L",
  ")",
  ",",
  "new",
  "Long",
  "(",
  "Integer",
  ".",
  "MAX_VALUE",
  "+",
  "2L",
  ")",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_null_elements",
  "(",
  ")",
  "{",
  "String",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "String",
  "[",
  "]",
  "{",
  "null",
  ",",
  "null",
  ",",
  "null",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_short",
  "(",
  ")",
  "{",
  "short",
  "[",
  "]",
  "input",
  "=",
  "new",
  "short",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "int",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_Short",
  "(",
  ")",
  "{",
  "Integer",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "Integer",
  "[",
  "]",
  "{",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ",",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  "}",
  ";",
  "Short",
  "[",
  "]",
  "shorts",
  "=",
  "new",
  "Short",
  "[",
  "]",
  "{",
  "new",
  "Short",
  "(",
  "(",
  "short",
  ")",
  "1",
  ")",
  ",",
  "new",
  "Short",
  "(",
  "(",
  "short",
  ")",
  "2",
  ")",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "shorts",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_short_multi",
  "(",
  ")",
  "{",
  "short",
  "[",
  "]",
  "[",
  "]",
  "input",
  "=",
  "new",
  "short",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "{",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  "}",
  ";",
  "int",
  "[",
  "]",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "int",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ",",
  "{",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_String",
  "(",
  ")",
  "{",
  "String",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"1\"",
  ",",
  "\"2\"",
  ",",
  "\"3\"",
  ",",
  "\"4\"",
  ",",
  "\"5\"",
  ",",
  "\"6\"",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_String_multi",
  "(",
  ")",
  "{",
  "String",
  "[",
  "]",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "String",
  "[",
  "]",
  "[",
  "]",
  "{",
  "{",
  "\"1\"",
  ",",
  "\"2\"",
  ",",
  "\"3\"",
  "}",
  ",",
  "{",
  "\"4\"",
  ",",
  "\"5\"",
  ",",
  "\"6\"",
  "}",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_StringToInt",
  "(",
  ")",
  "{",
  "int",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "String",
  "[",
  "]",
  "input",
  "=",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"1\"",
  ",",
  "\"2\"",
  ",",
  "\"3\"",
  ",",
  "\"4\"",
  ",",
  "\"5\"",
  ",",
  "\"6\"",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "Integer",
  ".",
  "TYPE",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ",",
  "jsonConfig",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_StringToInteger",
  "(",
  ")",
  "{",
  "int",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  ",",
  "6",
  "}",
  ";",
  "String",
  "[",
  "]",
  "input",
  "=",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"1\"",
  ",",
  "\"2\"",
  ",",
  "\"3\"",
  ",",
  "\"4\"",
  ",",
  "\"5\"",
  ",",
  "\"6\"",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "Integer",
  ".",
  "class",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ",",
  "jsonConfig",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToArray_StringToInteger_empty",
  "(",
  ")",
  "{",
  "int",
  "[",
  "]",
  "expected",
  "=",
  "new",
  "int",
  "[",
  "]",
  "{",
  "}",
  ";",
  "String",
  "[",
  "]",
  "input",
  "=",
  "new",
  "String",
  "[",
  "]",
  "{",
  "}",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "Integer",
  ".",
  "class",
  ")",
  ";",
  "Object",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ",",
  "jsonConfig",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSONObject",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONObject",
  "expected",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONArray",
  "names",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "jsonArray",
  ".",
  "toJSONObject",
  "(",
  "names",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToJSONObject_null_object",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "assertNull",
  "(",
  "jsonArray",
  ".",
  "toJSONObject",
  "(",
  "null",
  ")",
  ")",
  ";",
  "assertNull",
  "(",
  "jsonArray",
  ".",
  "toJSONObject",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ")",
  ")",
  ";",
  "assertNull",
  "(",
  "jsonArray",
  ".",
  "toJSONObject",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"['json']\"",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_bean_elements",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ",",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_BigDecimal",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "MorphUtils",
  ".",
  "BIGDECIMAL_ZERO",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "MorphUtils",
  ".",
  "BIGDECIMAL_ONE",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_BigInteger",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "BigInteger",
  ".",
  "ZERO",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "BigInteger",
  ".",
  "ONE",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_Boolean",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "Boolean",
  ".",
  "FALSE",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_Byte",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "List",
  "bytes",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "bytes",
  ".",
  "add",
  "(",
  "new",
  "Byte",
  "(",
  "(",
  "byte",
  ")",
  "1",
  ")",
  ")",
  ";",
  "bytes",
  ".",
  "add",
  "(",
  "new",
  "Byte",
  "(",
  "(",
  "byte",
  ")",
  "2",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "bytes",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_Character",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "\"A\"",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "\"B\"",
  ")",
  ";",
  "List",
  "chars",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "chars",
  ".",
  "add",
  "(",
  "new",
  "Character",
  "(",
  "'A'",
  ")",
  ")",
  ";",
  "chars",
  ".",
  "add",
  "(",
  "new",
  "Character",
  "(",
  "'B'",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "chars",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_Double",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Double",
  "(",
  "1d",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Double",
  "(",
  "2d",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_dynaBean_elements",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "createDynaBean",
  "(",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_Float",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Double",
  "(",
  "1d",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Double",
  "(",
  "2d",
  ")",
  ")",
  ";",
  "List",
  "floats",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "floats",
  ".",
  "add",
  "(",
  "new",
  "Float",
  "(",
  "1f",
  ")",
  ")",
  ";",
  "floats",
  ".",
  "add",
  "(",
  "new",
  "Float",
  "(",
  "2f",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "floats",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_Integer",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_JSONFunction_elements",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "JSONFunction",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"a\"",
  "}",
  ",",
  "\"return",
  "a;\"",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_JSONFunction_elements_2",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_Long",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "List",
  "longs",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "longs",
  ".",
  "add",
  "(",
  "new",
  "Long",
  "(",
  "1L",
  ")",
  ")",
  ";",
  "longs",
  ".",
  "add",
  "(",
  "new",
  "Long",
  "(",
  "2L",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "longs",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_Long2",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Long",
  "(",
  "Integer",
  ".",
  "MAX_VALUE",
  "+",
  "1L",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Long",
  "(",
  "Integer",
  ".",
  "MAX_VALUE",
  "+",
  "2L",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_null_elements",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "null",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "null",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "null",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_Short",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "2",
  ")",
  ")",
  ";",
  "List",
  "shorts",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "shorts",
  ".",
  "add",
  "(",
  "new",
  "Short",
  "(",
  "(",
  "short",
  ")",
  "1",
  ")",
  ")",
  ";",
  "shorts",
  ".",
  "add",
  "(",
  "new",
  "Short",
  "(",
  "(",
  "short",
  ")",
  "2",
  ")",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "shorts",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_String",
  "(",
  ")",
  "{",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "\"A\"",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "\"B\"",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToList_String_multi",
  "(",
  ")",
  "{",
  "List",
  "a",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "a",
  ".",
  "add",
  "(",
  "\"a\"",
  ")",
  ";",
  "a",
  ".",
  "add",
  "(",
  "\"b\"",
  ")",
  ";",
  "List",
  "b",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "b",
  ".",
  "add",
  "(",
  "\"1\"",
  ")",
  ";",
  "b",
  ".",
  "add",
  "(",
  "\"2\"",
  ")",
  ";",
  "List",
  "expected",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "a",
  ")",
  ";",
  "expected",
  ".",
  "add",
  "(",
  "b",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "expected",
  ")",
  ";",
  "List",
  "actual",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "jsonArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWrite",
  "(",
  ")",
  "throws",
  "IOException",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "StringWriter",
  "sw",
  "=",
  "new",
  "StringWriter",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "write",
  "(",
  "sw",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "sw",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "private",
  "MorphDynaBean",
  "createDynaBean",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "Map",
  "properties",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"name\"",
  ",",
  "String",
  ".",
  "class",
  ")",
  ";",
  "MorphDynaClass",
  "dynaClass",
  "=",
  "new",
  "MorphDynaClass",
  "(",
  "properties",
  ")",
  ";",
  "MorphDynaBean",
  "dynaBean",
  "=",
  "(",
  "MorphDynaBean",
  ")",
  "dynaClass",
  ".",
  "newInstance",
  "(",
  ")",
  ";",
  "dynaBean",
  ".",
  "setDynaBeanClass",
  "(",
  "dynaClass",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"name\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "return",
  "dynaBean",
  ";",
  "}",
  "private",
  "void",
  "testJSONArray",
  "(",
  "Object",
  "array",
  ",",
  "String",
  "expected",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "array",
  ")",
  ";",
  "assertEquals",
  "(",
  "expected",
  ",",
  "jsonArray",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "fail",
  "(",
  "jsone",
  ".",
  "getMessage",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,468 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "public",
  "class",
  "TestJSONObjectStaticBuilders_JSONString",
  "extends",
  "AbstractJSONObjectStaticBuildersTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONObjectStaticBuilders_JSONString",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONObjectStaticBuilders_JSONString",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "Object",
  "getSource",
  "(",
  ")",
  "{",
  "return",
  "new",
  "JsonBean",
  "(",
  ")",
  ";",
  "}",
  "public",
  "static",
  "class",
  "JsonBean",
  "implements",
  "JSONString",
  "{",
  "public",
  "String",
  "toJSONString",
  "(",
  ")",
  "{",
  "return",
  "\"\"",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,469 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaClass",
  ";",
  "public",
  "class",
  "TestJSONObjectStaticBuilders_DynaBean",
  "extends",
  "AbstractJSONObjectStaticBuildersTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONObjectStaticBuilders_DynaBean",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONObjectStaticBuilders_DynaBean",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "Object",
  "getSource",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "String",
  "[",
  "]",
  "props",
  "=",
  "getProperties",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "props",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "map",
  ".",
  "put",
  "(",
  "props",
  "[",
  "i",
  "]",
  ",",
  "PropertyConstants",
  ".",
  "getPropertyClass",
  "(",
  "props",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "map",
  ".",
  "put",
  "(",
  "\"class\"",
  ",",
  "Class",
  ".",
  "class",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"pexcluded\"",
  ",",
  "String",
  ".",
  "class",
  ")",
  ";",
  "MorphDynaClass",
  "dynaClass",
  "=",
  "new",
  "MorphDynaClass",
  "(",
  "map",
  ")",
  ";",
  "MorphDynaBean",
  "dynaBean",
  "=",
  "null",
  ";",
  "try",
  "{",
  "dynaBean",
  "=",
  "(",
  "MorphDynaBean",
  ")",
  "dynaClass",
  ".",
  "newInstance",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "props",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "dynaBean",
  ".",
  "set",
  "(",
  "props",
  "[",
  "i",
  "]",
  ",",
  "PropertyConstants",
  ".",
  "getPropertyValue",
  "(",
  "props",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"class\"",
  ",",
  "Object",
  ".",
  "class",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"pexcluded\"",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "RuntimeException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "return",
  "dynaBean",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,470 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "reflect",
  ".",
  "InvocationTargetException",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Calendar",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Date",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "LinkedList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ListIterator",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "object",
  ".",
  "MapToDateMorpher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ArrayBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanA",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanA1763699",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanB1763699",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "BeanC",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ChildBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "DateBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "FieldBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "IdBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "InterfaceBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "JSONTestBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ListingBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "MappedBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "Media",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "MediaBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "MediaList",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "MediaListBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "NumberArrayBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "PackageProtectedBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "ParentBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "Player",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "PlayerList",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "PrimitiveBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "PrivateConstructorBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "UnstandardBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "UnstandardBeanInstanceStrategy",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JSONUtils",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JavaIdentifierTransformer",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JsonEventListener",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "DynaBean",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "PropertyUtils",
  ";",
  "public",
  "class",
  "TestUserSubmitted",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestUserSubmitted",
  ".",
  "class",
  ")",
  ";",
  "}",
  "private",
  "JsonConfig",
  "jsonConfig",
  ";",
  "public",
  "TestUserSubmitted",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testPatch_2929940",
  "(",
  ")",
  "{",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"attributes\"",
  ",",
  "Long",
  ".",
  "class",
  ")",
  ";",
  "ListingBean",
  "original",
  "=",
  "new",
  "ListingBean",
  "(",
  ")",
  ";",
  "original",
  ".",
  "addAttribute",
  "(",
  "Long",
  ".",
  "valueOf",
  "(",
  "12",
  ")",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "original",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "ListingBean",
  ".",
  "class",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "ListingBean",
  "bean",
  "=",
  "(",
  "ListingBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "bean",
  ".",
  "getAttributes",
  "(",
  ")",
  ".",
  "get",
  "(",
  "0",
  ")",
  "instanceof",
  "Long",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1635890",
  "(",
  ")",
  "throws",
  "NoSuchMethodException",
  ",",
  "IllegalAccessException",
  ",",
  "InvocationTargetException",
  "{",
  "String",
  "TEST_JSON_STRING",
  "=",
  "\"\"",
  ";",
  "DynaBean",
  "jsonBean",
  "=",
  "(",
  "DynaBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "TEST_JSON_STRING",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "\"HOTRATE\"",
  ",",
  "jsonBean",
  ".",
  "get",
  "(",
  "\"rateType\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "\"\"",
  ",",
  "jsonBean",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "DynaBean",
  "jsonRateBreakdownBean",
  "=",
  "(",
  "DynaBean",
  ")",
  "jsonBean",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ";",
  "assertNotNull",
  "(",
  "\"\"",
  ",",
  "jsonRateBreakdownBean",
  ")",
  ";",
  "Object",
  "jsonRateBean",
  "=",
  "jsonRateBreakdownBean",
  ".",
  "get",
  "(",
  "\"rate\"",
  ")",
  ";",
  "assertNotNull",
  "(",
  "\"null",
  "rate",
  "\"",
  ",",
  "jsonRateBean",
  ")",
  ";",
  "assertTrue",
  "(",
  "\"list\"",
  ",",
  "jsonRateBean",
  "instanceof",
  "ArrayList",
  ")",
  ";",
  "assertNotNull",
  "(",
  "\"null",
  "rate",
  "\"",
  ",",
  "jsonRateBreakdownBean",
  ".",
  "get",
  "(",
  "\"rate\"",
  ",",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1650535_builders",
  "(",
  ")",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "object",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "assertNotNull",
  "(",
  "object",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "has",
  "(",
  "\"obj\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "has",
  "(",
  "\"array\"",
  ")",
  ")",
  ";",
  "Object",
  "obj",
  "=",
  "object",
  ".",
  "get",
  "(",
  "\"obj\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "obj",
  "instanceof",
  "String",
  ")",
  ";",
  "Object",
  "array",
  "=",
  "object",
  ".",
  "get",
  "(",
  "\"array\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "array",
  "instanceof",
  "String",
  ")",
  ";",
  "json",
  "=",
  "\"\"",
  ";",
  "object",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "assertNotNull",
  "(",
  "object",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "has",
  "(",
  "\"obj\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "has",
  "(",
  "\"array\"",
  ")",
  ")",
  ";",
  "obj",
  "=",
  "object",
  ".",
  "get",
  "(",
  "\"obj\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "obj",
  "instanceof",
  "String",
  ")",
  ";",
  "array",
  "=",
  "object",
  ".",
  "get",
  "(",
  "\"array\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "array",
  "instanceof",
  "String",
  ")",
  ";",
  "json",
  "=",
  "\"[\\\"{}\\\",\\\"[]\\\"]\"",
  ";",
  "JSONArray",
  "jarray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jarray",
  ")",
  ";",
  "obj",
  "=",
  "jarray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ";",
  "assertTrue",
  "(",
  "obj",
  "instanceof",
  "String",
  ")",
  ";",
  "array",
  "=",
  "jarray",
  ".",
  "get",
  "(",
  "1",
  ")",
  ";",
  "assertTrue",
  "(",
  "array",
  "instanceof",
  "String",
  ")",
  ";",
  "json",
  "=",
  "\"['{}','[]']\"",
  ";",
  "jarray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jarray",
  ")",
  ";",
  "obj",
  "=",
  "jarray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ";",
  "assertTrue",
  "(",
  "obj",
  "instanceof",
  "String",
  ")",
  ";",
  "array",
  "=",
  "jarray",
  ".",
  "get",
  "(",
  "1",
  ")",
  ";",
  "assertTrue",
  "(",
  "array",
  "instanceof",
  "String",
  ")",
  ";",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"address\"",
  ",",
  "\"\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"phoneNumber\"",
  ",",
  "\"\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"info1\"",
  ",",
  "\"\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"info2\"",
  ",",
  "\"\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"info3\"",
  ",",
  "\"\"",
  ")",
  ";",
  "object",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "map",
  ")",
  ";",
  "assertNotNull",
  "(",
  "object",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "has",
  "(",
  "\"address\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "has",
  "(",
  "\"phoneNumber\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "has",
  "(",
  "\"info1\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "has",
  "(",
  "\"info2\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "has",
  "(",
  "\"info3\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "get",
  "(",
  "\"address\"",
  ")",
  "instanceof",
  "String",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "get",
  "(",
  "\"phoneNumber\"",
  ")",
  "instanceof",
  "String",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "get",
  "(",
  "\"info1\"",
  ")",
  "instanceof",
  "String",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "get",
  "(",
  "\"info2\"",
  ")",
  "instanceof",
  "String",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "get",
  "(",
  "\"info3\"",
  ")",
  "instanceof",
  "String",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1650535_setters",
  "(",
  ")",
  "{",
  "JSONObject",
  "object",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "object",
  ".",
  "element",
  "(",
  "\"obj\"",
  ",",
  "\"{}\"",
  ")",
  ";",
  "object",
  ".",
  "element",
  "(",
  "\"notobj\"",
  ",",
  "\"{string}\"",
  ")",
  ";",
  "object",
  ".",
  "element",
  "(",
  "\"array\"",
  ",",
  "\"[]\"",
  ")",
  ";",
  "object",
  ".",
  "element",
  "(",
  "\"notarray\"",
  ",",
  "\"[string]\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "get",
  "(",
  "\"obj\"",
  ")",
  "instanceof",
  "JSONObject",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "get",
  "(",
  "\"array\"",
  ")",
  "instanceof",
  "JSONArray",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "get",
  "(",
  "\"notobj\"",
  ")",
  "instanceof",
  "String",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "get",
  "(",
  "\"notarray\"",
  ")",
  "instanceof",
  "String",
  ")",
  ";",
  "object",
  ".",
  "element",
  "(",
  "\"str\"",
  ",",
  "\"json,json\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "object",
  ".",
  "get",
  "(",
  "\"str\"",
  ")",
  "instanceof",
  "String",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1753528_ArrayStringLiteralToString",
  "(",
  ")",
  "{",
  "BeanA",
  "bean",
  "=",
  "new",
  "BeanA",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setString",
  "(",
  "\"[1234]\"",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"[1234]\"",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "bean",
  ".",
  "setString",
  "(",
  "\"\"",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1763699_toBean",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "BeanA1763699",
  "bean",
  "=",
  "(",
  "BeanA1763699",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "BeanA1763699",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "BeanB1763699",
  "[",
  "]",
  "bbeans",
  "=",
  "bean",
  ".",
  "getBbeans",
  "(",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bbeans",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "bbeans",
  ".",
  "length",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"test\"",
  ",",
  "bbeans",
  "[",
  "0",
  "]",
  ".",
  "getStr",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1764768_toBean",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"{'beanA':''}\"",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"beanA\"",
  ",",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "BeanC",
  "bean",
  "=",
  "(",
  "BeanC",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "BeanC",
  ".",
  "class",
  ",",
  "classMap",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ".",
  "getBeanA",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ",",
  "bean",
  ".",
  "getBeanA",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1769559_array_conversion",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"beans\"",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"{}\"",
  ")",
  ".",
  "element",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "ArrayBean",
  "bean",
  "=",
  "(",
  "ArrayBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "ArrayBean",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"beans\"",
  ")",
  ";",
  "BeanA",
  "[",
  "]",
  "beans",
  "=",
  "(",
  "BeanA",
  "[",
  "]",
  ")",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jsonArray",
  ",",
  "BeanA",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "beans",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "beans",
  ".",
  "length",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "BeanA",
  "(",
  ")",
  ",",
  "beans",
  "[",
  "0",
  "]",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "BeanA",
  "(",
  "false",
  ",",
  "216",
  ",",
  "\"JsOn\"",
  ")",
  ",",
  "beans",
  "[",
  "1",
  "]",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1769578_array_conversion",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"media\"",
  ",",
  "MediaBean",
  ".",
  "class",
  ")",
  ";",
  "MediaListBean",
  "bean",
  "=",
  "(",
  "MediaListBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "MediaListBean",
  ".",
  "class",
  ",",
  "classMap",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ".",
  "getMedia",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "bean",
  ".",
  "getMedia",
  "(",
  ")",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "isArray",
  "(",
  ")",
  ")",
  ";",
  "Object",
  "[",
  "]",
  "media",
  "=",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "bean",
  ".",
  "getMedia",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "media",
  ".",
  "length",
  ")",
  ";",
  "Object",
  "mediaItem1",
  "=",
  "media",
  "[",
  "0",
  "]",
  ";",
  "assertTrue",
  "(",
  "mediaItem1",
  "instanceof",
  "MediaBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"Giggles\"",
  ",",
  "(",
  "(",
  "MediaBean",
  ")",
  "mediaItem1",
  ")",
  ".",
  "getTitle",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1812682",
  "(",
  ")",
  "{",
  "int",
  "[",
  "]",
  "numbers",
  "=",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  ",",
  "4",
  ",",
  "5",
  "}",
  ";",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"bytes\"",
  ",",
  "numbers",
  ")",
  ".",
  "element",
  "(",
  "\"shorts\"",
  ",",
  "numbers",
  ")",
  ".",
  "element",
  "(",
  "\"ints\"",
  ",",
  "numbers",
  ")",
  ".",
  "element",
  "(",
  "\"longs\"",
  ",",
  "numbers",
  ")",
  ".",
  "element",
  "(",
  "\"floats\"",
  ",",
  "numbers",
  ")",
  ".",
  "element",
  "(",
  "\"doubles\"",
  ",",
  "numbers",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "NumberArrayBean",
  ".",
  "class",
  ")",
  ";",
  "NumberArrayBean",
  "bean",
  "=",
  "(",
  "NumberArrayBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1813301",
  "(",
  ")",
  "{",
  "List",
  "list",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "\"1\"",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "\"2\"",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "\"3\"",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"name\"",
  ",",
  "\"JSON\"",
  ")",
  ".",
  "element",
  "(",
  "\"list\"",
  ",",
  "list",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "MappedBean",
  ".",
  "class",
  ")",
  ";",
  "MappedBean",
  "bean",
  "=",
  "(",
  "MappedBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"JSON\"",
  ",",
  "bean",
  ".",
  "getName",
  "(",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "list",
  ",",
  "bean",
  ".",
  "getList",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1875600_1",
  "(",
  ")",
  "{",
  "JSONArray",
  "jArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[]\"",
  ")",
  ";",
  "int",
  "[",
  "]",
  "iArray",
  "=",
  "(",
  "int",
  "[",
  "]",
  ")",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jArray",
  ",",
  "int",
  ".",
  "class",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "iArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_1875600_2",
  "(",
  ")",
  "{",
  "JSONArray",
  "jArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[",
  "[]",
  "]\"",
  ")",
  ";",
  "int",
  "[",
  "]",
  "[",
  "]",
  "iArray",
  "=",
  "(",
  "int",
  "[",
  "]",
  "[",
  "]",
  ")",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "jArray",
  ",",
  "int",
  ".",
  "class",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "iArray",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "new",
  "JSONArray",
  "(",
  ")",
  ")",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object__nullArray",
  "(",
  ")",
  "{",
  "String",
  "[",
  "]",
  "strarr",
  "=",
  "null",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "strarr",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_EnclosedArray",
  "(",
  ")",
  "{",
  "PrimitiveBean",
  "bean",
  "=",
  "new",
  "PrimitiveBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setOarray",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"hi\"",
  ",",
  "\"bye\"",
  "}",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonObject",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"oarray\"",
  ")",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_EnclosedNullArray",
  "(",
  ")",
  "{",
  "PrimitiveBean",
  "bean",
  "=",
  "new",
  "PrimitiveBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setOarray",
  "(",
  "null",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonObject",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "jsonObject",
  ".",
  "getJSONArray",
  "(",
  "\"oarray\"",
  ")",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructorAndToBean_Object_RoundTrip_EnclosedNullArray",
  "(",
  ")",
  "{",
  "PrimitiveBean",
  "bean",
  "=",
  "new",
  "PrimitiveBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setOarray",
  "(",
  "null",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ",",
  "jsonConfig",
  ")",
  ";",
  "PrimitiveBean",
  "bean2",
  "=",
  "(",
  "PrimitiveBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "PrimitiveBean",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean2",
  ")",
  ";",
  "assertEquals",
  "(",
  "0",
  ",",
  "bean2",
  ".",
  "getOarray",
  "(",
  ")",
  ".",
  "length",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testDynaBeanAttributeMap",
  "(",
  ")",
  "throws",
  "NoSuchMethodException",
  ",",
  "IllegalAccessException",
  ",",
  "InvocationTargetException",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "new",
  "JSONTestBean",
  "(",
  ")",
  ")",
  ";",
  "String",
  "jsonString",
  "=",
  "jsonObject",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "DynaBean",
  "jsonBean",
  "=",
  "(",
  "DynaBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "jsonString",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "\"\"",
  ",",
  "jsonBean",
  ".",
  "get",
  "(",
  "\"inventoryID\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFR_1768960_array_conversion",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"media2\"",
  ",",
  "MediaBean",
  ".",
  "class",
  ")",
  ";",
  "MediaListBean",
  "bean",
  "=",
  "(",
  "MediaListBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "MediaListBean",
  ".",
  "class",
  ",",
  "classMap",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ".",
  "getMedia2",
  "(",
  ")",
  ")",
  ";",
  "List",
  "media2",
  "=",
  "bean",
  ".",
  "getMedia2",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "media2",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "Object",
  "mediaItem1",
  "=",
  "media2",
  ".",
  "get",
  "(",
  "0",
  ")",
  ";",
  "assertTrue",
  "(",
  "mediaItem1",
  "instanceof",
  "MediaBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"Giggles\"",
  ",",
  "(",
  "(",
  "MediaBean",
  ")",
  "mediaItem1",
  ")",
  ".",
  "getTitle",
  "(",
  ")",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "bean",
  "=",
  "(",
  "MediaListBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "MediaListBean",
  ".",
  "class",
  ",",
  "classMap",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ".",
  "getMedia2",
  "(",
  ")",
  ")",
  ";",
  "media2",
  "=",
  "bean",
  ".",
  "getMedia2",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "media2",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "mediaItem1",
  "=",
  "media2",
  ".",
  "get",
  "(",
  "0",
  ")",
  ";",
  "assertTrue",
  "(",
  "mediaItem1",
  "instanceof",
  "MediaBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"Giggles\"",
  ",",
  "(",
  "(",
  "MediaBean",
  ")",
  "mediaItem1",
  ")",
  ".",
  "getTitle",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFR_1808430_newBeanInstance",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setNewBeanInstanceStrategy",
  "(",
  "new",
  "UnstandardBeanInstanceStrategy",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"id\"",
  ",",
  "1",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "UnstandardBean",
  ".",
  "class",
  ")",
  ";",
  "UnstandardBean",
  "bean",
  "=",
  "(",
  "UnstandardBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "UnstandardBean",
  ".",
  "class",
  ",",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "bean",
  ".",
  "getId",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFR_1832047_packageProtectedBean",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"value\"",
  ",",
  "\"42\"",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "PackageProtectedBean",
  ".",
  "class",
  ")",
  ";",
  "PackageProtectedBean",
  "bean",
  "=",
  "(",
  "PackageProtectedBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "42",
  ",",
  "bean",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFR_1832047_privateProtectedBean",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"value\"",
  ",",
  "\"42\"",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "PrivateConstructorBean",
  ".",
  "class",
  ")",
  ";",
  "PrivateConstructorBean",
  "bean",
  "=",
  "(",
  "PrivateConstructorBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "42",
  ",",
  "bean",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFR_1858073_preserveInsertionOrder",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"one\"",
  ",",
  "\"one\"",
  ")",
  ".",
  "element",
  "(",
  "\"two\"",
  ",",
  "\"two\"",
  ")",
  ".",
  "element",
  "(",
  "\"three\"",
  ",",
  "\"three\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "jsonObject",
  ".",
  "names",
  "(",
  ")",
  ";",
  "JSONArray",
  "expected",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"one\"",
  ")",
  ".",
  "element",
  "(",
  "\"two\"",
  ")",
  ".",
  "element",
  "(",
  "\"three\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObjectCurliesOnString",
  "(",
  ")",
  "{",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonObject",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"{value}\"",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"prop\"",
  ")",
  ")",
  ";",
  "json",
  "=",
  "\"\"",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonObject",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"{{value}}\"",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"prop\"",
  ")",
  ")",
  ";",
  "json",
  "=",
  "\"\"",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonObject",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"{{{value}}}\"",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"prop\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHandleJettisonEmptyElement",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setHandleJettisonEmptyElement",
  "(",
  "true",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "BeanC",
  ".",
  "class",
  ")",
  ";",
  "BeanC",
  "bean",
  "=",
  "(",
  "BeanC",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertNull",
  "(",
  "bean",
  ".",
  "getBeanA",
  "(",
  ")",
  ")",
  ";",
  "assertNull",
  "(",
  "bean",
  ".",
  "getBeanB",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHandleJettisonSingleElementArray",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"media2\"",
  ",",
  "MediaBean",
  ".",
  "class",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setHandleJettisonSingleElementArray",
  "(",
  "true",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "MediaListBean",
  ".",
  "class",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "MediaListBean",
  "bean",
  "=",
  "(",
  "MediaListBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ".",
  "getMedia2",
  "(",
  ")",
  ")",
  ";",
  "List",
  "media2",
  "=",
  "bean",
  ".",
  "getMedia2",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "media2",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "Object",
  "mediaItem1",
  "=",
  "media2",
  ".",
  "get",
  "(",
  "0",
  ")",
  ";",
  "assertTrue",
  "(",
  "mediaItem1",
  "instanceof",
  "MediaBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"Giggles\"",
  ",",
  "(",
  "(",
  "MediaBean",
  ")",
  "mediaItem1",
  ")",
  ".",
  "getTitle",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHandleJettisonSingleElementArray2",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"media\"",
  ",",
  "Media",
  ".",
  "class",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"mediaList\"",
  ",",
  "MediaList",
  ".",
  "class",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setHandleJettisonSingleElementArray",
  "(",
  "true",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "Player",
  ".",
  "class",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "Player",
  "bean",
  "=",
  "(",
  "Player",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ".",
  "getMediaList",
  "(",
  ")",
  ")",
  ";",
  "MediaList",
  "mediaList",
  "=",
  "bean",
  ".",
  "getMediaList",
  "(",
  ")",
  ";",
  "assertNotNull",
  "(",
  "mediaList",
  ".",
  "getMedia",
  "(",
  ")",
  ")",
  ";",
  "ArrayList",
  "medias",
  "=",
  "mediaList",
  ".",
  "getMedia",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"Giggles\"",
  ",",
  "(",
  "(",
  "Media",
  ")",
  "medias",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ".",
  "getTitle",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHandleJettisonSingleElementArray3",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"media\"",
  ",",
  "Media",
  ".",
  "class",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"mediaList\"",
  ",",
  "MediaList",
  ".",
  "class",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"player\"",
  ",",
  "Player",
  ".",
  "class",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setHandleJettisonSingleElementArray",
  "(",
  "true",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "PlayerList",
  ".",
  "class",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "PlayerList",
  "bean",
  "=",
  "(",
  "PlayerList",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ".",
  "getPlayer",
  "(",
  ")",
  ")",
  ";",
  "ArrayList",
  "players",
  "=",
  "bean",
  ".",
  "getPlayer",
  "(",
  ")",
  ";",
  "assertNotNull",
  "(",
  "players",
  ")",
  ";",
  "assertNotNull",
  "(",
  "players",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "Player",
  "player",
  "=",
  "(",
  "Player",
  ")",
  "players",
  ".",
  "get",
  "(",
  "0",
  ")",
  ";",
  "assertNotNull",
  "(",
  "player",
  ".",
  "getMediaList",
  "(",
  ")",
  ")",
  ";",
  "MediaList",
  "mediaList",
  "=",
  "player",
  ".",
  "getMediaList",
  "(",
  ")",
  ";",
  "assertNotNull",
  "(",
  "mediaList",
  ".",
  "getMedia",
  "(",
  ")",
  ")",
  ";",
  "ArrayList",
  "medias",
  "=",
  "mediaList",
  ".",
  "getMedia",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"Giggles\"",
  ",",
  "(",
  "(",
  "Media",
  ")",
  "medias",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ".",
  "getTitle",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testJsonWithNamespaceToDynaBean",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "jsonConfig",
  ".",
  "setJavaIdentifierTransformer",
  "(",
  "JavaIdentifierTransformer",
  ".",
  "NOOP",
  ")",
  ";",
  "String",
  "str",
  "=",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"},\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"\"",
  "+",
  "\"}\"",
  "+",
  "\"}\"",
  "+",
  "\"}]\"",
  "+",
  "\"}",
  "\"",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "str",
  ",",
  "jsonConfig",
  ")",
  ";",
  "Object",
  "bean",
  "=",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "json",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "List",
  "params",
  "=",
  "(",
  "List",
  ")",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "\"params\"",
  ")",
  ";",
  "DynaBean",
  "param0",
  "=",
  "(",
  "DynaBean",
  ")",
  "params",
  ".",
  "get",
  "(",
  "0",
  ")",
  ";",
  "DynaBean",
  "itemLookup",
  "=",
  "(",
  "DynaBean",
  ")",
  "param0",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ";",
  "assertNotNull",
  "(",
  "itemLookup",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "itemLookup",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBeanSimpleToComplexValueTransformation",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"{'id':null}\"",
  ")",
  ";",
  "IdBean",
  "idBean",
  "=",
  "(",
  "IdBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "IdBean",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "idBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "null",
  ",",
  "idBean",
  ".",
  "getId",
  "(",
  ")",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"{'id':1}\"",
  ")",
  ";",
  "idBean",
  "=",
  "(",
  "IdBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "IdBean",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "idBean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "idBean",
  ".",
  "getId",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "0L",
  ",",
  "idBean",
  ".",
  "getId",
  "(",
  ")",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ";",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "registerMorpher",
  "(",
  "new",
  "IdBean",
  ".",
  "IdMorpher",
  "(",
  ")",
  ",",
  "true",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"{'id':1}\"",
  ")",
  ";",
  "idBean",
  "=",
  "(",
  "IdBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "IdBean",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "idBean",
  ")",
  ";",
  "assertEquals",
  "(",
  "new",
  "IdBean",
  ".",
  "Id",
  "(",
  "1L",
  ")",
  ",",
  "idBean",
  ".",
  "getId",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBeanWithMultipleMorphersForTargetType",
  "(",
  ")",
  "{",
  "Calendar",
  "c",
  "=",
  "Calendar",
  ".",
  "getInstance",
  "(",
  ")",
  ";",
  "c",
  ".",
  "set",
  "(",
  "Calendar",
  ".",
  "YEAR",
  ",",
  "2007",
  ")",
  ";",
  "c",
  ".",
  "set",
  "(",
  "Calendar",
  ".",
  "MONTH",
  ",",
  "5",
  ")",
  ";",
  "c",
  ".",
  "set",
  "(",
  "Calendar",
  ".",
  "DATE",
  ",",
  "17",
  ")",
  ";",
  "c",
  ".",
  "set",
  "(",
  "Calendar",
  ".",
  "HOUR_OF_DAY",
  ",",
  "12",
  ")",
  ";",
  "c",
  ".",
  "set",
  "(",
  "Calendar",
  ".",
  "MINUTE",
  ",",
  "13",
  ")",
  ";",
  "c",
  ".",
  "set",
  "(",
  "Calendar",
  ".",
  "SECOND",
  ",",
  "14",
  ")",
  ";",
  "c",
  ".",
  "set",
  "(",
  "Calendar",
  ".",
  "MILLISECOND",
  ",",
  "150",
  ")",
  ";",
  "Date",
  "date",
  "=",
  "c",
  ".",
  "getTime",
  "(",
  ")",
  ";",
  "DateBean",
  "bean",
  "=",
  "new",
  "DateBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setDate",
  "(",
  "date",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "registerMorpher",
  "(",
  "new",
  "MapToDateMorpher",
  "(",
  ")",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "DateBean",
  ".",
  "class",
  ")",
  ";",
  "DateBean",
  "actual",
  "=",
  "(",
  "DateBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "Calendar",
  "d",
  "=",
  "Calendar",
  ".",
  "getInstance",
  "(",
  ")",
  ";",
  "d",
  ".",
  "setTime",
  "(",
  "actual",
  ".",
  "getDate",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "c",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "YEAR",
  ")",
  ",",
  "d",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "YEAR",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "c",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "MONTH",
  ")",
  ",",
  "d",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "MONTH",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "c",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "DATE",
  ")",
  ",",
  "d",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "DATE",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "c",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "HOUR_OF_DAY",
  ")",
  ",",
  "d",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "HOUR_OF_DAY",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "c",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "MINUTE",
  ")",
  ",",
  "d",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "MINUTE",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "c",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "SECOND",
  ")",
  ",",
  "d",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "SECOND",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "c",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "MILLISECOND",
  ")",
  ",",
  "d",
  ".",
  "get",
  "(",
  "Calendar",
  ".",
  "MILLISECOND",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBeanWithInterfaceField",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "InterfaceBean",
  ".",
  "class",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "classMap",
  ".",
  "put",
  "(",
  "\"runnable\"",
  ",",
  "RunnableImpl",
  ".",
  "class",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "InterfaceBean",
  "bean",
  "=",
  "(",
  "InterfaceBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ".",
  "getRunnable",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "bean",
  ".",
  "getRunnable",
  "(",
  ")",
  "instanceof",
  "RunnableImpl",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCycleDetection_withExclusions",
  "(",
  ")",
  "{",
  "ParentBean",
  "parent",
  "=",
  "new",
  "ParentBean",
  "(",
  ")",
  ";",
  "parent",
  ".",
  "setChild",
  "(",
  "new",
  "ChildBean",
  "(",
  ")",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setExcludes",
  "(",
  "new",
  "String",
  "[",
  "]",
  "{",
  "\"parent\"",
  "}",
  ")",
  ";",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "parent",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testJSONArrayIterator",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "add",
  "(",
  "\"1\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "add",
  "(",
  "\"2\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "add",
  "(",
  "\"3\"",
  ")",
  ";",
  "List",
  "list",
  "=",
  "new",
  "LinkedList",
  "(",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "\"4\"",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "\"5\"",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "\"6\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "add",
  "(",
  "list",
  ")",
  ";",
  "List",
  "newList",
  "=",
  "new",
  "LinkedList",
  "(",
  ")",
  ";",
  "newList",
  ".",
  "add",
  "(",
  "\"7\"",
  ")",
  ";",
  "newList",
  ".",
  "add",
  "(",
  "\"8\"",
  ")",
  ";",
  "newList",
  ".",
  "add",
  "(",
  "\"9\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ",",
  "jsonArray",
  ")",
  ";",
  "ListIterator",
  "listIterator",
  "=",
  "jsonArray",
  ".",
  "listIterator",
  "(",
  ")",
  ";",
  "listIterator",
  ".",
  "add",
  "(",
  "newList",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ",",
  "jsonArray",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testJSONArray_badFormattedString",
  "(",
  ")",
  "{",
  "String",
  "badJson",
  "=",
  "\"[{\\\"a\\\":\\\"b\\\"},\"",
  ";",
  "try",
  "{",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "badJson",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "assertTrue",
  "(",
  "jsone",
  ".",
  "getMessage",
  "(",
  ")",
  ".",
  "startsWith",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testJSONObject_badFormattedString",
  "(",
  ")",
  "{",
  "String",
  "badJson",
  "=",
  "\"{\\\"a\\\":\\\"b\\\"},\"",
  ";",
  "try",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "badJson",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "assertTrue",
  "(",
  "jsone",
  ".",
  "getMessage",
  "(",
  ")",
  ".",
  "startsWith",
  "(",
  "\"\"",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "testQuotedFunctions",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "json",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  "instanceof",
  "String",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"func\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testJsonWithNullKeys",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"key\"",
  ",",
  "\"value\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "null",
  ",",
  "\"value2\"",
  ")",
  ";",
  "Object",
  "[",
  "]",
  "obj",
  "=",
  "{",
  "map",
  "}",
  ";",
  "try",
  "{",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "obj",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testJsonWithNullKeys2",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"key\"",
  ",",
  "\"value\"",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "null",
  ",",
  "\"value2\"",
  ")",
  ";",
  "try",
  "{",
  "System",
  ".",
  "err",
  ".",
  "println",
  "(",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "map",
  ")",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testJSONArray_JavascriptCompliant",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setJavascriptCompliant",
  "(",
  "true",
  ")",
  ";",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "json",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "array",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "array",
  ".",
  "get",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testJSONArray_JavascriptComplian2t",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setJavascriptCompliant",
  "(",
  "true",
  ")",
  ";",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "\"null\"",
  ",",
  "jsonConfig",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "\"undefined\"",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "array",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "array",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "array",
  ".",
  "get",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testJSONObject_JavascriptCompliant",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setJavascriptCompliant",
  "(",
  "true",
  ")",
  ";",
  "String",
  "json",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "object",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "json",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "object",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "object",
  ".",
  "get",
  "(",
  "\"key2\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testJSONObject_JavascriptCompliant2",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setJavascriptCompliant",
  "(",
  "true",
  ")",
  ";",
  "JSONObject",
  "object",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "object",
  ".",
  "element",
  "(",
  "\"key1\"",
  ",",
  "\"null\"",
  ",",
  "jsonConfig",
  ")",
  ";",
  "object",
  ".",
  "element",
  "(",
  "\"key2\"",
  ",",
  "\"undefined\"",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "object",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "object",
  ".",
  "get",
  "(",
  "\"key2\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testJSONObject_fromObject_FieldBean",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setIgnorePublicFields",
  "(",
  "false",
  ")",
  ";",
  "FieldBean",
  "bean",
  "=",
  "new",
  "FieldBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setValue",
  "(",
  "42",
  ")",
  ";",
  "bean",
  ".",
  "string",
  "=",
  "\"stringy\"",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "42",
  ",",
  "jsonObject",
  ".",
  "getInt",
  "(",
  "\"value\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "jsonObject",
  ".",
  "has",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "jsonObject",
  ")",
  ";",
  "assertEquals",
  "(",
  "42",
  ",",
  "jsonObject",
  ".",
  "getInt",
  "(",
  "\"value\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"stringy\"",
  ",",
  "jsonObject",
  ".",
  "getString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testJSONObject_toBean_FieldBean",
  "(",
  ")",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"value\"",
  ",",
  "42",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"stringy\"",
  ")",
  ";",
  "FieldBean",
  "bean1",
  "=",
  "(",
  "FieldBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "FieldBean",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean1",
  ")",
  ";",
  "assertEquals",
  "(",
  "42",
  ",",
  "bean1",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ";",
  "assertNull",
  "(",
  "bean1",
  ".",
  "string",
  ")",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setIgnorePublicFields",
  "(",
  "false",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "FieldBean",
  ".",
  "class",
  ")",
  ";",
  "FieldBean",
  "bean2",
  "=",
  "(",
  "FieldBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean2",
  ")",
  ";",
  "assertEquals",
  "(",
  "42",
  ",",
  "bean1",
  ".",
  "getValue",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"stringy\"",
  ",",
  "bean2",
  ".",
  "string",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_2692698",
  "(",
  ")",
  "{",
  "String",
  "input",
  "=",
  "\"\"",
  ";",
  "JSON",
  "json",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "input",
  ")",
  ";",
  "String",
  "output",
  "=",
  "json",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "assertEquals",
  "(",
  "input",
  ",",
  "output",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testWithoutAnyTroubleTheyMayBeAlreadyDoneByOtherTest",
  "(",
  ")",
  "{",
  "JsonConfig",
  "tConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "tConfig",
  ".",
  "enableEventTriggering",
  "(",
  ")",
  ";",
  "tConfig",
  ".",
  "addJsonEventListener",
  "(",
  "new",
  "JsonErrorDetector",
  "(",
  ")",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ",",
  "tConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "optString",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "\"aString\"",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ",",
  "tConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"integer\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "10",
  ",",
  "jsonObject",
  ".",
  "optInt",
  "(",
  "\"integer\"",
  ")",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ",",
  "tConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"double\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "2.02d",
  ",",
  "jsonObject",
  ".",
  "optDouble",
  "(",
  "\"double\"",
  ")",
  ",",
  "0.0001",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ",",
  "tConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"boolean\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "true",
  ",",
  "jsonObject",
  ".",
  "optBoolean",
  "(",
  "\"boolean\"",
  ")",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ",",
  "tConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"strArray\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"strArray\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "\"a\"",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"strArray\"",
  ")",
  ".",
  "optString",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "\"b\"",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"strArray\"",
  ")",
  ".",
  "optString",
  "(",
  "1",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "\"c\"",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"strArray\"",
  ")",
  ".",
  "optString",
  "(",
  "2",
  ")",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ",",
  "tConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"intArray\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"intArray\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "1",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"intArray\"",
  ")",
  ".",
  "optInt",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "2",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"intArray\"",
  ")",
  ".",
  "optInt",
  "(",
  "1",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "3",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"intArray\"",
  ")",
  ".",
  "optInt",
  "(",
  "2",
  ")",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ",",
  "tConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"booleanArray\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"booleanArray\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "true",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"booleanArray\"",
  ")",
  ".",
  "optBoolean",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "false",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"booleanArray\"",
  ")",
  ".",
  "optBoolean",
  "(",
  "1",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "true",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"booleanArray\"",
  ")",
  ".",
  "optBoolean",
  "(",
  "2",
  ")",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ",",
  "tConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"doubleArray\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"doubleArray\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "\"a\"",
  ",",
  "jsonObject",
  ".",
  "optJSONArray",
  "(",
  "\"doubleArray\"",
  ")",
  ".",
  "optString",
  "(",
  "0",
  ")",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ",",
  "tConfig",
  ")",
  ";",
  "assertTrue",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"weirdString\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "optString",
  "(",
  "\"weirdString\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "\"[Hello]\"",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"weirdString\"",
  ")",
  ")",
  ";",
  "jsonObject",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "containsKey",
  "(",
  "\"weirdString\"",
  ")",
  ")",
  ";",
  "assertNotNull",
  "(",
  "\"\"",
  ",",
  "jsonObject",
  ".",
  "optString",
  "(",
  "\"weirdString\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "\"{912}\"",
  ",",
  "jsonObject",
  ".",
  "get",
  "(",
  "\"weirdString\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_2893329",
  "(",
  ")",
  "{",
  "String",
  "jsonStr",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "jsonStr",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"'hello'\"",
  ",",
  "json",
  ".",
  "getString",
  "(",
  "\"x\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testBug_3047519",
  "(",
  ")",
  "{",
  "String",
  "jsonStr",
  "=",
  "\"\"",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "jsonStr",
  ")",
  ";",
  "Object",
  "data",
  "=",
  "json",
  ".",
  "get",
  "(",
  "\"data\"",
  ")",
  ";",
  "assertTrue",
  "(",
  "data",
  "instanceof",
  "String",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"[1,2,3]\"",
  ",",
  "data",
  ")",
  ";",
  "}",
  "public",
  "static",
  "class",
  "RunnableImpl",
  "implements",
  "Runnable",
  "{",
  "public",
  "void",
  "run",
  "(",
  ")",
  "{",
  "}",
  "}",
  "public",
  "static",
  "class",
  "JsonErrorDetector",
  "implements",
  "JsonEventListener",
  "{",
  "public",
  "void",
  "onArrayEnd",
  "(",
  ")",
  "{",
  "}",
  "public",
  "void",
  "onArrayStart",
  "(",
  ")",
  "{",
  "}",
  "public",
  "void",
  "onElementAdded",
  "(",
  "int",
  "index",
  ",",
  "Object",
  "element",
  ")",
  "{",
  "}",
  "public",
  "void",
  "onError",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "fail",
  "(",
  "\"\"",
  "+",
  "jsone",
  ".",
  "getMessage",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "onObjectEnd",
  "(",
  ")",
  "{",
  "}",
  "public",
  "void",
  "onObjectStart",
  "(",
  ")",
  "{",
  "}",
  "public",
  "void",
  "onPropertySet",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "boolean",
  "accumulated",
  ")",
  "{",
  "}",
  "public",
  "void",
  "onWarning",
  "(",
  "String",
  "warning",
  ")",
  "{",
  "}",
  "}",
  "protected",
  "void",
  "setUp",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "super",
  ".",
  "setUp",
  "(",
  ")",
  ";",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,471 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "regexp",
  ";",
  "public",
  "class",
  "TestJdkRegexpMatcher",
  "extends",
  "AbstractRegexpMatcherTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJdkRegexpMatcher",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJdkRegexpMatcher",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "RegexpMatcher",
  "getRegexpMatcher",
  "(",
  "String",
  "pattern",
  ")",
  "{",
  "return",
  "new",
  "JdkRegexpMatcher",
  "(",
  "pattern",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,472 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "regexp",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestSuite",
  ";",
  "public",
  "class",
  "AllTests",
  "extends",
  "TestSuite",
  "{",
  "public",
  "static",
  "TestSuite",
  "suite",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "TestSuite",
  "suite",
  "=",
  "new",
  "TestSuite",
  "(",
  ")",
  ";",
  "suite",
  ".",
  "setName",
  "(",
  "\"regexp\"",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJdkRegexpMatcher",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestPerl5RegexpMatcher",
  ".",
  "class",
  ")",
  ")",
  ";",
  "return",
  "suite",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,473 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "regexp",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "public",
  "abstract",
  "class",
  "AbstractRegexpMatcherTestCase",
  "extends",
  "TestCase",
  "{",
  "public",
  "AbstractRegexpMatcherTestCase",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testGetGroupIfMatches",
  "(",
  ")",
  "{",
  "RegexpMatcher",
  "regexpMatcher",
  "=",
  "getRegexpMatcher",
  "(",
  "\"\"",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"123\"",
  ",",
  "regexpMatcher",
  ".",
  "getGroupIfMatches",
  "(",
  "\"abc123edf\"",
  ",",
  "1",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"\"",
  ",",
  "regexpMatcher",
  ".",
  "getGroupIfMatches",
  "(",
  "\"abcedf\"",
  ",",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testMatches",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "getRegexpMatcher",
  "(",
  "\".*\"",
  ")",
  ".",
  "matches",
  "(",
  "\"everything\"",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "getRegexpMatcher",
  "(",
  "\"^json$\"",
  ")",
  ".",
  "matches",
  "(",
  "\"json\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "getRegexpMatcher",
  "(",
  "\"^json$\"",
  ")",
  ".",
  "matches",
  "(",
  "\"json",
  "\"",
  ")",
  ")",
  ";",
  "}",
  "protected",
  "abstract",
  "RegexpMatcher",
  "getRegexpMatcher",
  "(",
  "String",
  "pattern",
  ")",
  ";",
  "}",
  "</s>"
] | 
| 11,474 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "regexp",
  ";",
  "public",
  "class",
  "TestPerl5RegexpMatcher",
  "extends",
  "AbstractRegexpMatcherTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestPerl5RegexpMatcher",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestPerl5RegexpMatcher",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "RegexpMatcher",
  "getRegexpMatcher",
  "(",
  "String",
  "pattern",
  ")",
  "{",
  "return",
  "new",
  "Perl5RegexpMatcher",
  "(",
  "pattern",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,475 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "public",
  "class",
  "TestJSONObjectEqualsHashCodeCompareTo",
  "extends",
  "TestCase",
  "{",
  "private",
  "static",
  "JSONObject",
  "strings",
  ";",
  "private",
  "static",
  "Map",
  "values",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "private",
  "static",
  "JSONObject",
  "values1",
  ";",
  "private",
  "static",
  "JSONObject",
  "values2",
  ";",
  "private",
  "static",
  "JSONObject",
  "values3",
  ";",
  "static",
  "{",
  "values",
  ".",
  "put",
  "(",
  "\"\"",
  ",",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"\"",
  ",",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"int.1\"",
  ",",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"int.2\"",
  ",",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"2\"",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"long.1\"",
  ",",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"long.2\"",
  ",",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"2\"",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"string.1\"",
  ",",
  "\"1\"",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"string.2\"",
  ",",
  "\"2\"",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"boolean.1\"",
  ",",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"boolean.2\"",
  ",",
  "Boolean",
  ".",
  "FALSE",
  ")",
  ";",
  "strings",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"int\"",
  ",",
  "\"1\"",
  ")",
  ".",
  "element",
  "(",
  "\"long\"",
  ",",
  "\"1\"",
  ")",
  ".",
  "element",
  "(",
  "\"boolean\"",
  ",",
  "\"true\"",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"string\"",
  ")",
  ".",
  "element",
  "(",
  "\"func\"",
  ",",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"array\"",
  ",",
  "\"[1,2,3]\"",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"\"",
  ",",
  "strings",
  ")",
  ";",
  "values1",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"int\"",
  ",",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "\"long\"",
  ",",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "\"boolean\"",
  ",",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"string\"",
  ")",
  ".",
  "element",
  "(",
  "\"func\"",
  ",",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "\"array\"",
  ",",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"\"",
  ",",
  "values1",
  ")",
  ";",
  "values2",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"int\"",
  ",",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "\"long\"",
  ",",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "\"boolean\"",
  ",",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"string\"",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"\"",
  ",",
  "values2",
  ")",
  ";",
  "values3",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"int\"",
  ",",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"2\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "\"long\"",
  ",",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"2\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "\"boolean\"",
  ",",
  "Boolean",
  ".",
  "FALSE",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ",",
  "\"string2\"",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"\"",
  ",",
  "values3",
  ")",
  ";",
  "}",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONObjectEqualsHashCodeCompareTo",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONObjectEqualsHashCodeCompareTo",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_different_size",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "-",
  "1",
  ",",
  "values2",
  ".",
  "compareTo",
  "(",
  "strings",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "strings",
  ".",
  "compareTo",
  "(",
  "values2",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_null",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "-",
  "1",
  ",",
  "strings",
  ".",
  "compareTo",
  "(",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_object",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "-",
  "1",
  ",",
  "strings",
  ".",
  "compareTo",
  "(",
  "new",
  "Object",
  "(",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_same_array",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "0",
  ",",
  "strings",
  ".",
  "compareTo",
  "(",
  "strings",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_same_size_different_values",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "-",
  "1",
  ",",
  "values2",
  ".",
  "compareTo",
  "(",
  "values3",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_same_size_similar_values",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "0",
  ",",
  "strings",
  ".",
  "compareTo",
  "(",
  "values1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_different_key_same_size",
  "(",
  ")",
  "{",
  "JSONObject",
  "a",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"key1\"",
  ",",
  "\"string\"",
  ")",
  ";",
  "JSONObject",
  "b",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"key2\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "assertFalse",
  "(",
  "a",
  ".",
  "equals",
  "(",
  "b",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "b",
  ".",
  "equals",
  "(",
  "a",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_different_sizes",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "equals",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_nullObject_other",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "equals",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_nullObjects_different",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "equals",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_other_nullObject",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "equals",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_same",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "equals",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_same_key_different_value",
  "(",
  ")",
  "{",
  "JSONObject",
  "a",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"key\"",
  ",",
  "\"string\"",
  ")",
  ";",
  "JSONObject",
  "b",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"key\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "assertFalse",
  "(",
  "a",
  ".",
  "equals",
  "(",
  "b",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "b",
  ".",
  "equals",
  "(",
  "a",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_strings_values",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "equals",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_to_null",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "equals",
  "(",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_to_other",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "equals",
  "(",
  "new",
  "Object",
  "(",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_values_strings",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "equals",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHashCode_different_size",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  "==",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHashCode_nullObject_other",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  "==",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHashCode_nullObjects_different",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  "==",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHashCode_other_nullObject",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  "==",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHashCode_same",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  "==",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHashCode_same_key_different_value",
  "(",
  ")",
  "{",
  "JSONObject",
  "a",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"key\"",
  ",",
  "\"string\"",
  ")",
  ";",
  "JSONObject",
  "b",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"key\"",
  ",",
  "\"json\"",
  ")",
  ";",
  "assertFalse",
  "(",
  "a",
  ".",
  "hashCode",
  "(",
  ")",
  "==",
  "b",
  ".",
  "hashCode",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHashCode_strings_values",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  "==",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHashCode_to_other",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  "==",
  "new",
  "Object",
  "(",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHashCode_values_strings",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  "==",
  "values",
  ".",
  "get",
  "(",
  "\"\"",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,476 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaClass",
  ";",
  "public",
  "class",
  "TestJSONArrayStaticBuilders_Array_DynaBean",
  "extends",
  "AbstractJSONArrayStaticBuildersTestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONArrayStaticBuilders_Array_DynaBean",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONArrayStaticBuilders_Array_DynaBean",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "protected",
  "Object",
  "getSource",
  "(",
  ")",
  "{",
  "Map",
  "map",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "String",
  "[",
  "]",
  "props",
  "=",
  "getProperties",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "props",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "map",
  ".",
  "put",
  "(",
  "props",
  "[",
  "i",
  "]",
  ",",
  "PropertyConstants",
  ".",
  "getPropertyClass",
  "(",
  "props",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "map",
  ".",
  "put",
  "(",
  "\"class\"",
  ",",
  "Class",
  ".",
  "class",
  ")",
  ";",
  "map",
  ".",
  "put",
  "(",
  "\"pexcluded\"",
  ",",
  "String",
  ".",
  "class",
  ")",
  ";",
  "MorphDynaClass",
  "dynaClass",
  "=",
  "new",
  "MorphDynaClass",
  "(",
  "map",
  ")",
  ";",
  "MorphDynaBean",
  "dynaBean",
  "=",
  "null",
  ";",
  "try",
  "{",
  "dynaBean",
  "=",
  "(",
  "MorphDynaBean",
  ")",
  "dynaClass",
  ".",
  "newInstance",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "props",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "dynaBean",
  ".",
  "set",
  "(",
  "props",
  "[",
  "i",
  "]",
  ",",
  "PropertyConstants",
  ".",
  "getPropertyValue",
  "(",
  "props",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"class\"",
  ",",
  "Object",
  ".",
  "class",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"pexcluded\"",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "RuntimeException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "return",
  "new",
  "Object",
  "[",
  "]",
  "{",
  "dynaBean",
  "}",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,477 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "public",
  "class",
  "TestJSONArrayEqualsHashCodeCompareTo",
  "extends",
  "TestCase",
  "{",
  "private",
  "static",
  "JSONArray",
  "strings",
  ";",
  "private",
  "static",
  "Map",
  "values",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "private",
  "static",
  "JSONArray",
  "values1",
  ";",
  "private",
  "static",
  "JSONArray",
  "values2",
  ";",
  "private",
  "static",
  "JSONArray",
  "values3",
  ";",
  "static",
  "{",
  "values",
  ".",
  "put",
  "(",
  "\"int.1\"",
  ",",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"int.2\"",
  ",",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"2\"",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"long.1\"",
  ",",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"long.2\"",
  ",",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"2\"",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"string.1\"",
  ",",
  "\"1\"",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"string.2\"",
  ",",
  "\"2\"",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"boolean.1\"",
  ",",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"boolean.2\"",
  ",",
  "Boolean",
  ".",
  "FALSE",
  ")",
  ";",
  "strings",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"1\"",
  ")",
  ".",
  "element",
  "(",
  "\"1\"",
  ")",
  ".",
  "element",
  "(",
  "\"true\"",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ")",
  ".",
  "element",
  "(",
  "\"\"",
  ")",
  ".",
  "element",
  "(",
  "\"[1,2,3]\"",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"\"",
  ",",
  "strings",
  ")",
  ";",
  "values1",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ")",
  ".",
  "element",
  "(",
  "new",
  "JSONFunction",
  "(",
  "\"return",
  "this;\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "int",
  "[",
  "]",
  "{",
  "1",
  ",",
  "2",
  ",",
  "3",
  "}",
  ")",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"\"",
  ",",
  "values1",
  ")",
  ";",
  "values2",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"1\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ".",
  "element",
  "(",
  "\"string\"",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"\"",
  ",",
  "values2",
  ")",
  ";",
  "values3",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "Integer",
  ".",
  "valueOf",
  "(",
  "\"2\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "Long",
  ".",
  "valueOf",
  "(",
  "\"2\"",
  ")",
  ")",
  ".",
  "element",
  "(",
  "Boolean",
  ".",
  "FALSE",
  ")",
  ".",
  "element",
  "(",
  "\"string2\"",
  ")",
  ";",
  "values",
  ".",
  "put",
  "(",
  "\"\"",
  ",",
  "values3",
  ")",
  ";",
  "}",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONArrayEqualsHashCodeCompareTo",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONArrayEqualsHashCodeCompareTo",
  "(",
  "String",
  "name",
  ")",
  "{",
  "super",
  "(",
  "name",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_different_size",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "-",
  "1",
  ",",
  "values2",
  ".",
  "compareTo",
  "(",
  "strings",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "strings",
  ".",
  "compareTo",
  "(",
  "values2",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_null",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "-",
  "1",
  ",",
  "strings",
  ".",
  "compareTo",
  "(",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_object",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "-",
  "1",
  ",",
  "strings",
  ".",
  "compareTo",
  "(",
  "new",
  "Object",
  "(",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_same_array",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "0",
  ",",
  "strings",
  ".",
  "compareTo",
  "(",
  "strings",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_same_size_different_values",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "-",
  "1",
  ",",
  "values2",
  ".",
  "compareTo",
  "(",
  "values3",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testCompareTo_same_size_similar_values",
  "(",
  ")",
  "{",
  "assertEquals",
  "(",
  "0",
  ",",
  "strings",
  ".",
  "compareTo",
  "(",
  "values1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_different_elements_same_size",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "values2",
  ".",
  "equals",
  "(",
  "values3",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "values3",
  ".",
  "equals",
  "(",
  "values2",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_null",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "strings",
  ".",
  "equals",
  "(",
  "null",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_object",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "strings",
  ".",
  "equals",
  "(",
  "new",
  "Object",
  "(",
  ")",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_same_object",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "strings",
  ".",
  "equals",
  "(",
  "strings",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testEquals_same_size_similar_values",
  "(",
  ")",
  "{",
  "assertTrue",
  "(",
  "strings",
  ".",
  "equals",
  "(",
  "values1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testHashCode_different_elements_same_size",
  "(",
  ")",
  "{",
  "assertFalse",
  "(",
  "values2",
  ".",
  "hashCode",
  "(",
  ")",
  "==",
  "values3",
  ".",
  "hashCode",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,478 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestSuite",
  ";",
  "public",
  "class",
  "AllTests",
  "extends",
  "TestSuite",
  "{",
  "public",
  "static",
  "TestSuite",
  "suite",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "TestSuite",
  "suite",
  "=",
  "new",
  "TestSuite",
  "(",
  ")",
  ";",
  "suite",
  ".",
  "setName",
  "(",
  "\"core\"",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectStaticBuilders_ObjectBean",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectStaticBuilders_PrimitiveBean",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectStaticBuilders_DynaBean",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectStaticBuilders_JSONObject",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectStaticBuilders_JSONString",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectStaticBuilders_JSONTokener",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectStaticBuilders_Map",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectStaticBuilders_String",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONArrayStaticBuilders_Array_DynaBean",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONArrayStaticBuilders_Collection_DynaBean",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONArrayStaticBuilders_JSONString",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONArrayStaticBuilders_String",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONFunction",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONArray",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObject",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONSerializer",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONArrayAsJSON",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONNullAsJSON",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectWithProcessors",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectEqualsHashCodeCompareTo",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONArrayEqualsHashCodeCompareTo",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectEvents",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONArrayEvents",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONObjectAsMap",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONArrayAsList",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestUserSubmitted",
  ".",
  "class",
  ")",
  ")",
  ";",
  "suite",
  ".",
  "addTest",
  "(",
  "new",
  "TestSuite",
  "(",
  "TestJSONArrayCollections",
  ".",
  "class",
  ")",
  ")",
  ";",
  "return",
  "suite",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,479 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "public",
  "class",
  "AnnotatedBean",
  "{",
  "private",
  "String",
  "string1",
  ";",
  "@",
  "JsonAnnotation",
  "private",
  "String",
  "string2",
  ";",
  "private",
  "String",
  "string3",
  ";",
  "public",
  "String",
  "getString1",
  "(",
  ")",
  "{",
  "return",
  "string1",
  ";",
  "}",
  "public",
  "void",
  "setString1",
  "(",
  "String",
  "string",
  ")",
  "{",
  "this",
  ".",
  "string1",
  "=",
  "string",
  ";",
  "}",
  "public",
  "String",
  "getString2",
  "(",
  ")",
  "{",
  "return",
  "string2",
  ";",
  "}",
  "public",
  "void",
  "setString2",
  "(",
  "String",
  "string",
  ")",
  "{",
  "this",
  ".",
  "string2",
  "=",
  "string",
  ";",
  "}",
  "@",
  "JsonAnnotation",
  "public",
  "String",
  "getString3",
  "(",
  ")",
  "{",
  "return",
  "string3",
  ";",
  "}",
  "public",
  "void",
  "setString3",
  "(",
  "String",
  "string",
  ")",
  "{",
  "this",
  ".",
  "string3",
  "=",
  "string",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,480 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Set",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashSet",
  ";",
  "public",
  "class",
  "EnumBean",
  "{",
  "private",
  "JsonEnum",
  "jsonEnum",
  ";",
  "private",
  "String",
  "string",
  ";",
  "private",
  "Set",
  "<",
  "JsonEnum",
  ">",
  "enums",
  "=",
  "new",
  "HashSet",
  "<",
  "JsonEnum",
  ">",
  "(",
  ")",
  ";",
  "public",
  "JsonEnum",
  "getJsonEnum",
  "(",
  ")",
  "{",
  "return",
  "jsonEnum",
  ";",
  "}",
  "public",
  "String",
  "getString",
  "(",
  ")",
  "{",
  "return",
  "string",
  ";",
  "}",
  "public",
  "Set",
  "<",
  "JsonEnum",
  ">",
  "getEnums",
  "(",
  ")",
  "{",
  "return",
  "enums",
  ";",
  "}",
  "public",
  "void",
  "setJsonEnum",
  "(",
  "JsonEnum",
  "jsonEnum",
  ")",
  "{",
  "this",
  ".",
  "jsonEnum",
  "=",
  "jsonEnum",
  ";",
  "}",
  "public",
  "void",
  "setString",
  "(",
  "String",
  "string",
  ")",
  "{",
  "this",
  ".",
  "string",
  "=",
  "string",
  ";",
  "}",
  "public",
  "void",
  "setEnums",
  "(",
  "Set",
  "<",
  "JsonEnum",
  ">",
  "enums",
  ")",
  "{",
  "this",
  ".",
  "enums",
  "=",
  "enums",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,481 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "@",
  "JsonAnnotation",
  "(",
  "\"json\"",
  ")",
  "public",
  "class",
  "AnnotationBean",
  "{",
  "private",
  "String",
  "string",
  ";",
  "public",
  "String",
  "getString",
  "(",
  ")",
  "{",
  "return",
  "string",
  ";",
  "}",
  "public",
  "void",
  "setString",
  "(",
  "String",
  "string",
  ")",
  "{",
  "this",
  ".",
  "string",
  "=",
  "string",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,482 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "annotation",
  ".",
  "Retention",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "annotation",
  ".",
  "RetentionPolicy",
  ";",
  "@",
  "Retention",
  "(",
  "RetentionPolicy",
  ".",
  "RUNTIME",
  ")",
  "public",
  "@",
  "interface",
  "JsonAnnotation",
  "{",
  "String",
  "value",
  "(",
  ")",
  "default",
  "\"\"",
  ";",
  "}",
  "</s>"
] | 
| 11,483 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashSet",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Set",
  ";",
  "public",
  "class",
  "GenericsBean",
  "{",
  "private",
  "List",
  "<",
  "GenericsInternalBean",
  ">",
  "genericsInternalBeanList",
  ";",
  "private",
  "List",
  "noTypeList",
  ";",
  "private",
  "ArrayList",
  "<",
  "String",
  ">",
  "stringArrayList",
  ";",
  "private",
  "HashSet",
  "<",
  "String",
  ">",
  "stringHashSet",
  ";",
  "private",
  "List",
  "<",
  "String",
  ">",
  "stringList",
  ";",
  "private",
  "Set",
  "<",
  "String",
  ">",
  "stringSet",
  ";",
  "public",
  "List",
  "<",
  "GenericsInternalBean",
  ">",
  "getGenericsInternalBeanList",
  "(",
  ")",
  "{",
  "return",
  "genericsInternalBeanList",
  ";",
  "}",
  "public",
  "List",
  "getNoTypeList",
  "(",
  ")",
  "{",
  "return",
  "noTypeList",
  ";",
  "}",
  "public",
  "ArrayList",
  "<",
  "String",
  ">",
  "getStringArrayList",
  "(",
  ")",
  "{",
  "return",
  "stringArrayList",
  ";",
  "}",
  "public",
  "HashSet",
  "<",
  "String",
  ">",
  "getStringHashSet",
  "(",
  ")",
  "{",
  "return",
  "stringHashSet",
  ";",
  "}",
  "public",
  "List",
  "<",
  "String",
  ">",
  "getStringList",
  "(",
  ")",
  "{",
  "return",
  "stringList",
  ";",
  "}",
  "public",
  "Set",
  "<",
  "String",
  ">",
  "getStringSet",
  "(",
  ")",
  "{",
  "return",
  "stringSet",
  ";",
  "}",
  "public",
  "void",
  "setGenericsInternalBeanList",
  "(",
  "List",
  "<",
  "GenericsInternalBean",
  ">",
  "genericsInternalBeanList",
  ")",
  "{",
  "this",
  ".",
  "genericsInternalBeanList",
  "=",
  "genericsInternalBeanList",
  ";",
  "}",
  "public",
  "void",
  "setNoTypeList",
  "(",
  "List",
  "noTypeList",
  ")",
  "{",
  "this",
  ".",
  "noTypeList",
  "=",
  "noTypeList",
  ";",
  "}",
  "public",
  "void",
  "setStringArrayList",
  "(",
  "ArrayList",
  "<",
  "String",
  ">",
  "stringArrayList",
  ")",
  "{",
  "this",
  ".",
  "stringArrayList",
  "=",
  "stringArrayList",
  ";",
  "}",
  "public",
  "void",
  "setStringHashSet",
  "(",
  "HashSet",
  "<",
  "String",
  ">",
  "stringHashSet",
  ")",
  "{",
  "this",
  ".",
  "stringHashSet",
  "=",
  "stringHashSet",
  ";",
  "}",
  "public",
  "void",
  "setStringList",
  "(",
  "List",
  "<",
  "String",
  ">",
  "stringList",
  ")",
  "{",
  "this",
  ".",
  "stringList",
  "=",
  "stringList",
  ";",
  "}",
  "public",
  "void",
  "setStringSet",
  "(",
  "Set",
  "<",
  "String",
  ">",
  "stringSet",
  ")",
  "{",
  "this",
  ".",
  "stringSet",
  "=",
  "stringSet",
  ";",
  "}",
  "public",
  "static",
  "class",
  "GenericsInternalBean",
  "{",
  "private",
  "String",
  "string",
  ";",
  "public",
  "String",
  "getString",
  "(",
  ")",
  "{",
  "return",
  "string",
  ";",
  "}",
  "public",
  "void",
  "setString",
  "(",
  "String",
  "string",
  ")",
  "{",
  "this",
  ".",
  "string",
  "=",
  "string",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,484 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ";",
  "public",
  "enum",
  "JsonEnum",
  "{",
  "ARRAY",
  ",",
  "OBJECT",
  "}",
  "</s>"
] | 
| 11,485 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "annotation",
  ".",
  "Annotation",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "Morpher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "MorphDynaClass",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONObject",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JsonConfig",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "AnnotationBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "AnnotatedBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "EnumBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "JsonEnum",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "JsonAnnotation",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "EnumMorpher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JSONUtils",
  ";",
  "public",
  "class",
  "TestJSONObjectJdk15",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONObjectJdk15",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONObjectJdk15",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromBean_AnnotationBean",
  "(",
  ")",
  "{",
  "AnnotationBean",
  "bean",
  "=",
  "new",
  "AnnotationBean",
  "(",
  ")",
  ";",
  "Annotation",
  "[",
  "]",
  "annotations",
  "=",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "getAnnotations",
  "(",
  ")",
  ";",
  "try",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "annotations",
  "[",
  "0",
  "]",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testFromBean_Enum",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "JsonEnum",
  ".",
  "OBJECT",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testFromBean_EnumBean",
  "(",
  ")",
  "{",
  "EnumBean",
  "bean",
  "=",
  "new",
  "EnumBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setJsonEnum",
  "(",
  "JsonEnum",
  ".",
  "OBJECT",
  ")",
  ";",
  "bean",
  ".",
  "setString",
  "(",
  "\"string\"",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertEquals",
  "(",
  "JsonEnum",
  ".",
  "OBJECT",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"jsonEnum\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"string\"",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_AnnotationBean",
  "(",
  ")",
  "{",
  "AnnotationBean",
  "bean",
  "=",
  "new",
  "AnnotationBean",
  "(",
  ")",
  ";",
  "Annotation",
  "[",
  "]",
  "annotations",
  "=",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "getAnnotations",
  "(",
  ")",
  ";",
  "try",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "annotations",
  "[",
  "0",
  "]",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testFromObject_DynaBean__Enum",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "Map",
  "properties",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"jsonEnum\"",
  ",",
  "JsonEnum",
  ".",
  "class",
  ")",
  ";",
  "MorphDynaClass",
  "dynaClass",
  "=",
  "new",
  "MorphDynaClass",
  "(",
  "properties",
  ")",
  ";",
  "MorphDynaBean",
  "dynaBean",
  "=",
  "(",
  "MorphDynaBean",
  ")",
  "dynaClass",
  ".",
  "newInstance",
  "(",
  ")",
  ";",
  "dynaBean",
  ".",
  "setDynaBeanClass",
  "(",
  "dynaClass",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "\"jsonEnum\"",
  ",",
  "JsonEnum",
  ".",
  "OBJECT",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "dynaBean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertEquals",
  "(",
  "JsonEnum",
  ".",
  "OBJECT",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"jsonEnum\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Enum",
  "(",
  ")",
  "{",
  "try",
  "{",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "JsonEnum",
  ".",
  "OBJECT",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testFromObject_EnumBean",
  "(",
  ")",
  "{",
  "EnumBean",
  "bean",
  "=",
  "new",
  "EnumBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setJsonEnum",
  "(",
  "JsonEnum",
  ".",
  "OBJECT",
  ")",
  ";",
  "bean",
  ".",
  "setString",
  "(",
  "\"string\"",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertEquals",
  "(",
  "JsonEnum",
  ".",
  "OBJECT",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"jsonEnum\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"string\"",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"string\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Map__Enum",
  "(",
  ")",
  "{",
  "Map",
  "properties",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "properties",
  ".",
  "put",
  "(",
  "\"jsonEnum\"",
  ",",
  "JsonEnum",
  ".",
  "OBJECT",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "properties",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertEquals",
  "(",
  "JsonEnum",
  ".",
  "OBJECT",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"jsonEnum\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testPut_Annotation",
  "(",
  ")",
  "{",
  "AnnotationBean",
  "bean",
  "=",
  "new",
  "AnnotationBean",
  "(",
  ")",
  ";",
  "Annotation",
  "[",
  "]",
  "annotations",
  "=",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "getAnnotations",
  "(",
  ")",
  ";",
  "try",
  "{",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "jsonObject",
  ".",
  "element",
  "(",
  "\"annotation\"",
  ",",
  "annotations",
  "[",
  "0",
  "]",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testPut_Enum",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"jsonEnum\"",
  ",",
  "JsonEnum",
  ".",
  "OBJECT",
  ")",
  ";",
  "assertEquals",
  "(",
  "JsonEnum",
  ".",
  "OBJECT",
  ".",
  "toString",
  "(",
  ")",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"jsonEnum\"",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_EnumBean",
  "(",
  ")",
  "{",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "registerMorpher",
  "(",
  "new",
  "EnumMorpher",
  "(",
  "JsonEnum",
  ".",
  "class",
  ")",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"jsonEnum\"",
  ",",
  "\"OBJECT\"",
  ")",
  ";",
  "EnumBean",
  "bean",
  "=",
  "(",
  "EnumBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "EnumBean",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "bean",
  ".",
  "getJsonEnum",
  "(",
  ")",
  ",",
  "JsonEnum",
  ".",
  "OBJECT",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testToBean_EnumBean_autoRegisterMorpher",
  "(",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "json",
  ".",
  "element",
  "(",
  "\"jsonEnum\"",
  ",",
  "\"OBJECT\"",
  ")",
  ";",
  "EnumBean",
  "bean",
  "=",
  "(",
  "EnumBean",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "json",
  ",",
  "EnumBean",
  ".",
  "class",
  ")",
  ";",
  "assertNotNull",
  "(",
  "bean",
  ")",
  ";",
  "assertEquals",
  "(",
  "bean",
  ".",
  "getJsonEnum",
  "(",
  ")",
  ",",
  "JsonEnum",
  ".",
  "OBJECT",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_ignoreAnnotations",
  "(",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "addIgnoreFieldAnnotation",
  "(",
  "JsonAnnotation",
  ".",
  "class",
  ")",
  ";",
  "AnnotatedBean",
  "bean",
  "=",
  "new",
  "AnnotatedBean",
  "(",
  ")",
  ";",
  "bean",
  ".",
  "setString1",
  "(",
  "\"STRING_1\"",
  ")",
  ";",
  "bean",
  ".",
  "setString2",
  "(",
  "\"STRING_2\"",
  ")",
  ";",
  "bean",
  ".",
  "setString3",
  "(",
  "\"STRING_3\"",
  ")",
  ";",
  "JSONObject",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"STRING_1\"",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"string1\"",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"STRING_2\"",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"string2\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"string3\"",
  ")",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setIgnoreTransientFields",
  "(",
  "true",
  ")",
  ";",
  "json",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "bean",
  ",",
  "jsonConfig",
  ")",
  ";",
  "assertNotNull",
  "(",
  "json",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"STRING_1\"",
  ",",
  "json",
  ".",
  "get",
  "(",
  "\"string1\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"string2\"",
  ")",
  ")",
  ";",
  "assertFalse",
  "(",
  "json",
  ".",
  "has",
  "(",
  "\"string3\"",
  ")",
  ")",
  ";",
  "}",
  "protected",
  "void",
  "setUp",
  "(",
  ")",
  "throws",
  "Exception",
  "{",
  "Morpher",
  "morpher",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "getMorpherFor",
  "(",
  "JsonEnum",
  ".",
  "class",
  ")",
  ";",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "deregisterMorpher",
  "(",
  "morpher",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,486 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "beans",
  ".",
  "PropertyDescriptor",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Collection",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashSet",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "GenericsBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "GenericsBean",
  ".",
  "GenericsInternalBean",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "PropertyUtils",
  ";",
  "public",
  "class",
  "TestJSONArrayCollection",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONArrayCollection",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONArrayCollection",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testNOOP",
  "(",
  ")",
  "{",
  "}",
  "}",
  "</s>"
] | 
| 11,487 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "annotation",
  ".",
  "Annotation",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "AnnotationBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "JsonEnum",
  ";",
  "public",
  "class",
  "TestJSONArrayJdk15",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestJSONArrayJdk15",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestJSONArrayJdk15",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Annotation",
  "(",
  ")",
  "{",
  "AnnotationBean",
  "bean",
  "=",
  "new",
  "AnnotationBean",
  "(",
  ")",
  ";",
  "Annotation",
  "[",
  "]",
  "annotations",
  "=",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "getAnnotations",
  "(",
  ")",
  ";",
  "try",
  "{",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "annotations",
  "[",
  "0",
  "]",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testConstructor_Collection",
  "(",
  ")",
  "{",
  "List",
  "l",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "new",
  "Integer",
  "(",
  "1",
  ")",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "\"string\"",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "Object",
  ".",
  "class",
  ")",
  ";",
  "l",
  ".",
  "add",
  "(",
  "JsonEnum",
  ".",
  "ARRAY",
  ")",
  ";",
  "testJSONArray",
  "(",
  "l",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Enum",
  "(",
  ")",
  "{",
  "testJSONArray",
  "(",
  "JsonEnum",
  ".",
  "ARRAY",
  ",",
  "\"[\\\"ARRAY\\\"]\"",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testConstructor_Object_Array_Enum",
  "(",
  ")",
  "{",
  "JSONArray",
  "expected",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"\"",
  ")",
  ";",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "new",
  "JsonEnum",
  "[",
  "]",
  "{",
  "JsonEnum",
  ".",
  "ARRAY",
  ",",
  "JsonEnum",
  ".",
  "OBJECT",
  "}",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testFromObject_Enum",
  "(",
  ")",
  "{",
  "JSONArray",
  "actual",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "JsonEnum",
  ".",
  "ARRAY",
  ")",
  ";",
  "JSONArray",
  "expected",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "\"ARRAY\"",
  ")",
  ";",
  "Assertions",
  ".",
  "assertEquals",
  "(",
  "expected",
  ",",
  "actual",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testPut_Enum",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "JsonEnum",
  ".",
  "ARRAY",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"ARRAY\"",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testPut_Enum_2",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "(",
  "JsonEnum",
  ")",
  "null",
  ")",
  ";",
  "assertEquals",
  "(",
  "1",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testPut_index_0_Annotation",
  "(",
  ")",
  "{",
  "AnnotationBean",
  "bean",
  "=",
  "new",
  "AnnotationBean",
  "(",
  ")",
  ";",
  "Annotation",
  "[",
  "]",
  "annotations",
  "=",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "getAnnotations",
  "(",
  ")",
  ";",
  "try",
  "{",
  "JSONArray",
  "array",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "array",
  ".",
  "element",
  "(",
  "0",
  ",",
  "annotations",
  "[",
  "0",
  "]",
  ")",
  ";",
  "fail",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "expected",
  ")",
  "{",
  "}",
  "}",
  "public",
  "void",
  "testPut_index_0_Enum",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "0",
  ",",
  "JsonEnum",
  ".",
  "ARRAY",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"ARRAY\"",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testPut_index_0_Enum_2",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "\"[null,null]\"",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "0",
  ",",
  "(",
  "JsonEnum",
  ")",
  "null",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testPut_index_1_Enum",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "1",
  ",",
  "JsonEnum",
  ".",
  "ARRAY",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "\"ARRAY\"",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testPut_index_1_Enum_2",
  "(",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "element",
  "(",
  "1",
  ",",
  "(",
  "JsonEnum",
  ")",
  "null",
  ")",
  ";",
  "assertEquals",
  "(",
  "2",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ")",
  ";",
  "assertEquals",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "1",
  ")",
  ")",
  ";",
  "}",
  "private",
  "void",
  "testJSONArray",
  "(",
  "Object",
  "array",
  ",",
  "String",
  "expected",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "array",
  ")",
  ";",
  "assertEquals",
  "(",
  "expected",
  ",",
  "jsonArray",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "fail",
  "(",
  "jsone",
  ".",
  "getMessage",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,488 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashSet",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Set",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "GenericsBean",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "sample",
  ".",
  "GenericsBean",
  ".",
  "GenericsInternalBean",
  ";",
  "public",
  "class",
  "TestGenerics",
  "extends",
  "TestCase",
  "{",
  "public",
  "static",
  "void",
  "main",
  "(",
  "String",
  "[",
  "]",
  "args",
  ")",
  "{",
  "junit",
  ".",
  "textui",
  ".",
  "TestRunner",
  ".",
  "run",
  "(",
  "TestGenerics",
  ".",
  "class",
  ")",
  ";",
  "}",
  "public",
  "TestGenerics",
  "(",
  "String",
  "testName",
  ")",
  "{",
  "super",
  "(",
  "testName",
  ")",
  ";",
  "}",
  "public",
  "void",
  "testNOOP",
  "(",
  ")",
  "{",
  "}",
  "public",
  "static",
  "class",
  "OnlyListBean",
  "{",
  "private",
  "List",
  "<",
  "String",
  ">",
  "stringList",
  ";",
  "public",
  "List",
  "<",
  "String",
  ">",
  "getStringList",
  "(",
  ")",
  "{",
  "return",
  "stringList",
  ";",
  "}",
  "public",
  "void",
  "setStringList",
  "(",
  "List",
  "<",
  "String",
  ">",
  "stringList",
  ")",
  "{",
  "this",
  ".",
  "stringList",
  "=",
  "stringList",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,489 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "bugs",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "junit",
  ".",
  "framework",
  ".",
  "TestCase",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONObject",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JsonConfig",
  ";",
  "public",
  "class",
  "TestBug2843623",
  "extends",
  "TestCase",
  "{",
  "public",
  "void",
  "testSample",
  "(",
  ")",
  "{",
  "Container",
  "orig",
  "=",
  "new",
  "Container",
  "(",
  ")",
  ";",
  "List",
  "<",
  "String",
  ">",
  "strings",
  "=",
  "new",
  "ArrayList",
  "<",
  "String",
  ">",
  "(",
  ")",
  ";",
  "strings",
  ".",
  "add",
  "(",
  "\"one\"",
  ")",
  ";",
  "strings",
  ".",
  "add",
  "(",
  "\"two\"",
  ")",
  ";",
  "strings",
  ".",
  "add",
  "(",
  "\"three\"",
  ")",
  ";",
  "orig",
  ".",
  "setMyList",
  "(",
  "strings",
  ")",
  ";",
  "JSONObject",
  "jobj",
  "=",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "orig",
  ")",
  ";",
  "Container",
  "root",
  "=",
  "new",
  "Container",
  "(",
  ")",
  ";",
  "Container",
  "res",
  "=",
  "(",
  "Container",
  ")",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "jobj",
  ",",
  "root",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "assertTrue",
  "(",
  "res",
  ".",
  "getMyList",
  "(",
  ")",
  ".",
  "size",
  "(",
  ")",
  ">",
  "0",
  ")",
  ";",
  "assertTrue",
  "(",
  "root",
  ".",
  "getMyList",
  "(",
  ")",
  ".",
  "size",
  "(",
  ")",
  ">",
  "0",
  ")",
  ";",
  "}",
  "public",
  "static",
  "class",
  "Container",
  "{",
  "private",
  "List",
  "<",
  "String",
  ">",
  "myList",
  "=",
  "new",
  "ArrayList",
  "<",
  "String",
  ">",
  "(",
  ")",
  ";",
  "public",
  "List",
  "<",
  "String",
  ">",
  "getMyList",
  "(",
  ")",
  "{",
  "return",
  "myList",
  ";",
  "}",
  "public",
  "void",
  "setMyList",
  "(",
  "List",
  "<",
  "String",
  ">",
  "strings",
  ")",
  "{",
  "this",
  ".",
  "myList",
  ".",
  "addAll",
  "(",
  "strings",
  ")",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,490 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "beans",
  ".",
  "PropertyDescriptor",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "IOException",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "Writer",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "annotation",
  ".",
  "Annotation",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "reflect",
  ".",
  "Array",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "reflect",
  ".",
  "Method",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "reflect",
  ".",
  "ParameterizedType",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "reflect",
  ".",
  "Type",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Collection",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ConcurrentModificationException",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashSet",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Iterator",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ListIterator",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "NoSuchElementException",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Set",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "Morpher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "object",
  ".",
  "IdentityObjectMorpher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "processors",
  ".",
  "JsonValueProcessor",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "processors",
  ".",
  "JsonVerifier",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JSONTokener",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JSONUtils",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "StringUtils",
  ";",
  "public",
  "final",
  "class",
  "JSONArray",
  "extends",
  "AbstractJSON",
  "implements",
  "JSON",
  ",",
  "List",
  "<",
  "Object",
  ">",
  ",",
  "Comparable",
  "{",
  "public",
  "static",
  "JSONArray",
  "fromObject",
  "(",
  "Object",
  "object",
  ")",
  "{",
  "return",
  "fromObject",
  "(",
  "object",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "static",
  "JSONArray",
  "fromObject",
  "(",
  "Object",
  "object",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "object",
  "instanceof",
  "JSONString",
  ")",
  "{",
  "return",
  "_fromJSONString",
  "(",
  "(",
  "JSONString",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "return",
  "_fromJSONArray",
  "(",
  "(",
  "JSONArray",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "Collection",
  ")",
  "{",
  "return",
  "_fromCollection",
  "(",
  "(",
  "Collection",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "JSONTokener",
  ")",
  "{",
  "return",
  "_fromJSONTokener",
  "(",
  "(",
  "JSONTokener",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "String",
  ")",
  "{",
  "return",
  "_fromString",
  "(",
  "(",
  "String",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "!=",
  "null",
  "&&",
  "object",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "isArray",
  "(",
  ")",
  ")",
  "{",
  "Class",
  "type",
  "=",
  "object",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "getComponentType",
  "(",
  ")",
  ";",
  "if",
  "(",
  "!",
  "type",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "return",
  "_fromArray",
  "(",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "if",
  "(",
  "type",
  "==",
  "Boolean",
  ".",
  "TYPE",
  ")",
  "{",
  "return",
  "_fromArray",
  "(",
  "(",
  "boolean",
  "[",
  "]",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "type",
  "==",
  "Byte",
  ".",
  "TYPE",
  ")",
  "{",
  "return",
  "_fromArray",
  "(",
  "(",
  "byte",
  "[",
  "]",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "type",
  "==",
  "Short",
  ".",
  "TYPE",
  ")",
  "{",
  "return",
  "_fromArray",
  "(",
  "(",
  "short",
  "[",
  "]",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "type",
  "==",
  "Integer",
  ".",
  "TYPE",
  ")",
  "{",
  "return",
  "_fromArray",
  "(",
  "(",
  "int",
  "[",
  "]",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "type",
  "==",
  "Long",
  ".",
  "TYPE",
  ")",
  "{",
  "return",
  "_fromArray",
  "(",
  "(",
  "long",
  "[",
  "]",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "type",
  "==",
  "Float",
  ".",
  "TYPE",
  ")",
  "{",
  "return",
  "_fromArray",
  "(",
  "(",
  "float",
  "[",
  "]",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "type",
  "==",
  "Double",
  ".",
  "TYPE",
  ")",
  "{",
  "return",
  "_fromArray",
  "(",
  "(",
  "double",
  "[",
  "]",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "type",
  "==",
  "Character",
  ".",
  "TYPE",
  ")",
  "{",
  "return",
  "_fromArray",
  "(",
  "(",
  "char",
  "[",
  "]",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "}",
  "else",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isBoolean",
  "(",
  "object",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isFunction",
  "(",
  "object",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "object",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "object",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isString",
  "(",
  "object",
  ")",
  "||",
  "object",
  "instanceof",
  "JSON",
  ")",
  "{",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "0",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "Enum",
  ")",
  "{",
  "return",
  "_fromArray",
  "(",
  "(",
  "Enum",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "Annotation",
  "||",
  "(",
  "object",
  "!=",
  "null",
  "&&",
  "object",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "isAnnotation",
  "(",
  ")",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isObject",
  "(",
  "object",
  ")",
  ")",
  "{",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "object",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "0",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "else",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "public",
  "static",
  "Class",
  "[",
  "]",
  "getCollectionType",
  "(",
  "PropertyDescriptor",
  "pd",
  ",",
  "boolean",
  "useGetter",
  ")",
  "throws",
  "JSONException",
  "{",
  "Type",
  "type",
  ";",
  "if",
  "(",
  "useGetter",
  ")",
  "{",
  "Method",
  "m",
  "=",
  "pd",
  ".",
  "getReadMethod",
  "(",
  ")",
  ";",
  "type",
  "=",
  "m",
  ".",
  "getGenericReturnType",
  "(",
  ")",
  ";",
  "}",
  "else",
  "{",
  "Method",
  "m",
  "=",
  "pd",
  ".",
  "getWriteMethod",
  "(",
  ")",
  ";",
  "Type",
  "[",
  "]",
  "gpts",
  "=",
  "m",
  ".",
  "getGenericParameterTypes",
  "(",
  ")",
  ";",
  "if",
  "(",
  "1",
  "!=",
  "gpts",
  ".",
  "length",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"method",
  "\"",
  "+",
  "m",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "type",
  "=",
  "gpts",
  "[",
  "0",
  "]",
  ";",
  "}",
  "if",
  "(",
  "!",
  "(",
  "type",
  "instanceof",
  "ParameterizedType",
  ")",
  ")",
  "{",
  "return",
  "null",
  ";",
  "}",
  "ParameterizedType",
  "pType",
  "=",
  "(",
  "ParameterizedType",
  ")",
  "type",
  ";",
  "Type",
  "[",
  "]",
  "actualTypes",
  "=",
  "pType",
  ".",
  "getActualTypeArguments",
  "(",
  ")",
  ";",
  "Class",
  "[",
  "]",
  "ret",
  "=",
  "new",
  "Class",
  "[",
  "actualTypes",
  ".",
  "length",
  "]",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "ret",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "ret",
  "[",
  "i",
  "]",
  "=",
  "(",
  "Class",
  ")",
  "actualTypes",
  "[",
  "i",
  "]",
  ";",
  "}",
  "return",
  "ret",
  ";",
  "}",
  "public",
  "static",
  "int",
  "[",
  "]",
  "getDimensions",
  "(",
  "JSONArray",
  "jsonArray",
  ")",
  "{",
  "if",
  "(",
  "jsonArray",
  "==",
  "null",
  "||",
  "jsonArray",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  "{",
  "return",
  "new",
  "int",
  "[",
  "]",
  "{",
  "0",
  "}",
  ";",
  "}",
  "List",
  "dims",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "processArrayDimensions",
  "(",
  "jsonArray",
  ",",
  "dims",
  ",",
  "0",
  ")",
  ";",
  "int",
  "[",
  "]",
  "dimensions",
  "=",
  "new",
  "int",
  "[",
  "dims",
  ".",
  "size",
  "(",
  ")",
  "]",
  ";",
  "int",
  "j",
  "=",
  "0",
  ";",
  "for",
  "(",
  "Iterator",
  "i",
  "=",
  "dims",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "i",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "dimensions",
  "[",
  "j",
  "++",
  "]",
  "=",
  "(",
  "(",
  "Integer",
  ")",
  "i",
  ".",
  "next",
  "(",
  ")",
  ")",
  ".",
  "intValue",
  "(",
  ")",
  ";",
  "}",
  "return",
  "dimensions",
  ";",
  "}",
  "public",
  "static",
  "Object",
  "toArray",
  "(",
  "JSONArray",
  "jsonArray",
  ")",
  "{",
  "return",
  "toArray",
  "(",
  "jsonArray",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "static",
  "Object",
  "toArray",
  "(",
  "JSONArray",
  "jsonArray",
  ",",
  "Class",
  "objectClass",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "objectClass",
  ")",
  ";",
  "return",
  "toArray",
  "(",
  "jsonArray",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "public",
  "static",
  "Object",
  "toArray",
  "(",
  "JSONArray",
  "jsonArray",
  ",",
  "Class",
  "objectClass",
  ",",
  "Map",
  "classMap",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "objectClass",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "return",
  "toArray",
  "(",
  "jsonArray",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "public",
  "static",
  "Object",
  "toArray",
  "(",
  "JSONArray",
  "jsonArray",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "Class",
  "objectClass",
  "=",
  "jsonConfig",
  ".",
  "getRootClass",
  "(",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "jsonConfig",
  ".",
  "getClassMap",
  "(",
  ")",
  ";",
  "if",
  "(",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  "==",
  "0",
  ")",
  "{",
  "return",
  "Array",
  ".",
  "newInstance",
  "(",
  "objectClass",
  "==",
  "null",
  "?",
  "Object",
  ".",
  "class",
  ":",
  "objectClass",
  ",",
  "0",
  ")",
  ";",
  "}",
  "int",
  "[",
  "]",
  "dimensions",
  "=",
  "JSONArray",
  ".",
  "getDimensions",
  "(",
  "jsonArray",
  ")",
  ";",
  "Object",
  "array",
  "=",
  "Array",
  ".",
  "newInstance",
  "(",
  "objectClass",
  "==",
  "null",
  "?",
  "Object",
  ".",
  "class",
  ":",
  "objectClass",
  ",",
  "dimensions",
  ")",
  ";",
  "int",
  "size",
  "=",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "size",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Object",
  "value",
  "=",
  "jsonArray",
  ".",
  "get",
  "(",
  "i",
  ")",
  ";",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "value",
  ")",
  ")",
  "{",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "null",
  ")",
  ";",
  "}",
  "else",
  "{",
  "Class",
  "type",
  "=",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ";",
  "if",
  "(",
  "JSONArray",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "toArray",
  "(",
  "(",
  "JSONArray",
  ")",
  "value",
  ",",
  "objectClass",
  ",",
  "classMap",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "Boolean",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "Character",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONFunction",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "if",
  "(",
  "objectClass",
  "!=",
  "null",
  "&&",
  "!",
  "objectClass",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "value",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "objectClass",
  ",",
  "value",
  ")",
  ";",
  "}",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "value",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "type",
  ")",
  ")",
  "{",
  "if",
  "(",
  "objectClass",
  "!=",
  "null",
  "&&",
  "(",
  "Byte",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "objectClass",
  ")",
  "||",
  "Byte",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "objectClass",
  ")",
  ")",
  ")",
  "{",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "Byte",
  ".",
  "valueOf",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "value",
  ")",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "objectClass",
  "!=",
  "null",
  "&&",
  "(",
  "Short",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "objectClass",
  ")",
  "||",
  "Short",
  ".",
  "TYPE",
  ".",
  "isAssignableFrom",
  "(",
  "objectClass",
  ")",
  ")",
  ")",
  "{",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "Short",
  ".",
  "valueOf",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "value",
  ")",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "value",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "objectClass",
  "!=",
  "null",
  ")",
  "{",
  "JsonConfig",
  "jsc",
  "=",
  "jsonConfig",
  ".",
  "copy",
  "(",
  ")",
  ";",
  "jsc",
  ".",
  "setRootClass",
  "(",
  "objectClass",
  ")",
  ";",
  "jsc",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "jsc",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ")",
  ")",
  ";",
  "}",
  "}",
  "}",
  "}",
  "return",
  "array",
  ";",
  "}",
  "public",
  "static",
  "Object",
  "toArray",
  "(",
  "JSONArray",
  "jsonArray",
  ",",
  "Object",
  "root",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "Class",
  "objectClass",
  "=",
  "root",
  ".",
  "getClass",
  "(",
  ")",
  ";",
  "if",
  "(",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  "==",
  "0",
  ")",
  "{",
  "return",
  "Array",
  ".",
  "newInstance",
  "(",
  "objectClass",
  ",",
  "0",
  ")",
  ";",
  "}",
  "int",
  "[",
  "]",
  "dimensions",
  "=",
  "JSONArray",
  ".",
  "getDimensions",
  "(",
  "jsonArray",
  ")",
  ";",
  "Object",
  "array",
  "=",
  "Array",
  ".",
  "newInstance",
  "(",
  "objectClass",
  "==",
  "null",
  "?",
  "Object",
  ".",
  "class",
  ":",
  "objectClass",
  ",",
  "dimensions",
  ")",
  ";",
  "int",
  "size",
  "=",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "size",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Object",
  "value",
  "=",
  "jsonArray",
  ".",
  "get",
  "(",
  "i",
  ")",
  ";",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "value",
  ")",
  ")",
  "{",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "null",
  ")",
  ";",
  "}",
  "else",
  "{",
  "Class",
  "type",
  "=",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ";",
  "if",
  "(",
  "JSONArray",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "toArray",
  "(",
  "(",
  "JSONArray",
  ")",
  "value",
  ",",
  "root",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "Boolean",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "type",
  ")",
  "||",
  "Character",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONFunction",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "if",
  "(",
  "objectClass",
  "!=",
  "null",
  "&&",
  "!",
  "objectClass",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "value",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "objectClass",
  ",",
  "value",
  ")",
  ";",
  "}",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "value",
  ")",
  ";",
  "}",
  "else",
  "{",
  "try",
  "{",
  "Object",
  "newRoot",
  "=",
  "jsonConfig",
  ".",
  "getNewBeanInstanceStrategy",
  "(",
  ")",
  ".",
  "newInstance",
  "(",
  "root",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "null",
  ")",
  ";",
  "Array",
  ".",
  "set",
  "(",
  "array",
  ",",
  "i",
  ",",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "newRoot",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "}",
  "}",
  "}",
  "return",
  "array",
  ";",
  "}",
  "public",
  "static",
  "Collection",
  "toCollection",
  "(",
  "JSONArray",
  "jsonArray",
  ")",
  "{",
  "return",
  "toCollection",
  "(",
  "jsonArray",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "static",
  "Collection",
  "toCollection",
  "(",
  "JSONArray",
  "jsonArray",
  ",",
  "Class",
  "objectClass",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "objectClass",
  ")",
  ";",
  "return",
  "toCollection",
  "(",
  "jsonArray",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "public",
  "static",
  "Collection",
  "toCollection",
  "(",
  "JSONArray",
  "jsonArray",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "Collection",
  "collection",
  "=",
  "null",
  ";",
  "Class",
  "collectionType",
  "=",
  "jsonConfig",
  ".",
  "getCollectionType",
  "(",
  ")",
  ";",
  "if",
  "(",
  "collectionType",
  ".",
  "isInterface",
  "(",
  ")",
  ")",
  "{",
  "if",
  "(",
  "collectionType",
  ".",
  "equals",
  "(",
  "List",
  ".",
  "class",
  ")",
  ")",
  "{",
  "collection",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "collectionType",
  ".",
  "equals",
  "(",
  "Set",
  ".",
  "class",
  ")",
  ")",
  "{",
  "collection",
  "=",
  "new",
  "HashSet",
  "(",
  ")",
  ";",
  "}",
  "else",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "collectionType",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "try",
  "{",
  "collection",
  "=",
  "(",
  "Collection",
  ")",
  "collectionType",
  ".",
  "newInstance",
  "(",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "InstantiationException",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "IllegalAccessException",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "}",
  "Class",
  "objectClass",
  "=",
  "jsonConfig",
  ".",
  "getRootClass",
  "(",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "jsonConfig",
  ".",
  "getClassMap",
  "(",
  ")",
  ";",
  "int",
  "size",
  "=",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "size",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Object",
  "value",
  "=",
  "jsonArray",
  ".",
  "get",
  "(",
  "i",
  ")",
  ";",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "value",
  ")",
  ")",
  "{",
  "collection",
  ".",
  "add",
  "(",
  "null",
  ")",
  ";",
  "}",
  "else",
  "{",
  "Class",
  "type",
  "=",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ";",
  "if",
  "(",
  "JSONArray",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ")",
  "{",
  "collection",
  ".",
  "add",
  "(",
  "toCollection",
  "(",
  "(",
  "JSONArray",
  ")",
  "value",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "Boolean",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "type",
  ")",
  "||",
  "Character",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONFunction",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "if",
  "(",
  "objectClass",
  "!=",
  "null",
  "&&",
  "!",
  "objectClass",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "value",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "objectClass",
  ",",
  "value",
  ")",
  ";",
  "}",
  "collection",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "}",
  "else",
  "{",
  "if",
  "(",
  "objectClass",
  "!=",
  "null",
  ")",
  "{",
  "JsonConfig",
  "jsc",
  "=",
  "jsonConfig",
  ".",
  "copy",
  "(",
  ")",
  ";",
  "jsc",
  ".",
  "setRootClass",
  "(",
  "objectClass",
  ")",
  ";",
  "jsc",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "collection",
  ".",
  "add",
  "(",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "jsc",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "collection",
  ".",
  "add",
  "(",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ")",
  ")",
  ";",
  "}",
  "}",
  "}",
  "}",
  "return",
  "collection",
  ";",
  "}",
  "public",
  "static",
  "List",
  "toList",
  "(",
  "JSONArray",
  "jsonArray",
  ")",
  "{",
  "return",
  "toList",
  "(",
  "jsonArray",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "static",
  "List",
  "toList",
  "(",
  "JSONArray",
  "jsonArray",
  ",",
  "Class",
  "objectClass",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "objectClass",
  ")",
  ";",
  "return",
  "toList",
  "(",
  "jsonArray",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "public",
  "static",
  "List",
  "toList",
  "(",
  "JSONArray",
  "jsonArray",
  ",",
  "Class",
  "objectClass",
  ",",
  "Map",
  "classMap",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "objectClass",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "return",
  "toList",
  "(",
  "jsonArray",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "public",
  "static",
  "List",
  "toList",
  "(",
  "JSONArray",
  "jsonArray",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  "==",
  "0",
  ")",
  "{",
  "return",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "}",
  "Class",
  "objectClass",
  "=",
  "jsonConfig",
  ".",
  "getRootClass",
  "(",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "jsonConfig",
  ".",
  "getClassMap",
  "(",
  ")",
  ";",
  "List",
  "list",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "int",
  "size",
  "=",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "size",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Object",
  "value",
  "=",
  "jsonArray",
  ".",
  "get",
  "(",
  "i",
  ")",
  ";",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "value",
  ")",
  ")",
  "{",
  "list",
  ".",
  "add",
  "(",
  "null",
  ")",
  ";",
  "}",
  "else",
  "{",
  "Class",
  "type",
  "=",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ";",
  "if",
  "(",
  "JSONArray",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "list",
  ".",
  "add",
  "(",
  "toList",
  "(",
  "(",
  "JSONArray",
  ")",
  "value",
  ",",
  "objectClass",
  ",",
  "classMap",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "Boolean",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "type",
  ")",
  "||",
  "Character",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONFunction",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "if",
  "(",
  "objectClass",
  "!=",
  "null",
  "&&",
  "!",
  "objectClass",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "value",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "objectClass",
  ",",
  "value",
  ")",
  ";",
  "}",
  "list",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "}",
  "else",
  "{",
  "if",
  "(",
  "objectClass",
  "!=",
  "null",
  ")",
  "{",
  "JsonConfig",
  "jsc",
  "=",
  "jsonConfig",
  ".",
  "copy",
  "(",
  ")",
  ";",
  "jsc",
  ".",
  "setRootClass",
  "(",
  "objectClass",
  ")",
  ";",
  "jsc",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "jsc",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "list",
  ".",
  "add",
  "(",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ")",
  ")",
  ";",
  "}",
  "}",
  "}",
  "}",
  "return",
  "list",
  ";",
  "}",
  "public",
  "static",
  "List",
  "toList",
  "(",
  "JSONArray",
  "jsonArray",
  ",",
  "Object",
  "root",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  "==",
  "0",
  "||",
  "root",
  "==",
  "null",
  ")",
  "{",
  "return",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "}",
  "List",
  "list",
  "=",
  "new",
  "ArrayList",
  "(",
  ")",
  ";",
  "int",
  "size",
  "=",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "size",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Object",
  "value",
  "=",
  "jsonArray",
  ".",
  "get",
  "(",
  "i",
  ")",
  ";",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "value",
  ")",
  ")",
  "{",
  "list",
  ".",
  "add",
  "(",
  "null",
  ")",
  ";",
  "}",
  "else",
  "{",
  "Class",
  "type",
  "=",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ";",
  "if",
  "(",
  "JSONArray",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "list",
  ".",
  "add",
  "(",
  "toList",
  "(",
  "(",
  "JSONArray",
  ")",
  "value",
  ",",
  "root",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "Boolean",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "type",
  ")",
  "||",
  "Character",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONFunction",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "list",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "}",
  "else",
  "{",
  "try",
  "{",
  "Object",
  "newRoot",
  "=",
  "jsonConfig",
  ".",
  "getNewBeanInstanceStrategy",
  "(",
  ")",
  ".",
  "newInstance",
  "(",
  "root",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "null",
  ")",
  ";",
  "list",
  ".",
  "add",
  "(",
  "JSONObject",
  ".",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "newRoot",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "}",
  "}",
  "}",
  "return",
  "list",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromArray",
  "(",
  "boolean",
  "[",
  "]",
  "array",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "array",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "array",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "array",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Boolean",
  "b",
  "=",
  "array",
  "[",
  "i",
  "]",
  "?",
  "Boolean",
  ".",
  "TRUE",
  ":",
  "Boolean",
  ".",
  "FALSE",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "b",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "i",
  ",",
  "b",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromArray",
  "(",
  "byte",
  "[",
  "]",
  "array",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "array",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "array",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "array",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Number",
  "n",
  "=",
  "JSONUtils",
  ".",
  "transformNumber",
  "(",
  "new",
  "Byte",
  "(",
  "array",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "n",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "i",
  ",",
  "n",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromArray",
  "(",
  "char",
  "[",
  "]",
  "array",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "array",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "array",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "array",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Character",
  "c",
  "=",
  "new",
  "Character",
  "(",
  "array",
  "[",
  "i",
  "]",
  ")",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "c",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "i",
  ",",
  "c",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromArray",
  "(",
  "double",
  "[",
  "]",
  "array",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "array",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "array",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "try",
  "{",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "array",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Double",
  "d",
  "=",
  "array",
  "[",
  "i",
  "]",
  ";",
  "JSONUtils",
  ".",
  "testValidity",
  "(",
  "d",
  ")",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "d",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "i",
  ",",
  "d",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromArray",
  "(",
  "Enum",
  "e",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "e",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "e",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "re",
  ")",
  "{",
  "removeInstance",
  "(",
  "e",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "re",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "if",
  "(",
  "e",
  "!=",
  "null",
  ")",
  "{",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "e",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "0",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "0",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "removeInstance",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "removeInstance",
  "(",
  "e",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromArray",
  "(",
  "float",
  "[",
  "]",
  "array",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "array",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "array",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "try",
  "{",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "array",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Float",
  "f",
  "=",
  "array",
  "[",
  "i",
  "]",
  ";",
  "JSONUtils",
  ".",
  "testValidity",
  "(",
  "f",
  ")",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "f",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "i",
  ",",
  "f",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromArray",
  "(",
  "int",
  "[",
  "]",
  "array",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "array",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "array",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "array",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Number",
  "n",
  "=",
  "new",
  "Integer",
  "(",
  "array",
  "[",
  "i",
  "]",
  ")",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "n",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "i",
  ",",
  "n",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromArray",
  "(",
  "long",
  "[",
  "]",
  "array",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "array",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "array",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "array",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Number",
  "n",
  "=",
  "JSONUtils",
  ".",
  "transformNumber",
  "(",
  "new",
  "Long",
  "(",
  "array",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "n",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "i",
  ",",
  "n",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromArray",
  "(",
  "Object",
  "[",
  "]",
  "array",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "array",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "array",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "try",
  "{",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "array",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Object",
  "element",
  "=",
  "array",
  "[",
  "i",
  "]",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "element",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "i",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "i",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromArray",
  "(",
  "short",
  "[",
  "]",
  "array",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "array",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "array",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "array",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Number",
  "n",
  "=",
  "JSONUtils",
  ".",
  "transformNumber",
  "(",
  "new",
  "Short",
  "(",
  "array",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "n",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "i",
  ",",
  "n",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromCollection",
  "(",
  "Collection",
  "collection",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "collection",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "collection",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "collection",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "collection",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "try",
  "{",
  "int",
  "i",
  "=",
  "0",
  ";",
  "for",
  "(",
  "Iterator",
  "elements",
  "=",
  "collection",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "elements",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Object",
  "element",
  "=",
  "elements",
  ".",
  "next",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "element",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "i",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "i",
  "++",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "collection",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "collection",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "removeInstance",
  "(",
  "collection",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromJSONArray",
  "(",
  "JSONArray",
  "array",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "array",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsArray",
  "(",
  "array",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "int",
  "index",
  "=",
  "0",
  ";",
  "for",
  "(",
  "Iterator",
  "elements",
  "=",
  "array",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "elements",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Object",
  "element",
  "=",
  "elements",
  ".",
  "next",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "element",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "index",
  "++",
  ",",
  "element",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "removeInstance",
  "(",
  "array",
  ")",
  ";",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromJSONString",
  "(",
  "JSONString",
  "string",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "return",
  "_fromJSONTokener",
  "(",
  "new",
  "JSONTokener",
  "(",
  "string",
  ".",
  "toJSONString",
  "(",
  ")",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromJSONTokener",
  "(",
  "JSONTokener",
  "tokener",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "JSONArray",
  "jsonArray",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "int",
  "index",
  "=",
  "0",
  ";",
  "try",
  "{",
  "if",
  "(",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  "!=",
  "'['",
  ")",
  "{",
  "throw",
  "tokener",
  ".",
  "syntaxError",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "fireArrayStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "if",
  "(",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  "==",
  "']'",
  ")",
  "{",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "tokener",
  ".",
  "back",
  "(",
  ")",
  ";",
  "for",
  "(",
  ";",
  ";",
  ")",
  "{",
  "if",
  "(",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  "==",
  "','",
  ")",
  "{",
  "tokener",
  ".",
  "back",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "index",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "index",
  "++",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "tokener",
  ".",
  "back",
  "(",
  ")",
  ";",
  "Object",
  "v",
  "=",
  "tokener",
  ".",
  "nextValue",
  "(",
  "jsonConfig",
  ")",
  ";",
  "if",
  "(",
  "!",
  "JSONUtils",
  ".",
  "isFunctionHeader",
  "(",
  "v",
  ")",
  ")",
  "{",
  "if",
  "(",
  "v",
  "instanceof",
  "String",
  "&&",
  "JSONUtils",
  ".",
  "mayBeJSON",
  "(",
  "(",
  "String",
  ")",
  "v",
  ")",
  ")",
  "{",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "JSONUtils",
  ".",
  "DOUBLE_QUOTE",
  "+",
  "v",
  "+",
  "JSONUtils",
  ".",
  "DOUBLE_QUOTE",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "v",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "fireElementAddedEvent",
  "(",
  "index",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "index",
  "++",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "String",
  "params",
  "=",
  "JSONUtils",
  ".",
  "getFunctionParams",
  "(",
  "(",
  "String",
  ")",
  "v",
  ")",
  ";",
  "int",
  "i",
  "=",
  "0",
  ";",
  "StringBuffer",
  "sb",
  "=",
  "new",
  "StringBuffer",
  "(",
  ")",
  ";",
  "for",
  "(",
  ";",
  ";",
  ")",
  "{",
  "char",
  "ch",
  "=",
  "tokener",
  ".",
  "next",
  "(",
  ")",
  ";",
  "if",
  "(",
  "ch",
  "==",
  "0",
  ")",
  "{",
  "break",
  ";",
  "}",
  "if",
  "(",
  "ch",
  "==",
  "'{'",
  ")",
  "{",
  "i",
  "++",
  ";",
  "}",
  "if",
  "(",
  "ch",
  "==",
  "'}'",
  ")",
  "{",
  "i",
  "--",
  ";",
  "}",
  "sb",
  ".",
  "append",
  "(",
  "ch",
  ")",
  ";",
  "if",
  "(",
  "i",
  "==",
  "0",
  ")",
  "{",
  "break",
  ";",
  "}",
  "}",
  "if",
  "(",
  "i",
  "!=",
  "0",
  ")",
  "{",
  "throw",
  "tokener",
  ".",
  "syntaxError",
  "(",
  "\"\"",
  "+",
  "v",
  ")",
  ";",
  "}",
  "String",
  "text",
  "=",
  "sb",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "text",
  "=",
  "text",
  ".",
  "substring",
  "(",
  "1",
  ",",
  "text",
  ".",
  "length",
  "(",
  ")",
  "-",
  "1",
  ")",
  ".",
  "trim",
  "(",
  ")",
  ";",
  "jsonArray",
  ".",
  "addValue",
  "(",
  "new",
  "JSONFunction",
  "(",
  "(",
  "params",
  "!=",
  "null",
  ")",
  "?",
  "StringUtils",
  ".",
  "split",
  "(",
  "params",
  ",",
  "\",\"",
  ")",
  ":",
  "null",
  ",",
  "text",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "fireElementAddedEvent",
  "(",
  "index",
  ",",
  "jsonArray",
  ".",
  "get",
  "(",
  "index",
  "++",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "switch",
  "(",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  ")",
  "{",
  "case",
  "';'",
  ":",
  "case",
  "','",
  ":",
  "if",
  "(",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  "==",
  "']'",
  ")",
  "{",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "}",
  "tokener",
  ".",
  "back",
  "(",
  ")",
  ";",
  "break",
  ";",
  "case",
  "']'",
  ":",
  "fireArrayEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonArray",
  ";",
  "default",
  ":",
  "throw",
  "tokener",
  ".",
  "syntaxError",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "private",
  "static",
  "JSONArray",
  "_fromString",
  "(",
  "String",
  "string",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "return",
  "_fromJSONTokener",
  "(",
  "new",
  "JSONTokener",
  "(",
  "string",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "static",
  "void",
  "processArrayDimensions",
  "(",
  "JSONArray",
  "jsonArray",
  ",",
  "List",
  "dims",
  ",",
  "int",
  "index",
  ")",
  "{",
  "if",
  "(",
  "dims",
  ".",
  "size",
  "(",
  ")",
  "<=",
  "index",
  ")",
  "{",
  "dims",
  ".",
  "add",
  "(",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "int",
  "i",
  "=",
  "(",
  "(",
  "Integer",
  ")",
  "dims",
  ".",
  "get",
  "(",
  "index",
  ")",
  ")",
  ".",
  "intValue",
  "(",
  ")",
  ";",
  "if",
  "(",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ">",
  "i",
  ")",
  "{",
  "dims",
  ".",
  "set",
  "(",
  "index",
  ",",
  "jsonArray",
  ".",
  "size",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "for",
  "(",
  "Iterator",
  "i",
  "=",
  "jsonArray",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "i",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Object",
  "item",
  "=",
  "i",
  ".",
  "next",
  "(",
  ")",
  ";",
  "if",
  "(",
  "item",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "processArrayDimensions",
  "(",
  "(",
  "JSONArray",
  ")",
  "item",
  ",",
  "dims",
  ",",
  "index",
  "+",
  "1",
  ")",
  ";",
  "}",
  "}",
  "}",
  "private",
  "List",
  "<",
  "Object",
  ">",
  "elements",
  ";",
  "private",
  "boolean",
  "expandElements",
  ";",
  "public",
  "JSONArray",
  "(",
  ")",
  "{",
  "this",
  ".",
  "elements",
  "=",
  "new",
  "ArrayList",
  "<",
  "Object",
  ">",
  "(",
  ")",
  ";",
  "}",
  "public",
  "void",
  "add",
  "(",
  "int",
  "index",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "add",
  "(",
  "index",
  ",",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "add",
  "(",
  "int",
  "index",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "index",
  ",",
  "processValue",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "add",
  "(",
  "Object",
  "value",
  ")",
  "{",
  "return",
  "add",
  "(",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "add",
  "(",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "element",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "return",
  "true",
  ";",
  "}",
  "public",
  "boolean",
  "addAll",
  "(",
  "Collection",
  "collection",
  ")",
  "{",
  "return",
  "addAll",
  "(",
  "collection",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "addAll",
  "(",
  "Collection",
  "collection",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "collection",
  "==",
  "null",
  "||",
  "collection",
  ".",
  "size",
  "(",
  ")",
  "==",
  "0",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "for",
  "(",
  "Object",
  "a",
  ":",
  "collection",
  ")",
  "{",
  "element",
  "(",
  "a",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "return",
  "true",
  ";",
  "}",
  "public",
  "boolean",
  "addAll",
  "(",
  "int",
  "index",
  ",",
  "Collection",
  "collection",
  ")",
  "{",
  "return",
  "addAll",
  "(",
  "index",
  ",",
  "collection",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "addAll",
  "(",
  "int",
  "index",
  ",",
  "Collection",
  "collection",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "collection",
  "==",
  "null",
  "||",
  "collection",
  ".",
  "size",
  "(",
  ")",
  "==",
  "0",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "int",
  "offset",
  "=",
  "0",
  ";",
  "for",
  "(",
  "Object",
  "a",
  ":",
  "collection",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "index",
  "+",
  "(",
  "offset",
  "++",
  ")",
  ",",
  "processValue",
  "(",
  "a",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "return",
  "true",
  ";",
  "}",
  "public",
  "void",
  "clear",
  "(",
  ")",
  "{",
  "elements",
  ".",
  "clear",
  "(",
  ")",
  ";",
  "}",
  "public",
  "int",
  "compareTo",
  "(",
  "Object",
  "obj",
  ")",
  "{",
  "if",
  "(",
  "obj",
  "!=",
  "null",
  "&&",
  "(",
  "obj",
  "instanceof",
  "JSONArray",
  ")",
  ")",
  "{",
  "JSONArray",
  "other",
  "=",
  "(",
  "JSONArray",
  ")",
  "obj",
  ";",
  "int",
  "size1",
  "=",
  "size",
  "(",
  ")",
  ";",
  "int",
  "size2",
  "=",
  "other",
  ".",
  "size",
  "(",
  ")",
  ";",
  "if",
  "(",
  "size1",
  "<",
  "size2",
  ")",
  "{",
  "return",
  "-",
  "1",
  ";",
  "}",
  "else",
  "if",
  "(",
  "size1",
  ">",
  "size2",
  ")",
  "{",
  "return",
  "1",
  ";",
  "}",
  "else",
  "if",
  "(",
  "this",
  ".",
  "equals",
  "(",
  "other",
  ")",
  ")",
  "{",
  "return",
  "0",
  ";",
  "}",
  "}",
  "return",
  "-",
  "1",
  ";",
  "}",
  "public",
  "boolean",
  "contains",
  "(",
  "Object",
  "o",
  ")",
  "{",
  "return",
  "contains",
  "(",
  "o",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "contains",
  "(",
  "Object",
  "o",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "return",
  "elements",
  ".",
  "contains",
  "(",
  "processValue",
  "(",
  "o",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "containsAll",
  "(",
  "Collection",
  "collection",
  ")",
  "{",
  "return",
  "containsAll",
  "(",
  "collection",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "containsAll",
  "(",
  "Collection",
  "collection",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "return",
  "elements",
  ".",
  "containsAll",
  "(",
  "fromObject",
  "(",
  "collection",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "discard",
  "(",
  "int",
  "index",
  ")",
  "{",
  "elements",
  ".",
  "remove",
  "(",
  "index",
  ")",
  ";",
  "return",
  "this",
  ";",
  "}",
  "public",
  "JSONArray",
  "discard",
  "(",
  "Object",
  "o",
  ")",
  "{",
  "elements",
  ".",
  "remove",
  "(",
  "o",
  ")",
  ";",
  "return",
  "this",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "boolean",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "value",
  "?",
  "Boolean",
  ".",
  "TRUE",
  ":",
  "Boolean",
  ".",
  "FALSE",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "Collection",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "Collection",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "elements",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "return",
  "this",
  ";",
  "}",
  "else",
  "{",
  "return",
  "element",
  "(",
  "_fromCollection",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "double",
  "value",
  ")",
  "{",
  "Double",
  "d",
  "=",
  "value",
  ";",
  "JSONUtils",
  ".",
  "testValidity",
  "(",
  "d",
  ")",
  ";",
  "return",
  "element",
  "(",
  "d",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "new",
  "Integer",
  "(",
  "value",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "boolean",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "index",
  ",",
  "value",
  "?",
  "Boolean",
  ".",
  "TRUE",
  ":",
  "Boolean",
  ".",
  "FALSE",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "Collection",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "index",
  ",",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "Collection",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "if",
  "(",
  "index",
  "<",
  "0",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"]",
  "not",
  "found.\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "index",
  "<",
  "size",
  "(",
  ")",
  ")",
  "{",
  "elements",
  ".",
  "set",
  "(",
  "index",
  ",",
  "value",
  ")",
  ";",
  "}",
  "else",
  "{",
  "while",
  "(",
  "index",
  "!=",
  "size",
  "(",
  ")",
  ")",
  "{",
  "element",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "}",
  "element",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "return",
  "this",
  ";",
  "}",
  "else",
  "{",
  "return",
  "element",
  "(",
  "index",
  ",",
  "_fromCollection",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "double",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "index",
  ",",
  "new",
  "Double",
  "(",
  "value",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "int",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "index",
  ",",
  "new",
  "Integer",
  "(",
  "value",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "long",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "index",
  ",",
  "new",
  "Long",
  "(",
  "value",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "Map",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "index",
  ",",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "Map",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "if",
  "(",
  "index",
  "<",
  "0",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"]",
  "not",
  "found.\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "index",
  "<",
  "size",
  "(",
  ")",
  ")",
  "{",
  "elements",
  ".",
  "set",
  "(",
  "index",
  ",",
  "value",
  ")",
  ";",
  "}",
  "else",
  "{",
  "while",
  "(",
  "index",
  "!=",
  "size",
  "(",
  ")",
  ")",
  "{",
  "element",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "}",
  "element",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "return",
  "this",
  ";",
  "}",
  "else",
  "{",
  "return",
  "element",
  "(",
  "index",
  ",",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "index",
  ",",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "JSONUtils",
  ".",
  "testValidity",
  "(",
  "value",
  ")",
  ";",
  "if",
  "(",
  "index",
  "<",
  "0",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"]",
  "not",
  "found.\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "index",
  "<",
  "size",
  "(",
  ")",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "set",
  "(",
  "index",
  ",",
  "processValue",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "while",
  "(",
  "index",
  "!=",
  "size",
  "(",
  ")",
  ")",
  "{",
  "element",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "}",
  "element",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "return",
  "this",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "String",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "index",
  ",",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "int",
  "index",
  ",",
  "String",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "index",
  "<",
  "0",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"]",
  "not",
  "found.\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "index",
  "<",
  "size",
  "(",
  ")",
  ")",
  "{",
  "if",
  "(",
  "value",
  "==",
  "null",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "set",
  "(",
  "index",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "JSONUtils",
  ".",
  "mayBeJSON",
  "(",
  "value",
  ")",
  ")",
  "{",
  "try",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "set",
  "(",
  "index",
  ",",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "set",
  "(",
  "index",
  ",",
  "JSONUtils",
  ".",
  "stripQuotes",
  "(",
  "value",
  ")",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "set",
  "(",
  "index",
  ",",
  "JSONUtils",
  ".",
  "stripQuotes",
  "(",
  "value",
  ")",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "while",
  "(",
  "index",
  "!=",
  "size",
  "(",
  ")",
  ")",
  "{",
  "element",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "}",
  "element",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "return",
  "this",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "JSONNull",
  "value",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "return",
  "this",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "JSONObject",
  "value",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "return",
  "this",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "long",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "JSONUtils",
  ".",
  "transformNumber",
  "(",
  "value",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "Map",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "Map",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "elements",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "return",
  "this",
  ";",
  "}",
  "else",
  "{",
  "return",
  "element",
  "(",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "Object",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "return",
  "addValue",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "String",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "element",
  "(",
  "String",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "value",
  "==",
  "null",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "JSONUtils",
  ".",
  "hasQuotes",
  "(",
  "value",
  ")",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "value",
  ")",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isJsonKeyword",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ")",
  "{",
  "if",
  "(",
  "jsonConfig",
  ".",
  "isJavascriptCompliant",
  "(",
  ")",
  "&&",
  "\"undefined\"",
  ".",
  "equals",
  "(",
  "value",
  ")",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "JSONUtils",
  ".",
  "mayBeJSON",
  "(",
  "value",
  ")",
  ")",
  "{",
  "try",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "}",
  "return",
  "this",
  ";",
  "}",
  "public",
  "boolean",
  "equals",
  "(",
  "Object",
  "obj",
  ")",
  "{",
  "if",
  "(",
  "obj",
  "==",
  "this",
  ")",
  "{",
  "return",
  "true",
  ";",
  "}",
  "if",
  "(",
  "obj",
  "==",
  "null",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "if",
  "(",
  "!",
  "(",
  "obj",
  "instanceof",
  "JSONArray",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "JSONArray",
  "other",
  "=",
  "(",
  "JSONArray",
  ")",
  "obj",
  ";",
  "if",
  "(",
  "other",
  ".",
  "size",
  "(",
  ")",
  "!=",
  "size",
  "(",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "int",
  "max",
  "=",
  "size",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "max",
  ";",
  "i",
  "++",
  ")",
  "{",
  "Object",
  "o1",
  "=",
  "get",
  "(",
  "i",
  ")",
  ";",
  "Object",
  "o2",
  "=",
  "other",
  ".",
  "get",
  "(",
  "i",
  ")",
  ";",
  "if",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "o1",
  ")",
  ")",
  "{",
  "if",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "else",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONArray",
  "&&",
  "o2",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "JSONArray",
  "e",
  "=",
  "(",
  "JSONArray",
  ")",
  "o1",
  ";",
  "JSONArray",
  "a",
  "=",
  "(",
  "JSONArray",
  ")",
  "o2",
  ";",
  "if",
  "(",
  "!",
  "a",
  ".",
  "equals",
  "(",
  "e",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "o1",
  "instanceof",
  "String",
  "&&",
  "o2",
  "instanceof",
  "JSONFunction",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "o2",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONFunction",
  "&&",
  "o2",
  "instanceof",
  "String",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o2",
  ".",
  "equals",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "o1",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONObject",
  "&&",
  "o2",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONArray",
  "&&",
  "o2",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONFunction",
  "&&",
  "o2",
  "instanceof",
  "JSONFunction",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "o1",
  "instanceof",
  "String",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "o2",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "o2",
  "instanceof",
  "String",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o2",
  ".",
  "equals",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "o1",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "{",
  "Morpher",
  "m1",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "getMorpherFor",
  "(",
  "o1",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ";",
  "Morpher",
  "m2",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "getMorpherFor",
  "(",
  "o2",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ";",
  "if",
  "(",
  "m1",
  "!=",
  "null",
  "&&",
  "m1",
  "!=",
  "IdentityObjectMorpher",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "o1",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "o2",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "m2",
  "!=",
  "null",
  "&&",
  "m2",
  "!=",
  "IdentityObjectMorpher",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  "{",
  "if",
  "(",
  "!",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "o1",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "o1",
  ")",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "}",
  "}",
  "}",
  "}",
  "return",
  "true",
  ";",
  "}",
  "public",
  "Object",
  "get",
  "(",
  "int",
  "index",
  ")",
  "{",
  "return",
  "this",
  ".",
  "elements",
  ".",
  "get",
  "(",
  "index",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "getBoolean",
  "(",
  "int",
  "index",
  ")",
  "{",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "index",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  ")",
  "{",
  "if",
  "(",
  "o",
  ".",
  "equals",
  "(",
  "Boolean",
  ".",
  "FALSE",
  ")",
  "||",
  "(",
  "o",
  "instanceof",
  "String",
  "&&",
  "(",
  "(",
  "String",
  ")",
  "o",
  ")",
  ".",
  "equalsIgnoreCase",
  "(",
  "\"false\"",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "else",
  "if",
  "(",
  "o",
  ".",
  "equals",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  "||",
  "(",
  "o",
  "instanceof",
  "String",
  "&&",
  "(",
  "(",
  "String",
  ")",
  "o",
  ")",
  ".",
  "equalsIgnoreCase",
  "(",
  "\"true\"",
  ")",
  ")",
  ")",
  "{",
  "return",
  "true",
  ";",
  "}",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "double",
  "getDouble",
  "(",
  "int",
  "index",
  ")",
  "{",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "index",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  ")",
  "{",
  "try",
  "{",
  "return",
  "o",
  "instanceof",
  "Number",
  "?",
  "(",
  "(",
  "Number",
  ")",
  "o",
  ")",
  ".",
  "doubleValue",
  "(",
  ")",
  ":",
  "Double",
  ".",
  "parseDouble",
  "(",
  "(",
  "String",
  ")",
  "o",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "int",
  "getInt",
  "(",
  "int",
  "index",
  ")",
  "{",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "index",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  ")",
  "{",
  "return",
  "o",
  "instanceof",
  "Number",
  "?",
  "(",
  "(",
  "Number",
  ")",
  "o",
  ")",
  ".",
  "intValue",
  "(",
  ")",
  ":",
  "(",
  "int",
  ")",
  "getDouble",
  "(",
  "index",
  ")",
  ";",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "getJSONArray",
  "(",
  "int",
  "index",
  ")",
  "{",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "index",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  "&&",
  "o",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "return",
  "(",
  "JSONArray",
  ")",
  "o",
  ";",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "getJSONObject",
  "(",
  "int",
  "index",
  ")",
  "{",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "index",
  ")",
  ";",
  "if",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "o",
  ")",
  ")",
  "{",
  "return",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "o",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "return",
  "(",
  "JSONObject",
  ")",
  "o",
  ";",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "long",
  "getLong",
  "(",
  "int",
  "index",
  ")",
  "{",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "index",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  ")",
  "{",
  "return",
  "o",
  "instanceof",
  "Number",
  "?",
  "(",
  "(",
  "Number",
  ")",
  "o",
  ")",
  ".",
  "longValue",
  "(",
  ")",
  ":",
  "(",
  "long",
  ")",
  "getDouble",
  "(",
  "index",
  ")",
  ";",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "String",
  "getString",
  "(",
  "int",
  "index",
  ")",
  "{",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "index",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  ")",
  "{",
  "return",
  "o",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONArray[\"",
  "+",
  "index",
  "+",
  "\"]",
  "not",
  "found.\"",
  ")",
  ";",
  "}",
  "public",
  "int",
  "hashCode",
  "(",
  ")",
  "{",
  "int",
  "hashcode",
  "=",
  "29",
  ";",
  "for",
  "(",
  "Iterator",
  "e",
  "=",
  "elements",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "e",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Object",
  "element",
  "=",
  "e",
  ".",
  "next",
  "(",
  ")",
  ";",
  "hashcode",
  "+=",
  "JSONUtils",
  ".",
  "hashCode",
  "(",
  "element",
  ")",
  ";",
  "}",
  "return",
  "hashcode",
  ";",
  "}",
  "public",
  "int",
  "indexOf",
  "(",
  "Object",
  "o",
  ")",
  "{",
  "return",
  "elements",
  ".",
  "indexOf",
  "(",
  "o",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "isArray",
  "(",
  ")",
  "{",
  "return",
  "true",
  ";",
  "}",
  "public",
  "boolean",
  "isEmpty",
  "(",
  ")",
  "{",
  "return",
  "this",
  ".",
  "elements",
  ".",
  "isEmpty",
  "(",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "isExpandElements",
  "(",
  ")",
  "{",
  "return",
  "expandElements",
  ";",
  "}",
  "public",
  "Iterator",
  "iterator",
  "(",
  ")",
  "{",
  "return",
  "new",
  "JSONArrayListIterator",
  "(",
  ")",
  ";",
  "}",
  "public",
  "String",
  "join",
  "(",
  "String",
  "separator",
  ")",
  "{",
  "return",
  "join",
  "(",
  "separator",
  ",",
  "false",
  ")",
  ";",
  "}",
  "public",
  "String",
  "join",
  "(",
  "String",
  "separator",
  ",",
  "boolean",
  "stripQuotes",
  ")",
  "{",
  "int",
  "len",
  "=",
  "size",
  "(",
  ")",
  ";",
  "StringBuffer",
  "sb",
  "=",
  "new",
  "StringBuffer",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "len",
  ";",
  "i",
  "+=",
  "1",
  ")",
  "{",
  "if",
  "(",
  "i",
  ">",
  "0",
  ")",
  "{",
  "sb",
  ".",
  "append",
  "(",
  "separator",
  ")",
  ";",
  "}",
  "String",
  "value",
  "=",
  "JSONUtils",
  ".",
  "valueToString",
  "(",
  "this",
  ".",
  "elements",
  ".",
  "get",
  "(",
  "i",
  ")",
  ")",
  ";",
  "sb",
  ".",
  "append",
  "(",
  "stripQuotes",
  "?",
  "JSONUtils",
  ".",
  "stripQuotes",
  "(",
  "value",
  ")",
  ":",
  "value",
  ")",
  ";",
  "}",
  "return",
  "sb",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "public",
  "int",
  "lastIndexOf",
  "(",
  "Object",
  "o",
  ")",
  "{",
  "return",
  "elements",
  ".",
  "lastIndexOf",
  "(",
  "o",
  ")",
  ";",
  "}",
  "public",
  "ListIterator",
  "listIterator",
  "(",
  ")",
  "{",
  "return",
  "listIterator",
  "(",
  "0",
  ")",
  ";",
  "}",
  "public",
  "ListIterator",
  "listIterator",
  "(",
  "int",
  "index",
  ")",
  "{",
  "if",
  "(",
  "index",
  "<",
  "0",
  "||",
  "index",
  ">",
  "size",
  "(",
  ")",
  ")",
  "throw",
  "new",
  "IndexOutOfBoundsException",
  "(",
  "\"Index:",
  "\"",
  "+",
  "index",
  ")",
  ";",
  "return",
  "new",
  "JSONArrayListIterator",
  "(",
  "index",
  ")",
  ";",
  "}",
  "public",
  "Object",
  "opt",
  "(",
  "int",
  "index",
  ")",
  "{",
  "return",
  "(",
  "index",
  "<",
  "0",
  "||",
  "index",
  ">=",
  "size",
  "(",
  ")",
  ")",
  "?",
  "null",
  ":",
  "this",
  ".",
  "elements",
  ".",
  "get",
  "(",
  "index",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "optBoolean",
  "(",
  "int",
  "index",
  ")",
  "{",
  "return",
  "optBoolean",
  "(",
  "index",
  ",",
  "false",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "optBoolean",
  "(",
  "int",
  "index",
  ",",
  "boolean",
  "defaultValue",
  ")",
  "{",
  "try",
  "{",
  "return",
  "getBoolean",
  "(",
  "index",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "return",
  "defaultValue",
  ";",
  "}",
  "}",
  "public",
  "double",
  "optDouble",
  "(",
  "int",
  "index",
  ")",
  "{",
  "return",
  "optDouble",
  "(",
  "index",
  ",",
  "Double",
  ".",
  "NaN",
  ")",
  ";",
  "}",
  "public",
  "double",
  "optDouble",
  "(",
  "int",
  "index",
  ",",
  "double",
  "defaultValue",
  ")",
  "{",
  "try",
  "{",
  "return",
  "getDouble",
  "(",
  "index",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "return",
  "defaultValue",
  ";",
  "}",
  "}",
  "public",
  "int",
  "optInt",
  "(",
  "int",
  "index",
  ")",
  "{",
  "return",
  "optInt",
  "(",
  "index",
  ",",
  "0",
  ")",
  ";",
  "}",
  "public",
  "int",
  "optInt",
  "(",
  "int",
  "index",
  ",",
  "int",
  "defaultValue",
  ")",
  "{",
  "try",
  "{",
  "return",
  "getInt",
  "(",
  "index",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "return",
  "defaultValue",
  ";",
  "}",
  "}",
  "public",
  "JSONArray",
  "optJSONArray",
  "(",
  "int",
  "index",
  ")",
  "{",
  "Object",
  "o",
  "=",
  "opt",
  "(",
  "index",
  ")",
  ";",
  "return",
  "o",
  "instanceof",
  "JSONArray",
  "?",
  "(",
  "JSONArray",
  ")",
  "o",
  ":",
  "null",
  ";",
  "}",
  "public",
  "JSONObject",
  "optJSONObject",
  "(",
  "int",
  "index",
  ")",
  "{",
  "Object",
  "o",
  "=",
  "opt",
  "(",
  "index",
  ")",
  ";",
  "return",
  "o",
  "instanceof",
  "JSONObject",
  "?",
  "(",
  "JSONObject",
  ")",
  "o",
  ":",
  "null",
  ";",
  "}",
  "public",
  "long",
  "optLong",
  "(",
  "int",
  "index",
  ")",
  "{",
  "return",
  "optLong",
  "(",
  "index",
  ",",
  "0",
  ")",
  ";",
  "}",
  "public",
  "long",
  "optLong",
  "(",
  "int",
  "index",
  ",",
  "long",
  "defaultValue",
  ")",
  "{",
  "try",
  "{",
  "return",
  "getLong",
  "(",
  "index",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "return",
  "defaultValue",
  ";",
  "}",
  "}",
  "public",
  "String",
  "optString",
  "(",
  "int",
  "index",
  ")",
  "{",
  "return",
  "optString",
  "(",
  "index",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "String",
  "optString",
  "(",
  "int",
  "index",
  ",",
  "String",
  "defaultValue",
  ")",
  "{",
  "Object",
  "o",
  "=",
  "opt",
  "(",
  "index",
  ")",
  ";",
  "return",
  "o",
  "!=",
  "null",
  "?",
  "o",
  ".",
  "toString",
  "(",
  ")",
  ":",
  "defaultValue",
  ";",
  "}",
  "public",
  "Object",
  "remove",
  "(",
  "int",
  "index",
  ")",
  "{",
  "return",
  "elements",
  ".",
  "remove",
  "(",
  "index",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "remove",
  "(",
  "Object",
  "o",
  ")",
  "{",
  "return",
  "elements",
  ".",
  "remove",
  "(",
  "o",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "removeAll",
  "(",
  "Collection",
  "collection",
  ")",
  "{",
  "return",
  "removeAll",
  "(",
  "collection",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "removeAll",
  "(",
  "Collection",
  "collection",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "return",
  "elements",
  ".",
  "removeAll",
  "(",
  "fromObject",
  "(",
  "collection",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "retainAll",
  "(",
  "Collection",
  "collection",
  ")",
  "{",
  "return",
  "retainAll",
  "(",
  "collection",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "retainAll",
  "(",
  "Collection",
  "collection",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "return",
  "elements",
  ".",
  "retainAll",
  "(",
  "fromObject",
  "(",
  "collection",
  ",",
  "jsonConfig",
  ")",
  ")",
  ";",
  "}",
  "public",
  "Object",
  "set",
  "(",
  "int",
  "index",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "return",
  "set",
  "(",
  "index",
  ",",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "Object",
  "set",
  "(",
  "int",
  "index",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "Object",
  "previous",
  "=",
  "get",
  "(",
  "index",
  ")",
  ";",
  "element",
  "(",
  "index",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "return",
  "previous",
  ";",
  "}",
  "public",
  "void",
  "setExpandElements",
  "(",
  "boolean",
  "expandElements",
  ")",
  "{",
  "this",
  ".",
  "expandElements",
  "=",
  "expandElements",
  ";",
  "}",
  "public",
  "int",
  "size",
  "(",
  ")",
  "{",
  "return",
  "this",
  ".",
  "elements",
  ".",
  "size",
  "(",
  ")",
  ";",
  "}",
  "public",
  "List",
  "subList",
  "(",
  "int",
  "fromIndex",
  ",",
  "int",
  "toIndex",
  ")",
  "{",
  "return",
  "elements",
  ".",
  "subList",
  "(",
  "fromIndex",
  ",",
  "toIndex",
  ")",
  ";",
  "}",
  "public",
  "Object",
  "[",
  "]",
  "toArray",
  "(",
  ")",
  "{",
  "return",
  "this",
  ".",
  "elements",
  ".",
  "toArray",
  "(",
  ")",
  ";",
  "}",
  "public",
  "Object",
  "[",
  "]",
  "toArray",
  "(",
  "Object",
  "[",
  "]",
  "array",
  ")",
  "{",
  "return",
  "elements",
  ".",
  "toArray",
  "(",
  "array",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "toJSONObject",
  "(",
  "JSONArray",
  "names",
  ")",
  "{",
  "if",
  "(",
  "names",
  "==",
  "null",
  "||",
  "names",
  ".",
  "size",
  "(",
  ")",
  "==",
  "0",
  "||",
  "size",
  "(",
  ")",
  "==",
  "0",
  ")",
  "{",
  "return",
  "null",
  ";",
  "}",
  "JSONObject",
  "jo",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "names",
  ".",
  "size",
  "(",
  ")",
  ";",
  "i",
  "++",
  ")",
  "{",
  "jo",
  ".",
  "element",
  "(",
  "names",
  ".",
  "getString",
  "(",
  "i",
  ")",
  ",",
  "this",
  ".",
  "opt",
  "(",
  "i",
  ")",
  ")",
  ";",
  "}",
  "return",
  "jo",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "try",
  "{",
  "return",
  "'['",
  "+",
  "join",
  "(",
  "\",\"",
  ")",
  "+",
  "']'",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "return",
  "null",
  ";",
  "}",
  "}",
  "public",
  "String",
  "toString",
  "(",
  "int",
  "indentFactor",
  ")",
  "{",
  "if",
  "(",
  "indentFactor",
  "==",
  "0",
  ")",
  "{",
  "return",
  "this",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "return",
  "toString",
  "(",
  "indentFactor",
  ",",
  "0",
  ")",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  "int",
  "indentFactor",
  ",",
  "int",
  "indent",
  ")",
  "{",
  "int",
  "len",
  "=",
  "size",
  "(",
  ")",
  ";",
  "if",
  "(",
  "len",
  "==",
  "0",
  ")",
  "{",
  "return",
  "\"[]\"",
  ";",
  "}",
  "if",
  "(",
  "indentFactor",
  "==",
  "0",
  ")",
  "{",
  "return",
  "this",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "int",
  "i",
  ";",
  "StringBuffer",
  "sb",
  "=",
  "new",
  "StringBuffer",
  "(",
  "\"[\"",
  ")",
  ";",
  "if",
  "(",
  "len",
  "==",
  "1",
  ")",
  "{",
  "sb",
  ".",
  "append",
  "(",
  "JSONUtils",
  ".",
  "valueToString",
  "(",
  "this",
  ".",
  "elements",
  ".",
  "get",
  "(",
  "0",
  ")",
  ",",
  "indentFactor",
  ",",
  "indent",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "int",
  "newindent",
  "=",
  "indent",
  "+",
  "indentFactor",
  ";",
  "sb",
  ".",
  "append",
  "(",
  "'\\n'",
  ")",
  ";",
  "for",
  "(",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "len",
  ";",
  "i",
  "+=",
  "1",
  ")",
  "{",
  "if",
  "(",
  "i",
  ">",
  "0",
  ")",
  "{",
  "sb",
  ".",
  "append",
  "(",
  "\",n\"",
  ")",
  ";",
  "}",
  "for",
  "(",
  "int",
  "j",
  "=",
  "0",
  ";",
  "j",
  "<",
  "newindent",
  ";",
  "j",
  "+=",
  "1",
  ")",
  "{",
  "sb",
  ".",
  "append",
  "(",
  "'",
  "'",
  ")",
  ";",
  "}",
  "sb",
  ".",
  "append",
  "(",
  "JSONUtils",
  ".",
  "valueToString",
  "(",
  "this",
  ".",
  "elements",
  ".",
  "get",
  "(",
  "i",
  ")",
  ",",
  "indentFactor",
  ",",
  "newindent",
  ")",
  ")",
  ";",
  "}",
  "sb",
  ".",
  "append",
  "(",
  "'\\n'",
  ")",
  ";",
  "for",
  "(",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "indent",
  ";",
  "i",
  "+=",
  "1",
  ")",
  "{",
  "sb",
  ".",
  "append",
  "(",
  "'",
  "'",
  ")",
  ";",
  "}",
  "for",
  "(",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "indent",
  ";",
  "i",
  "+=",
  "1",
  ")",
  "{",
  "sb",
  ".",
  "insert",
  "(",
  "0",
  ",",
  "'",
  "'",
  ")",
  ";",
  "}",
  "}",
  "sb",
  ".",
  "append",
  "(",
  "']'",
  ")",
  ";",
  "return",
  "sb",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "protected",
  "void",
  "write",
  "(",
  "Writer",
  "writer",
  ",",
  "WritingVisitor",
  "visitor",
  ")",
  "throws",
  "IOException",
  "{",
  "boolean",
  "b",
  "=",
  "false",
  ";",
  "int",
  "len",
  "=",
  "size",
  "(",
  ")",
  ";",
  "writer",
  ".",
  "write",
  "(",
  "'['",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "len",
  ";",
  "i",
  "+=",
  "1",
  ")",
  "{",
  "if",
  "(",
  "b",
  ")",
  "{",
  "writer",
  ".",
  "write",
  "(",
  "','",
  ")",
  ";",
  "}",
  "Object",
  "v",
  "=",
  "this",
  ".",
  "elements",
  ".",
  "get",
  "(",
  "i",
  ")",
  ";",
  "if",
  "(",
  "v",
  "instanceof",
  "JSON",
  ")",
  "{",
  "visitor",
  ".",
  "on",
  "(",
  "(",
  "JSON",
  ")",
  "v",
  ",",
  "writer",
  ")",
  ";",
  "}",
  "else",
  "{",
  "visitor",
  ".",
  "on",
  "(",
  "v",
  ",",
  "writer",
  ")",
  ";",
  "}",
  "b",
  "=",
  "true",
  ";",
  "}",
  "writer",
  ".",
  "write",
  "(",
  "']'",
  ")",
  ";",
  "}",
  "protected",
  "JSONArray",
  "addString",
  "(",
  "String",
  "str",
  ")",
  "{",
  "if",
  "(",
  "str",
  "!=",
  "null",
  ")",
  "{",
  "elements",
  ".",
  "add",
  "(",
  "str",
  ")",
  ";",
  "}",
  "return",
  "this",
  ";",
  "}",
  "private",
  "JSONArray",
  "_addValue",
  "(",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "this",
  ".",
  "elements",
  ".",
  "add",
  "(",
  "value",
  ")",
  ";",
  "return",
  "this",
  ";",
  "}",
  "protected",
  "Object",
  "_processValue",
  "(",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONTokener",
  ")",
  "{",
  "return",
  "_fromJSONTokener",
  "(",
  "(",
  "JSONTokener",
  ")",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "value",
  "!=",
  "null",
  "&&",
  "Enum",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ")",
  "{",
  "return",
  "(",
  "(",
  "Enum",
  ")",
  "value",
  ")",
  ".",
  "name",
  "(",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "value",
  "instanceof",
  "Annotation",
  "||",
  "(",
  "value",
  "!=",
  "null",
  "&&",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "isAnnotation",
  "(",
  ")",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "return",
  "super",
  ".",
  "_processValue",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "JSONArray",
  "addValue",
  "(",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "return",
  "_addValue",
  "(",
  "processValue",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "Object",
  "processValue",
  "(",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "value",
  "!=",
  "null",
  ")",
  "{",
  "JsonValueProcessor",
  "jsonValueProcessor",
  "=",
  "jsonConfig",
  ".",
  "findJsonValueProcessor",
  "(",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ";",
  "if",
  "(",
  "jsonValueProcessor",
  "!=",
  "null",
  ")",
  "{",
  "value",
  "=",
  "jsonValueProcessor",
  ".",
  "processArrayValue",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "if",
  "(",
  "!",
  "JsonVerifier",
  ".",
  "isValidJsonValue",
  "(",
  "value",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "value",
  ")",
  ";",
  "}",
  "}",
  "}",
  "return",
  "_processValue",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "class",
  "JSONArrayListIterator",
  "implements",
  "ListIterator",
  "{",
  "int",
  "currentIndex",
  "=",
  "0",
  ";",
  "int",
  "lastIndex",
  "=",
  "-",
  "1",
  ";",
  "JSONArrayListIterator",
  "(",
  ")",
  "{",
  "}",
  "JSONArrayListIterator",
  "(",
  "int",
  "index",
  ")",
  "{",
  "currentIndex",
  "=",
  "index",
  ";",
  "}",
  "public",
  "boolean",
  "hasNext",
  "(",
  ")",
  "{",
  "return",
  "currentIndex",
  "!=",
  "size",
  "(",
  ")",
  ";",
  "}",
  "public",
  "Object",
  "next",
  "(",
  ")",
  "{",
  "try",
  "{",
  "Object",
  "next",
  "=",
  "get",
  "(",
  "currentIndex",
  ")",
  ";",
  "lastIndex",
  "=",
  "currentIndex",
  "++",
  ";",
  "return",
  "next",
  ";",
  "}",
  "catch",
  "(",
  "IndexOutOfBoundsException",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "NoSuchElementException",
  "(",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "remove",
  "(",
  ")",
  "{",
  "if",
  "(",
  "lastIndex",
  "==",
  "-",
  "1",
  ")",
  "throw",
  "new",
  "IllegalStateException",
  "(",
  ")",
  ";",
  "try",
  "{",
  "JSONArray",
  ".",
  "this",
  ".",
  "remove",
  "(",
  "lastIndex",
  ")",
  ";",
  "if",
  "(",
  "lastIndex",
  "<",
  "currentIndex",
  ")",
  "{",
  "currentIndex",
  "--",
  ";",
  "}",
  "lastIndex",
  "=",
  "-",
  "1",
  ";",
  "}",
  "catch",
  "(",
  "IndexOutOfBoundsException",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "ConcurrentModificationException",
  "(",
  ")",
  ";",
  "}",
  "}",
  "public",
  "boolean",
  "hasPrevious",
  "(",
  ")",
  "{",
  "return",
  "currentIndex",
  "!=",
  "0",
  ";",
  "}",
  "public",
  "Object",
  "previous",
  "(",
  ")",
  "{",
  "try",
  "{",
  "int",
  "index",
  "=",
  "currentIndex",
  "-",
  "1",
  ";",
  "Object",
  "previous",
  "=",
  "get",
  "(",
  "index",
  ")",
  ";",
  "lastIndex",
  "=",
  "currentIndex",
  "=",
  "index",
  ";",
  "return",
  "previous",
  ";",
  "}",
  "catch",
  "(",
  "IndexOutOfBoundsException",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "NoSuchElementException",
  "(",
  ")",
  ";",
  "}",
  "}",
  "public",
  "int",
  "nextIndex",
  "(",
  ")",
  "{",
  "return",
  "currentIndex",
  ";",
  "}",
  "public",
  "int",
  "previousIndex",
  "(",
  ")",
  "{",
  "return",
  "currentIndex",
  "-",
  "1",
  ";",
  "}",
  "public",
  "void",
  "set",
  "(",
  "Object",
  "obj",
  ")",
  "{",
  "if",
  "(",
  "lastIndex",
  "==",
  "-",
  "1",
  ")",
  "{",
  "throw",
  "new",
  "IllegalStateException",
  "(",
  ")",
  ";",
  "}",
  "try",
  "{",
  "JSONArray",
  ".",
  "this",
  ".",
  "set",
  "(",
  "lastIndex",
  ",",
  "obj",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "IndexOutOfBoundsException",
  "ex",
  ")",
  "{",
  "throw",
  "new",
  "ConcurrentModificationException",
  "(",
  ")",
  ";",
  "}",
  "}",
  "public",
  "void",
  "add",
  "(",
  "Object",
  "obj",
  ")",
  "{",
  "try",
  "{",
  "JSONArray",
  ".",
  "this",
  ".",
  "add",
  "(",
  "currentIndex",
  "++",
  ",",
  "obj",
  ")",
  ";",
  "lastIndex",
  "=",
  "-",
  "1",
  ";",
  "}",
  "catch",
  "(",
  "IndexOutOfBoundsException",
  "ex",
  ")",
  "{",
  "throw",
  "new",
  "ConcurrentModificationException",
  "(",
  ")",
  ";",
  "}",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,491 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ";",
  "import",
  "java",
  ".",
  "beans",
  ".",
  "PropertyDescriptor",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "IOException",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "Writer",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "annotation",
  ".",
  "Annotation",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "reflect",
  ".",
  "Array",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "reflect",
  ".",
  "Field",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "reflect",
  ".",
  "InvocationTargetException",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "reflect",
  ".",
  "Modifier",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "ArrayList",
  ";",
  "import",
  "java",
  ".",
  "lang",
  ".",
  "reflect",
  ".",
  "AnnotatedElement",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Collection",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Collections",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Iterator",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "LinkedHashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "LinkedHashSet",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Set",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "TreeMap",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "Morpher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "array",
  ".",
  "ObjectArrayMorpher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "bean",
  ".",
  "BeanMorpher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "object",
  ".",
  "IdentityObjectMorpher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONObject",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JsonConfig",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "processors",
  ".",
  "JsonBeanProcessor",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "processors",
  ".",
  "JsonValueProcessor",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "processors",
  ".",
  "JsonVerifier",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "processors",
  ".",
  "PropertyNameProcessor",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "regexp",
  ".",
  "RegexpUtils",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "CycleDetectionStrategy",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "EnumMorpher",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JSONTokener",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "JSONUtils",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "PropertyFilter",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ".",
  "PropertySetStrategy",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "DynaBean",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "DynaProperty",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "beanutils",
  ".",
  "PropertyUtils",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "collections",
  ".",
  "map",
  ".",
  "ListOrderedMap",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "StringUtils",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "logging",
  ".",
  "Log",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "logging",
  ".",
  "LogFactory",
  ";",
  "public",
  "final",
  "class",
  "JSONObject",
  "extends",
  "AbstractJSON",
  "implements",
  "JSON",
  ",",
  "Map",
  "<",
  "String",
  ",",
  "Object",
  ">",
  ",",
  "Comparable",
  "{",
  "private",
  "static",
  "final",
  "Log",
  "log",
  "=",
  "LogFactory",
  ".",
  "getLog",
  "(",
  "JSONObject",
  ".",
  "class",
  ")",
  ";",
  "public",
  "static",
  "JSONObject",
  "fromObject",
  "(",
  "Object",
  "object",
  ")",
  "{",
  "return",
  "fromObject",
  "(",
  "object",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "static",
  "JSONObject",
  "fromObject",
  "(",
  "Object",
  "object",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "object",
  "==",
  "null",
  "||",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "object",
  ")",
  ")",
  "{",
  "return",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "Enum",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "Annotation",
  "||",
  "(",
  "object",
  "!=",
  "null",
  "&&",
  "object",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "isAnnotation",
  "(",
  ")",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "return",
  "_fromJSONObject",
  "(",
  "(",
  "JSONObject",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "DynaBean",
  ")",
  "{",
  "return",
  "_fromDynaBean",
  "(",
  "(",
  "DynaBean",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "JSONTokener",
  ")",
  "{",
  "return",
  "_fromJSONTokener",
  "(",
  "(",
  "JSONTokener",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "JSONString",
  ")",
  "{",
  "return",
  "_fromJSONString",
  "(",
  "(",
  "JSONString",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "Map",
  ")",
  "{",
  "return",
  "_fromMap",
  "(",
  "(",
  "Map",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "object",
  "instanceof",
  "String",
  ")",
  "{",
  "return",
  "_fromString",
  "(",
  "(",
  "String",
  ")",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "object",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isBoolean",
  "(",
  "object",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isString",
  "(",
  "object",
  ")",
  ")",
  "{",
  "return",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isArray",
  "(",
  "object",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "else",
  "{",
  "return",
  "_fromBean",
  "(",
  "object",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "public",
  "static",
  "Object",
  "toBean",
  "(",
  "JSONObject",
  "jsonObject",
  ")",
  "{",
  "if",
  "(",
  "jsonObject",
  "==",
  "null",
  "||",
  "jsonObject",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "return",
  "null",
  ";",
  "}",
  "DynaBean",
  "dynaBean",
  "=",
  "null",
  ";",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "Map",
  "props",
  "=",
  "JSONUtils",
  ".",
  "getProperties",
  "(",
  "jsonObject",
  ")",
  ";",
  "dynaBean",
  "=",
  "JSONUtils",
  ".",
  "newDynaBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "for",
  "(",
  "Iterator",
  "entries",
  "=",
  "jsonObject",
  ".",
  "names",
  "(",
  "jsonConfig",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "entries",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "String",
  "name",
  "=",
  "(",
  "String",
  ")",
  "entries",
  ".",
  "next",
  "(",
  ")",
  ";",
  "String",
  "key",
  "=",
  "JSONUtils",
  ".",
  "convertToJavaIdentifier",
  "(",
  "name",
  ",",
  "jsonConfig",
  ")",
  ";",
  "Class",
  "type",
  "=",
  "(",
  "Class",
  ")",
  "props",
  ".",
  "get",
  "(",
  "name",
  ")",
  ";",
  "Object",
  "value",
  "=",
  "jsonObject",
  ".",
  "get",
  "(",
  "name",
  ")",
  ";",
  "try",
  "{",
  "if",
  "(",
  "!",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "value",
  ")",
  ")",
  "{",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "dynaBean",
  ".",
  "set",
  "(",
  "key",
  ",",
  "JSONArray",
  ".",
  "toCollection",
  "(",
  "(",
  "JSONArray",
  ")",
  "value",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "Boolean",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "type",
  ")",
  "||",
  "Character",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONFunction",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "dynaBean",
  ".",
  "set",
  "(",
  "key",
  ",",
  "value",
  ")",
  ";",
  "}",
  "else",
  "{",
  "dynaBean",
  ".",
  "set",
  "(",
  "key",
  ",",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ")",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "type",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "log",
  ".",
  "warn",
  "(",
  "\"\"",
  "+",
  "key",
  "+",
  "\":\"",
  "+",
  "type",
  ".",
  "getName",
  "(",
  ")",
  ")",
  ";",
  "dynaBean",
  ".",
  "set",
  "(",
  "key",
  ",",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "type",
  ",",
  "null",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "dynaBean",
  ".",
  "set",
  "(",
  "key",
  ",",
  "null",
  ")",
  ";",
  "}",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "name",
  "+",
  "\"",
  "type\"",
  "+",
  "type",
  ",",
  "e",
  ")",
  ";",
  "}",
  "}",
  "return",
  "dynaBean",
  ";",
  "}",
  "public",
  "static",
  "Object",
  "toBean",
  "(",
  "JSONObject",
  "jsonObject",
  ",",
  "Class",
  "beanClass",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "beanClass",
  ")",
  ";",
  "return",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "public",
  "static",
  "Object",
  "toBean",
  "(",
  "JSONObject",
  "jsonObject",
  ",",
  "Class",
  "beanClass",
  ",",
  "Map",
  "classMap",
  ")",
  "{",
  "JsonConfig",
  "jsonConfig",
  "=",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setRootClass",
  "(",
  "beanClass",
  ")",
  ";",
  "jsonConfig",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "return",
  "toBean",
  "(",
  "jsonObject",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "public",
  "static",
  "Object",
  "toBean",
  "(",
  "JSONObject",
  "jsonObject",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "jsonObject",
  "==",
  "null",
  "||",
  "jsonObject",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "return",
  "null",
  ";",
  "}",
  "Class",
  "beanClass",
  "=",
  "jsonConfig",
  ".",
  "getRootClass",
  "(",
  ")",
  ";",
  "Map",
  "classMap",
  "=",
  "jsonConfig",
  ".",
  "getClassMap",
  "(",
  ")",
  ";",
  "if",
  "(",
  "beanClass",
  "==",
  "null",
  ")",
  "{",
  "return",
  "toBean",
  "(",
  "jsonObject",
  ")",
  ";",
  "}",
  "if",
  "(",
  "classMap",
  "==",
  "null",
  ")",
  "{",
  "classMap",
  "=",
  "Collections",
  ".",
  "EMPTY_MAP",
  ";",
  "}",
  "Object",
  "bean",
  "=",
  "null",
  ";",
  "try",
  "{",
  "if",
  "(",
  "beanClass",
  ".",
  "isInterface",
  "(",
  ")",
  ")",
  "{",
  "if",
  "(",
  "!",
  "Map",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "beanClass",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "beanClass",
  ")",
  ";",
  "}",
  "else",
  "{",
  "bean",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "bean",
  "=",
  "jsonConfig",
  ".",
  "getNewBeanInstanceStrategy",
  "(",
  ")",
  ".",
  "newInstance",
  "(",
  "beanClass",
  ",",
  "jsonObject",
  ")",
  ";",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "Map",
  "props",
  "=",
  "JSONUtils",
  ".",
  "getProperties",
  "(",
  "jsonObject",
  ")",
  ";",
  "PropertyFilter",
  "javaPropertyFilter",
  "=",
  "jsonConfig",
  ".",
  "getJavaPropertyFilter",
  "(",
  ")",
  ";",
  "for",
  "(",
  "Iterator",
  "entries",
  "=",
  "jsonObject",
  ".",
  "names",
  "(",
  "jsonConfig",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "entries",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "String",
  "name",
  "=",
  "(",
  "String",
  ")",
  "entries",
  ".",
  "next",
  "(",
  ")",
  ";",
  "Class",
  "type",
  "=",
  "(",
  "Class",
  ")",
  "props",
  ".",
  "get",
  "(",
  "name",
  ")",
  ";",
  "Object",
  "value",
  "=",
  "jsonObject",
  ".",
  "get",
  "(",
  "name",
  ")",
  ";",
  "if",
  "(",
  "javaPropertyFilter",
  "!=",
  "null",
  "&&",
  "javaPropertyFilter",
  ".",
  "apply",
  "(",
  "bean",
  ",",
  "name",
  ",",
  "value",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "String",
  "key",
  "=",
  "Map",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "beanClass",
  ")",
  "&&",
  "jsonConfig",
  ".",
  "isSkipJavaIdentifierTransformationInMapKeys",
  "(",
  ")",
  "?",
  "name",
  ":",
  "JSONUtils",
  ".",
  "convertToJavaIdentifier",
  "(",
  "name",
  ",",
  "jsonConfig",
  ")",
  ";",
  "PropertyNameProcessor",
  "propertyNameProcessor",
  "=",
  "jsonConfig",
  ".",
  "findJavaPropertyNameProcessor",
  "(",
  "beanClass",
  ")",
  ";",
  "if",
  "(",
  "propertyNameProcessor",
  "!=",
  "null",
  ")",
  "{",
  "key",
  "=",
  "propertyNameProcessor",
  ".",
  "processPropertyName",
  "(",
  "beanClass",
  ",",
  "key",
  ")",
  ";",
  "}",
  "try",
  "{",
  "if",
  "(",
  "Map",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "beanClass",
  ")",
  ")",
  "{",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "value",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "convertPropertyValueToCollection",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ",",
  "name",
  ",",
  "classMap",
  ",",
  "List",
  ".",
  "class",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isBoolean",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isString",
  "(",
  "type",
  ")",
  "||",
  "JSONFunction",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "if",
  "(",
  "jsonConfig",
  ".",
  "isHandleJettisonEmptyElement",
  "(",
  ")",
  "&&",
  "\"\"",
  ".",
  "equals",
  "(",
  "value",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "null",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "Class",
  "targetClass",
  "=",
  "resolveClass",
  "(",
  "classMap",
  ",",
  "key",
  ",",
  "name",
  ",",
  "type",
  ")",
  ";",
  "JsonConfig",
  "jsc",
  "=",
  "jsonConfig",
  ".",
  "copy",
  "(",
  ")",
  ";",
  "jsc",
  ".",
  "setRootClass",
  "(",
  "targetClass",
  ")",
  ";",
  "jsc",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "if",
  "(",
  "targetClass",
  "!=",
  "null",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "jsc",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "}",
  "else",
  "{",
  "PropertyDescriptor",
  "pd",
  "=",
  "PropertyUtils",
  ".",
  "getPropertyDescriptor",
  "(",
  "bean",
  ",",
  "key",
  ")",
  ";",
  "if",
  "(",
  "pd",
  "!=",
  "null",
  "&&",
  "pd",
  ".",
  "getWriteMethod",
  "(",
  ")",
  "==",
  "null",
  ")",
  "{",
  "log",
  ".",
  "info",
  "(",
  "\"Property",
  "'\"",
  "+",
  "key",
  "+",
  "\"'",
  "of",
  "\"",
  "+",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  "+",
  "\"\"",
  ")",
  ";",
  "continue",
  ";",
  "}",
  "if",
  "(",
  "pd",
  "!=",
  "null",
  ")",
  "{",
  "Class",
  "targetType",
  "=",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ";",
  "if",
  "(",
  "!",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "value",
  ")",
  ")",
  "{",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "if",
  "(",
  "List",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "convertPropertyValueToCollection",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ",",
  "name",
  ",",
  "classMap",
  ",",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Set",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "convertPropertyValueToCollection",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ",",
  "name",
  ",",
  "classMap",
  ",",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "convertPropertyValueToArray",
  "(",
  "key",
  ",",
  "value",
  ",",
  "targetType",
  ",",
  "jsonConfig",
  ",",
  "classMap",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isBoolean",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isString",
  "(",
  "type",
  ")",
  "||",
  "JSONFunction",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "if",
  "(",
  "pd",
  "!=",
  "null",
  ")",
  "{",
  "if",
  "(",
  "jsonConfig",
  ".",
  "isHandleJettisonEmptyElement",
  "(",
  ")",
  "&&",
  "\"\"",
  ".",
  "equals",
  "(",
  "value",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "null",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "targetType",
  ".",
  "isInstance",
  "(",
  "value",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "morphPropertyValue",
  "(",
  "key",
  ",",
  "value",
  ",",
  "type",
  ",",
  "targetType",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "beanClass",
  "==",
  "null",
  "||",
  "bean",
  "instanceof",
  "Map",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "log",
  ".",
  "warn",
  "(",
  "\"\"",
  "+",
  "key",
  "+",
  "\":\"",
  "+",
  "type",
  ".",
  "getName",
  "(",
  ")",
  "+",
  "\"\"",
  "+",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "getName",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "jsonConfig",
  ".",
  "isHandleJettisonSingleElementArray",
  "(",
  ")",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "Class",
  "newTargetClass",
  "=",
  "resolveClass",
  "(",
  "classMap",
  ",",
  "key",
  ",",
  "name",
  ",",
  "type",
  ")",
  ";",
  "JsonConfig",
  "jsc",
  "=",
  "jsonConfig",
  ".",
  "copy",
  "(",
  ")",
  ";",
  "jsc",
  ".",
  "setRootClass",
  "(",
  "newTargetClass",
  ")",
  ";",
  "jsc",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "if",
  "(",
  "targetType",
  ".",
  "isArray",
  "(",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "array",
  ",",
  "jsc",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "JSONArray",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "targetType",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "array",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "List",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "targetType",
  ")",
  "||",
  "Set",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "targetType",
  ")",
  ")",
  "{",
  "jsc",
  ".",
  "setCollectionType",
  "(",
  "targetType",
  ")",
  ";",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "JSONArray",
  ".",
  "toCollection",
  "(",
  "array",
  ",",
  "jsc",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "jsc",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "targetType",
  "==",
  "Object",
  ".",
  "class",
  "||",
  "targetType",
  ".",
  "isInterface",
  "(",
  ")",
  ")",
  "{",
  "Class",
  "targetTypeCopy",
  "=",
  "targetType",
  ";",
  "targetType",
  "=",
  "findTargetClass",
  "(",
  "key",
  ",",
  "classMap",
  ")",
  ";",
  "targetType",
  "=",
  "targetType",
  "==",
  "null",
  "?",
  "findTargetClass",
  "(",
  "name",
  ",",
  "classMap",
  ")",
  ":",
  "targetType",
  ";",
  "targetType",
  "=",
  "targetType",
  "==",
  "null",
  "&&",
  "targetTypeCopy",
  ".",
  "isInterface",
  "(",
  ")",
  "?",
  "targetTypeCopy",
  ":",
  "targetType",
  ";",
  "}",
  "JsonConfig",
  "jsc",
  "=",
  "jsonConfig",
  ".",
  "copy",
  "(",
  ")",
  ";",
  "jsc",
  ".",
  "setRootClass",
  "(",
  "targetType",
  ")",
  ";",
  "jsc",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "jsc",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "type",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "log",
  ".",
  "warn",
  "(",
  "\"\"",
  "+",
  "key",
  "+",
  "\":\"",
  "+",
  "type",
  ".",
  "getName",
  "(",
  ")",
  ")",
  ";",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "type",
  ",",
  "null",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "null",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "!",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "value",
  ")",
  ")",
  "{",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "convertPropertyValueToCollection",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ",",
  "name",
  ",",
  "classMap",
  ",",
  "List",
  ".",
  "class",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isBoolean",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isString",
  "(",
  "type",
  ")",
  "||",
  "JSONFunction",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "if",
  "(",
  "beanClass",
  "==",
  "null",
  "||",
  "bean",
  "instanceof",
  "Map",
  "||",
  "jsonConfig",
  ".",
  "getPropertySetStrategy",
  "(",
  ")",
  "!=",
  "null",
  "||",
  "!",
  "jsonConfig",
  ".",
  "isIgnorePublicFields",
  "(",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "log",
  ".",
  "warn",
  "(",
  "\"\"",
  "+",
  "key",
  "+",
  "\":\"",
  "+",
  "type",
  ".",
  "getName",
  "(",
  ")",
  "+",
  "\"\"",
  "+",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "getName",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "jsonConfig",
  ".",
  "isHandleJettisonSingleElementArray",
  "(",
  ")",
  ")",
  "{",
  "Class",
  "newTargetClass",
  "=",
  "resolveClass",
  "(",
  "classMap",
  ",",
  "key",
  ",",
  "name",
  ",",
  "type",
  ")",
  ";",
  "JsonConfig",
  "jsc",
  "=",
  "jsonConfig",
  ".",
  "copy",
  "(",
  ")",
  ";",
  "jsc",
  ".",
  "setRootClass",
  "(",
  "newTargetClass",
  ")",
  ";",
  "jsc",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "jsc",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "type",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "log",
  ".",
  "warn",
  "(",
  "\"\"",
  "+",
  "key",
  "+",
  "\":\"",
  "+",
  "type",
  ".",
  "getName",
  "(",
  ")",
  ")",
  ";",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "type",
  ",",
  "null",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "null",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "}",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "name",
  "+",
  "\"",
  "type",
  "\"",
  "+",
  "type",
  ",",
  "e",
  ")",
  ";",
  "}",
  "}",
  "return",
  "bean",
  ";",
  "}",
  "public",
  "static",
  "Object",
  "toBean",
  "(",
  "JSONObject",
  "jsonObject",
  ",",
  "Object",
  "root",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "jsonObject",
  "==",
  "null",
  "||",
  "jsonObject",
  ".",
  "isNullObject",
  "(",
  ")",
  "||",
  "root",
  "==",
  "null",
  ")",
  "{",
  "return",
  "root",
  ";",
  "}",
  "Class",
  "rootClass",
  "=",
  "root",
  ".",
  "getClass",
  "(",
  ")",
  ";",
  "if",
  "(",
  "rootClass",
  ".",
  "isInterface",
  "(",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "rootClass",
  ")",
  ";",
  "}",
  "Map",
  "classMap",
  "=",
  "jsonConfig",
  ".",
  "getClassMap",
  "(",
  ")",
  ";",
  "if",
  "(",
  "classMap",
  "==",
  "null",
  ")",
  "{",
  "classMap",
  "=",
  "Collections",
  ".",
  "EMPTY_MAP",
  ";",
  "}",
  "Map",
  "props",
  "=",
  "JSONUtils",
  ".",
  "getProperties",
  "(",
  "jsonObject",
  ")",
  ";",
  "PropertyFilter",
  "javaPropertyFilter",
  "=",
  "jsonConfig",
  ".",
  "getJavaPropertyFilter",
  "(",
  ")",
  ";",
  "for",
  "(",
  "Iterator",
  "entries",
  "=",
  "jsonObject",
  ".",
  "names",
  "(",
  "jsonConfig",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "entries",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "String",
  "name",
  "=",
  "(",
  "String",
  ")",
  "entries",
  ".",
  "next",
  "(",
  ")",
  ";",
  "Class",
  "type",
  "=",
  "(",
  "Class",
  ")",
  "props",
  ".",
  "get",
  "(",
  "name",
  ")",
  ";",
  "Object",
  "value",
  "=",
  "jsonObject",
  ".",
  "get",
  "(",
  "name",
  ")",
  ";",
  "if",
  "(",
  "javaPropertyFilter",
  "!=",
  "null",
  "&&",
  "javaPropertyFilter",
  ".",
  "apply",
  "(",
  "root",
  ",",
  "name",
  ",",
  "value",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "String",
  "key",
  "=",
  "JSONUtils",
  ".",
  "convertToJavaIdentifier",
  "(",
  "name",
  ",",
  "jsonConfig",
  ")",
  ";",
  "try",
  "{",
  "PropertyDescriptor",
  "pd",
  "=",
  "PropertyUtils",
  ".",
  "getPropertyDescriptor",
  "(",
  "root",
  ",",
  "key",
  ")",
  ";",
  "if",
  "(",
  "pd",
  "!=",
  "null",
  "&&",
  "pd",
  ".",
  "getWriteMethod",
  "(",
  ")",
  "==",
  "null",
  ")",
  "{",
  "log",
  ".",
  "info",
  "(",
  "\"Property",
  "'\"",
  "+",
  "key",
  "+",
  "\"'",
  "of",
  "\"",
  "+",
  "root",
  ".",
  "getClass",
  "(",
  ")",
  "+",
  "\"\"",
  ")",
  ";",
  "continue",
  ";",
  "}",
  "if",
  "(",
  "!",
  "JSONUtils",
  ".",
  "isNull",
  "(",
  "value",
  ")",
  ")",
  "{",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "if",
  "(",
  "pd",
  "==",
  "null",
  "||",
  "List",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ")",
  ")",
  "{",
  "Class",
  "targetClass",
  "=",
  "resolveClass",
  "(",
  "classMap",
  ",",
  "key",
  ",",
  "name",
  ",",
  "type",
  ")",
  ";",
  "Object",
  "newRoot",
  "=",
  "jsonConfig",
  ".",
  "getNewBeanInstanceStrategy",
  "(",
  ")",
  ".",
  "newInstance",
  "(",
  "targetClass",
  ",",
  "null",
  ")",
  ";",
  "List",
  "list",
  "=",
  "JSONArray",
  ".",
  "toList",
  "(",
  "(",
  "JSONArray",
  ")",
  "value",
  ",",
  "newRoot",
  ",",
  "jsonConfig",
  ")",
  ";",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "list",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "Class",
  "innerType",
  "=",
  "JSONUtils",
  ".",
  "getInnerComponentType",
  "(",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ")",
  ";",
  "Class",
  "targetInnerType",
  "=",
  "findTargetClass",
  "(",
  "key",
  ",",
  "classMap",
  ")",
  ";",
  "if",
  "(",
  "innerType",
  ".",
  "equals",
  "(",
  "Object",
  ".",
  "class",
  ")",
  "&&",
  "targetInnerType",
  "!=",
  "null",
  "&&",
  "!",
  "targetInnerType",
  ".",
  "equals",
  "(",
  "Object",
  ".",
  "class",
  ")",
  ")",
  "{",
  "innerType",
  "=",
  "targetInnerType",
  ";",
  "}",
  "Object",
  "newRoot",
  "=",
  "jsonConfig",
  ".",
  "getNewBeanInstanceStrategy",
  "(",
  ")",
  ".",
  "newInstance",
  "(",
  "innerType",
  ",",
  "null",
  ")",
  ";",
  "Object",
  "array",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "(",
  "JSONArray",
  ")",
  "value",
  ",",
  "newRoot",
  ",",
  "jsonConfig",
  ")",
  ";",
  "if",
  "(",
  "innerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "innerType",
  ")",
  "||",
  "Boolean",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "innerType",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isString",
  "(",
  "innerType",
  ")",
  ")",
  "{",
  "array",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "Array",
  ".",
  "newInstance",
  "(",
  "innerType",
  ",",
  "0",
  ")",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "array",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "array",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ")",
  ")",
  "{",
  "if",
  "(",
  "!",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "Object",
  ".",
  "class",
  ")",
  ")",
  "{",
  "Morpher",
  "morpher",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "getMorpherFor",
  "(",
  "Array",
  ".",
  "newInstance",
  "(",
  "innerType",
  ",",
  "0",
  ")",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ";",
  "if",
  "(",
  "IdentityObjectMorpher",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "morpher",
  ")",
  ")",
  "{",
  "ObjectArrayMorpher",
  "beanMorpher",
  "=",
  "new",
  "ObjectArrayMorpher",
  "(",
  "new",
  "BeanMorpher",
  "(",
  "innerType",
  ",",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ")",
  ")",
  ";",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "registerMorpher",
  "(",
  "beanMorpher",
  ")",
  ";",
  "}",
  "array",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "Array",
  ".",
  "newInstance",
  "(",
  "innerType",
  ",",
  "0",
  ")",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "array",
  ")",
  ";",
  "}",
  "}",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "array",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isBoolean",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "type",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isString",
  "(",
  "type",
  ")",
  "||",
  "JSONFunction",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "if",
  "(",
  "pd",
  "!=",
  "null",
  ")",
  "{",
  "if",
  "(",
  "jsonConfig",
  ".",
  "isHandleJettisonEmptyElement",
  "(",
  ")",
  "&&",
  "\"\"",
  ".",
  "equals",
  "(",
  "value",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "null",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ".",
  "isInstance",
  "(",
  "value",
  ")",
  ")",
  "{",
  "Morpher",
  "morpher",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "getMorpherFor",
  "(",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ")",
  ";",
  "if",
  "(",
  "IdentityObjectMorpher",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "morpher",
  ")",
  ")",
  "{",
  "log",
  ".",
  "warn",
  "(",
  "\"\"",
  "+",
  "key",
  "+",
  "\"'",
  "from",
  "\"",
  "+",
  "type",
  ".",
  "getName",
  "(",
  ")",
  "+",
  "\"",
  "into",
  "\"",
  "+",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ".",
  "getName",
  "(",
  ")",
  "+",
  "\"\"",
  ")",
  ";",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "registerMorpher",
  "(",
  "new",
  "BeanMorpher",
  "(",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ",",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ")",
  ")",
  ";",
  "}",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ",",
  "value",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "root",
  "instanceof",
  "Map",
  ")",
  "{",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "log",
  ".",
  "warn",
  "(",
  "\"\"",
  "+",
  "key",
  "+",
  "\":\"",
  "+",
  "type",
  ".",
  "getName",
  "(",
  ")",
  "+",
  "\"\"",
  "+",
  "root",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "getName",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "pd",
  "!=",
  "null",
  ")",
  "{",
  "Class",
  "targetClass",
  "=",
  "pd",
  ".",
  "getPropertyType",
  "(",
  ")",
  ";",
  "if",
  "(",
  "jsonConfig",
  ".",
  "isHandleJettisonSingleElementArray",
  "(",
  ")",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "Class",
  "newTargetClass",
  "=",
  "resolveClass",
  "(",
  "classMap",
  ",",
  "key",
  ",",
  "name",
  ",",
  "type",
  ")",
  ";",
  "Object",
  "newRoot",
  "=",
  "jsonConfig",
  ".",
  "getNewBeanInstanceStrategy",
  "(",
  ")",
  ".",
  "newInstance",
  "(",
  "newTargetClass",
  ",",
  "(",
  "JSONObject",
  ")",
  "value",
  ")",
  ";",
  "if",
  "(",
  "targetClass",
  ".",
  "isArray",
  "(",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "array",
  ",",
  "newRoot",
  ",",
  "jsonConfig",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Collection",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "targetClass",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "JSONArray",
  ".",
  "toList",
  "(",
  "array",
  ",",
  "newRoot",
  ",",
  "jsonConfig",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "JSONArray",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "targetClass",
  ")",
  ")",
  "{",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "array",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "newRoot",
  ",",
  "jsonConfig",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "targetClass",
  "==",
  "Object",
  ".",
  "class",
  ")",
  "{",
  "targetClass",
  "=",
  "resolveClass",
  "(",
  "classMap",
  ",",
  "key",
  ",",
  "name",
  ",",
  "type",
  ")",
  ";",
  "if",
  "(",
  "targetClass",
  "==",
  "null",
  ")",
  "{",
  "targetClass",
  "=",
  "Object",
  ".",
  "class",
  ";",
  "}",
  "}",
  "Object",
  "newRoot",
  "=",
  "jsonConfig",
  ".",
  "getNewBeanInstanceStrategy",
  "(",
  ")",
  ".",
  "newInstance",
  "(",
  "targetClass",
  ",",
  "(",
  "JSONObject",
  ")",
  "value",
  ")",
  ";",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "newRoot",
  ",",
  "jsonConfig",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "root",
  "instanceof",
  "Map",
  ")",
  "{",
  "Class",
  "targetClass",
  "=",
  "findTargetClass",
  "(",
  "key",
  ",",
  "classMap",
  ")",
  ";",
  "targetClass",
  "=",
  "targetClass",
  "==",
  "null",
  "?",
  "findTargetClass",
  "(",
  "name",
  ",",
  "classMap",
  ")",
  ":",
  "targetClass",
  ";",
  "Object",
  "newRoot",
  "=",
  "jsonConfig",
  ".",
  "getNewBeanInstanceStrategy",
  "(",
  ")",
  ".",
  "newInstance",
  "(",
  "targetClass",
  ",",
  "null",
  ")",
  ";",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "toBean",
  "(",
  "(",
  "JSONObject",
  ")",
  "value",
  ",",
  "newRoot",
  ",",
  "jsonConfig",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "log",
  ".",
  "warn",
  "(",
  "\"\"",
  "+",
  "key",
  "+",
  "\":\"",
  "+",
  "type",
  ".",
  "getName",
  "(",
  ")",
  "+",
  "\"\"",
  "+",
  "rootClass",
  ".",
  "getName",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "type",
  ".",
  "isPrimitive",
  "(",
  ")",
  ")",
  "{",
  "log",
  ".",
  "warn",
  "(",
  "\"\"",
  "+",
  "key",
  "+",
  "\":\"",
  "+",
  "type",
  ".",
  "getName",
  "(",
  ")",
  ")",
  ";",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "type",
  ",",
  "null",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setProperty",
  "(",
  "root",
  ",",
  "key",
  ",",
  "null",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "name",
  "+",
  "\"",
  "type",
  "\"",
  "+",
  "type",
  ",",
  "e",
  ")",
  ";",
  "}",
  "}",
  "return",
  "root",
  ";",
  "}",
  "private",
  "static",
  "JSONObject",
  "_fromBean",
  "(",
  "Object",
  "bean",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "bean",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsObject",
  "(",
  "bean",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireObjectStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JsonBeanProcessor",
  "processor",
  "=",
  "jsonConfig",
  ".",
  "findJsonBeanProcessor",
  "(",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ";",
  "if",
  "(",
  "processor",
  "!=",
  "null",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "null",
  ";",
  "try",
  "{",
  "json",
  "=",
  "processor",
  ".",
  "processBean",
  "(",
  "bean",
  ",",
  "jsonConfig",
  ")",
  ";",
  "if",
  "(",
  "json",
  "==",
  "null",
  ")",
  "{",
  "json",
  "=",
  "(",
  "JSONObject",
  ")",
  "jsonConfig",
  ".",
  "findDefaultValueProcessor",
  "(",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ".",
  "getDefaultValue",
  "(",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ";",
  "if",
  "(",
  "json",
  "==",
  "null",
  ")",
  "{",
  "json",
  "=",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "}",
  "}",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "return",
  "json",
  ";",
  "}",
  "JSONObject",
  "jsonObject",
  "=",
  "defaultBeanProcessing",
  "(",
  "bean",
  ",",
  "jsonConfig",
  ")",
  ";",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonObject",
  ";",
  "}",
  "private",
  "static",
  "JSONObject",
  "defaultBeanProcessing",
  "(",
  "Object",
  "bean",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "Class",
  "beanClass",
  "=",
  "bean",
  ".",
  "getClass",
  "(",
  ")",
  ";",
  "PropertyNameProcessor",
  "propertyNameProcessor",
  "=",
  "jsonConfig",
  ".",
  "findJsonPropertyNameProcessor",
  "(",
  "beanClass",
  ")",
  ";",
  "Collection",
  "exclusions",
  "=",
  "jsonConfig",
  ".",
  "getMergedExcludes",
  "(",
  "beanClass",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "try",
  "{",
  "PropertyDescriptor",
  "[",
  "]",
  "pds",
  "=",
  "PropertyUtils",
  ".",
  "getPropertyDescriptors",
  "(",
  "bean",
  ")",
  ";",
  "PropertyFilter",
  "jsonPropertyFilter",
  "=",
  "jsonConfig",
  ".",
  "getJsonPropertyFilter",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "pds",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "boolean",
  "bypass",
  "=",
  "false",
  ";",
  "String",
  "key",
  "=",
  "pds",
  "[",
  "i",
  "]",
  ".",
  "getName",
  "(",
  ")",
  ";",
  "if",
  "(",
  "exclusions",
  ".",
  "contains",
  "(",
  "key",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "if",
  "(",
  "jsonConfig",
  ".",
  "isIgnoreTransientFields",
  "(",
  ")",
  "&&",
  "isTransientField",
  "(",
  "key",
  ",",
  "beanClass",
  ",",
  "jsonConfig",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "Class",
  "type",
  "=",
  "pds",
  "[",
  "i",
  "]",
  ".",
  "getPropertyType",
  "(",
  ")",
  ";",
  "try",
  "{",
  "pds",
  "[",
  "i",
  "]",
  ".",
  "getReadMethod",
  "(",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "String",
  "warning",
  "=",
  "\"Property",
  "'\"",
  "+",
  "key",
  "+",
  "\"'",
  "of",
  "\"",
  "+",
  "beanClass",
  "+",
  "\"\"",
  ";",
  "fireWarnEvent",
  "(",
  "warning",
  ",",
  "jsonConfig",
  ")",
  ";",
  "log",
  ".",
  "info",
  "(",
  "warning",
  ")",
  ";",
  "continue",
  ";",
  "}",
  "if",
  "(",
  "pds",
  "[",
  "i",
  "]",
  ".",
  "getReadMethod",
  "(",
  ")",
  "!=",
  "null",
  ")",
  "{",
  "if",
  "(",
  "isTransient",
  "(",
  "pds",
  "[",
  "i",
  "]",
  ".",
  "getReadMethod",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ")",
  "continue",
  ";",
  "Object",
  "value",
  "=",
  "PropertyUtils",
  ".",
  "getProperty",
  "(",
  "bean",
  ",",
  "key",
  ")",
  ";",
  "if",
  "(",
  "jsonPropertyFilter",
  "!=",
  "null",
  "&&",
  "jsonPropertyFilter",
  ".",
  "apply",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "value",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "JsonValueProcessor",
  "jsonValueProcessor",
  "=",
  "jsonConfig",
  ".",
  "findJsonValueProcessor",
  "(",
  "beanClass",
  ",",
  "type",
  ",",
  "key",
  ")",
  ";",
  "if",
  "(",
  "jsonValueProcessor",
  "!=",
  "null",
  ")",
  "{",
  "value",
  "=",
  "jsonValueProcessor",
  ".",
  "processObjectValue",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "bypass",
  "=",
  "true",
  ";",
  "if",
  "(",
  "!",
  "JsonVerifier",
  ".",
  "isValidJsonValue",
  "(",
  "value",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "value",
  ")",
  ";",
  "}",
  "}",
  "if",
  "(",
  "propertyNameProcessor",
  "!=",
  "null",
  ")",
  "{",
  "key",
  "=",
  "propertyNameProcessor",
  ".",
  "processPropertyName",
  "(",
  "beanClass",
  ",",
  "key",
  ")",
  ";",
  "}",
  "setValue",
  "(",
  "jsonObject",
  ",",
  "key",
  ",",
  "value",
  ",",
  "type",
  ",",
  "jsonConfig",
  ",",
  "bypass",
  ")",
  ";",
  "}",
  "else",
  "{",
  "String",
  "warning",
  "=",
  "\"Property",
  "'\"",
  "+",
  "key",
  "+",
  "\"'",
  "of",
  "\"",
  "+",
  "beanClass",
  "+",
  "\"\"",
  ";",
  "fireWarnEvent",
  "(",
  "warning",
  ",",
  "jsonConfig",
  ")",
  ";",
  "log",
  ".",
  "info",
  "(",
  "warning",
  ")",
  ";",
  "}",
  "}",
  "try",
  "{",
  "if",
  "(",
  "!",
  "jsonConfig",
  ".",
  "isIgnorePublicFields",
  "(",
  ")",
  ")",
  "{",
  "Field",
  "[",
  "]",
  "fields",
  "=",
  "beanClass",
  ".",
  "getFields",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "fields",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "boolean",
  "bypass",
  "=",
  "false",
  ";",
  "Field",
  "field",
  "=",
  "fields",
  "[",
  "i",
  "]",
  ";",
  "String",
  "key",
  "=",
  "field",
  ".",
  "getName",
  "(",
  ")",
  ";",
  "if",
  "(",
  "exclusions",
  ".",
  "contains",
  "(",
  "key",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "if",
  "(",
  "jsonConfig",
  ".",
  "isIgnoreTransientFields",
  "(",
  ")",
  "&&",
  "isTransient",
  "(",
  "field",
  ",",
  "jsonConfig",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "Class",
  "type",
  "=",
  "field",
  ".",
  "getType",
  "(",
  ")",
  ";",
  "Object",
  "value",
  "=",
  "field",
  ".",
  "get",
  "(",
  "bean",
  ")",
  ";",
  "if",
  "(",
  "jsonPropertyFilter",
  "!=",
  "null",
  "&&",
  "jsonPropertyFilter",
  ".",
  "apply",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "value",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "JsonValueProcessor",
  "jsonValueProcessor",
  "=",
  "jsonConfig",
  ".",
  "findJsonValueProcessor",
  "(",
  "beanClass",
  ",",
  "type",
  ",",
  "key",
  ")",
  ";",
  "if",
  "(",
  "jsonValueProcessor",
  "!=",
  "null",
  ")",
  "{",
  "value",
  "=",
  "jsonValueProcessor",
  ".",
  "processObjectValue",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "bypass",
  "=",
  "true",
  ";",
  "if",
  "(",
  "!",
  "JsonVerifier",
  ".",
  "isValidJsonValue",
  "(",
  "value",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "value",
  ")",
  ";",
  "}",
  "}",
  "if",
  "(",
  "propertyNameProcessor",
  "!=",
  "null",
  ")",
  "{",
  "key",
  "=",
  "propertyNameProcessor",
  ".",
  "processPropertyName",
  "(",
  "beanClass",
  ",",
  "key",
  ")",
  ";",
  "}",
  "setValue",
  "(",
  "jsonObject",
  ",",
  "key",
  ",",
  "value",
  ",",
  "type",
  ",",
  "jsonConfig",
  ",",
  "bypass",
  ")",
  ";",
  "}",
  "}",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "log",
  ".",
  "trace",
  "(",
  "\"\"",
  ",",
  "e",
  ")",
  ";",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "return",
  "jsonObject",
  ";",
  "}",
  "private",
  "static",
  "JSONObject",
  "_fromDynaBean",
  "(",
  "DynaBean",
  "bean",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "bean",
  "==",
  "null",
  ")",
  "{",
  "fireObjectStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "}",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "bean",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsObject",
  "(",
  "bean",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireObjectStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "try",
  "{",
  "DynaProperty",
  "[",
  "]",
  "props",
  "=",
  "bean",
  ".",
  "getDynaClass",
  "(",
  ")",
  ".",
  "getDynaProperties",
  "(",
  ")",
  ";",
  "Collection",
  "exclusions",
  "=",
  "jsonConfig",
  ".",
  "getMergedExcludes",
  "(",
  ")",
  ";",
  "PropertyFilter",
  "jsonPropertyFilter",
  "=",
  "jsonConfig",
  ".",
  "getJsonPropertyFilter",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "props",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "boolean",
  "bypass",
  "=",
  "false",
  ";",
  "DynaProperty",
  "dynaProperty",
  "=",
  "props",
  "[",
  "i",
  "]",
  ";",
  "String",
  "key",
  "=",
  "dynaProperty",
  ".",
  "getName",
  "(",
  ")",
  ";",
  "if",
  "(",
  "exclusions",
  ".",
  "contains",
  "(",
  "key",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "Class",
  "type",
  "=",
  "dynaProperty",
  ".",
  "getType",
  "(",
  ")",
  ";",
  "Object",
  "value",
  "=",
  "bean",
  ".",
  "get",
  "(",
  "dynaProperty",
  ".",
  "getName",
  "(",
  ")",
  ")",
  ";",
  "if",
  "(",
  "jsonPropertyFilter",
  "!=",
  "null",
  "&&",
  "jsonPropertyFilter",
  ".",
  "apply",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "value",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "JsonValueProcessor",
  "jsonValueProcessor",
  "=",
  "jsonConfig",
  ".",
  "findJsonValueProcessor",
  "(",
  "type",
  ",",
  "key",
  ")",
  ";",
  "if",
  "(",
  "jsonValueProcessor",
  "!=",
  "null",
  ")",
  "{",
  "value",
  "=",
  "jsonValueProcessor",
  ".",
  "processObjectValue",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "bypass",
  "=",
  "true",
  ";",
  "if",
  "(",
  "!",
  "JsonVerifier",
  ".",
  "isValidJsonValue",
  "(",
  "value",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "value",
  ")",
  ";",
  "}",
  "}",
  "setValue",
  "(",
  "jsonObject",
  ",",
  "key",
  ",",
  "value",
  ",",
  "type",
  ",",
  "jsonConfig",
  ",",
  "bypass",
  ")",
  ";",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "removeInstance",
  "(",
  "bean",
  ")",
  ";",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonObject",
  ";",
  "}",
  "private",
  "static",
  "JSONObject",
  "_fromJSONObject",
  "(",
  "JSONObject",
  "object",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "object",
  "==",
  "null",
  "||",
  "object",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "fireObjectStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "}",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "object",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsObject",
  "(",
  "object",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "object",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "object",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireObjectStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "JSONArray",
  "sa",
  "=",
  "object",
  ".",
  "names",
  "(",
  "jsonConfig",
  ")",
  ";",
  "Collection",
  "exclusions",
  "=",
  "jsonConfig",
  ".",
  "getMergedExcludes",
  "(",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "PropertyFilter",
  "jsonPropertyFilter",
  "=",
  "jsonConfig",
  ".",
  "getJsonPropertyFilter",
  "(",
  ")",
  ";",
  "for",
  "(",
  "Iterator",
  "i",
  "=",
  "sa",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "i",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Object",
  "k",
  "=",
  "i",
  ".",
  "next",
  "(",
  ")",
  ";",
  "if",
  "(",
  "k",
  "==",
  "null",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "!",
  "(",
  "k",
  "instanceof",
  "String",
  ")",
  "&&",
  "!",
  "jsonConfig",
  ".",
  "isAllowNonStringKeys",
  "(",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "ClassCastException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "String",
  "key",
  "=",
  "String",
  ".",
  "valueOf",
  "(",
  "k",
  ")",
  ";",
  "if",
  "(",
  "\"null\"",
  ".",
  "equals",
  "(",
  "key",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "NullPointerException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "exclusions",
  ".",
  "contains",
  "(",
  "key",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "Object",
  "value",
  "=",
  "object",
  ".",
  "opt",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "jsonPropertyFilter",
  "!=",
  "null",
  "&&",
  "jsonPropertyFilter",
  ".",
  "apply",
  "(",
  "object",
  ",",
  "key",
  ",",
  "value",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "if",
  "(",
  "jsonObject",
  ".",
  "properties",
  ".",
  "containsKey",
  "(",
  "key",
  ")",
  ")",
  "{",
  "jsonObject",
  ".",
  "accumulate",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "firePropertySetEvent",
  "(",
  "key",
  ",",
  "value",
  ",",
  "true",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "jsonObject",
  ".",
  "setInternal",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "firePropertySetEvent",
  "(",
  "key",
  ",",
  "value",
  ",",
  "false",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "removeInstance",
  "(",
  "object",
  ")",
  ";",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonObject",
  ";",
  "}",
  "private",
  "static",
  "JSONObject",
  "_fromJSONString",
  "(",
  "JSONString",
  "string",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "return",
  "_fromJSONTokener",
  "(",
  "new",
  "JSONTokener",
  "(",
  "string",
  ".",
  "toJSONString",
  "(",
  ")",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "static",
  "JSONObject",
  "_fromJSONTokener",
  "(",
  "JSONTokener",
  "tokener",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "try",
  "{",
  "char",
  "c",
  ";",
  "String",
  "key",
  ";",
  "Object",
  "value",
  ";",
  "if",
  "(",
  "tokener",
  ".",
  "matches",
  "(",
  "\"null.*\"",
  ")",
  ")",
  "{",
  "fireObjectStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "}",
  "if",
  "(",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  "!=",
  "'{'",
  ")",
  "{",
  "throw",
  "tokener",
  ".",
  "syntaxError",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "fireObjectStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "Collection",
  "exclusions",
  "=",
  "jsonConfig",
  ".",
  "getMergedExcludes",
  "(",
  ")",
  ";",
  "PropertyFilter",
  "jsonPropertyFilter",
  "=",
  "jsonConfig",
  ".",
  "getJsonPropertyFilter",
  "(",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "for",
  "(",
  ";",
  ";",
  ")",
  "{",
  "c",
  "=",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  ";",
  "switch",
  "(",
  "c",
  ")",
  "{",
  "case",
  "0",
  ":",
  "throw",
  "tokener",
  ".",
  "syntaxError",
  "(",
  "\"\"",
  ")",
  ";",
  "case",
  "'}'",
  ":",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonObject",
  ";",
  "default",
  ":",
  "tokener",
  ".",
  "back",
  "(",
  ")",
  ";",
  "key",
  "=",
  "tokener",
  ".",
  "nextValue",
  "(",
  "jsonConfig",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "c",
  "=",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  ";",
  "if",
  "(",
  "c",
  "==",
  "'='",
  ")",
  "{",
  "if",
  "(",
  "tokener",
  ".",
  "next",
  "(",
  ")",
  "!=",
  "'>'",
  ")",
  "{",
  "tokener",
  ".",
  "back",
  "(",
  ")",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "c",
  "!=",
  "':'",
  ")",
  "{",
  "throw",
  "tokener",
  ".",
  "syntaxError",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "char",
  "peek",
  "=",
  "tokener",
  ".",
  "peek",
  "(",
  ")",
  ";",
  "boolean",
  "quoted",
  "=",
  "peek",
  "==",
  "'\"'",
  "||",
  "peek",
  "==",
  "'\\''",
  ";",
  "Object",
  "v",
  "=",
  "tokener",
  ".",
  "nextValue",
  "(",
  "jsonConfig",
  ")",
  ";",
  "if",
  "(",
  "quoted",
  "||",
  "!",
  "JSONUtils",
  ".",
  "isFunctionHeader",
  "(",
  "v",
  ")",
  ")",
  "{",
  "if",
  "(",
  "exclusions",
  ".",
  "contains",
  "(",
  "key",
  ")",
  ")",
  "{",
  "switch",
  "(",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  ")",
  "{",
  "case",
  "';'",
  ":",
  "case",
  "','",
  ":",
  "if",
  "(",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  "==",
  "'}'",
  ")",
  "{",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonObject",
  ";",
  "}",
  "tokener",
  ".",
  "back",
  "(",
  ")",
  ";",
  "break",
  ";",
  "case",
  "'}'",
  ":",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonObject",
  ";",
  "default",
  ":",
  "throw",
  "tokener",
  ".",
  "syntaxError",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "continue",
  ";",
  "}",
  "if",
  "(",
  "jsonPropertyFilter",
  "==",
  "null",
  "||",
  "!",
  "jsonPropertyFilter",
  ".",
  "apply",
  "(",
  "tokener",
  ",",
  "key",
  ",",
  "v",
  ")",
  ")",
  "{",
  "if",
  "(",
  "quoted",
  "&&",
  "v",
  "instanceof",
  "String",
  "&&",
  "(",
  "JSONUtils",
  ".",
  "mayBeJSON",
  "(",
  "(",
  "String",
  ")",
  "v",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isFunction",
  "(",
  "v",
  ")",
  ")",
  ")",
  "{",
  "v",
  "=",
  "JSONUtils",
  ".",
  "DOUBLE_QUOTE",
  "+",
  "v",
  "+",
  "JSONUtils",
  ".",
  "DOUBLE_QUOTE",
  ";",
  "}",
  "if",
  "(",
  "jsonObject",
  ".",
  "properties",
  ".",
  "containsKey",
  "(",
  "key",
  ")",
  ")",
  "{",
  "jsonObject",
  ".",
  "accumulate",
  "(",
  "key",
  ",",
  "v",
  ",",
  "jsonConfig",
  ")",
  ";",
  "firePropertySetEvent",
  "(",
  "key",
  ",",
  "v",
  ",",
  "true",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "jsonObject",
  ".",
  "element",
  "(",
  "key",
  ",",
  "v",
  ",",
  "jsonConfig",
  ")",
  ";",
  "firePropertySetEvent",
  "(",
  "key",
  ",",
  "v",
  ",",
  "false",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "}",
  "else",
  "{",
  "String",
  "params",
  "=",
  "JSONUtils",
  ".",
  "getFunctionParams",
  "(",
  "(",
  "String",
  ")",
  "v",
  ")",
  ";",
  "int",
  "i",
  "=",
  "0",
  ";",
  "StringBuffer",
  "sb",
  "=",
  "new",
  "StringBuffer",
  "(",
  ")",
  ";",
  "for",
  "(",
  ";",
  ";",
  ")",
  "{",
  "char",
  "ch",
  "=",
  "tokener",
  ".",
  "next",
  "(",
  ")",
  ";",
  "if",
  "(",
  "ch",
  "==",
  "0",
  ")",
  "{",
  "break",
  ";",
  "}",
  "if",
  "(",
  "ch",
  "==",
  "'{'",
  ")",
  "{",
  "i",
  "++",
  ";",
  "}",
  "if",
  "(",
  "ch",
  "==",
  "'}'",
  ")",
  "{",
  "i",
  "--",
  ";",
  "}",
  "sb",
  ".",
  "append",
  "(",
  "ch",
  ")",
  ";",
  "if",
  "(",
  "i",
  "==",
  "0",
  ")",
  "{",
  "break",
  ";",
  "}",
  "}",
  "if",
  "(",
  "i",
  "!=",
  "0",
  ")",
  "{",
  "throw",
  "tokener",
  ".",
  "syntaxError",
  "(",
  "\"\"",
  "+",
  "v",
  ")",
  ";",
  "}",
  "String",
  "text",
  "=",
  "sb",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "text",
  "=",
  "text",
  ".",
  "substring",
  "(",
  "1",
  ",",
  "text",
  ".",
  "length",
  "(",
  ")",
  "-",
  "1",
  ")",
  ".",
  "trim",
  "(",
  ")",
  ";",
  "value",
  "=",
  "new",
  "JSONFunction",
  "(",
  "(",
  "params",
  "!=",
  "null",
  ")",
  "?",
  "StringUtils",
  ".",
  "split",
  "(",
  "params",
  ",",
  "\",\"",
  ")",
  ":",
  "null",
  ",",
  "text",
  ")",
  ";",
  "if",
  "(",
  "jsonPropertyFilter",
  "==",
  "null",
  "||",
  "!",
  "jsonPropertyFilter",
  ".",
  "apply",
  "(",
  "tokener",
  ",",
  "key",
  ",",
  "value",
  ")",
  ")",
  "{",
  "if",
  "(",
  "jsonObject",
  ".",
  "properties",
  ".",
  "containsKey",
  "(",
  "key",
  ")",
  ")",
  "{",
  "jsonObject",
  ".",
  "accumulate",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "firePropertySetEvent",
  "(",
  "key",
  ",",
  "value",
  ",",
  "true",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "jsonObject",
  ".",
  "element",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "firePropertySetEvent",
  "(",
  "key",
  ",",
  "value",
  ",",
  "false",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "}",
  "switch",
  "(",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  ")",
  "{",
  "case",
  "';'",
  ":",
  "case",
  "','",
  ":",
  "if",
  "(",
  "tokener",
  ".",
  "nextClean",
  "(",
  ")",
  "==",
  "'}'",
  ")",
  "{",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonObject",
  ";",
  "}",
  "tokener",
  ".",
  "back",
  "(",
  ")",
  ";",
  "break",
  ";",
  "case",
  "'}'",
  ":",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonObject",
  ";",
  "default",
  ":",
  "throw",
  "tokener",
  ".",
  "syntaxError",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "private",
  "static",
  "JSONObject",
  "_fromMap",
  "(",
  "Map",
  "map",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "map",
  "==",
  "null",
  ")",
  "{",
  "fireObjectStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "}",
  "if",
  "(",
  "!",
  "addInstance",
  "(",
  "map",
  ")",
  ")",
  "{",
  "try",
  "{",
  "return",
  "jsonConfig",
  ".",
  "getCycleDetectionStrategy",
  "(",
  ")",
  ".",
  "handleRepeatedReferenceAsObject",
  "(",
  "map",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "map",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "map",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "}",
  "fireObjectStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "Collection",
  "exclusions",
  "=",
  "jsonConfig",
  ".",
  "getMergedExcludes",
  "(",
  ")",
  ";",
  "JSONObject",
  "jsonObject",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "PropertyFilter",
  "jsonPropertyFilter",
  "=",
  "jsonConfig",
  ".",
  "getJsonPropertyFilter",
  "(",
  ")",
  ";",
  "try",
  "{",
  "for",
  "(",
  "Iterator",
  "entries",
  "=",
  "map",
  ".",
  "entrySet",
  "(",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "entries",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "boolean",
  "bypass",
  "=",
  "false",
  ";",
  "Map",
  ".",
  "Entry",
  "entry",
  "=",
  "(",
  "Map",
  ".",
  "Entry",
  ")",
  "entries",
  ".",
  "next",
  "(",
  ")",
  ";",
  "Object",
  "k",
  "=",
  "entry",
  ".",
  "getKey",
  "(",
  ")",
  ";",
  "if",
  "(",
  "k",
  "==",
  "null",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "!",
  "(",
  "k",
  "instanceof",
  "String",
  ")",
  "&&",
  "!",
  "jsonConfig",
  ".",
  "isAllowNonStringKeys",
  "(",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "ClassCastException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "String",
  "key",
  "=",
  "String",
  ".",
  "valueOf",
  "(",
  "k",
  ")",
  ";",
  "if",
  "(",
  "\"null\"",
  ".",
  "equals",
  "(",
  "key",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "NullPointerException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "exclusions",
  ".",
  "contains",
  "(",
  "key",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "Object",
  "value",
  "=",
  "entry",
  ".",
  "getValue",
  "(",
  ")",
  ";",
  "if",
  "(",
  "jsonPropertyFilter",
  "!=",
  "null",
  "&&",
  "jsonPropertyFilter",
  ".",
  "apply",
  "(",
  "map",
  ",",
  "key",
  ",",
  "value",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "if",
  "(",
  "value",
  "!=",
  "null",
  ")",
  "{",
  "JsonValueProcessor",
  "jsonValueProcessor",
  "=",
  "jsonConfig",
  ".",
  "findJsonValueProcessor",
  "(",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "key",
  ")",
  ";",
  "if",
  "(",
  "jsonValueProcessor",
  "!=",
  "null",
  ")",
  "{",
  "value",
  "=",
  "jsonValueProcessor",
  ".",
  "processObjectValue",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "bypass",
  "=",
  "true",
  ";",
  "if",
  "(",
  "!",
  "JsonVerifier",
  ".",
  "isValidJsonValue",
  "(",
  "value",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "value",
  ")",
  ";",
  "}",
  "}",
  "setValue",
  "(",
  "jsonObject",
  ",",
  "key",
  ",",
  "value",
  ",",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "jsonConfig",
  ",",
  "bypass",
  ")",
  ";",
  "}",
  "else",
  "{",
  "if",
  "(",
  "jsonObject",
  ".",
  "properties",
  ".",
  "containsKey",
  "(",
  "key",
  ")",
  ")",
  "{",
  "jsonObject",
  ".",
  "accumulate",
  "(",
  "key",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "firePropertySetEvent",
  "(",
  "key",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "true",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "jsonObject",
  ".",
  "element",
  "(",
  "key",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  ";",
  "firePropertySetEvent",
  "(",
  "key",
  ",",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ",",
  "false",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "}",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "removeInstance",
  "(",
  "map",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "catch",
  "(",
  "RuntimeException",
  "e",
  ")",
  "{",
  "removeInstance",
  "(",
  "map",
  ")",
  ";",
  "JSONException",
  "jsone",
  "=",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "fireErrorEvent",
  "(",
  "jsone",
  ",",
  "jsonConfig",
  ")",
  ";",
  "throw",
  "jsone",
  ";",
  "}",
  "removeInstance",
  "(",
  "map",
  ")",
  ";",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "jsonObject",
  ";",
  "}",
  "private",
  "static",
  "JSONObject",
  "_fromString",
  "(",
  "String",
  "str",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "str",
  "==",
  "null",
  "||",
  "\"null\"",
  ".",
  "equals",
  "(",
  "str",
  ")",
  ")",
  "{",
  "fireObjectStartEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "fireObjectEndEvent",
  "(",
  "jsonConfig",
  ")",
  ";",
  "return",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "}",
  "return",
  "_fromJSONTokener",
  "(",
  "new",
  "JSONTokener",
  "(",
  "str",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "static",
  "Object",
  "convertPropertyValueToArray",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "Class",
  "targetType",
  ",",
  "JsonConfig",
  "jsonConfig",
  ",",
  "Map",
  "classMap",
  ")",
  "{",
  "Class",
  "innerType",
  "=",
  "JSONUtils",
  ".",
  "getInnerComponentType",
  "(",
  "targetType",
  ")",
  ";",
  "Class",
  "targetInnerType",
  "=",
  "findTargetClass",
  "(",
  "key",
  ",",
  "classMap",
  ")",
  ";",
  "if",
  "(",
  "innerType",
  ".",
  "equals",
  "(",
  "Object",
  ".",
  "class",
  ")",
  "&&",
  "targetInnerType",
  "!=",
  "null",
  "&&",
  "!",
  "targetInnerType",
  ".",
  "equals",
  "(",
  "Object",
  ".",
  "class",
  ")",
  ")",
  "{",
  "innerType",
  "=",
  "targetInnerType",
  ";",
  "}",
  "JsonConfig",
  "jsc",
  "=",
  "jsonConfig",
  ".",
  "copy",
  "(",
  ")",
  ";",
  "jsc",
  ".",
  "setRootClass",
  "(",
  "innerType",
  ")",
  ";",
  "jsc",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "Object",
  "array",
  "=",
  "JSONArray",
  ".",
  "toArray",
  "(",
  "(",
  "JSONArray",
  ")",
  "value",
  ",",
  "jsc",
  ")",
  ";",
  "if",
  "(",
  "innerType",
  ".",
  "isPrimitive",
  "(",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isNumber",
  "(",
  "innerType",
  ")",
  "||",
  "Boolean",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "innerType",
  ")",
  "||",
  "JSONUtils",
  ".",
  "isString",
  "(",
  "innerType",
  ")",
  ")",
  "{",
  "array",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "Array",
  ".",
  "newInstance",
  "(",
  "innerType",
  ",",
  "0",
  ")",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "array",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "array",
  ".",
  "getClass",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "targetType",
  ")",
  ")",
  "{",
  "if",
  "(",
  "!",
  "targetType",
  ".",
  "equals",
  "(",
  "Object",
  ".",
  "class",
  ")",
  ")",
  "{",
  "Morpher",
  "morpher",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "getMorpherFor",
  "(",
  "Array",
  ".",
  "newInstance",
  "(",
  "innerType",
  ",",
  "0",
  ")",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ";",
  "if",
  "(",
  "IdentityObjectMorpher",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "morpher",
  ")",
  ")",
  "{",
  "ObjectArrayMorpher",
  "beanMorpher",
  "=",
  "new",
  "ObjectArrayMorpher",
  "(",
  "new",
  "BeanMorpher",
  "(",
  "innerType",
  ",",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ")",
  ")",
  ";",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "registerMorpher",
  "(",
  "beanMorpher",
  ")",
  ";",
  "}",
  "array",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "Array",
  ".",
  "newInstance",
  "(",
  "innerType",
  ",",
  "0",
  ")",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "array",
  ")",
  ";",
  "}",
  "}",
  "return",
  "array",
  ";",
  "}",
  "private",
  "static",
  "List",
  "convertPropertyValueToList",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ",",
  "String",
  "name",
  ",",
  "Map",
  "classMap",
  ")",
  "{",
  "Class",
  "targetClass",
  "=",
  "findTargetClass",
  "(",
  "key",
  ",",
  "classMap",
  ")",
  ";",
  "targetClass",
  "=",
  "targetClass",
  "==",
  "null",
  "?",
  "findTargetClass",
  "(",
  "name",
  ",",
  "classMap",
  ")",
  ":",
  "targetClass",
  ";",
  "JsonConfig",
  "jsc",
  "=",
  "jsonConfig",
  ".",
  "copy",
  "(",
  ")",
  ";",
  "jsc",
  ".",
  "setRootClass",
  "(",
  "targetClass",
  ")",
  ";",
  "jsc",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "List",
  "list",
  "=",
  "(",
  "List",
  ")",
  "JSONArray",
  ".",
  "toCollection",
  "(",
  "(",
  "JSONArray",
  ")",
  "value",
  ",",
  "jsc",
  ")",
  ";",
  "return",
  "list",
  ";",
  "}",
  "private",
  "static",
  "Collection",
  "convertPropertyValueToCollection",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ",",
  "String",
  "name",
  ",",
  "Map",
  "classMap",
  ",",
  "Class",
  "collectionType",
  ")",
  "{",
  "Class",
  "targetClass",
  "=",
  "findTargetClass",
  "(",
  "key",
  ",",
  "classMap",
  ")",
  ";",
  "targetClass",
  "=",
  "targetClass",
  "==",
  "null",
  "?",
  "findTargetClass",
  "(",
  "name",
  ",",
  "classMap",
  ")",
  ":",
  "targetClass",
  ";",
  "JsonConfig",
  "jsc",
  "=",
  "jsonConfig",
  ".",
  "copy",
  "(",
  ")",
  ";",
  "jsc",
  ".",
  "setRootClass",
  "(",
  "targetClass",
  ")",
  ";",
  "jsc",
  ".",
  "setClassMap",
  "(",
  "classMap",
  ")",
  ";",
  "jsc",
  ".",
  "setCollectionType",
  "(",
  "collectionType",
  ")",
  ";",
  "return",
  "JSONArray",
  ".",
  "toCollection",
  "(",
  "(",
  "JSONArray",
  ")",
  "value",
  ",",
  "jsc",
  ")",
  ";",
  "}",
  "private",
  "static",
  "Class",
  "resolveClass",
  "(",
  "Map",
  "classMap",
  ",",
  "String",
  "key",
  ",",
  "String",
  "name",
  ",",
  "Class",
  "type",
  ")",
  "{",
  "Class",
  "targetClass",
  "=",
  "findTargetClass",
  "(",
  "key",
  ",",
  "classMap",
  ")",
  ";",
  "if",
  "(",
  "targetClass",
  "==",
  "null",
  ")",
  "{",
  "targetClass",
  "=",
  "findTargetClass",
  "(",
  "name",
  ",",
  "classMap",
  ")",
  ";",
  "}",
  "if",
  "(",
  "targetClass",
  "==",
  "null",
  "&&",
  "type",
  "!=",
  "null",
  ")",
  "{",
  "if",
  "(",
  "List",
  ".",
  "class",
  ".",
  "equals",
  "(",
  "type",
  ")",
  ")",
  "{",
  "targetClass",
  "=",
  "ArrayList",
  ".",
  "class",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Map",
  ".",
  "class",
  ".",
  "equals",
  "(",
  "type",
  ")",
  ")",
  "{",
  "targetClass",
  "=",
  "LinkedHashMap",
  ".",
  "class",
  ";",
  "}",
  "else",
  "if",
  "(",
  "Set",
  ".",
  "class",
  ".",
  "equals",
  "(",
  "type",
  ")",
  ")",
  "{",
  "targetClass",
  "=",
  "LinkedHashSet",
  ".",
  "class",
  ";",
  "}",
  "else",
  "if",
  "(",
  "!",
  "type",
  ".",
  "isInterface",
  "(",
  ")",
  "&&",
  "!",
  "Object",
  ".",
  "class",
  ".",
  "equals",
  "(",
  "type",
  ")",
  ")",
  "{",
  "targetClass",
  "=",
  "type",
  ";",
  "}",
  "}",
  "return",
  "targetClass",
  ";",
  "}",
  "private",
  "static",
  "Class",
  "findTargetClass",
  "(",
  "String",
  "key",
  ",",
  "Map",
  "classMap",
  ")",
  "{",
  "Class",
  "targetClass",
  "=",
  "(",
  "Class",
  ")",
  "classMap",
  ".",
  "get",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "targetClass",
  "==",
  "null",
  ")",
  "{",
  "for",
  "(",
  "Iterator",
  "i",
  "=",
  "classMap",
  ".",
  "entrySet",
  "(",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "i",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Map",
  ".",
  "Entry",
  "entry",
  "=",
  "(",
  "Map",
  ".",
  "Entry",
  ")",
  "i",
  ".",
  "next",
  "(",
  ")",
  ";",
  "if",
  "(",
  "RegexpUtils",
  ".",
  "getMatcher",
  "(",
  "(",
  "String",
  ")",
  "entry",
  ".",
  "getKey",
  "(",
  ")",
  ")",
  ".",
  "matches",
  "(",
  "key",
  ")",
  ")",
  "{",
  "targetClass",
  "=",
  "(",
  "Class",
  ")",
  "entry",
  ".",
  "getValue",
  "(",
  ")",
  ";",
  "break",
  ";",
  "}",
  "}",
  "}",
  "return",
  "targetClass",
  ";",
  "}",
  "private",
  "static",
  "boolean",
  "isTransientField",
  "(",
  "String",
  "name",
  ",",
  "Class",
  "beanClass",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "try",
  "{",
  "Field",
  "field",
  "=",
  "beanClass",
  ".",
  "getDeclaredField",
  "(",
  "name",
  ")",
  ";",
  "if",
  "(",
  "(",
  "field",
  ".",
  "getModifiers",
  "(",
  ")",
  "&",
  "Modifier",
  ".",
  "TRANSIENT",
  ")",
  "==",
  "Modifier",
  ".",
  "TRANSIENT",
  ")",
  "return",
  "true",
  ";",
  "return",
  "isTransient",
  "(",
  "field",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "log",
  ".",
  "info",
  "(",
  "\"\"",
  "+",
  "beanClass",
  "+",
  "\".\"",
  "+",
  "name",
  "+",
  "\"\"",
  ",",
  "e",
  ")",
  ";",
  "}",
  "return",
  "false",
  ";",
  "}",
  "private",
  "static",
  "boolean",
  "isTransient",
  "(",
  "AnnotatedElement",
  "element",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "for",
  "(",
  "Iterator",
  "annotations",
  "=",
  "jsonConfig",
  ".",
  "getIgnoreFieldAnnotations",
  "(",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "annotations",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "try",
  "{",
  "String",
  "annotationClassName",
  "=",
  "(",
  "String",
  ")",
  "annotations",
  ".",
  "next",
  "(",
  ")",
  ";",
  "if",
  "(",
  "element",
  ".",
  "getAnnotation",
  "(",
  "(",
  "Class",
  ")",
  "Class",
  ".",
  "forName",
  "(",
  "annotationClassName",
  ")",
  ")",
  "!=",
  "null",
  ")",
  "return",
  "true",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "log",
  ".",
  "info",
  "(",
  "\"\"",
  "+",
  "element",
  "+",
  "\"\"",
  ",",
  "e",
  ")",
  ";",
  "}",
  "}",
  "return",
  "false",
  ";",
  "}",
  "private",
  "static",
  "Object",
  "morphPropertyValue",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "Class",
  "type",
  ",",
  "Class",
  "targetType",
  ")",
  "{",
  "Morpher",
  "morpher",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "getMorpherFor",
  "(",
  "targetType",
  ")",
  ";",
  "if",
  "(",
  "IdentityObjectMorpher",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "morpher",
  ")",
  ")",
  "{",
  "log",
  ".",
  "warn",
  "(",
  "\"\"",
  "+",
  "key",
  "+",
  "\"'",
  "from",
  "\"",
  "+",
  "type",
  ".",
  "getName",
  "(",
  ")",
  "+",
  "\"",
  "into",
  "\"",
  "+",
  "targetType",
  ".",
  "getName",
  "(",
  ")",
  "+",
  "\"\"",
  ")",
  ";",
  "if",
  "(",
  "Enum",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "targetType",
  ")",
  ")",
  "{",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "registerMorpher",
  "(",
  "new",
  "EnumMorpher",
  "(",
  "targetType",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "registerMorpher",
  "(",
  "new",
  "BeanMorpher",
  "(",
  "targetType",
  ",",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ")",
  ")",
  ";",
  "}",
  "}",
  "value",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "targetType",
  ",",
  "value",
  ")",
  ";",
  "return",
  "value",
  ";",
  "}",
  "private",
  "static",
  "void",
  "setProperty",
  "(",
  "Object",
  "bean",
  ",",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "throws",
  "Exception",
  "{",
  "PropertySetStrategy",
  "propertySetStrategy",
  "=",
  "jsonConfig",
  ".",
  "getPropertySetStrategy",
  "(",
  ")",
  "!=",
  "null",
  "?",
  "jsonConfig",
  ".",
  "getPropertySetStrategy",
  "(",
  ")",
  ":",
  "PropertySetStrategy",
  ".",
  "DEFAULT",
  ";",
  "propertySetStrategy",
  ".",
  "setProperty",
  "(",
  "bean",
  ",",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "static",
  "void",
  "setValue",
  "(",
  "JSONObject",
  "jsonObject",
  ",",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "Class",
  "type",
  ",",
  "JsonConfig",
  "jsonConfig",
  ",",
  "boolean",
  "bypass",
  ")",
  "{",
  "boolean",
  "accumulated",
  "=",
  "false",
  ";",
  "if",
  "(",
  "value",
  "==",
  "null",
  ")",
  "{",
  "value",
  "=",
  "jsonConfig",
  ".",
  "findDefaultValueProcessor",
  "(",
  "type",
  ")",
  ".",
  "getDefaultValue",
  "(",
  "type",
  ")",
  ";",
  "if",
  "(",
  "!",
  "JsonVerifier",
  ".",
  "isValidJsonValue",
  "(",
  "value",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "value",
  ")",
  ";",
  "}",
  "}",
  "if",
  "(",
  "jsonObject",
  ".",
  "properties",
  ".",
  "containsKey",
  "(",
  "key",
  ")",
  ")",
  "{",
  "if",
  "(",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "Object",
  "o",
  "=",
  "jsonObject",
  ".",
  "opt",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "o",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "(",
  "(",
  "JSONArray",
  ")",
  "o",
  ")",
  ".",
  "addString",
  "(",
  "(",
  "String",
  ")",
  "value",
  ")",
  ";",
  "}",
  "else",
  "{",
  "jsonObject",
  ".",
  "properties",
  ".",
  "put",
  "(",
  "key",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "o",
  ")",
  ".",
  "addString",
  "(",
  "(",
  "String",
  ")",
  "value",
  ")",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "jsonObject",
  ".",
  "accumulate",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "accumulated",
  "=",
  "true",
  ";",
  "}",
  "else",
  "{",
  "if",
  "(",
  "bypass",
  "||",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "type",
  ")",
  ")",
  "{",
  "jsonObject",
  ".",
  "properties",
  ".",
  "put",
  "(",
  "key",
  ",",
  "value",
  ")",
  ";",
  "}",
  "else",
  "{",
  "jsonObject",
  ".",
  "setInternal",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "value",
  "=",
  "jsonObject",
  ".",
  "opt",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "accumulated",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "(",
  "JSONArray",
  ")",
  "value",
  ";",
  "value",
  "=",
  "array",
  ".",
  "get",
  "(",
  "array",
  ".",
  "size",
  "(",
  ")",
  "-",
  "1",
  ")",
  ";",
  "}",
  "firePropertySetEvent",
  "(",
  "key",
  ",",
  "value",
  ",",
  "accumulated",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "boolean",
  "nullObject",
  ";",
  "private",
  "Map",
  "properties",
  ";",
  "public",
  "JSONObject",
  "(",
  ")",
  "{",
  "this",
  ".",
  "properties",
  "=",
  "new",
  "ListOrderedMap",
  "(",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "(",
  "boolean",
  "isNull",
  ")",
  "{",
  "this",
  "(",
  ")",
  ";",
  "this",
  ".",
  "nullObject",
  "=",
  "isNull",
  ";",
  "}",
  "public",
  "JSONObject",
  "accumulate",
  "(",
  "String",
  "key",
  ",",
  "boolean",
  "value",
  ")",
  "{",
  "return",
  "_accumulate",
  "(",
  "key",
  ",",
  "value",
  "?",
  "Boolean",
  ".",
  "TRUE",
  ":",
  "Boolean",
  ".",
  "FALSE",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "accumulate",
  "(",
  "String",
  "key",
  ",",
  "double",
  "value",
  ")",
  "{",
  "return",
  "_accumulate",
  "(",
  "key",
  ",",
  "Double",
  ".",
  "valueOf",
  "(",
  "value",
  ")",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "accumulate",
  "(",
  "String",
  "key",
  ",",
  "int",
  "value",
  ")",
  "{",
  "return",
  "_accumulate",
  "(",
  "key",
  ",",
  "Integer",
  ".",
  "valueOf",
  "(",
  "value",
  ")",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "accumulate",
  "(",
  "String",
  "key",
  ",",
  "long",
  "value",
  ")",
  "{",
  "return",
  "_accumulate",
  "(",
  "key",
  ",",
  "Long",
  ".",
  "valueOf",
  "(",
  "value",
  ")",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "accumulate",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "return",
  "_accumulate",
  "(",
  "key",
  ",",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "accumulate",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "return",
  "_accumulate",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "public",
  "void",
  "accumulateAll",
  "(",
  "Map",
  "map",
  ")",
  "{",
  "accumulateAll",
  "(",
  "map",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "accumulateAll",
  "(",
  "Map",
  "map",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "map",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "for",
  "(",
  "Iterator",
  "entries",
  "=",
  "map",
  ".",
  "entrySet",
  "(",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "entries",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Map",
  ".",
  "Entry",
  "entry",
  "=",
  "(",
  "Map",
  ".",
  "Entry",
  ")",
  "entries",
  ".",
  "next",
  "(",
  ")",
  ";",
  "String",
  "key",
  "=",
  "(",
  "String",
  ")",
  "entry",
  ".",
  "getKey",
  "(",
  ")",
  ";",
  "Object",
  "value",
  "=",
  "entry",
  ".",
  "getValue",
  "(",
  ")",
  ";",
  "accumulate",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "for",
  "(",
  "Iterator",
  "entries",
  "=",
  "map",
  ".",
  "entrySet",
  "(",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "entries",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Map",
  ".",
  "Entry",
  "entry",
  "=",
  "(",
  "Map",
  ".",
  "Entry",
  ")",
  "entries",
  ".",
  "next",
  "(",
  ")",
  ";",
  "String",
  "key",
  "=",
  "String",
  ".",
  "valueOf",
  "(",
  "entry",
  ".",
  "getKey",
  "(",
  ")",
  ")",
  ";",
  "Object",
  "value",
  "=",
  "entry",
  ".",
  "getValue",
  "(",
  ")",
  ";",
  "accumulate",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "}",
  "public",
  "void",
  "clear",
  "(",
  ")",
  "{",
  "properties",
  ".",
  "clear",
  "(",
  ")",
  ";",
  "}",
  "public",
  "int",
  "compareTo",
  "(",
  "Object",
  "obj",
  ")",
  "{",
  "if",
  "(",
  "obj",
  "!=",
  "null",
  "&&",
  "(",
  "obj",
  "instanceof",
  "JSONObject",
  ")",
  ")",
  "{",
  "JSONObject",
  "other",
  "=",
  "(",
  "JSONObject",
  ")",
  "obj",
  ";",
  "int",
  "size1",
  "=",
  "size",
  "(",
  ")",
  ";",
  "int",
  "size2",
  "=",
  "other",
  ".",
  "size",
  "(",
  ")",
  ";",
  "if",
  "(",
  "size1",
  "<",
  "size2",
  ")",
  "{",
  "return",
  "-",
  "1",
  ";",
  "}",
  "else",
  "if",
  "(",
  "size1",
  ">",
  "size2",
  ")",
  "{",
  "return",
  "1",
  ";",
  "}",
  "else",
  "if",
  "(",
  "this",
  ".",
  "equals",
  "(",
  "other",
  ")",
  ")",
  "{",
  "return",
  "0",
  ";",
  "}",
  "}",
  "return",
  "-",
  "1",
  ";",
  "}",
  "public",
  "boolean",
  "containsKey",
  "(",
  "Object",
  "key",
  ")",
  "{",
  "return",
  "properties",
  ".",
  "containsKey",
  "(",
  "key",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "containsValue",
  "(",
  "Object",
  "value",
  ")",
  "{",
  "return",
  "containsValue",
  "(",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "containsValue",
  "(",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "try",
  "{",
  "value",
  "=",
  "processValue",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "e",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "return",
  "properties",
  ".",
  "containsValue",
  "(",
  "value",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "discard",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "this",
  ".",
  "properties",
  ".",
  "remove",
  "(",
  "key",
  ")",
  ";",
  "return",
  "this",
  ";",
  "}",
  "public",
  "JSONObject",
  "element",
  "(",
  "String",
  "key",
  ",",
  "boolean",
  "value",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "element",
  "(",
  "key",
  ",",
  "value",
  "?",
  "Boolean",
  ".",
  "TRUE",
  ":",
  "Boolean",
  ".",
  "FALSE",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "element",
  "(",
  "String",
  "key",
  ",",
  "Collection",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "key",
  ",",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "element",
  "(",
  "String",
  "key",
  ",",
  "Collection",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "!",
  "(",
  "value",
  "instanceof",
  "JSONArray",
  ")",
  ")",
  "{",
  "value",
  "=",
  "JSONArray",
  ".",
  "fromObject",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "return",
  "setInternal",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "element",
  "(",
  "String",
  "key",
  ",",
  "double",
  "value",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "Double",
  "d",
  "=",
  "new",
  "Double",
  "(",
  "value",
  ")",
  ";",
  "JSONUtils",
  ".",
  "testValidity",
  "(",
  "d",
  ")",
  ";",
  "return",
  "element",
  "(",
  "key",
  ",",
  "d",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "element",
  "(",
  "String",
  "key",
  ",",
  "int",
  "value",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "element",
  "(",
  "key",
  ",",
  "new",
  "Integer",
  "(",
  "value",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "element",
  "(",
  "String",
  "key",
  ",",
  "long",
  "value",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "element",
  "(",
  "key",
  ",",
  "new",
  "Long",
  "(",
  "value",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "element",
  "(",
  "String",
  "key",
  ",",
  "Map",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "key",
  ",",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "element",
  "(",
  "String",
  "key",
  ",",
  "Map",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "return",
  "setInternal",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "return",
  "element",
  "(",
  "key",
  ",",
  "JSONObject",
  ".",
  "fromObject",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "public",
  "JSONObject",
  "element",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "return",
  "element",
  "(",
  "key",
  ",",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "element",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "if",
  "(",
  "key",
  "==",
  "null",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"Null",
  "key.\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "value",
  "!=",
  "null",
  ")",
  "{",
  "value",
  "=",
  "processValue",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "_setInternal",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "remove",
  "(",
  "key",
  ")",
  ";",
  "}",
  "return",
  "this",
  ";",
  "}",
  "public",
  "JSONObject",
  "elementOpt",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "return",
  "elementOpt",
  "(",
  "key",
  ",",
  "value",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "elementOpt",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "if",
  "(",
  "key",
  "!=",
  "null",
  "&&",
  "value",
  "!=",
  "null",
  ")",
  "{",
  "element",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "return",
  "this",
  ";",
  "}",
  "public",
  "Set",
  "entrySet",
  "(",
  ")",
  "{",
  "return",
  "Collections",
  ".",
  "unmodifiableSet",
  "(",
  "properties",
  ".",
  "entrySet",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "equals",
  "(",
  "Object",
  "obj",
  ")",
  "{",
  "if",
  "(",
  "obj",
  "==",
  "this",
  ")",
  "{",
  "return",
  "true",
  ";",
  "}",
  "if",
  "(",
  "obj",
  "==",
  "null",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "if",
  "(",
  "!",
  "(",
  "obj",
  "instanceof",
  "JSONObject",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "JSONObject",
  "other",
  "=",
  "(",
  "JSONObject",
  ")",
  "obj",
  ";",
  "if",
  "(",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "if",
  "(",
  "other",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "return",
  "true",
  ";",
  "}",
  "else",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "other",
  ".",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "if",
  "(",
  "other",
  ".",
  "size",
  "(",
  ")",
  "!=",
  "size",
  "(",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "for",
  "(",
  "Iterator",
  "keys",
  "=",
  "properties",
  ".",
  "keySet",
  "(",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "keys",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "String",
  "key",
  "=",
  "(",
  "String",
  ")",
  "keys",
  ".",
  "next",
  "(",
  ")",
  ";",
  "if",
  "(",
  "!",
  "other",
  ".",
  "properties",
  ".",
  "containsKey",
  "(",
  "key",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "Object",
  "o1",
  "=",
  "properties",
  ".",
  "get",
  "(",
  "key",
  ")",
  ";",
  "Object",
  "o2",
  "=",
  "other",
  ".",
  "properties",
  ".",
  "get",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "o1",
  ")",
  ")",
  "{",
  "if",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "continue",
  ";",
  "}",
  "else",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "if",
  "(",
  "o1",
  "instanceof",
  "String",
  "&&",
  "o2",
  "instanceof",
  "JSONFunction",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "o2",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONFunction",
  "&&",
  "o2",
  "instanceof",
  "String",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o2",
  ".",
  "equals",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "o1",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONObject",
  "&&",
  "o2",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONArray",
  "&&",
  "o2",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "o1",
  "instanceof",
  "JSONFunction",
  "&&",
  "o2",
  "instanceof",
  "JSONFunction",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "o1",
  "instanceof",
  "String",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "o2",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "o2",
  "instanceof",
  "String",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o2",
  ".",
  "equals",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "o1",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "{",
  "Morpher",
  "m1",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "getMorpherFor",
  "(",
  "o1",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ";",
  "Morpher",
  "m2",
  "=",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "getMorpherFor",
  "(",
  "o2",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ";",
  "if",
  "(",
  "m1",
  "!=",
  "null",
  "&&",
  "m1",
  "!=",
  "IdentityObjectMorpher",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "o1",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "o2",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "if",
  "(",
  "m2",
  "!=",
  "null",
  "&&",
  "m2",
  "!=",
  "IdentityObjectMorpher",
  ".",
  "getInstance",
  "(",
  ")",
  ")",
  "{",
  "if",
  "(",
  "!",
  "JSONUtils",
  ".",
  "getMorpherRegistry",
  "(",
  ")",
  ".",
  "morph",
  "(",
  "o1",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "o1",
  ")",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "else",
  "{",
  "if",
  "(",
  "!",
  "o1",
  ".",
  "equals",
  "(",
  "o2",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "}",
  "}",
  "}",
  "}",
  "return",
  "true",
  ";",
  "}",
  "public",
  "Object",
  "get",
  "(",
  "Object",
  "key",
  ")",
  "{",
  "if",
  "(",
  "key",
  "instanceof",
  "String",
  ")",
  "{",
  "return",
  "get",
  "(",
  "(",
  "String",
  ")",
  "key",
  ")",
  ";",
  "}",
  "return",
  "null",
  ";",
  "}",
  "public",
  "Object",
  "get",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "this",
  ".",
  "properties",
  ".",
  "get",
  "(",
  "key",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "getBoolean",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  ")",
  "{",
  "if",
  "(",
  "o",
  ".",
  "equals",
  "(",
  "Boolean",
  ".",
  "FALSE",
  ")",
  "||",
  "(",
  "o",
  "instanceof",
  "String",
  "&&",
  "(",
  "(",
  "String",
  ")",
  "o",
  ")",
  ".",
  "equalsIgnoreCase",
  "(",
  "\"false\"",
  ")",
  ")",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "else",
  "if",
  "(",
  "o",
  ".",
  "equals",
  "(",
  "Boolean",
  ".",
  "TRUE",
  ")",
  "||",
  "(",
  "o",
  "instanceof",
  "String",
  "&&",
  "(",
  "(",
  "String",
  ")",
  "o",
  ")",
  ".",
  "equalsIgnoreCase",
  "(",
  "\"true\"",
  ")",
  ")",
  ")",
  "{",
  "return",
  "true",
  ";",
  "}",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONObject[\"",
  "+",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "key",
  ")",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "double",
  "getDouble",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  ")",
  "{",
  "try",
  "{",
  "return",
  "o",
  "instanceof",
  "Number",
  "?",
  "(",
  "(",
  "Number",
  ")",
  "o",
  ")",
  ".",
  "doubleValue",
  "(",
  ")",
  ":",
  "Double",
  ".",
  "parseDouble",
  "(",
  "(",
  "String",
  ")",
  "o",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONObject[\"",
  "+",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "key",
  ")",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONObject[\"",
  "+",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "key",
  ")",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "int",
  "getInt",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  ")",
  "{",
  "return",
  "o",
  "instanceof",
  "Number",
  "?",
  "(",
  "(",
  "Number",
  ")",
  "o",
  ")",
  ".",
  "intValue",
  "(",
  ")",
  ":",
  "(",
  "int",
  ")",
  "getDouble",
  "(",
  "key",
  ")",
  ";",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONObject[\"",
  "+",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "key",
  ")",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "getJSONArray",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  "&&",
  "o",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "return",
  "(",
  "JSONArray",
  ")",
  "o",
  ";",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONObject[\"",
  "+",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "key",
  ")",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "JSONObject",
  "getJSONObject",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "equals",
  "(",
  "o",
  ")",
  ")",
  "{",
  "return",
  "new",
  "JSONObject",
  "(",
  "true",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "o",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "return",
  "(",
  "JSONObject",
  ")",
  "o",
  ";",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONObject[\"",
  "+",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "key",
  ")",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "long",
  "getLong",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  ")",
  "{",
  "return",
  "o",
  "instanceof",
  "Number",
  "?",
  "(",
  "(",
  "Number",
  ")",
  "o",
  ")",
  ".",
  "longValue",
  "(",
  ")",
  ":",
  "(",
  "long",
  ")",
  "getDouble",
  "(",
  "key",
  ")",
  ";",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONObject[\"",
  "+",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "key",
  ")",
  "+",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "String",
  "getString",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "get",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "o",
  "!=",
  "null",
  ")",
  "{",
  "return",
  "o",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"JSONObject[\"",
  "+",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "key",
  ")",
  "+",
  "\"]",
  "not",
  "found.\"",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "has",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "this",
  ".",
  "properties",
  ".",
  "containsKey",
  "(",
  "key",
  ")",
  ";",
  "}",
  "public",
  "int",
  "hashCode",
  "(",
  ")",
  "{",
  "int",
  "hashcode",
  "=",
  "19",
  ";",
  "if",
  "(",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "return",
  "hashcode",
  "+",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "hashCode",
  "(",
  ")",
  ";",
  "}",
  "for",
  "(",
  "Iterator",
  "entries",
  "=",
  "properties",
  ".",
  "entrySet",
  "(",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "entries",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Map",
  ".",
  "Entry",
  "entry",
  "=",
  "(",
  "Map",
  ".",
  "Entry",
  ")",
  "entries",
  ".",
  "next",
  "(",
  ")",
  ";",
  "Object",
  "key",
  "=",
  "entry",
  ".",
  "getKey",
  "(",
  ")",
  ";",
  "Object",
  "value",
  "=",
  "entry",
  ".",
  "getValue",
  "(",
  ")",
  ";",
  "hashcode",
  "+=",
  "key",
  ".",
  "hashCode",
  "(",
  ")",
  "+",
  "JSONUtils",
  ".",
  "hashCode",
  "(",
  "value",
  ")",
  ";",
  "}",
  "return",
  "hashcode",
  ";",
  "}",
  "public",
  "boolean",
  "isArray",
  "(",
  ")",
  "{",
  "return",
  "false",
  ";",
  "}",
  "public",
  "boolean",
  "isEmpty",
  "(",
  ")",
  "{",
  "return",
  "this",
  ".",
  "properties",
  ".",
  "isEmpty",
  "(",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "isNullObject",
  "(",
  ")",
  "{",
  "return",
  "nullObject",
  ";",
  "}",
  "public",
  "Iterator",
  "keys",
  "(",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "keySet",
  "(",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "}",
  "public",
  "Set",
  "keySet",
  "(",
  ")",
  "{",
  "return",
  "Collections",
  ".",
  "unmodifiableSet",
  "(",
  "properties",
  ".",
  "keySet",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "names",
  "(",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "JSONArray",
  "ja",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "Iterator",
  "keys",
  "=",
  "keys",
  "(",
  ")",
  ";",
  "while",
  "(",
  "keys",
  ".",
  "hasNext",
  "(",
  ")",
  ")",
  "{",
  "ja",
  ".",
  "element",
  "(",
  "keys",
  ".",
  "next",
  "(",
  ")",
  ")",
  ";",
  "}",
  "return",
  "ja",
  ";",
  "}",
  "public",
  "JSONArray",
  "names",
  "(",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "JSONArray",
  "ja",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "Iterator",
  "keys",
  "=",
  "keys",
  "(",
  ")",
  ";",
  "while",
  "(",
  "keys",
  ".",
  "hasNext",
  "(",
  ")",
  ")",
  "{",
  "ja",
  ".",
  "element",
  "(",
  "keys",
  ".",
  "next",
  "(",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "return",
  "ja",
  ";",
  "}",
  "public",
  "Object",
  "opt",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "key",
  "==",
  "null",
  "?",
  "null",
  ":",
  "this",
  ".",
  "properties",
  ".",
  "get",
  "(",
  "key",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "optBoolean",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "optBoolean",
  "(",
  "key",
  ",",
  "false",
  ")",
  ";",
  "}",
  "public",
  "boolean",
  "optBoolean",
  "(",
  "String",
  "key",
  ",",
  "boolean",
  "defaultValue",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "try",
  "{",
  "return",
  "getBoolean",
  "(",
  "key",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "return",
  "defaultValue",
  ";",
  "}",
  "}",
  "public",
  "double",
  "optDouble",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "optDouble",
  "(",
  "key",
  ",",
  "Double",
  ".",
  "NaN",
  ")",
  ";",
  "}",
  "public",
  "double",
  "optDouble",
  "(",
  "String",
  "key",
  ",",
  "double",
  "defaultValue",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "try",
  "{",
  "Object",
  "o",
  "=",
  "opt",
  "(",
  "key",
  ")",
  ";",
  "return",
  "o",
  "instanceof",
  "Number",
  "?",
  "(",
  "(",
  "Number",
  ")",
  "o",
  ")",
  ".",
  "doubleValue",
  "(",
  ")",
  ":",
  "new",
  "Double",
  "(",
  "(",
  "String",
  ")",
  "o",
  ")",
  ".",
  "doubleValue",
  "(",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "return",
  "defaultValue",
  ";",
  "}",
  "}",
  "public",
  "int",
  "optInt",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "optInt",
  "(",
  "key",
  ",",
  "0",
  ")",
  ";",
  "}",
  "public",
  "int",
  "optInt",
  "(",
  "String",
  "key",
  ",",
  "int",
  "defaultValue",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "try",
  "{",
  "return",
  "getInt",
  "(",
  "key",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "return",
  "defaultValue",
  ";",
  "}",
  "}",
  "public",
  "JSONArray",
  "optJSONArray",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "opt",
  "(",
  "key",
  ")",
  ";",
  "return",
  "o",
  "instanceof",
  "JSONArray",
  "?",
  "(",
  "JSONArray",
  ")",
  "o",
  ":",
  "null",
  ";",
  "}",
  "public",
  "JSONObject",
  "optJSONObject",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "opt",
  "(",
  "key",
  ")",
  ";",
  "return",
  "o",
  "instanceof",
  "JSONObject",
  "?",
  "(",
  "JSONObject",
  ")",
  "o",
  ":",
  "null",
  ";",
  "}",
  "public",
  "long",
  "optLong",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "optLong",
  "(",
  "key",
  ",",
  "0",
  ")",
  ";",
  "}",
  "public",
  "long",
  "optLong",
  "(",
  "String",
  "key",
  ",",
  "long",
  "defaultValue",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "try",
  "{",
  "return",
  "getLong",
  "(",
  "key",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "return",
  "defaultValue",
  ";",
  "}",
  "}",
  "public",
  "String",
  "optString",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "optString",
  "(",
  "key",
  ",",
  "\"\"",
  ")",
  ";",
  "}",
  "public",
  "String",
  "optString",
  "(",
  "String",
  "key",
  ",",
  "String",
  "defaultValue",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "Object",
  "o",
  "=",
  "opt",
  "(",
  "key",
  ")",
  ";",
  "return",
  "o",
  "!=",
  "null",
  "?",
  "o",
  ".",
  "toString",
  "(",
  ")",
  ":",
  "defaultValue",
  ";",
  "}",
  "public",
  "Object",
  "put",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "if",
  "(",
  "key",
  "==",
  "null",
  ")",
  "{",
  "throw",
  "new",
  "IllegalArgumentException",
  "(",
  "\"key",
  "is",
  "null.\"",
  ")",
  ";",
  "}",
  "Object",
  "previous",
  "=",
  "properties",
  ".",
  "get",
  "(",
  "key",
  ")",
  ";",
  "element",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "key",
  ")",
  ",",
  "value",
  ")",
  ";",
  "return",
  "previous",
  ";",
  "}",
  "public",
  "void",
  "putAll",
  "(",
  "Map",
  "map",
  ")",
  "{",
  "putAll",
  "(",
  "map",
  ",",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "void",
  "putAll",
  "(",
  "Map",
  "map",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "map",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "for",
  "(",
  "Iterator",
  "entries",
  "=",
  "map",
  ".",
  "entrySet",
  "(",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "entries",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Map",
  ".",
  "Entry",
  "entry",
  "=",
  "(",
  "Map",
  ".",
  "Entry",
  ")",
  "entries",
  ".",
  "next",
  "(",
  ")",
  ";",
  "String",
  "key",
  "=",
  "(",
  "String",
  ")",
  "entry",
  ".",
  "getKey",
  "(",
  ")",
  ";",
  "Object",
  "value",
  "=",
  "entry",
  ".",
  "getValue",
  "(",
  ")",
  ";",
  "this",
  ".",
  "properties",
  ".",
  "put",
  "(",
  "key",
  ",",
  "value",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "for",
  "(",
  "Iterator",
  "entries",
  "=",
  "map",
  ".",
  "entrySet",
  "(",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "entries",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Map",
  ".",
  "Entry",
  "entry",
  "=",
  "(",
  "Map",
  ".",
  "Entry",
  ")",
  "entries",
  ".",
  "next",
  "(",
  ")",
  ";",
  "String",
  "key",
  "=",
  "String",
  ".",
  "valueOf",
  "(",
  "entry",
  ".",
  "getKey",
  "(",
  ")",
  ")",
  ";",
  "Object",
  "value",
  "=",
  "entry",
  ".",
  "getValue",
  "(",
  ")",
  ";",
  "element",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "}",
  "public",
  "Object",
  "remove",
  "(",
  "Object",
  "key",
  ")",
  "{",
  "return",
  "properties",
  ".",
  "remove",
  "(",
  "key",
  ")",
  ";",
  "}",
  "public",
  "Object",
  "remove",
  "(",
  "String",
  "key",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "return",
  "this",
  ".",
  "properties",
  ".",
  "remove",
  "(",
  "key",
  ")",
  ";",
  "}",
  "public",
  "int",
  "size",
  "(",
  ")",
  "{",
  "return",
  "this",
  ".",
  "properties",
  ".",
  "size",
  "(",
  ")",
  ";",
  "}",
  "public",
  "JSONArray",
  "toJSONArray",
  "(",
  "JSONArray",
  "names",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "if",
  "(",
  "names",
  "==",
  "null",
  "||",
  "names",
  ".",
  "size",
  "(",
  ")",
  "==",
  "0",
  ")",
  "{",
  "return",
  "null",
  ";",
  "}",
  "JSONArray",
  "ja",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "names",
  ".",
  "size",
  "(",
  ")",
  ";",
  "i",
  "+=",
  "1",
  ")",
  "{",
  "ja",
  ".",
  "element",
  "(",
  "this",
  ".",
  "opt",
  "(",
  "names",
  ".",
  "getString",
  "(",
  "i",
  ")",
  ")",
  ")",
  ";",
  "}",
  "return",
  "ja",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  ")",
  "{",
  "if",
  "(",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "return",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "try",
  "{",
  "Iterator",
  "keys",
  "=",
  "keys",
  "(",
  ")",
  ";",
  "StringBuffer",
  "sb",
  "=",
  "new",
  "StringBuffer",
  "(",
  "\"{\"",
  ")",
  ";",
  "while",
  "(",
  "keys",
  ".",
  "hasNext",
  "(",
  ")",
  ")",
  "{",
  "if",
  "(",
  "sb",
  ".",
  "length",
  "(",
  ")",
  ">",
  "1",
  ")",
  "{",
  "sb",
  ".",
  "append",
  "(",
  "','",
  ")",
  ";",
  "}",
  "Object",
  "o",
  "=",
  "keys",
  ".",
  "next",
  "(",
  ")",
  ";",
  "sb",
  ".",
  "append",
  "(",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "o",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ")",
  ";",
  "sb",
  ".",
  "append",
  "(",
  "':'",
  ")",
  ";",
  "sb",
  ".",
  "append",
  "(",
  "JSONUtils",
  ".",
  "valueToString",
  "(",
  "this",
  ".",
  "properties",
  ".",
  "get",
  "(",
  "o",
  ")",
  ")",
  ")",
  ";",
  "}",
  "sb",
  ".",
  "append",
  "(",
  "'}'",
  ")",
  ";",
  "return",
  "sb",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "Exception",
  "e",
  ")",
  "{",
  "return",
  "null",
  ";",
  "}",
  "}",
  "public",
  "String",
  "toString",
  "(",
  "int",
  "indentFactor",
  ")",
  "{",
  "if",
  "(",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "return",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "if",
  "(",
  "indentFactor",
  "==",
  "0",
  ")",
  "{",
  "return",
  "this",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "return",
  "toString",
  "(",
  "indentFactor",
  ",",
  "0",
  ")",
  ";",
  "}",
  "public",
  "String",
  "toString",
  "(",
  "int",
  "indentFactor",
  ",",
  "int",
  "indent",
  ")",
  "{",
  "if",
  "(",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "return",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "int",
  "i",
  ";",
  "int",
  "n",
  "=",
  "size",
  "(",
  ")",
  ";",
  "if",
  "(",
  "n",
  "==",
  "0",
  ")",
  "{",
  "return",
  "\"{}\"",
  ";",
  "}",
  "if",
  "(",
  "indentFactor",
  "==",
  "0",
  ")",
  "{",
  "return",
  "this",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "Iterator",
  "keys",
  "=",
  "keys",
  "(",
  ")",
  ";",
  "StringBuffer",
  "sb",
  "=",
  "new",
  "StringBuffer",
  "(",
  "\"{\"",
  ")",
  ";",
  "int",
  "newindent",
  "=",
  "indent",
  "+",
  "indentFactor",
  ";",
  "Object",
  "o",
  ";",
  "if",
  "(",
  "n",
  "==",
  "1",
  ")",
  "{",
  "o",
  "=",
  "keys",
  ".",
  "next",
  "(",
  ")",
  ";",
  "sb",
  ".",
  "append",
  "(",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "o",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ")",
  ";",
  "sb",
  ".",
  "append",
  "(",
  "\":",
  "\"",
  ")",
  ";",
  "sb",
  ".",
  "append",
  "(",
  "JSONUtils",
  ".",
  "valueToString",
  "(",
  "this",
  ".",
  "properties",
  ".",
  "get",
  "(",
  "o",
  ")",
  ",",
  "indentFactor",
  ",",
  "indent",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "while",
  "(",
  "keys",
  ".",
  "hasNext",
  "(",
  ")",
  ")",
  "{",
  "o",
  "=",
  "keys",
  ".",
  "next",
  "(",
  ")",
  ";",
  "if",
  "(",
  "sb",
  ".",
  "length",
  "(",
  ")",
  ">",
  "1",
  ")",
  "{",
  "sb",
  ".",
  "append",
  "(",
  "\",n\"",
  ")",
  ";",
  "}",
  "else",
  "{",
  "sb",
  ".",
  "append",
  "(",
  "'\\n'",
  ")",
  ";",
  "}",
  "for",
  "(",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "newindent",
  ";",
  "i",
  "+=",
  "1",
  ")",
  "{",
  "sb",
  ".",
  "append",
  "(",
  "'",
  "'",
  ")",
  ";",
  "}",
  "sb",
  ".",
  "append",
  "(",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "o",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ")",
  ";",
  "sb",
  ".",
  "append",
  "(",
  "\":",
  "\"",
  ")",
  ";",
  "sb",
  ".",
  "append",
  "(",
  "JSONUtils",
  ".",
  "valueToString",
  "(",
  "this",
  ".",
  "properties",
  ".",
  "get",
  "(",
  "o",
  ")",
  ",",
  "indentFactor",
  ",",
  "newindent",
  ")",
  ")",
  ";",
  "}",
  "if",
  "(",
  "sb",
  ".",
  "length",
  "(",
  ")",
  ">",
  "1",
  ")",
  "{",
  "sb",
  ".",
  "append",
  "(",
  "'\\n'",
  ")",
  ";",
  "for",
  "(",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "indent",
  ";",
  "i",
  "+=",
  "1",
  ")",
  "{",
  "sb",
  ".",
  "append",
  "(",
  "'",
  "'",
  ")",
  ";",
  "}",
  "}",
  "for",
  "(",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "indent",
  ";",
  "i",
  "+=",
  "1",
  ")",
  "{",
  "sb",
  ".",
  "insert",
  "(",
  "0",
  ",",
  "'",
  "'",
  ")",
  ";",
  "}",
  "}",
  "sb",
  ".",
  "append",
  "(",
  "'}'",
  ")",
  ";",
  "return",
  "sb",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "}",
  "public",
  "Collection",
  "values",
  "(",
  ")",
  "{",
  "return",
  "Collections",
  ".",
  "unmodifiableCollection",
  "(",
  "properties",
  ".",
  "values",
  "(",
  ")",
  ")",
  ";",
  "}",
  "protected",
  "void",
  "write",
  "(",
  "Writer",
  "writer",
  ",",
  "WritingVisitor",
  "visitor",
  ")",
  "throws",
  "IOException",
  "{",
  "try",
  "{",
  "if",
  "(",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "writer",
  ".",
  "write",
  "(",
  "JSONNull",
  ".",
  "getInstance",
  "(",
  ")",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "boolean",
  "b",
  "=",
  "false",
  ";",
  "Iterator",
  "keys",
  "=",
  "visitor",
  ".",
  "keySet",
  "(",
  "this",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "writer",
  ".",
  "write",
  "(",
  "'{'",
  ")",
  ";",
  "while",
  "(",
  "keys",
  ".",
  "hasNext",
  "(",
  ")",
  ")",
  "{",
  "if",
  "(",
  "b",
  ")",
  "{",
  "writer",
  ".",
  "write",
  "(",
  "','",
  ")",
  ";",
  "}",
  "Object",
  "k",
  "=",
  "keys",
  ".",
  "next",
  "(",
  ")",
  ";",
  "writer",
  ".",
  "write",
  "(",
  "JSONUtils",
  ".",
  "quote",
  "(",
  "k",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ")",
  ";",
  "writer",
  ".",
  "write",
  "(",
  "':'",
  ")",
  ";",
  "Object",
  "v",
  "=",
  "this",
  ".",
  "properties",
  ".",
  "get",
  "(",
  "k",
  ")",
  ";",
  "if",
  "(",
  "v",
  "instanceof",
  "JSON",
  ")",
  "{",
  "visitor",
  ".",
  "on",
  "(",
  "(",
  "JSON",
  ")",
  "v",
  ",",
  "writer",
  ")",
  ";",
  "}",
  "else",
  "{",
  "visitor",
  ".",
  "on",
  "(",
  "v",
  ",",
  "writer",
  ")",
  ";",
  "}",
  "b",
  "=",
  "true",
  ";",
  "}",
  "writer",
  ".",
  "write",
  "(",
  "'}'",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "IOException",
  "e",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "e",
  ")",
  ";",
  "}",
  "}",
  "private",
  "JSONObject",
  "_accumulate",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "!",
  "has",
  "(",
  "key",
  ")",
  ")",
  "{",
  "setInternal",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "Object",
  "o",
  "=",
  "opt",
  "(",
  "key",
  ")",
  ";",
  "if",
  "(",
  "o",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "(",
  "(",
  "JSONArray",
  ")",
  "o",
  ")",
  ".",
  "element",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "{",
  "setInternal",
  "(",
  "key",
  ",",
  "new",
  "JSONArray",
  "(",
  ")",
  ".",
  "element",
  "(",
  "o",
  ")",
  ".",
  "element",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "return",
  "this",
  ";",
  "}",
  "protected",
  "Object",
  "_processValue",
  "(",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "value",
  "instanceof",
  "JSONTokener",
  ")",
  "{",
  "return",
  "_fromJSONTokener",
  "(",
  "(",
  "JSONTokener",
  ")",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "value",
  "!=",
  "null",
  "&&",
  "Enum",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ")",
  "{",
  "return",
  "(",
  "(",
  "Enum",
  ")",
  "value",
  ")",
  ".",
  "name",
  "(",
  ")",
  ";",
  "}",
  "return",
  "super",
  ".",
  "_processValue",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "JSONObject",
  "_setInternal",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "verifyIsNull",
  "(",
  ")",
  ";",
  "if",
  "(",
  "key",
  "==",
  "null",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"Null",
  "key.\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "JSONUtils",
  ".",
  "isString",
  "(",
  "value",
  ")",
  "&&",
  "JSONUtils",
  ".",
  "mayBeJSON",
  "(",
  "String",
  ".",
  "valueOf",
  "(",
  "value",
  ")",
  ")",
  ")",
  "{",
  "this",
  ".",
  "properties",
  ".",
  "put",
  "(",
  "key",
  ",",
  "value",
  ")",
  ";",
  "}",
  "else",
  "{",
  "if",
  "(",
  "CycleDetectionStrategy",
  ".",
  "IGNORE_PROPERTY_OBJ",
  "==",
  "value",
  "||",
  "CycleDetectionStrategy",
  ".",
  "IGNORE_PROPERTY_ARR",
  "==",
  "value",
  ")",
  "{",
  "}",
  "else",
  "{",
  "this",
  ".",
  "properties",
  ".",
  "put",
  "(",
  "key",
  ",",
  "value",
  ")",
  ";",
  "}",
  "}",
  "return",
  "this",
  ";",
  "}",
  "private",
  "Object",
  "processValue",
  "(",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "value",
  "!=",
  "null",
  ")",
  "{",
  "JsonValueProcessor",
  "processor",
  "=",
  "jsonConfig",
  ".",
  "findJsonValueProcessor",
  "(",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ")",
  ";",
  "if",
  "(",
  "processor",
  "!=",
  "null",
  ")",
  "{",
  "value",
  "=",
  "processor",
  ".",
  "processObjectValue",
  "(",
  "null",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "if",
  "(",
  "!",
  "JsonVerifier",
  ".",
  "isValidJsonValue",
  "(",
  "value",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "value",
  ")",
  ";",
  "}",
  "}",
  "}",
  "return",
  "_processValue",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "Object",
  "processValue",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "if",
  "(",
  "value",
  "!=",
  "null",
  ")",
  "{",
  "JsonValueProcessor",
  "processor",
  "=",
  "jsonConfig",
  ".",
  "findJsonValueProcessor",
  "(",
  "value",
  ".",
  "getClass",
  "(",
  ")",
  ",",
  "key",
  ")",
  ";",
  "if",
  "(",
  "processor",
  "!=",
  "null",
  ")",
  "{",
  "value",
  "=",
  "processor",
  ".",
  "processObjectValue",
  "(",
  "null",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "if",
  "(",
  "!",
  "JsonVerifier",
  ".",
  "isValidJsonValue",
  "(",
  "value",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  "+",
  "value",
  ")",
  ";",
  "}",
  "}",
  "}",
  "return",
  "_processValue",
  "(",
  "value",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "JSONObject",
  "setInternal",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "return",
  "_setInternal",
  "(",
  "key",
  ",",
  "processValue",
  "(",
  "key",
  ",",
  "value",
  ",",
  "jsonConfig",
  ")",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "private",
  "void",
  "verifyIsNull",
  "(",
  ")",
  "{",
  "if",
  "(",
  "isNullObject",
  "(",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"null",
  "object\"",
  ")",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,492 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "util",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "ezmorph",
  ".",
  "ObjectMorpher",
  ";",
  "public",
  "class",
  "EnumMorpher",
  "implements",
  "ObjectMorpher",
  "{",
  "private",
  "Class",
  "enumClass",
  ";",
  "public",
  "EnumMorpher",
  "(",
  "Class",
  "enumClass",
  ")",
  "{",
  "if",
  "(",
  "enumClass",
  "==",
  "null",
  ")",
  "{",
  "throw",
  "new",
  "IllegalArgumentException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "if",
  "(",
  "!",
  "Enum",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "enumClass",
  ")",
  ")",
  "{",
  "throw",
  "new",
  "IllegalArgumentException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "this",
  ".",
  "enumClass",
  "=",
  "enumClass",
  ";",
  "}",
  "public",
  "Object",
  "morph",
  "(",
  "Object",
  "value",
  ")",
  "{",
  "if",
  "(",
  "value",
  "==",
  "null",
  ")",
  "{",
  "return",
  "enumClass",
  ".",
  "cast",
  "(",
  "null",
  ")",
  ";",
  "}",
  "return",
  "Enum",
  ".",
  "valueOf",
  "(",
  "enumClass",
  ",",
  "String",
  ".",
  "valueOf",
  "(",
  "value",
  ")",
  ")",
  ";",
  "}",
  "public",
  "Class",
  "morphsTo",
  "(",
  ")",
  "{",
  "return",
  "enumClass",
  ";",
  "}",
  "public",
  "boolean",
  "supports",
  "(",
  "Class",
  "clazz",
  ")",
  "{",
  "return",
  "String",
  ".",
  "class",
  ".",
  "isAssignableFrom",
  "(",
  "clazz",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,493 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "regexp",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "commons",
  ".",
  "lang",
  ".",
  "exception",
  ".",
  "NestableRuntimeException",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "oro",
  ".",
  "text",
  ".",
  "regex",
  ".",
  "MalformedPatternException",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "oro",
  ".",
  "text",
  ".",
  "regex",
  ".",
  "Pattern",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "oro",
  ".",
  "text",
  ".",
  "regex",
  ".",
  "PatternMatcher",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "oro",
  ".",
  "text",
  ".",
  "regex",
  ".",
  "Perl5Compiler",
  ";",
  "import",
  "org",
  ".",
  "apache",
  ".",
  "oro",
  ".",
  "text",
  ".",
  "regex",
  ".",
  "Perl5Matcher",
  ";",
  "public",
  "class",
  "Perl5RegexpMatcher",
  "implements",
  "RegexpMatcher",
  "{",
  "private",
  "static",
  "final",
  "Perl5Compiler",
  "compiler",
  "=",
  "new",
  "Perl5Compiler",
  "(",
  ")",
  ";",
  "private",
  "Pattern",
  "pattern",
  ";",
  "public",
  "Perl5RegexpMatcher",
  "(",
  "String",
  "pattern",
  ")",
  "{",
  "this",
  "(",
  "pattern",
  ",",
  "false",
  ")",
  ";",
  "}",
  "public",
  "Perl5RegexpMatcher",
  "(",
  "String",
  "pattern",
  ",",
  "boolean",
  "multiline",
  ")",
  "{",
  "try",
  "{",
  "if",
  "(",
  "multiline",
  ")",
  "{",
  "this",
  ".",
  "pattern",
  "=",
  "compiler",
  ".",
  "compile",
  "(",
  "pattern",
  ",",
  "Perl5Compiler",
  ".",
  "READ_ONLY_MASK",
  "|",
  "Perl5Compiler",
  ".",
  "MULTILINE_MASK",
  ")",
  ";",
  "}",
  "else",
  "{",
  "this",
  ".",
  "pattern",
  "=",
  "compiler",
  ".",
  "compile",
  "(",
  "pattern",
  ",",
  "Perl5Compiler",
  ".",
  "READ_ONLY_MASK",
  ")",
  ";",
  "}",
  "}",
  "catch",
  "(",
  "MalformedPatternException",
  "mpe",
  ")",
  "{",
  "throw",
  "new",
  "NestableRuntimeException",
  "(",
  "mpe",
  ")",
  ";",
  "}",
  "}",
  "public",
  "String",
  "getGroupIfMatches",
  "(",
  "String",
  "str",
  ",",
  "int",
  "group",
  ")",
  "{",
  "PatternMatcher",
  "matcher",
  "=",
  "new",
  "Perl5Matcher",
  "(",
  ")",
  ";",
  "if",
  "(",
  "matcher",
  ".",
  "matches",
  "(",
  "str",
  ",",
  "pattern",
  ")",
  ")",
  "{",
  "return",
  "matcher",
  ".",
  "getMatch",
  "(",
  ")",
  ".",
  "group",
  "(",
  "1",
  ")",
  ";",
  "}",
  "return",
  "\"\"",
  ";",
  "}",
  "public",
  "boolean",
  "matches",
  "(",
  "String",
  "str",
  ")",
  "{",
  "return",
  "new",
  "Perl5Matcher",
  "(",
  ")",
  ".",
  "matches",
  "(",
  "str",
  ",",
  "pattern",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,494 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "regexp",
  ";",
  "public",
  "interface",
  "RegexpMatcher",
  "{",
  "String",
  "getGroupIfMatches",
  "(",
  "String",
  "str",
  ",",
  "int",
  "group",
  ")",
  ";",
  "boolean",
  "matches",
  "(",
  "String",
  "str",
  ")",
  ";",
  "}",
  "</s>"
] | 
| 11,495 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "regexp",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "regex",
  ".",
  "Matcher",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "regex",
  ".",
  "Pattern",
  ";",
  "public",
  "class",
  "JdkRegexpMatcher",
  "implements",
  "RegexpMatcher",
  "{",
  "private",
  "final",
  "Pattern",
  "pattern",
  ";",
  "public",
  "JdkRegexpMatcher",
  "(",
  "String",
  "pattern",
  ")",
  "{",
  "this",
  "(",
  "pattern",
  ",",
  "false",
  ")",
  ";",
  "}",
  "public",
  "JdkRegexpMatcher",
  "(",
  "String",
  "pattern",
  ",",
  "boolean",
  "multiline",
  ")",
  "{",
  "if",
  "(",
  "multiline",
  ")",
  "{",
  "this",
  ".",
  "pattern",
  "=",
  "Pattern",
  ".",
  "compile",
  "(",
  "pattern",
  ",",
  "Pattern",
  ".",
  "MULTILINE",
  ")",
  ";",
  "}",
  "else",
  "{",
  "this",
  ".",
  "pattern",
  "=",
  "Pattern",
  ".",
  "compile",
  "(",
  "pattern",
  ")",
  ";",
  "}",
  "}",
  "public",
  "String",
  "getGroupIfMatches",
  "(",
  "String",
  "str",
  ",",
  "int",
  "group",
  ")",
  "{",
  "Matcher",
  "matcher",
  "=",
  "pattern",
  ".",
  "matcher",
  "(",
  "str",
  ")",
  ";",
  "if",
  "(",
  "matcher",
  ".",
  "matches",
  "(",
  ")",
  ")",
  "{",
  "return",
  "matcher",
  ".",
  "group",
  "(",
  "group",
  ")",
  ";",
  "}",
  "return",
  "\"\"",
  ";",
  "}",
  "public",
  "boolean",
  "matches",
  "(",
  "String",
  "str",
  ")",
  "{",
  "return",
  "pattern",
  ".",
  "matcher",
  "(",
  "str",
  ")",
  ".",
  "matches",
  "(",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,496 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "regexp",
  ";",
  "public",
  "class",
  "RegexpUtils",
  "{",
  "private",
  "static",
  "String",
  "javaVersion",
  "=",
  "\"1.3.1\"",
  ";",
  "static",
  "{",
  "javaVersion",
  "=",
  "System",
  ".",
  "getProperty",
  "(",
  "\"java.version\"",
  ")",
  ";",
  "}",
  "public",
  "static",
  "RegexpMatcher",
  "getMatcher",
  "(",
  "String",
  "pattern",
  ")",
  "{",
  "if",
  "(",
  "isJDK13",
  "(",
  ")",
  ")",
  "{",
  "return",
  "new",
  "Perl5RegexpMatcher",
  "(",
  "pattern",
  ")",
  ";",
  "}",
  "else",
  "{",
  "return",
  "new",
  "JdkRegexpMatcher",
  "(",
  "pattern",
  ")",
  ";",
  "}",
  "}",
  "public",
  "static",
  "RegexpMatcher",
  "getMatcher",
  "(",
  "String",
  "pattern",
  ",",
  "boolean",
  "multiline",
  ")",
  "{",
  "if",
  "(",
  "isJDK13",
  "(",
  ")",
  ")",
  "{",
  "return",
  "new",
  "Perl5RegexpMatcher",
  "(",
  "pattern",
  ",",
  "true",
  ")",
  ";",
  "}",
  "else",
  "{",
  "return",
  "new",
  "JdkRegexpMatcher",
  "(",
  "pattern",
  ",",
  "true",
  ")",
  ";",
  "}",
  "}",
  "public",
  "static",
  "boolean",
  "isJDK13",
  "(",
  ")",
  "{",
  "return",
  "javaVersion",
  ".",
  "indexOf",
  "(",
  "\"1.3\"",
  ")",
  "!=",
  "-",
  "1",
  ";",
  "}",
  "private",
  "RegexpUtils",
  "(",
  ")",
  "{",
  "}",
  "}",
  "</s>"
] | 
| 11,497 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "groovy",
  ";",
  "import",
  "groovy",
  ".",
  "lang",
  ".",
  "Closure",
  ";",
  "import",
  "groovy",
  ".",
  "lang",
  ".",
  "GString",
  ";",
  "import",
  "groovy",
  ".",
  "lang",
  ".",
  "GroovyObjectSupport",
  ";",
  "import",
  "groovy",
  ".",
  "lang",
  ".",
  "MissingMethodException",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "HashMap",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Iterator",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "List",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Map",
  ";",
  "import",
  "java",
  ".",
  "util",
  ".",
  "Stack",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSON",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONArray",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONException",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONObject",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONSerializer",
  ";",
  "public",
  "class",
  "JsonGroovyBuilder",
  "extends",
  "GroovyObjectSupport",
  "{",
  "private",
  "static",
  "final",
  "String",
  "JSON",
  "=",
  "\"json\"",
  ";",
  "private",
  "JSON",
  "current",
  ";",
  "private",
  "Map",
  "properties",
  ";",
  "private",
  "Stack",
  "stack",
  ";",
  "public",
  "JsonGroovyBuilder",
  "(",
  ")",
  "{",
  "stack",
  "=",
  "new",
  "Stack",
  "(",
  ")",
  ";",
  "properties",
  "=",
  "new",
  "HashMap",
  "(",
  ")",
  ";",
  "}",
  "public",
  "Object",
  "getProperty",
  "(",
  "String",
  "name",
  ")",
  "{",
  "if",
  "(",
  "!",
  "stack",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  "{",
  "Object",
  "top",
  "=",
  "stack",
  ".",
  "peek",
  "(",
  ")",
  ";",
  "if",
  "(",
  "top",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "JSONObject",
  "json",
  "=",
  "(",
  "JSONObject",
  ")",
  "top",
  ";",
  "if",
  "(",
  "json",
  ".",
  "containsKey",
  "(",
  "name",
  ")",
  ")",
  "{",
  "return",
  "json",
  ".",
  "get",
  "(",
  "name",
  ")",
  ";",
  "}",
  "else",
  "{",
  "return",
  "_getProperty",
  "(",
  "name",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "return",
  "_getProperty",
  "(",
  "name",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "return",
  "_getProperty",
  "(",
  "name",
  ")",
  ";",
  "}",
  "}",
  "public",
  "Object",
  "invokeMethod",
  "(",
  "String",
  "name",
  ",",
  "Object",
  "arg",
  ")",
  "{",
  "if",
  "(",
  "JSON",
  ".",
  "equals",
  "(",
  "name",
  ")",
  "&&",
  "stack",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  "{",
  "return",
  "createObject",
  "(",
  "name",
  ",",
  "arg",
  ")",
  ";",
  "}",
  "Object",
  "[",
  "]",
  "args",
  "=",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "arg",
  ";",
  "if",
  "(",
  "args",
  ".",
  "length",
  "==",
  "0",
  ")",
  "{",
  "throw",
  "new",
  "MissingMethodException",
  "(",
  "name",
  ",",
  "getClass",
  "(",
  ")",
  ",",
  "args",
  ")",
  ";",
  "}",
  "Object",
  "value",
  "=",
  "null",
  ";",
  "if",
  "(",
  "args",
  ".",
  "length",
  ">",
  "1",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "stack",
  ".",
  "push",
  "(",
  "array",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "args",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "if",
  "(",
  "args",
  "[",
  "i",
  "]",
  "instanceof",
  "Closure",
  ")",
  "{",
  "append",
  "(",
  "name",
  ",",
  "createObject",
  "(",
  "(",
  "Closure",
  ")",
  "args",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "args",
  "[",
  "i",
  "]",
  "instanceof",
  "Map",
  ")",
  "{",
  "append",
  "(",
  "name",
  ",",
  "createObject",
  "(",
  "(",
  "Map",
  ")",
  "args",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "args",
  "[",
  "i",
  "]",
  "instanceof",
  "List",
  ")",
  "{",
  "append",
  "(",
  "name",
  ",",
  "createArray",
  "(",
  "(",
  "List",
  ")",
  "args",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "_append",
  "(",
  "name",
  ",",
  "args",
  "[",
  "i",
  "]",
  ",",
  "(",
  "JSON",
  ")",
  "stack",
  ".",
  "peek",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "stack",
  ".",
  "pop",
  "(",
  ")",
  ";",
  "}",
  "else",
  "{",
  "if",
  "(",
  "args",
  "[",
  "0",
  "]",
  "instanceof",
  "Closure",
  ")",
  "{",
  "value",
  "=",
  "createObject",
  "(",
  "(",
  "Closure",
  ")",
  "args",
  "[",
  "0",
  "]",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "args",
  "[",
  "0",
  "]",
  "instanceof",
  "Map",
  ")",
  "{",
  "value",
  "=",
  "createObject",
  "(",
  "(",
  "Map",
  ")",
  "args",
  "[",
  "0",
  "]",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "args",
  "[",
  "0",
  "]",
  "instanceof",
  "List",
  ")",
  "{",
  "value",
  "=",
  "createArray",
  "(",
  "(",
  "List",
  ")",
  "args",
  "[",
  "0",
  "]",
  ")",
  ";",
  "}",
  "}",
  "if",
  "(",
  "stack",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  "{",
  "JSONObject",
  "object",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "object",
  ".",
  "accumulate",
  "(",
  "name",
  ",",
  "current",
  ")",
  ";",
  "current",
  "=",
  "object",
  ";",
  "}",
  "else",
  "{",
  "JSON",
  "top",
  "=",
  "(",
  "JSON",
  ")",
  "stack",
  ".",
  "peek",
  "(",
  ")",
  ";",
  "if",
  "(",
  "top",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "append",
  "(",
  "name",
  ",",
  "current",
  "==",
  "null",
  "?",
  "value",
  ":",
  "current",
  ")",
  ";",
  "}",
  "}",
  "return",
  "current",
  ";",
  "}",
  "public",
  "void",
  "setProperty",
  "(",
  "String",
  "name",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "if",
  "(",
  "value",
  "instanceof",
  "GString",
  ")",
  "{",
  "value",
  "=",
  "value",
  ".",
  "toString",
  "(",
  ")",
  ";",
  "try",
  "{",
  "value",
  "=",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "value",
  ")",
  ";",
  "}",
  "catch",
  "(",
  "JSONException",
  "jsone",
  ")",
  "{",
  "}",
  "}",
  "else",
  "if",
  "(",
  "value",
  "instanceof",
  "Closure",
  ")",
  "{",
  "value",
  "=",
  "createObject",
  "(",
  "(",
  "Closure",
  ")",
  "value",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "value",
  "instanceof",
  "Map",
  ")",
  "{",
  "value",
  "=",
  "createObject",
  "(",
  "(",
  "Map",
  ")",
  "value",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "value",
  "instanceof",
  "List",
  ")",
  "{",
  "value",
  "=",
  "createArray",
  "(",
  "(",
  "List",
  ")",
  "value",
  ")",
  ";",
  "}",
  "append",
  "(",
  "name",
  ",",
  "value",
  ")",
  ";",
  "}",
  "private",
  "Object",
  "_getProperty",
  "(",
  "String",
  "name",
  ")",
  "{",
  "if",
  "(",
  "properties",
  ".",
  "containsKey",
  "(",
  "name",
  ")",
  ")",
  "{",
  "return",
  "properties",
  ".",
  "get",
  "(",
  "name",
  ")",
  ";",
  "}",
  "else",
  "{",
  "return",
  "super",
  ".",
  "getProperty",
  "(",
  "name",
  ")",
  ";",
  "}",
  "}",
  "private",
  "void",
  "append",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ")",
  "{",
  "Object",
  "target",
  "=",
  "null",
  ";",
  "if",
  "(",
  "!",
  "stack",
  ".",
  "isEmpty",
  "(",
  ")",
  ")",
  "{",
  "target",
  "=",
  "stack",
  ".",
  "peek",
  "(",
  ")",
  ";",
  "current",
  "=",
  "(",
  "JSON",
  ")",
  "target",
  ";",
  "_append",
  "(",
  "key",
  ",",
  "value",
  ",",
  "current",
  ")",
  ";",
  "}",
  "else",
  "{",
  "properties",
  ".",
  "put",
  "(",
  "key",
  ",",
  "value",
  ")",
  ";",
  "}",
  "}",
  "private",
  "void",
  "_append",
  "(",
  "String",
  "key",
  ",",
  "Object",
  "value",
  ",",
  "JSON",
  "target",
  ")",
  "{",
  "if",
  "(",
  "target",
  "instanceof",
  "JSONObject",
  ")",
  "{",
  "(",
  "(",
  "JSONObject",
  ")",
  "target",
  ")",
  ".",
  "accumulate",
  "(",
  "key",
  ",",
  "value",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "target",
  "instanceof",
  "JSONArray",
  ")",
  "{",
  "(",
  "(",
  "JSONArray",
  ")",
  "target",
  ")",
  ".",
  "element",
  "(",
  "value",
  ")",
  ";",
  "}",
  "}",
  "private",
  "JSON",
  "createArray",
  "(",
  "List",
  "list",
  ")",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "stack",
  ".",
  "push",
  "(",
  "array",
  ")",
  ";",
  "for",
  "(",
  "Iterator",
  "elements",
  "=",
  "list",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "elements",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Object",
  "element",
  "=",
  "elements",
  ".",
  "next",
  "(",
  ")",
  ";",
  "if",
  "(",
  "element",
  "instanceof",
  "Closure",
  ")",
  "{",
  "element",
  "=",
  "createObject",
  "(",
  "(",
  "Closure",
  ")",
  "element",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "element",
  "instanceof",
  "Map",
  ")",
  "{",
  "element",
  "=",
  "createObject",
  "(",
  "(",
  "Map",
  ")",
  "element",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "element",
  "instanceof",
  "List",
  ")",
  "{",
  "element",
  "=",
  "createArray",
  "(",
  "(",
  "List",
  ")",
  "element",
  ")",
  ";",
  "}",
  "array",
  ".",
  "element",
  "(",
  "element",
  ")",
  ";",
  "}",
  "stack",
  ".",
  "pop",
  "(",
  ")",
  ";",
  "return",
  "array",
  ";",
  "}",
  "private",
  "JSON",
  "createObject",
  "(",
  "Closure",
  "closure",
  ")",
  "{",
  "JSONObject",
  "object",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "stack",
  ".",
  "push",
  "(",
  "object",
  ")",
  ";",
  "closure",
  ".",
  "setDelegate",
  "(",
  "this",
  ")",
  ";",
  "closure",
  ".",
  "setResolveStrategy",
  "(",
  "Closure",
  ".",
  "DELEGATE_FIRST",
  ")",
  ";",
  "closure",
  ".",
  "call",
  "(",
  ")",
  ";",
  "stack",
  ".",
  "pop",
  "(",
  ")",
  ";",
  "return",
  "object",
  ";",
  "}",
  "private",
  "JSON",
  "createObject",
  "(",
  "Map",
  "map",
  ")",
  "{",
  "JSONObject",
  "object",
  "=",
  "new",
  "JSONObject",
  "(",
  ")",
  ";",
  "stack",
  ".",
  "push",
  "(",
  "object",
  ")",
  ";",
  "for",
  "(",
  "Iterator",
  "properties",
  "=",
  "map",
  ".",
  "entrySet",
  "(",
  ")",
  ".",
  "iterator",
  "(",
  ")",
  ";",
  "properties",
  ".",
  "hasNext",
  "(",
  ")",
  ";",
  ")",
  "{",
  "Map",
  ".",
  "Entry",
  "property",
  "=",
  "(",
  "Map",
  ".",
  "Entry",
  ")",
  "properties",
  ".",
  "next",
  "(",
  ")",
  ";",
  "String",
  "key",
  "=",
  "String",
  ".",
  "valueOf",
  "(",
  "property",
  ".",
  "getKey",
  "(",
  ")",
  ")",
  ";",
  "Object",
  "value",
  "=",
  "property",
  ".",
  "getValue",
  "(",
  ")",
  ";",
  "if",
  "(",
  "value",
  "instanceof",
  "Closure",
  ")",
  "{",
  "value",
  "=",
  "createObject",
  "(",
  "(",
  "Closure",
  ")",
  "value",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "value",
  "instanceof",
  "Map",
  ")",
  "{",
  "value",
  "=",
  "createObject",
  "(",
  "(",
  "Map",
  ")",
  "value",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "value",
  "instanceof",
  "List",
  ")",
  "{",
  "value",
  "=",
  "createArray",
  "(",
  "(",
  "List",
  ")",
  "value",
  ")",
  ";",
  "}",
  "object",
  ".",
  "element",
  "(",
  "key",
  ",",
  "value",
  ")",
  ";",
  "}",
  "stack",
  ".",
  "pop",
  "(",
  ")",
  ";",
  "return",
  "object",
  ";",
  "}",
  "private",
  "JSON",
  "createObject",
  "(",
  "String",
  "name",
  ",",
  "Object",
  "arg",
  ")",
  "{",
  "Object",
  "[",
  "]",
  "args",
  "=",
  "(",
  "Object",
  "[",
  "]",
  ")",
  "arg",
  ";",
  "if",
  "(",
  "args",
  ".",
  "length",
  "==",
  "0",
  ")",
  "{",
  "throw",
  "new",
  "MissingMethodException",
  "(",
  "name",
  ",",
  "getClass",
  "(",
  ")",
  ",",
  "args",
  ")",
  ";",
  "}",
  "if",
  "(",
  "args",
  ".",
  "length",
  "==",
  "1",
  ")",
  "{",
  "if",
  "(",
  "args",
  "[",
  "0",
  "]",
  "instanceof",
  "Closure",
  ")",
  "{",
  "return",
  "createObject",
  "(",
  "(",
  "Closure",
  ")",
  "args",
  "[",
  "0",
  "]",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "args",
  "[",
  "0",
  "]",
  "instanceof",
  "Map",
  ")",
  "{",
  "return",
  "createObject",
  "(",
  "(",
  "Map",
  ")",
  "args",
  "[",
  "0",
  "]",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "args",
  "[",
  "0",
  "]",
  "instanceof",
  "List",
  ")",
  "{",
  "return",
  "createArray",
  "(",
  "(",
  "List",
  ")",
  "args",
  "[",
  "0",
  "]",
  ")",
  ";",
  "}",
  "else",
  "{",
  "throw",
  "new",
  "JSONException",
  "(",
  "\"\"",
  ")",
  ";",
  "}",
  "}",
  "else",
  "{",
  "JSONArray",
  "array",
  "=",
  "new",
  "JSONArray",
  "(",
  ")",
  ";",
  "stack",
  ".",
  "push",
  "(",
  "array",
  ")",
  ";",
  "for",
  "(",
  "int",
  "i",
  "=",
  "0",
  ";",
  "i",
  "<",
  "args",
  ".",
  "length",
  ";",
  "i",
  "++",
  ")",
  "{",
  "if",
  "(",
  "args",
  "[",
  "i",
  "]",
  "instanceof",
  "Closure",
  ")",
  "{",
  "append",
  "(",
  "name",
  ",",
  "createObject",
  "(",
  "(",
  "Closure",
  ")",
  "args",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "args",
  "[",
  "i",
  "]",
  "instanceof",
  "Map",
  ")",
  "{",
  "append",
  "(",
  "name",
  ",",
  "createObject",
  "(",
  "(",
  "Map",
  ")",
  "args",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "else",
  "if",
  "(",
  "args",
  "[",
  "i",
  "]",
  "instanceof",
  "List",
  ")",
  "{",
  "append",
  "(",
  "name",
  ",",
  "createArray",
  "(",
  "(",
  "List",
  ")",
  "args",
  "[",
  "i",
  "]",
  ")",
  ")",
  ";",
  "}",
  "else",
  "{",
  "_append",
  "(",
  "name",
  ",",
  "args",
  "[",
  "i",
  "]",
  ",",
  "(",
  "JSON",
  ")",
  "stack",
  ".",
  "peek",
  "(",
  ")",
  ")",
  ";",
  "}",
  "}",
  "stack",
  ".",
  "pop",
  "(",
  ")",
  ";",
  "return",
  "array",
  ";",
  "}",
  "}",
  "}",
  "</s>"
] | 
| 11,498 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "groovy",
  ";",
  "import",
  "groovy",
  ".",
  "lang",
  ".",
  "GroovyObjectSupport",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "BufferedReader",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "File",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "FileReader",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "IOException",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "InputStream",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "InputStreamReader",
  ";",
  "import",
  "java",
  ".",
  "io",
  ".",
  "Reader",
  ";",
  "import",
  "java",
  ".",
  "net",
  ".",
  "URL",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSON",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JSONSerializer",
  ";",
  "import",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "JsonConfig",
  ";",
  "public",
  "class",
  "JsonSlurper",
  "extends",
  "GroovyObjectSupport",
  "{",
  "private",
  "JsonConfig",
  "jsonConfig",
  ";",
  "public",
  "JsonSlurper",
  "(",
  ")",
  "{",
  "this",
  "(",
  "new",
  "JsonConfig",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JsonSlurper",
  "(",
  "JsonConfig",
  "jsonConfig",
  ")",
  "{",
  "this",
  ".",
  "jsonConfig",
  "=",
  "jsonConfig",
  "!=",
  "null",
  "?",
  "jsonConfig",
  ":",
  "new",
  "JsonConfig",
  "(",
  ")",
  ";",
  "}",
  "public",
  "JSON",
  "parse",
  "(",
  "File",
  "file",
  ")",
  "throws",
  "IOException",
  "{",
  "return",
  "parse",
  "(",
  "new",
  "FileReader",
  "(",
  "file",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSON",
  "parse",
  "(",
  "URL",
  "url",
  ")",
  "throws",
  "IOException",
  "{",
  "return",
  "parse",
  "(",
  "url",
  ".",
  "openConnection",
  "(",
  ")",
  ".",
  "getInputStream",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSON",
  "parse",
  "(",
  "InputStream",
  "input",
  ")",
  "throws",
  "IOException",
  "{",
  "return",
  "parse",
  "(",
  "new",
  "InputStreamReader",
  "(",
  "input",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSON",
  "parse",
  "(",
  "String",
  "uri",
  ")",
  "throws",
  "IOException",
  "{",
  "return",
  "parse",
  "(",
  "new",
  "URL",
  "(",
  "uri",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSON",
  "parse",
  "(",
  "Reader",
  "reader",
  ")",
  "throws",
  "IOException",
  "{",
  "StringBuffer",
  "buffer",
  "=",
  "new",
  "StringBuffer",
  "(",
  ")",
  ";",
  "BufferedReader",
  "in",
  "=",
  "new",
  "BufferedReader",
  "(",
  "reader",
  ")",
  ";",
  "String",
  "line",
  "=",
  "null",
  ";",
  "while",
  "(",
  "(",
  "line",
  "=",
  "in",
  ".",
  "readLine",
  "(",
  ")",
  ")",
  "!=",
  "null",
  ")",
  "{",
  "buffer",
  ".",
  "append",
  "(",
  "line",
  ")",
  ".",
  "append",
  "(",
  "\"n\"",
  ")",
  ";",
  "}",
  "return",
  "parseText",
  "(",
  "buffer",
  ".",
  "toString",
  "(",
  ")",
  ")",
  ";",
  "}",
  "public",
  "JSON",
  "parseText",
  "(",
  "String",
  "text",
  ")",
  "{",
  "return",
  "JSONSerializer",
  ".",
  "toJSON",
  "(",
  "text",
  ",",
  "jsonConfig",
  ")",
  ";",
  "}",
  "}",
  "</s>"
] | 
| 11,499 | 
	[
  "<s>",
  "package",
  "net",
  ".",
  "sf",
  ".",
  "json",
  ".",
  "xml",
  ";",
  "public",
  "interface",
  "JSONTypes",
  "{",
  "String",
  "ARRAY",
  "=",
  "\"array\"",
  ";",
  "String",
  "BOOLEAN",
  "=",
  "\"boolean\"",
  ";",
  "String",
  "FLOAT",
  "=",
  "\"float\"",
  ";",
  "String",
  "FUNCTION",
  "=",
  "\"function\"",
  ";",
  "String",
  "INTEGER",
  "=",
  "\"integer\"",
  ";",
  "String",
  "NUMBER",
  "=",
  "\"number\"",
  ";",
  "String",
  "OBJECT",
  "=",
  "\"object\"",
  ";",
  "String",
  "STRING",
  "=",
  "\"string\"",
  ";",
  "}",
  "</s>"
] | 
			Subsets and Splits
				
	
				
			
				
No community queries yet
The top public SQL queries from the community will appear here once available.
