RefactoringMiner icon indicating copy to clipboard operation
RefactoringMiner copied to clipboard

Wrong reported mapping

Open pedramnoori opened this issue 2 years ago • 0 comments

Problem

Wrong reported mapping within an Extract and Move Method refactoring

Commit

https://github.com/jenkinsci/git-client-plugin/commit/6d261108e7471db380146f945bb228b5fc8c44cc

Refactoring instance

Extract And Move Method public getBranchesContaining(revspec String, allBranches boolean) : List<Branch> extracted from public getBranchesContaining(revspec String) : List<Branch> in class org.jenkinsci.plugins.gitclient.JGitAPIImpl & moved to class org.jenkinsci.plugins.gitclient.CliGitAPIImpl

Description

There are three statement mappings reported within the bodyMapper of the aforementioned refactoring, among which two of them are wrong in my opinion:

1-repo=getRepository(); ---> commandOutput=launchCommand("branch","-a","--contains",revspec);

2- throw new GitException("Invalid commit: " + revspec); ---> commandOutput=launchCommand("branch","--contains",revspec);

pedramnoori avatar Jun 01 '23 15:06 pedramnoori