All Questions
Tagged with findbugs code-analysis
11 questions
0
votes
1
answer
1k
views
What is the difference between Checkstyle and FindBugs?
what is the main difference between CheckStyle and FindBugs code analyzer plugin for Eclipse IDE.I need advantage and disadvantage for both the plugins.
0
votes
0
answers
2k
views
Code analyzer capable to detect resource leak
May I know if there is any free code analyzer that can find out the "Improper resource shutdown or release of IO or Database resources". I have tried findbugs and Sonar. Both were able to identify ...
3
votes
2
answers
6k
views
Dodgy - Redundant nullcheck of value known to be null
Below is the code where i am getting the Sonar violation
public static Connection getConnection(
String db)
throws SQLException {
Connection connection = null;
try {
...
2
votes
1
answer
282
views
writing a findbugs detector that knows if a method argument is of type Throwable
I'm writing a Findbugs detector, based on an OpcodeStackDetector, that looks at all calls to a Java method with a signature like this:
void foo(Object...args)
It should report a bug if one of the ...
8
votes
1
answer
29k
views
FindBugs error: Write to static field from instance method
I have couple of areas in my application where I get the error while manipulating value of static variable from instance method.
"Write to static field from instance method".
If we take multi-...
12
votes
1
answer
12k
views
Have you ever compared the static analysis tools Klocwork and Findbugs? [closed]
We are using Klocwork as a static analysis tool.
Klocwork is a commercial tool and has many advantages but also has limitations like false-positives.
I wonder who has ever compared Klocwork with ...
0
votes
4
answers
437
views
Checkstyle and bug detectors in Java
I need to perform some validations to some of my classes, for example:
Every class field must be final or have one write per program
(singleton);
If the field it's not final, then it must be private;...
1
vote
5
answers
610
views
Using a lot of static analysis tools in one application [closed]
Now, we have a lot of tool for static code analysis in java.
For example:
PMD
CPD
FindBugs
CheckStyle
Sonar
JDepend
etc.
Is it good to use all these tools in one application (using maven we will ...
2
votes
2
answers
279
views
Code Analysis: check if a String parameter of a given function is available in a *.properties file
Consider the Java code:
ReadProperty.get("info")
And a my_stettings.properties file:
info=Lorem ipsum
server=computer01
I was wondering if it is possible to use a code analysis tool (Checkstyle, ...
5
votes
3
answers
13k
views
FindBugs - Redundant Comparison to null
I am having findbugs error for the below code,
if( obj instanceof CustomerData )
{
CustomerData customerData = (CustomerData)obj;
if (customerData == null)
{
errors.reject("...
2
votes
3
answers
1k
views
Is it possible for the FindBugs plugin for eclipse to report as errors instead of warnings?
I am working on a very large legacy code base. We are looking to introduce FindBugs into the development practice.
I intend to have FindBugs run whenever the code is built by eclipse.
I would like ...