SlideShare a Scribd company logo
In Medio Stat Virtus: Extract
Class Refactoring through
Nash Equilibria
Gabriele Bavota, Rocco Oliveto, Andrea De Lucia,
Andrian Marcus, Yann-Gael Guéhéneuc, Giuliano Antoniol
GameTheory Refactoring
Approach
Empirical
Study
GameTheory
Game
Theory
A game consits of:
a set of players
a set of moves available to those players
payoffs for each combination of moves
A branch of mathematics, capture
behavior in strategic situations, in
which an individual’s success in
making choices depends on the
choices of others
Game
Theory
A game consits of:
a set of players
a set of moves available to those players
payoffs for each combination of moves
A branch of mathematics, capture
behavior in strategic situations, in
which an individual’s success in
making choices depends on the
choices of others
Game
Theory
A game consits of:
a set of players
a set of moves available to those players
payoffs for each combination of moves
A branch of mathematics, capture
behavior in strategic situations, in
which an individual’s success in
making choices depends on the
choices of others
Game
Theory
A game consits of:
a set of players
a set of moves available to those players
payoffs for each combination of moves
A branch of mathematics, capture
behavior in strategic situations, in
which an individual’s success in
making choices depends on the
choices of others
The prisoner’s dilemma
TOMSALLY
The prisoner’s dilemma
TOM
SALLY
The prisoner’s dilemma
CONFESS NOT CONFESS
TOM
SALLY
CONFESS
NOT CONFESS
The prisoner’s dilemma
CONFESS NOT CONFESS
TOM
SALLY
CONFESS
NOT CONFESS
5,5 0,7
7,0 4,4
The prisoner’s dilemma
CONFESS NOT CONFESS
TOM
SALLY
CONFESS
NOT CONFESS
5,5 0,7
7,0 4,4
The prisoner’s dilemma
0,7
7,0 4,4
CONFESS NOT CONFESS
TOM
SALLY
CONFESS
NOT CONFESS
5,5 0,7
7,0 4,4
The prisoner’s dilemma
0,7
7,0
CONFESS NOT CONFESS
TOM
SALLY
CONFESS
NOT CONFESS
5,5 0,7
7,0 4,4
The prisoner’s dilemma
CONFESS NOT CONFESS
TOM
SALLY
CONFESS
NOT CONFESS
5,5 0,7
7,0 4,4
The prisoner’s dilemma
5,5
Contrasting
Goals
Contrasting
Goals
Pursuing high cohesion and low
coupling in object oriented
systems
Contrasting
Goals
Pursuing high cohesion and low
coupling in object oriented
systems
Bug triageing,
Test Case generation, ...
Contrasting
Goals
Pursuing high cohesion and low
coupling in object oriented
systems
Bug triageing,
Test Case generation, ...
Software engineering is the art of
compromise...
Software
Refactoring
Extract Class
Refactoring
Splitting a class with many
responsibilities into different classes
Input
Class C
BLOB
Class C1
Output
Class C2
Csmr wcre14.ppt
A non-cooperative game
between n players
A non-cooperative game
between n players
Each player is in charge of
extracting one class from
the Blob
A non-cooperative game
between n players
Each player is in charge of
extracting one class from
the Blob
Each player seeks to
maximize its cohesion while
maintaining its coupling as
low as possible
2-players game
TOM
SALLY
m5
m1
m2 m3 m4 N
m2
m3
m4
N
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
0.49, 0.22
-1.00, -1.00
-0.21, -0.58
0.29, 0.22
0.70, 0.80
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.70, 0.50
0.21, 0.28
0.00, -0.30
-1.00, -1.00
2-players game
TOM
SALLY
m5
m1
m2 m3 m4 N
m2
m3
m4
N
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
0.49, 0.22
-1.00, -1.00
-0.21, -0.58
0.29, 0.22
0.70, 0.80
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.70, 0.50
0.21, 0.28
0.00, -0.30
-1.00, -1.00
2-players game
TOM
SALLY
m5
m1
m2 m3 m4 N
m2
m3
m4
N
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
0.49, 0.22
-1.00, -1.00
-0.21, -0.58
0.29, 0.22
0.70, 0.80
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.70, 0.50
0.21, 0.28
0.00, -0.30
-1.00, -1.00
2-players game
TOM
SALLY
m5
m1
m2 m3 m4 N
m2
m3
m4
N
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
0.49, 0.22
-1.00, -1.00
-0.21, -0.58
0.29, 0.22
0.70, 0.80
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.70, 0.50
0.21, 0.28
0.00, -0.30
-1.00, -1.00
0.70 = sim(m1, m2) - sim(m1, m4)
2-players game
TOM
SALLY
m5
m1
m2 m3 m4 N
m2
m3
m4
N
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
0.49, 0.22
-1.00, -1.00
-0.21, -0.58
0.29, 0.22
0.70, 0.80
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.70, 0.50
0.21, 0.28
0.00, -0.30
-1.00, -1.00
0.70 = sim(m1, m2) - sim(m1, m4)
COHESION
2-players game
TOM
SALLY
m5
m1
m2 m3 m4 N
m2
m3
m4
N
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
0.49, 0.22
-1.00, -1.00
-0.21, -0.58
0.29, 0.22
0.70, 0.80
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.70, 0.50
0.21, 0.28
0.00, -0.30
-1.00, -1.00
0.70 = sim(m1, m2) - sim(m1, m4)
COHESION COUPLING
2-players game
TOM
SALLY
m5
m1
m2 m3 m4 N
m2
m3
m4
N
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
0.49, 0.22
-1.00, -1.00
-0.21, -0.58
0.29, 0.22
0.70, 0.80
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.70, 0.50
0.21, 0.28
0.00, -0.30
-1.00, -1.00
2-players game
TOM
SALLY
m5
m1
m2 m3 m4 N
m2
m3
m4
N
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
0.49, 0.22
-1.00, -1.00
-0.21, -0.58
0.29, 0.22
0.70, 0.80
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.70, 0.50
0.21, 0.28
0.00, -0.30
-1.00, -1.00
2-players game
TOM
SALLY
m5
m1
m2 m3
m4
N
m2
m3
m4
N
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
0.49, 0.22
-1.00, -1.00
-0.21, -0.58
0.29, 0.22
0.70, 0.80
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.70, 0.50
0.21, 0.28
0.00, -0.30
-1.00, -1.00
2-players game
TOM
SALLY
m5
m1
m3 N
m2
m3
m4
N
-1.00, -1.00
0.39, 0.32
0.19, 0.25
-1.00, -1.00
m2
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
m4
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.49, 0.22
-0.21, -0.58
0.70, 0.50
0.00, -0.30
m2
m4
0.70, 0.80
2-players game
TOM
SALLY
m5
m1
m3 N
m2
m3
m4
N
-1.00, -1.00
0.39, 0.32
0.19, 0.25
-1.00, -1.00
m2
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
m4
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.49, 0.22
-0.21, -0.58
0.70, 0.50
0.00, -0.30
m2
m4
0.70, 0.80
2-players game
TOM
SALLY
m5
m1
m3
N
m2
m3
m4
N
-1.00, -1.00
0.39, 0.32
0.19, 0.25
-1.00, -1.00
m2
-1.00, -1.00
-0.49, -0.24
-0.70, -0.80
-0.20, 0.00
m4
0.21, 0.58
-1.00, -1.00
0.50, -0.80
0.49, 0.22
-0.21, -0.58
0.70, 0.50
0.00, -0.30
m2
m4
0.70, 0.80
2-players game
TOM
SALLY
m5
m1m2
m3m4
Study
Design
Metric-based
Evaluation
Csmr wcre14.ppt
LCOM
+72%
LCOM C3
+72% +118%
LCOM C3 MPC
+72% +118% +1%
Qualitative
Evaluation
Subjects
2 PhD and 6 Master students
Objects
The 7 Blobs of the metric evaluation
What we asked
Agreement to the claim: “The proposed refactoring results in an
appropriate division of responsibilities”
Five point Likert scale: “1: Strongly disagree; 2: Disagree; 3:
Neutral; 4: Agree; 5: Fully agree”
Baselines
We refactored the 7 Blobs using: our approach, k-means, and a
random splitting.
5
4
3
2
1
Game Theory k-means Random
Conclusion
Csmr wcre14.ppt
Csmr wcre14.ppt
Csmr wcre14.ppt
Csmr wcre14.ppt
Csmr wcre14.ppt
Csmr wcre14.ppt
Csmr wcre14.ppt
Csmr wcre14.ppt
Csmr wcre14.ppt
Csmr wcre14.ppt
?

More Related Content

PPTX
Game Theory Repeated Games at HelpWithAssignment.com
PPT
Lecture 3 MMX3043 Game Design and Development
PPTX
Set 4 quiz of zero-sum games
PDF
ICSM10b.ppt
PPTX
3. research
PPTX
General games
PPT
Tic tac toe c++ project presentation
PPTX
Dinesh kumar
Game Theory Repeated Games at HelpWithAssignment.com
Lecture 3 MMX3043 Game Design and Development
Set 4 quiz of zero-sum games
ICSM10b.ppt
3. research
General games
Tic tac toe c++ project presentation
Dinesh kumar

Similar to Csmr wcre14.ppt (20)

PDF
PDF
Game Theory and Engineering Applications
PDF
Game Theory and Engineering Applications
PPT
Evolution as a Tool for Understanding and Designing Collaborative Systems
PPTX
Chapter 6: Mathematical Models and SImulation
PPT
PDF
Benchmarking parity games
PDF
Lecture 1 - Game Theory
PDF
Making Decisions - A Game Theoretic approach
PDF
Adaptive Learning In Games
ODP
Silverdisappointing8 120924091642-phpapp01
ODP
Disappointing results & open problems in Monte-Carlo Tree Search
PDF
2015 01 22 - Rende - Unical - Angelo Fanelli: An Overview of Congestion Games
DOCX
3.3 Game TheoryGame theory is a branch of applied mathematics, w.docx
PPTX
LAFS Game Design 9 - Balancing
PPT
Game Theory Presentation
PDF
Game Theory and it's Applications in mathematics for 6 semester B.Sc
PDF
Game Theory and it's application in day to day life
PPT
Game theory and simulation in Ruby
PDF
TermPaper
Game Theory and Engineering Applications
Game Theory and Engineering Applications
Evolution as a Tool for Understanding and Designing Collaborative Systems
Chapter 6: Mathematical Models and SImulation
Benchmarking parity games
Lecture 1 - Game Theory
Making Decisions - A Game Theoretic approach
Adaptive Learning In Games
Silverdisappointing8 120924091642-phpapp01
Disappointing results & open problems in Monte-Carlo Tree Search
2015 01 22 - Rende - Unical - Angelo Fanelli: An Overview of Congestion Games
3.3 Game TheoryGame theory is a branch of applied mathematics, w.docx
LAFS Game Design 9 - Balancing
Game Theory Presentation
Game Theory and it's Applications in mathematics for 6 semester B.Sc
Game Theory and it's application in day to day life
Game theory and simulation in Ruby
TermPaper
Ad

More from Yann-Gaël Guéhéneuc (20)

PDF
Rights, Copyrights, and Licences for Software Engineering Research v1.0
PDF
Evolution and Examples of Java Features, from Java 1.7 to Java 24
PDF
Projects Panama, Valhalla, and Babylon: Java is the New Python v0.9
PDF
Consequences and Principles of Software Quality v1.0
PDF
About Empirical Studies on Software Quality
PDF
A (Very) Brief History of Ethics for Software Engineering Research
PDF
Project Manifold (Forwarding and Delegation)
PDF
Reviewing Processes and Tools, Publishers, Open Access
PDF
Custom Annotations in Java with Project Lombok
PDF
Some Pitfalls with Python and Their Possible Solutions v1.0
PDF
Advice for writing a NSERC Discovery grant application v0.5
PDF
Ptidej Architecture, Design, and Implementation in Action v2.1
PDF
Evolution and Examples of Java Features, from Java 1.7 to Java 22
PDF
Consequences and Principles of Software Quality v0.3
PDF
Some Pitfalls with Python and Their Possible Solutions v0.9
PDF
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
PDF
An Explanation of the Halting Problem and Its Consequences
PDF
Are CPUs VMs Like Any Others? v1.0
PDF
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
PDF
Well-known Computer Scientists v1.0.2
Rights, Copyrights, and Licences for Software Engineering Research v1.0
Evolution and Examples of Java Features, from Java 1.7 to Java 24
Projects Panama, Valhalla, and Babylon: Java is the New Python v0.9
Consequences and Principles of Software Quality v1.0
About Empirical Studies on Software Quality
A (Very) Brief History of Ethics for Software Engineering Research
Project Manifold (Forwarding and Delegation)
Reviewing Processes and Tools, Publishers, Open Access
Custom Annotations in Java with Project Lombok
Some Pitfalls with Python and Their Possible Solutions v1.0
Advice for writing a NSERC Discovery grant application v0.5
Ptidej Architecture, Design, and Implementation in Action v2.1
Evolution and Examples of Java Features, from Java 1.7 to Java 22
Consequences and Principles of Software Quality v0.3
Some Pitfalls with Python and Their Possible Solutions v0.9
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Halting Problem and Its Consequences
Are CPUs VMs Like Any Others? v1.0
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Well-known Computer Scientists v1.0.2
Ad

Recently uploaded (20)

PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PDF
MCP Security Tutorial - Beginner to Advanced
PPTX
Tech Workshop Escape Room Tech Workshop
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
Computer Software - Technology and Livelihood Education
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PDF
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
Visual explanation of Dijkstra's Algorithm using Python
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PPTX
Cybersecurity: Protecting the Digital World
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
Oracle Fusion HCM Cloud Demo for Beginners
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
CCleaner 6.39.11548 Crack 2025 License Key
MCP Security Tutorial - Beginner to Advanced
Tech Workshop Escape Room Tech Workshop
Patient Appointment Booking in Odoo with online payment
Why Generative AI is the Future of Content, Code & Creativity?
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
DNT Brochure 2025 – ISV Solutions @ D365
Designing Intelligence for the Shop Floor.pdf
Computer Software - Technology and Livelihood Education
Weekly report ppt - harsh dattuprasad patel.pptx
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
Topaz Photo AI Crack New Download (Latest 2025)
Autodesk AutoCAD Crack Free Download 2025
Visual explanation of Dijkstra's Algorithm using Python
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Cybersecurity: Protecting the Digital World
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025

Csmr wcre14.ppt