Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 17 15:04

    Fabrice-TIERCELIN on master

    Move common code (compare)

  • Jan 17 14:26

    Fabrice-TIERCELIN on master

    Bypass the class keyword using … (compare)

  • Jan 17 14:20

    Fabrice-TIERCELIN on master

    Format or conditions (compare)

  • Jan 17 13:59

    Fabrice-TIERCELIN on master

    Format and conditions (compare)

  • Jan 17 13:33

    Fabrice-TIERCELIN on master

    Finish to rewrite newMethodInvo… (compare)

  • Jan 17 13:15

    Fabrice-TIERCELIN on master

    Almost finish to rewrite newMet… (compare)

  • Jan 17 13:03

    Fabrice-TIERCELIN on master

    Improve method invocation naming (compare)

  • Jan 17 12:33

    Fabrice-TIERCELIN on master

    Continue to rewrite newMethodIn… (compare)

  • Jan 17 12:10

    Fabrice-TIERCELIN on master

    Continue to rewrite newMethodIn… (compare)

  • Jan 16 20:27

    Fabrice-TIERCELIN on master

    Continue to rewrite newMethodIn… (compare)

  • Jan 16 20:21

    Fabrice-TIERCELIN on master

    Continue to rewrite newMethodIn… (compare)

  • Jan 16 19:45

    Fabrice-TIERCELIN on master

    Still continue to rewrite newMe… (compare)

  • Jan 16 19:32

    Fabrice-TIERCELIN on master

    Separate analyze and refactoring (compare)

  • Jan 16 19:25

    Fabrice-TIERCELIN on master

    Continue to rewrite newMethodIn… (compare)

  • Jan 16 17:56

    Fabrice-TIERCELIN on master

    Start to rewrite newMethodInvoc… (compare)

  • Jan 16 17:29

    Fabrice-TIERCELIN on master

    Sort the tests (compare)

  • Jan 14 17:43

    Fabrice-TIERCELIN on master

    Separate passing cases and fail… (compare)

  • Jan 14 07:36

    Fabrice-TIERCELIN on master

    Split cleanup: Replace calls to… (compare)

  • Jan 08 10:37
    cal101 opened #451
  • Jan 08 10:27
    cal101 opened #450
Jean-Noël Rouvignac
@JnRouvignac
OK there is a lot in this one
The rewrites are currently a bit blurred
it is hard to read when comes this level of rewriting
but I think I'll clean that up
I made several new comments
Please ping me once you'll have acted on them and pushed the new code for review
Luis Cruz
@luiscruz
ok
Luis Cruz
@luiscruz
ping :)
Luis Cruz
@luiscruz
I’ve fixed your code reviews. Let me know what is the next step
Jean-Noël Rouvignac
@JnRouvignac
Next step is tomorrow
:)
Luis Cruz
@luiscruz
deal! :D
Fabrice TIERCELIN
@Fabrice-TIERCELIN
Should I take #222?
Jean-Noël Rouvignac
@JnRouvignac
@Fabrice-TIERCELIN please do if you feel confident
be careful there are many corner cases here
methods (you can ignore parameters), fields, variables can be shadowed
etc.
This is pretty tough
maybe start small and provide a simple fix
then we'll take it forward from there
Jean-Noël Rouvignac
@JnRouvignac
@luiscruz I have looked at the PR and I have several problems with it
first of all mvn clean install fails
for the rest, maybe this is not the best medium here to explain them
last, reviewing PRs on github is not great IMO :(
but anyway we'll get through this
Jean-Noël Rouvignac
@JnRouvignac
What I mean is that there is more work needed before I can merge it
Luis Cruz
@luiscruz
Hi
I’ll see that now
Jean-Noël Rouvignac
@JnRouvignac
hello
I'll speak to you on hangout to avoid polluting this channel with remarks towards the PR
if you log in
:)
Luis Cruz
@luiscruz
are we talking about JnRouvignac/AutoRefactor#226?
Jean-Noël Rouvignac
@JnRouvignac
yes
Luis Cruz
@luiscruz
alright
we can speak on hangout
when are you available?
Jean-Noël Rouvignac
@JnRouvignac
let's chat now :)
no need to call IMO
Luis Cruz
@luiscruz
ok
Jean-Noël Rouvignac
@JnRouvignac
@cal101 nice job on the headless version of AutoRefactor!
cal
@cal101
Hi folks! @JnRouvignac @Fabrice-TIERCELIN
cal
@cal101
You may have noticed that I did some autorefactor related stuff lately. I am repeating an experiment executing bulk autorefactoring on a >16k classes legacy application to investigate the result. Autorefactorings are grouped. Execution is done via jenkins pipeline doing git commits between refactoring groups. The outcome is pushed and automatic testing is done. The line coverage is 43% so some semantic testing is done. @Fabrice-TIERCELIN fixed a lot of bugs lately and so i was able to enable most of the refactorings and the code compiles and all tests pass now.
cal
@cal101
Doing bulk refactorings and reviewing bulk results gives me a different view on the results of refactorings. Most improve quality some don't. Autorefactor plugin is like a closed app. Very useful even for beginners. Autorefactor cli is meant for the professional who needs some tweaking options. I will do obvious filters like excluding classes but I am reaching the point where i want to disable or tweak/disable parts of refactorings. I want to avoid forking and would like to discuss options to proceed.
Chakra Yadavalli
@chakrayadavalli
Hi @JnRouvignac I am working on a legacy code base that has tons of issues that need to refactored. I came across AutoRefactor and installed the eclipse plugin in 2020-06. However, refactorings are not working. I saw on GitHub project page that AutoRefactor is now being merged into Eclipse. Has that been done already? I could not find anything in the latest Eclipse IDE. Any help in getting this up and running would be great.
Cheikh Saadbouh
@cheikh-sadbouh

I have a legacy springMvc project and i want to refactor all the controllers to return ResponseEntity<T> object rather then returning Model object which is returned by default.

I am looking for a way to map functions in Map class to ResponseEntity<T> class .

I have seen people recommend to use Regular expression as a solution to refactor all the methods.

I need to know your opinion about implementing Regex as solution in terms of advantages / drawbacks for using regex in this scenario.

In addition it would be helpful if you can suggest other solutions.

please take a look at the attached code for more details.

return Model object to the view

@GetMapping("/getData")
    public String getData(Model model) {

        model.addAttribute("message", "springMvc");

        return "viewPage";
    }

return ResponseEntity object as a json format

@GetMapping("/getData")
    public ResponseEntity<Map<String,String>>  getData() {

        Map<String,String> map = new  HashMap<>();
        map.put("message", "springMvc");

        return  new ResponseEntity.Ok().body(map);
    }
cal
@cal101
@cheikh-sadbouh Regular expression could get challenging on that. But there is a middle ground between regular expressions and writing a refactoring plugin on your own.
  1. Intellij idea is able to to structural search and replace, it may be able to help.
  2. The tool "comby" (https://github.com/comby-tools/comby) allows structural rewrites that should be able to rewrite the code above
cal
@cal101
@Fabrice-TIERCELIN Moin Fabrice!
It's a fun hacking session :-)
Do you happen to know how to get an IJavaProject from a gradle nature?
cal
@cal101
Never mind, adding Java Nature via eclipse seems to be the way ...