refactoring - Team city duplicate finder inverse assign -


i have question duplucate finder tab of teamcity:

i have 2 parts of code:

participantinfo.firstname = this.firstname.text; ... 7 lines of same assignments participantinfo.password = this.password.text; 

and

this.firstname.text = participantinfo.firstname; ... 7 lines of inversed assignments this.password.text = participantinfo.password; 

they looks similar, assignments inversed.

both methods located in same file, , used transfer data between asp.net controls , domain model.

how can fix this?

answer copied jetbrains issue tracker http://youtrack.jetbrains.net/issue/tw-18179:

artem, these code fragments duplicates according designed behaviour of duplicates finder.

to fix case could:

  • encrease minimum duplicate complexity value in runner settings (this concrete duplicate not shown)
  • refactor code decrease duplicate complexity (again filter minimal complexity setting). possible way here use bindings between ui , model.

i think binding solution. thanks.


Comments