1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
{
"sources": [
{
"line": 1,
"code": "<span class=\"k\">package </span>foo;",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "f467e9befd3ff15bb1dbf634b0e9b45d44110bac",
"scmDate": "2013-09-16T15:31:49+0200"
},
{
"line": 2,
"code": "",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "f467e9befd3ff15bb1dbf634b0e9b45d44110bac",
"scmDate": "2013-09-16T15:31:49+0200"
},
{
"line": 3,
"code": "<span class=\"cppd\">/**</span>",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "37acee5ff6e67cdb501c08a656fbabf21160b052",
"scmDate": "2013-09-19T15:37:05+0200"
},
{
"line": 4,
"code": "<span class=\"cppd\"> * Simple class</span>",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "37acee5ff6e67cdb501c08a656fbabf21160b052",
"scmDate": "2013-09-19T15:37:05+0200"
},
{
"line": 5,
"code": "<span class=\"cppd\"> */</span>",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "37acee5ff6e67cdb501c08a656fbabf21160b052",
"scmDate": "2013-09-19T15:37:05+0200"
},
{
"line": 6,
"code": "<span class=\"k\">public </span><span class=\"k\">class </span><span class=\"sym-1 sym\">Simplest</span> {",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "f467e9befd3ff15bb1dbf634b0e9b45d44110bac",
"scmDate": "2013-09-16T15:31:49+0200"
},
{
"line": 7,
"code": "",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "f467e9befd3ff15bb1dbf634b0e9b45d44110bac",
"scmDate": "2013-09-16T15:31:49+0200"
},
{
"line": 8,
"code": " <span class=\"k\">public </span><span class=\"k\">static </span><span class=\"k\">int </span><span class=\"sym-2 sym\">add</span>(<span class=\"k\">int </span><span class=\"sym-3 sym\">a</span>, <span class=\"k\">int </span><span class=\"sym-4 sym\">b</span>) {",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "f467e9befd3ff15bb1dbf634b0e9b45d44110bac",
"scmDate": "2013-09-16T15:31:49+0200"
},
{
"line": 9,
"code": " \t<span class=\"cppd\">// introduce a variable that is not needed - just to get a violation</span>",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "322e4e8b3cb54a39651f563273745e6ee737fb3e",
"scmDate": "2013-10-15T16:14:22+0200"
},
{
"line": 10,
"code": " \t<span class=\"k\">int </span><span class=\"sym-5 sym\">result</span> = <span class=\"sym-3 sym\">a</span> + <span class=\"sym-4 sym\">b</span>;",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "322e4e8b3cb54a39651f563273745e6ee737fb3e",
"scmDate": "2013-10-15T16:14:22+0200"
},
{
"line": 11,
"code": "",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "44e0c5b4fc18a006a405d3f3d489896245fab3d1",
"scmDate": "2014-01-09T16:48:59+0100"
},
{
"line": 12,
"code": " \tSystem.out.println(<span class=\"s\">\"\"</span>);",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "44e0c5b4fc18a006a405d3f3d489896245fab3d1",
"scmDate": "2014-01-09T16:48:59+0100"
},
{
"line": 13,
"code": "",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "44e0c5b4fc18a006a405d3f3d489896245fab3d1",
"scmDate": "2014-01-09T16:48:59+0100"
},
{
"line": 14,
"code": " <span class=\"k\">return </span><span class=\"sym-5 sym\">result</span>;",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "322e4e8b3cb54a39651f563273745e6ee737fb3e",
"scmDate": "2013-10-15T16:14:22+0200"
},
{
"line": 15,
"code": " }",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "f467e9befd3ff15bb1dbf634b0e9b45d44110bac",
"scmDate": "2013-09-16T15:31:49+0200"
},
{
"line": 16,
"code": "",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "f467e9befd3ff15bb1dbf634b0e9b45d44110bac",
"scmDate": "2013-09-16T15:31:49+0200"
},
{
"line": 17,
"code": "}",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "f467e9befd3ff15bb1dbf634b0e9b45d44110bac",
"scmDate": "2013-09-16T15:31:49+0200"
},
{
"line": 18,
"code": "",
"scmAuthor": "fabrice.bellingard@sonarsource.com",
"scmRevision": "f467e9befd3ff15bb1dbf634b0e9b45d44110bac",
"scmDate": "2013-09-16T15:31:49+0200"
}
]
}
|