Your SlideShare is downloading. ×
0
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
ICMS08b.ppt
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

ICMS08b.ppt

83

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
83
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. An Empirical Study of the Relationships between Design Pattern Roles and Class Change PronenessMassimiliano DiPenta - University of SannioLuigi Cerulo - University of SannioYann-Gaël Guéhéneuc - Université de MontréalGiuliano Antoniol - École Polytechnique de Montréal ICSM2008BEIJING
  • 2. OutlineIntroduction What is a design pattern roleResearch questions The aim of the workData extraction process How we extract the datasetResults What we observed ICSM2008BEIJING
  • 3. Design Pattern Role, What Is It? Component Role a Composite pattern Design pattern Class A Class B Class C Class D Role c Leaf Role b Composite ICSM2008BEIJING
  • 4. Design Pattern Role, What Is It?Subject Observer pattern Observer Class A Class B Class C Class D Concrete subject Concrete observer ICSM2008BEIJING
  • 5. In Real Systems… ArgoUML ICSM2008BEIJING
  • 6. DeMINA– Ptidej Tool SuiteA Multi-layered Framework for Design Pattern Identification [Y.G. Guéhéneuc and G. Antoniol, to appear in the September/October 2008 issue of TSE]Able to detect roles in 12 DP: Abstract Factories, Adapters, Commands, Composites, Decorators, Factory Methods, Observers, Prototypes, Singletons, State/Strategies, Template methods, VisitorsPrecision = 34%, recall = 100% ICSM2008BEIJING
  • 7. What We Are Interested In What happens inreal software projects? ICSM2008BEIJING
  • 8. Research Questions… it is known that design pattern classes are less change and fault prone…Inside a design pattern RQ1 – Which roles are more likely to change? RQ2 – Which kind of change is more likely to predominate? ICSM2008BEIJING
  • 9. Data We Have Extracted A versioned software system can be viewed as a sequence of snapshots generated by a sequence of change sets Change set 2-3 Change set 2-3 commit of B1.5 G1.6 commit of B1.5 G1.6 S1 S2 S3 SnChange set 1-2Change set 1-2 Heuristic: Heuristic:commit of B1.4 G1.5 F1.1commit of B1.4 G1.5 F1.1 commits that share the same author, branch and notes commits that share the same author, branch and notes and their distance is < 200 s. [Zimmermann et al. ICSE 04] and their distance is < 200 s. [Zimmermann et al. ICSE 04] ICSM2008BEIJING
  • 10. Detection of Structural Changes S1 S2 S3 Sn Class X Class X compare M A I H Method Attribute Class imple- Class addition and addition and mentation hierarchy removal removal changes changes ICSM2008BEIJING
  • 11. Data Set #1 Kind of Changes Snapshots S1 S2 S3 S4 S5 … Sn C1 M,A M,IClasses C2 A,H C3 A,H C4 M M I,H … ICSM2008BEIJING
  • 12. Data Set #2 Design Pattern Roles Design pattern instances #1 #2 #3 … Composite (leaf) C1 Decorator (Component)Classes Factory Observer (subject) C2 (creator) Factory(concrete creator) Observer C3 Decorator(concrete (observer) component) … ICSM2008BEIJING
  • 13. Back to Research QuestionsWhich roles are more likely to change? Counts of class changes grouped by design pattern roles Classes S1 S2 S3 S4 S5 … # C1 (Observer#1-subject) 2 C2 (Observer#1-observer) 4 C3 (Observer#2-subject) 1 C4 (Composite#1-leaf) 5 … ICSM2008BEIJING
  • 14. Back to Research Questions Which kind of change is more likely to predominate? Counts of class changes groupsed by design pattern roles and change typeClasses S1 S2 S3 S4 S5 … #M #I #H #AC1 (Observer#1-subject) M M,H 2 - 1 -C2 (Observer#1-observer) A,I A,H A,I M,I - 3 1 3C3 (Observer#2-subject) I - 1 - -C4 (Composite#1-leaf) H H H,I H,A - 1 4 1… ICSM2008BEIJING
  • 15. Results, What We Have Observed Analyzed systems JHotDraw (177 change sets) Xerces-j (4972 change sets) Eclipse JDT (23424 change sets) Analyzed design patterns Abstract Factories, Adapters, Commands, Composites, Decorators, Factory Methods, Observers, Prototypes, Singletons, State/Strategies, Template methods, Visitors ICSM2008BEIJING
  • 16. Abstract Factory JHotDraw RMED CONFI ICSM2008BEIJING
  • 17. Template Method Eclipse-JDT RMED CONFI ICSM2008BEIJING
  • 18. Composite Eclipse-JDT ally rti RMED Pa FI CON ICSM2008BEIJING
  • 19. ConclusionsThis study is not yet concluded Many other questions still to answer…Main issues to overcome Design pattern detection (e.g., other languages than Java) Change type detection (e.g., class relationship change) ICSM2008BEIJING
  • 20. Fragen questions Perguntas ερωτήσεις въпроси preguntas frågor 问题 ‫ا‬ 質問domande întrebări questions सवाल pitanja dotazy 질문 問題 kysymyksiä вопросы vragenspørsmål pytania spørgsmål ICSM2008BEIJING

×