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 #5802

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

compf
Copy link

@compf compf commented Apr 15, 2024

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

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

@kevin-atx
Copy link
Contributor

@compf, thank you for your submission. I'll pass this to engineering for review in the next sprint.

@MalloD12 MalloD12 self-requested a review May 7, 2024 20:21
@MalloD12 MalloD12 self-assigned this May 7, 2024
@@ -0,0 +1,39 @@
package liquibase.statement.core;
public class DatabaseTableIdentifier{
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we are using Lombok in some other classes, I think we can also applied to this class. I think adding:

- @Getter
- @Setter
- @AllArgsConstructor

would be fine.

@MalloD12 MalloD12 requested a deployment to external May 7, 2024 21:41 — with GitHub Actions Abandoned
@MalloD12
Copy link
Contributor

MalloD12 commented May 7, 2024

Hi @compf,

I think it's a nice readability enhancement, good job! I just left a small review comment in case you want to apply as well.

Thanks,
Daniel.

@compf
Copy link
Author

compf commented May 8, 2024

Thank you very much for the feedback. I can apply your feedback by the end of this week if this is ok :)

@compf
Copy link
Author

compf commented May 10, 2024

@MalloD12 In have simplified the DataBaseTableIdentifier class as suggested. According to the email notification, You have written more comments but they seem to be deleted or I can't find them anymore. If they are still relevant, I can address them as well :)

@MalloD12
Copy link
Contributor

@MalloD12 In have simplified the DataBaseTableIdentifier class as suggested. According to the email notification, You have written more comments but they seem to be deleted or I can't find them anymore. If they are still relevant, I can address them as well :)

Thank you, @compf! I don't have any additional comments, I posted some other questions I thought some changes couldn't be needed but I realized afterward they were right.

@github-actions github-actions bot removed the AI Generated Code AI Generated Code label May 10, 2024
Copy link
Contributor

@MalloD12 MalloD12 left a comment

Choose a reason for hiding this comment

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

Approved.

Thank you for applying our review comment. Changes looks good, same as build/test checks.

Thanks,
Daniel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Code Review
Development

Successfully merging this pull request may close these issues.

None yet

4 participants