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

Right-clicking on evolution hooks makes empty squares #39

Closed
tsantalis opened this issue Oct 10, 2022 · 3 comments
Closed

Right-clicking on evolution hooks makes empty squares #39

tsantalis opened this issue Oct 10, 2022 · 3 comments

Comments

@tsantalis
Copy link

Description

https://github.com/checkstyle/checkstyle/blob/8b9c27d9178228436813c99fbfb1af944e53a048/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java#L330
Select method processFile at line 330 and track.
Right-click on the evolution hook 77acd41 multiple times.
Screenshot from 2022-10-10 14-03-25

Environment (if bug)

  • Codetracker version: 1.1
  • Codetracker API version: 0.1.2
  • Browser & version: Chrome
  • OS & version: Ubuntu 22.04
@tsantalis
Copy link
Author

tsantalis commented Oct 10, 2022

The evolution hook for methods was re-implemented in
jodavimehran/code-tracker@c45d252#diff-4bd0a8a3a48fc0f30b70fdc998ab17cdc9c7f38dad015386d15c71d51649c9a5L34-L37
Method methodAfter = Method.of(extractRefactoring.getSourceOperationAfterExtraction(), childVersion);
is replaced with (Method) addedElement, which corresponds to the extracted method

Is that the reason of the failure?
We are supposed to have system tests.
How was this problem not caught?

@flozender
Copy link
Owner

Yes, I believe that is the reason for failure. I was sidetracked by other tasks while working on the tests so I couldn't set up tests for evolution methods (Issue #17). I will do this shortly. Thank you for reporting the issue.

@tsantalis
Copy link
Author

tsantalis commented Oct 14, 2022

Screenshot from 2022-10-14 07-29-53

Right-click on d46c2cf causes exception. The start line 237 is the line the javadoc of the method starts. Method signature is in line 246

Something went wrong: org.codetracker.api.CodeElementNotFoundException: Element src/main/java/com/puppycrawl/tools/checkstyle/Checker.java is not found in file 'process' at line 237!

From the exception message it seems that the filePath was passed as element name, and the element name was passed as the filePath, when calling the CodeElementLocator API !!!

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

No branches or pull requests

2 participants