Skip to content

Narrow screen resolution Wide screen resolution Auto adjust screen size Increase font size Decrease font size Default font size default color brick color green color
You are here:Home arrow Analyst4j arrow User Guide
Analyst4j - How to - Guide Print E-mail

Using Analyst4j - How to do

1. Analyze

2. Accessing Views & Perspectives

3. Search using Metrics

4. Quality Analysis Perspective

5. Custom Analysis based on search queries

6.[** New] Quality Analysis - Version Comparison
7.[** New] Search View

Analyze 

Analyst4j has an independent powerful static code analysis engine for Java, it is designed to work on any fragments of Java source files. Create a Java Project in Eclipse JDT environment, import your sources and start analyzing. Works even if there are missing dependencies.

It is necessary to analyze your sources to use the features of Analyst4j. To analyze

1.) Bring up the context menu of "Package Explorer View" by right clicking on the <Project> node and choose "Analyst4j->Analyze".

A4j Analyze

2.) Selective analysis: You can choose to analyze selected files/packages. While analyzing all sources is advisable you may need this feature when you want to eliminate unwanted packages/files such as "unit testing" packages. When you decide your selection, click "Finish" to initiate the analysis.

Selection

Progress

3.) Upon completion, an overall statistics report is displayed along with time taken and other info. The information would accessible using the menu option "Analyze->View Last Analysis Report".

Report

4.) Now Analyst4j would be ready to answer your queries. 

 

Analys4j Perspectives & Views

To open a "QA Perspective" or any of Analyst4j view use the "Analyst4j" Menu in Eclipse Main Menu.

A4j Menu

Search using metrics

1.) To perform a search using software metrics, Choose "Analys4j - Search" or Eclipse "Search" tool bar button to bring up the search dialog.

Search Dialog

 2.) Create new query

   Choose "--New Search--" in the combo box labeled "New / Load Search".

   Choose the "Project To Search"

   Choose the level of items to search [ Method or Class or File or Package]

   In the "Custom Search" table,

   Click on the first row and first column, to avail a drop down of possible measurement of the level chosen.

   Form your query and press "Search" when done.

   Analyst4j runs your query against the analyzed data and find the items that matches your query.

Search Results View

3.) Edit  query / remove a condition in the query

   Load the save query by choosing the query in "New / Load Search" combo box.

   The system loads your query in the "Custom Search" table.

   Modify the query as you see fit. 

   To remove a row (condition), click on the first column of the row(Metrics column) and press "Delete" key.

    Click "Search" when you are done, to see the matching resources in the search results page.

4.) Save query / Copy results to clipboard / Add matches to "Tasks View".

Save Search

5.) Delete saved query

To remove saved search queries use the "Remove Search" dialog accessible via the menu option "Analyst4j -> Remove Search".

The dialog displays a list of saved search queries and their respective in "Custom Analysis" which uses the query. Removing a query which is used in a "Custom Analysis" is not allowed.

Remove Query

Quality Analysis Perspective

1.) Open QA Perspective

 Open QA Perspective

Analyst4j Quality Analysis Perspective

QA Perspective

 2.) Visualize an Analysis.

In "Quality Analysis View" of QA Perspective, expand the treeview and choose the analysis (Double Click) to visualize the graph for the analysis. Optionally "Right Click" on the analysis node, brings up a popup menu to choose from the type of chart(usually Line,Scatter,Bar or Pie charts). 

QA View

Visualize Analysis

 3.) Customize Categories

Click open "Edit Categories" in the visualization view, modify the category name, range values and click "Update" when done. The graph is refreshed immediately to reflect your changes and the changes are permanently stored.

Edit Categories

 4.) List and locate matching cases of an analysis

Make sure "QA Cases View" is visible and click on "Graph" to list the cases matching the category / graph element.

QA Cases View

5.) Generate report / Copy matching cases to Clipboard / Add matches to "Task View".

"Quality Analysis View" Pop Menu

Generate Report

"Visualization View" Coolbar options

 Generate Report

"QA Cases View" Toolbar options

Generate Reports

 

Custom Analysis based on search queries

1.) Create new analysis

In the "Quality Analysis View", "Right Click" on "Custom Analysis" node to bring a popup menu "Define Chart/ Custom Analysis".

Define Custom Analysis

2.) Edit / Define custom analysis

Define New Analysis

3.) Visualize Custom Analysis Distribution

" Right Click" on a custom analysis definition, to bring up a popup menu, choose "Distribution -> <Metrics>"

Custom Analysis Distribution

6. Quality Analysis - Version Comparison

  • 1.Create two or more project in Eclipse JDT and Import different version of the same system, Analyze all projects one by one.
  • Projects
  • 2.Switch to "Quality Analysis - Perspective" and select a Project in the "QA Scope View".
  • QA Scope View
  • 3.The above action lists available analysis in the "QA Analysis View". Right Click on any Analysis -> Choose "Across Analyzed Projects" in the context menu.
  • Version Comparison
  • 4. Select the versions for which you want to plot a comparison graph.
  • Version Comparison
  • Click "Ok" to generate the graph.
  • CBO Vs RFC

7. Search View

Search view lists the saved search queries ,open the "Search View" from Eclipse Main Menu "Analyst4j -> Search View".

Open Search View

7.1 Multi Project Search

1. Open "Search View". Right Click on a "Saved Search Definition Node", Choose "Across Analyzed Projects" in the context Menu.

Search Projects

2. Select one or more projects.

Multi Project Search

3.) Click "Ok" to visualize the results as graph.

Search Results

 

7.2 Visualize Problem Markers for Search Results 

Show / Hide the problem markers for the search results, using the toolbar button in the graph.

Viz Markers

Problem markers visualization : Sample 

 Viz Markers

 
< Prev