Your SlideShare is downloading. ×
0
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
Decomposing Object oriented class
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

Decomposing Object oriented class

864

Published on

Decomposing Object oriented class using agglomeration clustering. i extend this for c program

Decomposing Object oriented class using agglomeration clustering. i extend this for c program

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
864
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
1
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. Decomposing God Class Using Agglomerative Clustering Technique and  Jaccard Distance Measure
  • 2. <ul><li>Content </li></ul><ul><li>Motivation –Paragraph Decomposition </li></ul><ul><li>Decomposing oo class </li></ul><ul><li>Refactoring </li></ul><ul><li>Literature Survey </li></ul><ul><li>Proposed methodology </li></ul><ul><li>System Architecture </li></ul><ul><li>Module Designs </li></ul><ul><li>Implementation </li></ul><ul><li>Performance measure </li></ul><ul><li>Report </li></ul><ul><li>Conclusion </li></ul><ul><li>Reference </li></ul>
  • 3. Motivation –Decomposition <ul><li>Page1 and Page 2 having same content ,tell which Page is clear to read? </li></ul><ul><ul><li>Page 1 </li></ul></ul><ul><ul><li>Aravind was born in Namakal. Dinesh was born in erode. Aravind was finished his schooling in Namakal city. Dinesh was finished his schooling in a village named Kodumudi. Aravind was finished his under graduate in Arruni engineering college , Thiruvanamali. Dinesh was finished his MCA degree in Erode arts college , Erode. But today Aravind and Dinesh doing their ME degree in CEG, Chennai. They are staying in same room. They are friends. How it happens ? How they meet ? Why they meet? God do all things. </li></ul></ul>Page 2 About Aravind Aravind was born in Namakal. Aravind was finished his schooling in Namakal city. Aravind was finished his under graduate in Arruni engineering college, Thiruvanamali. About Dinesh Dinesh was born in erode. Dinesh was finished his schooling in a village named Kodumudi. Dinesh was finished his MCA degree in Erode arts college , Erode. Aravind and Dinesh But today Aravind and Dinesh doing their ME degree in CEG, Chennai. They are staying in same room. They are friends. How it happens ? How they meet ? Why they meet? God do all things.
  • 4. Motivation - Decomposition <ul><li>Group the Aravind related data and group them as About Aravind </li></ul>Page 2 About Aravind Aravind was born in Namakal. Aravind was finished his schooling in Namakal city. Aravind was finished his under graduate in Arruni engineering college, Thiruvanamali. About Dinesh Dinesh was born in erode. Dinesh was finished his schooling in a village named Kodumudi. Dinesh was finished his MCA degree in Erode arts college , Erode. Aravind and Dinesh But today Aravind and Dinesh doing their ME degree in CEG, Chennai. They are staying in same room. They are friends. How it happens ? How they meet ? Why they meet? God do all things. <ul><ul><li>Page 1 </li></ul></ul><ul><ul><li>Aravind was born in Namakal. Dinesh was born in erode. Aravind was finished his schooling in Namakal city . Dinesh was finished his schooling in a village named Kodumudi . Aravind was finished his under graduate in Arruni engineering college , Thiruvanamali . Dinesh was finished his MCA degree in Erode arts college , Erode. But today Aravind and Dinesh doing their ME degree in CEG, Chennai. They are staying in same room. They are friends. How it happens ? How they meet ? Why they meet? God do all things. </li></ul></ul>
  • 5. Motivation - Decomposition <ul><li>Group the Dinesh related data and group them as About Dinesh </li></ul>Page 2 About Aravind Aravind was born in Namakal. Aravind was finished his schooling in Namakal city. Aravind was finished his under graduate in Arruni engineering college, Thiruvanamali. About Dinesh Dinesh was born in erode. Dinesh was finished his schooling in a village named Kodumudi. Dinesh was finished his MCA degree in Erode arts college , Erode. Aravind and Dinesh But today Aravind and Dinesh doing their ME degree in CEG, Chennai. They are staying in same room. They are friends. How it happens ? How they meet ? Why they meet? God do all things. <ul><ul><li>Page 1 </li></ul></ul><ul><ul><li>Aravind was born in Namakal. Dinesh was born in erode . Aravind was finished his schooling in Namakal city. Dinesh was finished his schooling in a village named Kodumudi. Aravind was finished his under graduate in Arruni engineering college , Thiruvanamali. Dinesh was finished his MCA degree in Erode arts college , Erode. But today Aravind and Dinesh doing their ME degree in CEG, Chennai. They are staying in same room. They are friends. How it happens ? How they meet ? Why they meet? God do all things. </li></ul></ul>
  • 6. Motivation - Decomposition <ul><li>Group aravind and Dinesh related data in Aravind and Dinesh </li></ul><ul><ul><li>Page 1 </li></ul></ul><ul><ul><li>Aravind was born in Namakal. Dinesh was born in erode. Aravind was finished his schooling in Namakal city. Dinesh was finished his schooling in a village named Kodumudi. Aravind was finished his under graduate in Arruni engineering college , Thiruvanamali. Dinesh was finished his MCA degree in Erode arts college , Erode. But today Aravind and Dinesh doing their ME degree in CEG, Chennai. They are staying in same room. They are friends. How it happens ? How they meet ? Why they meet? God do all things. </li></ul></ul>Page 2 About Aravind Aravind was born in Namakal. Aravind was finished his schooling in Namakal city. Aravind was finished his under graduate in Arruni engineering college, Thiruvanamali. About Dinesh Dinesh was born in erode. Dinesh was finished his schooling in a village named Kodumudi. Dinesh was finished his MCA degree in Erode arts college , Erode. Aravind and Dinesh But today Aravind and Dinesh doing their ME degree in CEG, Chennai. They are staying in same room. They are friends. How it happens ? How they meet ? Why they meet? God do all things.
  • 7. <ul><li>We make page 1 as clearly readable by </li></ul><ul><ul><li>Grouping Aravind’s data as About Aravind. </li></ul></ul><ul><ul><li>Grouping Dinesh’s data as About Dinesh. </li></ul></ul><ul><ul><li>Grouping General data as Aravind and Dinesh </li></ul></ul><ul><li>This event is called, Decomposing a big paragraph into 3 small Clearly readable paragraph. </li></ul>Motivation - Decomposition Page1 Aravind And Dinesh About Dinesh About Aravind
  • 8. Decomposing a Class <ul><li>Like Paragraph Decomposition we Decompose Big OO Class(GOD Class) into Small and understandable OO Class </li></ul><ul><ul><li>Why we want to decompose a oo class? </li></ul></ul><ul><ul><li>What is big OO class? </li></ul></ul><ul><ul><li>Why class become big? </li></ul></ul><ul><ul><li>Why we want to decompose a Big oo class? </li></ul></ul>
  • 9. <ul><li>Public class person </li></ul><ul><li>{ </li></ul><ul><li>Private String name ; </li></ul><ul><li>private String job; </li></ul><ul><li>Private String OfficeAreaCode; </li></ul><ul><li>Private officenumberl; </li></ul><ul><li>Public void changeJob(string newJob) </li></ul><ul><li>{ If(!newjob.equals(job))) </li></ul><ul><li>{ </li></ul><ul><li>This.job=newjob; </li></ul><ul><li>} </li></ul><ul><li>Name+=“,”+newjob; </li></ul><ul><li>} </li></ul><ul><li>Public void modifyname(String newName) </li></ul><ul><li>{ If(!newname.equals(name) </li></ul><ul><li>) </li></ul><ul><li>{ </li></ul><ul><li>this.name=newName; </li></ul><ul><li>} </li></ul><ul><li>job=newName+”,”+job; </li></ul><ul><li>} </li></ul><ul><li>Public Dtring getTelephoneNumber() </li></ul><ul><li>{ </li></ul><ul><li>String phone=officeAreacode+”-”+officeNumber; </li></ul><ul><li>Name+=“,”+phone; </li></ul><ul><li>Job+=“,”+phone; </li></ul><ul><li>Return phone; </li></ul><ul><li>} } </li></ul>Public class person_NewCLASS1 { Private String OfficeAreaCode; Private String officenumberl; Public Dtring getTelephoneNumber() { String phone=officeAreacode+”-”+officeNumber; Name+=“,”+phone; Job+=“,”+phone; Return phone; } } Public class person_NewCLASS2 { Private String name ; private String job; Public void changeJob(string newJob) { If(!newjob.equals(job))) { This.job=newjob; } Name+=“,”+newjob; } Public void modifyname(String newName) { If(!newname.equals(name) { this.name=newName; } job=newName+”,”+job; } } Class person is divided into 2 class
  • 10. Person person_NewCLASS1 person_NewCLASS2
  • 11. Refactoring <ul><li>Refactoring are widely recognized as ways to improve the internal structure of object-oriented software while maintaining its external behavior. </li></ul><ul><li>Two types of refactoring </li></ul><ul><ul><li>Move method </li></ul></ul><ul><ul><li>Decomposition </li></ul></ul><ul><li>In move method we interchange Attributes and methods between class. </li></ul>
  • 12. Literature Survey 1 <ul><li>Identifying God Class 1 </li></ul><ul><ul><li>Trifu and Marinescu[19] </li></ul></ul><ul><ul><ul><li>They define God classes as “large, non-cohesive classes that have access to many foreign data” </li></ul></ul></ul><ul><ul><li>Tahvildari and Kontogiannis [18] </li></ul></ul><ul><ul><ul><li>propose two quality design heuristics and use a diagnosis algorithm based on complexity, cohesion and coupling metrics to identify design flaws </li></ul></ul></ul><ul><ul><li>DuBois [12] </li></ul></ul><ul><ul><ul><li>Gives the method to identify GOD class. And give some line Guide lines to solve The God class. It is Manual work </li></ul></ul></ul>
  • 13. Literature Survey 2 <ul><li>Identifying God Class 2 </li></ul><ul><ul><li>Demeyer [10] </li></ul></ul><ul><ul><ul><li>suggest some conceptual criteria to identify the God classes </li></ul></ul></ul><ul><li>The above 4 Authors gives Identification method of God class not solutions for that </li></ul>
  • 14. Literature Survey <ul><li>Re-modularizing software modules </li></ul><ul><ul><li>Mancoridis[11] </li></ul></ul><ul><ul><ul><li>Using Clustering technique for Re modularization </li></ul></ul></ul><ul><ul><li>Doval[11] </li></ul></ul><ul><ul><ul><li>View the Partitioning problem as Optimization Problem </li></ul></ul></ul><ul><ul><li>Shokoufandeh </li></ul></ul><ul><ul><ul><li>Special Clustering algorithm used for Re modulization </li></ul></ul></ul><ul><ul><li>Sartipi and Kontogiannis [16] </li></ul></ul><ul><ul><ul><li>propose a semi-supervised clustering framework for recovering the software architecture. </li></ul></ul></ul>
  • 15. Literature Survey <ul><li>Identify Extract Class opportunities </li></ul><ul><ul><li>Simon[17] </li></ul></ul><ul><ul><ul><li>suggest a visualization techniques </li></ul></ul></ul><ul><ul><ul><li>Dependency set </li></ul></ul></ul><ul><ul><ul><li>Mapping </li></ul></ul></ul>
  • 16. Literature Survey <ul><li>Simons visualization Mapping </li></ul>A1 A2 A3 A4 A5 M1 M2 M3 M4 A1 A2 A3 A4 A5 M1 M2 M3 M4
  • 17. Literature Survey <ul><li>Identify Extract Class opportunities </li></ul><ul><ul><li>Joshi and Joshi [13] </li></ul></ul><ul><ul><ul><li>consider the problem of classes with low cohesion as a graph partitioning problem </li></ul></ul></ul><ul><ul><li>De Lucia[14] </li></ul></ul><ul><ul><ul><li>structural and conceptual criteria. </li></ul></ul></ul><ul><ul><ul><li>weighted graph of the class methods. </li></ul></ul></ul><ul><ul><ul><li>MaxFlow - MinCut algorithm. </li></ul></ul></ul><ul><li>Xcode[7] is one of the refactoring tool </li></ul>
  • 18. Proposed Methodology <ul><li>Identify Extract Class opportunities we use 2 Methodologies[1] </li></ul><ul><ul><li>Aggolaramative Clustering </li></ul></ul><ul><ul><li>Jaccard Distance </li></ul></ul>
  • 19. System Architecture Oo code/C program Decomposed oo code Distant Measurer Decomposer Cluster engine Entity set generator Parser C program parser Oo parser God class Identifier Class maker Class generator Class divider Group all class Grouping oo class Grouping c related class Code re-assembler Ranking classes Re-assemble the class Distend measurer Decomposer
  • 20. Module1 Design Diagram OO Parser Disk OO file Word file Class files Word Parser Class Divider Class name display interface OO File name Class Names
  • 21. Module2 Design Diagram
  • 22. Module3 Design Diagram
  • 23. Module4 Design Diagram
  • 24. Module5 Design Diagram
  • 25. Module6 Design Diagram
  • 26. Module7 Design Diagram
  • 27. Module8 Design Diagram
  • 28. Module9 Design Diagram
  • 29. Module10 Design Diagram
  • 30. Module11 Design Diagram
  • 31. Implementation <ul><li>Parser </li></ul><ul><ul><li>Get Java file as an input </li></ul></ul><ul><ul><li>Parse file word by word </li></ul></ul><ul><ul><li>Store all the words into files </li></ul></ul>
  • 32. Performance measure <ul><li>We measure the performance of module one using the following metrics </li></ul><ul><ul><li>Parse word ratio </li></ul></ul><ul><ul><li>=(Number of words produced by parser)/(Total number of words in the file) </li></ul></ul>
  • 33. Report <ul><li>Complexity Analysis </li></ul><ul><li>Pseudo code </li></ul><ul><li>Project Schedule </li></ul>
  • 34. Conclusion <ul><li>Module 1 completed. </li></ul><ul><li>Module 2 Started. </li></ul><ul><li>Module 3 and 4 are more complex Modules in the first Phase. In phase 2 Module 7 is complex </li></ul><ul><li>Form our software we never get 100% error free code. </li></ul><ul><li>We try to get 100% error free code. </li></ul>
  • 35. Reference <ul><li>Marios Fokaefs, Nikolaos Tsantalis, Alexander Chatzigeorgiou , Joorg Sander “Decomposing Object-Oriented Class Modules Using an Agglomerative Clustering Technique”2009/September. </li></ul><ul><li>N. Tsantalis and A. Chatzigeorgiou. Identification of Move Method Refactoring Opportunities. IEEE Transactions on Software Engineering, 35(3):347–367, May/June 2009 </li></ul><ul><li>Linda M. Laird M. Carol Brennan “Software measurement and Estimation A Practical Approch” wille interscience A jonson & wiley and sons inc,.publication. </li></ul><ul><li>N. Anquetil and T. Lethbridge. Experiments with Clustering as a Software Re modularization Method. In WCRE ’99: Proceedings of the 6th Working Conference on Reverse Engineering,1999. </li></ul><ul><li>Martin, J.; Muller, H.A.; , &quot;Strategies for migration from C to Java,&quot; Software Maintenance and Re engineering, 2001. Fifth European Conference on , vol., no., pp.200-209, 2001doi: 10.1109/.2001.914988 </li></ul><ul><li>A Model of Refactoring Tool Use Emerson Murphy-Hill The University of British Columbia [email_address] </li></ul><ul><li>Website:www.xcoder.com </li></ul><ul><li>Bart Du Bois and Serge Demeyer Jan Verelst “Refactoring - Improving Coupling and Cohesion of Existing Code” </li></ul><ul><li>Class lecturer notes Dr.Baskarsn: Function points </li></ul><ul><li>S. Demeyer, S. Ducasse, and O. M. Nierstrasz. Object-Oriented Reengineering Patters. Morgan Kaufman Publishers,2002. </li></ul><ul><li>D. Doval, S. Mancoridis, and B. S. Mitchell. Automatic Clustering of Software Systems Using a Genetic Algorithm. Proceedings of the 5th International Conference on Software Tools and Engineering Practice, 30 August - 2 September1999. </li></ul><ul><li>B. DuBois, S. Demeyer, and J. Verelst. Refactoring – Improving Coupling and Cohesion of Existing Code. Proceedings of the 11th Working Conference on Reverse Engineering, pages 144–151, November 8-12 2004 </li></ul>
  • 36. Reference <ul><li>P. Joshi and R. K. Joshi. Concept Analysis for Class Cohesion.13rd European Conference on Software Maintenance and Reengineering, pages 237–240, March 24-27 2009. </li></ul><ul><li>A. D. Lucia, R. Oliveto, and L. Vorraro. Using Structural and Semantic Metrics to Improve Class Cohesion. 24th IEEE International Conference on Software Maintenance, 2008. </li></ul><ul><li>S. Mancoridis, B. S. Mitchell, C. Rorres, Y. Chen, and E. R.Gansner. Using Automatic Clustering to Produce High-Level System Organizations of Source Code. Proceedings of the 6th International Workshop on Program Comprehension,pages 45–52, 1998. </li></ul><ul><li>K. Sartipi and K. Kontogiannis. Component Clustering Based on Maximal Association. Proceedings of the IEEE Working Conference on Reverse Engineering, October 2001. </li></ul><ul><li>F. Simon, F. Steinbruckner, and C. Lewrentz. Metrics Based Refactoring. Proceedings of the 5th European Conference on Software Maintenance and Reengineering, pages 30–38,2001. </li></ul><ul><li>L. Tahvildari and K. Kontogiannis. A Metric-Based Approach to Enhance Design Quality Through Meta-Pattern Tranformations. Proceedings of the 7th European Conference on Software Maintenance and Reengineering, pages 183–192, March 26-28 2003. </li></ul><ul><li>A. Trifu and R. Marinescu. Diagnosing Design Problems in Object Oriented Systems. Proceedings of the 12th Working Conference on Reverse Engineering, 2005. </li></ul>
  • 37. Queries
  • 38. Thank you

×