You are on page 1of 154

Instructor:

Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.1
Chapter 4
CVS, Logiscope, McCabe, JDeodorant,
MARFCAT
Project Tool Support
SOEN 6471, Summer 2014
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
Department of Computer Science
and Software Engineering
Concordia University
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.2
Outline
1 CVS
2 CVS and Eclipse
3 Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
4 McCabe
Overview
Tool Views, Usage, and Metrics
5 JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
6 MARFCAT
Introduction
Classication
Data Sets and Sample Results
Summary
Running Experiments
7 References
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.3
Outline
1 CVS
2 CVS and Eclipse
3 Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
4 McCabe
Overview
Tool Views, Usage, and Metrics
5 JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
6 MARFCAT
Introduction
Classication
Data Sets and Sample Results
Summary
Running Experiments
7 References
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.4
CVS Instructions
Sleiman Rabah


1
s_rabah@encs.concordia.ca
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.5
CVS Concepts
A repository: is the root folder that contains CVS
module(s)

A module: is a top-level directory where your
project files and directories are stored.

A working directory: is a local copy of a CVS
module. It is a local copy (on a system of your
project files and directories



2
s_rabah@encs.concordia.ca
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.6
Requirements
You must use a group account that has been
provided to you by the professor.

One and only one member can create a repository.

All members within the same group will benefit
from accessing/controlling the same repository.

Make sure the module (the root of the repository)
is writable by the group.


3
s_rabah@encs.concordia.ca
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.7
Remote Login
Since the CVS repository is hosted on a UNIX server,
accessing it is done remotely.

Telnet and FTP are disabled in ENCS environment
(insecure, not encrypted).

You should use a secure communications for remote
login (SSH client) and secure file transfer (SFTP/SCP
client).

Host name to be used: login.encs.concordia.ca


4
s_rabah@encs.concordia.ca
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.8
Remote Login contd
File transfer:

Upload files to a personal/group account (if you are working from
home)
WinSCP
http://winscp.net/eng/index.php
FileZilla (make sure you select SFTP in Site Manager)
http://filezilla-project.org/

SSH remote login

You should know some Unix/Linux like Command line
Putty
http://www.chiark.greenend.org.uk/~sgtatham/putty/

5
s_rabah@encs.concordia.ca
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.9
Remote Login contd
Login using Putty


6
Accept the security key
s_rabah@encs.concordia.ca
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.10
Remote Login contd
After a successful login, note the initial path
which is your home directory
/home/first_letter_of_your_username/your_username



7
s_rabah@encs.concordia.ca
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.11
Creating the Repository
To create the repository
Assuming you are logged in to grace server:

1. Point to your group location .
1. Your group location is under /groups partition.
2. You should know the group Path
1. E.g, if your shared directory is named vg_soen6441_4, its path would
be /groups/v/vg_soen6441_4
3. Create a directory called cvs_repository
4. Set the sticky s bit for the repository folder (chmod 2770) (*)
5. Execute the CVS init command

*Only the directory owner or the super user can rename or delete files.




8
s_rabah@encs.concordia.ca
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.12
Creating the Repository contd
Commands to be used

9
[grace] [/home/s/rabah] > cd /groups/v/vg_soen6441_4
[grace] [/home/s/rabah] > mkdir /groups/v/vg_soen6441_4/cvs_repository
[grace] [/home/s/rabah] > chmod 2770 /groups/v/vg_soen6441_4/cvs_repository/
[grace] [/home/s/rabah] > cvs -d /groups/v/vg_soen6441_4/cvs_repository init
s_rabah@encs.concordia.ca
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.13
Importing File to Your Repository
Steps:
Upload the project source folder to your ENCS
account
Go to that folder then start to import
Assuming that your project folder named
my_cvs_project






10
Commands:
[grace] [/home/s/rabah] > cd /home/s/rabah/my_cvs_project
[grace] [/home/s/rabah] > cvs -d /groups/v/vg_soen6441_4/cvs_repository/ import m
"Initial import project" my_cvs_project INITIAL start
s_rabah@encs.concordia.ca
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.14
Checking Out.
Now any group member can checkout a copy to
its local machine

11
[grace] [/home/s/rabah] > cd ~/workspace
[grace] [/home/s/rabah/workspace] > cvs -d /groups/v/vg_soen6441_4/cvs_repository/ co my_cvs_project
s_rabah@encs.concordia.ca
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.15
CVS & Eclipse
DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING
CONCORDIA UNIVERSITY

by Emil Vassev & Joey Paquet
revision 1.3 Jan 19, 2009
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.16
Outline
Version Control Systems - Intro
CVS
Basic Concepts
CVS Branches
Quick Reference to CVS Commands
CVS & Eclipse
Getting Started
Putting a Project into CVS
Getting a Project from CVS
Updating/Committing Changes
Comparing Two File Versions
Rational ClearCase
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.17





Version Control Systems
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.18
Version Control Systems
Why use a version control system?
To have a common repository for all project files available and
updated remotely.
To make sure that concurrent changes to the same file are
properly handled.
To allow the branching of versions in a seamless operation.
To avoid copying all files when creating a new version of a
project.

:: Why do We Need Them? - I
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.19
Version Control Systems
Why use a version control system?
To make sure that everybody in a team is always using the
correct version of project files.
To ensure a proper rollback sequence in the event that some
changes need to be undone.
To compare the differences between different file versions
(using diff).
To access previous project versions seamlessly (using version
tagging)

:: Why do We Need Them? - II
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.20
Version Control Systems
Maximizing productivity by automating tasks.
Reducing confusion, minimizing mistakes.
Maximizing software integrity, traceability, and
accountability.
Assisting developers in providing coordinated changes
to software products and components.
Accurately recording the composition of versioned
software products evolving into many revisions and
variants.
Reconstructing previously recorded software
components versions and configurations.
:: General Goals
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.21
Version Control Systems
More advanced version control systems, like Rationals
ClearCase and Microsofts SourceSafe allow for
multiple developers to work on the same file.
Then, when the last person checks it in, they have to
option to merge the different paths together. Meaning
that two people can change the same file and both save
their changes.
Merging changes is a useful feature, but it has its flaws.
What if two people complete different variations of the
same change, which one should you keep?
:: Multiple Developers & Merging Changes
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.22
Version Control Systems
A major concept of a version control system is the
concept of a baseline.
All projects have this, for example, MS PowerPoint we
are using for this presentation is Version 11.24.8036
11 is the major product version, 24 is the minor version,
and 8036 is the build version.
The build version generally goes up by one every time a
file is checked in, while the major/minor versions are
usually advanced manually as the product is rolled out.
:: Baseline - I
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.23
Version Control Systems
As a developer, you would have the option of rolling
back to a previous baseline if something failed.
Baselines are also important in project management and
planning, especially in iterative development.
A project manager might decide Prototype Version 1.0
would have certain features, and Version 1.1 would have
others, so the final version of 1.0 might be 1.0.1087.
:: Baseline - II
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.24





CVS
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.25
CVS
Version control is a process by which you can keep a recorded
history of the changes to your files.
CVS states for Concurrent Version System (CVS).
A version control system typically has two parts - a version
control server and clients.
The version control server is accessed over a network a local
network or wide area network such as the Internet by a version
control client.
The version control server manages access to the version control
repository.
Version control clients come in a variety of flavors: command
line clients, window/GUI clients (WinCVS), plug-in clients (for
applications like Eclipse and file explorers).
:: Basic Concepts
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.26
CVS
Repository
This is where a copy of your files and directories are stored.
CVS uses some special file structure for tracking the
differences between subsequent versions of a file.

Working Copy and Workspace
This is a copy of a file(s) (or project) in your local file system
(not in the Repository). Workspaces map to Eclipse projects.

Project
Group of files. A project is often a complete program;
although, a project could be code for a software library or the
XML/HTML files for documentation.
:: Basic Concepts
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.27
CVS
Commit
This is the process of saving files to the Repository. You may
commit specific files or a whole project to the Repository.

Synchronize
This is the process of updating the local files on your computer
with corresponding files in the repository.

Checkout
This is the process of retrieving files from the Repository, i.e.
downloading a local copy to your machine.

:: Basic Concepts
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.28
CVS
What is a Branch?
A CVS branch is a collection of revisions that for some reason
should not be committed onto the main trunk of development.
If we want to work on a part of the code doing changes that we are not
going to share until we are not satisfied with the result we could work on
our own branch, without disturbing anyone else.
Branching is a powerful mechanism for controlled isolation.
The original set of versions, before the branch was created, is
called the main line or main branch.
After a branch is created the main line is still the default
version.
We can always merge changes from a branch into the main line
or vice-versa.
:: CVS Branches
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.29
CVS
Branching Scenario
Two programmers, Paul and Wing, working on
separate branches of the same project.
Paul will branch off main and modify some files
while Wing continues to work on the main branch,
also modifying files.
Paul will then merge his branch back to the main
branch. In doing so, Paul will address the resulting
merge conflicts.
:: CVS Branches
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.30
CVS
CVS maintains unique numbers for each each version of the files
under CVS.
Revision numbers could be somewhat like 1.1, 1.2, 1.3.2.2
or 1.3.2.2.4.5.
By default revision 1.1 is the first revision of a file. Each
successive revision is given a new number by increasing the
rightmost number by one.

Example: 1.1, 1.2, 1.3, 1.4



:: CVS Revisions
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.31
CVS
Useful when we want to distinguish different releases of same
software by its version number.
Example: 1.x states for release one and 2.x for release two
We use the -r option to cvs commit to assign revisions
manually.
Example: To bring all the files up to revision 2.0 (including
those that haven't changed), we invoke:
cvs commit -r 2.0

The number we specify with -r must be larger than any existing
revision number.
If we want to maintain several releases in parallel, we need to use
a branch.
:: Assigning Revisions - I
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.32
CVS
Eclipse does not support "cvs commit -r.
Usually we would like to change the revision number from 1.x to
2.x if, for example, we completely re-written the file.
Changing revisions from 1.x to 2.x would typically be something
we should do on a whole project, in order to baseline for a new
release of the project.
That sort of thing is often better managed by using branches,
though.
Eclipse support for maintaining different releases Versions.

:: Assigning Revisions - II
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.33
CVS
A CVS Command looks like this:
cvs [ global_options ] command [ command_options ] [ command_args ]

Global options:
--allow-root=rootdir
Specifies legal CVSROOT directory (server only)
-a
Authenticates all communication (client only)
-b
Specifies RCS location
-d root
Specifies the CVSROOT.
-e editor
Edits messages with editor.
:: Quick Reference to CVS Commands
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.34
CVS
A CVS Command looks like this:
cvs [ global_options ] command [ command_options ] [ command_args ]

Global options - Continue:
-f
Does not read the `~/.cvsrc' file.
-H
--help
Prints a help message.
-n
Does not change any files.
-Q
Be really quiet.
-q
Be somewhat quiet.
:: Quick Reference to CVS Commands
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.35
CVS
A CVS Command looks like this:
cvs [ global_options ] command [ command_options ] [ command_args ]

Global options - Continue:
-r
Makes new working files read-only.
-s variable=value
Sets a user variable.
-T tempdir
Puts temporary files in tempdir.
-t
Traces CVS execution.
:: Quick Reference to CVS Commands
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.36
CVS
A CVS Command looks like this:
cvs [ global_options ] command [ command_options ] [ command_args ]

Global options - Continue:
-v
--version
Displays version and copyright information for CVS.
-w
Makes new working files read-write.
-x
Encrypts all communication (client only).
-z gzip-level
Sets the compression level (client only).
:: Quick Reference to CVS Commands
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.37
CVS
A CVS Command looks like this:
cvs [ global_options ] command [ command_options ] [ command_args ]

Commands:
add [options] [files]
Adds a new file/directory.
admin [options] [files]
Administration of history files in the repository.
annotate [options] [files]
Shows last revision where each line was modified.
checkout [options] modules
Gets a copy of the sources.
commit [options] [files]
Checks changes into the repository.
:: Quick Reference to CVS Commands
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.38
CVS
A CVS Command looks like this:
cvs [ global_options ] command [ command_options ] [ command_args ]

Commands - Continue:
diff [options] [files]
Shows differences between revisions.
edit [options] [files]
Gets ready to edit a watched file.
editors [options] [files]
Sees who is editing a watched file.
export [options] modules
Exports files from CVS.
history [options] [files]
Shows repository access history.
:: Quick Reference to CVS Commands
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.39
CVS
A CVS Command looks like this:
cvs [ global_options ] command [ command_options ] [ command_args ]

Commands - Continue:
import [options] repository vendor-tag release-tags
Imports files into CVS, using vendor branches.
init
Creates a CVS repository if it doesn't exist.
kserver
Kerberos authenticated server.
log [options] [files]
Prints out history information for files.

:: Quick Reference to CVS Commands
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.40
CVS
A CVS Command looks like this:
cvs [ global_options ] command [ command_options ] [ command_args ]

Commands - Continue:
login
Prompts for password for authenticating server.
logout
Removes stored password for authenticating server.
pserver
Password authenticated server.
rannotate [options] [modules]
Shows last revision where each line was modified.
rdiff [options] modules
Shows differences between releases.
:: Quick Reference to CVS Commands
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.41
CVS
A CVS Command looks like this:
cvs [ global_options ] command [ command_options ] [ command_args ]

Commands - Continue:
release [options] directory
Indicates that a directory is no longer in use.
remove [options] [files]
Removes an entry from the repository.
rlog [options] [files]
Prints out history information for modules.
rtag [options] tag modules
Adds a symbolic tag to a module.
server
Rsh server.
:: Quick Reference to CVS Commands
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.42
CVS
A CVS Command looks like this:
cvs [ global_options ] command [ command_options ] [ command_args ]

Commands - Continue:
status [options] files
Displays status information in a working directory.
tag [options] tag [files]
Adds a symbolic tag to checked out version of files.
unedit [options] [files]
Undoes an edit command.
update [options] [files]
Brings work tree in sync with repository.

:: Quick Reference to CVS Commands
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.43
CVS
A CVS Command looks like this:
cvs [ global_options ] command [ command_options ] [ command_args ]

Commands - Continue:
version
Display the version of CVS being used. If the repository is remote, display
both the client and server versions.
watch [on|off|add|remove] [options] [files]
on/off: turns on/off read-only checkouts of files.
add/remove: adds or removes notification on actions.
watchers [options] [files]
Sees who is watching a file.
:: Quick Reference to CVS Commands
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.44





CVS & Eclipse
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.45
CVS and Eclipse
First, you should enable the Eclipse perspective for CVS.
From Window menu: [Window Open Perspective Other ]
From the Select Perspective window pick up CVS Repository Exploring.
Second, you should show the CVS Repositories view.
From Window menu: [Window Show View CVS Repositories]
:: Getting Started
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.46
CVS and Eclipse
Next, you should connect to a CVS Repository.
Right mouse click in the CVS Repositories
window.
From the right mouse click menu select
[New Repository Location ...]
Complete the Add CVS Repository dialog as
shown.
Location Host: alpha.cs.concordia.ca
Repository path: enter the path of the cvs
repository.
Connection Type: extssh
:: Getting Started
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.47
CVS and Eclipse
:: Getting Started
After validation, CVS Repositories window in Eclipse will show the
connected repository.
You can have multiple repositories.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.48
CVS and Eclipse
:: Putting a Project into CVS
Select the project in the Navigator or other view.
Right click [Context MenuTeamShare Project...]
Follow the wizard for identifying your repository location and
and repository module name.
The Synchronize view opens, showing all your outgoing
changes.
Select the project in the Synchronize view.
Right click [Context MenuCommit].
Answer yes when prompted to add new files to version control.
Supply a release comment if you like.

The project now exists in the repository.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.49
CVS and Eclipse
:: Putting a Project into CVS
Right mouse click in the CVS Repositories view and select Refresh
View to see your project in the repository.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.50
CVS and Eclipse
:: Getting a Project from CVS
Select [WindowShow ViewOther].
Select [CVSCVS Repositories].
Right click [Context MenuNewRepository Location...].
Fill in the location information identifying your repository and
click Finish.
Expand the newly-created repository location.
Find the module you are interested in.
Right click [Context MenuCheck Out].
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.51
CVS and Eclipse
:: Updating/Committing Changes
If you have changed your source files and wish to commit those changes in your
files that are in CVS, you do the following:
From the Java Perspective (or other similar perspective), right mouse click
on the project and select [Team Commit... ]
Enter a comment in the Commit dialog and press Finish.
New version for modified files
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.52
CVS and Eclipse
:: Comparing Two File Revisions (Versions)
From the Java Perspective (or other similar perspective), right mouse click on
the changed file and select [Team Show Resource History]
The version history appears in the History Window.
Select the version you wish to compare with the current one.
Right mouse click and select Compare with Current Revision.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.53
CVS and Eclipse
:: Comparing Two File Revisions (Versions)
Java Source Compare window shows up both file versions and highlights the
differences.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.54
CVS and Eclipse
:: Branching with Eclipse and CVS
If you want to create an independent branch on which to work,
right-click on the project name and select [Team Branch].
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.55
CVS and Eclipse
:: Branching with Eclipse and CVS
A Create Branch dialog box is displayed.
Enter a branch name like JUnitTesting_B1.
Leave the check box checked for Start working in the branch.
Notice that a version name is automatically filled in for you
called "Root_ JUnitTesting_B1.
You may choose a different name (so long as it doesn't conflict
with an existing CVS tag). It will be used later by the merge
editor to determine what has changed since branch creation.
Click OK.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.56
CVS and Eclipse
:: Branching with Eclipse and CVS
You should be able to see the result of your branch in two ways:
By right-clicking the project and selecting Properties and then
CVS, you should see the JUnitTesting_B1 in the tag field.
In the CVS Repositories view expand the Branches node.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.57
CVS and Eclipse
:: Merging - I
How to merge the changes done in a branch into another branch?
The first step of the merge is to point the workspace to the target
branch. In our case, the target of the merge is the main branch.
To switch the project contents to that of the main branch, right-
click on the JUnitTesting project in the Navigator view and
select [Replace With Another Branch or Version].
You should see a branch selection similar to the one below.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.58
CVS and Eclipse
:: Merging - II
The JUnitTesting_B1 branch is the one we were working on.
To switch back to the main branch, select HEAD. This is the
CVS name for the main branch.
The resource view should look like the one below. Notice the
version numbers correspond to what we committed. All the
version numbers are two digits. The branch name is gone which
implies the HEAD branch (or main).
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.59
CVS and Eclipse
:: Versioning - I
Eclipse supports different software releases via versioning.
To create a new version of your application right-click on the
project name in the Navigator view and select [Team Tag as
Version].
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.60
CVS and Eclipse
:: Versioning - II
Enter the versions name.
The new version can be found in the CVS repositories under
Versions node:
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.61
Logiscope and McCabe
SOEN6611
Object-Oriented Metrics
Notes credit: Ming Zhu
Editorial: Aravindan Balasubramanian and Serguei
Mokhov
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.62
Logiscope
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.63
Why Logiscope
Evaluate the quality of source code.
Help to optimize the testing process.
Automatically analyze a large amount of code,
and reduce the manual workload.
Compliant with quality standards.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.64
The Logiscope Toolset
Logiscope QualityChecker
Quality Evaluations & Graphical Code Views
Logiscope RuleChecker
Automated Coding Rule Checking
Logiscope TestChecker
Structure-based Testing & Test Coverage Analysis
Logiscope Code Reducer
Find Code Similarities Remove Duplicated Code
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.65
Logiscope QualityChecker
Provides metrics and graphical
representations of the source code
Provides over 190 quality metrics
Quality model can be tailored to Project /
Company
Context-free file parsing for C, C++ and Java
Automated Reporting facilities (HTML, Word)
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.66
Quality Modeling
The modeling approach used by Logiscope is
compliant with the ISO/IEC 9126-1 Software
engineering Product quality standard
Software quality can be defined as a set of
characteristics that:
are important to the user: quality factors,
can be decided by the designer: quality criteria,
can be measured for verification purposes: quality
metrics.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.67
Quality Modeling
Metrics: comparison of measured values with limit values
previously defined in the Quality Model
Criteria: classification in different categories according to
results obtained for metrics
Quality factor: classification in different categories
according to results obtained at criteria level
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.68
Quality Modeling
Source code metrics apply to different scopes.
A scope of a metric designates the element of the
source code the metric will apply to.
The different scopes are:
The Function scope: includes functions, procedures,
methods, etc.
The Class scope: is represented by C++ and Java classes.
The Module scope: is represented by a source code file.
The Package scope: is represented by Java Packages;
Packages contain a set of classes.
The Application scope: represented by the set of
interrelated software components
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.69
Create a New Project
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.70
Project Definition
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.71
Indicate Project Source Files
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.72
Choose Project Quality Model
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.73
Build Project
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.74
Quality Model
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.75
Metrics Dictionary
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.76
Criteria Level
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.77
Factor Level
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.78
Quality Report
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.79
Quality Report (2)
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.80
Kiviat Diagram
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.81
Kiviat Diagram (2)
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.82
Outline
1 CVS
2 CVS and Eclipse
3 Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
4 McCabe
Overview
Tool Views, Usage, and Metrics
5 JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
6 MARFCAT
Introduction
Classication
Data Sets and Sample Results
Summary
Running Experiments
7 References
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.83
McCabe
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.84
Why McCabe
Analyze the quality of an application
Improve the accuracy and efficiency of testing
efforts
Provide visual environment to analyze the
quality of an application and testing efforts
Measure software quality with industry
accepted metrics
Provide a useful context-sensitive helping
system
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.85
The Overview of McCabe
Platform Support Independent
Windows 2000/XP/Vista/7, Ubuntu Linux, Linux Red
Hat Enterprise and Scientific Linux
Language Support Dependent
C, C++, Fortran, Java, ..., etc.
A Static Analysis Tool
Static Source Code Analysis with Visualization
A Dynamic Analysis Tool
Dynamic Test Path Analysis & Coverage (Unit &
Integration)
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.86
McCabe IQ Analysis Process
CREATE PROJECT
IQ Project
(.pcf)
IQ Project Database
(One Dir. Each)
Source Code &
Build Info.
PARSE PROJECT
(may preprocess)
VIEW/REPORT
PROJECT DATA &
GRAPHICS
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.87
McCabe IQ Battlemap:
class view
Battlemap - graphical interface showing structure chart
or class diagram
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.88
McCabe IQ Battlemap:
Functional view
Function hierarchy
Calls shown by lines
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.89
Why Battlemap is so colorful
Based on the Cyclomatic Complexity and Essential
Cyclomatic Complexity
Green = Low Complexity
Yellow = Moderate Complexity
Red = High Complexity

Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.90
Flowgraph
node: statement or block
of sequential statements
1 main()
{
2 if (y > 10)
3 b();
else
4 c();
5 6 }
Code Flowgraph
condition
end of condition
edge: flow of control
between nodes
1
2
3 4
5
6
Flowgraph: A visualization of the modules decision logic
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.91
Flowgraph Notation
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.92
Complexity: V(G) and EV(G)
Cyclomatic
Complexity V(G) = 4
1. Definition: Essential Complexity, EV(G), is a measure of the degree to which a module, G,
contains unstructured constructs, which is calculated by removing structured code constructs
2. Definition: Cyclomatic Complexity,V(G), is the number of linearly independent paths and,
consequently, the minimum number of paths that one should (theoretically) test.

Essential
Complexity EV(G) = 1
Original Graph Reduced Graph
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.93
Metrics: V(G) and EV(G)
Cyclomatic complexity V(G)
Comprehension
Testing effort
Reliability
Essential complexity EV(G)
Structuredness
Maintainability
Re-engineering effort

Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.94
Low Complexity:
v(G)<=10 and ev(G)<=4
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.95
Moderate Complexity:
v(G)>10 and ev(G)<=4
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.96
High Complexity:
ev(G)>4
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.97
Scatterplot Diagram
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.98
Module Metrics Report
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.99
Summary
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.100
Complexity: IV(G)
Reduced Graph
IV(G) = 3
proge()
progd()
Original Graph
V(G) = 4
proge()
progd()
Definition: Module Design Complexity, iv(G), is a quantification of the testing effort of
a module as it calls its subordinates modules.
Calculation: iv(G) is calculated by removing decisions and nodes that do not impact the
calling control of program over its subordinate modules.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.101
Class-Oriented Metrics
Weighted Methods Per Class (WMC)
Coupling between object classes (CBO)
Response for Class (RFC)
Lack of Cohesion of Methods (LOCM)
Depth of Inheritance Tree (DIT)
Number of children (NOC)

Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.102
Class Metrics Report
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.103
Introduction to Eclipse JDT,
JDeodorant, and MARFCAT
SOEN6611
Notes credit:
N. Tsantalis and S. Mokhov
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.104
Eclipse Java Model
A very lightweight representation of Java
projects
It contains information down to declaration
level (i.e., method signatures, fields), but no
method bodies.
It is suitable for various Eclipse views that
should scale to thousands of types (e.g.,
Package Explorer, Outline)
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.105
Java Model Terminology
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.106
Java Model Terminology
Project Element Java Model element Description
Java project IJavaProject The Java project which contains all other objects.
src folder / bin folder / or
external library
IPackageFragmentRoot Hold source or binary files, can be a folder or a
library (zip / jar file)
Each package IPackageFragment Each package is below the IPackageFragmentRoot,
sub-packages are not leaves of the package, they
are listed directed under IPackageFragmentRoot
Java Source File ICompilationUnit The Source file is always below the package node
Types / Fields / Methods IType / IField / IMethod Types, fields and methods
*every class of the Java Model starts with I
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.107
Abstract Syntax Tree
To access the source an Abstract Syntax Tree
(AST) should be built on demand.
ASTs require lots of memory. So, they should
be managed very carefully in memory.
void parseAST(ICompilationUnit unit) {
ASTParser parser = ASTParser.newParser(AST.JLS4);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setSource(unit);
parser.setResolveBindings(true);
CompilationUnit cu = (CompilationUnit)parser.createAST(null);
}
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.108
What is an AST?
return getPrefix() + count;
ReturnStatement
expression
InfixExpression
MethodInvocation
Left
operand
SimpleName
Right
operand
IMethodBinding
resolve
binding
IVariableBinding
resolve
binding
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.109
Bindings
ITypeBinding: has bindings for super type,
implemented interfaces, all members,
generics information
IMethodBinding: has bindings for parameter
types, exceptions, return type, declaring class
IVariableBinding: has binding for variable
type, whether it is a field, parameter or local
variable, declaring class, declaring method,
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.110
AST in detail
All nodes in an AST are subclasses of the
ASTNode superclass.
CompilationUnit is the root node of an AST
The nodes of an AST are grouped in 4 main
types:
BodyDeclaration
Type
Statement
Expression
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.111
BodyDeclarations
TypeDeclaration
MethodDeclaration
FieldDeclaration
Initializer (static initialization block)
EnumDeclaration
AnnotationTypeDeclaration
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.112
Types
PrimitiveType (i.e., byte, short, char, int, long,
float, double, boolean and void types)
SimpleType (e.g., Class)
ArrayType (e.g., Class[])
QualifiedType (e.g., Class.InnerClass)
ParameterizedType (e.g., Class<Type>)
WildcardType (e.g., ? extends Type)
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.113
Statements
with body containing other statements:
Block, DoStatement, EnhancedForStatement,
ForStatement, IfStatement, LabeledStatement,
SwitchStatement, SynchronizedStatement,
TryStatement and WhileStatement
without body:
ExpressionStatement, ConstructorInvocation,
SuperConstructorInvocation, EmptyStatement,
ThrowStatement, VariableDeclarationStatement,
ReturnStatement, AssertStatement, BreakStatement,
ContinueStatement and SwitchCase
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.114
Expressions
always within statements:
Name, MethodInvocation, FieldAccess,
ArrayCreation, ArrayAccess, Assignment,
InstanceofExpression, ClassInstanceCreation,
SuperMethodInvocation, SuperFieldAccess,
InfixExpression, PostfixExpression,
PrefixExpression, ThisExpression, and
ConditionalExpression.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.115
JDeodorant Model
Source code representation with more detail
than Java Model, but less than AST
It has 3 levels:
Top-level containers
Statement representation
Expression representation

Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.116
Top-level containers
SystemObject ClassObject
-classes
*
MethodObject
ConstructorObject
-constructors
*
-methods
*
1
FieldObject
-fields
*
TypeObject
-type
ParameterObject
-parameters
*
-type
-returnType
MethodBodyObject
-body
0..1
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.117
Statement representation
CompositeStatementObject
AbstractStatement
StatementObject
-statements
*
AbstractExpression
-expressions *
AbstractMethodFragment
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.118
Expression representation
AbstractMethodFragment
CreationObject
-creations
*
MethodInvocationObject
-methodInvocations
*
LocalVariableInstructionObject
FieldInstructionObject
-localVariableInstructions
*
-fieldInstructions
*
LocalVariableDeclarationObject
-localVariableDeclarations
*
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.119
JDeodorant Metrics Demo
JD.zip JDeodorant Core free to put to a repo (other
modules such as analysis and refactoring suggestions
excluded)
metrics.LCOM sample implementation
add tests package with sample classes with known
results
views.MetricsAction.run() res on right-click
Metrics... popup at different Outline levels
test on own implementation
to run: right-click on plugin.xml, Run As Eclipse
Application (it will open new Eclipse window; use that
Eclipse instance to open the project of interest, use Java
perspective, and right click on elements of interest to run
metrics on; the output will be in the Console window of the
original Eclipse)
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.120
Outline
1 CVS
2 CVS and Eclipse
3 Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
4 McCabe
Overview
Tool Views, Usage, and Metrics
5 JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
6 MARFCAT
Introduction
Classication
Data Sets and Sample Results
Summary
Running Experiments
7 References
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.121
MARFCAT
MARFCAT MARF-based
Code Analysis Tool
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.122
Introduction
MARFCAT employs machine learning and classical NLP
techniques for non-NLP applications of detection,
classication, and reporting of weaknesses related to
vulnerabilities or bad coding practices found in articial
constrained languages, such as programming languages
and their compiled counterparts.
Based on the open-source MARFs frameworks.
MARFCAT MARF-based Code Analysis Tool [MPDS14]
MARF [The14, Mok08, MD08, Mok10b, Mok10a]
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.123
Core principles
Machine learning
NLP and spectral techniques
More details on the background:
Mokhov, S. A.: Chapter 5 of Intensional Cyberforensics.
PhD thesis, Concordia University, Montreal, Canada, Sept.
2013. [Mok13]; available online on Concordias Spectrum,
arXiv, and CAIACs web sites
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.124
CVEs and CWEsthe knowledge base
From NISTs and MITREs online databases:
CVE (Common Vulnerabilities and Exposures)
CWE (Common Weakness Enumeration)
Procedure:
Teach the system from the CVE-based cases
Test on the CVE-based cases
Test on the non-CVE-based cases
The introduction by the NIST team of a large synthetic
code base with CWEs, serves as a part of knowledge
base learning as well.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.125
Classes
CVEs [NIS14a, NIS14b] project/software-specic, very
detailed, list affected les and patches; contribute to higher
precision; have one ore more CWEs attached to them
CWEs [VM14] general categories, project-independent;
broad with lesser precision across projects
Types (sink, path, x)
Line numbers (!)
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.126
Other Classes
Adaptable to not-related to security aspects, but traditional
quality aspects with a degree of condence, e.g.:
Code structure (good or bad)
Code documentation/comments (good or bad)
CBO
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.127
Basic Methodology
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.128
Data Sets and Some Results I
CVE-selected test cases:
C: Wireshark 1.2.0 (vulnerable) and Wireshark 1.2.18 (xed)
C: Dovecot 2.0 (vulnerable) and Dovecot 2.17 (xed)
C++: Chrome 5.0.375.54 (vulnerable) and Chrome 5.0.375.70 (xed)
Java: Tomcat 5.5.13 (vulnerable) and Tomcat 5.5.33 (xed)
Java: Jetty 6.1.16 (vulnerable) and Jetty 6.1.26 (xed)
PHP: Wordpress 2.0 (vulnerable) and Wordpress 2.2.3 (xed)
non-CVE selected and synthetic CWE:
C: Dovecot 2.0-beta6
Java: Pebble 2.5-M2
C: Synthetic C covering 118 CWEs and 60K les
Java: Synthetic Java covering 50 CWEs and 20K les
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.129
Data Sets and Some Results II
Results Summary. Current top precision: Wireshark:
CVEs (NLP): 83.33%, CWEs (NLP): 58.33%
CVEs (signal): 92.68%, CWEs (signal): 86.11%,
Tomcat:
CVEs (NLP): 87.88%, CWEs (NLP): 39.39%
CVEs (signal): 83.72%, CWEs (signal): 81.82%,
Google Chrome:
CVEs (NLP): 100.00%, CWEs (NLP): 88.89%
CVEs (signal): 90.91%, CWEs (signal): 100.00%,
Dovecot (new, 2.x):
14 warnings; but it appears all quality or false positive
(very hard to follow the code, severely undocumented)
Pebble:
none found during quick testing
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.130
Data Sets and Some Results III
Some select statistical measurements of the precision in
recognizing CVEs and CWEs under different
congurations using NLP techniques are shown through
the result tables.
A complete and revised set of statistics along with the
SATE-released data found in [MPDS14].
Second guess statistics provided to see if the hypothesis
that if our rst estimate of a CVE/CWE is incorrect, the
next one in line is probably the correct one. Both are
counted if the rst guess is correct.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.131
Data Sets and Some Results IV
Table: CVE Stats for Tomcat 5.5.13
guess run algorithms good bad %
1st 1 -nopreprep -char -unigram -add-delta 29 4 87.88
2nd 1 -nopreprep -char -unigram -add-delta 29 4 87.88
guess run class good bad %
1st 1 CVE-2006-7197 1 0 100.00
1st 2 CVE-2006-7196 1 0 100.00
1st 3 CVE-2009-2901 1 0 100.00
1st 4 CVE-2006-7195 1 0 100.00
1st 5 CVE-2009-0033 1 0 100.00
1st 6 CVE-2007-1355 1 0 100.00
1st 7 CVE-2007-5342 1 0 100.00
1st 8 CVE-2009-2693 1 0 100.00
1st 9 CVE-2009-0783 1 0 100.00
1st 10 CVE-2008-2370 1 0 100.00
1st 11 CVE-2007-2450 1 0 100.00
1st 12 CVE-2008-2938 1 0 100.00
1st 13 CVE-2007-2449 3 0 100.00
1st 14 CVE-2007-1858 1 0 100.00
1st 15 CVE-2008-4308 1 0 100.00
1st 16 CVE-2008-0128 1 0 100.00
1st 17 CVE-2009-3548 1 0 100.00
1st 18 CVE-2007-5461 1 0 100.00
1st 19 CVE-2007-3382 1 0 100.00
1st 20 CVE-2007-0450 2 0 100.00
1st 21 CVE-2009-0580 1 0 100.00
1st 22 CVE-2007-6286 1 0 100.00
1st 23 CVE-2008-5515 3 1 75.00
1st 24 CVE-2008-1232 1 2 33.33
1st 25 CVE-2009-2902 0 1 0.00
2nd 1 CVE-2006-7197 1 0 100.00
2nd 2 CVE-2006-7196 1 0 100.00
2nd 3 CVE-2009-2901 1 0 100.00
2nd 4 CVE-2006-7195 1 0 100.00
2nd 5 CVE-2009-0033 1 0 100.00
2nd 6 CVE-2007-1355 1 0 100.00
2nd 7 CVE-2007-5342 1 0 100.00
2nd 8 CVE-2009-2693 1 0 100.00
2nd 9 CVE-2009-0783 1 0 100.00
2nd 10 CVE-2008-2370 1 0 100.00
2nd 11 CVE-2007-2450 1 0 100.00
2nd 12 CVE-2008-2938 1 0 100.00
2nd 13 CVE-2007-2449 3 0 100.00
2nd 14 CVE-2007-1858 1 0 100.00
2nd 15 CVE-2008-4308 1 0 100.00
2nd 16 CVE-2008-0128 1 0 100.00
2nd 17 CVE-2009-3548 1 0 100.00
2nd 18 CVE-2007-5461 1 0 100.00
2nd 19 CVE-2007-3382 1 0 100.00
2nd 20 CVE-2007-0450 2 0 100.00
2nd 21 CVE-2009-0580 1 0 100.00
2nd 22 CVE-2007-6286 1 0 100.00
2nd 23 CVE-2008-5515 3 1 75.00
2nd 24 CVE-2008-1232 1 2 33.33
2nd 25 CVE-2009-2902 0 1 0.00
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.132
Data Sets and Some Results V
Table: CWE Stats for Tomcat 5.5.13
guess run algorithms good bad %
1st 1 -cweid -nopreprep -char -unigram -add-delta 13 20 39.39
2nd 1 -cweid -nopreprep -char -unigram -add-delta 17 16 51.52
guess run class good bad %
1st 1 CWE-16 1 0 100.00
1st 2 CWE-255 1 0 100.00
1st 3 CWE-264 2 0 100.00
1st 4 CWE-119 1 0 100.00
1st 5 CWE-20 1 0 100.00
1st 6 CWE-200 3 1 75.00
1st 7 CWE-22 3 13 18.75
1st 8 CWE-79 1 6 14.29
2nd 1 CWE-16 1 0 100.00
2nd 2 CWE-255 1 0 100.00
2nd 3 CWE-264 2 0 100.00
2nd 4 CWE-119 1 0 100.00
2nd 5 CWE-20 1 0 100.00
2nd 6 CWE-200 4 0 100.00
2nd 7 CWE-22 5 11 31.25
2nd 8 CWE-79 2 5 28.57
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.133
Data Sets and Some Results VI
Typical output fragment
File: wireshark-1.2.0/epan/dissectors/packet-afs.c
Config: -nopreprep -raw -fft -cheb -graph
Processing time: 0d:0h:0m:0s:156ms:156ms
Subjects ID: 20092562
Subject identified: CVE-2009-2562
...
Expected subjects ID: 20092562 (possible: [20092562])
Expected subject: CVE-2009-2562
Second Best ID: 3
Second Best Name: CVE-2010-2285
Date/time: Fri Oct 01 13:48:09 EDT 2010
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.134
Tomcat 5.5.13 and Tomcat 5.5.29. Tomcat 5.5.13 CVE
NLP testing shows a higher precision of 87.88%, but the
recall is poor, 25/316 CVEs are missing out. Subsequent,
quick Tomcat 5.5.13 CWE NLP testing was surprisingly
poor topping at 39.39%. A quick CVE-based evaluation of
Tomcat 5.5.29 is performed to see if the CVEs present in
the vulnerable versionand they do not.
CVE-based training and reporting: Line numbers were
machine-learned as well as the types of locations and
descriptions provided by the SATE organizers and
incorporated into the reports via machine learning. This
includes the types of locations, such as x, sink, or path
learned from the organizers-provided data.
CWE-based training and reporting: The CWE-based reports
use the CWE as a primary class instead of CVE for training
and reporting, and as such currently do not report on CVEs
directly (i.e., no direct mapping from CWE to CVE exists
unlike in the opposite direction); however, their recognition
rates are not very low either in the same locations. The
CWE-based training is also used on the testing les, e.g., of
Pebble to see if there are any similar weaknesses to that of
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.135
Tomcat found. CWEs, unlike CVEs for most projects,
represent better cross-project classes as they are largely
project-independent. Both CVE-based and CWE-base
methods use the same data for training. NLP-based CWE
precision in this experiment was quite low ( 39%).
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.136
Shortcomings
Line numbers! (easily ltered out as high-frequency
noise, etc.). A whole relativistic and machine learning
methodology developed for the line numbers.
Accuracy depends on the quality of the knowledge base.
Garbage in garbage out.
To detect CVE or CWE signatures in non-CVE cases
requires large knowledge bases (human-intensive to
collect).
No path tracing (since no parsing is present); no slicing,
semantic annotations, context, locality of reference, etc.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.137
Advantages
Relatively fast (e.g., Wireshark 2400 les train and test
about 3 minutes in signal pipeline)
Language independent (no parsing) given enough
examples can apply to any language, i.e., methodology is
the same no matter C, C++, Java or any other source or
binary language.
Can automatically learn a large knowledge base to test on
known and unknown cases.
Can be used to quickly pre-scan projects for further
analysis by humans and other tools.
High precision in CVEs and CWE detection.
Lots of algorithms and their combinations.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.138
Conclusion I
Practical implications:
The approach can be used on any target language without
modications to the methodology or knowing the syntax of
the language.
The approach is nearly identically transposed onto the
compiled binaries and bytecode, detecting vulnerable
deployments and installations sort of like virus scanning
of binaries, but instead scanning for security-weak binaries
on site deployments to alert sysadmins.
Can learn from binary signatures from other tools like
Snort [Sou13].
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.139
Running Experiments I
Files that you need (under project/soen6611-marfcat.zip on the
web page):
marfcat.jar (can be extracted from gizpy.zip or repackaged
from source [Mok14]). This is the executable app itself.
marf.jar MARF packaged as a library (same procedure).
apache-tomcat-5.5.13-src_train.xml the index
annotating vulnerable code in an OSS Java project
(Tomcat 5.5.13) as a source of learning. Any comparable
project can be used, but annotation is manual.
gipsy_test.xml the index of the GIPSY projects les for
analysis. (This le can be copied into gipsy_train.xml and
manually annotated for)
marf_test.xml the index of the MARF projects les for
analysis.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.140
Running Experiments II
Directories are assumed to be as follows for the provided
les. If your directory structure is different, you have to
either re-generate the les using the script below or
search-replace the paths in the les.
test-cases/
gipsy/ (from gipsy.zip)
marf/
marf/ (via cvs from sf.net)
apps/ (via cvs from sf.net)
collect-les-meta.pl an executable Perl script that
helps collecting the initial index of case studies. The above
les are produced with this script.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.141
Running Experiments III
cve.marf.Storage.TrainingSet.709-marf.apps.
MARFCAT.Storage.AnyToWAVLoader.0.0.107.301.512.
gzbin pre-trained mean-based knowledge base instance
off the Tomcat sources (using -cheb Chebyshev distance
as a classier, -fft FFT for feature extraction (Fast Fourier
Transform from time domain to frequency domain), and
-raw pre-processing (noop). The gzbin les have to be
redone to train from new/additional samples or when using
other algorithms.
java.util.ArrayList.ref part of the knowledge base saved
state as well
javalimited.sh a Bash script that starts parallel JVMs for
multi-algorithm evaluations
Makele the makele [SMSt06] where all the experiment
targets are scripted, including two for SOEN6611.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.142
Running Experiments IV
marfcat main runner tchs script that has run proles
(fast, slow, etc. for a choice of algorithms from MARF) and
settings for running the MARFCATApp application with
proper options and JVM settings. Often called from the
Makele targets.
marfcat--super-fast-test-quick-gipsy-cve.log this log
le will appear when running MARFCAT with the default
setup using these les for the GIPSYs code analysis.
marfcat--super-fast-test-quick-marf-cve.log this log
le will appear when running MARFCAT with the default
setup using these les for the MARFs code analysis.
There are other temporary or output les that are
generated during an execution run of MARFCAT; they are
not of immediate interest here at the moment.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.143
Running Experiments V
Procedure to follow:
1 Log in to a Linux desktop in the lab or remotely at
computation.encs.concordia.ca using SSH and
your ENCS account (nothing prevents you using your own
desktops Cygwin shell in Windows or MacOS X or Linux
to do the same if you have Java, Perl, tcsh, bash, and all
the libraries installed).
2 Make sure all the les from MARFCAT are present in a
directory. E.g., you can use /nettemp (same as H: in
Windows) or your group folder.
3 Make sure your test cases are downloaded and unpacked
following the directory structure in the XML les.
4 On the command line cd to the directory where the
MARFCAT les are. You can scp (or WinSCP) them in
rst to your home or group directories remotely if you are
offsite.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.144
Running Experiments VI
5 Make sure the scripts are executable:
chmod u+x collect-files-meta.pl \
javalimited.sh marfcat
6 Run:
make test-quick-gipsy-cve
make test-quick-marf-cve
This will spawn the JVM processes on the background;
they will terminate within seconds.
You should get the log les as indicated earlier. In these
log les look for Warning should be reported set to true
or even the small distance values.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.145
Running Experiments VII
7 (Run the collect script if your directories with MARF and
GIPSY are in different locations.)
8 (Annotate the MARF and GIPSY XML les with the poor
code with whatever poor means (generated,
undocumented, coupled, etc.) per your other ndings,
retrain MARFCAT to generate the new gzbin models, and
test them. Youd need to edit/add Makele tagets in the
Makele script similar to the examples there using the
retrain- option prex.)
9 (To run MARFCATApp from sources and in Eclipse is
possible, but your arguments and paths should be
adjusted under the Run Congurations, Program
arguments settings similarly to what the marfcat script
sets it too.)
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.146
Running Experiments VIII
10 (To make MARFCAT a JDeodorant metrics, youd have to
implement a wrapper in metrics.MARFCAT that would
call MARFCATApp with the .java le that youd compute
from the class name you right-click on. You can use
gipsy.apps.marfcat.MARFCATDGT and
gipsy.apps.marfcat.MARFCATDWT as example
wrappers from the GIPSY project.)
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.147
References I
[MD08] Serguei A. Mokhov and Mourad Debbabi.
File type analysis using signal processing techniques
and machine learning vs. file unix utility for
forensic analysis.
In Oliver Goebel, Sandra Frings, Detlef Guenther,
Jens Nedon, and Dirk Schadt, editors, Proceedings
of the IT Incident Management and IT Forensics
(IMF08), LNI140, pages 7385. GI, September
2008.
[MLB07] Serguei A. Mokhov, Marc-Andr Laverdire, and
Djamel Benredjem.
Taxonomy of Linux kernel vulnerability solutions.
In Innovative Techniques in Instruction Technology,
E-learning, E-assessment, and Education, pages
485493, 2007.
Proceedings of CISSE/SCSS07.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.148
References II
[Mok03] Serguei A. Mokhov.
Newton: Basic security, June 2003.
http://newton.cs.concordia.ca/~gipsy/cgi-bin/viewcvs.
cgi/*checkout*/resources/doc/presentations/security.
pdf?rev=HEAD.
[Mok05a] Serguei A. Mokhov.
Makele tutorial, 20032005.
http://www.cs.concordia.ca/~mokhov/comp444/
tutorials/14-makele.pdf.
[Mok05b] Serguei A. Mokhov.
UNIX commands, revision 1.4.
[online], 20032005.
http://users.encs.concordia.ca/~mokhov/comp444/
tutorials/unix-commands.pdf.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.149
References III
[Mok08] Serguei A. Mokhov.
Study of best algorithm combinations for speech
processing tasks in machine learning using median
vs. mean clusters in MARF.
In Bipin C. Desai, editor, Proceedings of C3S2E08,
pages 2943, Montreal, Quebec, Canada, May 2008.
ACM.
[Mok10a] Serguei A. Mokhov.
Complete complementary results report of the
MARFs NLP approach to the DEFT 2010
competition.
[online], June 2010.
http://arxiv.org/abs/1006.3787.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.150
References IV
[Mok10b] Serguei A. Mokhov.
Lapproche MARF DEFT 2010: A MARF approach
to DEFT 2010.
In Proceedings of the 6th DEFT Workshop
(DEFT10), pages 3549. LIMSI / ATALA, July 2010.
DEFT 2010 Workshop at TALN 2010; online at
http://deft.limsi.fr/actes/2010/pdf/2_clac.pdf.
[Mok13] Serguei A. Mokhov.
Intensional Cyberforensics.
PhD thesis, Department of Computer Science and
Software Engineering, Concordia University,
Montreal, Canada, September 2013.
Online at http://arxiv.org/abs/1312.0466.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.151
References V
[Mok14] Serguei A. Mokhov.
MARFCAT MARF-based Code Analysis Tool.
Published electronically within the MARF project,
http://sourceforge.net/projects/marf/les/Applications/
MARFCAT/, 20102014.
Last viewed February 2014.
[MPDS14] Serguei A. Mokhov, Joey Paquet, Mourad Debbabi,
and Yankui Sun.
MARFCAT: Transitioning to binary and larger data
sets of SATE IV.
[online], May 20122014.
Online at http://arxiv.org/abs/1207.3718.
[NIS14a] NIST.
National Vulnerability Database.
[online], 20052014.
http://nvd.nist.gov/.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.152
References VI
[NIS14b] NIST.
National Vulnerability Database statistics.
[online], 20052014.
http://web.nvd.nist.gov/view/vuln/statistics.
[Rab11] Sleiman Rabah.
CVS instructions, September 2011.
SOEN6441 Fall 2011.
[SMSt06] Richard Stallman, Roland McGrath, Paul Smith, and
the GNU Project.
GNU Make.
Free Software Foundation, Inc., [online], 19972006.
http://www.gnu.org/software/make/.
[Sou13] Sourcere.
Snort: Open-source network intrusion prevention and
detection system (IDS/IPS).
[online], 19992013.
http://www.snort.org/.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.153
References VII
[The14] The MARF Research and Development Group.
The Modular Audio Recognition Framework and its
Applications.
[online], 20022014.
http://marf.sf.net and http://arxiv.org/abs/0905.1235,
last viewed April 2012.
[VM14] Various contributors and MITRE.
Common Weakness Enumeration (CWE) a
community-developed dictionary of software
weakness types.
[online], 20062014.
See http://cwe.mitre.org.
[VP09] Emil Vassev and Joey Paquet.
CVS Eclipse instructions, 2009.
Instructor:
Serguei A. Mokhov
Coordinator:
Peter C. Rigby
CVS
CVS and Eclipse
Logiscope
Quality Modeling
Tool Usage (POD)
Kiviat Diagram
McCabe
Overview
Tool Views, Usage, and
Metrics
JDT and JDeodorant
Eclipse Java Model
AST
JDeodorant Model
Demo (In Class)
MARFCAT
Introduction
Classication
Data Sets and Sample
Results
Summary
Running Experiments
References
4.154
References VIII
[Zhu13a] Ming Zhu.
SOEN 6611: Software measurement: Theory and
practice, Logiscope tutorial notes.
Department of Computer Science and Software
Engineering, Concordia University, Montreal,
Canada, 2013.
Summer 2013.
[Zhu13b] Ming Zhu.
SOEN 6611: Software measurement: Theory and
practice, McCabe tutorial notes.
Department of Computer Science and Software
Engineering, Concordia University, Montreal,
Canada, 2013.
Summer 2013.

You might also like