OpenFeign / feign

Feign makes writing java http clients easier
Apache License 2.0
9.43k stars 1.92k forks source link

Refactored data clumps with the help of LLMs (research project) #2497

Closed compf closed 1 month ago

compf commented 1 month ago

Hello maintainers,

I am conducting a master thesis project focused on enhancing code quality through automated refactoring of data clumps, assisted by Large Language Models (LLMs).

Data clump definition A data clump exists if 1. two methods (in the same or in different classes) have at least 3 common parameters and one of those methods does not override the other, or 2. At least three fields in a class are common with the parameters of a method (in the same or in a different class), or 3. Two different classes have at least three common fields See also the following UML diagram as an example ![Example data clump](https://raw.githubusercontent.com/compf/data_clump_eval_assets/main/data_clump_explained.svg)

I believe these refactoring can contribute to the project by reducing complexity and enhancing readability of your source code.

Pursuant to the EU AI Act, I fully disclose the use of LLMs in generating these refactorings, emphasizing that all changes have undergone human review for quality assurance.

Even if you decide not to integrate my changes to your codebase (which is perfectly fine), I ask you to fill out a feedback survey, which will be scientifically evaluated to determine the acceptance of AI-supported refactorings. You can find the feedback survey under https://campus.lamapoll.de/Data-clump-refactoring/en

Thank you for considering my contribution. I look forward to your feedback. If you have any other questions or comments, feel free to write a comment, or email me under tschoemaker@uni-osnabrueck.de .

Best regards, Timo Schoemaker Department of Computer Science University of Osnabrück

velo commented 1 month ago

I would love to see this on https://github.com/OpenFeign/querydsl

compf commented 1 month ago

I would love to see this on https://github.com/OpenFeign/querydsl

I could not compile this project (e.g class QEntityTest_Entity1 cannot be found), but when this is solved I am happy to make a separate PR for this project :)

github-advanced-security[bot] commented 1 month ago

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

velo commented 1 month ago

I would love to see this on https://github.com/OpenFeign/querydsl

I could not compile this project (e.g class QEntityTest_Entity1 cannot be found), but when this is solved I am happy to make a separate PR for this project :)

You need java 21 and can run a quick build by running:

./mvnw -Dtoolchain.skip=true  -P examples,quickbuild,dev clean install

This will skip tests, code formatter and other checks