The following issues were found

src/test/java/com/alibaba/json/test/entity/case1/LongObject_100_Entity.java
3 issues
This class has a bunch of public methods and attributes
Design

Line: 1

              package com.alibaba.json.test.entity.case1;

public class LongObject_100_Entity {

    private Long f0;
    private Long f1;
    private Long f2;
    private Long f3;
    private Long f4;

            

Reported by PMD.

Too many fields
Design

Line: 3

              package com.alibaba.json.test.entity.case1;

public class LongObject_100_Entity {

    private Long f0;
    private Long f1;
    private Long f2;
    private Long f3;
    private Long f4;

            

Reported by PMD.

The class 'LongObject_100_Entity' has a total cyclomatic complexity of 200 (highest 1).
Design

Line: 3

              package com.alibaba.json.test.entity.case1;

public class LongObject_100_Entity {

    private Long f0;
    private Long f1;
    private Long f2;
    private Long f3;
    private Long f4;

            

Reported by PMD.

src/test/java/com/alibaba/json/test/TestSysProperty.java
3 issues
System.out.println is used
Design

Line: 8

              
public class TestSysProperty extends TestCase {
    public void test_0 () throws Exception {
        System.out.println(System.getProperty("java.vm.name"));
    }
}

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 7

              

public class TestSysProperty extends TestCase {
    public void test_0 () throws Exception {
        System.out.println(System.getProperty("java.vm.name"));
    }
}

            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 7

              

public class TestSysProperty extends TestCase {
    public void test_0 () throws Exception {
        System.out.println(System.getProperty("java.vm.name"));
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/demo/MapDemo.java
3 issues
System.out.println is used
Design

Line: 17

                      map.put("name", "张三");
        
        String text = JSON.toJSONString(map);
        System.out.println(text);
    }
}

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 11

              import com.alibaba.fastjson.JSON;

public class MapDemo extends TestCase {
    public void test_0 () throws Exception {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("id", 123);
        map.put("name", "张三");
        
        String text = JSON.toJSONString(map);

            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 11

              import com.alibaba.fastjson.JSON;

public class MapDemo extends TestCase {
    public void test_0 () throws Exception {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("id", 123);
        map.put("name", "张三");
        
        String text = JSON.toJSONString(map);

            

Reported by PMD.

src/test/java/com/alibaba/json/demo/BooleanFieldDemo.java
3 issues
System.out.println is used
Design

Line: 14

                  public void test_boolean() throws Exception {
        Model model = new Model();
        String json = JSON.toJSONString(model, SerializerFeature.IgnoreNonFieldGetter);
        System.out.println(json);


    }

    public static class Model {

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 11

               * Created by wenshao on 15/02/2017.
 */
public class BooleanFieldDemo extends TestCase {
    public void test_boolean() throws Exception {
        Model model = new Model();
        String json = JSON.toJSONString(model, SerializerFeature.IgnoreNonFieldGetter);
        System.out.println(json);



            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 11

               * Created by wenshao on 15/02/2017.
 */
public class BooleanFieldDemo extends TestCase {
    public void test_boolean() throws Exception {
        Model model = new Model();
        String json = JSON.toJSONString(model, SerializerFeature.IgnoreNonFieldGetter);
        System.out.println(json);



            

Reported by PMD.

src/test/java/com/alibaba/json/test/codegen/GenMediaTest.java
3 issues
System.out.println is used
Design

Line: 17

              
        generator.gen();

        System.out.println(out.toString());
    }
}

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 11

              
public class GenMediaTest extends TestCase {

    public void test_codegen() throws Exception {
        StringBuffer out = new StringBuffer();
        DeserializerGen generator = new DeserializerGen(Media.class, out);

        generator.gen();


            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 11

              
public class GenMediaTest extends TestCase {

    public void test_codegen() throws Exception {
        StringBuffer out = new StringBuffer();
        DeserializerGen generator = new DeserializerGen(Media.class, out);

        generator.gen();


            

Reported by PMD.

src/test/java/com/alibaba/json/test/jackson/JacksonUnwrappedTest.java
3 issues
System.out.println is used
Design

Line: 16

                      ObjectMapper mapper = new ObjectMapper();

        String str = mapper.writeValueAsString(model);
        System.out.println(str);
    }

    public static class Model {
        @JsonUnwrapped
        public Point point = new Point();

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 11

               * Created by wenshao on 02/04/2017.
 */
public class JacksonUnwrappedTest extends TestCase {
    public void test_for_unwrap() throws Exception {
        Model model = new Model();
        ObjectMapper mapper = new ObjectMapper();

        String str = mapper.writeValueAsString(model);
        System.out.println(str);

            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 11

               * Created by wenshao on 02/04/2017.
 */
public class JacksonUnwrappedTest extends TestCase {
    public void test_for_unwrap() throws Exception {
        Model model = new Model();
        ObjectMapper mapper = new ObjectMapper();

        String str = mapper.writeValueAsString(model);
        System.out.println(str);

            

Reported by PMD.

src/test/java/com/alibaba/json/test/entity/case1/String_100_Entity.java
3 issues
This class has a bunch of public methods and attributes
Design

Line: 1

              package com.alibaba.json.test.entity.case1;

public class String_100_Entity {

    private String f0;
    private String f1;
    private String f2;
    private String f3;
    private String f4;

            

Reported by PMD.

Too many fields
Design

Line: 3

              package com.alibaba.json.test.entity.case1;

public class String_100_Entity {

    private String f0;
    private String f1;
    private String f2;
    private String f3;
    private String f4;

            

Reported by PMD.

The class 'String_100_Entity' has a total cyclomatic complexity of 200 (highest 1).
Design

Line: 3

              package com.alibaba.json.test.entity.case1;

public class String_100_Entity {

    private String f0;
    private String f1;
    private String f2;
    private String f3;
    private String f4;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvtVO/IncomingDataPoint_ext_double.java
3 issues
The class 'IncomingDataPoint_ext_double' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=14, WMC=16)
Design

Line: 20

                      orders = {"metric", "timestamp", "value", "tags", "tsuid", "granularity", "aggregator"},
        asm = true
        )
public class IncomingDataPoint_ext_double {
    /** The incoming metric name */
    private String metric;

    /** The incoming timestamp in Unix epoch seconds or milliseconds */
    private long timestamp;

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 34

                  private Tags tags;

    /** TSUID for the data point */
    private String tsuid;

    private String granularity;

    private String aggregator;


            

Reported by PMD.

Avoid unused imports such as 'com.alibaba.fastjson.parser.deserializer.ExtraProcessable'
Design

Line: 6

              import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;
import com.alibaba.fastjson.parser.Feature;
import com.alibaba.fastjson.parser.deserializer.ExtraProcessable;
import com.alibaba.fastjson.serializer.SerializerFeature;

import java.util.HashMap;
import java.util.Map;


            

Reported by PMD.

src/test/java/com/alibaba/json/test/benchmark/decode/BooleanArray1000Decode.java
3 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 8

              
public class BooleanArray1000Decode extends BenchmarkCase {

    private String text;

    public BooleanArray1000Decode(){
        super("BooleanArray1000Decode");

        StringBuilder buf = new StringBuilder();

            

Reported by PMD.

Private field 'text' could be made final; it is only initialized in the declaration or constructor.
Design

Line: 8

              
public class BooleanArray1000Decode extends BenchmarkCase {

    private String text;

    public BooleanArray1000Decode(){
        super("BooleanArray1000Decode");

        StringBuilder buf = new StringBuilder();

            

Reported by PMD.

Avoid appending characters as strings in StringBuffer.append.
Performance

Line: 18

                      buf.append('[');
        for (int i = 0; i < 1000; ++i) {
            if (i != 0) {
                buf.append(",");
            }
            buf.append(i % 2 == 0 ? "true" : "false");
        }
        buf.append(']');
        this.text = buf.toString();

            

Reported by PMD.

src/test/java/com/alibaba/json/test/Issue1001.java
3 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 15

               * Created by wenshao on 21/01/2017.
 */
public class Issue1001 extends TestCase {
    public void test_for_issue() throws Exception {
        File file = new File("/Users/wenshao/Downloads/issue_1001.json");

        String json = FileUtils.readFileToString(file);

        JSONReader reader = new JSONReader(new StringReader(json));

            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 15

               * Created by wenshao on 21/01/2017.
 */
public class Issue1001 extends TestCase {
    public void test_for_issue() throws Exception {
        File file = new File("/Users/wenshao/Downloads/issue_1001.json");

        String json = FileUtils.readFileToString(file);

        JSONReader reader = new JSONReader(new StringReader(json));

            

Reported by PMD.

Avoid unused imports such as 'com.alibaba.fastjson.JSON'
Design

Line: 3

              package com.alibaba.json.test;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONReader;
import junit.framework.TestCase;
import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.StringReader;

            

Reported by PMD.