---
title: Complex refactoring in simple steps Part I | Codurance
description: Our team of dedicated software craftspeople provides consultancy, software development, and training services to clients seeking high quality development processes and software solutions.
---

[Publications | Codurance ](https://www.codurance.com/publications)

# [Complex refactoring in simple steps Part I | Codurance](https://www.codurance.com/publications/videos/2016-09-02-complex-refactoring-in-simple-steps-i)

 Written by [Matthew Butt](https://www.codurance.com/publications/author/matthew-butt) | 31 Aug 2016

## Screencast - Complex refactoring in simple steps, Part I: Replace Method with Method Object

Matthew Butt demonstrates how to compose simple automated refactoring steps in ReSharper to refactor code to better designs.

In this episode, we look at a method that exhibits the [Long Parameter List](https://sourcemaking.com/refactoring/smells/long-parameter-list) and [Data Clump](https://sourcemaking.com/refactoring/smells/data-clumps) smells. We Extract Class from Parameters to create a parameter object, and then, spotting [Feature Envy](https://sourcemaking.com/refactoring/smells/feature-envy), use Move Instance Method to shift the behaviour to the new class. We finish by tidying up the method object to remove generated code that might tempt us to break encapsulation.

The code used in this video can be found [on GitHub](https://github.com/bnathyuw/Complex-Refactoring-In-Simple-Steps)

[View full post](https://www.codurance.com/publications/videos/2016-09-02-complex-refactoring-in-simple-steps-i)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Matthew Butt"
  },
  "dateModified" : "2021-02-05T16:14:40.376Z",
  "datePublished" : "2016-08-31T23:00:00Z",
  "headline" : "Complex refactoring in simple steps Part I",
  "image" : {
    "@type" : "ImageObject",
    "height" : 360,
    "url" : "https://f.hubspotusercontent10.net/hubfs/3042464/Imported_Blog_Media/complex-refactoring-in-simple-steps-I.jpg",
    "width" : 480
  },
  "mainEntityOfPage" : "https://www.codurance.com/publications/videos/2016-09-02-complex-refactoring-in-simple-steps-i",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Publications"
  }
}
```