Conference paper Open Access

Reusing Code from StackOverflow: The Effect on Technical Debt

Nikolaos Nikolaidis; Georgios Digkas; Apostolos Ampatzoglou; Alexandros Chatzigeorgiou

MARC21 XML Export

<?xml version='1.0' encoding='UTF-8'?>
<record xmlns="">
  <datafield tag="540" ind1=" " ind2=" ">
    <subfield code="u"></subfield>
    <subfield code="a">Creative Commons Attribution 4.0 International</subfield>
  <datafield tag="260" ind1=" " ind2=" ">
    <subfield code="c">2019-11-21</subfield>
  <controlfield tag="005">20200402082012.0</controlfield>
  <controlfield tag="001">3737095</controlfield>
  <datafield tag="909" ind1="C" ind2="O">
    <subfield code="p">openaire</subfield>
    <subfield code="o"></subfield>
  <datafield tag="520" ind1=" " ind2=" ">
    <subfield code="a">&lt;p&gt;Software reuse is a well-established software engineering process that aims at improving development productivity. Although reuse can be performed in a systematic way (e.g., through product lines), in practice, reuse is performed in many cases opportunistically, i.e., copying small code chunks either from the web or in-house developed projects. Knowledge sharing communities and especially StackOverflow constitute the primary source of code-related information for amateur and professional software developers. Despite the obvious benefit of increased productivity, reuse can have a mixed effect on the quality of the resulting code depending on the properties of the reused solutions. An efficient concept for capturing a wide-range of internal software qualities is the metaphor of Technical Debt which expresses the impact of shortcuts in software development on its maintenance costs. In this paper, we present the results of an empirical study on the relation between the existence of reusing code retrieved from StackOverflow on the technical debt of the target system. In particular, we study several open-source projects and identify non-trivial pieces of code that exhibit a perfect or near-perfect match with code provided in the context of answers in StackOverflow. Then, we compare the technical debt density of the reused fragments, obtained as the ratio of inefficiencies identified by SonarQube over the lines of reused code, to the technical debt density of the target codebase. The results provide insights to the potential impact of small-scale code reuse on technical debt and highlight the benefits of assessing code quality before committing changes to a repository.&lt;/p&gt;</subfield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">University of Macedonia</subfield>
    <subfield code="a">Georgios Digkas</subfield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">University of Macedonia</subfield>
    <subfield code="a">Apostolos Ampatzoglou</subfield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">University of Macedonia</subfield>
    <subfield code="a">Alexandros Chatzigeorgiou</subfield>
  <datafield tag="856" ind1="4" ind2=" ">
    <subfield code="s">132850</subfield>
    <subfield code="z">md5:33e87356c2ac9c5a7940b46f93a0bb36</subfield>
    <subfield code="u"> Code from StackOverflow_The effect on Technical Debt.pdf</subfield>
  <datafield tag="542" ind1=" " ind2=" ">
    <subfield code="l">open</subfield>
  <datafield tag="980" ind1=" " ind2=" ">
    <subfield code="a">publication</subfield>
    <subfield code="b">conferencepaper</subfield>
  <datafield tag="100" ind1=" " ind2=" ">
    <subfield code="u">University of Macedonia</subfield>
    <subfield code="a">Nikolaos Nikolaidis</subfield>
  <datafield tag="041" ind1=" " ind2=" ">
    <subfield code="a">eng</subfield>
  <datafield tag="653" ind1=" " ind2=" ">
    <subfield code="a">Technical Debt; StackOverflow; Code Reuse; Software Quality</subfield>
  <datafield tag="024" ind1=" " ind2=" ">
    <subfield code="a">10.1109/SEAA.2019.00022</subfield>
    <subfield code="2">doi</subfield>
  <datafield tag="245" ind1=" " ind2=" ">
    <subfield code="a">Reusing Code from StackOverflow: The Effect on Technical Debt</subfield>
  <datafield tag="536" ind1=" " ind2=" ">
    <subfield code="c">780572</subfield>
    <subfield code="a">Software Development toolKit for Energy optimization and technical Debt elimination</subfield>
  <datafield tag="650" ind1="1" ind2="7">
    <subfield code="a">cc-by</subfield>
    <subfield code="2"></subfield>
Views 43
Downloads 245
Data volume 32.5 MB
Unique views 37
Unique downloads 242


Cite as