• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Java code analysis tools.

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm looking for some java code analysis tools to analyze the java code from performance point of view.The specific feature that i'm looking for is the ability of the tool to recognize a specific pattern in the code and point it out.For example if I want to search whether there is a use of nested for or while loop in the code then the tool should be able to recognize it.This was one example ,similarly the tool should be able to recognize a pattern in the code.

Please point out the appropriate tool for the purpose.Also point out the tools which can be used as plugins to Eclipse for the above mentioned purpose.

Thanks in advance,
Piyush
 
Ranch Hand
Posts: 136
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use JProfiler
 
Piyush Tripathi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the information.
What i read about Jprofiler is that it can give views on memory usage ,finding instances which are on the heap,shows call sequences and shows list of most time consuming methods.
What i wanted was a tool that could find a particular pattern in the code and list the ocurrence of it , if there is any such tool.

Piyush

 
Piyush Tripathi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I was reading about a tool called PMD on the net.Has anyone worked on it .I read it can check for unused try/catch block.Can it find whether there is use of nested for or while loop in the code.

Thanks,
Piyush
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's possible to extend PMD with new rules to check. See "Customizing PMD" on the PMD site, especially "How to write a rule" and "Writing XPath rules".
 
author & internet detective
Posts: 40747
827
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Piyush Tripathi wrote:Hi,
I was reading about a tool called PMD on the net.Has anyone worked on it .I read it can check for unused try/catch block.Can it find whether there is use of nested for or while loop in the code.


Yes it can find any Java construct. Keeping in mind nested loops aren't always a performance problem.
 
Ranch Hand
Posts: 574
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,
One of the Ranchers has suggested using JProfiler,Can you tell me from where to download this tool.

My requirement is to to "independently" test java application.

Note:JDK used is 1.5

--
Deepak Lal
 
Ranch Hand
Posts: 57
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i use two tools for Java code analysis. PDM and findbugs, both of them are available as plug-in for eclipse. They are best tool to review your code.

Piyush Tripathi wrote:Hi,
I was reading about a tool called PMD on the net.Has anyone worked on it .I read it can check for unused try/catch block.Can it find whether there is use of nested for or while loop in the code.



PDM does that even Findbugs does it for your

Thanks
Prashant Saraf
 
Deepak Lal
Ranch Hand
Posts: 574
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm new to using plugin(PDM and findbugs) in an Eclipse IDE. Can you tell me the steps for using these plugin in eclipse IDE.
--
Deepak Lal
 
Jeanne Boyarsky
author & internet detective
Posts: 40747
827
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Deepak Lal wrote:Hi,
I'm new to using plugin(PDM and findbugs) in an Eclipse IDE. Can you tell me the steps for using these plugin in eclipse IDE.
--
Deepak Lal


PMD and FindBugs.

Do you remember in your thread about EJBs where I asked you to show you made an effort? It took me less than a minute to find these two links. Did you spend any time trying to search for an answer before asking here? If so, please post an indication of what you tried next time you have a question. If not, why not? Are you less able to use Google than others?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic