Richard Wettel and Michele Lanza
University of Lugano, CH
Code City
Software systems as
Richard Wettel and Michele
CodeCity
The city metaphor
3
Richard Wettel and Michele
CodeCity
The city metaphor
3
domain mapping
classes buildings
package
s
districts
system city
Richard Wettel and Michele
CodeCity
The city metaphor
3
domain mapping
classes buildings
package
s
districts
system city
Richard Wettel and Michele
CodeCity
The city metaphor
3
domain mapping
classes buildings
package
s
districts
system city
Richard Wettel and Michele
CodeCity
The city metaphor
3
domain mapping
classes buildings
package
s
districts
system city
Richard Wettel and Michele
CodeCity
The city metaphor
3
domain mapping
classes buildings
package
s
districts
system city
c...
Richard Wettel and Michele
CodeCity
The city metaphor
3
domain mapping
classes buildings
package
s
districts
system city
p...
Richard Wettel and Michele
CodeCity
“Reading” a code city
4
Richard Wettel and Michele
CodeCity
“Reading” a code city
4
skyscrapers
(NOM, NOA)
Richard Wettel and Michele
CodeCity
“Reading” a code city
4
skyscrapers
(NOM, NOA)
parking lots
(NOM,
NOA)
Richard Wettel and Michele
CodeCity
“Reading” a code city
4
skyscrapers
(NOM, NOA)
parking lots
(NOM,
NOA)
office building...
Mapping techniques
Richard Wettel and Michele
CodeCity
1. Identity mapping
6
NOM heightf(x) = x
Richard Wettel and Michele
CodeCity
1. Identity mapping
6
NOM heightf(x) = x
Richard Wettel and Michele
CodeCity
1. Identity mapping
6
NOM heightf(x) = x
Richard Wettel and Michele
CodeCity
Identity mapping applied
7
Richard Wettel and Michele
CodeCity
2. Linear mapping
8
NOM heightf(x) = ax + b
Richard Wettel and Michele
CodeCity
2. Linear mapping
8
NOM heightf(x) = ax + b
Richard Wettel and Michele
CodeCity
2. Linear mapping
8
NOM heightf(x) = ax + b
Richard Wettel and Michele
CodeCity
2. Linear mapping
8
NOM heightf(x) = ax + b
Richard Wettel and Michele
CodeCity
Linear mapping applied
9
Richard Wettel and Michele
CodeCity
3. Boxplot-based mapping
10
NOM heightclustering
Richard Wettel and Michele
CodeCity
3. Boxplot-based mapping
10
NOM heightclustering
very high
high
average
low
very low
Richard Wettel and Michele
CodeCity
3. Boxplot-based mapping
10
NOM heightclustering
very high
high
average
low
very low
Richard Wettel and Michele
CodeCity
3. Boxplot-based mapping
10
NOM heightclustering
very high
high
average
low
very low
u...
Richard Wettel and Michele
CodeCity
3. Boxplot-based mapping
10
NOM heightclustering
very high
high
average
low
very low
u...
Richard Wettel and Michele
CodeCity
3. Boxplot-based mapping
10
NOM heightclustering
very high
high
average
low
very low
Richard Wettel and Michele
CodeCity
3. Boxplot-based mapping
10
NOM heightclustering
very high
high
average
low
very low
Richard Wettel and Michele
CodeCity
3. Boxplot-based mapping
10
NOM heightclustering
very high
high
average
low
very low
Richard Wettel and Michele
CodeCity
Boxplot-based mapping applied
11
Richard Wettel and Michele
CodeCity
4. Threshold-based mapping
12
NOM heightclustering
Richard Wettel and Michele
CodeCity
4. Threshold-based mapping
12
NOM heightclustering
very high
high
average
low
very low
Richard Wettel and Michele
CodeCity
4. Threshold-based mapping
12
NOM heightclustering
very high
high
average
low
very low
Richard Wettel and Michele
CodeCity
4. Threshold-based mapping
12
NOM heightclustering
very high
high
average
low
very low
Richard Wettel and Michele
CodeCity
4. Threshold-based mapping
12
NOM heightclustering
very high
high
average
low
very low
Richard Wettel and Michele
CodeCity
4. Threshold-based mapping
12
NOM heightclustering
very high
high
average
low
very low
Richard Wettel and Michele
CodeCity
4. Threshold-based mapping
12
NOM heightclustering
very high
high
average
low
very low
Richard Wettel and Michele
CodeCity
Threshold-based mapping applied
13
Richard Wettel and Michele
CodeCity
Mappings compared
14
identit
y
linear
boxplot-
basedthreshold-
based
Richard Wettel and Michele
CodeCity
Mappings compared
14
identit
y
linear
boxplot-
basedthreshold-
based
Richard Wettel and Michele
CodeCity
Mappings compared
14
identit
y
linear
boxplot-
basedthreshold-
based
Richard Wettel and Michele
CodeCity
Mappings compared
14
identit
y
linear
boxplot-
basedthreshold-
based
Richard Wettel and Michele
CodeCity
Mappings compared
14
identit
y
linear
boxplot-
basedthreshold-
based
Understanding programs
Richard Wettel and Michele
CodeCity
Reverse-engineering ArgoUML
16
Richard Wettel and Michele
CodeCity
Reverse-engineering ArgoUML
16
Richard Wettel and Michele
CodeCity
Reverse-engineering ArgoUML
16
Richard Wettel and Michele
CodeCity
The twin towers
17
Richard Wettel and Michele
CodeCity
Facade
1 attribute
337
methods
The twin towers
17
Richard Wettel and Michele
CodeCity
Facade
1 attribute
337
methods
The twin towers
17
FacadeMDRI
mpl
3 attribute
349 metho...
Richard Wettel and Michele
CodeCity
Facade
1 attribute
337
methods
The twin towers
17
Is there
anybody
out
FacadeMDRI
mpl
...
Richard Wettel and Michele
CodeCity
Facade
1 attribute
337
methods
The twin towers
17
FacadeMDRI
mpl
3 attribute
349 metho...
Richard Wettel and Michele
CodeCity
Hotels, parking lots, duplication
18
Richard Wettel and Michele
CodeCity
Hotels, parking lots, duplication
18
org.argouml.language.
java.generator
JavaTokenTyp...
Richard Wettel and Michele
CodeCity
Hotels, parking lots, duplication
18
org.argouml.language.
java.generator
JavaTokenTyp...
Richard Wettel and Michele
CodeCity
Hotels, parking lots, duplication
18
org.argouml.language.
java.generator
JavaTokenTyp...
Richard Wettel and Michele
CodeCity
Hotels, parking lots, duplication
18
org.argouml.language.
java.generator
JavaTokenTyp...
Richard Wettel and Michele
CodeCity
Hotels, parking lots, duplication
18
org.argouml.language.
java.generator
JavaTokenTyp...
Looking at the design
Richard Wettel and Michele
CodeCity
On software design...
20
Richard Wettel and Michele
CodeCity
On software design...
Definitions
bad smells [Beck & Fowler 1998], design flaws
heuristi...
Richard Wettel and Michele
CodeCity
On software design...
Definitions
bad smells [Beck & Fowler 1998], design flaws
heuristi...
Richard Wettel and Michele
CodeCity
On software design...
Definitions
bad smells [Beck & Fowler 1998], design flaws
heuristi...
Richard Wettel and Michele
CodeCity
The God Class detection strategy
21
Richard Wettel and Michele
CodeCity
God classes of JDK 1.5 in Moose
22
Richard Wettel and Michele
CodeCity
God classes of JDK in CodeCity
23
Richard Wettel and Michele
CodeCity
Class-level disharmony maps
24
KeyEvent
(NOA 205, NOM 18) java.awt.event
InputEvent
(N...
Richard Wettel and Michele
CodeCity
Class-level disharmony ma
25
org.argouml.reveng.java
Modeller
(NOA 15, NOM 52)
JavaRec...
Richard Wettel and Michele
CodeCity
Granularity of representation
26
NOM=7
NOA
=
2
NOA = 2
class C
coarse
Richard Wettel and Michele
CodeCity
Granularity of representation
26
NOM=7
NOA
=
2
NOA = 2
class C
coarse fine-grained
Richard Wettel and Michele
CodeCity
Granularity of representation
26
NOM=7
NOA
=
2
NOA = 2
class C
class C
coarse fine-grai...
Richard Wettel and Michele
CodeCity
Granularity of representation
26
NOM=7
NOA
=
2
NOA = 2
class C
class C
m4
m1
m3
m5 m7
...
Richard Wettel and Michele
CodeCity 27
Feature envy map
Jmol
Richard Wettel and Michele
CodeCity 27
1,500 methods
(25 %)
Feature envy map
Jmol
Richard Wettel and Michele
CodeCity
Shotgun surgery map
28
ArgoUM
L
Richard Wettel and Michele
CodeCity
Shotgun surgery map
28
ArgoUM
L
Richard Wettel and Michele
CodeCity
Shotgun surgery map
28
ArgoUM
L
Exploring the history
Richard Wettel and Michele
CodeCity
Modeling history: Hismo
30
Class
Richard Wettel and Michele
CodeCity
Modeling history: Hismo
30
Class
time
Richard Wettel and Michele
CodeCity
Modeling history: Hismo
30
Class
Class
Version
timetimestamp N
Richard Wettel and Michele
CodeCity
Modeling history: Hismo
30
Class
Class
Version
...
timetimestamp N
Class
Version
Class...
Richard Wettel and Michele
CodeCity
Modeling history: Hismo
30
Class
Class
Version
...
timetimestamp N
Class
Version
Class...
Richard Wettel and Michele
CodeCity
Modeling history: Hismo
30
Class
Class
Version
Class History
...
timetimestamp N
Class...
Richard Wettel and Michele
CodeCity
Visualizing evolution
31
Time travel
Age map
Timeline
fine
Richard Wettel and Michele
CodeCity
Visualizing evolution
31
Time travel
Age map
Timeline
fine
Richard Wettel and Michele
CodeCity
Visualizing evolution
31
Time travel
Age map
Timeline
fine
Richard Wettel and Michele
CodeCity
Consistent locality
32
A
BarFoo
Blueprint for the city,
based on the maximal
expansion...
Richard Wettel and Michele
CodeCity
Consistent locality
32
A
BarFoo
Blueprint for the city,
based on the maximal
expansion...
Richard Wettel and Michele
CodeCity
Consistent locality
32
A
BarFoo
Blueprint for the city,
based on the maximal
expansion...
Richard Wettel and Michele
CodeCity
Consistent locality
32
A
BarFoo
Blueprint for the city,
based on the maximal
expansion...
Richard Wettel and Michele
CodeCity
Age map
33
Bricks position is
chronological
neighbors are contemporary class C
Richard Wettel and Michele
CodeCity
Superficial glimpse in the past.
color layer according to age (number of versions)
Age ...
Richard Wettel and Michele
CodeCity
Superficial glimpse in the past.
color layer according to age (number of versions)
Age ...
Richard Wettel and Michele
CodeCity
Superficial glimpse in the past.
color layer according to age (number of versions)
Age ...
Richard Wettel and Michele
CodeCity
Superficial glimpse in the past.
color layer according to age (number of versions)
Age ...
Richard Wettel and Michele
CodeCity
Age map interpretation
34
age: 1 2 3 4 5 6 7 8
Richard Wettel and Michele
CodeCity
Age map interpretation
34
age: 1 2 3 4 5 6 7 8
stable
very old
Richard Wettel and Michele
CodeCity
Age map interpretation
34
age: 1 2 3 4 5 6 7 8
stable
oldvery old
rarely updated
Richard Wettel and Michele
CodeCity
Age map interpretation
34
age: 1 2 3 4 5 6 7 8
stable
youngoldvery old
rarely updated
...
Richard Wettel and Michele
CodeCity
Age map interpretation
34
age: 1 2 3 4 5 6 7 8
stable
youngoldvery old
rarely updated
...
Richard Wettel and Michele
CodeCity
Age map, fine-grained
35
library packages:
java
javax
junit
org.w3c.dom
(classes) AllT...
Richard Wettel and Michele
CodeCity
Time travel, coarse-grained
36
ArgoUML
Richard Wettel and Michele
CodeCity
Time travel, coarse-grained
36
ArgoUML
Richard Wettel and Michele
CodeCity
Time travel, fine-grained
37
JHotDraw
Richard Wettel and Michele
CodeCity
Time travel, fine-grained
37
JHotDraw
Richard Wettel and Michele
CodeCity
Timeline
38
History of class C
Richard Wettel and Michele
CodeCity
Timeline
38
time
(versions)
m3
m5
History of class C
V1
Richard Wettel and Michele
CodeCity
Timeline
38
time
(versions)
m3
m5 m8
m12
m3
History of class C
V1
V2
Richard Wettel and Michele
CodeCity
Timeline
38
time
(versions)
m3
m5 m8
m12
m3
History of class C
V1
V2
Richard Wettel and Michele
CodeCity
Timeline
38
time
(versions)
m3
m5 m8
m12
m3
m12
m18
History of class C
V1
V2
V3
Richard Wettel and Michele
CodeCity
Timeline
38
time
(versions)
m3
m5 m8
m12
m3
m12
m18
History of class C
V1
V2
V3
Richard Wettel and Michele
CodeCity
Examples of timelines
39
Richard Wettel and Michele
CodeCity
Examples of timelines
39
Richard Wettel and Michele
CodeCity
Scripting cities
40
Richard Wettel and Michele
CodeCity
On relationships
41
The tool
Richard Wettel and Michele
CodeCity
Tool chain
43
iPlasma
Moose
CodeCity
model
exchange
parsing &
metric computation
Jun
r...
Richard Wettel and Michele
CodeCity
Cityscapes
44
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
Richard Wettel and Michele
CodeCity
Cityscapes
44
System Languag
e
NOP NOC kLO
C
Azureus Java 457 4734 274
ArgoUML Java 14...
http://www.inf.unisi.ch/phd/wettel/
codecity.html
http://www.inf.unisi.ch/phd/wettel/
codecity.html
over
1100
downloads
since March
2008
!
http://www.inf.unisi.ch/phd/wettel/
codecity.html
over
1100
downloads
since March
2008
!
http://www.inf.unisi.ch/phd/wettel/
codecity.html
^ Smalltalk
over
1100
downloads
since March
2008
!
Upcoming SlideShare
Loading in …5
×

Code City

2,416 views

Published on

Code City. Richard Wettel. ESUG 2008, Amsterdam

Published in: Technology, Art & Photos

Code City

  1. 1. Richard Wettel and Michele Lanza University of Lugano, CH Code City
  2. 2. Software systems as
  3. 3. Richard Wettel and Michele CodeCity The city metaphor 3
  4. 4. Richard Wettel and Michele CodeCity The city metaphor 3 domain mapping classes buildings package s districts system city
  5. 5. Richard Wettel and Michele CodeCity The city metaphor 3 domain mapping classes buildings package s districts system city
  6. 6. Richard Wettel and Michele CodeCity The city metaphor 3 domain mapping classes buildings package s districts system city
  7. 7. Richard Wettel and Michele CodeCity The city metaphor 3 domain mapping classes buildings package s districts system city
  8. 8. Richard Wettel and Michele CodeCity The city metaphor 3 domain mapping classes buildings package s districts system city class metric building propertynumber of methods (NOM) height number of attributes (NOA) width, length
  9. 9. Richard Wettel and Michele CodeCity The city metaphor 3 domain mapping classes buildings package s districts system city package metric district propertynesting level color class metric building propertynumber of methods (NOM) height number of attributes (NOA) width, length
  10. 10. Richard Wettel and Michele CodeCity “Reading” a code city 4
  11. 11. Richard Wettel and Michele CodeCity “Reading” a code city 4 skyscrapers (NOM, NOA)
  12. 12. Richard Wettel and Michele CodeCity “Reading” a code city 4 skyscrapers (NOM, NOA) parking lots (NOM, NOA)
  13. 13. Richard Wettel and Michele CodeCity “Reading” a code city 4 skyscrapers (NOM, NOA) parking lots (NOM, NOA) office buildings (NOM, NOA)
  14. 14. Mapping techniques
  15. 15. Richard Wettel and Michele CodeCity 1. Identity mapping 6 NOM heightf(x) = x
  16. 16. Richard Wettel and Michele CodeCity 1. Identity mapping 6 NOM heightf(x) = x
  17. 17. Richard Wettel and Michele CodeCity 1. Identity mapping 6 NOM heightf(x) = x
  18. 18. Richard Wettel and Michele CodeCity Identity mapping applied 7
  19. 19. Richard Wettel and Michele CodeCity 2. Linear mapping 8 NOM heightf(x) = ax + b
  20. 20. Richard Wettel and Michele CodeCity 2. Linear mapping 8 NOM heightf(x) = ax + b
  21. 21. Richard Wettel and Michele CodeCity 2. Linear mapping 8 NOM heightf(x) = ax + b
  22. 22. Richard Wettel and Michele CodeCity 2. Linear mapping 8 NOM heightf(x) = ax + b
  23. 23. Richard Wettel and Michele CodeCity Linear mapping applied 9
  24. 24. Richard Wettel and Michele CodeCity 3. Boxplot-based mapping 10 NOM heightclustering
  25. 25. Richard Wettel and Michele CodeCity 3. Boxplot-based mapping 10 NOM heightclustering very high high average low very low
  26. 26. Richard Wettel and Michele CodeCity 3. Boxplot-based mapping 10 NOM heightclustering very high high average low very low
  27. 27. Richard Wettel and Michele CodeCity 3. Boxplot-based mapping 10 NOM heightclustering very high high average low very low upper quartile lower quartile median lower whisker upper whisker
  28. 28. Richard Wettel and Michele CodeCity 3. Boxplot-based mapping 10 NOM heightclustering very high high average low very low upper quartile lower quartile median lower whisker upper whisker
  29. 29. Richard Wettel and Michele CodeCity 3. Boxplot-based mapping 10 NOM heightclustering very high high average low very low
  30. 30. Richard Wettel and Michele CodeCity 3. Boxplot-based mapping 10 NOM heightclustering very high high average low very low
  31. 31. Richard Wettel and Michele CodeCity 3. Boxplot-based mapping 10 NOM heightclustering very high high average low very low
  32. 32. Richard Wettel and Michele CodeCity Boxplot-based mapping applied 11
  33. 33. Richard Wettel and Michele CodeCity 4. Threshold-based mapping 12 NOM heightclustering
  34. 34. Richard Wettel and Michele CodeCity 4. Threshold-based mapping 12 NOM heightclustering very high high average low very low
  35. 35. Richard Wettel and Michele CodeCity 4. Threshold-based mapping 12 NOM heightclustering very high high average low very low
  36. 36. Richard Wettel and Michele CodeCity 4. Threshold-based mapping 12 NOM heightclustering very high high average low very low
  37. 37. Richard Wettel and Michele CodeCity 4. Threshold-based mapping 12 NOM heightclustering very high high average low very low
  38. 38. Richard Wettel and Michele CodeCity 4. Threshold-based mapping 12 NOM heightclustering very high high average low very low
  39. 39. Richard Wettel and Michele CodeCity 4. Threshold-based mapping 12 NOM heightclustering very high high average low very low
  40. 40. Richard Wettel and Michele CodeCity Threshold-based mapping applied 13
  41. 41. Richard Wettel and Michele CodeCity Mappings compared 14 identit y linear boxplot- basedthreshold- based
  42. 42. Richard Wettel and Michele CodeCity Mappings compared 14 identit y linear boxplot- basedthreshold- based
  43. 43. Richard Wettel and Michele CodeCity Mappings compared 14 identit y linear boxplot- basedthreshold- based
  44. 44. Richard Wettel and Michele CodeCity Mappings compared 14 identit y linear boxplot- basedthreshold- based
  45. 45. Richard Wettel and Michele CodeCity Mappings compared 14 identit y linear boxplot- basedthreshold- based
  46. 46. Understanding programs
  47. 47. Richard Wettel and Michele CodeCity Reverse-engineering ArgoUML 16
  48. 48. Richard Wettel and Michele CodeCity Reverse-engineering ArgoUML 16
  49. 49. Richard Wettel and Michele CodeCity Reverse-engineering ArgoUML 16
  50. 50. Richard Wettel and Michele CodeCity The twin towers 17
  51. 51. Richard Wettel and Michele CodeCity Facade 1 attribute 337 methods The twin towers 17
  52. 52. Richard Wettel and Michele CodeCity Facade 1 attribute 337 methods The twin towers 17 FacadeMDRI mpl 3 attribute 349 methods
  53. 53. Richard Wettel and Michele CodeCity Facade 1 attribute 337 methods The twin towers 17 Is there anybody out FacadeMDRI mpl 3 attribute 349 methods
  54. 54. Richard Wettel and Michele CodeCity Facade 1 attribute 337 methods The twin towers 17 FacadeMDRI mpl 3 attribute 349 methods
  55. 55. Richard Wettel and Michele CodeCity Hotels, parking lots, duplication 18
  56. 56. Richard Wettel and Michele CodeCity Hotels, parking lots, duplication 18 org.argouml.language. java.generator JavaTokenType s146 attributes 0 methods JavaRecognizer 24 attributes 91 methods
  57. 57. Richard Wettel and Michele CodeCity Hotels, parking lots, duplication 18 org.argouml.language. java.generator JavaTokenType s146 attributes 0 methods JavaRecognizer 24 attributes 91 methods STDCTokenTy pes152 attributes 0 methods CPPParser 85 attributes 204 methods org.argouml.uml.reveng.class file
  58. 58. Richard Wettel and Michele CodeCity Hotels, parking lots, duplication 18 org.argouml.language. java.generator JavaTokenType s146 attributes 0 methods JavaRecognizer 24 attributes 91 methods STDCTokenTy pes152 attributes 0 methods CPPParser 85 attributes 204 methods JavaTokenTyp es173 attributes0 methods JavaRecogniz er79 attributes 176 methods org.argouml.uml.reveng.java org.argouml.uml.reveng.class file
  59. 59. Richard Wettel and Michele CodeCity Hotels, parking lots, duplication 18 org.argouml.language. java.generator JavaTokenType s146 attributes 0 methods JavaRecognizer 24 attributes 91 methods STDCTokenTy pes152 attributes 0 methods CPPParser 85 attributes 204 methods JavaTokenTyp es173 attributes0 methods JavaRecogniz er79 attributes 176 methods org.argouml.uml.reveng.java org.argouml.uml.reveng.class file JavaTokenType s145 attributes 0 methods
  60. 60. Richard Wettel and Michele CodeCity Hotels, parking lots, duplication 18 org.argouml.language. java.generator JavaTokenType s146 attributes 0 methods JavaRecognizer 24 attributes 91 methods STDCTokenTy pes152 attributes 0 methods CPPParser 85 attributes 204 methods JavaTokenTyp es173 attributes0 methods JavaRecogniz er79 attributes 176 methods org.argouml.uml.reveng.java org.argouml.uml.reveng.class file JavaTokenType s145 attributes 0 methods JavaRecognizer 22 attributes 88 methods
  61. 61. Looking at the design
  62. 62. Richard Wettel and Michele CodeCity On software design... 20
  63. 63. Richard Wettel and Michele CodeCity On software design... Definitions bad smells [Beck & Fowler 1998], design flaws heuristics [Riel 2000], principles [Martin 2002], patterns [GoF 1995] 20
  64. 64. Richard Wettel and Michele CodeCity On software design... Definitions bad smells [Beck & Fowler 1998], design flaws heuristics [Riel 2000], principles [Martin 2002], patterns [GoF 1995] Techniques detection strategies for the design flaws 20
  65. 65. Richard Wettel and Michele CodeCity On software design... Definitions bad smells [Beck & Fowler 1998], design flaws heuristics [Riel 2000], principles [Martin 2002], patterns [GoF 1995] Techniques detection strategies for the design flaws Visualization ? 20
  66. 66. Richard Wettel and Michele CodeCity The God Class detection strategy 21
  67. 67. Richard Wettel and Michele CodeCity God classes of JDK 1.5 in Moose 22
  68. 68. Richard Wettel and Michele CodeCity God classes of JDK in CodeCity 23
  69. 69. Richard Wettel and Michele CodeCity Class-level disharmony maps 24 KeyEvent (NOA 205, NOM 18) java.awt.event InputEvent (NOA 21, NOM 14) Frame (NOA 33, NOM 38) java.awt.geom Container (NOA 21, NOM 127) Component (NOA 88, NOM 280) java.util.concurrent.locks AbstractQueuedSynchronizer (NOA 9, NOM 54) String (NOA 7, NOM 81) Event (NOA 84, NOM 14) Class (NOA 27, NOM 107) BigInteger (NOA 28, NOM 103) BigDecimal (NOA 18, NOM 96) Security (NOA 3, NOM 30) java.util.regex Pattern (NOA 29, NOM 66) Matcher (NOA 17, NOM 38) LogRecord (NOA 17, NOM 28) Logger (NOA 18, NOM 53) Font (NOA 34, NOM 78) KeyboardFocusManager (NOA 33, NOM 94) Frame (NOA 33, NOM 38) Calendar (NOA 81, NOM 71) java.util.logging JDK 1.5
  70. 70. Richard Wettel and Michele CodeCity Class-level disharmony ma 25 org.argouml.reveng.java Modeller (NOA 15, NOM 52) JavaRecognizer (NOA 79, NOM 176) org.argouml.reveng.classfile SimpleByteLexer$GeneratorCPP (NOA 34, NOM 100) SimpleByteLexer$CPPParser (NOA 85, NOM 204) SimpleByteLexer$GeneratorPHP4 (NOA 4, NOM 33) org.argouml.diagram.ui FigNodeModelElement (NOA 39, NOM 98) FigEdgeModelElement (NOA 13, NOM 76) FigAssociation (NOA 8, NOM 17) JavaRecognizer (NOA 24, NOM 91) GeneratorJava (NOA 11, NOM 66) JavaLexer (NOA 9, NOM 72) org.argouml.language.java.generator org.argouml.uml.notation.uml org.argouml.model.mdr FacadeMDRImpl (NOA 3, NOM 349) CoreHelperMDRImpl (NOA 3, NOM 349) Facade (NOA 1, NOM 337) JavaTokenTypes (NOA 173, NOM 0) UmlFactoryMDRImpl (NOA 9, NOM 22) ArgoUML
  71. 71. Richard Wettel and Michele CodeCity Granularity of representation 26 NOM=7 NOA = 2 NOA = 2 class C coarse
  72. 72. Richard Wettel and Michele CodeCity Granularity of representation 26 NOM=7 NOA = 2 NOA = 2 class C coarse fine-grained
  73. 73. Richard Wettel and Michele CodeCity Granularity of representation 26 NOM=7 NOA = 2 NOA = 2 class C class C coarse fine-grained
  74. 74. Richard Wettel and Michele CodeCity Granularity of representation 26 NOM=7 NOA = 2 NOA = 2 class C class C m4 m1 m3 m5 m7 m6 m2 coarse fine-grained
  75. 75. Richard Wettel and Michele CodeCity 27 Feature envy map Jmol
  76. 76. Richard Wettel and Michele CodeCity 27 1,500 methods (25 %) Feature envy map Jmol
  77. 77. Richard Wettel and Michele CodeCity Shotgun surgery map 28 ArgoUM L
  78. 78. Richard Wettel and Michele CodeCity Shotgun surgery map 28 ArgoUM L
  79. 79. Richard Wettel and Michele CodeCity Shotgun surgery map 28 ArgoUM L
  80. 80. Exploring the history
  81. 81. Richard Wettel and Michele CodeCity Modeling history: Hismo 30 Class
  82. 82. Richard Wettel and Michele CodeCity Modeling history: Hismo 30 Class time
  83. 83. Richard Wettel and Michele CodeCity Modeling history: Hismo 30 Class Class Version timetimestamp N
  84. 84. Richard Wettel and Michele CodeCity Modeling history: Hismo 30 Class Class Version ... timetimestamp N Class Version Class timestamp 2
  85. 85. Richard Wettel and Michele CodeCity Modeling history: Hismo 30 Class Class Version ... timetimestamp N Class Version Class timestamp 1 Class Version Class timestamp 2
  86. 86. Richard Wettel and Michele CodeCity Modeling history: Hismo 30 Class Class Version Class History ... timetimestamp N Class Version Class timestamp 1 Class Version Class timestamp 2
  87. 87. Richard Wettel and Michele CodeCity Visualizing evolution 31 Time travel Age map Timeline fine
  88. 88. Richard Wettel and Michele CodeCity Visualizing evolution 31 Time travel Age map Timeline fine
  89. 89. Richard Wettel and Michele CodeCity Visualizing evolution 31 Time travel Age map Timeline fine
  90. 90. Richard Wettel and Michele CodeCity Consistent locality 32 A BarFoo Blueprint for the city, based on the maximal expansion of each artifact (building, district).
  91. 91. Richard Wettel and Michele CodeCity Consistent locality 32 A BarFoo Blueprint for the city, based on the maximal expansion of each artifact (building, district). Fo version 1 Bar
  92. 92. Richard Wettel and Michele CodeCity Consistent locality 32 A BarFoo Blueprint for the city, based on the maximal expansion of each artifact (building, district). Fo version 1 Bar A Foo Ba version 2
  93. 93. Richard Wettel and Michele CodeCity Consistent locality 32 A BarFoo Blueprint for the city, based on the maximal expansion of each artifact (building, district). Fo version 1 Bar A Foo Ba version 2 Foo A version 3
  94. 94. Richard Wettel and Michele CodeCity Age map 33 Bricks position is chronological neighbors are contemporary class C
  95. 95. Richard Wettel and Michele CodeCity Superficial glimpse in the past. color layer according to age (number of versions) Age map 33 Bricks position is chronological neighbors are contemporary class C
  96. 96. Richard Wettel and Michele CodeCity Superficial glimpse in the past. color layer according to age (number of versions) Age map 33 1N Bricks position is chronological neighbors are contemporary class C
  97. 97. Richard Wettel and Michele CodeCity Superficial glimpse in the past. color layer according to age (number of versions) Age map 33 1N Bricks position is chronological neighbors are contemporary class C
  98. 98. Richard Wettel and Michele CodeCity Superficial glimpse in the past. color layer according to age (number of versions) Age map 33 1N Bricks position is chronological neighbors are contemporary class C m4 m1 m3 m5 m7 m6 m2
  99. 99. Richard Wettel and Michele CodeCity Age map interpretation 34 age: 1 2 3 4 5 6 7 8
  100. 100. Richard Wettel and Michele CodeCity Age map interpretation 34 age: 1 2 3 4 5 6 7 8 stable very old
  101. 101. Richard Wettel and Michele CodeCity Age map interpretation 34 age: 1 2 3 4 5 6 7 8 stable oldvery old rarely updated
  102. 102. Richard Wettel and Michele CodeCity Age map interpretation 34 age: 1 2 3 4 5 6 7 8 stable youngoldvery old rarely updated highly unstable
  103. 103. Richard Wettel and Michele CodeCity Age map interpretation 34 age: 1 2 3 4 5 6 7 8 stable youngoldvery old rarely updated highly unstable very old updated often, rather unstable
  104. 104. Richard Wettel and Michele CodeCity Age map, fine-grained 35 library packages: java javax junit org.w3c.dom (classes) AllTests CH.ifa.draw.standard CH.ifa.draw.framework CH.ifa.draw.figures CH.ifa.draw.test class DrawApplication in CH.ifa.draw.application class StandardDrawingView in CH.ifa.draw.standard.
  105. 105. Richard Wettel and Michele CodeCity Time travel, coarse-grained 36 ArgoUML
  106. 106. Richard Wettel and Michele CodeCity Time travel, coarse-grained 36 ArgoUML
  107. 107. Richard Wettel and Michele CodeCity Time travel, fine-grained 37 JHotDraw
  108. 108. Richard Wettel and Michele CodeCity Time travel, fine-grained 37 JHotDraw
  109. 109. Richard Wettel and Michele CodeCity Timeline 38 History of class C
  110. 110. Richard Wettel and Michele CodeCity Timeline 38 time (versions) m3 m5 History of class C V1
  111. 111. Richard Wettel and Michele CodeCity Timeline 38 time (versions) m3 m5 m8 m12 m3 History of class C V1 V2
  112. 112. Richard Wettel and Michele CodeCity Timeline 38 time (versions) m3 m5 m8 m12 m3 History of class C V1 V2
  113. 113. Richard Wettel and Michele CodeCity Timeline 38 time (versions) m3 m5 m8 m12 m3 m12 m18 History of class C V1 V2 V3
  114. 114. Richard Wettel and Michele CodeCity Timeline 38 time (versions) m3 m5 m8 m12 m3 m12 m18 History of class C V1 V2 V3
  115. 115. Richard Wettel and Michele CodeCity Examples of timelines 39
  116. 116. Richard Wettel and Michele CodeCity Examples of timelines 39
  117. 117. Richard Wettel and Michele CodeCity Scripting cities 40
  118. 118. Richard Wettel and Michele CodeCity On relationships 41
  119. 119. The tool
  120. 120. Richard Wettel and Michele CodeCity Tool chain 43 iPlasma Moose CodeCity model exchange parsing & metric computation Jun rendering VisualWorks 7.6
  121. 121. Richard Wettel and Michele CodeCity Cityscapes 44
  122. 122. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  123. 123. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  124. 124. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  125. 125. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  126. 126. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  127. 127. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  128. 128. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  129. 129. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  130. 130. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  131. 131. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  132. 132. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  133. 133. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105
  134. 134. Richard Wettel and Michele CodeCity Cityscapes 44 System Languag e NOP NOC kLO C Azureus Java 457 4734 274 ArgoUML Java 144 2542 137 JHotDraw Java 72 998 30 iText Java 149 1250 80 Jmol Java 105 1032 85 JDK 1.5 core Java 137 4715 160 Moose Smalltal k 278 961 32 Jun Smalltal k 288 2236 351 CodeCity Smalltal k 129 291 18 ScumVM C++ 18 1331 105 1.25 million LOC
  135. 135. http://www.inf.unisi.ch/phd/wettel/ codecity.html
  136. 136. http://www.inf.unisi.ch/phd/wettel/ codecity.html over 1100 downloads since March 2008 !
  137. 137. http://www.inf.unisi.ch/phd/wettel/ codecity.html over 1100 downloads since March 2008 !
  138. 138. http://www.inf.unisi.ch/phd/wettel/ codecity.html ^ Smalltalk over 1100 downloads since March 2008 !

×