Java Support Guide

Previous Next

Java Support Guide
Java Support Guide
This guide describes Modernization Workbench (MW) support for the Java programming language (Java Language Specification 2). It includes a summary of supported tools, support notes and known limitations, and reference tables that describe the Java object (Level 1) and construct (Level 2) models created by the MW parser.
The following topics are discussed:
Supported Tools
Support Notes
Modeling Support in MW
Previous Next

© Copyright 2010 Micro Focus (IP) Limited. All Rights Reserved.


Supported Tools

Java Support Guide : Supported Tools
Supported Tools
Table 1‑1 describes the Repository-level tools and HyperView panes which are supported for Java. For details about a specific MW tool, see the workbench documentation set.
Table 1‑1
Supported MW Functionality
Area of MW Supported
Support Notes
Inventory
Java Files are registered into workspaces with default extensions:
Java File = .java
Verification
Java Files are verified to populate the repository. In the workspace options for Java, users have the ability to point to external Java class files or jar files necessary for compilation.
Inventory Report
Full support
Verification Report
Full support
Reference Reports
Unreferred Report
Unresolved Report
Cross-Reference Report
External Reference Report
Executive Report
Inventory Details and Repository Statistics only.
Complexity Metrics
Full support
Effort Estimation
Full support
Diagrammer
Full support
Quick Diagrammer
Full support
Decision Resolution
Boundary decisions can be resolved to targets.
Hyperview Source Pane
Full support
Hyperview Context Pane
Full support
Hyperview Clipper Pane
Full support
Hyperview Advanced Search
Perform searches on individual Java files rather than project-wide searches.
Hyperview Model Pane
Includes descriptions of the Java HyperCode constructs and their attributes.
Hyperview Bird's Eye Pane
Full support
Business Rule Manager
Includes the ability to create business rules manually or from Clipper lists. Autodetection of rules is not supported with this release.


Support Notes

Java Support Guide : Support Notes
Support Notes
This section contains general support information and known limitations for Java in this release.
Note:
Be sure to check the workbench release notes for late-breaking issues not available at press time.


Required User Preferences for Java

Java Support Guide : Support Notes : Required User Preferences for Java
Required User Preferences for Java
Follow these instructions to set required user preferences for Java support.
In the Tools menu, choose User Preferences. The User Preferences window opens. Click the Environment tab. In the Path to JRE Folder field, enter the path to the folder for the Java Runtime Environment (JRE) on your machine. You can enter the path manually or use the browse button to browse for the folder. If no path is entered, the current version specified in the Windows registry is used. You must use JRE version 1.5 or later.
Note:
If your application was compiled with a previous version of the JRE, you can override this setting by specifying the path to the rt.jar file used to compile the application on the Settings tab for Java files in workspace verification options.


Required Workspace Options for Java

Java Support Guide : Support Notes : Required Workspace Options for Java
Required Workspace Options for Java
The following sections describe workbench options required for successfully registering and verifying Java source files. For detailed instructions on setting these and other options required for all languages, see Preparing Projects in the workbench documentation set.


Boundary Decisions

Java Support Guide : Support Notes : Required Workspace Options for Java : Boundary Decisions
Boundary Decisions
You must specify boundary decisions in the Workspace Options dialog. See Preparing Projects in the workbench documentation set for details.


Workspace Verification Options

Java Support Guide : Support Notes : Required Workspace Options for Java : Workspace Verification Options
Workspace Verification Options
Follow these instructions to set required workspace verification options for applications that use external .java files or Java Archive (JAR) files.
Choose Workspace Options in the Tools menu. The Workspace Options window opens. Click the Verification tab, then the Settings tab.
In the Source Type pane, select Java File, then specify the locations of the external .java files or JAR files:
•
For external .java files, right-click in the adjacent pane and choose Add in the pop-up menu to specify a file. Right-click and choose Add Folder to specify a folder.
•
For JAR files or Zip files containing .java files, select Include Jar/Zip Files From Directories, then right-click in the adjacent pane and choose Add in the pop-up menu to specify a file. Right-click and choose Add Folder to specify a folder.
Folders are searched recursively. Delete a file or path by right-clicking it and choosing Delete in the pop-up menu.
Note:
If the workspace contains an application compiled with a version of the JRE earlier than 1.5, specify the path to the rt.jar file used to compile the application. The path specified here overrides the JRE path set in User Preferences.


Modeling Support in MW

Java Support Guide : Modeling Support in MW
Modeling Support in MW
MW is a model-based technology that generates information about legacy applications at two levels:
•
Level 1 (or object-level) information describes the relationships between the objects that comprise an application: program source files, header files, and so forth.
•
Level 2 (or construct-level) information describes the relationships between the abstract syntactical constructs that comprise an object: sections, paragraphs, statements, conditions, variables, and so forth.
At both levels, the models are conceived as Entity Relationship Diagrams (ERDs). Each object or construct the parser generates is modeled as an entity in one of the diagrams. The models are represented in tree form to the end user.


Level 1 Modeling Support for Java

Java Support Guide : Modeling Support in MW : Level 1 Modeling Support for Java
Level 1 Modeling Support for Java
The Level 1 model for an application defines the relationships between the objects that comprise the application. These can be physical objects, like Java files or packages, or logical objects that identify abstract program elements (methods, constructors, Java classes, and the like).


Level 1 Metamodel

Java Support Guide : Modeling Support in MW : Level 1 Modeling Support for Java : Level 1 Metamodel
Level 1 Metamodel
Every entity the parser generates is an instance of an entity type. The Level 1 metamodel defines these types, or meta-entities, and their relationships. Figure 1‑1 shows the Level 1 metamodel.
Note:
The Level 1 metamodel is also referred to, in OMG terms, as the Knowledge Discovery Metamodel (KDM).
Figure 1‑1
Level 1 Metamodel
Click image to expand


Level 1 Model Table

Java Support Guide : Modeling Support in MW : Level 1 Modeling Support for Java : Level 1 Model Table
Level 1 Model Table
Table 1‑2 shows the objects in the Level 1 metamodel and their relationships.
Table 1‑2
Level 1Model Table
Objects
Relationships
Java Annotation
Contains Class
Contains Interface
Contains Enumeration
Contains Annotation
Java Class
Has Method
Has Java Class
Has Java Interface
Calls Decision
Calls Java Method Decision
Invokes Method
Invokes Service Decision
Inserts Table Decision
Reads Table Decision
Updates Table Decision
Deletes Table Decision
Inserts Queue Decision
Reads Queue Decision
Sends Message Decision
Receives Message Decision
Inserts Log Decision
Extends Java Class
Implements Java Interface
Java Enumeration
Contains Class
Contains Interface
Implements Interface
Contains Enumeration
Contains Annotation
Has Method
Invokes Method
Is Invoked By Java Enumeration
Java File
Defines Java Class
Defines Java Interface
Java Interface
Has Method
Has Java Interface
Extends Java Interface
Java Package
Contains Java File
Method
N/A
Decision
N/A


Level 1 Relationship Projections

Java Support Guide : Modeling Support in MW : Level 1 Modeling Support for Java : Level 1 Relationship Projections
Level 1 Relationship Projections
The following tables describe relationships generated by Java statements in the Level 1 model.
JAVAPACKAGE Relationship Projections
Table 1‑3
JAVAPACKAGE Relationship Projections
Format
Relationship
Entities
Example/Notes
IMPORT
package <qualified name of package>
JAVAPACKAGE
Contains
JAVAFILE
JAVAFILE:
Name=<javapackage_name>
JAVAFILE Relationship Projections
Table 1‑4
JAVAFILE Relationship Projections
Format
Relationship
Entities
Example/Notes
DEFINE
JAVACLASS
class <simple name of class>{}
JAVAFILE
Defines
JAVACLASS
JAVACLASS:
Name=<javaclass_name>
DEFINE
JAVAINTERFACE
interface <simple name of interface>{}
JAVAFILE
Defines
JAVAINTERFACE
JAVAINTERFACE:
Name=<javainterface_name>
JAVACLASS Relationship Projections
Table 1‑5
JAVACLASS Relationship Projections
Format
Relationship
Entities
Example/Notes
CALLS
METHOD DECISION
class <class_name>
{
<expression>
}
JAVACLASS
Calls
METHOD DECISION
Class.Name=<class_name>
Method_Decision.Name=<internal_name>
CONTAINS
JAVACLASS
class <simple name of class>{}
JAVACLASS
Has
JAVACLASS
JAVACLASS:
Name=< javaclass _name>
CONTAINS
JAVAINTERFACE
Interface <simple name of interface>{}
JAVACLASS
Has
JAVAINTERFACE
JAVAINTERFACE:
Name=< javainterface _name>
DELETES
TABLE
DECISION
class <class_name>
{
<expression>
}
JAVACLASS
Deletes
TABLE
DECISION
Class.Name=<class_name>
Table _Decision.Name=<internal_name>
EXTENDS
JAVACLASS
extends <simple or qualified name of class>{}
JAVACLASS
Extends
JAVACLASS
JAVACLASS:
Name=< javaclass _name>
HAS
METHOD
<method name>([list of parameters])
JAVACLASS
Has
METHOD
METHOD
Name=< method _name>:
IMPLEMENTS
JAVAINTERFACE
implements <simple or qualified name of interface>{}
JAVACLASS
Implements
JAVACLASS
JAVAINTERFACE:
Name=< javainterface _name>
INSERTS
LOG
DECISION
class <class_name>
{
<expression>
}
JAVACLASS
Inserts
LOG
DECISION
Class.Name=<class_name>
Message _Decision.Name=<internal_name>
INSERTS
QUEUE
DECISION
class <class_name>
{
<expression>
}
JAVACLASS
Inserts
QUEUE
DECISION
Class.Name=<class_name>
Queue_Decision.Name=<internal_name>
INSETRS
TABLE
DECISION
class <class_name>
{
<expression>
}
JAVACLASS
Incerts
TABLE
DECISION
Class.Name=<class_name>
Table_Decision.Name=<internal_name>
INVOKES
SERVICE DECISION
class <class_name>
{
<expression>
}
JAVACLASS
Invokes
SERVICE DECISION
Class.Name=<class_name>
Service_Decision.Name=<internal_name>
INVOKES
METHOD
class < simple name of class >
{
< method name >([list of parameters]);
}
JAVACLASS
Invokes
METHOD
JAVACLASS:
Name=< javaclass _name>
METHOD
Name=< method _name>:
READS
QUEUE
DECISION
class <class_name>
{
<expression>
}
JAVACLASS
Reads
QUEUE
DECISION
Class.Name=<class_name>
Queue _Decision.Name=<internal_name>
READS
TABLE
DECISION
class <class_name>
{
<expression>
}
JAVACLASS
Reads
TABLE
DECISION
Class.Name=<class_name>
Table _Decision.Name=<internal_name>
RECEIVES
MESSAGE
DECISION
class <class_name>
{
<expression>
}
JAVACLASS
Receives
MESSAGE
DECISION
Class.Name=<class_name>
Message _Decision.Name=<internal_name>
SENDS
MESSAGE
DECISION
class <class_name>
{
<expression>
}
JAVACLASS
Sends
MESSAGE
DECISION
Class.Name=<class_name>
Message_Decision.Name=<internal_name>
UPDATES
TABLE
DECISION
class <class_name>
{
<expression>
}
JAVACLASS
Updates
TABLE
DECISION
Class.Name=<class_name>
Table _Decision.Name=<internal_name>


Complexity Metrics

Java Support Guide : Modeling Support in MW : Level 1 Modeling Support for Java : Complexity Metrics
Complexity Metrics
Table 1‑6 describes the industry standard and workbench-generated complexity metrics supported by the legacy estimation tools. Not all metrics will be available for your configuration.
Table 1‑6
Complexity Metrics
Metric
Object Types
Description
Absolute Complexity
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Binary Decisions divided by the number of statements.
Abstract Classes
Java Package, Java File
Number of abstract classes and interfaces.
Abstract Methods
Java Package, Java File
Number of abstract methods.
Abstractness
Java Package
Ratio of Number of Abstract Classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package.
Afferent Coupling
Java Package
Number of other packages that depend on classes in the package. An indicator of the package’s responsibility.
Areas
DMS DDL File, IDMS Schema File, IDMS Subschema
Number of areas.
Asynchronous Calls
Program
Number of asynchronous calls, such as Cobol INITIATE statements.
Average Absolute Complexity
Java Class, Java Interface, Java Package, Java File
Average Absolute Complexity of methods.
Average Binary Decisions
Java Class, Java Interface, Java Package, Java File
Average Binary Decisions of methods.
Average Catch Clauses
Java Class, Java Interface, Java Package, Java File
Average Catch Clauses in methods.
Average Computational Statements
Java Class, Java Interface, Java Package, Java File
Average Computational Statements of methods.
Average Conditional Complexity
Java Class, Java Interface, Java Package, Java File
Average Conditional Complexity of methods.
Average Cyclomatic Complexity
Java Class, Java Interface, Java Package, Java File, PB Object
Average Cyclomatic Complexity of methods.
Average Depth of Inheritance Hierarchy
Java Package, Java File
Average Depth of Inheritance Hierarchy of classes and interfaces.
Average Essential Complexity
Java Class, Java Interface, Java Package, Java File
Average Essential Complexity of methods.
Average Extended Cyclomatic Complexity
Java Class, Java Interface, Java Package, Java File
Average Extended Cyclomatic Complexity of methods.
Average IF Statements
Java Class, Java Interface, Java Package, Java File
Average IF Statements in methods.
Average Lack of Cohesion Per Type
Java Package, Java File
Average Lack of Cohesion of classes and interfaces.
Average Loop Statements
Java Class, Java Interface, Java Package, Java File
Average Loop Statements in methods.
Average Maximum Switch Cases
Java Class, Java Interface, Java Package, Java File
Average Maximum Switch Cases in methods.
Average Nested Block Depth
Java Class, Java Interface, Java Package, Java File, PB Object
Average Nested Block Depth of methods.
Average Parameters
Java Class, Java Interface, Java Package, Java File, PB Object
Average Parameters in methods.
Average Specialization Index Per Type
Java Package, Java File
Average Specialization Index of classes and interfaces.
Average Subtypes
Java Package
Average Subtypes in methods.
Average Switch Cases
Java Class, Java Interface, Java Package, Java File
Average Switch Cases in methods.
Average Switch Statements
Java Class, Java Interface, Java Package, Java File
Average Switch Statements in methods.
Average Unique Method Calls
Java Class, Java Interface, Java Package, Java File
Average Unique Method Calls in methods.
Binary Decisions
Java Method, PB Method, Program, VB Function, VB Method,
C/C++ Function, C++ Member Function
Number of branching conditions in the flow graph with two possible outcomes. Includes statements with implicit condition evaluation (loops, AT END, and so on).
Blank Lines
All source files
Number of blank lines of source (sequence number area content is ignored).
Catch Clauses
Java Method, PB Method
Number of catch clauses.
Classes
VB Library
Number of classes.
Columns
DDL File
Number of columns.
Comment Lines
PL/I File, PL/I Include File
Number of lines of source containing comments only and no code.
Comments Ratio
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, PB Method, PB Object
Number of Comments divided by Lines of Code.
Computational Statements
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Number of statements performing arithmetic calculations.
Conditional Complexity
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Binary Decisions plus Unique Operands in Conditions.
Conditional Statements
Program
Number of branching statements with nested statements executed under certain conditions, not including conditional GOTOs.
Constructors
C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, PB Method, PB Object
Number of constructors.
Control Cards Usages
JCL File, JCL Procedure
Number of DD statements referencing control cards identified in Legacy.xml to generate program to control card relationships.
Cyclomatic Complexity
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
v(G) = e - n + 2, where v(G) is the cyclomatic complexity of the flow graph (G) for the program in question, e is the number of edges in G, and n is the number of nodes. Quantity of decision logic. The number of linearly independent paths (minimum number of paths to be tested). v(G) = DE + 1, where DE is the number of binary decisions made in the program.
Data Elements
Copybook File, Program
Number of declared data items (elementary structures and their fields). For PL/I, the implicit variable DFHEIBLK for CICS statements is counted as a data element.
Data Members
C++ Class
Number of data members.
Data Sets
DMSII Database
Number of data sets.
Dead Data Elements
Program
Number of dead data elements in programs and used include files. Dead data elements are unused structures at any data level, all of whose parents and children are unused. For PL/I, number of declared data items in dead internal procedures.
Dead Data Elements from Includes
Program
Number of dead data elements in include files. Dead data elements are unused structures at any data level, all of whose parents and children are unused. For PL/I, N/A.
Dead Lines
Program
Number of dead lines in programs and used include files. Dead lines are source lines containing Dead Data Elements or Dead Statements. For Cobol, also source lines containing “dead constructs.” For more information on dead constructs, see the Parser Reference Manual.
Dead Lines from Includes
Program
Number of dead lines in include files. Dead lines are source lines containing Dead Data Elements from Includes or Dead Statements from Includes. For Cobol, also source lines containing “dead constructs.” For more information on dead constructs, see the Parser Reference Manual.
Dead Statements
Program
Number of dead statements in programs and used include files. A dead statement is a procedural statement that can never be reached during program execution. For PL/I, dead DECLARE statements are not calculated as dead statements.
Dead Statements from Includes
Program
Number of dead statements in include files. A dead statement is a procedural statement that can never be reached during program execution.
Depth of Inheritance Hierarchy
C++ Class, Java Class, Java Interface, PB Object
Maximum nesting of the inheritance hierarchy.
Destructors
C++ Class, VB Class
Number of destructors.
Difficulty
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
D = (n1 / 2) * (N2 / n2), where n1 is Unique Operators, N2 is Operands, and n2 is Unique Operands.
Disjoint Data Sets
DMSII Database
Number of disjoint data sets.
Efferent Coupling
Java Package
Number of other packages that the classes in the package depend on. An indicator of the package’s independence.
Entry Points
Program
Number of program entry points.
Error Estimate
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
B = E**(2/3) / 3000, where E is Programming Effort.
Essential Complexity
C/C++ Function, C++ Member Function, Java Method, PB Method, Program
Quantity of unstructured logic (a loop with an exiting GOTO statement, for example). v(G) for reduced graph without D-structured primes.
Exception Handling Statements
C/C++ Function, C++ Member Function, VB Function, VB Method
Number of exception handling statements.
EXEC Cataloged Procedure Steps
JCL File, JCL Procedure
Number of EXEC statements invoking cataloged procedures.
EXEC In-stream Procedure Steps
JCL File, JCL Procedure
Number of EXEC statements invoking instream procedures.
Executable Statements
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
All Cobol Procedure Division statements, plus CONTINUE and NEXT STATEMENT. All PL/I statements, except BEGIN, DECLARE, DO (block), END, ENTRY, PACKAGE, and PROCEDURE. All Natural statements, except DEFINE DATA and IGNORE. For object-oriented languages, all assignments, function calls (alone on a line), calls, returns, IF, DO, FOR, CHOOSE, EXIT, CONTINUE, and GOTO statements.
Extended Cyclomatic Complexity
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Cyclomatic Complexity plus Logical Operators in Conditions. Number of all paths in the program.
Fields
AS/400 Database File, Java Class, Java Interface, Java Package, Java File, PB Object, VB Class
Number of fields.
Fields of Adabas File Number
Natural DDM File
Number of fields of Adabas file number.
Foreign Keys
DDL File
Number of foreign keys.
Function Calls
C/C++ Function, C++ Member Function, VB Function, VB Method
Number of function calls.
Function Points
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, VB Class, VB Function, VB Method
Lines of Code divided by K, where K depends on the language: Cobol=77, Natural=52, PL/I=67, PowerBuilder=24. For RPG, Lines of Code/K + 0.5, where K=61. Estimate of the number of end-user business functions implemented by the program.
Functions
VB Library
Number of functions.
Global Data Items
DMSII Database
Number of global data items.
GoTo Statements
C/C++ Function, C++ Member Function, Program, VB Function, VB Method
Number of GOTO statements, including conditional GOTOs.
Hidden Fields
Map
Number of hidden fields.
IF Statements
C/C++ Function, C++ Member Function, Java Method, PB Method, VB Function, VB Method
Number of IF statements.
Import Statements
Java Package, Java File
Number of import statements.
Include Copybook Statements
APS File, APS Include File
Number of include copybook statements.
Include Data Structure
APS Application
Number of included data structures.
Include DDI
APS Application
Number of included DDIs.
Include DDL/PSB
APS Application
Number of included data definitions.
Include Global Data Area Statements
Natural File, Natural Subroutine File
Number of included global data area statements.
Include Local Data Area Statements
Natural File, Natural Subroutine File
Number of included local data area statements.
Include Macro Statements
APS File, APS Include File
Number of included macro statements.
Include Macro/Copybook
APS Application
Number of included macros/copybooks.
Include Parameter Data Area Statements
Natural File, Natural Subroutine File
Number of included parameter data area statements.
Include Program
APS Application
Number of included programs.
Include Report
APS Application
Number of included reports.
Include Resource Statement
Copybook File, Cobol File (ACUCOBOL only)
Number of included resource statements.
Include Screen
APS Application
Number of included screens.
Include Statements
All source files, except DDL File, Java Interface, Java File, PB Object
Number of language-specific include statements.
Inherited Methods
C++ Class, VB Class
Number of inherited methods.
Inner Call Statements
Program
Number of statements that invoke Inner Procedures.
Inner Procedures
Program
Number of structured pieces of code that cannot be invoked from external programs (Cobol paragraphs, inner PL/I procedures, Natural inline subroutines).
Input Fields
Map
Number of input fields.
Input/Output Fields
Map
Number of input/output fields.
Instability
Java Package
Ratio of Efferent Coupling (Ce) to total coupling (Ce + Ca), such that I = Ce / (Ce + Ca). An indicator of the package’s resilience to change.
Intelligent Content
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
I = L * V, where L is Program Level and V is Program Volume. Complexity of a given algorithm independent of the language used to express the algorithm.
Interfaces
Java Class, Java Interface, Java Package, Java File
Number of interfaces.
IO Statements
Program
Number of statements performing input/output operations.
Key Fields
AS/400 Database File
Number of key fields.
Labels
C/C++ Function, C++ Member Function, VB Function, VB Method
Number of labels.
Lack of Cohesion
Java Class, Java Interface
LOCM = (m - sum(mA)/a1+a2) / (m-1), where mA is the number of methods that access class attributes.
Lines of Code
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of lines of code, including copybooks (if applicable), but not including comments and blank lines.
Lines with Both Comments and Code
PL/I File, PL/I Include File
Number of lines of source containing both comments and code.
Lines with Comments
All source files, except PL/I, PL/I Include, and Java Files
Number of lines of source containing comments, including inline comments placed on lines with statements.
Local Data Items
C/C++ Function, C++ Member Function, VB Function, VB Method
Number of local data items.
Logical Operators in Conditions
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, VB Class, VB Function, VB Method
Number of binary logical operators used in conditions.
Logical Records
IDMS Subschema File
Number of logical records.
Loop Statements
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Number of repetitively executing statements.
Macro Assignments
PL/I File, PL/I Include File
Number of assignments to global macro variables outside any macro procedure.
Macro Declarations
PL/I File, PL/I Include File
Number of global macro variables. Macro variables within macro procedures are not counted.
Macro Lines
PL/I File, PL/I Include File
Number of lines for include statements, macro invocations, declarations, macro procedures, and %-statements. Blank lines and comments lines are ignored.
Macro Procedures
PL/I File, PL/I Include File
Number of macro procedures declared in the file.
Macro Statements
PL/I File, PL/I Include File
Number of macro statements.
Maintainability Index
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
MI = 171 - 5.2 * ln (PgmVolume) - 0.23 * ExtCycComp - 16.2 * ln (LOC) + 50 * sin (sqrt (2.46 * CommentLines/SourceLines)), where PgmVolume is Program Volume, ExtCycComp is Extended Cyclomatic Complexity, LOC is Lines of Code, CommentLines is Comment Lines, and SourceLines is Source Lines.
Maps
Natural Map
Number of maps.
Maximum Depth of Logic Nesting
C/C++ Function, C++ Member Function
Maximum nesting of logic.
Maximum Switch Cases
C/C++ Function, C++ Member Function, Java Method, PB Method
Maximum Switch Cases.
Member Function Calls
C/C++ Function, C++ Member Function
Number of member function calls.
Member Functions
C++ Class
Number of member functions.
Method Calls
VB Function, VB Method
Number of method calls.
Methods
Java Class, Java Interface, Java Package, Java File, PB Object, VB Class
Number of methods.
Nested Block Depth
Java Method, PB Method
Maximum nesting of IF, CHOOSE, TRY, DO, SWITCH, or FOR constructs. 1 is added to the depth in the IF and ELSE parts of IF statements, the bodies of loops, and the code in each case of a Choose statement.
Nesting Level
Program, VB Function, VB Method
Maximum nesting of conditional statements within conditional statements (0 if no conditional statements, 1 if no nesting).
Non-returning Calls
Program
Number of non-returning calls, such as Cobol XCTL statements.
Normalized Distance
Java Package
Perpendicular distance of the package from the idealized line A + I = 1. An indicator of the package’s balance between abstractness and stability.
Number of Comments
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, PB Method, PB Object
For C/C++, number of items containing text preceded by // or enclosed between /* and */.
For Java, number of lines of source containing comments, including inline comments placed on lines with statements.
For PowerBuilder, number of lines of source containing comments only and no code.
Number of Controls
PB DataWindow
Number of controls.
Number of Entries
CSD File, FCT File, PCT File, Valtab File
Number of entries.
Number of Executes
ECL File
Number of executes.
Number of Lines
PB DataWindow, PB Query, PB Pipeline
Number of lines.
Number of PCBs
PSB File
Number of PCBs.
Number of Processor Calls
ECL File
Number of processor calls.
Omit Fields
AS/400 Database File
Number of Omit fields.
Operands
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of operand occurrences (N2). Operands are variables and literals used in operators. Compare Unique Operands.
Operators
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of operator occurrences (N1). Operators are executable statements and unary and binary operations. Compare Unique Operators.
Output Fields
Map
Number of output fields.
Overridden Methods
Java Class, Java Interface, Java Package, Java File
Number of overridden methods.
Parameters
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Number of Cobol Procedure Division USING...RETURNING parameters. Number of PL/I PROCEDURE parameters. Number of Natural PARAMETER and PARAMETER USING parameters. Otherwise, number of parameters in method calls.
Path Groups
IDMS Subschema File
Number of path groups.
Pointers
C/C++ Function, C++ Member Function, C++ Class, Program, VB Function, VB Method
Number of data elements declared as pointers.
Primary Keys
DDL File
Number of primary keys.
Program Length
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
N = N1 + N2, where N1 is Operators and N2 is Operands.
Program Level
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
L = 1 / D, where D is Difficulty.
Program Volume
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
V = N * log2(n), where N is Program Length and n is Vocabulary. Minimum number of bits required to code the program.
Programming Effort
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
E = V / L, where V is Program Volume and L is Program Level. Estimated mental effort required to develop the program.
Programming Time
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
T = E / 18, where E is the Programming Effort and 18 is Stroud’s Number. Estimated amount of time required to implement the algorithm, in seconds.
Public Data Members
C++ Class
Number of public data members.
Public Fields
VB Class
Number of public fields.
Public Member Functions
C++ Class
Number of public member functions.
Public Methods
VB Class
Number of public methods.
Records
ADL File, AS/400 Database File, DMS DDL File, IDMS Schema File, IDMS Subschema File
Number of records.
Remapped Data Sets
DMSII Database
Number of remapped data sets.
Response for Class
C++ Class, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object
Response for class.
Returning Calls
Program
Number of returning calls, such as Cobol CALL or LINK statements.
Screens
AS/400 Device Description, BMS File, DPS File, ICL Form, MFS File
Number of screens.
Segments
DBD File
Number of segments.
SELECT (SWITCH) Statements
VB Method
Number of SWITCH statements.
Select Fields
AS/400 Database File
Number of select fields.
Sets
ADL File, DMS DDL File, DMSII Database, IDMS Schema File, IDMS Subschema File
Number of sets.
Sliceable Dead Lines
PL/I Program
Number of Dead Lines that can be sliced using the Application Architect Dead Code Elimination method. Dead procedures containing either preprocessor statements or statements subject to macro preprocessor replacement are not counted as sliceable dead lines, since it is not always possible to determine whether they can be safely removed. Lines from include files are not counted.
Source Lines
All source files
Number of lines of source.
Specialization Index
Java Class, Java Interface
Number of subclasses divided by number of superclasses.
Static Data Items
C/C++ Function, C++ Member Function, VB Function, VB Method
Number of static data items.
Static Data Members
C++ Class
Number of static data members.
Static Fields
Java Class, Java Interface, Java Package, Java File, PB Object, VB Class
Number of static fields.
Static Functions
C++ Class
Number of static functions.
Static Member Functions
C++ Class
Number of static member functions.
Static Methods
Java Class, Java Interface, Java Package, Java File, VB Class
Number of static methods.
Steps
JCL File, JCL Procedure, Job
Number of steps.
Subsets
DMSII Database
Number of subsets.
Subtypes
Java Class, Java Interface, Java File, PB Object
Number of subtypes.
Switch Cases
C/C++ Function, C++ Member Function, Java Method, PB Method
Number of SWITCH cases.
Switch/Choose Statements
Java Method, PB Method
Number of SWITCH in Java, CHOOSE statements. in PowerBuilders.
SWITCH/SELECT Statements
C/C++ Function, C++ Member Function, VB Function
Number of SWITCH statements.
Tables
DDL File
Number of tables.
Total EXEC Cataloged Procedure Steps
JCL File
Number of EXEC statements invoking cataloged procedures in the job and invoked procedures. If a procedure is invoked multiple times, it is counted each time.
Total Include Copybook Statements
APS File, APS Include
Total number of include copybook statements.
Total Include Statements
Assembler File, BMS File, Cobol File, Copybook File, DMS II DASDL File, ECL File, JCL File, MFS File, Natural File, Natural Subroutine File, PL/I File, PSB File, RPG File, VB Project File, WFL File
Total Include Statements. For PL/I, all the include statements in the file and the used include files.
Unique Function Calls
C/C++ Function, C++ Member Function
Number of unique function calls.
Unique Member Function Calls
C/C++ Function, C++ Member Function
Number of unique member function calls.
Unique Method Calls
Java Method, PB Method, PB Object
Number of distinct method calls.
Unique Operands
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of distinct operands (n2). Operands are variables and literals used in operators. Uniqueness of literals is determined by their notation. Compare Operands.
Unique Operands in Conditions
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of distinct operands used in conditions.
Unique Operators
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of distinct operators (n1). Operators are statements and unary and binary operations. Compare Operators.
Unique System Macro Instructions
Assembler File
Number of unique system macro instructions.
Vocabulary
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
n = n1 + n2, where n1 is the number of Unique Operators and n2 is the number of Unique Operands.
Weighted Methods
Java Class, Java Interface, Java Package, Java File, PB Object
Number of weighted methods.


Level 2 Modeling Support for Java

Java Support Guide : Modeling Support in MW : Level 2 Modeling Support for Java
Level 2 Modeling Support for Java
The Level 2 model for an object defines its syntax. It shows in abstract form how the syntactical constructs that comprise the object (sections, paragraphs, statements, conditions, variables, and so forth) are related.


Level 2 Metamodel

Java Support Guide : Modeling Support in MW : Level 2 Modeling Support for Java : Level 2 Metamodel
Level 2 Metamodel
Each construct the parser generates is an instance of an entity type. The Level 2 metamodel defines these types, or meta-entities, and their relationships. Figure 1‑2 shows the Level 2 metamodel.
Note:
The Level 2 metamodel is also referred to, in OMG terms, as the Abstract Syntax Tree Metamodel (ASTM).
Figure 1‑2
Level 2 Metamodel
Click image to expand


Level 2 Model Table

Java Support Guide : Modeling Support in MW : Level 2 Modeling Support for Java : Level 2 Model Table
Level 2 Model Table
Table 1‑7 describes the relationships for constructs in the Level 2 metamodel. A construct that “inherits from” other constructs can be thought of in “child/parent” terms. The child construct inherits all attribute values and relationships of the parent.
Table 1‑7
Level 2 Model Table for Java
Construct
Relationships
Alternate Constructor Invocation
Inherits from Statement
Annotation Element Access
none
Array Access
Inherits from Expression
Inherits from Type Relation Abstraction
Array Creation
none
Array Initializer
none
Assert Statement
Inherits from Statement
Base Class Entity
Used As Type: used as type
Thrown: thrown
Extends: extends
Is Extended In: is extended
Implements: implements Java interface
Block Statement
Finalizes: used as finalized
Inherits from Statement
Break Statement
Inherits from Statement
Case Statement
In Switch: relation to Case block
Cast Expression
Inherits from Expression
Inherits from Type Relation Abstraction
Catch Clause
Catches: Catch block called
Class Instance Creation
Inherits from Expression
Inherits from Type Relation Abstraction
Conditional Expression
Inherits from Expression
Inherits from Type Relation Abstraction
Constant Usage
Inherits from Expression
Inherits from Type Relation Abstraction
Continue Statement
Inherits from Statement
Declaration Group
none
Do Statement
Inherits from Statement
Empty Statement
Inherits from Statement
Expression
Is Declared In: is declared in
Conditional Relation Of: conditional relation of
Is Updated: is updated
Inherits from Type Relation Abstraction
Expression Statement
Inherits from Statement
Field Access
Inherits from Expression
Inherits from Type Relation Abstraction
Formal Parameter Port
none
For Statement
Initalizes: initializes
Updates: updates
Inherits from Statement
If Statement
Then Branch: Statements to execute when a test is met
Else Branch: Default branch of a conditional
Inherits from Statement
Import Block
none
Import Declaration
none
Instance of Expression
Inherits from Type Relation Abstraction
Initializer
none
Java Annotation
none
Java Annotation Declaration
none
Java Annotation Element Declaration
none
Java Anonymous Class
Inherits from Base Class Entity
Java Class
Inherits from Base Class Entity
Java Compilation Unit
none
Java Enumeration
none
Java Interface
Is Implemented In: is implemented in
Inherits from Base Class Entity
Java Field Declaration
Inherits from Type Relation Abstraction
Inherits from Member Declaration
Java Method Declaration
Throws: throws
Inherits from Type Relation Abstraction
Inherits from Member Declaration
Java Variable Declaration
Inherits from Type Relation Abstraction
Labeled Statement
Inherits from Statement
Member Declaration
Inherits from Type Relation Abstraction
Method Invocation
Inherits from Expression
Inherits from Type Relation Abstraction
Package Declaration
none
Return Statement
Inherits from Statement
Statement
If Then Branch: reference to the IF Statement THEN branch containing statement.
If Else Branch: reference to the IF Statement ELSE branch containing statement.
Is Looped: loop body relation.
Loops: loop body relation.
Has Conditional Relation: has conditional relation
Switch Statement
Has Cases: relation to Case block.
Inherits from Statement
Synchronized Statement
Inherits from Statement
Throw Statement
Inherits from Statement
Try Statement
Has Finalizer: Relation to Finally block.
Has Catches: Relation to Catch block.
Inherits from Statement
Type Relation Abstraction
Of Type: of type
Declares: declares
Is Initialized: is initialized
Variable Usage
Inherits from Expression
Inherits from Type Relation Abstraction
While Statement
Inherits from Statement


Construct Attributes

Java Support Guide : Modeling Support in MW : Level 2 Modeling Support for Java : Construct Attributes
Construct Attributes
Table 1‑8 describes the attributes of constructs in the Java level 2 model.
Table 1‑8
Table of Attributes for Java
Attribute
Construct(s)
Attribute Description
Default
Case Statement
Boolean: is default
Modifiers
Java Class
Java Interface
Java Field Declaration
Java Method Declaration
Member Declaration
String: modifiers of the construct
Name
Base Class Entity
Class Instance Creation
Field Access
Java Anonymous Class
Java Class
Java Compilation Unit
Java Interface
Java Field Declaration
Java Method Declaration
Java Variable Declaration
Method Invocation
Variable Usage
String: name of the construct
PORTNAME
Formal Parameter Port
Enum: name that identifies the port
Primitive
Cast Expression
Java Field Declaration
Java Method Declaration
Java Variable Declaration
Member Declaration
Enum: primitive type of construct
The possible values of the attribute are:
byte
Value of primitive type byte short
Value of primitive type short char
Value of primitive type char int
Value of primitive type int long
Value of primitive type long float
Value of primitive type float double
Value of primitive type double boolean
Value of primitive type boolean void
Value of primitive type void
Not a primitive type
Qualified Name
Import Declaration
Package Declaration
String: qualified name of the construct
Value
Constant Usage
String: value of the constant


Asset Transformation Workbench Analyzer for Eclipse

Corporate Headquarters
International Business Machines Corporation
New Orchard Road
Armonk, New York 10504
Tel +1 (914) 499-1900

www.ibm.com

© 2006 International Business Machines Corporation
All rights reserved.
This document applies to IBM Asset Transformation Workbench (product number 5724-R03) and to all subsequent releases and modifications. For the latest information about this product, please refer to the Release Notes.
No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of IBM. Information in this document is subject to change without notice and is not guaranteed to be error-free.
Licensed Materials - Property of IBM.
Product Reference: IBM Asset Transformation Workbench v2.1
Document Reference: REL7.3DOC13.A

RescueWare is a registered trademark of Relativity Technologies, Inc. All other brands mentioned in this document are trademarks or registered trademarks of their respective holders.

www.relativity.com


Relativity Modernization Workbench Copyright Page

Corporate Headquarters
Relativity Technologies
2300 Rexwoods Drive
Suite 100
Raleigh, NC 27607
Tel +1 (919) 786-2800
Fax +1 (919) 786-2850

www.relativity.com

© 2005-07 Relativity Technologies
All rights reserved.
Printed in the United States of America.

RescueWare is a registered trademark of Relativity Technologies, Inc. All other brands mentioned in this document are trademarks or registered trademarks of their respective holders.

The software supplied with this document is the property of Relativity Technologies and is furnished under a license agreement. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Relativity Technologies, Inc. Information in this document is subject to change without notice and is not guaranteed to be error-free.

For the latest information about this product, please refer to the Release Notes.


Relativity Modernization Workbench Copyright Page

Corporate Headquarters
Relativity Technologies
2300 Rexwoods Drive
Suite 100
Raleigh, NC 27607
Tel +1 (919) 786-2800
Fax +1 (919) 786-2850

www.relativity.com

© 2005-06 Relativity Technologies
All rights reserved.
Printed in the United States of America.

RescueWare is a registered trademark of Relativity Technologies, Inc. All other brands mentioned in this document are trademarks or registered trademarks of their respective holders.

The software supplied with this document is the property of Relativity Technologies and is furnished under a license agreement. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Relativity Technologies, Inc. Information in this document is subject to change without notice and is not guaranteed to be error-free.

For the latest information about this product, please refer to the Release Notes.


Java.1.10.1.html

Java Support Guide : Modeling Support in MW : Level 1 Modeling Support for Java : Level 1 Metamodel


Java.1.15.1.html

Java Support Guide : Modeling Support in MW : Level 2 Modeling Support for Java : Level 2 Metamodel


Java-1004259.html

The Level 1 model for an application defines the relationships between the objects that comprise the application. These can be physical objects, like Java files or packages, or logical objects that identify abstract program elements (methods, constructors, Java classes, and the like).


Java-1004302.html

The Level 2 model for an object defines its syntax. It shows in abstract form how the syntactical constructs that comprise the object (sections, paragraphs, statements, conditions, variables, and so forth) are related.