Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

compf
Copy link

@compf compf commented May 3, 2024

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

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

@@ -34,13 +34,13 @@
*/
package net.sourceforge.plantuml.klimt.drawing.eps;

import java.awt.Color;
import java.awt.Shape;
import java.awt.*;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a minor remark:

  • Be careful with global imports import xxx.*;

[FYI @arnaudroques]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a minor remark:

* Be careful with global imports `import xxx.*;`

[FYI @arnaudroques]

Thank you for the feedback :)

@arnaudroques
Copy link
Contributor

Thanks for your contribution! Use of LLM is indeed very useful.
The creation of RectangleCoordinates is a good point. However, I would probably set the class as immutable (that is, without any setter).
We are not going to integrate your change asis, however, we will probably go for your suggestion (that is, an RectangleCoordinates immutable class), maybe with a shorter name for the class.

Your MR will be very useful to see all impact of this change on your code.
Thanks again!

@compf
Copy link
Author

compf commented May 7, 2024

Thanks for your contribution! Use of LLM is indeed very useful. The creation of RectangleCoordinates is a good point. However, I would probably set the class as immutable (that is, without any setter). We are not going to integrate your change asis, however, we will probably go for your suggestion (that is, an RectangleCoordinates immutable class), maybe with a shorter name for the class.

Your MR will be very useful to see all impact of this change on your code. Thanks again!

Thank you very much for the feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants