Other Reports

Include Analysis

The Include Analysis report shows the dependencies between a file and its directly or transitively included header files. For each of the symbols used in a particular file, the report determines what other symbol definitions / declarations are necessary, and then analyzes how these definitions / declarations are picked up through the inclusion of header files.

By helping you analyze the Include Analysis report enables you to optimize #include hierarchies, improve compiler times, and make code reuse easier.

Similar Functions

The Similar Functions report finds functions that have name and/or structure-based similarities. This information supports refactoring efforts that try to consolidate similar code. Identification of similar functions is also useful when checking whether bug fixes to one function might apply elsewhere.

Function similarity is determined by a formula that combines similarity scores for function names, cross-reference fanouts, and a set of metrics. For any two functions, name similarity is calculated without considering case in the name strings. Fanout similarity is based on the overlap of functions called by the two functions. Metrics similarity considers three metrics - McCabe Cyclomatic Complexity, Halstead Program Difficulty, and Number of Statements. The metrics similarity score reflects the least similar metric.

The formula that combines these individual similarity scores can be user specified. By default, the report lists functions that have either 90% similar name and 90% similar fanout, or 90% similar name and 90% similar metrics values, or 90% similar fanout and 90% similar metrics values. Through the Similarity Formula dialog, this formula can be changed.

The report can be run in two ways, When it's invoked through the Reports menu, it checks for all functions in the project for similar functions. In this case, minimum values can be defined for the name lengths, cross reference fanout and McCabe Cyclomatic Complexity, so that functions with little content are not considered.

Alternatively, functions similar to any specific function can be identified by running the Similar Functions report through the Analyze dialog. This dialog selection is available whenever the Analyze dialog is focused on a non-library function.

Reflection Analysis

The Reflection Analysis report invokes an advanced analysis of Java method calls made through the reflection API (java.lang.reflect). The analysis locates all calls to "invoke()" in the project and then attempts to trace back to the methods that have been selected as the target for that dynamic call. The report lists any locations of invoke() where the analysis was unable to determine the method selected. This report and the associated analysis are only available for Java projects.

Once the report has been run, the analysis results are integrated with the current session's database. Dynamic calls relationships are added between the location where the method was selected (the so-called requester of the dynamic call) and the targets. These relationships can be visualized in the Graph window; any of the views that show normal calls relationships also show dynamic calls.

JNI Calls Analysis

The JNI Call Analysis identifies possible calls from Java to C/C++ code based on JNI (Java Native Interface). It can be used in Java only projects where it reports all methods considered native. It can also be used in mixed Java - C/C++ projects where it finds all C/C++ functions that are registered by JNI API calls to be called from Java. It then associates the Java methods and C/C++ functions where possible based on JNI rules for matching them by qualified name and signature or by registration string.

The JNI Call Analysis report lists all Java methods and C/C++ JNI functions and which associations have been made. Running this report does not impact Imagix 4D's representation of your source code.

The analysis is automatically conducted at the time the source code is loaded into the project. The call relationships from the Java function to the matching C/C++ function are incorporated in the project database, and are available for visualization and dependency analysis. Running the report simply provides an inventory of those relationships.