Standard

The last line effect explained. / Beller, Moritz; Zaidman, Andy; Karpov, Andrey; Zwaan, Rolf A.

In: Empirical Software Engineering, Vol. 22, No. 3, 06.2017, p. 1508-1536.

Research output: Scientific - peer-reviewArticle

Harvard

Beller, M, Zaidman, A, Karpov, A & Zwaan, RA 2017, 'The last line effect explained' Empirical Software Engineering, vol 22, no. 3, pp. 1508-1536. DOI: 10.1007/s10664-016-9489-6

APA

Beller, M., Zaidman, A., Karpov, A., & Zwaan, R. A. (2017). The last line effect explained. Empirical Software Engineering, 22(3), 1508-1536. DOI: 10.1007/s10664-016-9489-6

Vancouver

Beller M, Zaidman A, Karpov A, Zwaan RA. The last line effect explained. Empirical Software Engineering. 2017 Jun;22(3):1508-1536. Available from, DOI: 10.1007/s10664-016-9489-6

Author

Beller, Moritz; Zaidman, Andy; Karpov, Andrey; Zwaan, Rolf A. / The last line effect explained.

In: Empirical Software Engineering, Vol. 22, No. 3, 06.2017, p. 1508-1536.

Research output: Scientific - peer-reviewArticle

BibTeX

@article{9f43b6dfe66b4f068a65a71de350a859,
title = "The last line effect explained",
keywords = "Clone detection, Code clones, Interdisciplinary work, Last line effect, Micro-clones, Psychology",
author = "Moritz Beller and Andy Zaidman and Andrey Karpov and Zwaan, {Rolf A.}",
year = "2017",
month = "6",
doi = "10.1007/s10664-016-9489-6",
volume = "22",
pages = "1508--1536",
journal = "Empirical Software Engineering",
issn = "1382-3256",
publisher = "Springer Netherlands",
number = "3",

}

RIS

TY - JOUR

T1 - The last line effect explained

AU - Beller,Moritz

AU - Zaidman,Andy

AU - Karpov,Andrey

AU - Zwaan,Rolf A.

PY - 2017/6

Y1 - 2017/6

N2 - Micro-clones are tiny duplicated pieces of code; they typically comprise only few statements or lines. In this paper, we study the “Last Line Effect,” the phenomenon that the last line or statement in a micro-clone is much more likely to contain an error than the previous lines or statements. We do this by analyzing 219 open source projects and reporting on 263 faulty micro-clones and interviewing six authors of real-world faulty micro-clones. In an interdisciplinary collaboration, we examine the underlying psychological mechanisms for the presence of these relatively trivial errors. Based on the interviews and further technical analyses, we suggest that so-called “action slips” play a pivotal role for the existence of the last line effect: Developers’ attention shifts away at the end of a micro-clone creation task due to noise and the routine nature of the task. Moreover, all micro-clones whose origin we could determine were introduced in unusually large commits. Practitioners benefit from this knowledge twofold: 1) They can spot situations in which they are likely to introduce a faulty micro-clone and 2) they can use PVS-Studio, our automated micro-clone detector, to help find erroneous micro-clones.

AB - Micro-clones are tiny duplicated pieces of code; they typically comprise only few statements or lines. In this paper, we study the “Last Line Effect,” the phenomenon that the last line or statement in a micro-clone is much more likely to contain an error than the previous lines or statements. We do this by analyzing 219 open source projects and reporting on 263 faulty micro-clones and interviewing six authors of real-world faulty micro-clones. In an interdisciplinary collaboration, we examine the underlying psychological mechanisms for the presence of these relatively trivial errors. Based on the interviews and further technical analyses, we suggest that so-called “action slips” play a pivotal role for the existence of the last line effect: Developers’ attention shifts away at the end of a micro-clone creation task due to noise and the routine nature of the task. Moreover, all micro-clones whose origin we could determine were introduced in unusually large commits. Practitioners benefit from this knowledge twofold: 1) They can spot situations in which they are likely to introduce a faulty micro-clone and 2) they can use PVS-Studio, our automated micro-clone detector, to help find erroneous micro-clones.

KW - Clone detection

KW - Code clones

KW - Interdisciplinary work

KW - Last line effect

KW - Micro-clones

KW - Psychology

UR - http://resolver.tudelft.nl/uuid://6df-e66b-4f06-8a65-a71de350a859

UR - http://www.scopus.com/inward/record.url?scp=85007482467&partnerID=8YFLogxK

U2 - 10.1007/s10664-016-9489-6

DO - 10.1007/s10664-016-9489-6

M3 - Article

VL - 22

SP - 1508

EP - 1536

JO - Empirical Software Engineering

T2 - Empirical Software Engineering

JF - Empirical Software Engineering

SN - 1382-3256

IS - 3

ER -

ID: 13457312