Adopt the naming convention of the ESEC/FSE 2022 paper#48
Merged
Adopt the naming convention of the ESEC/FSE 2022 paper#48
Conversation
daedb4c to
07cbffd
Compare
Member
|
Please use AE instead of BE. In particular, "artifact" instead of "artefact" to be consistent with the paper. |
Member
|
Please unflattern the previous "patterns.proposed" package. We would like to keep the "proposed" sub-package. |
pmbittner
reviewed
Sep 21, 2022
pmbittner
reviewed
Sep 21, 2022
Note the American English spelling.
The class EditPattern is renamed to EditClass and is moved to the preliminary package because there is no use outside of it. Unfortunately it cannot be removed easily because the preliminary would need many changes.
I think the meaningfulness of this rename is best explained by the second sentence of the original class description: > Contrary to its name, [...]
The root node is now implicitly characterised by having no parents (no after and no before parent). This makes it consistent with some representations of `DiffTree`s where the root node is printed as an IF node with the feature mapping `true`. All representations which did explicitly mark the root node are now printing an IF node and do not mark it specially. Most notably is the line graph representation which did encode `NodeType.ROOT` in the node ID (this is the reason why many IDs in the test cases changed). For backwards compatibility the `isAnnotation` function of `DiffNode` is still returning false on root nodes. This is subject to further refactoring, mostly necessary to handle the difference between `DiffGraph`s and actual trees.
Not having an explicit root gives the opportunity for `isAnnotation() ^ isArtifact()` to hold. The tests indicate only once place needing change for this to work: The root node should not print `#endif` after the root node.
`NodeType.ENDIF` was only needed during parsing. Now, there are no more temporary nodes representing `endif` macros during parsing, instead endif macros are noticed earlier so no further parsing is performed. All serialisations using the ordinal of `NodeType.ENDIF` are changed in a backwards incompatible way. Most notably, the line graph format uses `DiffNode.getID` which encodes the `NodeType`. (This is the reason why many test cases changed).
07cbffd to
3f44bac
Compare
ibbem
commented
Sep 23, 2022
05228ff to
bb3a260
Compare
Given the diff (without modifications) ```diff #ifdef A Code #endif ``` The ID of the root node and the `#ifdef A` node computed the same ID. For ensuring the uniqueness of the root node ID its line number is set to `DiffLineNumber.Invalid` (for consistency both start and end are changed).
bb3a260 to
2b4a44c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is based on #46 to avoid heavy merge conflicts when merging. So this should only be merged after #46.