Debian Codegraph @

tests/parsers/example-output/findbugs/findbugs_jformatstring.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <BugCollection version="2.0.2" sequence="0" timestamp="1378419462000" analysisTimestamp="1390922739745" release="">
4 <Project projectName="">
5 <Jar>/usr/share/java/jFormatString.jar</Jar>
6 </Project>
7 <BugInstance type="DLS_DEAD_LOCAL_STORE" priority="1" abbrev="DLS" category="STYLE" instanceHash="ee56b5edf7bf95d301c15a9220695a93" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="15">
8 <ShortMessage>Dead store to local variable</ShortMessage>
9 <LongMessage>Dead store to c in edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest.testBug1874856FalsePositive()</LongMessage>
10 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest" primary="true">
11 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest" start="13" end="102" sourcefile="FormatterCompileTimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterCompileTimeTest.java">
12 <Message>At FormatterCompileTimeTest.java:[lines 13-102]</Message>
13 </SourceLine>
14 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest</Message>
15 </Class>
16 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest" name="testBug1874856FalsePositive" signature="()V" isStatic="false" primary="true">
17 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest" start="66" end="86" startBytecode="0" endBytecode="83" sourcefile="FormatterCompileTimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterCompileTimeTest.java"/>
18 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest.testBug1874856FalsePositive()</Message>
19 </Method>
20 <LocalVariable name="c" register="1" pc="14" role="LOCAL_VARIABLE_NAMED">
21 <Message>Local variable named c</Message>
22 </LocalVariable>
23 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest" primary="true" start="66" end="66" startBytecode="13" endBytecode="13" sourcefile="FormatterCompileTimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterCompileTimeTest.java">
24 <Message>At FormatterCompileTimeTest.java:[line 66]</Message>
25 </SourceLine>
26 <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.DEAD_OBJECT_STORE" value="true"/>
27 <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.METHOD_RESULT" value="true"/>
28 <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.LOCAL_NAME" value="c"/>
29 </BugInstance>
30 <BugInstance type="DLS_DEAD_LOCAL_STORE" priority="1" abbrev="DLS" category="STYLE" instanceHash="5cfd363d764d9ab5b1b2678ae3384a6e" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="15">
31 <ShortMessage>Dead store to local variable</ShortMessage>
32 <LongMessage>Dead store to c in edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest.testBug1874856TruePositive()</LongMessage>
33 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest" primary="true">
34 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest" start="13" end="102" sourcefile="FormatterCompileTimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterCompileTimeTest.java">
35 <Message>At FormatterCompileTimeTest.java:[lines 13-102]</Message>
36 </SourceLine>
37 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest</Message>
38 </Class>
39 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest" name="testBug1874856TruePositive" signature="()V" isStatic="false" primary="true">
40 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest" start="89" end="102" startBytecode="0" endBytecode="69" sourcefile="FormatterCompileTimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterCompileTimeTest.java"/>
41 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest.testBug1874856TruePositive()</Message>
42 </Method>
43 <LocalVariable name="c" register="1" pc="14" role="LOCAL_VARIABLE_NAMED">
44 <Message>Local variable named c</Message>
45 </LocalVariable>
46 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest" primary="true" start="89" end="89" startBytecode="13" endBytecode="13" sourcefile="FormatterCompileTimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterCompileTimeTest.java">
47 <Message>At FormatterCompileTimeTest.java:[line 89]</Message>
48 </SourceLine>
49 <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.DEAD_OBJECT_STORE" value="true"/>
50 <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.METHOD_RESULT" value="true"/>
51 <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.LOCAL_NAME" value="c"/>
52 </BugInstance>
53 <BugInstance type="RV_RETURN_VALUE_IGNORED" priority="1" abbrev="RV" category="CORRECTNESS" instanceHash="c63d31dfa75951d8489bc92255150390" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="3">
54 <ShortMessage>Method ignores return value</ShortMessage>
55 <LongMessage>return value of String.format(String, Object[]) ignored in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testShouldWork()</LongMessage>
56 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
57 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
58 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
59 </SourceLine>
60 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
61 </Class>
62 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testShouldWork" signature="()V" isStatic="false" primary="true">
63 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="19" end="24" startBytecode="0" endBytecode="124" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
64 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testShouldWork()</Message>
65 </Method>
66 <Method classname="java.lang.String" name="format" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" isStatic="true" role="METHOD_CALLED">
67 <SourceLine classname="java.lang.String" start="2781" end="2781" startBytecode="0" endBytecode="67" sourcefile="String.java" sourcepath="java/lang/String.java"/>
68 <Message>Called method String.format(String, Object[])</Message>
69 </Method>
70 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="19" end="19" startBytecode="22" endBytecode="22" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
71 <Message>At FormatterRuntimeTest.java:[line 19]</Message>
72 </SourceLine>
73 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="21" end="21" startBytecode="44" endBytecode="44" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java" role="SOURCE_LINE_ANOTHER_INSTANCE">
74 <Message>Another occurrence at FormatterRuntimeTest.java:[line 21]</Message>
75 </SourceLine>
76 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="22" end="22" startBytecode="66" endBytecode="66" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java" role="SOURCE_LINE_ANOTHER_INSTANCE">
77 <Message>Another occurrence at FormatterRuntimeTest.java:[line 22]</Message>
78 </SourceLine>
79 </BugInstance>
80 <BugInstance type="RV_RETURN_VALUE_IGNORED" priority="2" abbrev="RV" category="CORRECTNESS" instanceHash="a957e45c805a349df470240c89ce126d" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="5">
81 <ShortMessage>Method ignores return value</ShortMessage>
82 <LongMessage>return value of String.format(String, Object[]) ignored in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testFormatDateWithY()</LongMessage>
83 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
84 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
85 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
86 </SourceLine>
87 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
88 </Class>
89 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testFormatDateWithY" signature="()V" isStatic="false" primary="true">
90 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="52" end="56" startBytecode="0" endBytecode="118" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
91 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testFormatDateWithY()</Message>
92 </Method>
93 <Method classname="java.lang.String" name="format" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" isStatic="true" role="METHOD_CALLED">
94 <SourceLine classname="java.lang.String" start="2781" end="2781" startBytecode="0" endBytecode="67" sourcefile="String.java" sourcepath="java/lang/String.java"/>
95 <Message>Called method String.format(String, Object[])</Message>
96 </Method>
97 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="52" end="52" startBytecode="16" endBytecode="16" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
98 <Message>At FormatterRuntimeTest.java:[line 52]</Message>
99 </SourceLine>
100 </BugInstance>
101 <BugInstance type="RV_RETURN_VALUE_IGNORED" priority="2" abbrev="RV" category="CORRECTNESS" instanceHash="2c74649fe245b59ec61b3914e249e300" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="5">
102 <ShortMessage>Method ignores return value</ShortMessage>
103 <LongMessage>return value of String.format(String, Object[]) ignored in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testNotEnoughParameters()</LongMessage>
104 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
105 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
106 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
107 </SourceLine>
108 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
109 </Class>
110 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testNotEnoughParameters" signature="()V" isStatic="false" primary="true">
111 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="36" end="40" startBytecode="0" endBytecode="113" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
112 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testNotEnoughParameters()</Message>
113 </Method>
114 <Method classname="java.lang.String" name="format" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" isStatic="true" role="METHOD_CALLED">
115 <SourceLine classname="java.lang.String" start="2781" end="2781" startBytecode="0" endBytecode="67" sourcefile="String.java" sourcepath="java/lang/String.java"/>
116 <Message>Called method String.format(String, Object[])</Message>
117 </Method>
118 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="36" end="36" startBytecode="11" endBytecode="11" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
119 <Message>At FormatterRuntimeTest.java:[line 36]</Message>
120 </SourceLine>
121 </BugInstance>
122 <BugInstance type="RV_RETURN_VALUE_IGNORED" priority="2" abbrev="RV" category="CORRECTNESS" instanceHash="4ee254369d475e76b178b18cb2e89b81" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="5">
123 <ShortMessage>Method ignores return value</ShortMessage>
124 <LongMessage>return value of String.format(String, Object[]) ignored in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testStringWhereIntegerExpected()</LongMessage>
125 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
126 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
127 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
128 </SourceLine>
129 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
130 </Class>
131 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testStringWhereIntegerExpected" signature="()V" isStatic="false" primary="true">
132 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="28" end="32" startBytecode="0" endBytecode="113" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
133 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testStringWhereIntegerExpected()</Message>
134 </Method>
135 <Method classname="java.lang.String" name="format" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" isStatic="true" role="METHOD_CALLED">
136 <SourceLine classname="java.lang.String" start="2781" end="2781" startBytecode="0" endBytecode="67" sourcefile="String.java" sourcepath="java/lang/String.java"/>
137 <Message>Called method String.format(String, Object[])</Message>
138 </Method>
139 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="28" end="28" startBytecode="11" endBytecode="11" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
140 <Message>At FormatterRuntimeTest.java:[line 28]</Message>
141 </SourceLine>
142 </BugInstance>
143 <BugInstance type="VA_FORMAT_STRING_BAD_CONVERSION" priority="1" abbrev="FS" category="CORRECTNESS" instanceHash="93f1d9e0964015f7fe73330ad377e466" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="7">
144 <ShortMessage>The type of a supplied argument doesn&apos;t match format specifier</ShortMessage>
145 <LongMessage>Argument of type String can&apos;t be handled by format specifier %tY in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testDateMismatch()</LongMessage>
146 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
147 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
148 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
149 </SourceLine>
150 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
151 </Class>
152 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testDateMismatch" signature="()V" isStatic="false" primary="true">
153 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="88" end="92" startBytecode="0" endBytecode="116" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
154 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testDateMismatch()</Message>
155 </Method>
156 <Method classname="java.io.PrintStream" name="printf" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintStream;" isStatic="false" role="METHOD_CALLED">
157 <SourceLine classname="java.io.PrintStream" start="838" end="838" startBytecode="0" endBytecode="68" sourcefile="PrintStream.java" sourcepath="java/io/PrintStream.java"/>
158 <Message>Called method java.io.PrintStream.printf(String, Object[])</Message>
159 </Method>
160 <Type descriptor="Ljava/lang/String;" role="TYPE_FOUND">
161 <SourceLine classname="java.lang.String" start="109" end="2985" sourcefile="String.java" sourcepath="java/lang/String.java">
162 <Message>At String.java:[lines 109-2985]</Message>
163 </SourceLine>
164 <Message>Actual type String</Message>
165 </Type>
166 <String value="%tY" role="STRING_FORMAT_SPECIFIER">
167 <Message>Format specifier &quot;%tY&quot;</Message>
168 </String>
169 <String value="%tY\n" role="STRING_FORMAT_STRING">
170 <Message>Format string &quot;%tY\n&quot;</Message>
171 </String>
172 <String value="2008" role="STRING_CONSTANT">
173 <Message>String constant &quot;2008&quot;</Message>
174 </String>
175 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="88" end="88" startBytecode="14" endBytecode="14" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
176 <Message>At FormatterRuntimeTest.java:[line 88]</Message>
177 </SourceLine>
178 </BugInstance>
179 <BugInstance type="VA_FORMAT_STRING_BAD_CONVERSION" priority="1" abbrev="FS" category="CORRECTNESS" instanceHash="1e58c8532a6f2d8e8f9e71962729aa57" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="7">
180 <ShortMessage>The type of a supplied argument doesn&apos;t match format specifier</ShortMessage>
181 <LongMessage>Argument of type String can&apos;t be handled by format specifier %d in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testStringWhereIntegerExpected()</LongMessage>
182 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
183 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
184 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
185 </SourceLine>
186 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
187 </Class>
188 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testStringWhereIntegerExpected" signature="()V" isStatic="false" primary="true">
189 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="28" end="32" startBytecode="0" endBytecode="113" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
190 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testStringWhereIntegerExpected()</Message>
191 </Method>
192 <Method classname="java.lang.String" name="format" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" isStatic="true" role="METHOD_CALLED">
193 <SourceLine classname="java.lang.String" start="2781" end="2781" startBytecode="0" endBytecode="67" sourcefile="String.java" sourcepath="java/lang/String.java"/>
194 <Message>Called method String.format(String, Object[])</Message>
195 </Method>
196 <Type descriptor="Ljava/lang/String;" role="TYPE_FOUND">
197 <SourceLine classname="java.lang.String" start="109" end="2985" sourcefile="String.java" sourcepath="java/lang/String.java">
198 <Message>At String.java:[lines 109-2985]</Message>
199 </SourceLine>
200 <Message>Actual type String</Message>
201 </Type>
202 <String value="%d" role="STRING_FORMAT_SPECIFIER">
203 <Message>Format specifier &quot;%d&quot;</Message>
204 </String>
205 <String value="%d" role="STRING_FORMAT_STRING">
206 <Message>Format string &quot;%d&quot;</Message>
207 </String>
208 <String value="test" role="STRING_CONSTANT">
209 <Message>String constant &quot;test&quot;</Message>
210 </String>
211 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="28" end="28" startBytecode="11" endBytecode="11" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
212 <Message>At FormatterRuntimeTest.java:[line 28]</Message>
213 </SourceLine>
214 </BugInstance>
215 <BugInstance type="VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY" priority="1" abbrev="USELESS_STRING" category="CORRECTNESS" instanceHash="74723a2ec007b7e0cf3244632894f94f" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="7">
216 <ShortMessage>Array formatted in useless way using format string</ShortMessage>
217 <LongMessage>Argument of type int[] formatted in useless way in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testPassingAnArray()</LongMessage>
218 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
219 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
220 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
221 </SourceLine>
222 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
223 </Class>
224 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testPassingAnArray" signature="()V" isStatic="false" primary="true">
225 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="43" end="44" startBytecode="0" endBytecode="75" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
226 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testPassingAnArray()</Message>
227 </Method>
228 <Method classname="java.io.PrintStream" name="printf" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintStream;" isStatic="false" role="METHOD_CALLED">
229 <SourceLine classname="java.io.PrintStream" start="838" end="838" startBytecode="0" endBytecode="68" sourcefile="PrintStream.java" sourcepath="java/io/PrintStream.java"/>
230 <Message>Called method java.io.PrintStream.printf(String, Object[])</Message>
231 </Method>
232 <Type descriptor="[I" role="TYPE_FOUND">
233 <Message>Actual type int[]</Message>
234 </Type>
235 <String value="%s" role="STRING_FORMAT_SPECIFIER">
236 <Message>Format specifier &quot;%s&quot;</Message>
237 </String>
238 <String value="%s" role="STRING_FORMAT_STRING">
239 <Message>Format string &quot;%s&quot;</Message>
240 </String>
241 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="43" end="43" startBytecode="25" endBytecode="25" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
242 <Message>At FormatterRuntimeTest.java:[line 43]</Message>
243 </SourceLine>
244 </BugInstance>
245 <BugInstance type="VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN" priority="1" abbrev="FS" category="STYLE" instanceHash="4d045e8399e96a8da505ea634eee5829" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="15">
246 <ShortMessage>Non-Boolean argument formatted using %b format specifier</ShortMessage>
247 <LongMessage>Non-Boolean argument formatted using %b format specifier in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testPassingAnIntToABoolean()</LongMessage>
248 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
249 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
250 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
251 </SourceLine>
252 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
253 </Class>
254 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testPassingAnIntToABoolean" signature="()V" isStatic="false" primary="true">
255 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="47" end="48" startBytecode="0" endBytecode="66" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
256 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testPassingAnIntToABoolean()</Message>
257 </Method>
258 <Method classname="java.io.PrintStream" name="printf" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintStream;" isStatic="false" role="METHOD_CALLED">
259 <SourceLine classname="java.io.PrintStream" start="838" end="838" startBytecode="0" endBytecode="68" sourcefile="PrintStream.java" sourcepath="java/io/PrintStream.java"/>
260 <Message>Called method java.io.PrintStream.printf(String, Object[])</Message>
261 </Method>
262 <Type descriptor="Ljava/lang/Integer;" role="TYPE_FOUND">
263 <SourceLine classname="java.lang.Integer" start="50" end="1177" sourcefile="Integer.java" sourcepath="java/lang/Integer.java">
264 <Message>At Integer.java:[lines 50-1177]</Message>
265 </SourceLine>
266 <Message>Actual type Integer</Message>
267 </Type>
268 <String value="%b" role="STRING_FORMAT_SPECIFIER">
269 <Message>Format specifier &quot;%b&quot;</Message>
270 </String>
271 <String value="%b" role="STRING_FORMAT_STRING">
272 <Message>Format string &quot;%b&quot;</Message>
273 </String>
274 <Method classname="java.lang.Integer" name="valueOf" signature="(I)Ljava/lang/Integer;" isStatic="true" role="METHOD_RETURN_VALUE_OF">
275 <SourceLine classname="java.lang.Integer" start="597" end="601" startBytecode="0" endBytecode="98" sourcefile="Integer.java" sourcepath="java/lang/Integer.java"/>
276 <Message>Return value of Integer.valueOf(int)</Message>
277 </Method>
278 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="47" end="47" startBytecode="16" endBytecode="16" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
279 <Message>At FormatterRuntimeTest.java:[line 47]</Message>
280 </SourceLine>
281 </BugInstance>
282 <BugInstance type="VA_FORMAT_STRING_ILLEGAL" priority="1" abbrev="FS" category="CORRECTNESS" instanceHash="2d3ad4573d1c3a114d0c24934c6b036b" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="9">
283 <ShortMessage>Illegal format string</ShortMessage>
284 <LongMessage>Illegal format string &quot;%Y&quot; in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testFormatDateWithY()</LongMessage>
285 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
286 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
287 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
288 </SourceLine>
289 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
290 </Class>
291 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testFormatDateWithY" signature="()V" isStatic="false" primary="true">
292 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="52" end="56" startBytecode="0" endBytecode="118" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
293 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testFormatDateWithY()</Message>
294 </Method>
295 <Method classname="java.lang.String" name="format" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" isStatic="true" role="METHOD_CALLED">
296 <SourceLine classname="java.lang.String" start="2781" end="2781" startBytecode="0" endBytecode="67" sourcefile="String.java" sourcepath="java/lang/String.java"/>
297 <Message>Called method String.format(String, Object[])</Message>
298 </Method>
299 <String value="%Y" role="STRING_FORMAT_STRING">
300 <Message>Format string &quot;%Y&quot;</Message>
301 </String>
302 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="52" end="52" startBytecode="16" endBytecode="16" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
303 <Message>At FormatterRuntimeTest.java:[line 52]</Message>
304 </SourceLine>
305 </BugInstance>
306 <BugInstance type="VA_FORMAT_STRING_MISSING_ARGUMENT" priority="1" abbrev="FS" category="CORRECTNESS" instanceHash="3ce581db76a852fe30f57d89a9b69e4e" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="9">
307 <ShortMessage>Format string references missing argument</ShortMessage>
308 <LongMessage>format string &quot;%s&quot; needs argument 2 but only 1 are provided in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testNotEnoughParameters()</LongMessage>
309 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
310 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
311 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
312 </SourceLine>
313 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
314 </Class>
315 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testNotEnoughParameters" signature="()V" isStatic="false" primary="true">
316 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="36" end="40" startBytecode="0" endBytecode="113" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
317 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testNotEnoughParameters()</Message>
318 </Method>
319 <Method classname="java.lang.String" name="format" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" isStatic="true" role="METHOD_CALLED">
320 <SourceLine classname="java.lang.String" start="2781" end="2781" startBytecode="0" endBytecode="67" sourcefile="String.java" sourcepath="java/lang/String.java"/>
321 <Message>Called method String.format(String, Object[])</Message>
322 </Method>
323 <String value="%s" role="STRING_FORMAT_SPECIFIER">
324 <Message>Format specifier &quot;%s&quot;</Message>
325 </String>
326 <String value="%s%s" role="STRING_FORMAT_STRING">
327 <Message>Format string &quot;%s%s&quot;</Message>
328 </String>
329 <Int value="2" role="INT_EXPECTED_ARGUMENTS">
330 <Message>Expected 2 arguments</Message>
331 </Int>
332 <Int value="1" role="INT_ACTUAL_ARGUMENTS">
333 <Message>Found 1 arguments</Message>
334 </Int>
335 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="36" end="36" startBytecode="11" endBytecode="11" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
336 <Message>At FormatterRuntimeTest.java:[line 36]</Message>
337 </SourceLine>
338 </BugInstance>
339 <BugInstance type="VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT" priority="1" abbrev="FS" category="CORRECTNESS" instanceHash="2648fd6a49330e4e7bf5ea58a138f98" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="5">
340 <ShortMessage>No previous argument for format string</ShortMessage>
341 <LongMessage>No previous argument for format string argument to String.format(String, Object[]) in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testBug1874856TruePositive()</LongMessage>
342 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
343 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
344 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
345 </SourceLine>
346 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
347 </Class>
348 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testBug1874856TruePositive" signature="()V" isStatic="false" primary="true">
349 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="76" end="84" startBytecode="0" endBytecode="212" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
350 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testBug1874856TruePositive()</Message>
351 </Method>
352 <Method classname="java.lang.String" name="format" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" isStatic="true" role="METHOD_CALLED">
353 <SourceLine classname="java.lang.String" start="2781" end="2781" startBytecode="0" endBytecode="67" sourcefile="String.java" sourcepath="java/lang/String.java"/>
354 <Message>Called method String.format(String, Object[])</Message>
355 </Method>
356 <String value="%&lt;te" role="STRING_FORMAT_SPECIFIER">
357 <Message>Format specifier &quot;%&lt;te&quot;</Message>
358 </String>
359 <String value="s5 Duke&apos;s Birthday: %&lt;te, %te %&lt;tY %te %12$tm " role="STRING_FORMAT_STRING">
360 <Message>Format string &quot;s5 Duke&apos;s Birthday: %&lt;te, %te %&lt;tY %te %12$tm &quot;</Message>
361 </String>
362 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="78" end="78" startBytecode="75" endBytecode="75" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
363 <Message>At FormatterRuntimeTest.java:[line 78]</Message>
364 </SourceLine>
365 </BugInstance>
366 <BugInstance type="VA_FORMAT_STRING_USES_NEWLINE" priority="2" abbrev="FS" category="BAD_PRACTICE" instanceHash="cf053b4561bf3a435165e2aa13a8211a" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="20">
367 <ShortMessage>Format string should use %n rather than \n</ShortMessage>
368 <LongMessage>Format string should use %n rather than \n in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testDateMismatch()</LongMessage>
369 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
370 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
371 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
372 </SourceLine>
373 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
374 </Class>
375 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testDateMismatch" signature="()V" isStatic="false" primary="true">
376 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="88" end="92" startBytecode="0" endBytecode="116" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
377 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testDateMismatch()</Message>
378 </Method>
379 <Method classname="java.io.PrintStream" name="printf" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintStream;" isStatic="false" role="METHOD_CALLED">
380 <SourceLine classname="java.io.PrintStream" start="838" end="838" startBytecode="0" endBytecode="68" sourcefile="PrintStream.java" sourcepath="java/io/PrintStream.java"/>
381 <Message>Called method java.io.PrintStream.printf(String, Object[])</Message>
382 </Method>
383 <String value="%tY\n" role="STRING_FORMAT_STRING">
384 <Message>Format string &quot;%tY\n&quot;</Message>
385 </String>
386 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="88" end="88" startBytecode="14" endBytecode="14" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
387 <Message>At FormatterRuntimeTest.java:[line 88]</Message>
388 </SourceLine>
389 </BugInstance>
390 <BugInstance type="VA_FORMAT_STRING_USES_NEWLINE" priority="2" abbrev="FS" category="BAD_PRACTICE" instanceHash="c72074fac9b3ee6b70f539cea3fe61c8" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="20">
391 <ShortMessage>Format string should use %n rather than \n</ShortMessage>
392 <LongMessage>Format string should use %n rather than \n in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testShouldWork()</LongMessage>
393 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
394 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
395 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
396 </SourceLine>
397 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
398 </Class>
399 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testShouldWork" signature="()V" isStatic="false" primary="true">
400 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="19" end="24" startBytecode="0" endBytecode="124" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
401 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testShouldWork()</Message>
402 </Method>
403 <Method classname="java.lang.String" name="format" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" isStatic="true" role="METHOD_CALLED">
404 <SourceLine classname="java.lang.String" start="2781" end="2781" startBytecode="0" endBytecode="67" sourcefile="String.java" sourcepath="java/lang/String.java"/>
405 <Message>Called method String.format(String, Object[])</Message>
406 </Method>
407 <String value="%d\n" role="STRING_FORMAT_STRING">
408 <Message>Format string &quot;%d\n&quot;</Message>
409 </String>
410 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="21" end="21" startBytecode="44" endBytecode="44" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
411 <Message>At FormatterRuntimeTest.java:[line 21]</Message>
412 </SourceLine>
413 </BugInstance>
414 <BugInstance type="VA_FORMAT_STRING_USES_NEWLINE" priority="2" abbrev="FS" category="BAD_PRACTICE" instanceHash="50f3d3a539c3a9b1a703b51bb7bd6120" instanceOccurrenceNum="0" instanceOccurrenceMax="0" rank="20">
415 <ShortMessage>Format string should use %n rather than \n</ShortMessage>
416 <LongMessage>Format string should use %n rather than \n in edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testShouldWork()</LongMessage>
417 <Class classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true">
418 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="16" end="92" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
419 <Message>At FormatterRuntimeTest.java:[lines 16-92]</Message>
420 </SourceLine>
421 <Message>In class edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest</Message>
422 </Class>
423 <Method classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" name="testShouldWork" signature="()V" isStatic="false" primary="true">
424 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" start="19" end="24" startBytecode="0" endBytecode="124" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java"/>
425 <Message>In method edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest.testShouldWork()</Message>
426 </Method>
427 <Method classname="java.lang.String" name="format" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" isStatic="true" role="METHOD_CALLED">
428 <SourceLine classname="java.lang.String" start="2781" end="2781" startBytecode="0" endBytecode="67" sourcefile="String.java" sourcepath="java/lang/String.java"/>
429 <Message>Called method String.format(String, Object[])</Message>
430 </Method>
431 <String value="%f\n" role="STRING_FORMAT_STRING">
432 <Message>Format string &quot;%f\n&quot;</Message>
433 </String>
434 <SourceLine classname="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" primary="true" start="22" end="22" startBytecode="66" endBytecode="66" sourcefile="FormatterRuntimeTest.java" sourcepath="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java">
435 <Message>At FormatterRuntimeTest.java:[line 22]</Message>
436 </SourceLine>
437 </BugInstance>
438 <BugCategory category="STYLE">
439 <Description>Dodgy code</Description>
440 </BugCategory>
441 <BugCategory category="BAD_PRACTICE">
442 <Description>Bad practice</Description>
443 </BugCategory>
444 <BugCategory category="CORRECTNESS">
445 <Description>Correctness</Description>
446 </BugCategory>
447 <BugPattern type="VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT" abbrev="FS" category="CORRECTNESS">
448 <ShortDescription>No previous argument for format string</ShortDescription>
449 <Details><![CDATA[
450
451 <p>
452 The format string specifies a relative index to request that the argument for the previous format specifier
453 be reused. However, there is no previous argument.
454 For example,
455 </p>
456 <p><code>formatter.format("%&lt;s %s", "a", "b")</code>
457 </p>
458 <p>would throw a MissingFormatArgumentException when executed.
459 </p>
460
461 ]]></Details>
462 </BugPattern>
463 <BugPattern type="VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY" abbrev="USELESS_STRING" category="CORRECTNESS">
464 <ShortDescription>Array formatted in useless way using format string</ShortDescription>
465 <Details><![CDATA[
466
467 <p>
468 One of the arguments being formatted with a format string is an array. This will be formatted
469 using a fairly useless format, such as [I@304282, which doesn't actually show the contents
470 of the array.
471 Consider wrapping the array using <code>Arrays.asList(...)</code> before handling it off to a formatted.
472 </p>
473
474 ]]></Details>
475 </BugPattern>
476 <BugPattern type="VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN" abbrev="FS" category="STYLE">
477 <ShortDescription>Non-Boolean argument formatted using %b format specifier</ShortDescription>
478 <Details><![CDATA[
479
480 <p>
481 An argument not of type Boolean is being formatted with a %b format specifier. This won't throw an
482 exception; instead, it will print true for any nonnull value, and false for null.
483 This feature of format strings is strange, and may not be what you intended.
484 </p>
485
486 ]]></Details>
487 </BugPattern>
488 <BugPattern type="VA_FORMAT_STRING_BAD_CONVERSION" abbrev="FS" category="CORRECTNESS">
489 <ShortDescription>The type of a supplied argument doesn&apos;t match format specifier</ShortDescription>
490 <Details><![CDATA[
491
492 <p>
493 One of the arguments is uncompatible with the corresponding format string specifier.
494 As a result, this will generate a runtime exception when executed.
495 For example, <code>String.format("%d", "1")</code> will generate an exception, since
496 the String "1" is incompatible with the format specifier %d.
497 </p>
498
499 ]]></Details>
500 </BugPattern>
501 <BugPattern type="VA_FORMAT_STRING_USES_NEWLINE" abbrev="FS" category="BAD_PRACTICE">
502 <ShortDescription>Format string should use %n rather than \n</ShortDescription>
503 <Details><![CDATA[
504
505 <p>
506 This format string include a newline character (\n). In format strings, it is generally
507 preferable better to use %n, which will produce the platform-specific line separator.
508 </p>
509
510 ]]></Details>
511 </BugPattern>
512 <BugPattern type="VA_FORMAT_STRING_MISSING_ARGUMENT" abbrev="FS" category="CORRECTNESS">
513 <ShortDescription>Format string references missing argument</ShortDescription>
514 <Details><![CDATA[
515
516 <p>
517 Not enough arguments are passed to satisfy a placeholder in the format string.
518 A runtime exception will occur when
519 this statement is executed.
520 </p>
521
522 ]]></Details>
523 </BugPattern>
524 <BugPattern type="VA_FORMAT_STRING_ILLEGAL" abbrev="FS" category="CORRECTNESS">
525 <ShortDescription>Illegal format string</ShortDescription>
526 <Details><![CDATA[
527
528 <p>
529 The format string is syntactically invalid,
530 and a runtime exception will occur when
531 this statement is executed.
532 </p>
533
534 ]]></Details>
535 </BugPattern>
536 <BugPattern type="RV_RETURN_VALUE_IGNORED" abbrev="RV" category="CORRECTNESS">
537 <ShortDescription>Method ignores return value</ShortDescription>
538 <Details><![CDATA[
539
540 <p> The return value of this method should be checked. One common
541 cause of this warning is to invoke a method on an immutable object,
542 thinking that it updates the object. For example, in the following code
543 fragment,</p>
544 <blockquote>
545 <pre>
546 String dateString = getHeaderField(name);
547 dateString.trim();
548 </pre>
549 </blockquote>
550 <p>the programmer seems to be thinking that the trim() method will update
551 the String referenced by dateString. But since Strings are immutable, the trim()
552 function returns a new String value, which is being ignored here. The code
553 should be corrected to: </p>
554 <blockquote>
555 <pre>
556 String dateString = getHeaderField(name);
557 dateString = dateString.trim();
558 </pre>
559 </blockquote>
560
561 ]]></Details>
562 </BugPattern>
563 <BugPattern type="DLS_DEAD_LOCAL_STORE" abbrev="DLS" category="STYLE">
564 <ShortDescription>Dead store to local variable</ShortDescription>
565 <Details><![CDATA[
566
567 <p>
568 This instruction assigns a value to a local variable,
569 but the value is not read or used in any subsequent instruction.
570 Often, this indicates an error, because the value computed is never
571 used.
572 </p>
573 <p>
574 Note that Sun's javac compiler often generates dead stores for
575 final local variables. Because FindBugs is a bytecode-based tool,
576 there is no easy way to eliminate these false positives.
577 </p>
578
579 ]]></Details>
580 </BugPattern>
581 <BugCode abbrev="FS">
582 <Description>Format string problem</Description>
583 </BugCode>
584 <BugCode abbrev="RV" cweid="440">
585 <Description>Bad use of return value from method</Description>
586 </BugCode>
587 <BugCode abbrev="USELESS_STRING">
588 <Description>Useless/non-informative string generated</Description>
589 </BugCode>
590 <BugCode abbrev="DLS" cweid="563">
591 <Description>Dead local store</Description>
592 </BugCode>
593 <Errors errors="0" missingClasses="2">
594 <MissingClass>junit.framework.Assert</MissingClass>
595 <MissingClass>junit.framework.TestCase</MissingClass>
596 </Errors>
597 <FindBugsSummary timestamp="Fri, 6 Sep 2013 06:17:42 +0800" total_classes="12" referenced_classes="67" total_bugs="16" total_size="659" num_packages="1" vm_version="20.0-b12" cpu_seconds="4.78" clock_seconds="3.36" peak_mbytes="54.23" alloc_mbytes="742.44" gc_seconds="0.35" priority_2="6" priority_1="10">
598 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/Conversion.java" bugCount="0" size="48"/>
599 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/DateTime.java" bugCount="0" size="38"/>
600 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/ExtraFormatArgumentsException.java" bugCount="0" size="9"/>
601 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/Flags.java" bugCount="0" size="82"/>
602 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/FormatSpecifier.java" bugCount="0" size="245"/>
603 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/Formatter.java" bugCount="0" size="57"/>
604 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/FormatterCompileTimeTest.java" bugCount="2" size="66" bugHash="943703618dac0650109c5436fc135eaf"/>
605 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/FormatterException.java" bugCount="0" size="4"/>
606 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/FormatterNumberFormatException.java" bugCount="0" size="13"/>
607 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/FormatterRuntimeTest.java" bugCount="14" size="59" bugHash="13c41581fb6b05d165f192a11a4cf2c8"/>
608 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/IllegalFormatConversionException.java" bugCount="0" size="29"/>
609 <FileStats path="edu/umd/cs/findbugs/formatStringChecker/MissingFormatArgumentException.java" bugCount="0" size="9"/>
610 <PackageStats package="edu.umd.cs.findbugs.formatStringChecker" total_bugs="16" total_types="12" total_size="659" priority_2="6" priority_1="10">
611 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.Conversion" sourceFile="Conversion.java" interface="false" size="48" bugs="0"/>
612 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.DateTime" sourceFile="DateTime.java" interface="false" size="38" bugs="0"/>
613 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.ExtraFormatArgumentsException" sourceFile="ExtraFormatArgumentsException.java" interface="false" size="9" bugs="0"/>
614 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.Flags" sourceFile="Flags.java" interface="false" size="82" bugs="0"/>
615 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.FormatSpecifier" sourceFile="FormatSpecifier.java" interface="false" size="245" bugs="0"/>
616 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.Formatter" sourceFile="Formatter.java" interface="false" size="57" bugs="0"/>
617 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.FormatterCompileTimeTest" sourceFile="FormatterCompileTimeTest.java" interface="false" size="66" bugs="2" priority_1="2"/>
618 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.FormatterException" sourceFile="FormatterException.java" interface="false" size="4" bugs="0"/>
619 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.FormatterNumberFormatException" sourceFile="FormatterNumberFormatException.java" interface="false" size="13" bugs="0"/>
620 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.FormatterRuntimeTest" sourceFile="FormatterRuntimeTest.java" interface="false" size="59" bugs="14" priority_2="6" priority_1="8"/>
621 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.IllegalFormatConversionException" sourceFile="IllegalFormatConversionException.java" interface="false" size="29" bugs="0"/>
622 <ClassStats class="edu.umd.cs.findbugs.formatStringChecker.MissingFormatArgumentException" sourceFile="MissingFormatArgumentException.java" interface="false" size="9" bugs="0"/>
623 </PackageStats>
624 <FindBugsProfile>
625 <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine" totalMilliseconds="388" invocations="503" avgMicrosecondsPerInvocation="772" maxMicrosecondsPerInvocation="24371" standardDeviationMircosecondsPerInvocation="2006"/>
626 <ClassProfile name="edu.umd.cs.findbugs.detect.FieldItemSummary" totalMilliseconds="247" invocations="67" avgMicrosecondsPerInvocation="3694" maxMicrosecondsPerInvocation="88682" standardDeviationMircosecondsPerInvocation="11182"/>
627 <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.MethodGenFactory" totalMilliseconds="186" invocations="88" avgMicrosecondsPerInvocation="2113" maxMicrosecondsPerInvocation="165896" standardDeviationMircosecondsPerInvocation="17561"/>
628 <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.TypeDataflowFactory" totalMilliseconds="117" invocations="101" avgMicrosecondsPerInvocation="1167" maxMicrosecondsPerInvocation="19571" standardDeviationMircosecondsPerInvocation="2719"/>
629 <ClassProfile name="edu.umd.cs.findbugs.ba.npe.NullDerefAndRedundantComparisonFinder" totalMilliseconds="102" invocations="88" avgMicrosecondsPerInvocation="1161" maxMicrosecondsPerInvocation="13969" standardDeviationMircosecondsPerInvocation="1748"/>
630 <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.IsNullValueDataflowFactory" totalMilliseconds="97" invocations="88" avgMicrosecondsPerInvocation="1112" maxMicrosecondsPerInvocation="11562" standardDeviationMircosecondsPerInvocation="1826"/>
631 <ClassProfile name="edu.umd.cs.findbugs.detect.NoteDirectlyRelevantTypeQualifiers" totalMilliseconds="89" invocations="67" avgMicrosecondsPerInvocation="1334" maxMicrosecondsPerInvocation="9862" standardDeviationMircosecondsPerInvocation="2098"/>
632 <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.UnconditionalValueDerefDataflowFactory" totalMilliseconds="87" invocations="88" avgMicrosecondsPerInvocation="997" maxMicrosecondsPerInvocation="8936" standardDeviationMircosecondsPerInvocation="1477"/>
633 <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.ValueNumberDataflowFactory" totalMilliseconds="86" invocations="101" avgMicrosecondsPerInvocation="855" maxMicrosecondsPerInvocation="16112" standardDeviationMircosecondsPerInvocation="1765"/>
634 <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.CFGFactory" totalMilliseconds="84" invocations="88" avgMicrosecondsPerInvocation="961" maxMicrosecondsPerInvocation="18069" standardDeviationMircosecondsPerInvocation="2179"/>
635 <ClassProfile name="edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory" totalMilliseconds="73" invocations="283" avgMicrosecondsPerInvocation="261" maxMicrosecondsPerInvocation="6672" standardDeviationMircosecondsPerInvocation="571"/>
636 <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.JavaClassAnalysisEngine" totalMilliseconds="68" invocations="79" avgMicrosecondsPerInvocation="862" maxMicrosecondsPerInvocation="26469" standardDeviationMircosecondsPerInvocation="3016"/>
637 <ClassProfile name="edu.umd.cs.findbugs.util.TopologicalSort" totalMilliseconds="61" invocations="459" avgMicrosecondsPerInvocation="133" maxMicrosecondsPerInvocation="4837" standardDeviationMircosecondsPerInvocation="319"/>
638 <ClassProfile name="edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory" totalMilliseconds="55" invocations="14" avgMicrosecondsPerInvocation="3936" maxMicrosecondsPerInvocation="53657" standardDeviationMircosecondsPerInvocation="13790"/>
639 <ClassProfile name="edu.umd.cs.findbugs.detect.FindRefComparison$SpecialTypeAnalysis" totalMilliseconds="54" invocations="71" avgMicrosecondsPerInvocation="772" maxMicrosecondsPerInvocation="9461" standardDeviationMircosecondsPerInvocation="1266"/>
640 <ClassProfile name="edu.umd.cs.findbugs.detect.FunctionsThatMightBeMistakenForProcedures" totalMilliseconds="51" invocations="67" avgMicrosecondsPerInvocation="769" maxMicrosecondsPerInvocation="7171" standardDeviationMircosecondsPerInvocation="1570"/>
641 <ClassProfile name="edu.umd.cs.findbugs.detect.OverridingEqualsNotSymmetrical" totalMilliseconds="42" invocations="67" avgMicrosecondsPerInvocation="637" maxMicrosecondsPerInvocation="11413" standardDeviationMircosecondsPerInvocation="1485"/>
642 <ClassProfile name="edu.umd.cs.findbugs.detect.BuildObligationPolicyDatabase" totalMilliseconds="34" invocations="67" avgMicrosecondsPerInvocation="518" maxMicrosecondsPerInvocation="10587" standardDeviationMircosecondsPerInvocation="1343"/>
643 <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.ClassDataAnalysisEngine" totalMilliseconds="33" invocations="506" avgMicrosecondsPerInvocation="67" maxMicrosecondsPerInvocation="5235" standardDeviationMircosecondsPerInvocation="266"/>
644 <ClassProfile name="edu.umd.cs.findbugs.detect.ExplicitSerialization" totalMilliseconds="32" invocations="67" avgMicrosecondsPerInvocation="489" maxMicrosecondsPerInvocation="15156" standardDeviationMircosecondsPerInvocation="2202"/>
645 <ClassProfile name="edu.umd.cs.findbugs.detect.CalledMethods" totalMilliseconds="31" invocations="67" avgMicrosecondsPerInvocation="465" maxMicrosecondsPerInvocation="3331" standardDeviationMircosecondsPerInvocation="711"/>
646 <ClassProfile name="edu.umd.cs.findbugs.detect.RuntimeExceptionCapture" totalMilliseconds="26" invocations="12" avgMicrosecondsPerInvocation="2185" maxMicrosecondsPerInvocation="11983" standardDeviationMircosecondsPerInvocation="3672"/>
647 <ClassProfile name="edu.umd.cs.findbugs.detect.EqualsOperandShouldHaveClassCompatibleWithThis" totalMilliseconds="25" invocations="67" avgMicrosecondsPerInvocation="377" maxMicrosecondsPerInvocation="4590" standardDeviationMircosecondsPerInvocation="711"/>
648 </FindBugsProfile>
649 </FindBugsSummary>
650 <ClassFeatures></ClassFeatures>
651 <History></History>
652 </BugCollection>