---
title: "Feature Envy"
type: "code-smell"
slug: "feature-envy"
url: "http://localhost:3000/en/smells/feature-envy.md"
category: "Couplers"
description: "A method accesses the data of another object more than its own data."
---
# Feature Envy

> A method accesses the data of another object more than its own data.

## Signs and Symptoms

A method accesses the data of another object more than its own data.

## Reasons for the Problem

This smell may occur after fields are moved to a data class. If this is the case, you may want to move the operations on data to this class as well.

## Payoff

* Less code duplication (if the data handling code is put in a central place).
* Better code organization (methods for handling data are next to the actual data).
## Relations

**Treated by**

- [Move Method](/en/move-method.md)
- [Extract Method](/en/extract-method.md)

