<!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>Analyzing Structural Software Changes: A Case Study</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Črt Gerlec</string-name>
          <email>crt.gerlec@uni-mb.si</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>BCI'12, September 16-20, 2012, Novi Sad, Serbia.</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marjan Heričko</string-name>
          <email>marjan.hericko@uni-mb.si</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Copyright © 2012 by the paper's authors. Copying permitted only for private and</institution>
          ,
          <addr-line>academic purposes. This volume is published and copyrighted by its editors., Local Proceedings also appeared in ISBN 978-86-7031-200-5</addr-line>
          ,
          <institution>Faculty of Sciences, University of Novi Sad.</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Institute of Informatics, Faculty of Electrical Engineering and Computer</institution>
          ,
          <addr-line>Science</addr-line>
          ,
          <institution>University of Maribor</institution>
          ,
          <addr-line>Smetanova ulica 17, 2000 Maribor</addr-line>
          ,
          <country country="SI">Slovenia</country>
        </aff>
      </contrib-group>
      <fpage>117</fpage>
      <lpage>120</lpage>
      <abstract>
        <p>Software engineers strive to understand software's evolution and make software better and more reliable. In the last decade, software's life cycle became an interesting research area. However, software evolution could be analyzed from different aspects. In the study, we focused on analyzing structural software changes between software's versions. We used the WatiN project and observed its structural changes during the. The research showed that the number of structural source code changes increased near the release dates.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Structural source code changes</kwd>
        <kwd>code churn</kwd>
        <kwd>software evolution</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Software repositories are widely accepted software versioning and
revision control systems in software engineering environment.
They track changes that were done to a documents and a source
code of a software system. Each change, which was done by a
developer, is stored into a central repository. With other words,
repositories contain a lot of information[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ][
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and represent an
archive of development facts. Therefore, such repositories allow
researchers to analyze software evolution and reveal how a
software systems and their structure are changing over time.
The motivation driving this study is to analyze structural software
evolution between versions. Our aim is to check in what extent is
software’s structure changing over time. Especially, we will
observe changes made close to the software’s releases. The
research could reveal some development patterns that are made
before and after the software’s releases.
      </p>
      <p>The research is structured as follows. The section 2 presents a
related work. Then, an essential background of the study is
introduced in the chapter 3. The section 4 describes the research
process and presents the results. In the last section we conclude
our findings and describe a future work.</p>
    </sec>
    <sec id="sec-2">
      <title>2. RELATED WORK</title>
      <p>
        Software change evolution is an interesting research topic.
Therefore, we can find various analyses regarding the evolution
of software changes. Fluri and Gall[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] have developed an
approach for analyzing and classifying change types based on
code revisions. The approach differentiates between several types
of changes on the method or class level. In the study, conducted
by Confora et al.[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], a technique for identifying a CVS changes is
presented. A technique detects modified lines where non-relevant
added or deleted lines are excluded. For identifying line changes
they used the Levenshtein edit distance algorithm and presented
the technique in a case study. Research in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] presented an
approach for tracking a source code change evolution based on an
algorithm that overcomes the Unix diff’s versioning limitation. It
is oriented towards software syntax and entity modifications.
Hall and Munson have presented an idea how to assess the
amount of change in the complexity of the system across
successive software builds[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The idea resulted in defining a code
delta and a code churn. E. Ginger et al.[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] compared fine-grained
source code changes and code churn in order to predict bugs in
software system. They analyzed source code changes and used
machine learning algorithms to empirically evaluate the
performance of the approaches. The research, conducted by
Nagappan and Ball[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], presented a set of relative code churn
measures that relate the amount of churn to other variables like
component size or temporal extent of churn. Finally, they
compared absolute and relative measures together. The study in
[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] also used code churn approach. Authors used object-oriented
code metrics, xml code metrics and organizational metrics to
predict yearly cumulative code churn of software projects. Results
showed that code metrics and xml metrics are complementary to
organizational metrics in order to estimate code churn. The
research in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] presented a change burst. The term represents a
code fragments that are continuously changed over some period
of time. It is defined with a gap size and a burst size.
Arbuckle[
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] presented an approach for measuring evolution of a
multi-language software system. He avoids difficulties related to
syntax, semantics and language paradigms by looking directly at
relative shared information content. The approach measures a
relative number of bits of shared binary information between
artifacts of consecutive releases.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. ANALYZING SOFTWARE CHANGES</title>
    </sec>
    <sec id="sec-4">
      <title>3.1 Measuring Code Churn</title>
      <p>
        The field of software change analysis has become very interesting
research area in the last years. First analysis used single
software’s snapshot to evaluate software quality. Today, studies
are focused on a whole software development life cycle where
software repositories are analyzed. The important study was
conducted by Hall and Munson[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. They defined the code churn
approach. Today, it is widely used in the field of evaluating
software evolution and it is defined as follows:
,
ABC – represents a metric,
- represents a set of modules in both version,
- represents set of added modules,
- represents set of removed modules,
and
      </p>
      <p>- represents added and removed module and
- represents the value of ABC metric for module c in
the jth version.</p>
      <p>Several studies used code churn and made some modifications to
the definition above. For example, the code churn, that basis on
lines of code, is frequently calculated just with a summation of
added and deleted lines.</p>
    </sec>
    <sec id="sec-5">
      <title>3.2 Measuring Structural Source Code</title>
    </sec>
    <sec id="sec-6">
      <title>Changes</title>
      <p>The goal of our study was to analyze structural software changes
during software’s evolution. We defined a structural change as a
change that transforms an object-oriented element (e.g. class,
method, field).</p>
      <p>We developed a tool that extracts software’s versions from
software repositories. Then, a special mechanism is used in order
to detect structural software changes from successive versions. It
uses different rules that are applied on a source code. The tool and
its process of detecting structural software changes are presented
in [14].</p>
      <p>
        The tool for identifying source code changes supports several
change types described in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. The supported change types are:
add parameter, field and method,
remove parameter, field and method,
hide and unhide method,
rename method,
move attribute, method and class,
extract superclass, interface and class
pull up field and method,
push down field and method and
inline class.
where:
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
      </p>
      <p>In order to cover as many change types as possible, we added
additional types to the list above. Additional types are add
property, remove property, move property, pull up property, push
down property and method body change. We added property
changes in order to support the C# programming language.
However, the language has a special object-oriented construct for
properties. On the other hand, the Java programming language
supports properties by defining an attribute and corresponding
getter and setter methods.</p>
    </sec>
    <sec id="sec-7">
      <title>4. THE RESEARCH</title>
      <p>In the research, we analyzed WatiN project[15]. It is an
opensource toolkit that is used to automate browser-based tests during
software development. However, the toolkit is in development for
more than 6 years and therefore contains lot of information in its
software repository.</p>
      <p>We extracted 1216 revisions from software’s repository and
analyzed them. We identified 587 source code files that were
changed during the evolution. The source code was committed
into the repository by 6 different developers and our change
detection process identified 10898 structural source code changes.
The table 1 shows the project’s properties.
We grouped structural code changes in 5 different groups. Each
group measures an extent of a code change. In the first three
groups we used simplified code churn approach in order to
evaluate a change extent of fields, properties and methods. We
calculated them as follows:
In the other two groups we just count the changes that moved
different object-oriented constructs (i.e. move attribute, move
method, move class) and count changes that were applied beyond
the classes (i.e. extract superclass, extract interface, extract class,
pull up field, property and method and push down field, property
and method).</p>
      <p>The figure 1 and figure 2 show the extent of changes made during
the project’s evolution. The latter figure shows a method changes
during the evolution. On the other hand, the figure 1 shows other
changes (e.g. field, property changes). The red dots represent the
software’s releases. The analysis showed that the method churn is
much higher than other churns and changes. However, such an
evolution was expected.
The study also showed that in the first three releases (i.e. 0.6, 0.7,
0.8) there were lot of different type of changes. Beside field,
property and method churn there were also changes that act
beyond the classes. The latter changes could indicate on a
restructuring in the software. The next interesting note is the high
field churn before the release 0.9. Furthermore, the most changes
were done between the releases 1.0 and 1.3. Beside changes in
fields, properties and methods, there were also the move changes.
We can assume that the release 1.3 was an important milestone in
the project’s evolution. Before the last two releases (i.e. 2.0 and
2.1), the change activity become more balanced. There are just
three cases where the change activity (i.e. field churn, property
and method churn) was high.</p>
      <p>The figures also show that the change activity increased near the
milestones (before and after). Such a pattern is recognized for all
releases in the WatiN project. In general, there were a lot of
changes in fields, properties and methods. On the other hand, we
also detected some move and the “beyond class” changes. Such
changes indicate that source code was refactored during the
project’s evolution.</p>
    </sec>
    <sec id="sec-8">
      <title>5. CONCLUSION</title>
      <p>In the research, the WatiN’s structural evolution was analyzed.
We observed the extent of changes made during the development
life cycle and near the project’s releases. We can conclude that
structural change activity increased near the milestones. The
highest change activity was detected between the versions 1.0 and
1.3. We assume that this release represents an important milestone
in the project’s evolution. After this release the change activity
became more balanced. However, beside the basic changes (e.g.
field, property and method changes), we also detected complex
changes (e.g. beyond class and move changes) that indicate on a
refactoring processes.</p>
      <p>In the future work we would like to evaluate a correlation
between a structural source code changes and a software quality
(e.q. number of bugs) and use a machine learning algorithms to
predicts software’s quality.
[15] The WatiN project, http://watin.org/.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Nagappan</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zeller</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zimmermann</surname>
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Herzig</surname>
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Murphy</surname>
            <given-names>B.</given-names>
          </string-name>
          <year>2010</year>
          .
          <article-title>Change Bursts as Defect Predictors</article-title>
          .
          <source>In Proceedings of the 2010 IEEE 21st International Symposium on Software Reliability Engineering (ISSRE '10)</source>
          ,
          <fpage>309</fpage>
          -
          <lpage>318</lpage>
          , DOI=http://dx.doi.org/10.1109/ISSRE.
          <year>2010</year>
          .
          <volume>25</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Kagdi</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Collard</surname>
            <given-names>M. L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maletic</surname>
            <given-names>J. I.</given-names>
          </string-name>
          <year>2007</year>
          .
          <article-title>A survey and taxonomy of approaches for mining software repositories in the context of software evolution</article-title>
          .
          <source>J. Softw. Maint. Evol</source>
          .
          <volume>19</volume>
          ,
          <issue>2</issue>
          (March
          <year>2007</year>
          ),
          <fpage>77</fpage>
          -
          <lpage>131</lpage>
          . DOI=http://dx.doi.org/10.1002/smr.344.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Fischer</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pinzger</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gall</surname>
            <given-names>H.</given-names>
          </string-name>
          <year>2003</year>
          .
          <article-title>Populating a Release History Database from Version Control and Bug Tracking Systems</article-title>
          .
          <source>In Proceedings of the International Conference on Software Maintenance (ICSM '03)</source>
          . IEEE Computer Society, Washington, DC, USA.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Hall</surname>
            <given-names>G. A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Munson</surname>
            <given-names>J. C.</given-names>
          </string-name>
          <year>2000</year>
          .
          <article-title>Software evolution: code delta and code churn</article-title>
          ,
          <source>Journal of Systems and Software</source>
          , Volume
          <volume>54</volume>
          ,
          <string-name>
            <surname>Issue</surname>
            <given-names>2</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pages</surname>
          </string-name>
          111-
          <fpage>118</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Fluri</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Gall</surname>
            ,
            <given-names>H.C.</given-names>
          </string-name>
          <year>2006</year>
          .
          <article-title>Classifying Change Types for Qualifying Change Couplings</article-title>
          .
          <source>In Proceedings of the 14th IEEE International Conference on Program Comprehension (ICPC '06)</source>
          . IEEE Computer Society, Washington, DC, USA,
          <fpage>35</fpage>
          -
          <lpage>45</lpage>
          . DOI=http://dx.doi.org/10.1109/ICPC.
          <year>2006</year>
          .
          <volume>16</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Canfora</surname>
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cerulo</surname>
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Di Penta</surname>
            <given-names>M.</given-names>
          </string-name>
          <year>2007</year>
          .
          <article-title>Identifying Changed Source Code Lines from Version Repositories</article-title>
          .
          <source>In Proceedings of the Fourth International Workshop on Mining Software Repositories (MSR '07)</source>
          . IEEE Computer Society, Washington, DC, USA, DOI=http://dx.doi.org/10.1109/MSR.
          <year>2007</year>
          .
          <volume>14</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Canfora</surname>
            <given-names>G</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cerulo</surname>
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Di Penta</surname>
            <given-names>M..</given-names>
          </string-name>
          <year>2009</year>
          .
          <article-title>Tracking Your Changes: A Language-Independent Approach</article-title>
          . IEEE Softw.
          <volume>26</volume>
          ,
          <issue>1</issue>
          (
          <year>January 2009</year>
          ),
          <fpage>50</fpage>
          -
          <lpage>57</lpage>
          . DOI=http://dx.doi.org/10.1109/MS.
          <year>2009</year>
          .
          <volume>26</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Giger</surname>
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pinzger</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gall</surname>
            <given-names>H. C..</given-names>
          </string-name>
          <year>2011</year>
          .
          <article-title>Comparing finegrained source code changes and code churn for bug prediction</article-title>
          .
          <source>In Proceedings of the 8th Working Conference on Mining Software Repositories (MSR '11)</source>
          . ACM, New York, NY, USA,
          <fpage>83</fpage>
          -
          <lpage>92</lpage>
          . DOI=http://doi.acm.
          <source>org/10</source>
          .1145/1985441.1985456.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Nagappan</surname>
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ball</surname>
            <given-names>T.</given-names>
          </string-name>
          <year>2005</year>
          .
          <article-title>Use of relative code churn measures to predict system defect density</article-title>
          .
          <source>In Proceedings of the 27th international conference on Software engineering (ICSE '05)</source>
          . ACM, New York, NY, USA,
          <fpage>284</fpage>
          -
          <lpage>292</lpage>
          . DOI=http://doi.acm.
          <source>org/10</source>
          .1145/1062455.1062514.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Karus S. Dumas</surname>
            <given-names>M.</given-names>
          </string-name>
          <year>2012</year>
          .
          <article-title>Code churn estimation using organisational and code metrics: An experimental comparison</article-title>
          .
          <source>Inf. Softw. Technol</source>
          .
          <volume>54</volume>
          ,
          <issue>2</issue>
          (
          <year>February 2012</year>
          ),
          <fpage>203</fpage>
          -
          <lpage>211</lpage>
          . DOI=http://dx.doi.org/10.1016/j.infsof.
          <year>2011</year>
          .
          <volume>09</volume>
          .004.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Nagappan</surname>
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zeller</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zimmermann</surname>
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Herzig</surname>
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Murphy</surname>
            <given-names>B.</given-names>
          </string-name>
          <year>2010</year>
          .
          <article-title>Change Bursts as Defect Predictors</article-title>
          .
          <source>In Proceedings of the 2010 IEEE 21st International Symposium on Software Reliability Engineering (ISSRE '10)</source>
          . IEEE Computer Society, Washington, DC, USA,
          <fpage>309</fpage>
          -
          <lpage>318</lpage>
          . DOI=http://dx.doi.org/10.1109/ISSRE.
          <year>2010</year>
          .
          <volume>25</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Arbuckle</surname>
            <given-names>T.</given-names>
          </string-name>
          <year>2011</year>
          .
          <article-title>Measuring multi-language software evolution: a case study</article-title>
          .
          <source>In Proceedings of the 12th International Workshop on Principles of Software Evolution and the 7th annual ERCIM Workshop on Software Evolution (IWPSE-EVOL '11)</source>
          . ACM, New York, NY, USA,
          <fpage>91</fpage>
          -
          <lpage>95</lpage>
          . DOI=http://doi.acm.
          <source>org/10</source>
          .1145/2024445.2024461.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Fowler</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kent</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <article-title>Refactoring : improving the design of existing Code</article-title>
          , Addison Wesley,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>