Git Product home page Git Product logo

laughing-train's Introduction

Laughing-Train

Project Map
Laughing-Train is a code refactoring tool using Spoon and static analyzers to refactor Java code. This includes the analysis of the code, the refactoring of the code and the generation of pull requests on GitHub. We analyze projects with qodana, a static code analyzer from JetBrains, and use the results to refactor the code. The refactoring is done with Spoon, a Java parser and transformer. The results are then pushed to GitHub as pull requests. For GitHub integration, we use the GitHub API and the GitHub CLI. The website is built with react and the backend is written with Quarkus.

Features:

  • Code analysis with Qodana(JetBrains IntelliJ headless)
  • Minimal Diffs with Spoon
  • Git/GitHub integration
  • easy deployment extensible with new analyzers

Examples:

GraphQL

Use http://www.keksdose.xyz:8080/graphql/to get mining results by GraphQL. See http://www.keksdose.xyz:8080/graphql/schema.graphql for the schema. The schema is not final and can change anytime.

FAQ:

Why would you ever write something already solved?

TL;DR; This gitProject is currently a nice, refreshing side gitProject while writing my master thesis.

I contribute to spoon on a regular schedule, and writing code for spoon helped my expanding my coding skills. In Spoon exists multiple bad smell, which are not hard to fix, but someone has to do it. If you have a Java parser at hand, it was a straightforward idea by me to fix bad smells this way. The biggest problem in spoon is/was the mix of JUnit 4 and JUnit 5. Currently, laughing-train can convert them automatically and speeds the migration process up by magnitudes.

Why use Qodana?

I use vscode as IDE, but I'm impressed by the tooling JetBrains provides. Qodana seems way ahead of the competition and is an impressive tool to use. There exists abstraction for further analyzers, but I'm uncertain if I will ever implement them.

Why not help an existing tool?

Existing tools have either pretty long release schedules, are not using spoon, or I see no value in the tool. Here I can merge, break and change things as I like without too much hassle.

Can I use your tool for X?

Sure go ahead. If it helps, it's perfect. You are welcome to write an issue about it.

More Questions?

Get in contact :)

laughing-train's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar laughing-train[bot] avatar martinwitt avatar monperrus avatar renovate[bot] avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laughing-train's Issues

cannot build laughing-train

I hit the following error:

git clone ssh://github.com/MartinWitt/laughing-train.git
cd laughing-train
./gradlew compile

* What went wrong:
A problem occurred evaluating project ':code-transformation'.
> No signature of method: static java.util.List.of() is applicable for argument types: (String) values: [MartinWitt]
  Possible solutions: pop(), is(java.lang.Object), join(java.lang.String), min(), sum(), any()

Thoughts?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
github-bot/Dockerfile
github-bot/src/main/docker/Dockerfile.jvm
  • registry.access.redhat.com/ubi8/openjdk-17 1.19-4
github-bot/src/main/docker/Dockerfile.legacy-jar
  • registry.access.redhat.com/ubi8/openjdk-17 1.19-4
github-bot/src/main/docker/Dockerfile.native
  • registry.access.redhat.com/ubi8/ubi-minimal 8.9-1161
github-bot/src/main/docker/Dockerfile.native-micro
  • quay.io/quarkus/quarkus-micro-image 2.0
github-actions
.github/workflows/docker-publish.yml
  • actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • gradle/gradle-build-action v3@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff
  • actions/setup-node v4@60edb5dd545a775178f52524783378180af0d1f8
  • actions/setup-java v4@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
  • docker/setup-buildx-action a530e948adbeb357dbca95a7f8845d385edf4438
  • docker/login-action 5f4866a30a54f16a52d2ecb4a3898e9e424939cf
  • docker/metadata-action 1294d94f8ee362ab42b6da04c35f4cd03a0e6af7
  • docker/build-push-action eb539f44b153603ccbfbd98e2ab9d4d0dcaf23a4
.github/workflows/gitstream.yml
  • linear-b/gitstream-github-action v1@705238795e3da405298f7a338a2b427958468be5
.github/workflows/qodana-cloud.yml
  • actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • JetBrains/qodana-action v2024.1.2@2dbc4103d1a75b11de914a893bf1bd03a88a5ce1
  • github/codeql-action v3@d39d31e687223d841ef683f52467bd88e9b21c14
.github/workflows/release-please.yml
.github/workflows/test.yml
  • martinwitt/unreusable-workflows master
  • martinwitt/unreusable-workflows master
  • martinwitt/unreusable-workflows master
  • martinwitt/unreusable-workflows master
gradle
gradle.properties
settings.gradle
  • org.gradle.toolchains.foojay-resolver-convention 0.8.0
buildSrc/build.gradle
  • com.diffplug.spotless:spotless-plugin-gradle 6.25.0
  • org.kordamp.gradle:jandex-gradle-plugin 1.1.0
  • net.ltgt.gradle:gradle-errorprone-plugin 3.1.0
  • io.smallrye:jandex 3.1.7
buildSrc/src/main/groovy/xyz.keksdose.spoon.code_solver.java-application-conventions.gradle
buildSrc/src/main/groovy/xyz.keksdose.spoon.code_solver.java-common-conventions.gradle
  • org.junit.jupiter:junit-jupiter 5.10.2
  • com.google.guava:guava 33.1.0-jre
  • fr.inria.gforge.spoon:spoon-core 11.0.0
  • com.google.flogger:flogger 0.8
  • com.google.flogger:flogger-system-backend 0.8
  • ch.qos.logback:logback-core 1.5.6
  • com.google.errorprone:error_prone_core 2.27.0
  • org.assertj:assertj-core 3.25.3
  • org.instancio:instancio-junit 4.5.1
buildSrc/src/main/groovy/xyz.keksdose.spoon.code_solver.java-library-conventions.gradle
code-transformation/build.gradle
  • org.eclipse.jgit:org.eclipse.jgit 6.9.0.202403050737-r
  • org.eclipse.jgit:org.eclipse.jgit.ssh.apache 6.9.0.202403050737-r
  • com.google.truth:truth 1.4.2
  • org.assertj:assertj-core 3.25.3
  • io.github.java-diff-utils:java-diff-utils 4.12
commons/build.gradle
  • io.smallrye.graphql 2.8.2
github-bot/gradle.properties
  • io.quarkus.platform:quarkus-bom 3.9.5
github-bot/build.gradle
  • io.quarkus 3.8.3
  • io.quarkiverse.jgit:quarkus-jgit 3.1.0
  • io.quarkiverse.githubapi:quarkus-github-api 1.321.0
  • io.quarkiverse.quinoa:quarkus-quinoa 2.3.6
  • io.quarkiverse.loggingmanager:quarkus-logging-manager 3.0.3
  • com.fasterxml.jackson.dataformat:jackson-dataformat-yaml 2.17.0
  • org.jetbrains:annotations 24.1.0
  • org.mockito:mockito-core 5.11.0
  • org.assertj:assertj-core 3.25.3
matcher/build.gradle
spoon-analyzer/build.gradle
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.7
npm
frontend/package.json
  • @apollo/client 3.10.1
  • @emotion/react 11.11.4
  • @emotion/styled 11.11.5
  • @graphql-codegen/typescript-react-apollo ^4.1.0
  • @js-joda/core ^5.5.3
  • @mui/icons-material 5.15.15
  • @mui/lab 5.0.0-alpha.170
  • @mui/material 5.15.15
  • @react-buddy/ide-toolbox ^2.4.0
  • @react-buddy/palette-mui ^5.0.1
  • @react-keycloak/web ^3.4.0
  • @testing-library/jest-dom 6.4.2
  • @testing-library/react 15.0.5
  • @testing-library/user-event 14.5.2
  • @types/jest 29.5.12
  • @types/node 20.12.7
  • @types/react 18.3.1
  • @types/react-dom 18.3.0
  • @types/react-router 5.1.20
  • @types/react-syntax-highlighter 15.5.11
  • @vitejs/plugin-react ^4.2.0
  • graphql ^16.8.1
  • graphql-scalars ^1.22.4
  • react 18.3.1
  • react-avatar ^5.0.3
  • react-code-blocks ^0.1.5
  • react-dom 18.3.1
  • react-icons 5.1.0
  • react-markdown 9.0.1
  • react-router-dom 6.23.0
  • react-syntax-highlighter 15.5.0
  • typography 0.16.24
  • vite ^5.0.2
  • vite-tsconfig-paths ^4.2.1
  • web-vitals 3.5.2
  • @graphql-codegen/cli 5.0.2
  • @graphql-codegen/client-preset 4.2.5
  • @graphql-codegen/introspection 4.0.3
  • @types/babel__core ^7.1.20
  • eslint ^8.56.0
  • eslint-config-react-app ^7.0.1
  • prettier ^3.0.0
  • typescript ^5.3.3
  • vite-plugin-eslint ^1.8.1

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: Invalid JSON (parsing failed)
Message: Syntax error: expecting String near },

How about a PR today?

Summary of all refactoring opportunities:

Project: coming

Rule Occurrences
SizeReplaceableByIsEmpty 144
NonProtectedConstructorInAbstractClass 10

Project: mariadb-connector-j

Rule Occurrences
SizeReplaceableByIsEmpty 6
NonProtectedConstructorInAbstractClass 11

Project: steady

Rule Occurrences
SizeReplaceableByIsEmpty 119
NonProtectedConstructorInAbstractClass 19

Project: AstorMoth

Rule Occurrences
SizeReplaceableByIsEmpty 44

Project: conjure-java

Rule Occurrences
SizeReplaceableByIsEmpty 1
NonProtectedConstructorInAbstractClass 3

Project: astor

Rule Occurrences
SizeReplaceableByIsEmpty 267
NonProtectedConstructorInAbstractClass 290

Project: ecf

Rule Occurrences
SizeReplaceableByIsEmpty 5
NonProtectedConstructorInAbstractClass 2

Project: AutoDispose

Rule Occurrences
NonProtectedConstructorInAbstractClass 7

Project: concurrency-loadbalancer

Rule Occurrences
NonProtectedConstructorInAbstractClass 2

Project: tink

Rule Occurrences
SizeReplaceableByIsEmpty 9
NonProtectedConstructorInAbstractClass 4

Project: Cinch

Rule Occurrences
SizeReplaceableByIsEmpty 1
NonProtectedConstructorInAbstractClass 2

Project: gumtree-spoon-ast-diff

Rule Occurrences
SizeReplaceableByIsEmpty 10
NonProtectedConstructorInAbstractClass 1

Project: assertj-automation

Rule Occurrences
SizeReplaceableByIsEmpty 8

Project: pdfbox

Rule Occurrences
SizeReplaceableByIsEmpty 30
NonProtectedConstructorInAbstractClass 35

Project: assertj-vavr

Rule Occurrences
SizeReplaceableByIsEmpty 1

Project: NullAway

Rule Occurrences
SizeReplaceableByIsEmpty 11
NonProtectedConstructorInAbstractClass 2

Project: kbar

Rule Occurrences
SizeReplaceableByIsEmpty 19
NonProtectedConstructorInAbstractClass 5

Project: polymorphicDSL

Rule Occurrences
NonProtectedConstructorInAbstractClass 1

Project: inlong

Rule Occurrences
SizeReplaceableByIsEmpty 99
NonProtectedConstructorInAbstractClass 86

Project: assertj-assertions-generator

Rule Occurrences
NonProtectedConstructorInAbstractClass 2

Project: kiota-java

Rule Occurrences
SizeReplaceableByIsEmpty 2
NonProtectedConstructorInAbstractClass 3

Project: teamcity-vmware-plugin

Rule Occurrences
SizeReplaceableByIsEmpty 10
NonProtectedConstructorInAbstractClass 2

Project: Telemetry-Client-for-Android

Rule Occurrences
SizeReplaceableByIsEmpty 5
NonProtectedConstructorInAbstractClass 3

Project: marmaray

Rule Occurrences
SizeReplaceableByIsEmpty 2
NonProtectedConstructorInAbstractClass 11

Project: conjure-python

Rule Occurrences
SizeReplaceableByIsEmpty 1

Project: flogger

Rule Occurrences
SizeReplaceableByIsEmpty 5
NonProtectedConstructorInAbstractClass 5

Project: RxCentralBle

Rule Occurrences
SizeReplaceableByIsEmpty 1
NonProtectedConstructorInAbstractClass 1

Project: hudi

Rule Occurrences
SizeReplaceableByIsEmpty 130
NonProtectedConstructorInAbstractClass 127

Project: buildship

Rule Occurrences
NonProtectedConstructorInAbstractClass 11

Project: keyple-service-java-lib

Rule Occurrences
SizeReplaceableByIsEmpty 1

Project: teamcity-deployer-plugin

Rule Occurrences
SizeReplaceableByIsEmpty 3
NonProtectedConstructorInAbstractClass 3

Project: doris-flink-connector

Rule Occurrences
SizeReplaceableByIsEmpty 10
NonProtectedConstructorInAbstractClass 2

Project: xtext

Rule Occurrences
NonProtectedConstructorInAbstractClass 1

Project: durabletask-java

Rule Occurrences
SizeReplaceableByIsEmpty 1
NonProtectedConstructorInAbstractClass 1

Project: jnosql-extensions

Rule Occurrences
NonProtectedConstructorInAbstractClass 5

Project: assertj-examples

Rule Occurrences
NonProtectedConstructorInAbstractClass 2

Project: piranha

Rule Occurrences
SizeReplaceableByIsEmpty 5

Project: intellij-streamdeck-plugin

Rule Occurrences
SizeReplaceableByIsEmpty 1

Project: jkube

Rule Occurrences
SizeReplaceableByIsEmpty 8
NonProtectedConstructorInAbstractClass 10

Project: lsp4jakarta

Rule Occurrences
SizeReplaceableByIsEmpty 11
NonProtectedConstructorInAbstractClass 13

Project: hop

Rule Occurrences
SizeReplaceableByIsEmpty 387
NonProtectedConstructorInAbstractClass 71

Project: assertj-swing

Rule Occurrences
SizeReplaceableByIsEmpty 1
NonProtectedConstructorInAbstractClass 43

Project: appcenter-sdk-android

Rule Occurrences
SizeReplaceableByIsEmpty 12
NonProtectedConstructorInAbstractClass 3

Project: Partner-Center-Java-Samples

Rule Occurrences
SizeReplaceableByIsEmpty 1
NonProtectedConstructorInAbstractClass 3

Project: microprofile-sandbox

Rule Occurrences
SizeReplaceableByIsEmpty 18
NonProtectedConstructorInAbstractClass 1

Project: openjdk-jdk20u

Rule Occurrences
SizeReplaceableByIsEmpty 46
NonProtectedConstructorInAbstractClass 8

Project: xodus

Rule Occurrences
SizeReplaceableByIsEmpty 18
NonProtectedConstructorInAbstractClass 14

Project: RemoteShuffleService

Rule Occurrences
SizeReplaceableByIsEmpty 4
NonProtectedConstructorInAbstractClass 4

Project: logging-chainsaw

Rule Occurrences
SizeReplaceableByIsEmpty 20
NonProtectedConstructorInAbstractClass 3

Project: java-webapp-oidc-migrate-poc

Rule Occurrences
NonProtectedConstructorInAbstractClass 1

Project: npefix

Rule Occurrences
SizeReplaceableByIsEmpty 18
NonProtectedConstructorInAbstractClass 3

Project: hive

Rule Occurrences
SizeReplaceableByIsEmpty 116
NonProtectedConstructorInAbstractClass 53

Project: build-server-for-gradle

Rule Occurrences
SizeReplaceableByIsEmpty 4

Project: iceberg

Rule Occurrences
SizeReplaceableByIsEmpty 24
NonProtectedConstructorInAbstractClass 72

Project: TeamCity.SonarQubePlugin

Rule Occurrences
NonProtectedConstructorInAbstractClass 2

Project: SEEDS

Rule Occurrences
SizeReplaceableByIsEmpty 4

Project: milo

Rule Occurrences
SizeReplaceableByIsEmpty 12
NonProtectedConstructorInAbstractClass 86

Project: teamcity-gradle

Rule Occurrences
NonProtectedConstructorInAbstractClass 3

Project: seatunnel

Rule Occurrences
SizeReplaceableByIsEmpty 44
NonProtectedConstructorInAbstractClass 55

Project: cadence-java-samples

Rule Occurrences
NonProtectedConstructorInAbstractClass 1

Project: h3-java

Rule Occurrences
SizeReplaceableByIsEmpty 1

Project: dubbo

Rule Occurrences
SizeReplaceableByIsEmpty 101
NonProtectedConstructorInAbstractClass 113

Project: azure-gradle-plugins

Rule Occurrences
SizeReplaceableByIsEmpty 4

Project: metamutator

Rule Occurrences
SizeReplaceableByIsEmpty 4

Project: gradle-conjure

Rule Occurrences
NonProtectedConstructorInAbstractClass 6

Project: nopol

Rule Occurrences
SizeReplaceableByIsEmpty 17
NonProtectedConstructorInAbstractClass 20

Project: mssql-jdbc

Rule Occurrences
SizeReplaceableByIsEmpty 9
NonProtectedConstructorInAbstractClass 1

Project: intellij-deps-jdi

Rule Occurrences
SizeReplaceableByIsEmpty 18

Project: jediterm

Rule Occurrences
NonProtectedConstructorInAbstractClass 2

Project: azure-maven-plugins

Rule Occurrences
SizeReplaceableByIsEmpty 19
NonProtectedConstructorInAbstractClass 8

Project: cadence-java-client

Rule Occurrences
SizeReplaceableByIsEmpty 15
NonProtectedConstructorInAbstractClass 11

Project: bamboo-soy

Rule Occurrences
NonProtectedConstructorInAbstractClass 17

Project: rocketmq-spring

Rule Occurrences
SizeReplaceableByIsEmpty 3

laughing-train-summary

Summary

maven-site-plugin

Rule PR State
Multiple rules apache/maven-site-plugin#133 CLOSED

junit5

Rule PR State
Multiple rules junit-team/junit5#3123 CLOSED

commons-validator

Rule PR State
Multiple rules apache/commons-validator#123 CLOSED
Multiple rules apache/commons-validator#102 CLOSED

rocketmq-connect

Rule PR State
Multiple rules apache/rocketmq-connect#409 CLOSED

seatunnel

Rule PR State
Multiple rules apache/seatunnel#3577 CLOSED

LandLord

Rule PR State
Multiple rules LandlordPlugin/LandLord#144 CLOSED
Multiple rules LandlordPlugin/LandLord#132 CLOSED
Multiple rules LandlordPlugin/LandLord#133 CLOSED
Multiple rules LandlordPlugin/LandLord#135 CLOSED
Multiple rules LandlordPlugin/LandLord#134 CLOSED

microprofile-metrics

Rule PR State
Multiple rules eclipse/microprofile-metrics#775 CLOSED

pitest

Rule PR State
Multiple rules hcoles/pitest#1140 CLOSED

spoon

Rule PR State
Multiple rules INRIA/spoon#5064 CLOSED
Multiple rules INRIA/spoon#5063 CLOSED
Multiple rules INRIA/spoon#4985 CLOSED
Multiple rules INRIA/spoon#4987 CLOSED
Multiple rules INRIA/spoon#4901 CLOSED
Multiple rules INRIA/spoon#4917 CLOSED
Multiple rules INRIA/spoon#4990 CLOSED
Multiple rules INRIA/spoon#4916 CLOSED
Multiple rules INRIA/spoon#4902 CLOSED
Multiple rules INRIA/spoon#4900 CLOSED

assertj

Rule PR State
Multiple rules assertj/assertj#2772 CLOSED
Multiple rules assertj/assertj#2763 CLOSED

closure-templates

Rule PR State
Multiple rules google/closure-templates#1133 OPEN

Artemis

Rule PR State
Multiple rules ls1intum/Artemis#5885 CLOSED

camel-kameleon

Rule PR State
Multiple rules apache/camel-kameleon#38 CLOSED

vert.x

Rule PR State
Multiple rules eclipse-vertx/vert.x#4469 CLOSED

httpcomponents-client

Rule PR State
Multiple rules apache/httpcomponents-client#405 CLOSED

teamcity-rake

Rule PR State
Multiple rules JetBrains/teamcity-rake#3 OPEN
Multiple rules JetBrains/teamcity-rake#2 CLOSED

commons-crypto

Rule PR State
Multiple rules apache/commons-crypto#224 CLOSED

eclipse-collections

Rule PR State
Multiple rules eclipse/eclipse-collections#1447 OPEN

error-prone

Rule PR State
Multiple rules google/error-prone#3655 CLOSED
Multiple rules google/error-prone#3519 CLOSED

gradle-graal

Rule PR State
Multiple rules palantir/gradle-graal#535 OPEN

maven-resolver

Rule PR State
Multiple rules apache/maven-resolver#305 CLOSED

teamcity-investigations-auto-assigner

Rule PR State
Multiple rules JetBrains/teamcity-investigations-auto-assigner#57 CLOSED

gora

Rule PR State
Multiple rules apache/gora#279 OPEN

laughing-train

Rule PR State
Multiple rules #251 CLOSED
Multiple rules #248 CLOSED
Multiple rules #648 CLOSED
Multiple rules #647 CLOSED
Multiple rules #386 CLOSED
Multiple rules #385 CLOSED
Multiple rules #250 CLOSED
Multiple rules #311 CLOSED
Multiple rules #310 CLOSED
Multiple rules #309 CLOSED
Multiple rules #244 CLOSED

sling-org-apache-sling-distribution-journal

Rule PR State
Multiple rules apache/sling-org-apache-sling-distribution-journal#115 CLOSED

maven-shade-plugin

Rule PR State
Multiple rules apache/maven-shade-plugin#186 CLOSED

phoenix

Rule PR State
Multiple rules apache/phoenix#1580 CLOSED

classic

Rule PR State
Multiple rules chrisliebot/classic#8 CLOSED
Multiple rules chrisliebot/classic#4 CLOSED
Multiple rules chrisliebot/classic#7 CLOSED
Multiple rules chrisliebot/classic#6 CLOSED
Multiple rules chrisliebot/classic#5 CLOSED

quarkus-github-app

Rule PR State
Multiple rules quarkiverse/quarkus-github-app#365 CLOSED

guava

Rule PR State
Multiple rules google/guava#6171 CLOSED

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.