-
Notifications
You must be signed in to change notification settings - Fork 11
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
The offsets of added parameters are wrong in some cases (not always) #118
Comments
@tsantalis thank you! @anchouls could you take a look at it, please? |
@tsantalis @onewhl UMLParameter parameter in AddParameterRefactoring class (from RefactoringMiner tool) returns an incorrect LocationInfo, specifically an incorrect offset |
@anchouls @onewhl ASTNode node;
this.startOffset = node.getStartPosition();
this.length = node.getLength();
this.endOffset = startOffset + length; How is it possible that the line number and column number are correct and the offset is not? |
The IDEA doesn't count line breaks when counting characters (unlike Notepad++, VS Code, etc.). Usually, the startOffset also does not include line breaks, and highlighting works well. Why line breaks were counted now is currently an open question.
|
My students told me that IntelliJ ignores the actual line endings of the file, and commits code using the Unix LF ("\n"). There was a file in our repository with CRLF ("\r\n") line endings, and IntelliJ changed everything to LF ("\n") after the commit. It seems IntelliJ has some preference or configuration for LF ("\n") by default. |
In commit tsantalis/RefactoringMiner@5e79668
there are 3 added parameters,
but the offsets are shifted below the actual location of the added parameters
The text was updated successfully, but these errors were encountered: