Conference paper Open Access

# Structural Quality Metrics as Indicators of the Long Method Bad Smell: An Empirical Study

Charalampidou, Sofia; Arvanitou, Elvira-Maria; Ampatzoglou, Apostolos; Avgeriou, Paris; Chatzigeorgiou, Alexander; Stamelos, Ioannis

### DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<identifier identifierType="URL">https://zenodo.org/record/3349972</identifier>
<creators>
<creator>
<creatorName>Charalampidou, Sofia</creatorName>
<givenName>Sofia</givenName>
<familyName>Charalampidou</familyName>
<affiliation>Department of Computer Science, University of Groningen, Netherlands</affiliation>
</creator>
<creator>
<creatorName>Arvanitou, Elvira-Maria</creatorName>
<givenName>Elvira-Maria</givenName>
<familyName>Arvanitou</familyName>
<affiliation>Department of Applied Informatics, University of Macedonia, Thessaloniki, Greece</affiliation>
</creator>
<creator>
<creatorName>Ampatzoglou, Apostolos</creatorName>
<givenName>Apostolos</givenName>
<familyName>Ampatzoglou</familyName>
<affiliation>Department of Applied Informatics, University of Macedonia, Thessaloniki, Greece</affiliation>
</creator>
<creator>
<creatorName>Avgeriou, Paris</creatorName>
<givenName>Paris</givenName>
<familyName>Avgeriou</familyName>
<affiliation>Department of Computer Science, University of Groningen, Netherlands</affiliation>
</creator>
<creator>
<creatorName>Chatzigeorgiou, Alexander</creatorName>
<givenName>Alexander</givenName>
<familyName>Chatzigeorgiou</familyName>
<affiliation>Department of Applied Informatics, University of Macedonia, Thessaloniki, Greece</affiliation>
</creator>
<creator>
<creatorName>Stamelos, Ioannis</creatorName>
<givenName>Ioannis</givenName>
<familyName>Stamelos</familyName>
<affiliation>Department of Informatics, Aristotle University, Thessaloniki, Greece</affiliation>
</creator>
</creators>
<titles>
<title>Structural Quality Metrics as Indicators of the Long Method Bad Smell: An Empirical Study</title>
</titles>
<publisher>Zenodo</publisher>
<publicationYear>2018</publicationYear>
<dates>
<date dateType="Issued">2018-10-22</date>
</dates>
<resourceType resourceTypeGeneral="ConferencePaper"/>
<alternateIdentifiers>
<alternateIdentifier alternateIdentifierType="url">https://zenodo.org/record/3349972</alternateIdentifier>
</alternateIdentifiers>
<relatedIdentifiers>
<relatedIdentifier relatedIdentifierType="DOI" relationType="IsIdenticalTo">10.1109/SEAA.2018.00046</relatedIdentifier>
</relatedIdentifiers>
<rightsList>
<rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
</rightsList>
<descriptions>
<description descriptionType="Abstract">&lt;p&gt;Empirical evidence has pointed out that Extract Method refactorings are among the most commonly applied refactorings by software developers. The identification of Long Method code smells and the ranking of the associated refactoring opportunities is largely based on the use of metrics, primarily with measures of cohesion, size and coupling. Despite the relevance of these proper-ties to the presence of large, complex and non-cohesive pieces of code, the empirical validation of these metrics has exhibited relatively low accuracy (max precision: 66%) regarding their predictive power for long methods or extract method opportunities. In this work we perform an empirical validation of the ability of cohesion, coupling and size metrics to predict the existence and the intensity of long method occurrences. According to the statistical analysis, the existence and the intensity of the Long Method smell can be effectively predicted by two size (LoC and NoLV), two coupling (MPC and RFC), and four cohesion (LCOM1, LCOM2, Coh, and CC) metrics. Furthermore, the integration of these metrics into a multiple logistic regression model can predict whether a method should be refactored with a precision of 89% and a recall of 91%. The model yields suggestions whose ranking is strongly correlated to the ranking based on the effect of the corresponding refactorings on source code (correl. coef. 0.520). The results are discussed by providing interpretations and implications for research and practice.&lt;/p&gt;</description>
</descriptions>
<fundingReferences>
<fundingReference>
<funderName>European Commission</funderName>
<funderIdentifier funderIdentifierType="Crossref Funder ID">10.13039/501100000780</funderIdentifier>
<awardNumber awardURI="info:eu-repo/grantAgreement/EC/H2020/780572/">780572</awardNumber>
<awardTitle>Software Development toolKit for Energy optimization and technical Debt elimination</awardTitle>
</fundingReference>
</fundingReferences>
</resource>

53
103
views