Measuring the Code Quality Using Software Metrics

24
MEASURING THE CODE QUALITY USING SOFTWARE METRICS – TO IMPROVE THE EFFICIENCY OF SPECIFICATION MINING Guided By Ms.P.R.Piriyankaa.,ME Assistant Professor. Presented By, M.Geethanjali (ME)., Sri Krishna College of Engg and Tech.

description

The quality of the code is checked before deploying the software, the quality of the software will be assured.

Transcript of Measuring the Code Quality Using Software Metrics

Page 1: Measuring the Code Quality Using Software Metrics

MEASURING THE CODE QUALITY USING SOFTWARE METRICS – TO IMPROVE THE EFFICIENCY OF SPECIFICATION

MINING

Guided By

Ms.P.R.Piriyankaa.,ME

Assistant Professor.

Presented By,

M.Geethanjali (ME).,

Sri Krishna College of Engg and Tech.

Page 2: Measuring the Code Quality Using Software Metrics

INTRODUCTION

Incorrect and buggy software costs up to $70 Billion each year in US.

Formal Specifications defines testing, optimization, refactoring, documentation, debugging and repair.

False Positive rates – We think there is a vulnerability but actually that is not present.

Page 3: Measuring the Code Quality Using Software Metrics

PROBLEM STATEMENT

The cost of Software Maintenance consumes up to 90% of the total project cost and 60% of the maintenance time.

Formal Specifications are very necessary but they are difficult for programmers to write them manually.

Existing automatic specification mining produces high false positive rates.

Page 4: Measuring the Code Quality Using Software Metrics

EXISTING SYSTEM

Formal specification is done for each and every software and the quality of the code is checked.

Set of software Metrics are used to measure the quality of the software.General Quality MetricsChidamber and Kemerer Metrics.

These Software Metrics are used to measure the quality of the code.

Page 5: Measuring the Code Quality Using Software Metrics

EXISTING SYSTEM CONT...

The quality of the code is lifted with the results obtained.

Prediction is used to compare the obtained results with randomly generated learned data items.

Automatic specification miner that balances the true and false positive specifications.True positive – Required behaviour.False positives – Non-Required behaviour.

Page 6: Measuring the Code Quality Using Software Metrics

DISADVANTAGES

The false positive rates are reduced from 90% to an average of 30%.

The accuracy of the software is only 80%.

The computation time is low.

Page 7: Measuring the Code Quality Using Software Metrics

PROPOSED SYSTEM

Page 8: Measuring the Code Quality Using Software Metrics

PROPOSED SYSTEM

The classification is based on Support Vector Machine Algorithm.

The measured attributes of the software is compared with the training dataset.

The accuracy of the software is calculated.

The False Positive rate for the specific software is also found.

Page 9: Measuring the Code Quality Using Software Metrics

ADVANTAGES

Reduces the burden of manual inspection of the code.

By knowing the quality of the code before the deployment the developers can easily lift the quality.

The accuracy of the software is about 95%. Minimises the false positive rates from 90% to

5%.

Page 10: Measuring the Code Quality Using Software Metrics

BLOCK DIAGRAM

Page 11: Measuring the Code Quality Using Software Metrics

LIST OF MODULES

General Code Quality Metrics.

Code quality of complexity metrics.

Implementation of mining algorithm – Naive Bayes

Algorithm

Implementation of mining algorithm – Support

Vector Machine Algorithm.

Finding the False positive rates using learning model.

Page 12: Measuring the Code Quality Using Software Metrics

GENERAL QUALITY METRICS

The quality of the software is implemented using the following metrics:Code ChurnsCode clonesAuthor RankCode ReadabilityPath FrequencyPath Density

Page 13: Measuring the Code Quality Using Software Metrics

CHIDAMBER & KEMERER METRICS

These are also known as Object Oriented Metrics:Weighted Methods per class (WMC)Depth of Inheritance (DIT)Number of children (NOC)Coupling between Objects (CBO)

Page 14: Measuring the Code Quality Using Software Metrics

PREDICTION ANALYSIS

The dataset will contain the randomly generated learned data items.

Naive Bayes algorithm is used. The measured result of the software is compared

along with the data set. The predicted result for the selected software

will be displayed. Using this result the quality of the code can be

determined.

Page 15: Measuring the Code Quality Using Software Metrics

PREDICTION USING SVM

The measured attributes are compared with the learned dataset.

The accuracy of the for the selected software will be displayed.

The false positive rates are obtained.

Page 16: Measuring the Code Quality Using Software Metrics

GENERAL CODE QUALITY METRICS

Page 17: Measuring the Code Quality Using Software Metrics

CODE QUALITY OF CK METRICS

Page 18: Measuring the Code Quality Using Software Metrics

PREDICTION ANALYSIS

Page 19: Measuring the Code Quality Using Software Metrics

FALSE POSITIVES & ACCURACY USING SVM

Page 20: Measuring the Code Quality Using Software Metrics

COMPARISON OF ACCURACY

Page 21: Measuring the Code Quality Using Software Metrics

COMPARISON OF FALSE POSITIVE RATE

Page 22: Measuring the Code Quality Using Software Metrics

CONCLUSION

Since the quality of the code is checked before deploying the software, the quality of the software will be assured.

The cost spent for maintenance will also be reduced.

Compared to other automatic miners the false positive rate is reduced to a negligible value.

Page 23: Measuring the Code Quality Using Software Metrics

REFERENCES

Measuring Code Quality to improve specification mining – Claire Le Goues.

A study of consistent and inconsistent changes to code clones –Jens Krinke.

Who are are Source code contributers and how do they change? – Massimiliano Di Penta.

The road not taken: Estimating the Path Execution Frequency Statically – Raymond P.L.Buse

Page 24: Measuring the Code Quality Using Software Metrics

THANK YOU!!!