<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards Studying the Evolution of Technical Debt in the Python Projects from the Apache Software Ecosystem</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jie Tan</string-name>
          <email>j.tan@rug.nl</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mircea Lungu</string-name>
          <email>mircea.lungu@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Paris Avgeriou</string-name>
          <email>paris@cs.rug.nl</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>IT University of Copenhagen</institution>
          ,
          <addr-line>Copenhagen</addr-line>
          ,
          <country country="DK">Denmark</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Groningen</institution>
          ,
          <addr-line>Groningen, The Netherland</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>-The topic of technical debt has gained significant attention from researchers in recent years since its management has significant impact of software development. Several studies that analyze technical debt evolution from different perspectives; however since most of these studies are done for Java very little is known about the evolution of technical debt in software ecosystems consisting of projects written in other languages. In this paper we run a study across nine Python open-source software projects belonging to the Apache Software Foundation to investigate the amount of technical debt that is paid back. To measure technical debt we use one of the standard tools in industry: SonarQube. We investigate the impact of using the 28 default rules of SonarQube for Python versus using an extended set of 208 rules to detect instances of technical debt. Index Terms-Software Evolution, Technical Debt, Software Ecosystems II. STUDY DESIGN</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>
        Technical debt is a metaphor introduced by Ward
Cunningham to explain the unavoidable interests developer pay while
getting the short-term benefits [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        There have been several studies that analyzed technical debt
for developing techniques and tools to detect specific types of
technical debt, such as code smells [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] or self-admitted
technical debt [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. 1) What is the difference of technical debt types between
      </p>
      <p>
        Olbrich et al. [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] investigated two code smells and analyze default rules and extend rules? This RQ aims to find
historical data over several years of development of two large the change results after using SonarQube plugins, and
scale open source systems. to explain why we should use the extended rules.
      </p>
      <p>
        Software ecosystems are groups of projects that co-evolve 2) What is the fixing prevalence of different issue types?
together in the same environment [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Although there has This RQ investigates how prevalent the technical debt is
been a flurry of research activity in studying software ecosys- in open source systems.
tems, there has been little work focusing on analyzing the
evolution of technical debt at the ecosystem level. In one of A. Project Selection
the few such works, Digkas et al. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] studied the evolution
of technical debt in 66 Java projects over a period of 5 The GitHub repository of the Apache Software Foundation
years. They used SonarQube to investigate how technical contains projects in more than 30 languages. 38 out of 1574
debt evolved and what types of issues included. In a follow Apache projects are written in Python. We use two elements
up work, they selected 57 Java projects from the Apache to select Python projects from the Apache ecosystem:
ecosystem, focusing on the amount of technical debt that is 1) Size: at least 100 classes
paid back and the issues that are fixed [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. 2) Evolution: at least two years and 1000 git commits
      </p>
      <p>
        However, to the best of our knowledge, there is no study Table 1 shows the nine projects that are left after applying
focuses on technical debt evolution in a Python ecosystem. these inclusion criteria:
Given the pre-eminence of the Python programming language
at the current moment and the lack of technical debt studies
for systems written in the language, we decide to extend the
previous work of Digkas which analyzed the Java projects
from the Apache ecosystem [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] by analyzing the Python
projects from the same ecosystem.
      </p>
      <p>Various techniques have been proposed for detecting
technical debt. However, since our work does not focus on the
detection aspect, we use SonarQube, a third party tool for this
purpose. The tool is one of the most popular industrial tools for
source code technical debt measurement and reporting and has
been used also in the study of the Java systems in the Apache
ecosystem.</p>
      <p>The goal of our study is to investigate the types of issues
that have been fixed during the evolution of Python projects in
the Apache ecosystem and the differences between Java and
Python, also comparing the types of technical debt between
default rules and extended rules (rules for Python debt that
must be manually enabled in SonarQube). To this end, we ask
two research questions:</p>
      <p>TABLE I</p>
      <p>SELECTED PROJECTS</p>
      <sec id="sec-1-1">
        <title>B. Data Extraction</title>
        <p>To study the evolution of a large number of systems over
an extended period, one must make a trade-off between the
granularity of the analysis and the feasibility of the analysis
(e.g. analyzing all the versions of all the nine selected systems
with SonarQube could easily take many months since the tool
has no possibility of performing an incremental analysis, but
instead, with every commit the system is fully analyzed as
a whole). In this study, we analyze weekly versions of each
project.</p>
        <p>Figure 1 shows the main steps of the data extraction process
that we follow in this work:
1) We clone the GitHub repositories of the Python projects
in the Apache Ecosystem and analyze the version
repository of all the cloned systems
2) We use the two criteria of size and evolution to select
Python projects from the Apache ecosystem. We are left
with 9 projects.
3) We analyze the entire change history of each project
with a weekly resolution by using SonarQube with the
default rules (28 rules)
4) We also analyze the history of every project a second
time with an extended set of all the possible rules for
Python (208 rules).</p>
        <p>In this context we want to study the evolution of technical
debt fixes.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>III. PRELIMINARY RESULTS</title>
      <p>Analyzing multiple versions of a project with SonarQube is
a very time consuming activity, since SonarQube can not reuse
results from the analysis of a previous version, so the time
required for analysis is proportional to the number of versions
that are being analyzed. This slows down the speed with which
the analysis can be done. This is why in this remainder of this
paper we only look at one project: qpid-python but we plan
to update the report as the results from the other systems are
flowing in.</p>
      <p>A. What is the difference of technical debt types between
default rules and extend rules?(RQ1)</p>
      <p>When we used the extra plugins of SonarQube and added all
the corresponding rules, the number of rules that appear both
in Python and Java increased to 27. Thus, using the SonarQube
plugin will increase the comparability and we encourage other
researchers to do it.
Table II presents the unresolved and fixed issues for nine
Python projects, and compares the number of issues between
default rules and extended rules for each project.
B. What is the fixing prevalence of different issue types?(RQ2)</p>
      <p>To quantify how much TD exists and investigate how
prevalent the TD is in both all projects and each project, we
use the 208 extended rules of SonarQube. A subset of 126 out
of 208 rules are found in the nine selected Python projects.</p>
      <p>To answer this RQ, we sum up all the issues, without
differentiating among projects. The histogram of Figure 3
presents the distribution of the number of issues for each type:
each vertical bar is an issue type, and its height is proportional
to the number of issues of that type. The figure shows a
strongly skewed distribution where some of issue types are
introduced frequently but more than half of the issue types
are introduced rarely.</p>
      <p>The strongly skewed distribution of fixed issues types for
is the same for both Python and Java.</p>
      <sec id="sec-2-1">
        <title>C. Conclusions and Future Work</title>
        <p>We have seen that SonarQube has different issue types for
Java projects and Python projects. Out of these 27 rules appear
both in Python and Java. Even if the majority of the issues are
different, the distribution of issue types that are being fixed is
similar: a strongly skewed distribution with several issue types
being introduced frequently and more than half of the issue
types being introduced very rarely.</p>
        <p>In the future work, we plan to explore in more detail the
differences and similarities between Python and Java from the
point of view of technical debt evolution. Especially we plan
to investigate the types of issues that have been fixed during
the evolution of Python projects and the amount of TD that is
paid back.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>W.</given-names>
            <surname>Cunningham</surname>
          </string-name>
          , “
          <article-title>The wycash portfolio management system,” in Addendum to the Proceedings on Object-oriented Programming Systems, Languages, and Applications (Addendum), ser</article-title>
          .
          <source>OOPSLA '92</source>
          . New York, NY, USA: ACM,
          <year>1992</year>
          , pp.
          <fpage>29</fpage>
          -
          <lpage>30</lpage>
          . [Online]. Available: http://doi.acm.
          <source>org/10</source>
          .1145/157709.157715
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>P.</given-names>
            <surname>Kruchten</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Nord</surname>
          </string-name>
          ,
          <string-name>
            <surname>and I. Ozkaya</surname>
          </string-name>
          , “
          <article-title>Technical debt: From metaphor to theory and practice</article-title>
          ,
          <source>” IEEE Software</source>
          , vol.
          <volume>29</volume>
          , no.
          <issue>6</issue>
          , pp.
          <fpage>18</fpage>
          -
          <lpage>21</lpage>
          ,
          <year>Nov 2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>F.</given-names>
            <surname>Palomba</surname>
          </string-name>
          , G. Bavota,
          <string-name>
            <given-names>M. D.</given-names>
            <surname>Penta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Oliveto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Poshyvanyk</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A. D.</given-names>
            <surname>Lucia</surname>
          </string-name>
          , “
          <article-title>Mining version histories for detecting code smells</article-title>
          ,
          <source>” IEEE Transactions on Software Engineering</source>
          , vol.
          <volume>41</volume>
          , no.
          <issue>5</issue>
          , pp.
          <fpage>462</fpage>
          -
          <lpage>489</lpage>
          , May
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>N.</given-names>
            <surname>Moha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Gueheneuc</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Duchien</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A. L.</given-names>
            <surname>Meur</surname>
          </string-name>
          , “
          <article-title>Decor: A method for the specification and detection of code and design smells</article-title>
          ,
          <source>” IEEE Transactions on Software Engineering</source>
          , vol.
          <volume>36</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>20</fpage>
          -
          <lpage>36</lpage>
          ,
          <year>Jan 2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Potdar</surname>
          </string-name>
          and
          <string-name>
            <surname>E. Shihab,</surname>
          </string-name>
          “
          <article-title>An exploratory study on self-admitted technical debt</article-title>
          ,” in
          <source>2014 IEEE International Conference on Software Maintenance and Evolution, Sept</source>
          <year>2014</year>
          , pp.
          <fpage>91</fpage>
          -
          <lpage>100</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>G.</given-names>
            <surname>Bavota</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Russo</surname>
          </string-name>
          , “
          <article-title>A large-scale empirical study on self-admitted technical debt</article-title>
          ,” in
          <source>2016 IEEE/ACM 13th Working Conference on Mining Software Repositories (MSR)</source>
          ,
          <source>May</source>
          <year>2016</year>
          , pp.
          <fpage>315</fpage>
          -
          <lpage>326</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>E. d. S.</given-names>
            <surname>Maldonado</surname>
          </string-name>
          , E. Shihab, and
          <string-name>
            <given-names>N.</given-names>
            <surname>Tsantalis</surname>
          </string-name>
          , “
          <article-title>Using natural language processing to automatically detect self-admitted technical debt</article-title>
          ,
          <source>” IEEE Transactions on Software Engineering</source>
          , vol.
          <volume>43</volume>
          , no.
          <issue>11</issue>
          , pp.
          <fpage>1044</fpage>
          -
          <lpage>1062</lpage>
          ,
          <year>Nov 2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>M.</given-names>
            <surname>Yan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Xia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Shihab</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Yin</surname>
          </string-name>
          , and
          <string-name>
            <given-names>X.</given-names>
            <surname>Yang</surname>
          </string-name>
          , “
          <article-title>Automating change-level self-admitted technical debt determination</article-title>
          ,
          <source>” IEEE Transactions on Software Engineering</source>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>1</lpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>S.</given-names>
            <surname>Olbrich</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Cruzes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Basili</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Zazworka</surname>
          </string-name>
          , “
          <article-title>The evolution and impact of code smells: A case study of two open source systems,” in 2009 3rd International Symposium on Empirical Software Engineering</article-title>
          and Measurement,
          <source>Oct</source>
          <year>2009</year>
          , pp.
          <fpage>390</fpage>
          -
          <lpage>400</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.</given-names>
            <surname>Lungu</surname>
          </string-name>
          , “Reverse engineering software ecosystems,
          <source>” Ph.D. dissertation</source>
          , University of Lugano, Nov.
          <year>2009</year>
          . [Online]. Available: http://scg.unibe.ch/archive/papers/Lung09b.pdf
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>G.</given-names>
            <surname>Digkas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lungu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Chatzigeorgiou</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Avgeriou</surname>
          </string-name>
          , “
          <article-title>The evolution of technical debt in the apache ecosystem</article-title>
          ,
          <source>” in Software Architecture</source>
          . Springer International Publishing,
          <year>2017</year>
          , pp.
          <fpage>51</fpage>
          -
          <lpage>66</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>G.</given-names>
            <surname>Digkas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lungu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Avgeriou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Chatzigeorgiou</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Ampatzoglou</surname>
          </string-name>
          , “
          <article-title>How do developers fix issues and pay back technical debt in the apache ecosystem?</article-title>
          ”
          <source>in 2018 IEEE 25th International Conference on Software Analysis, Evolution and Reengineering</source>
          (SANER),
          <year>March 2018</year>
          , pp.
          <fpage>153</fpage>
          -
          <lpage>163</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>