Presentation is loading. Please wait.

Presentation is loading. Please wait.

A code metric tool for Software Engineering

Similar presentations


Presentation on theme: "A code metric tool for Software Engineering"— Presentation transcript:

1 A code metric tool for Software Engineering
Teng Li

2 Software Measurement Why? Mature technologies Larger scale
Pursue better control and management Needs for maintain and refractory

3 Software Measurement What?
Measurement is a process to assign numbers for each attribute or factor of an object or an event according to rules. Key: rules, attributes We use measurement to get quantified assessment for a software.

4 Software Metrics Metric A metric is a measurement function. Software
Data Numerical data Metric

5 Metric for code Code analysis can reflect potential problems in SW design. Code quality is related to future maintenance and reuse. Code metric can help developers to avoid fatal design problem and mitigate risks. E.g. Visual Studio Code Metrics Sourceforge - Metrics 1.3.6

6 Metric for code Metric Step:
Abstract common flaws in coding, like a data class, useless method or duplicated code fragment. Define a metric rule, like fetch similarity of two code fragment. Associate a metric rule with a abstract code characteristic. Get metric value via computing

7 Metric for code Framework UI Core computing Data storage Software
Choose Model Metric result Collected data Factor computing Repository Model Template Result UI Core computing Data storage

8 Code Bad Smells Object-Oriented design
To indicate problematic classes or method Use metrics to provide evidence E.g. Data Class God Class God Method Feature Envy

9 My metric tool Eclipse based plug-in
Parse code and generate AST(Abstract syntax tree) Using JDT to get elements in a compile unit Computing values to indicate potential problematic code(bad smells)

10 My metric tool Eclipse based plug-in
Parse code and generate AST(Abstract syntax tree) Using JDT to get elements in a compile unit Computing values to indicate potential problematic code(bad smells)

11

12

13

14

15 Thanks Questions?


Download ppt "A code metric tool for Software Engineering"

Similar presentations


Ads by Google