\CodePro Analytix Evaluation\src\com\instantiations\example\miscellaneous\MappingCode.java
Violations: 0 high, 7 medium, 1 low
 
Violations
Missing file comment
Missing @version tag for type MappingCode
toString() is missing
Missing Javadoc comment for method "testStrings"
Constant on right side of comparison
Invalid string literal: "value"
Invalid string literal: "key"
Invalid numeric literal: 2
 
Source
1 package com.instantiations.example.miscellaneous;
2
3 import java.util.*;
4
5 /**
6  * The class <code>MappingCode</code> demonstrates how the test case generator
7  * can use static analysis to create good values of even complex objects such
8  * as a {@link Map}.
9  * @author Brad Billings
10  */
11 public class MappingCode
12 {
13    public int testStrings(Map map)
14    {
15       if (map == null) {
16          return 0;
17       }
18       if ("value".equals(map.get("key"))) {
19          return 1;
20       }
21       return 2;
22    }
23 }
Powered by CodePro AnalytiX