1 / 26

Characteristics of Class Collaboration Networks in Large Java Software Projects

Characteristics of Class Collaboration Networks in Large Java Software Projects. Miloš Savić, Mirjana Ivanović, Miloš Radovanović Department of Mathematics and Informatics Faculty of Science University of Novi Sad. Content. Class collaboration networks Characteristics of complex networks

jeb
Download Presentation

Characteristics of Class Collaboration Networks in Large Java Software Projects

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Characteristics of Class Collaboration Networks in Large Java Software Projects Miloš Savić, Mirjana Ivanović, Miloš Radovanović Department of Mathematics and InformaticsFaculty of ScienceUniversity of Novi Sad

  2. Content • Class collaboration networks • Characteristics of complex networks • Mathematical models of complex networks • Network extraction • Experiments and results • Conclusion

  3. Content • Class collaboration networks • Characteristics of complex networks • Mathematical models of complex networks • Network extraction • Experiments and results • Conclusion

  4. Class Collaboration Networks- Definition - • Software – complex, modular, interacting system • Java Class Collaboration Networks:* nodes – classes/interfaces* links – interactions among classes/interfaces • Interaction ↔ Reference* Class A instantiates and/or uses objects of class B* Class A extends class B* Class A implements interface B

  5. A B D C Class Collaboration Networks- Example - interface A { … } class B implements A { … } class C { … public void methodC(B b) { … b.someMethod(); … } } class D extends C implements A { public B makeB() { return new B(); } }

  6. Content • Class collaboration networks • Characteristics of complex networks • Mathematical models of complex networks • Network extraction • Experiments and results • Conclusion

  7. Characteristics of complex networks- Degree distribution - • Node degree: number of links for the node • Distribution function P(k)* probability that a randomly selected node has exactly klinks • Directed graph: incoming and outgoing degree distributions A E D B C

  8. Characteristics of complex networks- Small world property - 3 • Relatively short path between any two nodes • L ~ ln(N) – small world phenomena • L ~ lnln(N) - ultra small world phenomena 6 1 4 7 5 2 l15=2 [125] l17=4 [1346  7]

  9. Characteristics of complex networks- Clustering coefficient - • Tendency to cluster • Node i- ki links to ki nodes (neighbours)- Ei – number of links between neighbours • Neighbours with node i forms complete subgraph Ci = 1 i

  10. Content • Class collaboration networks • Characteristics of complex networks • Mathematical models of complex networks • Network extraction • Experiments and results • Conclusion

  11. Mathematical models of complex networks • Erdőos-Rényi /ER/ modelrandom networks • Barabási-Albert /BA/ modelscale-free networks

  12. Mathematical models of complex networks- ER model - Alg: Generate ER networkInput: p – connection probability [0..1]n – number of nodesOutput: ER networkfor (i = 1; i < n; i++) for (j = 0; j < i; j++) if (p <= rand(0, 1)) Connect(i, j);

  13. Mathematical models of complex networks- BA model - • Start with small random graph • Growth* in each iteration add new node with m links • Preferential attachment* new node prefers to link to highly connected nodes the probability that the new node connects to a node with k links is proportional to k

  14. Mathematical models of complex networks- BA model - 1. The most of real/engineered networks are scale-free and can be modeled by BA model and its modifications 2. Both models can produce small world property 3. Clustering coefficient of scale-free network is much larger than in a comparable random network

  15. Content • Class collaboration network • Characteristics of complex networks • Mathematical models of complex networks • Network extraction • Experiments and results • Conclusion

  16. Network Extraction • Class diagrams/JavaDoc/Source code • YACCNE* Jung, JavaCC • Node connecting rules1. Class A gives an incoming link to class B if A imports B2. Class A gives an incoming link to class B if B is in the same package as A, and A references B3. Class A gives an incoming link to class B if A references B through it’s full package path 4. References that come outside the software system are excluded

  17. Content • Class collaboration network • Characteristics of complex networks • Mathematical models of complex networks • Network extraction • Experiments and results • Conclusion

  18. Experiments and results- Experiments - • JDK, Tomcat, Ant, Lucene, JavaCC- cumulative incoming/outgoing link degree distributions- small-world coefficient- clustering coefficient • Ten successive versions of Ant (from 1.5.2 to 1.7.0)- compared- can preferential attachment rule model Ant evolution?

  19. Experiments and results - JDK -

  20. Experiments and results - In/Out Degree distributions - γ[in] < γ[out] (except JavaCC)Same result for variuos CCNs: Myers(2003), Valverde and Solé, 2003

  21. Experiments and results - Small world and clustering coefficient - l[Tomcat] ~ lnln(N[Tomcat]) l[JavaCC] ~lnln(N[JavaCC]) c >> c[rand]

  22. Experiments and results- Ant CCN Evolution - org.apache.tools.ant.BuildException (336, 63) org.apache.tools.ant.Project (220, 43) org.apache.tools.ant.Task (124, 22) 1.5.4: 536 nodes, 2241 links 1.6.0: 114 new nodes, 525 new links

  23. Experiments and results - Ant CCN Evolution - org.apache.tools.ant.BuildException (417, 69) org.apache.tools.ant.Project (269, 44) 1.6.5: 690 nodes, 3000 links 1.7.0: 132 new nodes, 44 deleted nodes, 634 new links

  24. Content • Class collaboration network • Characteristics of complex networks • Mathematical models of complex networks • Network extraction • Experiments and results • Conclusion

  25. Conclusion • Analyzed networks exhibit scale-free (or nearly scale-free) and small-world properties. • The preferential attachment concept introduced in the BA model can explain Ant’s class collaboration network evolution

  26. Characteristics of Class Collaboration Networks in Large Java Software Projects Miloš Savić, Mirjana Ivanović, Miloš Radovanović Department of Mathematics and InformaticsFaculty of ScienceUniversity of Novi Sad

More Related