ce.re.s: an eclipse plug-in to evaluate source code readability

34
CE.RE.S: Un plug-in Eclipse per valutare la Leggibilità del codice sorgente UNIVERSITÀ DEGLI STUDI DEL MOLISE DIPARTIMENTO DI BIOSCIENZE E TERRITORIO CORSO DI LAUREA IN INFORMATICA Tesi di Laurea in Ingegneria del software e laboratorio ANNO ACCADEMICO 2012-2013 Relatore: Chiar.mo Rocco Oliveto Candidata: Catolino Gemma Matricola 142524

Upload: gemma-catolino

Post on 06-Aug-2015

81 views

Category:

Software


3 download

TRANSCRIPT

CE.RE.S: Un plug-in Eclipse per valutare la Leggibilità del codice sorgente

UNIVERSITÀ DEGLI STUDI DEL MOLISE

DIPARTIMENTO DI BIOSCIENZE E TERRITORIO

CORSO DI LAUREA IN INFORMATICA

Tesi di Laurea in Ingegneria del software e laboratorio

ANNO ACCADEMICO 2012-2013

Relatore:Chiar.moRocco Oliveto

Candidata:Catolino GemmaMatricola 142524

Code readability

Code readability

CE.RE.S: An eclipse plug-in to monitoring

source code readability

Code readability

CE.RE.S: An eclipse plug-in to monitoring

source code readability

Empirical Evaluation

Software life cycle

but software development never stops!

Maintenance costs are

55%-75% more than development costs

Maintenance costs are

Good documentation

Source code = primary Documentation

Readability“is how easily you read the

words, as in long passages of text.There are very different

requirements in each case, depending on the visibility of the text and the level ofexperience of the reader”

Readability can be measured…

Buse e Weimer

Readability prediction modelcode based on structural factors

CODE INDENTATION

LENGTH OF STATEMENT

NUMBER OF BRACKETS

syntax + semantics

Scalabrino et al.

Semantics in Scalabrino et al. metric

CONSISTENCY BETWEEN SOURCE CODE AND COMMENTS

CORRECT DENOMINATIONOF THE IDENTIFIER

Problem…

…Solution!

…Solution!

LIVE DEMO

Empirical evaluation

Participant10 STUDENTS

2 INDUSTRIAL DEVELOPERS

Design

Experimental

Group1 Group2 Group3 Group4

Lab1 T1 - NOPlug-in T1 - Plug-in T2 - NOPlug-in T2 - Plug-in

Lab2 T2 - Plug-in T2 - NOPlug-in T1 - Plug-in T1 - NOPlug-in

Results: Readability Index

Results: Readability Index

Results: Readability Index

Statistically Significant

Frequence Analysis

Frequence Analysis

0-5 volte 5-10 volte >10 volte

Checklist

Questions about identifiers

Checklist

Questions about comments

Questions about identifiers

Checklist

Questions about comments

Questions about identifiers

Questions about source structure