Trends in Object-Oriented Software Evolution: Investigating Network Properties

17
Trends in Object-Oriented Software Evolution: Investigating Network Properties Alexander Chatzigeorgiou George Melas University of Macedonia Thessaloniki, Greece NIER track - 34th International Conference on Software Engineering (ICSE 2012)

description

Trends in Object-Oriented Software Evolution: Investigating Network Properties Alexander Chatzigeorgiou George Melas University of Macedonia Thessaloniki, Greece. NIER track - 34th International Conference on Software Engineering (ICSE 2012). Facts. - PowerPoint PPT Presentation

Transcript of Trends in Object-Oriented Software Evolution: Investigating Network Properties

Page 1: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Trends in Object-Oriented Software Evolution: Investigating Network Properties

Alexander Chatzigeorgiou George Melas

University of Macedonia

Thessaloniki, Greece

NIER track - 34th International Conference on Software Engineering (ICSE 2012)

Page 2: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Facts

The growth of social networks is phenomenal

social networks are Graphs

Research on Graph Properties

Social

Network

Analysis

Page 3: Trends in Object-Oriented Software Evolution: Investigating Network Properties

… but networks (and software) are not static

• Research has focused into the evolution of networks in order to derive models that govern their growth

• Software systems can be naturally represented as graphs

•Trends in software evolution can be studied using SNA

• Macroscopic phenomena at the network level might reveal:

• the presence of design problems

• the application of maintenance activities

• the need to formulate “evolution-oriented” design rules

Page 4: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Community Guided Attachment

• Social setting: individuals tend to be similar to their friends (homophily)

• we select friends that have similar characteristics (selection)• we modify our behavior (social influence)

city (e.g. London)

Imperial LSE King’s College

Elec.Eng. Comp.Sc. Comp. Sc. MathMath

1st year 2nd year 1st year 2nd year 1st year 2nd year1st year

Page 5: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Community Guided Attachment - 2

•Obviously software modules do not select their collaborators and do not modify their behavior for social reasons

• But, designers of classes make them interact with other classes that are conceptually similar

• Usually modules are organized in distinct communities (e.g. packages, namespaces)

Page 6: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Community Guided Attachment - 3

Intuitive Assumption: Cross-package links should be harder to form than intra-package links

org.jfree

chart gui data

editor panels io jdbc

Class 1

Class 7

Class 33

Class 35

Class 22

Class 12

Class 17

Class 9h = 1

h = 2

h = 3

distance = 2

Page 7: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Community Guided Attachment - 4

20%

30%

40%

50%

60%

70%

80%

90%

100%

1 1.5 2 2.5 3 3.5 4Distance

3.0.63.1.73.1.83.1.93.23.3.13.3.3

Cum

ulati

ve P

erce

ntag

e of

Edg

esCGA = large percentage of links among classes in the same package

last version: only 30% of the links connect classes residing in the same package

CGA becomes weaker

1st version: 40% of the links connect classes residing in the same package

Page 8: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Preferential Attachment

• One of the most extensively studied issues in Network Analysis is whether networks are scale-free

• According to many researchers, in a scale-free network the degree distribution follows a power law *

1

10

100

1 10 100Class In-DegreeCu

mul

. Num

ber o

f Cla

sses

The largest percentage of classes have low in-degree

* however power laws in the degree distribution are not sufficient to prove the existence of scale-freeness “Mathematics and the Internet: A Source of Enormous Confusion and Great Potential”, Willinger, Alderson, Doyle, Notices of the AMS, 56, 2009

Page 9: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Preferential Attachment - 2

• What leads to scale-free networks and power law phenomena ?

•PA model: when a network evolves, the number of new links attracted by each node is proportional to its degree

• “Rich-gets-richer”: For an OO system implies that God classes act as attractors for new classes that join the network

Class A Class B

New Class

Page 10: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Preferential Attachment - 3

• Is PA present in software ?

0%10%20%30%40%50%60%70%80%90%

100%

0 50 100 150 200 250 300 350In-Degree of Destination Class

3.0.6-3.1.73.1.7-3.1.83.1.8 - 3.1.93.1.9-3.23.2 - 3.3.13.3.1 - 3.3.3

Cum

ul. P

erc.

of n

ew A

ssoc

iatio

ns

first version: around 50% of new associations attached to nodes having in-degree 50 or higher

last version: 50% of new associations attached to nodes having in-degree 100+

last version: 20% of new associations attached to nodes having in-degree 250+

Page 11: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Small World Phenomena

• A network is said to exhibit the small-world phenomenon if any two nodes have a high probability of being associated through a short path

• Popularly known as six degrees of separation

Page 12: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Small World Phenomena - 2

• According to Watts and Strogatz this property stems from homophily and the presence of weak ties (edges that connect distant nodes)

• Both properties are present in OO systems:

• Classes tend to link to classes in the same neighborhood

• Links are also formed between classes of different packages

Page 13: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Small World Phenomena - 3

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1 2 3 4 5 6

Cum

ulati

ve P

erc.

of C

lass

Pai

rs

Hops

Small world phenomenon becomes less intense

first version: 100% of class pairs are at most 3 hops apart

last version: 100% of class pairs are at most 4 hops apart

Page 14: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Small World Phenomena - 4

• Small-world phenomena are expected when the underlying model of growth follows a “forest-fire” model

Page 15: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Small World Phenomena - 5

• This is not how OO software evolves

Class

Class

Class

ClassNew Class

Page 16: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Conclusions

• The analysis of evolving software to reveal the underlying trends can be a challenging task

• Network Analysis can provide valuable insight into evolution phenomena – possibly related to qualitative properties

• No model sufficient to explain how software evolves

• Major difference between software and social networks: In software we can intentionally modify structure

• Investigate the impact of design improving activities

Page 17: Trends in Object-Oriented Software Evolution: Investigating Network Properties

Thank you for your attention

NIER track - 34th International Conference on Software Engineering (ICSE 2012)