Skip to content

Update Main with New Features and Artifact Camera-Ready Changes for ESEC/FSE'22#52

Merged
pmbittner merged 39 commits intomainfrom
develop
Oct 17, 2022
Merged

Update Main with New Features and Artifact Camera-Ready Changes for ESEC/FSE'22#52
pmbittner merged 39 commits intomainfrom
develop

Conversation

@pmbittner
Copy link
Copy Markdown
Member

This PR comprises

ibbem and others added 30 commits July 5, 2022 21:37
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.
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).
pmbittner and others added 8 commits September 24, 2022 12:04
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
@pmbittner pmbittner added the enhancement New feature or request label Oct 6, 2022
@pmbittner pmbittner requested a review from ibbem October 6, 2022 11:22
@pmbittner pmbittner self-assigned this Oct 6, 2022
Copy link
Copy Markdown
Collaborator

@ibbem ibbem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only change required (that is not content of a following pull request) is the comment I messed up.

Comment thread src/test/java/ExportTest.java
@ibbem ibbem self-requested a review October 16, 2022 12:14
@pmbittner pmbittner merged commit b7b2b1b into main Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants