Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
How Do Developers React toAPI Deprecation?The Case of a Smalltalk Ecosystem    Romain Robbes             Mircea LunguDavid...
SoftwareA Natural EcosystemEcosystems
A collection of software systems which are developedand co-evolve in the same environment.A Software Ecosystem
A collection of software systems which are developedand co-evolve in the same environment.                                ...
A collection of software systems which are developedand co-evolve in the same environment.A Software Ecosystem
[...] where is MOLabelShape,why was it deleted?? I use itand now is gone!!! I even hada specialization of it [...]
Deprecating a class in the ecosystem   FillInTheBlank     UIManager      (deprecated)   (recommended)
Tool Support...
Tool Support...                  Empirical                  Evidence                   First!
API Changes         Providers          Classes          Methods
API ChangesRipple-inducing changes                          Providers• addition of provider     Classes• change of provide...
API ChangesRipple-inducing changes                                   Providers• addition of provider              Classes•...
API Deprecation:Empirical Study   1. Frequency   2. Magnitude   3. Duration   4. Adaptation
SqueakSource        8 years   {   Contributors:                          Projects:                           Classes:     ...
How to model the history of      SqueakSource?                                        System                              ...
Ecco - a lighweight model                          System                          HistoryEcosystem                       ...
Methodology1. Generate list of candidates (577 methods,   186 classes)2. Filter methods removed less than 3 times3. Manual...
Manual Inspection+ Retrieve changes involving deprecation+ Display changes in Ripple Browser                              ...
Results
}Results          Frequency          Magnitude          Duration          Adaptations
RQ1: Frequency of ripple effects triggered byAPI deprecation  14% of deprecated methods triggered ripple effects.  7% of d...
RQ1: Frequency of ripple effects triggered byAPI deprecation  14% of deprecated methods triggered ripple effects.  7% of d...
RQ1: Frequency of ripple effects triggered byAPI deprecation  14% of deprecated methods triggered ripple effects.  7% of d...
RQ2: Magnitude of ripple effects triggered byAPI deprecation                   reacting projects                     (i) r...
RQ2: Magnitude of ripple effects triggered byAPI deprecation                     reacting projects                       (...
Viewing the magnitude from other angles   60   40   20    0         Projects   Developers Packages       Commits    A proj...
Viewing the magnitude from other angles   60   40   20    0         Projects   Developers Packages       Commits    A proj...
Viewing the magnitude from other angles   60   40   20    0         Projects   Developers Packages       Commits    A proj...
RQ3: Duration of ripple effects triggered by APIdeprecation           (i) reaction Time   Adaptation timetime days)       ...
RQ3: Duration of ripple effects triggered by APIdeprecation           (i) reaction Time     Adaptation timetime days)     ...
RQ3: Duration of ripple effects triggered by APIdeprecation           (i) reaction Time     Adaptation timetime days)     ...
RQ4: Do all projects adapt to API changes? 70                              66% 53                     40% 35       20% 18 ...
RQ4: Do all projects adapt to API changes? 70                                      66% 53                             40% ...
RQ4: Do all projects adapt to API changes? 70                                        66% 53                           40% ...
RQ4: Do all projects adapt to API changes? 70                                      66% 53                             40% ...
RQ4: Do all projects adapt to API changes? 70                                       66% 53                             40%...
RQ4: Do all projects adapt to API changes? 70                                      66% 53                             40% ...
RQ4: Do all projects adapt to API changes? 70                              66% 53                     40% 35       20% 18 ...
RQ4: Do all projects adapt to API changes? 70                                         66% 53                           40%...
RQ5: Consistency of adaptations  addEntity: was replaced by:       add: addModel:addObject:    addAll: addSibling:        ...
RQ5: Consistency of adaptations                                         Frequency of most  addEntity: was replaced by:    ...
RQ5: Consistency of adaptations                                          Frequency of most  addEntity: was replaced by:   ...
RQ5: Consistency of adaptations                                         Frequency of most  addEntity: was replaced by:    ...
RQ6: Were deprecation messages useful? foo: x     self deprecated: ‘use method bar instead’
RQ6: Were deprecation messages useful? foo: x     self deprecated: ‘use method bar instead’ We categorized deprecation mes...
RQ6: Were deprecation messages useful? foo: x     self deprecated: ‘use method bar instead’ We categorized deprecation mes...
RQ6: Were deprecation messages useful? foo: x     self deprecated: ‘use method bar instead’ We categorized deprecation mes...
RQ6: Were deprecation messages useful?50      46.8%                                         40.4%382513                   ...
RQ6: Were deprecation messages useful?50      46.8%                                          40.4%382513                  ...
Threats to validity    Code duplication, name clashes introduce noise    We only consider explicit deprecation so far    P...
Related work Empirical studies: – Studies of API changes and client evolution     [Dig & Johnson, 2005] – Studies of rippl...
Conclusions and implications                                                     System                                   ...
Conclusions and implications                                                                 System                       ...
Conclusions and implications                                                                 System                       ...
Conclusions and implications                                                                 System                       ...
Conclusions and implications                                                                 System                       ...
Conclusions and implications                                                                 System                       ...
Conclusions and implications                                                                 System                       ...
THE ENDRead the details in the paper
Prochain SlideShare
Chargement dans…5
×

How Do Developers React to API Deprecation? The Case of a Smalltalk Ecosystem

A case study of how API changes propagate across an entire software ecosystem.

  • Identifiez-vous pour voir les commentaires

How Do Developers React to API Deprecation? The Case of a Smalltalk Ecosystem

  1. 1. How Do Developers React toAPI Deprecation?The Case of a Smalltalk Ecosystem Romain Robbes Mircea LunguDavid Röthlisberger Software Composition Group University of Chile University of Bern FSE, 2012
  2. 2. SoftwareA Natural EcosystemEcosystems
  3. 3. A collection of software systems which are developedand co-evolve in the same environment.A Software Ecosystem
  4. 4. A collection of software systems which are developedand co-evolve in the same environment. Activity (high) DependencyA Software Ecosystem Activity (low) size
  5. 5. A collection of software systems which are developedand co-evolve in the same environment.A Software Ecosystem
  6. 6. [...] where is MOLabelShape,why was it deleted?? I use itand now is gone!!! I even hada specialization of it [...]
  7. 7. Deprecating a class in the ecosystem FillInTheBlank UIManager (deprecated) (recommended)
  8. 8. Tool Support...
  9. 9. Tool Support... Empirical Evidence First!
  10. 10. API Changes Providers Classes Methods
  11. 11. API ChangesRipple-inducing changes Providers• addition of provider Classes• change of provider Methods• removal of provider
  12. 12. API ChangesRipple-inducing changes Providers• addition of provider Classes• change of provider Methods• removal of provider Deprecation of provider = lower bounds
  13. 13. API Deprecation:Empirical Study 1. Frequency 2. Magnitude 3. Duration 4. Adaptation
  14. 14. SqueakSource 8 years { Contributors: Projects: Classes: Commits: 2.300 2.500 95.000 110.000 LOC: 600.000.000
  15. 15. How to model the history of SqueakSource? System History Ecosystem Version 1 Version 2 Version n Version i History History ... ... History ... System Version History Added Artifacts ... Removed Provided Required
  16. 16. Ecco - a lighweight model System HistoryEcosystem Version 1 Version 2 Version n Version i History History ... ... History ... System Version History Added Artifacts ... Removed Provided Required
  17. 17. Methodology1. Generate list of candidates (577 methods, 186 classes)2. Filter methods removed less than 3 times3. Manual inspection of the rest of the candidates4. Answer RQ for all the true deprecation- based ripples
  18. 18. Manual Inspection+ Retrieve changes involving deprecation+ Display changes in Ripple Browser x2+ Validate impacted projects+ Track replacement methods= 180 methods + 20 classes
  19. 19. Results
  20. 20. }Results Frequency Magnitude Duration Adaptations
  21. 21. RQ1: Frequency of ripple effects triggered byAPI deprecation 14% of deprecated methods triggered ripple effects. 7% of deprecated classes triggered ripple effects.
  22. 22. RQ1: Frequency of ripple effects triggered byAPI deprecation 14% of deprecated methods triggered ripple effects. 7% of deprecated classes triggered ripple effects. developers do not know their clients and program ⤷ defensively
  23. 23. RQ1: Frequency of ripple effects triggered byAPI deprecation 14% of deprecated methods triggered ripple effects. 7% of deprecated classes triggered ripple effects. developers do not know their clients and program ⤷ defensively ⤷ clients may still be unaware of deprecations
  24. 24. RQ2: Magnitude of ripple effects triggered byAPI deprecation reacting projects (i) reacting projects (ii) reacting pack 80 ● ● 120 100 60 80 ● ● 40 ● ● 60 ● ● ● ● ● ● ● ● ● ● 40 ● 20 ● ● 20 0 0
  25. 25. RQ2: Magnitude of ripple effects triggered byAPI deprecation reacting projects (i) reacting projects (ii) reacting pack 80 ● ● 120 100 60 80 ● ● 40 ● ● 60 ● ● ● ● ● ● ● ● ● ● 40 ● 20 ● ● 20 0 0 ⤷ several projects usually react ⤷ the impact on the ecosystem can be very large
  26. 26. Viewing the magnitude from other angles 60 40 20 0 Projects Developers Packages Commits A project reacting to an API change ...
  27. 27. Viewing the magnitude from other angles 60 40 20 0 Projects Developers Packages Commits A project reacting to an API change ... ⤷ may involve several developers and packages
  28. 28. Viewing the magnitude from other angles 60 40 20 0 Projects Developers Packages Commits A project reacting to an API change ... ⤷ may involve several developers and packages ⤷ is often a process involving several commits
  29. 29. RQ3: Duration of ripple effects triggered by APIdeprecation (i) reaction Time Adaptation timetime days) (ii) adaptation (in ● For a given project, the 60 800 adaptation time is the 50 ● ● time between the first ● 600 40 reaction and the last ● reaction to the API 30 400 ● change ● ● 20 ● 200 10 0 0
  30. 30. RQ3: Duration of ripple effects triggered by APIdeprecation (i) reaction Time Adaptation timetime days) (ii) adaptation (in ● For a given project, the 60 800 adaptation time is the 50 ● ● time between the first ● 600 40 reaction and the last ● reaction to the API 30 400 ● change ● ● 20 ● 200 10 0 0 most projects are quick to react and adapt; ⤷ but not all are
  31. 31. RQ3: Duration of ripple effects triggered by APIdeprecation (i) reaction Time Adaptation timetime days) (ii) adaptation (in ● For a given project, the 60 800 adaptation time is the 50 ● ● time between the first ● 600 40 reaction and the last ● reaction to the API 30 400 ● change ● ● 20 ● 200 10 0 0 most projects are quick to react and adapt; ⤷ but not all are On the scale of the ecosystem, some ripple ⤷ effects lasted for years.
  32. 32. RQ4: Do all projects adapt to API changes? 70 66% 53 40% 35 20% 18 0 All Active No counter- projects reactions
  33. 33. RQ4: Do all projects adapt to API changes? 70 66% 53 40% 35 20% 18 0 All Active No counter- projects reactions Why so few reacting projects?
  34. 34. RQ4: Do all projects adapt to API changes? 70 66% 53 40% 35 20% 18 0 All Active No counter- projects reactions Why so few Dead or stagnant reacting projects? projects?
  35. 35. RQ4: Do all projects adapt to API changes? 70 66% 53 40% 35 20% 18 0 All Active No counter- projects reactions Why so few reacting projects?
  36. 36. RQ4: Do all projects adapt to API changes? 70 66% 53 40% 35 20% 18 0 All Active No counter- projects reactions Why so few Forks in the reacting projects? ecosystem?
  37. 37. RQ4: Do all projects adapt to API changes? 70 66% 53 40% 35 20% 18 0 All Active No counter- projects reactions Why so few reacting projects?
  38. 38. RQ4: Do all projects adapt to API changes? 70 66% 53 40% 35 20% 18 0 All Active No counter- projects reactions
  39. 39. RQ4: Do all projects adapt to API changes? 70 66% 53 40% 35 20% 18 0 All Active No counter- projects reactions common reasons for not reacting are stagnancy,⤷ forks, but also freezed dependencies and unawareness.
  40. 40. RQ5: Consistency of adaptations addEntity: was replaced by: add: addModel:addObject: addAll: addSibling: 0 20 40 60 80
  41. 41. RQ5: Consistency of adaptations Frequency of most addEntity: was replaced by: frequent replacement Probability of most likely replacement 100 add: addModel: 80 60addObject: 40 addAll: 20 addSibling: 0 0 20 40 60 80
  42. 42. RQ5: Consistency of adaptations Frequency of most addEntity: was replaced by: frequent replacement Probability of most likely replacement 100 add: addModel: 80 60addObject: 40 addAll: 20 addSibling: 0 0 20 40 60 80 ⤷ Many API deprecation have similar reactions
  43. 43. RQ5: Consistency of adaptations Frequency of most addEntity: was replaced by: frequent replacement Probability of most likely replacement 100 add: addModel: 80 60addObject: 40 addAll: 20 addSibling: 0 0 20 40 60 80 ⤷ Many API deprecation have similar reactions ⤷ 16% of deprecations had a systematic replacement
  44. 44. RQ6: Were deprecation messages useful? foo: x self deprecated: ‘use method bar instead’
  45. 45. RQ6: Were deprecation messages useful? foo: x self deprecated: ‘use method bar instead’ We categorized deprecation messages according to whether developer followed the recommendation.
  46. 46. RQ6: Were deprecation messages useful? foo: x self deprecated: ‘use method bar instead’ We categorized deprecation messages according to whether developer followed the recommendation. Mostly followed: if “X” most people did X Somewhat followed: most people did Y, but others did X Not followed: most people did Y, Z ... Missing: no recommendation, vague recommendation.
  47. 47. RQ6: Were deprecation messages useful? foo: x self deprecated: ‘use method bar instead’ We categorized deprecation messages according to whether developer followed the recommendation. Mostly followed: if “X” most people did X Somewhat followed: most people did Y, but others did X Not followed: most people did Y, Z ... Missing: no recommendation, vague recommendation.self deprecated: ‘removed functionality’self deprecated: ‘use canvas API’self deprecated: ‘ugly method, do not call it!’
  48. 48. RQ6: Were deprecation messages useful?50 46.8% 40.4%382513 7.4% 5.3% 0 Recommendation ... Mostly Somewhat Not Missing followed followed followed
  49. 49. RQ6: Were deprecation messages useful?50 46.8% 40.4%382513 7.4% 5.3% 0 Recommendation ... Mostly Somewhat Not Missing followed followed followed⤷ half of deprecation messages are missing or not useful
  50. 50. Threats to validity Code duplication, name clashes introduce noise We only consider explicit deprecation so far Partially manual analysis Single case study with peculiarities: – Dynamically typed language (Smalltalk) – Fork in the community
  51. 51. Related work Empirical studies: – Studies of API changes and client evolution [Dig & Johnson, 2005] – Studies of ripple effects at the system level [Yau et al., 1978; Black, 2001] Adapting to API changes: – Replaying refactorings [Henkel & Diwan 2004; Ekman & Asklund 2005; Dig et al. 2007] – Detecting systematic changes [Kim and Notkin 2009] – Adapting to evolving frameworks [Dagenais & Robillard 2008; Shäfer et al. 2008] – Filtering irrelevant changes [Holmes and Walker, 2010]
  52. 52. Conclusions and implications System History Ecosystem Version 1 Version 2 Version n Version i History History ... ... History ... System Version History Added Artifacts ... Removed Provided Required
  53. 53. Conclusions and implications System History Ecosystem Version 1 Version 2 Version n Version i History History ... ... History ... System Version History Added Artifacts ... Removed Provided Required⤷ The quality of deprecation guidelines should be improved
  54. 54. Conclusions and implications System History Ecosystem Version 1 Version 2 Version n Version i History History ... ... History ... System Version History Added Artifacts ... Removed Provided Required⤷ The quality of deprecation guidelines should be improved⤷ Some API deprecations have a large impact
  55. 55. Conclusions and implications System History Ecosystem Version 1 Version 2 Version n Version i History History ... ... History ... System Version History Added Artifacts ... Removed Provided Required⤷ The quality of deprecation guidelines should be improved⤷ Some API deprecations have a large impact⤷ Developers do not know how their software is used
  56. 56. Conclusions and implications System History Ecosystem Version 1 Version 2 Version n Version i History History ... ... History ... System Version History Added Artifacts ... Removed Provided Required⤷ The quality of deprecation guidelines should be improved⤷ Some API deprecations have a large impact⤷ Developers do not know how their software is used⤷ Reactions to API changes can be partially automated
  57. 57. Conclusions and implications System History Ecosystem Version 1 Version 2 Version n Version i History History ... ... History ... System Version History Added Artifacts ... Removed Provided Required⤷ The quality of deprecation guidelines should be improved⤷ Some API deprecations have a large impact⤷ Developers do not know how their software is used⤷ Reactions to API changes can be partially automated⤷ Tool support is needed to help with API changes
  58. 58. Conclusions and implications System History Ecosystem Version 1 Version 2 Version n Version i History History ... ... History ... System Version History Added Artifacts ... Removed Provided Required⤷ The quality of deprecation guidelines should be improved⤷ Some API deprecations have a large impact⤷ Developers do not know how their software is used⤷ Reactions to API changes can be partially automated⤷ Tool support is needed to help with API changes
  59. 59. THE ENDRead the details in the paper

×