SlideShare una empresa de Scribd logo
1 de 30
Descargar para leer sin conexión
Concern-based Cohesion: Unveiling
     a Hidden Dimension of Cohesion
     Measurement
Bruno C. da Silva       Cláudio Sant’Anna           Christina Chavez          Alessandro Garcia
brunocs@dcc.ufba.br      santanna@dcc.ufba.br        flach@dcc.ufba.br         afgarcia@inf.puc-
                                                                               afgarcia@inf.puc-rio.br



                                              Federal University
                                                  of Bahia
                                                   (UFBA)

                                                                         Software Design and Evolution Group
    Software Engineering Lab – UFBA                                      aside.dcc.ufba.br
    Salvador-Bahia-Brazil - les.dcc.ufba.br
Cohesion can be defined as:


       The degree to which a module
        represents an abstraction of a
        single concern of the software



 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br   2
Structural Cohesion Metrics

E.g. LCOM, LCOM2, etc.


Almost all methods share
   the same instance
        variable

Is it a high cohesive
         class?


   Software Engineering Lab – UFBA
   Salvador-Bahia-Brazil - les.dcc.ufba.br   …   3
Lack of Concern-Based Cohesion (LCbC)

     How many
 concerns does this
   class address?
                                   http
                                response
 LCbC = 6                         buffer

                                  http
                                response
                                 header
  Is it a high
cohesive class?               URL enconding

                               web cookies
                             http redirecting
   Software Engineering Lab – sending
                              Error UFBA
                               and others…
   Salvador-Bahia-Brazil - les.dcc.ufba.br      …   4
Cohesion: Structure-based vs. Concern-based

  They capture different dimensions of cohesion
      • Different source of information and counting
        mechanism;
      • Different interpretation of cohesion;

                                                        low lack of cohesion
                                            LCOM2 = 0   or
                                                        high cohesion
Example – ResponseFacade (Tomcat)


                                                        high lack of cohesion
                                            LCbC = 6    or
                                                        low cohesion

  Software Engineering Lab – UFBA
  Salvador-Bahia-Brazil - les.dcc.ufba.br                                       5
Empirical Study – First Goal


   Provide empirical evidence about
whether the concern-driven nature of a
 cohesion metric makes it significantly
   different from structural cohesion
                metrics.



 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br   6
Moreover…
                      http response
                          buffer
    changes
                      http response
                         header

                      URL enconding

                       web cookies

                     http redirecting

                      Error sending         …


… the number of concerns a module realizes may influence
  positively the number of changes it may be subject to.
  Software Engineering Lab – UFBA
  Salvador-Bahia-Brazil - les.dcc.ufba.br              7
Empirical Study – Second Goal



 Investigate whether and how concern-
    based cohesion is associated to
           change-proneness.




 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br   8
Research Questions


RQ1: Does LCbC capture a dimension of
 module cohesion that is not captured
 by structural cohesion metrics?




 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br   9
Research Questions


RQ2: How strong is the correlation
 between LCbC and module change-
 proneness?




 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br   10
Research Questions


RQ3: Does the LCbC metric applied
  together with structural cohesion
  metrics enhance the prediction of
  module changes?




 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br   11
Empirical Study Settings
                                                Change history
               Module1                      -     -      -          -       -
               Module 2           -         -     -      -

System         Module 3           -         -     -      -          -   -   -

                   …
               Module n           -                      -              -   -


            LCOM2, LCOM3,                       Change Count (CC)
            LCOM4, LCOM5,
            TCC, LCbC




  Software Engineering Lab – UFBA
  Salvador-Bahia-Brazil - les.dcc.ufba.br                                       12
Change history
             Module1                       -    -       -          -       -
             Module 2          -           -    -       -

System       Module 3          -           -    -       -          -   -   -
                  …
             Module n          -                        -              -   -

          LCOM2, LCOM3,                        Change Count (CC)
          LCOM4, LCOM5,
          TCC, LCbC
                               System           Revisions analyzed
                               JFreeChart 2,272
                               Freecol          3,426
                               jEdit            2,916
                               Tomcat           3,157
                               Findbugs         3,765
                               Rhino            777
                               Total            16,313

 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br                                       13
Empirical Study Settings
                       LCbC needs a concern-to-code mapping




                                              concern A   concern B   concern C
                                                                                  …




    Software Engineering Lab – UFBA
…   Salvador-Bahia-Brazil - les.dcc.ufba.br                                           14
Empirical Study Settings
                Concern-to-code mapping procedure

                                                System
                                                JFreeChart
       Concerns automatically                   Freecol
       mapped using the XScan tool              jEdit
                                                Tomcat
                                                Findbugs
Manual concern mapping
                                                Rhino
provided by Eaddy et al (2008)




      Software Engineering Lab – UFBA
      Salvador-Bahia-Brazil - les.dcc.ufba.br                15
RQ1: Does LCbC capture a dimension of module
        cohesion that is not captured by structural cohesion
        metrics?
        Principal Component Analysis (PCA)

                JFreeChart                  Rhino                        jEdit                     Tomcat                      Findbugs                    Freecol

         PC1    PC2   PC3    PC4   PC1    PC2    PC3    PC4    PC1    PC2    PC3    PC4    PC1    PC2    PC3    PC4    PC1    PC2    PC3    PC4    PC1    PC2    PC3      PC4
LCOM2    0.94   0.14 - 0.11 0.11   0.96   0.04   0.11   0.07   0.06   0.98   0.08   0.04   0.09   0.08   0.25   0.96   0.12   0.04   0.14   0.98 - 0.12 0.72     0.41   0.34
LCOM3    0.02   0.72 - 0.43 0.37   0.23   0.72   0.43   0.24   0.90   0.12   0.17   0.07   0.89   0.15   0.12   0.08   0.90   0.12   0.10   0.12   0.64   0.20   0.53   0.15
LCOM4    0.87   0.03 - 0.04 0.37   0.94   0.19   0.07   0.09   0.18   0.09   0.97   0.08   0.11   0.09   0.95   0.25   0.12   0.00   0.98   0.14   0.16   0.09   0.03   0.96
LCOM5    0.14   0.94 - 0.12 - 0.04 0.11   0.21   0.94   0.19   0.87   0.12 - 0.03 0.06     0.88   0.04 - 0.06 0.13     0.88   0.06 - 0.02 0.07     0.27 - 0.06 0.89     0.01
 TCC    - 0.12 - 0.24 0.95 - 0.09 - 0.08 - 0.95 - 0.08 - 0.02 - 0.79 0.12 - 0.21 0.06 - 0.85 - 0.01 - 0.16 0.03 - 0.80 0.06 - 0.14 - 0.04 - 0.89 - 0.05 - 0.16 - 0.11
LCbC     0.51   0.10 - 0.13 0.81   0.11   0.11   0.19   0.97   0.04   0.04   0.08   0.99   0.10   0.99   0.08   0.07   0.05   0.99   0.00   0.04   0.22   0.89 - 0.18 - 0.03




        LCbC was the major metric of at least one PC in all
          systems. And in most of the systems it contributed
          exclusively for a PC
          Software Engineering Lab – UFBA
          Salvador-Bahia-Brazil - les.dcc.ufba.br                                                                                                                    16
RQ2: How strong is the correlation between LCbC and
module change-proneness?


Spearman Correlation: each cohesion metric vs CC
                                       JFreeChart   Rhino   jEdit   Tomcat   Findbugs   Freecol
                              LCOM2        0.48     0.69    0.16     0.33     0.48        0.49
                              LCOM3        0.34     0.48    0.17     0.27     0.38        0.19
                              LCOM4        0.32     0.46    0.10     0.21     0.23        0.20
                              LCOM5        0.15     0.30    0.18     0.23     0.34        0.22
                                TCC        0.24     0.22    0.13     0.16     0.06*       0.30
                               LCbC        0.66     0.62    0.15     0.35     0.21        0.46

                                                                             * no signicance level
In jEdit and Findbugs LCbC did not perform well



 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br                                                     17
RQ2: How strong is the correlation between LCbC and
module change-proneness?


Spearman Correlation: each cohesion metric vs CC
                                       JFreeChart   Rhino   jEdit   Tomcat   Findbugs   Freecol
                              LCOM2        0.48     0.69    0.16     0.33     0.48        0.49
                              LCOM3        0.34     0.48    0.17     0.27     0.38        0.19
                              LCOM4        0.32     0.46    0.10     0.21     0.23        0.20
                              LCOM5        0.15     0.30    0.18     0.23     0.34        0.22
                                TCC        0.24     0.22    0.13     0.16     0.06*       0.30
                               LCbC        0.66     0.62    0.15     0.35     0.21        0.46

                                                                             * no signicance level
LCbC and LCOM2 were the most correlated with
  change count

 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br                                                     18
RQ2: How strong is the correlation between LCbC and
module change-proneness?


Spearman Correlation: each cohesion metric vs CC
                                       JFreeChart   Rhino   jEdit   Tomcat   Findbugs   Freecol
                              LCOM2        0.48     0.69    0.16     0.33     0.48        0.49
                              LCOM3        0.34     0.48    0.17     0.27     0.38        0.19
                              LCOM4        0.32     0.46    0.10     0.21     0.23        0.20
                              LCOM5        0.15     0.30    0.18     0.23     0.34        0.22
                                TCC        0.24     0.22    0.13     0.16     0.06*       0.30
                               LCbC        0.66     0.62    0.15     0.35     0.21        0.46

                                                                             * no signicance level
In Rhino and Freecol, LCbC was the second most correlated
   (strong and moderate, respectively) preceded by LCOM2.

 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br                                                     19
RQ2: How strong is the correlation between LCbC and
module change-proneness?


Spearman Correlation: each cohesion metric vs CC
                                       JFreeChart   Rhino   jEdit   Tomcat   Findbugs   Freecol
                              LCOM2        0.48     0.69    0.16     0.33     0.48        0.49
                              LCOM3        0.34     0.48    0.17     0.27     0.38        0.19
                              LCOM4        0.32     0.46    0.10     0.21     0.23        0.20
                              LCOM5        0.15     0.30    0.18     0.23     0.34        0.22
                                TCC        0.24     0.22    0.13     0.16     0.06*       0.30
                               LCbC        0.66     0.62    0.15     0.35     0.21        0.46

                                                                             * no signicance level
LCbC was the most correlated with change count in
  JFreeChart (strong correlation) and Tomcat (moderate
  correlation).
 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br                                                     20
RQ3: Does the LCbC metric applied together with
structural cohesion metrics enhance the prediction of
module changes?
Linear Regression Analysis
                                     Metrics in the Final Model with Standardized Coefficients R2 (adj)
                         JFreeChart (0.47)LCOM2 + (0.11)LCOM3 + (0.59)LCbC + (-0.27)LCOM4        0.63
                         Rhino       (0.63)LCOM2 + (0.37)LCOM3 + (0.18*)TCC                      0.59
                         Findbugs    (0.45)LCOM2 + (0.20)LCOM3 + (0.17)LCOM4                     0.37
                         Freecol     (0.44)LCOM2 + (0.21)LCOM3 + (0.11)LCbC                      0.35
                         Tomcat      (0.39)LCOM2 + (0.16)LCOM3 + (0.29)LCbC + (-0.07*)LCOM4 0.32
                         jEdit       (0.20)LCOM2 + (0.35)LCOM4 + (0.09*)LCOM5 + (0.17)LCbC       0.26
                                                                     * no signicance level

LCbC ended up in four regression models

 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br                                                         21
RQ3: Does the LCbC metric applied together with
structural cohesion metrics enhance the prediction of
module changes?
Linear Regression Analysis
                                     Metrics in the Final Model with Standardized Coefficients R2 (adj)
                         JFreeChart (0.47)LCOM2 + (0.11)LCOM3 + (0.59)LCbC + (-0.27)LCOM4        0.63
                         Rhino       (0.63)LCOM2 + (0.37)LCOM3 + (0.18*)TCC                      0.59
                         Findbugs    (0.45)LCOM2 + (0.20)LCOM3 + (0.17)LCOM4                     0.37
                         Freecol     (0.44)LCOM2 + (0.21)LCOM3 + (0.11)LCbC                      0.35
                         Tomcat      (0.39)LCOM2 + (0.16)LCOM3 + (0.29)LCbC + (-0.07*)LCOM4 0.32
                         jEdit       (0.20)LCOM2 + (0.35)LCOM4 + (0.09*)LCOM5 + (0.17)LCbC       0.26
                                                                     * no signicance level

LCbC was the most important metric for the JFreeChart
  regression model
 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br                                                         22
Examples that illustrate the differences on
the dimensions of cohesion captured by
LCbC and structural cohesion metrics

Class (System)                             LCbC (Rank) LCOM2 (Rank)     CC (Rank)
ResponseFacade (Tomcat)                    10 (top 2%)        0         5 (top 20%)
CombinedRangeXYPlot (JFreeChart)           11 (top 5%)   33 (top 35%)   11 (top 10%)




 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br                                            23
Examples that illustrate the differences on
the dimensions of cohesion captured by
LCbC and structural cohesion metrics

Class (System)                             LCbC (Rank) LCOM2 (Rank)     CC (Rank)
ResponseFacade (Tomcat)                    10 (top 2%)        0         5 (top 20%)
CombinedRangeXYPlot (JFreeChart)           11 (top 5%)   33 (top 35%)   11 (top 10%)



          Facade class usually has methods related to different
            concerns because it serves as entrance point for
                        different functionalities.




 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br                                            24
Examples that illustrate the differences on
the dimensions of cohesion captured by
LCbC and structural cohesion metrics

Class (System)                             LCbC (Rank) LCOM2 (Rank)     CC (Rank)
ResponseFacade (Tomcat)                    10 (top 2%)        0         5 (top 20%)
CombinedRangeXYPlot (JFreeChart)           11 (top 5%)   33 (top 35%)   11 (top 10%)


        Concerns related to: drawing, zooming, axis space, click
                        handling and plotting.




 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br                                            25
When concern-based cohesion fails in the
association with changes

        When the concern-to-code mapping fails to
                   identify concerns!

Class (System)                               LCbC (Rank)   LCOM2 (Rank)   CC (Rank)
jEdit (jEdit)                                     0          9351 (3rd)    24 (2nd)
JEditBuffer (jEdit)                               0          5913 (4th)    17 (5th)
SortedBugCollection (Findbugs)                    0          1889 (5th)    76 (4th)




   Software Engineering Lab – UFBA
   Salvador-Bahia-Brazil - les.dcc.ufba.br                                            26
Threats to Validity

Quality of concern-to-code mapping

Underlying tool for concern mapping

Change Count




 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br   27
Conclusions
LCbC defined itself a new and orthogonal dimension of
  module cohesion in the studied systems.


LCbC performed well in the association with change-
  proneness in most of the systems.


Concern-based cohesion has provided indications that
  it is worth to be further investigated.



 Software Engineering Lab – UFBA
 Salvador-Bahia-Brazil - les.dcc.ufba.br                28
Future Work
 How LCbC performs in comparison with topic-based
 cohesion metrics such as C3 and MWE

 The association between LCbC and fault-proneness

 Whether or not the type of class would be an
 interesting factor to be considered

 The application of different regression analysis
 techniques

 Search for more complete concern mappings

Software Engineering Lab – UFBA
Salvador-Bahia-Brazil - les.dcc.ufba.br             29
Concern-based Cohesion: Unveiling
     a Hidden Dimension of Cohesion
     Measurement
Bruno C. da Silva       Cláudio Sant’Anna           Christina Chavez          Alessandro Garcia
brunocs@dcc.ufba.br      santanna@dcc.ufba.br        flach@dcc.ufba.br         afgarcia@inf.puc-
                                                                               afgarcia@inf.puc-rio.br



                                              Federal University
                                                  of Bahia
                                                   (UFBA)

                                                                         Software Design and Evolution Group
    Software Engineering Lab – UFBA                                      aside.dcc.ufba.br
    Salvador-Bahia-Brazil - les.dcc.ufba.br

Más contenido relacionado

Destacado

Pfd Folio 070910
Pfd Folio 070910Pfd Folio 070910
Pfd Folio 070910philfrank
 
Latin American Cultural Union
Latin American Cultural UnionLatin American Cultural Union
Latin American Cultural UnionJessabelle
 
Automated Damage Assessment in the Haiti Earthquake using Satellite Imagery
Automated Damage Assessment in the Haiti Earthquake using Satellite ImageryAutomated Damage Assessment in the Haiti Earthquake using Satellite Imagery
Automated Damage Assessment in the Haiti Earthquake using Satellite Imagerynathazlab
 
Understanding Software Cohesion Metrics: Experimental Assessment of Conceptua...
Understanding Software Cohesion Metrics:Experimental Assessment of Conceptua...Understanding Software Cohesion Metrics:Experimental Assessment of Conceptua...
Understanding Software Cohesion Metrics: Experimental Assessment of Conceptua...Bruno C. da Silva
 
Zihinsel engellilerde cinsel eğitim ve cinsel istismar
Zihinsel engellilerde cinsel eğitim ve cinsel istismarZihinsel engellilerde cinsel eğitim ve cinsel istismar
Zihinsel engellilerde cinsel eğitim ve cinsel istismarMustafa Cansız
 
Çocukluk çaği ci̇nsel eği̇ti̇m
Çocukluk çaği ci̇nsel eği̇ti̇mÇocukluk çaği ci̇nsel eği̇ti̇m
Çocukluk çaği ci̇nsel eği̇ti̇mMustafa Cansız
 
2011 sendai earthquake and tsunami
2011 sendai earthquake and tsunami2011 sendai earthquake and tsunami
2011 sendai earthquake and tsunaminathazlab
 

Destacado (10)

Tohoku blog
Tohoku blogTohoku blog
Tohoku blog
 
Pfd Folio 070910
Pfd Folio 070910Pfd Folio 070910
Pfd Folio 070910
 
Latin American Cultural Union
Latin American Cultural UnionLatin American Cultural Union
Latin American Cultural Union
 
Automated Damage Assessment in the Haiti Earthquake using Satellite Imagery
Automated Damage Assessment in the Haiti Earthquake using Satellite ImageryAutomated Damage Assessment in the Haiti Earthquake using Satellite Imagery
Automated Damage Assessment in the Haiti Earthquake using Satellite Imagery
 
Robotics ICMMT2015
Robotics ICMMT2015Robotics ICMMT2015
Robotics ICMMT2015
 
Understanding Software Cohesion Metrics: Experimental Assessment of Conceptua...
Understanding Software Cohesion Metrics:Experimental Assessment of Conceptua...Understanding Software Cohesion Metrics:Experimental Assessment of Conceptua...
Understanding Software Cohesion Metrics: Experimental Assessment of Conceptua...
 
Tohoku blog
Tohoku blogTohoku blog
Tohoku blog
 
Zihinsel engellilerde cinsel eğitim ve cinsel istismar
Zihinsel engellilerde cinsel eğitim ve cinsel istismarZihinsel engellilerde cinsel eğitim ve cinsel istismar
Zihinsel engellilerde cinsel eğitim ve cinsel istismar
 
Çocukluk çaği ci̇nsel eği̇ti̇m
Çocukluk çaği ci̇nsel eği̇ti̇mÇocukluk çaği ci̇nsel eği̇ti̇m
Çocukluk çaği ci̇nsel eği̇ti̇m
 
2011 sendai earthquake and tsunami
2011 sendai earthquake and tsunami2011 sendai earthquake and tsunami
2011 sendai earthquake and tsunami
 

Similar a Concern-based Cohesion: Unveiling a Hidden Dimension of Cohesion Measurement

Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9Trayan Iliev
 
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...IJCI JOURNAL
 
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...Ali Ouni
 
Microsoft HPC User Group
Microsoft HPC User Group Microsoft HPC User Group
Microsoft HPC User Group sjwoodman
 
A framework and approaches to develop an in-house CAT with freeware and open ...
A framework and approaches to develop an in-house CAT with freeware and open ...A framework and approaches to develop an in-house CAT with freeware and open ...
A framework and approaches to develop an in-house CAT with freeware and open ...Tetsuo Kimura
 
Modeling Software Systems in Experimental Robotics for Improved Reproducibility
Modeling Software Systems in Experimental Robotics for Improved ReproducibilityModeling Software Systems in Experimental Robotics for Improved Reproducibility
Modeling Software Systems in Experimental Robotics for Improved ReproducibilityFlorian Lier
 
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...Dilnoza Bobokalonova
 
Undergraduate Projects in SCILAB
Undergraduate Projects in SCILABUndergraduate Projects in SCILAB
Undergraduate Projects in SCILABPhdtopiccom
 
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsRa'Fat Al-Msie'deen
 
HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...
HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...
HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...Cloudera, Inc.
 
IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016Trayan Iliev
 
Handling High Energy Physics Data using Cloud Computing
Handling High Energy Physics Data using Cloud ComputingHandling High Energy Physics Data using Cloud Computing
Handling High Energy Physics Data using Cloud ComputingAbhishek Dey
 
NGRX Apps in Depth
NGRX Apps in DepthNGRX Apps in Depth
NGRX Apps in DepthTrayan Iliev
 
Advanced computationalsyntbio
Advanced computationalsyntbioAdvanced computationalsyntbio
Advanced computationalsyntbioNatalio Krasnogor
 
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clusteringNishanth Harapanahalli
 
Machine learning in Dynamic Adaptive Streaming over HTTP (DASH)
Machine learning in Dynamic Adaptive Streaming over HTTP (DASH)Machine learning in Dynamic Adaptive Streaming over HTTP (DASH)
Machine learning in Dynamic Adaptive Streaming over HTTP (DASH)Eswar Publications
 
Predicting Defects in SAP Java Code: An Experience Report
Predicting Defects in SAP Java Code: An Experience ReportPredicting Defects in SAP Java Code: An Experience Report
Predicting Defects in SAP Java Code: An Experience Reporttilman.holschuh
 

Similar a Concern-based Cohesion: Unveiling a Hidden Dimension of Cohesion Measurement (20)

Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9
 
Pr crc
Pr crcPr crc
Pr crc
 
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
 
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
 
Microsoft HPC User Group
Microsoft HPC User Group Microsoft HPC User Group
Microsoft HPC User Group
 
A framework and approaches to develop an in-house CAT with freeware and open ...
A framework and approaches to develop an in-house CAT with freeware and open ...A framework and approaches to develop an in-house CAT with freeware and open ...
A framework and approaches to develop an in-house CAT with freeware and open ...
 
Modeling Software Systems in Experimental Robotics for Improved Reproducibility
Modeling Software Systems in Experimental Robotics for Improved ReproducibilityModeling Software Systems in Experimental Robotics for Improved Reproducibility
Modeling Software Systems in Experimental Robotics for Improved Reproducibility
 
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...
 
Undergraduate Projects in SCILAB
Undergraduate Projects in SCILABUndergraduate Projects in SCILAB
Undergraduate Projects in SCILAB
 
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
 
HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...
HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...
HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...
 
IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016
 
Handling High Energy Physics Data using Cloud Computing
Handling High Energy Physics Data using Cloud ComputingHandling High Energy Physics Data using Cloud Computing
Handling High Energy Physics Data using Cloud Computing
 
NGRX Apps in Depth
NGRX Apps in DepthNGRX Apps in Depth
NGRX Apps in Depth
 
Advanced computationalsyntbio
Advanced computationalsyntbioAdvanced computationalsyntbio
Advanced computationalsyntbio
 
CRC Workshop
CRC WorkshopCRC Workshop
CRC Workshop
 
Be cse
Be cseBe cse
Be cse
 
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clustering
 
Machine learning in Dynamic Adaptive Streaming over HTTP (DASH)
Machine learning in Dynamic Adaptive Streaming over HTTP (DASH)Machine learning in Dynamic Adaptive Streaming over HTTP (DASH)
Machine learning in Dynamic Adaptive Streaming over HTTP (DASH)
 
Predicting Defects in SAP Java Code: An Experience Report
Predicting Defects in SAP Java Code: An Experience ReportPredicting Defects in SAP Java Code: An Experience Report
Predicting Defects in SAP Java Code: An Experience Report
 

Último

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Último (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Concern-based Cohesion: Unveiling a Hidden Dimension of Cohesion Measurement

  • 1. Concern-based Cohesion: Unveiling a Hidden Dimension of Cohesion Measurement Bruno C. da Silva Cláudio Sant’Anna Christina Chavez Alessandro Garcia brunocs@dcc.ufba.br santanna@dcc.ufba.br flach@dcc.ufba.br afgarcia@inf.puc- afgarcia@inf.puc-rio.br Federal University of Bahia (UFBA) Software Design and Evolution Group Software Engineering Lab – UFBA aside.dcc.ufba.br Salvador-Bahia-Brazil - les.dcc.ufba.br
  • 2. Cohesion can be defined as: The degree to which a module represents an abstraction of a single concern of the software Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 2
  • 3. Structural Cohesion Metrics E.g. LCOM, LCOM2, etc. Almost all methods share the same instance variable Is it a high cohesive class? Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br … 3
  • 4. Lack of Concern-Based Cohesion (LCbC) How many concerns does this class address? http response LCbC = 6 buffer http response header Is it a high cohesive class? URL enconding web cookies http redirecting Software Engineering Lab – sending Error UFBA and others… Salvador-Bahia-Brazil - les.dcc.ufba.br … 4
  • 5. Cohesion: Structure-based vs. Concern-based They capture different dimensions of cohesion • Different source of information and counting mechanism; • Different interpretation of cohesion; low lack of cohesion LCOM2 = 0 or high cohesion Example – ResponseFacade (Tomcat) high lack of cohesion LCbC = 6 or low cohesion Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 5
  • 6. Empirical Study – First Goal Provide empirical evidence about whether the concern-driven nature of a cohesion metric makes it significantly different from structural cohesion metrics. Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 6
  • 7. Moreover… http response buffer changes http response header URL enconding web cookies http redirecting Error sending … … the number of concerns a module realizes may influence positively the number of changes it may be subject to. Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 7
  • 8. Empirical Study – Second Goal Investigate whether and how concern- based cohesion is associated to change-proneness. Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 8
  • 9. Research Questions RQ1: Does LCbC capture a dimension of module cohesion that is not captured by structural cohesion metrics? Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 9
  • 10. Research Questions RQ2: How strong is the correlation between LCbC and module change- proneness? Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 10
  • 11. Research Questions RQ3: Does the LCbC metric applied together with structural cohesion metrics enhance the prediction of module changes? Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 11
  • 12. Empirical Study Settings Change history Module1 - - - - - Module 2 - - - - System Module 3 - - - - - - - … Module n - - - - LCOM2, LCOM3, Change Count (CC) LCOM4, LCOM5, TCC, LCbC Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 12
  • 13. Change history Module1 - - - - - Module 2 - - - - System Module 3 - - - - - - - … Module n - - - - LCOM2, LCOM3, Change Count (CC) LCOM4, LCOM5, TCC, LCbC System Revisions analyzed JFreeChart 2,272 Freecol 3,426 jEdit 2,916 Tomcat 3,157 Findbugs 3,765 Rhino 777 Total 16,313 Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 13
  • 14. Empirical Study Settings LCbC needs a concern-to-code mapping concern A concern B concern C … Software Engineering Lab – UFBA … Salvador-Bahia-Brazil - les.dcc.ufba.br 14
  • 15. Empirical Study Settings Concern-to-code mapping procedure System JFreeChart Concerns automatically Freecol mapped using the XScan tool jEdit Tomcat Findbugs Manual concern mapping Rhino provided by Eaddy et al (2008) Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 15
  • 16. RQ1: Does LCbC capture a dimension of module cohesion that is not captured by structural cohesion metrics? Principal Component Analysis (PCA) JFreeChart Rhino jEdit Tomcat Findbugs Freecol PC1 PC2 PC3 PC4 PC1 PC2 PC3 PC4 PC1 PC2 PC3 PC4 PC1 PC2 PC3 PC4 PC1 PC2 PC3 PC4 PC1 PC2 PC3 PC4 LCOM2 0.94 0.14 - 0.11 0.11 0.96 0.04 0.11 0.07 0.06 0.98 0.08 0.04 0.09 0.08 0.25 0.96 0.12 0.04 0.14 0.98 - 0.12 0.72 0.41 0.34 LCOM3 0.02 0.72 - 0.43 0.37 0.23 0.72 0.43 0.24 0.90 0.12 0.17 0.07 0.89 0.15 0.12 0.08 0.90 0.12 0.10 0.12 0.64 0.20 0.53 0.15 LCOM4 0.87 0.03 - 0.04 0.37 0.94 0.19 0.07 0.09 0.18 0.09 0.97 0.08 0.11 0.09 0.95 0.25 0.12 0.00 0.98 0.14 0.16 0.09 0.03 0.96 LCOM5 0.14 0.94 - 0.12 - 0.04 0.11 0.21 0.94 0.19 0.87 0.12 - 0.03 0.06 0.88 0.04 - 0.06 0.13 0.88 0.06 - 0.02 0.07 0.27 - 0.06 0.89 0.01 TCC - 0.12 - 0.24 0.95 - 0.09 - 0.08 - 0.95 - 0.08 - 0.02 - 0.79 0.12 - 0.21 0.06 - 0.85 - 0.01 - 0.16 0.03 - 0.80 0.06 - 0.14 - 0.04 - 0.89 - 0.05 - 0.16 - 0.11 LCbC 0.51 0.10 - 0.13 0.81 0.11 0.11 0.19 0.97 0.04 0.04 0.08 0.99 0.10 0.99 0.08 0.07 0.05 0.99 0.00 0.04 0.22 0.89 - 0.18 - 0.03 LCbC was the major metric of at least one PC in all systems. And in most of the systems it contributed exclusively for a PC Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 16
  • 17. RQ2: How strong is the correlation between LCbC and module change-proneness? Spearman Correlation: each cohesion metric vs CC JFreeChart Rhino jEdit Tomcat Findbugs Freecol LCOM2 0.48 0.69 0.16 0.33 0.48 0.49 LCOM3 0.34 0.48 0.17 0.27 0.38 0.19 LCOM4 0.32 0.46 0.10 0.21 0.23 0.20 LCOM5 0.15 0.30 0.18 0.23 0.34 0.22 TCC 0.24 0.22 0.13 0.16 0.06* 0.30 LCbC 0.66 0.62 0.15 0.35 0.21 0.46 * no signicance level In jEdit and Findbugs LCbC did not perform well Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 17
  • 18. RQ2: How strong is the correlation between LCbC and module change-proneness? Spearman Correlation: each cohesion metric vs CC JFreeChart Rhino jEdit Tomcat Findbugs Freecol LCOM2 0.48 0.69 0.16 0.33 0.48 0.49 LCOM3 0.34 0.48 0.17 0.27 0.38 0.19 LCOM4 0.32 0.46 0.10 0.21 0.23 0.20 LCOM5 0.15 0.30 0.18 0.23 0.34 0.22 TCC 0.24 0.22 0.13 0.16 0.06* 0.30 LCbC 0.66 0.62 0.15 0.35 0.21 0.46 * no signicance level LCbC and LCOM2 were the most correlated with change count Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 18
  • 19. RQ2: How strong is the correlation between LCbC and module change-proneness? Spearman Correlation: each cohesion metric vs CC JFreeChart Rhino jEdit Tomcat Findbugs Freecol LCOM2 0.48 0.69 0.16 0.33 0.48 0.49 LCOM3 0.34 0.48 0.17 0.27 0.38 0.19 LCOM4 0.32 0.46 0.10 0.21 0.23 0.20 LCOM5 0.15 0.30 0.18 0.23 0.34 0.22 TCC 0.24 0.22 0.13 0.16 0.06* 0.30 LCbC 0.66 0.62 0.15 0.35 0.21 0.46 * no signicance level In Rhino and Freecol, LCbC was the second most correlated (strong and moderate, respectively) preceded by LCOM2. Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 19
  • 20. RQ2: How strong is the correlation between LCbC and module change-proneness? Spearman Correlation: each cohesion metric vs CC JFreeChart Rhino jEdit Tomcat Findbugs Freecol LCOM2 0.48 0.69 0.16 0.33 0.48 0.49 LCOM3 0.34 0.48 0.17 0.27 0.38 0.19 LCOM4 0.32 0.46 0.10 0.21 0.23 0.20 LCOM5 0.15 0.30 0.18 0.23 0.34 0.22 TCC 0.24 0.22 0.13 0.16 0.06* 0.30 LCbC 0.66 0.62 0.15 0.35 0.21 0.46 * no signicance level LCbC was the most correlated with change count in JFreeChart (strong correlation) and Tomcat (moderate correlation). Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 20
  • 21. RQ3: Does the LCbC metric applied together with structural cohesion metrics enhance the prediction of module changes? Linear Regression Analysis Metrics in the Final Model with Standardized Coefficients R2 (adj) JFreeChart (0.47)LCOM2 + (0.11)LCOM3 + (0.59)LCbC + (-0.27)LCOM4 0.63 Rhino (0.63)LCOM2 + (0.37)LCOM3 + (0.18*)TCC 0.59 Findbugs (0.45)LCOM2 + (0.20)LCOM3 + (0.17)LCOM4 0.37 Freecol (0.44)LCOM2 + (0.21)LCOM3 + (0.11)LCbC 0.35 Tomcat (0.39)LCOM2 + (0.16)LCOM3 + (0.29)LCbC + (-0.07*)LCOM4 0.32 jEdit (0.20)LCOM2 + (0.35)LCOM4 + (0.09*)LCOM5 + (0.17)LCbC 0.26 * no signicance level LCbC ended up in four regression models Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 21
  • 22. RQ3: Does the LCbC metric applied together with structural cohesion metrics enhance the prediction of module changes? Linear Regression Analysis Metrics in the Final Model with Standardized Coefficients R2 (adj) JFreeChart (0.47)LCOM2 + (0.11)LCOM3 + (0.59)LCbC + (-0.27)LCOM4 0.63 Rhino (0.63)LCOM2 + (0.37)LCOM3 + (0.18*)TCC 0.59 Findbugs (0.45)LCOM2 + (0.20)LCOM3 + (0.17)LCOM4 0.37 Freecol (0.44)LCOM2 + (0.21)LCOM3 + (0.11)LCbC 0.35 Tomcat (0.39)LCOM2 + (0.16)LCOM3 + (0.29)LCbC + (-0.07*)LCOM4 0.32 jEdit (0.20)LCOM2 + (0.35)LCOM4 + (0.09*)LCOM5 + (0.17)LCbC 0.26 * no signicance level LCbC was the most important metric for the JFreeChart regression model Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 22
  • 23. Examples that illustrate the differences on the dimensions of cohesion captured by LCbC and structural cohesion metrics Class (System) LCbC (Rank) LCOM2 (Rank) CC (Rank) ResponseFacade (Tomcat) 10 (top 2%) 0 5 (top 20%) CombinedRangeXYPlot (JFreeChart) 11 (top 5%) 33 (top 35%) 11 (top 10%) Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 23
  • 24. Examples that illustrate the differences on the dimensions of cohesion captured by LCbC and structural cohesion metrics Class (System) LCbC (Rank) LCOM2 (Rank) CC (Rank) ResponseFacade (Tomcat) 10 (top 2%) 0 5 (top 20%) CombinedRangeXYPlot (JFreeChart) 11 (top 5%) 33 (top 35%) 11 (top 10%) Facade class usually has methods related to different concerns because it serves as entrance point for different functionalities. Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 24
  • 25. Examples that illustrate the differences on the dimensions of cohesion captured by LCbC and structural cohesion metrics Class (System) LCbC (Rank) LCOM2 (Rank) CC (Rank) ResponseFacade (Tomcat) 10 (top 2%) 0 5 (top 20%) CombinedRangeXYPlot (JFreeChart) 11 (top 5%) 33 (top 35%) 11 (top 10%) Concerns related to: drawing, zooming, axis space, click handling and plotting. Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 25
  • 26. When concern-based cohesion fails in the association with changes When the concern-to-code mapping fails to identify concerns! Class (System) LCbC (Rank) LCOM2 (Rank) CC (Rank) jEdit (jEdit) 0 9351 (3rd) 24 (2nd) JEditBuffer (jEdit) 0 5913 (4th) 17 (5th) SortedBugCollection (Findbugs) 0 1889 (5th) 76 (4th) Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 26
  • 27. Threats to Validity Quality of concern-to-code mapping Underlying tool for concern mapping Change Count Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 27
  • 28. Conclusions LCbC defined itself a new and orthogonal dimension of module cohesion in the studied systems. LCbC performed well in the association with change- proneness in most of the systems. Concern-based cohesion has provided indications that it is worth to be further investigated. Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 28
  • 29. Future Work How LCbC performs in comparison with topic-based cohesion metrics such as C3 and MWE The association between LCbC and fault-proneness Whether or not the type of class would be an interesting factor to be considered The application of different regression analysis techniques Search for more complete concern mappings Software Engineering Lab – UFBA Salvador-Bahia-Brazil - les.dcc.ufba.br 29
  • 30. Concern-based Cohesion: Unveiling a Hidden Dimension of Cohesion Measurement Bruno C. da Silva Cláudio Sant’Anna Christina Chavez Alessandro Garcia brunocs@dcc.ufba.br santanna@dcc.ufba.br flach@dcc.ufba.br afgarcia@inf.puc- afgarcia@inf.puc-rio.br Federal University of Bahia (UFBA) Software Design and Evolution Group Software Engineering Lab – UFBA aside.dcc.ufba.br Salvador-Bahia-Brazil - les.dcc.ufba.br