Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Software Maintenance Support by Extracting Links and Models

562 views

Published on

Extracting missing important links and models from software is the key to success of its maintenance such as specifying locations that need correction. This talk firstly introduces two novel techniques for recovering traceability links precisely between requirements and program source code: log-based interactive recovery (CAiSE'15) and transitive recovery (ICSME'15 ERA). Secondly the talk introduces two novel preventive maintenance techniques employing behavioral model extraction and model checking targeting Ajax applications: design pattern based invariants verification (ASE'13) and delay-based mutation (ASE'14).


Hironori Washizaki is head and associate professor at Global Software Engineering Laboratory, Waseda University, Japan. He is also visiting associate professor at National Institute of Informatics, and, visiting professor at Ecole Polytechnique de Montreal during his sabbatical stay till Dec 2015. He received PhD in Information and Computer Science from Waseda University in 2003. His research interests include software and systems requirements, architecture, reuse, maintenance, quality assurance, and education. He has served on the organizing committees of many international conferences (such as ASE, ICST, SPLC, CSEE&T, SEKE, BICT and APSEC) as well as editorial boards of several international journals (such as Int. J. Soft. Eng. Know. Eng. and IEICE Trans). He also has served at various professional societies such as IEEE Computer Society Japan Chapter Chair, SEMAT Japan Chapter Chair, IPSJ SamurAI Coding Director, and ISO/IEC/JTC1/SC7/WG20 Convenor. http://www.washi.cs.waseda.ac.jp/?page_id=2

Published in: Software
  • Be the first to comment

Software Maintenance Support by Extracting Links and Models

  1. 1. Software Maintenance Support by Extracting Links and Models Hiro - Hironori Washizaki Waseda University Twitter: @Hiro_Washi washizaki@waseda.jp http://www.washi.cs.waseda.ac.jp/ Thanks to: Ryosuke, Kazuki, Yuta and other collaborators! Latece Seminar, Nov 11, 2015 @ UQAM, Montreal
  2. 2. • Assoc. Prof., Head, Global Software Engineering Laboratory, Waseda University • Visiting Assoc. Prof., National Institute of Informatics • Visiting Prof., Ecole Polytechnique de Montreal • Convenor, ISO/IEC SC7/WG20 • Chair, IEEE CS Japan Chapter • Chair, SEMAT Japan Chapter 2 Hironori Washizaki
  3. 3. Waseda University Global Software Engineering Lab. • SE research in global development era – Analysis and reuse – Quality assurance – Agile and patterns – SE education • 5 professors • 15+ partners • 25 students (5 from China, Indonesia, Afganistan) 3
  4. 4. Software maintenance matters! 60–90% of total costs 4 B. Lientz and E. Swanson, Software Maintenance Management. Reading, Ma.: Addison-Wesley, 1980. J. Conejero, E. Figueiredo, A. Garcia, J. Hernández and E. Jurado, "On the Relationship of Concern Metrics and Requirements Maintainability,” Information and Software Technology, vol.54, no.2, 2012.
  5. 5. How can we support? 5 Requirements Design Program source code
  6. 6. How can we support? 6 Requirements Design Program source code Tracing artifacts Tracing artifacts Log-based interactive recovery [CAiSE’15] Transitive recovery [ICSME’15 ERA] Ryosuke Tsuchiya, Hironori Washizaki, Yoshiaki Fukazawa, Keishi Oshima, and Ryota Mibe,“Interactive Recovery of Requirements Traceability Links Using User Feedback and Configuration Management Logs,” 27th International Conference on Advanced Information Systems Engineering (CAiSE 2015) Kazuki Nishikawa, Hironori Washizaki, Yoshiaki Fukazawa, Keishi Ohshima, Ryota Mibe, “Recovering Transitive Traceability Links among Software Artifacts,” 31st IEEE International Conference on Software Maintenance and Evolution (ICSME 2015), ERA Track
  7. 7. Traceability links? • Relationships among software artifacts • Key to ensure consistency among artifacts [Antoniol‘00] 7G. Antoniol, B. Caprile, A. Potrich and P. Tonella, "Design-Code Traceability for Object-Oriented Systems," Annals of Software Engineering, vol. 9, no. 1-4, pp. 35-58, 2000 Requirement Source code Run automated test Run basic test Add tests Automate.c X Basic.c X TestDB.c X TestRun.c X X
  8. 8. Facts of traceability links • Rarely established explicitly [Lucia’12] • Most of existing recovery techniques employing Information Retrieval (IR) approaches such as TF/IDF and Vector Space Model (VSM) 8 A. De Lucia, et al., "Information Retrieval Methods for Automated Traceability Recovery," in Software and Systems Traceability, 1st ed., J. Cleland-Huang, O. Gotel and A. Zisman, Ed. New York: Springer, p. 71-98, 2012. Automated test Automated.c MyMem.c Initialization Requirement 基本テスト Basic.c NGOK
  9. 9. Interactive recovery utilizing call relationships Rank Requirement Code file Score Recommended Correct 1 Recover link 2 Recover link 3 Recover link ・・・ ・・・ 9 Recover link ・・・ LinkPresenter.java ・・・ LinkRecover.java ScoreCalc.java ・・・ Call Ryosuke Tsuchiya, Hironori Washizaki, Yoshiaki Fukazawa, Keishi Oshima, and Ryota Mibe,“Interactive Recovery of Requirements Traceability Links Using User Feedback and Configuration Management Logs,” 27th International Conference on Advanced Information Systems Engineering (CAiSE 2015)
  10. 10. Interactive recovery utilizing call relationships Rank Requirement Code file Score Recommended Correct 1 Recover link LinkRecover.java 0.98 not yet 2 Recover link LinkPresenter.java 0.65 not yet 3 Recover link ScoreCalc.java 0.30 not yet ・・・ ・・・ ・・・ ・・・ 10 Recover link ・・・ LinkPresenter.java ・・・ LinkRecover.java ScoreCalc.java ・・・ ☑ Call ☑ Ryosuke Tsuchiya, Hironori Washizaki, Yoshiaki Fukazawa, Keishi Oshima, and Ryota Mibe,“Interactive Recovery of Requirements Traceability Links Using User Feedback and Configuration Management Logs,” 27th International Conference on Advanced Information Systems Engineering (CAiSE 2015)
  11. 11. Interactive recovery utilizing call relationships Rank Requirement Code file Score Recommended Correct 1 Recover link LinkRecover.java 0.98 not yet 2 Recover link ScoreCalc.java 0.30 Recommended 3 Recover link LinkPresenter.java 0.65 not yet ・・・ ・・・ ・・・ ・・・ 11 Recover link ・・・ LinkPresenter.java ・・・ LinkRecover.java ScoreCalc.java ・・・ ☑ Call ☑ Ryosuke Tsuchiya, Hironori Washizaki, Yoshiaki Fukazawa, Keishi Oshima, and Ryota Mibe,“Interactive Recovery of Requirements Traceability Links Using User Feedback and Configuration Management Logs,” 27th International Conference on Advanced Information Systems Engineering (CAiSE 2015)
  12. 12. Automated test Log-based recovery 12 Automated test automate・・ ・・XML・・・ ・test・・・・・・ Requirement automate XML test automate XML Keywords High TF-IDF value Proper noun Filtered by experts automate XML Revision: 137 Author: anilsaharan Date: 2011/8/20 9:35:13 Message: Changes for fixing XML tag issue ---- Modified : /trunk/CUnit/Sources/Tool/Process.c Process.c ・・・ Ryosuke Tsuchiya, Hironori Washizaki, Yoshiaki Fukazawa, Keishi Oshima, and Ryota Mibe,“Interactive Recovery of Requirements Traceability Links Using User Feedback and Configuration Management Logs,” 27th International Conference on Advanced Information Systems Engineering (CAiSE 2015)
  13. 13. Experiment: Japanese enterprise system • 80,000 LOC, 192 requirements, 694 Java code files, 7090 revisions in Subversion • 726 known links as correct answer 13 Ryosuke Tsuchiya, Hironori Washizaki, Yoshiaki Fukazawa, Keishi Oshima, and Ryota Mibe,“Interactive Recovery of Requirements Traceability Links Using User Feedback and Configuration Management Logs,” 27th International Conference on Advanced Information Systems Engineering (CAiSE 2015)
  14. 14. Transitive recovery 14 Code Design Test Score C1 Da Tx 0.16 C1 Da Ty 0.14 C1 Db Tx 0.03 • Vector Space Model (VSM) for basic recovery Source code Design Test case Code Design Similarity C1 Da 0.4 C2 Db 0.3 Design Test Similarity Da Tx 0.40 Da Ty 0.35 Db Tx 0.10 Kazuki Nishikawa, Hironori Washizaki, Yoshiaki Fukazawa, Keishi Ohshima, Ryota Mibe, “Recovering Transitive Traceability Links among Software Artifacts,” 31st IEEE International Conference on Software Maintenance and Evolution (ICSME 2015), ERA Track
  15. 15. Experiment: EasyClinic • Target link: 47 Java code ⇔ 63 test docs • Supportive artifacts: 20 design docs or 30 use cases • Effectiveness varies with supportive artifacts 15Kazuki Nishikawa, Hironori Washizaki, Yoshiaki Fukazawa, Keishi Ohshima, Ryota Mibe, “Recovering Transitive Traceability Links among Software Artifacts,” 31st IEEE International Conference on Software Maintenance and Evolution (ICSME 2015), ERA Track
  16. 16. How can we support? 16 Requirements Design Program source code Yuta Maezawa, Kazuki Nishiura, Hironori Washizaki, Shinichi Honiden, “Validating Ajax Applications Using a Delay-Based Mutation Technique,” 29th IEEE/ACM International Conference on Automated Software Engineering (ASE 2014) Yuta Maezawa, Hironori Washizaki, Yoshinori Tanabe and Shinichi Honiden, “Automated Verification of Pattern-based Interaction Invariants in Ajax Applications,” 28th IEEE/ACM International Conference on Automated Software Engineering (ASE2013)
  17. 17. How can we support? 17 Requirements Design Program source code Reversing model Detecting problems Detecting problems Ajax model extraction and verification [ASE’13][ASE’14] Yuta Maezawa, Kazuki Nishiura, Hironori Washizaki, Shinichi Honiden, “Validating Ajax Applications Using a Delay-Based Mutation Technique,” 29th IEEE/ACM International Conference on Automated Software Engineering (ASE 2014) Yuta Maezawa, Hironori Washizaki, Yoshinori Tanabe and Shinichi Honiden, “Automated Verification of Pattern-based Interaction Invariants in Ajax Applications,” 28th IEEE/ACM International Conference on Automated Software Engineering (ASE2013)
  18. 18. 18 window.onload = setEventHandler; function setEventHandler() { $(“reg_type”).onchange = calcPrice; ・・・ $(“reg_addcart”).onclick = addCart; }; function calcPrice() { ・・・ }; function addCart() { if(isValidInput()) { reqRunTrans(); } else { alert(“Invalid user inputs”); } }; function reqRunTrans() { new Ajax.Request(“runTrans.php”, { method: “GET”, parameters: getParams(), onSuccess: succeeded }); }; function succeeded() { disableAll(); jumpToConfirm(); };Yuta Maezawa, Hironori Washizaki, Yoshinori Tanabe and Shinichi Honiden, “Automated Verification of Pattern-based Interaction Invariants in Ajax Applications,” 28th IEEE/ACM International Conference on Automated Software Engineering (ASE2013)
  19. 19. 19 Extracted finite state machine Yuta Maezawa, Hironori Washizaki, Yoshinori Tanabe and Shinichi Honiden, “Automated Verification of Pattern-based Interaction Invariants in Ajax Applications,” 28th IEEE/ACM International Conference on Automated Software Engineering (ASE2013)
  20. 20. • #70 programming and usability patterns • Potential faults: might not be revealed by testing Ajax (Asynchronous JavaScript + XML) Design Patterns [Mahamoff’06] 20 [Mahamoff’06] M. Mahamoff, “Ajax Design Patterns”, O’Reilly Media Inc., 2006. E.g. User Action “Prevent multiple calls of specific user event handler” Yuta Maezawa, Hironori Washizaki, Yoshinori Tanabe and Shinichi Honiden, “Automated Verification of Pattern-based Interaction Invariants in Ajax Applications,” 28th IEEE/ACM International Conference on Automated Software Engineering (ASE2013)
  21. 21. Duplicate order 21 Verifying invariants of specified pattern Yuta Maezawa, Hironori Washizaki, Yoshinori Tanabe and Shinichi Honiden, “Automated Verification of Pattern-based Interaction Invariants in Ajax Applications,” 28th IEEE/ACM International Conference on Automated Software Engineering (ASE2013)
  22. 22. 22 window.onload = setEventHandler; function setEventHandler() { $(“reg_type”).onchange = calcPrice; ・・・ $(“reg_addcart”).onclick = addCart; }; function calcPrice() { ・・・ }; function addCart() { if(isValidInput()) { $(“addCart”).disabled = true; reqRunTrans(); } else { alert(“Invalid user inputs”); $(“addCart”).disabled = false; } }; function reqRunTrans() { new Ajax.Request(“runTrans.php”, { method: “GET”, parameters: getParams(), onSuccess: succeeded }); }; function succeeded() { disableAll(); jumpToConfirm(); };Yuta Maezawa, Hironori Washizaki, Yoshinori Tanabe and Shinichi Honiden, “Automated Verification of Pattern-based Interaction Invariants in Ajax Applications,” 28th IEEE/ACM International Conference on Automated Software Engineering (ASE2013)
  23. 23. • Developers are concerned with interactions[Duhl’03] • Interaction = event + callback • Rules are necessary for distinguishing interaction- related code fragments Interaction-based state machine extraction 23 ……………………………… ……………………………… ……………………………… ……………………………… …………………………….… ……………………………… …………………………… function addCart() {… ……………………………… ……………………..…… ……………………………………… ……………………………………… $(“addcart”).disabled=true; ……………………………………… ……………………………………… …………………………………… ………… ………… ………… ……………………………… ………………………..…… ……………………………… ……………………………… ……………………………… ……………………………… ……………………………… ……………………………… ……………………………… ……………………………… ………………………… …………………………………………… …………………………………………… function setEventHandler() { $(“addcart”).onclick=addCart; …………………………………………… …………………………………………… …………………………………………… …………………………………………… …………………………………………… onclick setEventHandler ev addCart …disabled… [c] [!c] [Duhl’03] J.Duhl, “White Paper: Rich Internet Applications”, IDC Technical Report’ 03. Yuta Maezawa, Hironori Washizaki, Yoshinori Tanabe and Shinichi Honiden, “Automated Verification of Pattern-based Interaction Invariants in Ajax Applications,” 28th IEEE/ACM International Conference on Automated Software Engineering (ASE2013)
  24. 24. Verification on Promela with LTL 24 Self interaction User Server active proctype App () {…} App model active proctype Interaction () {…} Interaction model Faulty execution paths Verification formulas (LTL) Pattern Negative property User Action <>(App_state == PreventFunc && App_event == UserEvent ) Yuta Maezawa, Hironori Washizaki, Yoshinori Tanabe and Shinichi Honiden, “Automated Verification of Pattern-based Interaction Invariants in Ajax Applications,” 28th IEEE/ACM International Conference on Automated Software Engineering (ASE2013)
  25. 25. • Problem: Potential faults might not cause actual errors • Assumption: Unexpected network latency make potential faults executable. • Solution: Delay-based mutation and testing Delay-based mutation 25 <button onclick=“handleClick()” /> ・・・ <script src=“handleClick.js” /> new DelayedRequest(3000).applyFunction( $.get , “myscript.php”, { name: “ABC” }, function(data) { alert(“Response is ” + data); } ); Synchronous delay Asynchronous delay Original code S1 S2 S3 Late response reveals! Assumes immediate response Yuta Maezawa, Kazuki Nishiura, Hironori Washizaki, Shinichi Honiden, “Validating Ajax Applications Using a Delay-Based Mutation Technique,” 29th IEEE/ACM International Conference on Automated Software Engineering (ASE 2014)
  26. 26. Case Study: industrial services 26 Subject JS [LOC] #States #Trans. #Invariants verified #Potential faults #Delay- Dependent faults 2020 Marketing 2,468 15 547 4 1 1 ECD China 880 32 508 3 2 1 Easy Serviced Apartments 3,523 34 602 3 1 1 Undefined function call Login failed with correct username and password Yuta Maezawa, Kazuki Nishiura, Hironori Washizaki, Shinichi Honiden, “Validating Ajax Applications Using a Delay-Based Mutation Technique,” 29th IEEE/ACM International Conference on Automated Software Engineering (ASE 2014)
  27. 27. Summary 27 Reversing model Tracing artifacts Detecting problems Detecting problems Tracing artifacts Log-based interactive recovery [CAiSE’15] Transitive recovery [ICSME’15 ERA] Ajax model extraction and verification [ASE’13] Ajax delay-based mutation [ASE’14]
  28. 28. 28 Feb 24-26 (due Dec 4) asianplop.org Mar 15 (due Dec)(TBD) ppap.soccerlab.polymtl.ca Mar 11 (due Jan 8) samuraicoding.info Mar 13-18 (due Sep 2016) aster.or.jp/conference/icst2017/ 10th IEEE International Conference on Software Testing, Verification and Validation IPSJ International AI Programming Contest

×