-
Notifications
You must be signed in to change notification settings - Fork 2
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
Dev-Issue #97
Comments
@laughing-train mining |
29 similar comments
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
9 similar comments
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train mining |
@laughing-train list |
Bad smellsI found 0 bad smells: |
1 similar comment
Bad smellsI found 0 bad smells: |
@laughing-train list |
Bad smellsI found 0 bad smells: |
@laughing-train list |
Bad smellsI found 10 bad smells: UnnecessaryToStringCallUnnecessary Snippet CtType<?> parent = element.getParent(CtType.class).getTopLevelType();
String raw = "Replaced " + element + " with " + innvocation.toString();
String markdown = "Replaced `" + element + "` with `" + innvocation.toString() + "`";
setChanged(parent, new Change(COLLECTION_EMPTY_CHECK, MarkdownString.fromMarkdown(raw, markdown), parent));
} UnnecessaryToStringCallUnnecessary Snippet for (CtInvocation<?> toStringInvocations : type.getElements(new InvocationFilter(toStringMethod))) {
if (isAlmostMatch(toStringInvocations)) {
String oldInvocation = "" + toStringInvocations.toString();
toStringInvocations.replace(toStringInvocations.getTarget());
toStringInvocations UnnecessaryToStringCallUnnecessary Snippet TransformationEngine transformationEngine = new TransformationEngine(List.of(function));
transformationEngine.setChangeListener(changeListener);
System.out.println("refactorRepo: " + dir.toString() + "/" + config.getSrcFolder());
transformationEngine.applyToGivenPath(dir.toString() + "/" + config.getSrcFolder());
} catch (Exception e) { UnnecessaryToStringCallUnnecessary Snippet transformationEngine.setChangeListener(changeListener);
System.out.println("refactorRepo: " + dir.toString() + "/" + config.getSrcFolder());
transformationEngine.applyToGivenPath(dir.toString() + "/" + config.getSrcFolder());
} catch (Exception e) {
logger.atSevere().withCause(e).log("Failed to refactor repo"); UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> invocation) {
if (invocation.getExecutable() != null && JunitHelper.isJunit5AssertFalse(invocation.getExecutable())) {
CtInvocation<?> junit5AssertTrue = invocation;
CtExpression<?> expression = invocation.getArguments().iterator().next();
if (expression instanceof CtBinaryOperator) { UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> invocation) {
if (invocation.getExecutable() != null && JunitHelper.isJunit5AssertTrue(invocation.getExecutable())) {
CtInvocation<?> junit5AssertTrue = invocation;
CtExpression<?> expression = invocation.getArguments().iterator().next();
if (expression instanceof CtBinaryOperator) { UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> element) {
if (element.getExecutable() != null && JunitHelper.isJunit5AssertTrue(element.getExecutable())) {
CtInvocation<?> junit5AssertTrue = element;
CtExpression<?> expression = element.getArguments().iterator().next();
if (expression instanceof CtBinaryOperator) { UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> invocation) {
if (invocation.getExecutable() != null && JunitHelper.isJunit5AssertTrue(invocation.getExecutable())) {
CtInvocation<?> junit5AssertTrue = invocation;
CtExpression<?> expression = invocation.getArguments().iterator().next();
if (expression instanceof CtBinaryOperator) { UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> invocation) {
if (invocation.getExecutable() != null && JunitHelper.isJunit5AssertFalse(invocation.getExecutable())) {
CtInvocation<?> junit5AssertTrue = invocation;
CtExpression<?> expression = invocation.getArguments().iterator().next();
if (expression instanceof CtInvocation) { UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> invocation) {
if (invocation.getExecutable() != null && JunitHelper.isJunit5AssertTrue(invocation.getExecutable())) {
CtInvocation<?> junit5AssertTrue = invocation;
CtExpression<?> expression = invocation.getArguments().iterator().next();
if (expression instanceof CtInvocation) { |
@laughing-train list |
Bad smellsI found 10 bad smells: UnnecessaryToStringCallUnnecessary Snippet CtType<?> parent = element.getParent(CtType.class).getTopLevelType();
String raw = "Replaced " + element + " with " + innvocation.toString();
String markdown = "Replaced `" + element + "` with `" + innvocation.toString() + "`";
setChanged(parent, new Change(COLLECTION_EMPTY_CHECK, MarkdownString.fromMarkdown(raw, markdown), parent));
} UnnecessaryToStringCallUnnecessary Snippet for (CtInvocation<?> toStringInvocations : type.getElements(new InvocationFilter(toStringMethod))) {
if (isAlmostMatch(toStringInvocations)) {
String oldInvocation = "" + toStringInvocations.toString();
toStringInvocations.replace(toStringInvocations.getTarget());
toStringInvocations UnnecessaryToStringCallUnnecessary Snippet TransformationEngine transformationEngine = new TransformationEngine(List.of(function));
transformationEngine.setChangeListener(changeListener);
System.out.println("refactorRepo: " + dir.toString() + "/" + config.getSrcFolder());
transformationEngine.applyToGivenPath(dir.toString() + "/" + config.getSrcFolder());
} catch (Exception e) { UnnecessaryToStringCallUnnecessary Snippet transformationEngine.setChangeListener(changeListener);
System.out.println("refactorRepo: " + dir.toString() + "/" + config.getSrcFolder());
transformationEngine.applyToGivenPath(dir.toString() + "/" + config.getSrcFolder());
} catch (Exception e) {
logger.atSevere().withCause(e).log("Failed to refactor repo"); UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> invocation) {
if (invocation.getExecutable() != null && JunitHelper.isJunit5AssertFalse(invocation.getExecutable())) {
CtInvocation<?> junit5AssertTrue = invocation;
CtExpression<?> expression = invocation.getArguments().iterator().next();
if (expression instanceof CtBinaryOperator) { UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> invocation) {
if (invocation.getExecutable() != null && JunitHelper.isJunit5AssertTrue(invocation.getExecutable())) {
CtInvocation<?> junit5AssertTrue = invocation;
CtExpression<?> expression = invocation.getArguments().iterator().next();
if (expression instanceof CtBinaryOperator) { UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> element) {
if (element.getExecutable() != null && JunitHelper.isJunit5AssertTrue(element.getExecutable())) {
CtInvocation<?> junit5AssertTrue = element;
CtExpression<?> expression = element.getArguments().iterator().next();
if (expression instanceof CtBinaryOperator) { UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> invocation) {
if (invocation.getExecutable() != null && JunitHelper.isJunit5AssertTrue(invocation.getExecutable())) {
CtInvocation<?> junit5AssertTrue = invocation;
CtExpression<?> expression = invocation.getArguments().iterator().next();
if (expression instanceof CtBinaryOperator) { UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> invocation) {
if (invocation.getExecutable() != null && JunitHelper.isJunit5AssertFalse(invocation.getExecutable())) {
CtInvocation<?> junit5AssertTrue = invocation;
CtExpression<?> expression = invocation.getArguments().iterator().next();
if (expression instanceof CtInvocation) { UnnecessaryLocalVariableLocal variable Snippet public void process(CtInvocation<?> invocation) {
if (invocation.getExecutable() != null && JunitHelper.isJunit5AssertTrue(invocation.getExecutable())) {
CtInvocation<?> junit5AssertTrue = invocation;
CtExpression<?> expression = invocation.getArguments().iterator().next();
if (expression instanceof CtInvocation) { |
No description provided.
The text was updated successfully, but these errors were encountered: