Uses of Class
org.variantsync.diffdetective.variation.diff.DiffNode
Package
Description
-
Uses of DiffNode in org.variantsync.diffdetective.editclass
Modifier and TypeMethodDescriptiondefault EditClass
Returns the edit class that matches the given node.final boolean
Returns true if this edit class matches the given node and is an artifact.protected abstract boolean
EditClass.matchesArtifactNode
(DiffNode<?> artifactNode) Returns true iff the given node matches this edit class. -
Uses of DiffNode in org.variantsync.diffdetective.editclass.proposed
Modifier and TypeMethodDescriptionprotected boolean
AddToPC.matchesArtifactNode
(DiffNode<?> node) protected boolean
AddWithMapping.matchesArtifactNode
(DiffNode<?> artifactNode) protected boolean
Generalization.matchesArtifactNode
(DiffNode<?> artifactNode) protected boolean
Reconfiguration.matchesArtifactNode
(DiffNode<?> artifactNode) protected boolean
Refactoring.matchesArtifactNode
(DiffNode<?> artifactNode) protected boolean
RemFromPC.matchesArtifactNode
(DiffNode<?> artifactNode) protected boolean
RemWithMapping.matchesArtifactNode
(DiffNode<?> artifactNode) protected boolean
Specialization.matchesArtifactNode
(DiffNode<?> artifactNode) protected boolean
Untouched.matchesArtifactNode
(DiffNode<?> artifactNode) -
Uses of DiffNode in org.variantsync.diffdetective.examplesearch
Modifier and TypeMethodDescriptionprivate static boolean
private static boolean
ExampleCriterions.isNestedAt
(DiffNode<?> n, Time t) -
Uses of DiffNode in org.variantsync.diffdetective.experiments.thesis_bm
Modifier and TypeMethodDescriptionprivate <L extends Label>
voidConstructionValidation.parallelPreOrderWalk
(Projection<L> nodeA, Projection<L> nodeB, BiConsumer<DiffNode<L>, DiffNode<L>> consumer, Set<DiffNode<L>> visited) private <L extends Label>
voidConstructionValidation.parallelPreOrderWalk
(Projection<L> nodeA, Projection<L> nodeB, BiConsumer<DiffNode<L>, DiffNode<L>> consumer, Set<DiffNode<L>> visited) private <L extends Label>
voidConstructionValidation.parallelPreOrderWalk
(Projection<L> nodeA, Projection<L> nodeB, BiConsumer<DiffNode<L>, DiffNode<L>> consumer, Set<DiffNode<L>> visited) private <L extends Label>
voidConstructionValidation.parallelPreOrderWalk
(VariationDiff<L> nodeA, VariationDiff<L> nodeB, BiConsumer<DiffNode<L>, DiffNode<L>> consumer) private <L extends Label>
voidConstructionValidation.parallelPreOrderWalk
(VariationDiff<L> nodeA, VariationDiff<L> nodeB, BiConsumer<DiffNode<L>, DiffNode<L>> consumer) -
Uses of DiffNode in org.variantsync.diffdetective.gumtree
-
Uses of DiffNode in org.variantsync.diffdetective.internal
Modifier and TypeMethodDescriptionstatic String
TextDiffToTikz.tikzNodeLabel
(DiffNode<? extends DiffLinesLabel> node) -
Uses of DiffNode in org.variantsync.diffdetective.mining
Modifier and TypeMethodDescriptionRWCompositePatternNodeFormat.toLabel
(DiffNode<? extends DiffLinesLabel> node) -
Uses of DiffNode in org.variantsync.diffdetective.mining.formats
Modifier and TypeFieldDescriptionDirectedEdgeLabelFormat.Edge.from
The field for thefrom
record component.DirectedEdgeLabelFormat.Edge.to
The field for theto
record component.Modifier and TypeMethodDescriptionDirectedEdgeLabelFormat.Edge.from()
Returns the value of thefrom
record component.default DiffNode<DiffLinesLabel>
MiningNodeFormat.fromLabelAndId
(String lineGraphNodeLabel, int nodeId) DirectedEdgeLabelFormat.Edge.to()
Returns the value of theto
record component.Modifier and TypeMethodDescriptionprotected <L extends DiffLinesLabel>
voidDirectedEdgeLabelFormat.connectAccordingToLabel
(DiffNode<L> child, DiffNode<L> parent, String edgeLabel) private <L extends DiffLinesLabel>
DirectedEdgeLabelFormat.Edge<L>DirectedEdgeLabelFormat.recoverEdgeDirectionFromLabelIfPossible
(DiffNode<L> hypothesizedFrom, DiffNode<L> hypothesizedTo, String edgeLabel) DebugMiningDiffNodeFormat.toLabel
(DiffNode<? extends DiffLinesLabel> node) ReleaseMiningDiffNodeFormat.toLabel
(DiffNode<? extends DiffLinesLabel> node) -
Uses of DiffNode in org.variantsync.diffdetective.show.variation
Modifier and TypeMethodDescriptionVariationDiffApp.calculateLayout
(VariationDiff<L> d, GraphvizExporter.LayoutAlgorithm layout, Format<L> format) Modifier and TypeMethodDescriptionvoid
VariationDiffApp.locateVariationDiffNodesAt
(Map<DiffNode<?>, Vec2> locations) ModifierConstructorDescriptionprotected
NodeView
(DiffNode<L> node, VariationDiffApp<L> formatHolder) -
Uses of DiffNode in org.variantsync.diffdetective.variation.diff
Modifier and TypeFieldDescriptionProjection.backingNode
DiffNode.parents
The parentsDiffNode
before and after the edit.private final DiffNode<?>
VariationDiff.AllPathsEndAtRoot.root
VariationDiff.root
Modifier and TypeFieldDescriptionprivate final Map<DiffNode<?>,
VariationDiff.AllPathsEndAtRoot.VisitStatus> VariationDiff.AllPathsEndAtRoot.cache
Modifier and TypeMethodDescriptionstatic DiffNode<DiffLinesLabel>
DiffNode.createArtifact
(DiffType diffType, DiffLineNumber fromLines, DiffLineNumber toLines, String code) Creates an artifact node with the given parameters.DiffNode.createArtifact
(DiffType diffType, DiffLineNumber fromLines, DiffLineNumber toLines, L label) The same ascreateArtifact(DiffType, DiffLineNumber, DiffLineNumber, String)
but with a generic label.DiffNode.createRoot
(L label) Creates a new root node.DiffNode.deepCopy()
static DiffNode<DiffLinesLabel>
Reconstructs a node from the given id and sets the given label.Projection.getBackingNode()
Gets the firstif
node in the path from the root to this node at the timetime
.VariationDiff.getNodeWithID
(int id) Obtain the DiffNode with the given id in this VariationDiff.Returns the parent of this node before or after the edit.VariationDiff.getRoot()
Returns the root node of this tree.DiffNode.shallowCopy()
static <T extends VariationNode<T,
L1>, L1 extends Label, L2 extends Label>
DiffNode<L2>DiffNode.unchanged
(Function<? super T, DiffNode<L2>> convert, VariationNode<T, L1> variationNode) Transforms aVariationNode
into aDiffNode
by diffingvariationNode
to itself.static <T extends VariationNode<T,
L>, L extends Label>
DiffNode<L>DiffNode.unchanged
(VariationNode<T, L> variationNode) Transforms aVariationNode
into aDiffNode
by diffingvariationNode
to itself.static <T extends VariationNode<T,
L>, L extends Label>
DiffNode<L>DiffNode.unchangedFlat
(VariationNode<T, L> variationNode) Transforms aVariationNode
into aDiffNode
by diffingvariationNode
to itself.Modifier and TypeMethodDescriptionVariationDiff.computeAllNodes()
Returns all nodes in this VariationDiff.VariationDiff.computeAllNodesThat
(Predicate<DiffNode<L>> property) Returns all nodes that satisfy the given predicate.VariationDiff.computeAnnotationNodes()
Returns all mapping nodes of this VariationDiff.VariationDiff.computeArtifactNodes()
Returns all artifact nodes of this VariationDiff.DiffNode.getAllChildren()
Returns an efficient iterable representation of all direct children without duplicates.DiffNode.getAllChildrenSet()
Returns a new set with all children of this node without duplicates.DiffNode.getAllChildrenStream()
Returns an efficient stream representation of all direct children without duplicates.DiffNode.getChildOrder
(Time time) Returns the order of the children attime
.DiffNode.removeChildren
(Time time) Removes all children before or after the edit.Modifier and TypeMethodDescriptionvoid
Adds this subtree below the given parents.void
The same asinsertChild(org.variantsync.diffdetective.variation.diff.DiffNode<L>, int, org.variantsync.diffdetective.variation.diff.Time)
but puts the node at the end of the children list instead of inserting it at a specific index.int
DiffNode.indexOfChild
(DiffNode<L> child, Time time) Returns the index of the given child in the list of children of this node.void
DiffNode.insertChild
(DiffNode<L> child, int index, Time time) Insertchild
as child at the timetime
at the positionindex
.boolean
Returns true iff this node is the before or after parent of the given node.boolean
Returns true iff this node is the parent of the given node at the given time.boolean
Returns true if this subtree is exactly equal toother
.private static <L extends Label>
booleanvoid
DiffNode.removeChild
(DiffNode<L> child, Time time) Removes the given node from this node's children before or after the edit.void
VariationDiff.removeNode
(DiffNode<L> node) Removes the given node from the VariationDiff but keeps its children.void
DiffNode.stealChildrenOf
(DiffNode<L> other) Removes all children from the given node and adds them as children to this node at the respective times.boolean
Returns true if all paths (in parent direction) starting at the given node end at the root.Modifier and TypeMethodDescriptionvoid
DiffNode.addChildren
(Collection<DiffNode<L>> children, Time time) Adds all given nodes at the timetime
as children usingaddChild(org.variantsync.diffdetective.variation.diff.DiffNode<L>, org.variantsync.diffdetective.variation.diff.Time)
.boolean
Checks whether all nodes in this tree satisfy the given condition.boolean
Checks whether any node in this tree satisfies the given condition.VariationDiff.computeAllNodesThat
(Predicate<DiffNode<L>> property) Returns all nodes that satisfy the given predicate.int
Returns the number of nodes in this tree that satisfy the given condition.Invokes the given callback for each node in this VariationDiff.static VariationDiff<DiffLinesLabel>
DiffGraph.fromNodes
(Collection<DiffNode<DiffLinesLabel>> nodes) Deprecated.InvokesDiffGraph.fromNodes(Collection, VariationDiffSource)
)} with an unknown VariationDiffSource.static VariationDiff<DiffLinesLabel>
DiffGraph.fromNodes
(Collection<DiffNode<DiffLinesLabel>> nodes, VariationDiffSource source) Deprecated.Takes a set of DiffNodes that forms a DiffGraph (i.e., similar to a VariationDiff but with no explicit root) and converts it to a VariationDiff by equipping it with a synthetic root node.private static <L extends Label>
booleanboolean
Checks whether no node in this tree satisfies the given condition.void
DiffNode.removeChildren
(Collection<DiffNode<L>> childrenToRemove) Removes all given children for all times.static <T extends VariationNode<T,
L1>, L1 extends Label, L2 extends Label>
DiffNode<L2>DiffNode.unchanged
(Function<? super T, DiffNode<L2>> convert, VariationNode<T, L1> variationNode) Transforms aVariationNode
into aDiffNode
by diffingvariationNode
to itself.ModifierConstructorDescriptionprivate
AllPathsEndAtRoot
(DiffNode<?> root) (package private)
Projection
(DiffNode<L> backingNode, Time time) Creates a new projection of aDiffNode
.VariationDiff
(DiffNode<L> root) Creates a VariationDiff that only consists of the single given root node.VariationDiff
(DiffNode<L> root, VariationDiffSource source) Creates a VariationDiff that only consists of the single given root node. -
Uses of DiffNode in org.variantsync.diffdetective.variation.diff.bad
Modifier and TypeMethodDescriptionBadVDiff.mergeToGood
(VariationTreeNode<L> before, VariationTreeNode<L> after) Merges two VariationTreeNodes that represent the same node to a single unchanged DiffNode.BadVDiff.toGood
(VariationTreeNode<L> n) Modifier and TypeMethodDescriptionprivate static <L extends Label>
VariationTreeNode<L>BadVDiff.fromGood
(DiffNode<L> n, BadVDiff.FromGoodNodeTranslation<L> nodeTranslation, Map<VariationTreeNode<L>, DiffType> coloring, Map<VariationTreeNode<L>, DiffLineNumberRange> lines) Performs aplain
conversion of the given DiffNode n to a VariationTreeNode.(package private) VariationTreeNode<L>
Returns the VariationTreeNode that represents the given DiffNode d at the given time t in the produced bad diff.private static <L extends Label>
VariationTreeNode<L>Plain conversion of DiffNodes to VariationTree nodes.(package private) void
Remember that the given DiffNode d was translated to the given VariationTreeNode v at time t.(package private) void
BadVDiff.FromGoodNodeTranslation.put
(DiffNode<L> d, VariationTreeNode<L> v) Remember that the given DiffNode d was translated to the given VariationTreeNode v at all times d exists. -
Uses of DiffNode in org.variantsync.diffdetective.variation.diff.construction
Modifier and TypeMethodDescriptionstatic <B extends VariationNode<B,
L>, L extends Label>
DiffNode<L>GumTreeDiff.diffUsingMatching
(DiffNode<L> before, VariationNode<B, L> after, com.github.gumtreediff.matchers.Matcher matcher) static <A extends VariationNode<A,
L>, B extends VariationNode<B, L>, L extends Label>
DiffNode<L>GumTreeDiff.diffUsingMatching
(VariationNode<A, L> before, VariationNode<B, L> after, com.github.gumtreediff.matchers.Matcher matcher) GumTreeDiff.improveMatching
(DiffNode<L> tree, com.github.gumtreediff.matchers.Matcher matcher) Runmatcher
on the matching extracted fromtree
and modifytree
in-place to reflect the new matching.Removes the implicit matching between theBEFORE
andAFTER
projection ofbeforeNode
.Modifier and TypeMethodDescriptionprivate static <L extends Label>
voidGumTreeDiff.addUnmapped
(com.github.gumtreediff.matchers.MappingStore mappings, DiffNode<L> parent, VariationTreeAdapter<L> afterNode) Recursively addsafterNode
toparent
reusing matched nodes.static <B extends VariationNode<B,
L>, L extends Label>
DiffNode<L>GumTreeDiff.diffUsingMatching
(DiffNode<L> before, VariationNode<B, L> after, com.github.gumtreediff.matchers.Matcher matcher) GumTreeDiff.improveMatching
(DiffNode<L> tree, com.github.gumtreediff.matchers.Matcher matcher) Runmatcher
on the matching extracted fromtree
and modifytree
in-place to reflect the new matching.private static <L extends Label>
voidMergesafterNode
intobeforeNode
such thatbeforeNode.isNon() == true
.Removes the implicit matching between theBEFORE
andAFTER
projection ofbeforeNode
. -
Uses of DiffNode in org.variantsync.diffdetective.variation.diff.graph
Modifier and TypeFieldDescriptionFormalDiffGraph.Edge.child
The field for thechild
record component.FormalDiffGraph.Edge.parent
The field for theparent
record component.Modifier and TypeMethodDescriptionFormalDiffGraph.Edge.child()
Returns the value of thechild
record component.FormalDiffGraph.Edge.parent()
Returns the value of theparent
record component.Modifier and TypeMethodDescriptionFormalDiffGraph.nodes()
Returns the value of thenodes
record component.ModifierConstructorDescriptionCreates an instance of aEdge
record class.ModifierConstructorDescriptionFormalDiffGraph
(Set<DiffNode<L>> nodes, Set<FormalDiffGraph.Edge<L>> edges) Creates an instance of aFormalDiffGraph
record class. -
Uses of DiffNode in org.variantsync.diffdetective.variation.diff.parse
Modifier and TypeFieldDescriptionprivate DiffNode<DiffLinesLabel>
VariationDiffParser.lastArtifact
Modifier and TypeFieldDescriptionprivate final Stack<DiffNode<DiffLinesLabel>>
VariationDiffParser.afterStack
A stack containing the current path after the edit from the root of the currently parsedVariationDiff
to the currently parsedDiffNode
.private final Stack<DiffNode<DiffLinesLabel>>
VariationDiffParser.beforeStack
A stack containing the current path before the edit from the root of the currently parsedVariationDiff
to the currently parsedDiffNode
.Modifier and TypeMethodDescriptionprivate void
VariationDiffParser.addNode
(DiffNode<DiffLinesLabel> newNode) Adds a fully parsed node into theVariationDiff
.Modifier and TypeMethodDescriptionprivate void
VariationDiffParser.popIfChain
(Stack<DiffNode<DiffLinesLabel>> stack, DiffLineNumber elseLineNumber) Popstack
until an IF node is popped. -
Uses of DiffNode in org.variantsync.diffdetective.variation.diff.serialize
Modifier and TypeFieldDescriptionStyledEdge.from
The field for thefrom
record component.StyledEdge.to
The field for theto
record component.Modifier and TypeMethodDescriptionStyledEdge.from()
Returns the value of thefrom
record component.StyledEdge.to()
Returns the value of theto
record component.Modifier and TypeMethodDescriptionprotected <La extends L>
voidFormat.sortedEdgeWithLabel
(DiffNode<La> originalFrom, DiffNode<La> originalTo, StyledEdge.Style style, Consumer<StyledEdge<La>> callback) Modifier and TypeMethodDescription<La extends L>
voidTikzExporter.exportVariationDiff
(VariationDiff<La> variationDiff, Function<DiffNode<La>, Vec2> nodeLayout, OutputStream destination, boolean escape) <La extends L>
voidFormat.forEachNode
(VariationDiff<La> variationDiff, Consumer<DiffNode<La>> callback) private static VariationDiff<DiffLinesLabel>
LineGraphImport.parseVariationDiff
(String lineGraph, Path inFile, List<DiffNode<DiffLinesLabel>> diffNodeList, LineGraphImportOptions<DiffLinesLabel> options) Generates aVariationDiff
from the given, already parsed parameters.ModifierConstructorDescriptionStyledEdge
(DiffNode<L> from, DiffNode<L> to, StyledEdge.Style style) Creates an instance of aStyledEdge
record class. -
Uses of DiffNode in org.variantsync.diffdetective.variation.diff.serialize.edgeformat
Modifier and TypeMethodDescriptionprotected <La extends L>
voidEdgeLabelFormat.connectAccordingToLabel
(DiffNode<La> child, DiffNode<La> parent, String edgeLabel) Adds the given child node as the child of the given parent node for all times described by the given label (viaaddChild(DiffNode, Time)
) In particular, this method checks if the given edge label starts withLineGraphConstants.BEFORE_PARENT
,LineGraphConstants.AFTER_PARENT
, orLineGraphConstants.BEFORE_AND_AFTER_PARENT
and connects both nodes accordingly. -
Uses of DiffNode in org.variantsync.diffdetective.variation.diff.serialize.nodeformat
Modifier and TypeMethodDescriptiondefault DiffNode<DiffLinesLabel>
DiffNodeLabelFormat.fromLabelAndId
(String lineGraphNodeLabel, int nodeId) Converts a label of line graph into aDiffNode
.Modifier and TypeMethodDescriptiondefault org.variantsync.functjonal.Pair<Integer,
DiffNode<DiffLinesLabel>> DiffNodeLabelFormat.fromLineGraphLine
(String lineGraphLine) Converts a line describing a graph (starting with "t # ") in line graph format into aVariationDiffSource
.Modifier and TypeMethodDescriptionstatic String
DiffNodeLabelPrettyfier.prettyPrintIfAnnotationOr
(DiffNode<?> node, String elseValue) InvokesDiffNodeLabelPrettyfier.prettyPrintTypeAndMapping(DiffNode)
if the given nodeis an annotation
, and returns the elseValue otherwise.private static String
DiffNodeLabelPrettyfier.prettyPrintTypeAndMapping
(DiffNode<?> node) Auxiliary method forDiffNodeLabelPrettyfier.prettyPrintIfAnnotationOr(DiffNode, String)
.Converts aDiffNode
into a label suitable for exporting.FullNodeFormat.toLabel
(DiffNode<? extends DiffLinesLabel> node) DiffNodeLabelFormat.toMultilineLabel
(DiffNode<? extends L> node) Converts aDiffNode
into a multi line label suitable for exporting.FullNodeFormat.toMultilineLabel
(DiffNode<? extends DiffLinesLabel> node) PaperNodeFormat.toMultilineLabel
(DiffNode<? extends L> node) RenameRootNodeFormat.toMultilineLabel
(DiffNode<? extends L> node) -
Uses of DiffNode in org.variantsync.diffdetective.variation.diff.transform
Modifier and TypeFieldDescriptionprivate final List<Stack<DiffNode<DiffLinesLabel>>>
CollapseNestedNonEditedAnnotations.chainCandidates
private final List<Stack<DiffNode<DiffLinesLabel>>>
CollapseNestedNonEditedAnnotations.chains
RelabelNodes.getLabel
FeatureExpressionFilter.isFeatureAnnotation
Deprecated.The field for theisFeatureAnnotation
record component.Modifier and TypeMethodDescriptionNaiveMovedArtifactDetection.findTwinOf
(DiffNode<L> artifact, List<DiffNode<L>> artifactNodes) Modifier and TypeMethodDescriptionNaiveMovedArtifactDetection.findArtifactTwins
(VariationDiff<L> variationDiff) NaiveMovedArtifactDetection.findArtifactTwins
(VariationDiff<L> variationDiff) FeatureExpressionFilter.isFeatureAnnotation()
Deprecated.Returns the value of theisFeatureAnnotation
record component.Modifier and TypeMethodDescriptionprivate static boolean
CollapseNestedNonEditedAnnotations.anyChildEdited
(DiffNode<?> d) private void
CollapseNestedNonEditedAnnotations.findChains
(VariationDiffTraversal<DiffLinesLabel> traversal, DiffNode<DiffLinesLabel> subtree) NaiveMovedArtifactDetection.findTwinOf
(DiffNode<L> artifact, List<DiffNode<L>> artifactNodes) private static boolean
CollapseNestedNonEditedAnnotations.hasExactlyOneChild
(DiffNode<?> d) private static boolean
CollapseNestedNonEditedAnnotations.inChainTail
(DiffNode<?> d) private static boolean
private static boolean
private static boolean
CollapseNestedNonEditedAnnotations.noChildEdited
(DiffNode<?> d) void
CutNonEditedSubtrees.visit
(VariationDiffTraversal<L> traversal, DiffNode<L> subtree) Modifier and TypeMethodDescriptionprivate static void
CollapseNestedNonEditedAnnotations.collapseChain
(Stack<DiffNode<DiffLinesLabel>> chain) private void
CollapseNestedNonEditedAnnotations.finalize
(Stack<DiffNode<DiffLinesLabel>> chain) NaiveMovedArtifactDetection.findTwinOf
(DiffNode<L> artifact, List<DiffNode<L>> artifactNodes) ModifierConstructorDescriptionFeatureExpressionFilter
(Predicate<DiffNode<L>> isFeatureAnnotation) Deprecated.Creates an instance of aFeatureExpressionFilter
record class.RelabelNodes
(Function<DiffNode<L>, L> newLabelOfNode) Creates a new transformation that relables each node with the given function. -
Uses of DiffNode in org.variantsync.diffdetective.variation.diff.traverse
Modifier and TypeMethodDescriptionprivate boolean
VariationDiffTraversal.markAsVisited
(DiffNode<L> node) Treat the given node as already visited regardless whether this is actually true or not.void
Start the traversal of a VariationDiff at the given DiffNode.void
VariationDiffVisitor.visit
(VariationDiffTraversal<L> traversal, DiffNode<L> subtree) Invoked by a traversal when a node is visited.void
VariationDiffTraversal.visitChildrenOf
(DiffNode<L> subtree) Continues the traversal by visiting all children of the given node sequentially.Modifier and TypeMethodDescriptionstatic <L extends Label>
VariationDiffTraversal<L>Creates a new traversal that will invoke the given callback once for each node in a visited VariationDiff. -
Uses of DiffNode in org.variantsync.diffdetective.variation.tree
Modifier and TypeMethodDescriptionVariationTree.toVariationDiff
(Function<VariationTreeNode<L>, DiffNode<L>> nodeConverter)