SlideShare a Scribd company logo
1 of 1
Download to read offline
Abstraction
MissingAbstraction
This smell arises when clumps of data or
encoded strings are used instead of creating
a class or an interface.
ImperativeAbstraction
This smell arises when an operation is
turned into a class.
IncompleteAbstraction
This smell arises when an abstraction does
not support complementary or interrelated
methods completely.
MultifacetedAbstraction
This smell arises when an abstraction has
more than one responsibility assigned to it.
UnnecessaryAbstraction
This smell occurs when an abstraction which
is actually not needed (and thus could have
been avoided) gets introduced in a software
design.
UnutilizedAbstraction
This smell arises when an abstraction is left
unused (either not directly used or not
reachable).
DuplicateAbstraction
This smell arises when two or more
abstractions have the identical name or
identical implementation or both.
Encapsulation
DeficientEncapsulation
This smell occurs when the declared
accessibility of one or more members of an
abstraction is more permissive than actually
required.
LeakyEncapsulation
This smell arises when an abstraction “exposes”
or “leaks” implementation details through its
public interface.
MissingEncapsulation
This smell occurs when the encapsulation of
implementation variations in a type or hierarchy
is missing.
UnexploitedEncapsulation
This smell arises when client code uses explicit
type checks(using chained if-else or switch
statements) instead of exploiting the variation
in types already encapsulated within a
hierarchy.
Modularization
Hierarchy
MissingHierarchy DeepHierarchy
Modularization
BrokenModularization
This smell arises when data and/or methods
that ideally should have been localized into a
single abstraction are separated and spread
acrossmultiple abstractions.
InsufficientModularization
This smell arises when an abstraction exists that
has not been completely decomposed and a
further decomposition could reduce its size,
implementation complexity, or both.
Cyclically-dependent
Modularization
This smell arises when two or more abstractions
depend on each other directly or indirectly
(creating a tight coupling between the
abstractions).
Hub-likeModularization
This smell arises when an abstraction has
dependencies (both incoming and outgoing)
with large number of other abstractions.
MissingHierarchy
This smell arises when a code segment uses
conditional logic (typically in conjunction with
“tagged types”) to explicitly manage variation in
behavior where a hierarchy could have been
created and used to encapsulate those
variations.
UnnecessaryHierarchy
This smell arises when the whole inheritance
hierarchy is unnecessary, indicating that
inheritancehas been applied needlessly for the
particulardesign context.
UnfactoredHierarchy
This smell arises when there is unnecessary
duplication among types in the hierarchy.
WideHierarchy
This smell arises when an inheritance hierarchy
is “too” wide indicating that intermediate
abstractions may be missing.
SpeculativeHierarchy
This smell arises when one or more types in a
hierarchy are provided speculatively (i.e. based
on imagined needs rather than real
requirements).
DeepHierarchy
This smell arises when an inheritance hierarchy
is "excessively" deep.
RebelliousHierarchy
This smell arises when a subtype rejects the
methods provided by its supertype(s).
BrokenHierarchy
This smell arises when a supertype and its
subtype conceptually do not share an “IS-A”
relationship resulting in broken substitutability.
MultipathHierarchy
This smell arises when a subtype inherits both
directly as well as indirectly from a supertype
leading to unnecessary inheritance paths in the
hierarchy.
CyclicHierarchy
This smell arises when a supertype in a
hierarchy depends on any of its subtypes.
Authors:Girish Suryanarayana, Ganesh
Samarthyam,Tushar Sharma
Publisher:Morgan Kaufmann
Publicationdate:Nov 2014

More Related Content

More from Tushar Sharma

House of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# RepositoriesHouse of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# RepositoriesTushar Sharma
 
The tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiencesThe tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiencesTushar Sharma
 
Designite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# RepositoriesDesignite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# RepositoriesTushar Sharma
 
Writing Maintainable Code
Writing Maintainable Code Writing Maintainable Code
Writing Maintainable Code Tushar Sharma
 
FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?Tushar Sharma
 
Achieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design SmellsAchieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design SmellsTushar Sharma
 
Does your configuration code smell?
Does your configuration code smell?Does your configuration code smell?
Does your configuration code smell?Tushar Sharma
 
Designite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment ToolDesignite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment ToolTushar Sharma
 
Does Your Configuration Code Smell?
Does Your Configuration Code Smell?Does Your Configuration Code Smell?
Does Your Configuration Code Smell?Tushar Sharma
 
Technical debt - The elephant in the room
Technical debt - The elephant in the roomTechnical debt - The elephant in the room
Technical debt - The elephant in the roomTushar Sharma
 
Understanding software metrics
Understanding software metricsUnderstanding software metrics
Understanding software metricsTushar Sharma
 
Pragmatic Technical Debt Management
Pragmatic Technical Debt ManagementPragmatic Technical Debt Management
Pragmatic Technical Debt ManagementTushar Sharma
 
Tools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical DebtTools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical DebtTushar Sharma
 
Infographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt ManagementInfographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt ManagementTushar Sharma
 
Does your design smell?
Does your design smell?Does your design smell?
Does your design smell?Tushar Sharma
 
Refactoring for Design Smells - ICSE 2014 Tutorial
Refactoring for Design Smells - ICSE 2014 TutorialRefactoring for Design Smells - ICSE 2014 Tutorial
Refactoring for Design Smells - ICSE 2014 TutorialTushar Sharma
 

More from Tushar Sharma (16)

House of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# RepositoriesHouse of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# Repositories
 
The tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiencesThe tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiences
 
Designite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# RepositoriesDesignite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# Repositories
 
Writing Maintainable Code
Writing Maintainable Code Writing Maintainable Code
Writing Maintainable Code
 
FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?
 
Achieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design SmellsAchieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design Smells
 
Does your configuration code smell?
Does your configuration code smell?Does your configuration code smell?
Does your configuration code smell?
 
Designite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment ToolDesignite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment Tool
 
Does Your Configuration Code Smell?
Does Your Configuration Code Smell?Does Your Configuration Code Smell?
Does Your Configuration Code Smell?
 
Technical debt - The elephant in the room
Technical debt - The elephant in the roomTechnical debt - The elephant in the room
Technical debt - The elephant in the room
 
Understanding software metrics
Understanding software metricsUnderstanding software metrics
Understanding software metrics
 
Pragmatic Technical Debt Management
Pragmatic Technical Debt ManagementPragmatic Technical Debt Management
Pragmatic Technical Debt Management
 
Tools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical DebtTools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical Debt
 
Infographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt ManagementInfographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt Management
 
Does your design smell?
Does your design smell?Does your design smell?
Does your design smell?
 
Refactoring for Design Smells - ICSE 2014 Tutorial
Refactoring for Design Smells - ICSE 2014 TutorialRefactoring for Design Smells - ICSE 2014 Tutorial
Refactoring for Design Smells - ICSE 2014 Tutorial
 

Recently uploaded

Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 

Recently uploaded (20)

Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 

Code Smells for Abstraction, Encapsulation and Modularization

  • 1. Abstraction MissingAbstraction This smell arises when clumps of data or encoded strings are used instead of creating a class or an interface. ImperativeAbstraction This smell arises when an operation is turned into a class. IncompleteAbstraction This smell arises when an abstraction does not support complementary or interrelated methods completely. MultifacetedAbstraction This smell arises when an abstraction has more than one responsibility assigned to it. UnnecessaryAbstraction This smell occurs when an abstraction which is actually not needed (and thus could have been avoided) gets introduced in a software design. UnutilizedAbstraction This smell arises when an abstraction is left unused (either not directly used or not reachable). DuplicateAbstraction This smell arises when two or more abstractions have the identical name or identical implementation or both. Encapsulation DeficientEncapsulation This smell occurs when the declared accessibility of one or more members of an abstraction is more permissive than actually required. LeakyEncapsulation This smell arises when an abstraction “exposes” or “leaks” implementation details through its public interface. MissingEncapsulation This smell occurs when the encapsulation of implementation variations in a type or hierarchy is missing. UnexploitedEncapsulation This smell arises when client code uses explicit type checks(using chained if-else or switch statements) instead of exploiting the variation in types already encapsulated within a hierarchy. Modularization Hierarchy MissingHierarchy DeepHierarchy Modularization BrokenModularization This smell arises when data and/or methods that ideally should have been localized into a single abstraction are separated and spread acrossmultiple abstractions. InsufficientModularization This smell arises when an abstraction exists that has not been completely decomposed and a further decomposition could reduce its size, implementation complexity, or both. Cyclically-dependent Modularization This smell arises when two or more abstractions depend on each other directly or indirectly (creating a tight coupling between the abstractions). Hub-likeModularization This smell arises when an abstraction has dependencies (both incoming and outgoing) with large number of other abstractions. MissingHierarchy This smell arises when a code segment uses conditional logic (typically in conjunction with “tagged types”) to explicitly manage variation in behavior where a hierarchy could have been created and used to encapsulate those variations. UnnecessaryHierarchy This smell arises when the whole inheritance hierarchy is unnecessary, indicating that inheritancehas been applied needlessly for the particulardesign context. UnfactoredHierarchy This smell arises when there is unnecessary duplication among types in the hierarchy. WideHierarchy This smell arises when an inheritance hierarchy is “too” wide indicating that intermediate abstractions may be missing. SpeculativeHierarchy This smell arises when one or more types in a hierarchy are provided speculatively (i.e. based on imagined needs rather than real requirements). DeepHierarchy This smell arises when an inheritance hierarchy is "excessively" deep. RebelliousHierarchy This smell arises when a subtype rejects the methods provided by its supertype(s). BrokenHierarchy This smell arises when a supertype and its subtype conceptually do not share an “IS-A” relationship resulting in broken substitutability. MultipathHierarchy This smell arises when a subtype inherits both directly as well as indirectly from a supertype leading to unnecessary inheritance paths in the hierarchy. CyclicHierarchy This smell arises when a supertype in a hierarchy depends on any of its subtypes. Authors:Girish Suryanarayana, Ganesh Samarthyam,Tushar Sharma Publisher:Morgan Kaufmann Publicationdate:Nov 2014