Conversation
The builtin `assert` of Java is disabled by default (at least in release mode), but this is a research project so logical consistency is really important and the performance implications are not as problematic.
Always check assertions
The layout is computed using Graphviz.
Line graph specific export code is moved to the line graph exporter. This changes the line endings to use the OS dependent representation through the use of `PrintStream`. Currently there is an unnecessary conversion from `String` to `ByteArray` and back because `OutputStream`s are used. This will be optimised in the future by directly outputting to the desired devices (file and terminal) without converting back to a `String` representation.
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.
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.
I think the meaningfulness of this rename is best explained by the second sentence of the original class description: > Contrary to its name, [...]
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).
TikZ export of DiffTrees
Make names in esecfse22 branch consistent with paper
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).
Adopt the naming convention of the ESEC/FSE 2022 paper
ibbem
requested changes
Oct 16, 2022
ibbem
approved these changes
Oct 16, 2022
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 PR comprises