parameters: (self, filePath, start, end, newName, indent_size)
return_statement: return valueToReturn
docstring: Extracts a method
docstring_summary: Extracts a method
docstring_tokens: Extracts a method
function: def _extractMethod(self, filePath, start, end, newName, indent_size):
          """
          Extracts a method
          """
          project = rope.base.project.Project(
              WORKSPACE_ROOT, ropefolder=ROPE_PROJECT_FOLDER, save_history=False, indent_size=indent_size)
          resourceToRefactor = libutils.path_to_resource(project, filePath)
          refactor = ExtractMethodRefactor(
              project, resourceToRefactor, startOffset=start, endOffset=end, newName=newName, similar=True)
          refactor.refactor()
          changes = refactor.changes
          project.close()
          valueToReturn = []
          for change in changes:
              valueToReturn.append({'diff': change.diff})
          return valueToReturn
function_tokens: def _extractMethod ( self , filePath , start , end , newName , indent_size ) : project = rope . base . project . Project ( WORKSPACE_ROOT , ropefolder = ROPE_PROJECT_FOLDER , save_history = False , indent_size = indent_size ) resourceToRefactor = libutils . path_to_resource ( project , filePath ) refactor = ExtractMethodRefactor ( project , resourceToRefactor , startOffset = start , endOffset = end , newName = newName , similar = True ) refactor . refactor ( ) changes = refactor . changes project . close ( ) valueToReturn = [ ] for change in changes : valueToReturn . append ( { 'diff' : change . diff } ) return valueToReturn