+ All Categories
Home > Documents > Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM...

Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM...

Date post: 11-Oct-2020
Category:
Upload: others
View: 5 times
Download: 0 times
Share this document with a friend
17
Model Clone Detection in Practice Florian Deissenboeck, Benjamin Hummel Elmar Juergens, Michael Pfaehler Technische Universität München Bernhard Schaetz fortiss gGmbH
Transcript
Page 1: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

Model Clone Detection in Practice

Florian Deissenboeck, Benjamin Hummel

Elmar Juergens, Michael Pfaehler

Technische Universität München

Bernhard Schaetz

fortiss gGmbH

Page 2: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available
Page 3: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available
Page 4: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available
Page 5: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

Detection Steps

Load Model

No

rmalize

Detect

Report

Page 6: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

Existing Work

Deissenboeck et. al. [ICSE’08]

Pham et. al. [ICSE’09]

Nguyen et. al. [FASE’09]

Huhn et. al. [MBEES’10]

Different detection algorithm

Application to SCADE models

First detector and

MAN case study

Page 7: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

Challenges in Practice

Page 8: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

Scalability

Model # Nodes # Edges

SIM 428 415

MUL 475 576

SEM 1,741 2,029

ECW 2,312 2,274

MPC 369 395

AUT 98,251 90,056

Publicly available

(Matlab Central)

“Real-World” (BMW)

Page 9: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

Algorithmic Tricks

Cloned Subsystem Removal (CSR)

Splitting at High-Degree Nodes (HDN)

Reduced Branching Heuristic (RBH)

[Pham+09]

[DHJ+08]

[Pham+09]

Page 10: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

Runtime Results

C

S

R

H

D

N

R

B

H

SIM MUL SEM ECW MPC AUT

eScan [Pham+09] 5 - - - - -

eScan [Pham+09] 4 6 - 784 - -

eScan [Pham+09] 9 - - - - -

eScan [Pham+09] 8 9 - 72 - -

ConQAT [DHJ+08] 3 4 14 20 5 3283

ConQAT [DHJ+08] 3 3 7 8 6 1888

Page 11: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

“…more than half of the clones found

are obviously clones according to our

definition but would not be considered

relevant by a developer.”

MAN case study [DHJ+08]

Page 12: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

Improving Relevance

Different notion of clone? (not isomophism)

Different normalization?

Domain-specific metrics for

ranking/filtering clones!

Page 13: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

Metrics

Developer 1 Developer 2

Node Size 139 163

Clone Weight 157 183

Relative Weight 110 90

Interface/Weight 86 90

Interface/Node Size 123 123

Deviation for ranking 21 clones

(worst 220, average 146)

Deviation between

developers: 74

Page 14: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

Inspection: Tool Support

Page 15: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

Summary

Ingrediences for practical application:

(not only for model clones)

• Scalability

• Relevance

• Inspection/Tooling

Working on all three of them,

but none is „solved“ yet :-)

Page 16: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available
Page 17: Model Clone Detection in Practice · Scalability Model # Nodes # Edges SIM 428 415 MUL 475 576 SEM 1,741 2,029 ECW 2,312 2,274 MPC 369 395 AUT 98,251 90,056 Publicly available

What should be the clones?


Recommended