Login
Home
Products
Download
Documentation
Community
Company
Forum
Documentation
Bugzilla
FAQ
Register
November 20, 2008, 03:31:55 pm
News
:
Home
Help
Search
Login
Register
Community Forums
>
General
>
General board
>
Finding the number of occurences of a word
Pages: [
1
]
« previous
next »
Print
Author
Topic: Finding the number of occurences of a word (Read 2184 times)
nalinchandrawansha
Newbie
Posts: 2
Finding the number of occurences of a word
«
on:
October 31, 2007, 09:52:40 am »
Hi,
How can I find the number of occurances of a given word in a Java class? Say for example, the number of 'while' loops.
Thank you.
Nalin
Logged
Mathieu Verbaere
Administrator
Newbie
Posts: 26
Re: Finding the number of occurences of a word
«
Reply #1 on:
October 31, 2007, 01:20:30 pm »
Dear Nalin,
SemmleCode does not have full-text search features. Instead, it allows you to phrase more precise semantic-oriented queries. In your example, I believe you want to count the number of 'while' *statements* in a class.
We are currently working on adding information about statements in the database, and we will let you know as soon as it is ready. Note that with SemmleCode, since you will be looking for statements only,
occurrences of the 'while' word inside string literals will be automatically ignored.
Do you have any other precise example of what you wish to count? It would be helpful if you could tell us what exactly you would like to compute.
Thank you for your interest and feedback.
mathieu
Logged
nalinchandrawansha
Newbie
Posts: 2
Re: Finding the number of occurences of a word
«
Reply #2 on:
November 01, 2007, 05:56:35 am »
Dear Mathieu,
I'm working on finding the Cyclomatic complexity of a given Java program. So, I'm concerned in calculating the total of possible paths with the occurrences of 'if', 'switch', 'for' etc...
Is there a way that I can get this using .QL?
Thank you.
Nalin
Logged
Mathieu Verbaere
Administrator
Newbie
Posts: 26
Re: Finding the number of occurences of a word
«
Reply #3 on:
November 01, 2007, 10:11:24 pm »
Hi again Nalin,
As I said in my previous post, we are working on the population of statements as well as control flow information into the database. Once that is done, querying the cyclomatic complexity will be possible and we will add a common definition for it in the pre-packaged library of metrics queries. So stay tuned.
mathieu
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General board
-----------------------------
Share Queries
-----------------------------
=> Cool queries
-----------------------------
Feature requests
-----------------------------
=> New SemmleCode features
-----------------------------
Installation
-----------------------------
=> SemmleCode installation
-----------------------------
Troubleshooting
-----------------------------
=> SemmleCode Problems
Loading...