This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Testing and the fly likes Finbugs & codesmell Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Finbugs & codesmell" Watch "Finbugs & codesmell" New topic

Finbugs & codesmell

Riccardo franconi

Joined: May 31, 2010
Posts: 6
HI everyone,
I'm a computer science student,
I have to analyze the codesmell founded by findbugs with apache ant as input.
But findbugs seesms to found only bugs as his name say, not codesmell.

The bugs founded are this type:

variabile assigened to null
Method fall to close stream
clone method does not call super.clone
.....and more bugs

someone know something about codesmell reached by findbugs?

thank you

Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30130

Welcome to JavaRanch!

FindBugs does find some things that are code smells. They aren't called that per se. For example UnusedLocalVariable is a code smell rather than a bug.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Riccardo franconi

Joined: May 31, 2010
Posts: 6
I thought that codesmell are only the 22 quoted in fowler's book "Refactoring_-_Improving_the_Design_of_Existing_Code".
that are here codesmell

I have to found some from this 22 codesmell.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404

There's more than 22. You might be interested in looking at Ward Cunningham's wiki pages on code smell.

(And in case you wonder why the wiki looks the way it does - Ward was the inventor of the wiki, and his is the original style.)

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Riccardo franconi

Joined: May 31, 2010
Posts: 6
ok i finish my job, thank you for all

It is sorta covered in the JavaRanch Style Guide.
subject: Finbugs & codesmell
Similar Threads
JavaRanch style: Avoiding use of break /return in the middle of a method
Findbugs can't find -outputFile??
PMD and findbugs
result-sets not being closed
difference between the Find Bugs and the PMD tool