Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
274,300
void (int upNodeIndex, int downNodeIndex, CommitId downCommitId) { int end = myNodeToEdgeIndex[upNodeIndex + 1]; GraphCommit<CommitId> upCommit = myCommits.get(upNodeIndex); List<CommitId> parentHashIndices = upCommit.getParents(); for (int i = 0; i < parentHashIndices.size(); i++) { if (parentHashIndices.get(i).equals(downCommitId)) { int offset = parentHashIndices.size() - i; int edgeIndex = end - offset; if (myLongEdges[edgeIndex] == -1) { myLongEdges[edgeIndex] = downNodeIndex; return; } else { throw new IllegalStateException("Edge was set early!. Up node: " + upNodeIndex + ", down node: " + downNodeIndex); } } } throw new IllegalStateException("Not found underdone edges for node: " + upNodeIndex + ". Adjacent down node: " + downNodeIndex); }
fixUnderdoneEdge
274,301
void (int nodeIndex) { GraphCommit<CommitId> commit = myCommits.get(nodeIndex); List<Integer> upNodes = upAdjacentNodes.remove(commit.getId()); if (upNodes == null) upNodes = Collections.emptyList(); int edgeIndex = myNodeToEdgeIndex[nodeIndex]; for (Integer upNodeIndex : upNodes) { fixUnderdoneEdge(upNodeIndex, nodeIndex, commit.getId()); myLongEdges[edgeIndex] = upNodeIndex; edgeIndex++; } // down nodes if (!mySimpleNodes.get(nodeIndex)) { for (CommitId downCommitId : commit.getParents()) { addUnderdoneEdge(nodeIndex, downCommitId); myLongEdges[edgeIndex] = -1; edgeIndex++; } } myNodeToEdgeIndex[nodeIndex + 1] = edgeIndex; }
doStep
274,302
void (int upNodeIndex, int notLoadId) { for (int edgeIndex = myNodeToEdgeIndex[upNodeIndex]; edgeIndex < myNodeToEdgeIndex[upNodeIndex + 1]; edgeIndex++) { if (myLongEdges[edgeIndex] == -1) { myLongEdges[edgeIndex] = notLoadId; return; } } throw new IllegalStateException("Not found underdone edge to not load commit for node: " + upNodeIndex); }
fixUnderdoneEdgeForNotLoadCommit
274,303
void (@NotNull NotNullFunction<? super CommitId, Integer> notLoadedCommitToId) { List<CommitId> commitIds = new ArrayList<>(upAdjacentNodes.keySet()); ContainerUtil.sort(commitIds, Comparator.comparingInt(o -> Collections.min(upAdjacentNodes.get(o)))); for (CommitId notLoadCommit : commitIds) { int notLoadId = notLoadedCommitToId.fun(notLoadCommit); for (int upNodeIndex : upAdjacentNodes.get(notLoadCommit)) { fixUnderdoneEdgeForNotLoadCommit(upNodeIndex, notLoadId); } } }
fixUnderdoneEdges
274,304
PermanentLinearGraphImpl (@NotNull NotNullFunction<? super CommitId, Integer> notLoadedCommitToId) { for (int nodeIndex = 0; nodeIndex < myNodesCount; nodeIndex++) { doStep(nodeIndex); } fixUnderdoneEdges(notLoadedCommitToId); return new PermanentLinearGraphImpl(mySimpleNodes, myNodeToEdgeIndex, myLongEdges); }
build
274,305
PermanentLinearGraphImpl () { return build(dom -> Integer.MIN_VALUE); }
build
274,306
int () { return graphCommits.size(); }
size
274,307
long (int index) { return graphCommits.get(index).getTimestamp(); }
getTimestamp
274,308
List<Integer> (@NotNull final List<? extends GraphCommit<Integer>> graphCommits) { final IntList compressedIntList = CompressedIntList.newInstance(new IntList() { @Override public int size() { return graphCommits.size(); } @Override public int get(int index) { return graphCommits.get(index).getId(); } }, 30); return new AbstractList<>() { @NotNull @Override public Integer get(int index) { return compressedIntList.get(index); } @Override public int size() { return compressedIntList.size(); } }; }
createCompressedIntList
274,309
int () { return graphCommits.size(); }
size
274,310
int (int index) { return graphCommits.get(index).getId(); }
get
274,311
Integer (int index) { return compressedIntList.get(index); }
get
274,312
int () { return compressedIntList.size(); }
size
274,313
CommitId (int nodeId) { if (nodeId < 0) return myNotLoadCommits.get(nodeId); return myCommitIdIndexes.get(nodeId); }
getCommitId
274,314
long (int nodeId) { if (nodeId < 0) return 0; return myTimestampGetter.getTimestamp(nodeId); }
getTimestamp
274,315
TimestampGetter () { return myTimestampGetter; }
getTimestampGetter
274,316
int (@NotNull CommitId commitId) { int indexOf = myCommitIdIndexes.indexOf(commitId); if (indexOf != -1) return indexOf; return getNotLoadNodeId(commitId); }
getNodeId
274,317
int (@NotNull CommitId commitId) { for (Int2ObjectMap.Entry<CommitId> entry : myNotLoadCommits.int2ObjectEntrySet()) { if (entry.getValue().equals(commitId)) { return entry.getIntKey(); } } return -1; }
getNotLoadNodeId
274,318
List<CommitId> (@NotNull Collection<Integer> commitIndexes) { return ContainerUtil.map(commitIndexes, this::getCommitId); }
convertToCommitIdList
274,319
Set<CommitId> (@NotNull Collection<Integer> commitIndexes) { return ContainerUtil.map2Set(commitIndexes, this::getCommitId); }
convertToCommitIdSet
274,320
Set<Integer> (@NotNull Collection<? extends CommitId> commitIds) { return convertToNodeIds(commitIds, false); }
convertToNodeIds
274,321
Set<Integer> (@NotNull Collection<? extends CommitId> commitIds, boolean reportNotFound) { Set<Integer> result = new HashSet<>(); Set<CommitId> matchedIds = new HashSet<>(); for (int i = 0; i < myCommitIdIndexes.size(); i++) { CommitId commitId = myCommitIdIndexes.get(i); if (commitIds.contains(commitId)) { result.add(i); matchedIds.add(commitId); } } if (reportNotFound) { Collection<CommitId> unmatchedIds = ContainerUtil.subtract(commitIds, matchedIds); if (!unmatchedIds.isEmpty()) { LOG.warn("Unmatched commit ids " + unmatchedIds); } } for (Int2ObjectMap.Entry<CommitId> entry : myNotLoadCommits.int2ObjectEntrySet()) { CommitId value = entry.getValue(); if (commitIds.contains(value)) { result.add(entry.getIntKey()); } } return result; }
convertToNodeIds
274,322
boolean (@NotNull Collection<? extends CommitId> commitIds) { Set<? extends CommitId> commitsToFind = new HashSet<>(commitIds); for (CommitId commitId : myCommitIdIndexes) { commitsToFind.remove(commitId); if (commitsToFind.isEmpty()) { return true; } } return false; }
containsAll
274,323
int () { return mySimpleNodes.size(); }
nodesCount
274,324
List<GraphEdge> (int nodeIndex, @NotNull EdgeFilter filter) { List<GraphEdge> result = new SmartList<>(); boolean hasUpSimpleEdge = nodeIndex != 0 && mySimpleNodes.get(nodeIndex - 1); if (hasUpSimpleEdge && filter.upNormal) result.add(new GraphEdge(nodeIndex - 1, nodeIndex, null, USUAL)); for (int i = myNodeToEdgeIndex.get(nodeIndex); i < myNodeToEdgeIndex.get(nodeIndex + 1); i++) { int adjacentNode = myLongEdges.get(i); if (adjacentNode < 0 && filter.special) { result.add(GraphEdge.createEdgeWithTargetId(nodeIndex, adjacentNode, GraphEdgeType.NOT_LOAD_COMMIT)); } if (adjacentNode < 0) continue; if (nodeIndex > adjacentNode && filter.upNormal) result.add(new GraphEdge(adjacentNode, nodeIndex, null, USUAL)); if (nodeIndex < adjacentNode && filter.downNormal) result.add(new GraphEdge(nodeIndex, adjacentNode, null, USUAL)); } if (mySimpleNodes.get(nodeIndex) && filter.downNormal) result.add(new GraphEdge(nodeIndex, nodeIndex + 1, null, USUAL)); return result; }
getAdjacentEdges
274,325
GraphNode (int nodeIndex) { return new GraphNode(nodeIndex); }
getGraphNode
274,326
int (int nodeIndex) { assert nodeIndex >= 0 && nodeIndex < nodesCount() : "Bad nodeIndex: " + nodeIndex; return nodeIndex; }
getNodeId
274,327
Integer (int nodeId) { if (nodeId >= 0 && nodeId < nodesCount()) { return nodeId; } return null; }
getNodeIndex
274,328
GraphLayoutImpl (@NotNull LinearGraph graph, @NotNull IntComparator headNodeIndexComparator) { IntList heads = new IntArrayList(); for (int i = 0; i < graph.nodesCount(); i++) { if (getUpNodes(graph, i).isEmpty()) { heads.add(i); } } try { heads.sort(headNodeIndexComparator); } catch (ProcessCanceledException pce) { throw pce; } catch (Exception e) { // protection against possible comparator flaws LOG.error(e); } GraphLayoutBuilder builder = new GraphLayoutBuilder(graph, heads); return builder.build(); }
build
274,329
void (int nodeIndex) { DfsUtilKt.walk(nodeIndex, currentNode -> { boolean firstVisit = myLayoutIndex[currentNode] == 0; if (firstVisit) myLayoutIndex[currentNode] = currentLayoutIndex; int childWithoutLayoutIndex = -1; for (int childNodeIndex : getDownNodes(myGraph, currentNode)) { if (myLayoutIndex[childNodeIndex] == 0) { childWithoutLayoutIndex = childNodeIndex; break; } } if (childWithoutLayoutIndex == -1) { if (firstVisit) currentLayoutIndex++; return Dfs.NextNode.NODE_NOT_FOUND; } else { return childWithoutLayoutIndex; } }); }
dfs
274,330
GraphLayoutImpl () { for (int i = 0; i < myHeadNodeIndex.size(); i++) { int headNodeIndex = myHeadNodeIndex.getInt(i); myStartLayoutIndexForHead[i] = currentLayoutIndex; dfs(headNodeIndex); } return new GraphLayoutImpl(myLayoutIndex, myHeadNodeIndex, myStartLayoutIndexForHead); }
build
274,331
int (int nodeIndex) { return myLayoutIndex.get(nodeIndex); }
getLayoutIndex
274,332
int (int nodeIndex) { return getHeadNodeIndex(getLayoutIndex(nodeIndex)); }
getOneOfHeadNodeIndex
274,333
int (int layoutIndex) { return myHeadNodeIndex.getInt(getHeadOrder(layoutIndex)); }
getHeadNodeIndex
274,334
int (int layoutIndex) { int i = Arrays.binarySearch(myStartLayoutIndexForHead, layoutIndex); return i < 0 ? Math.max(0, -i - 2) : i; }
getHeadOrder
274,335
GraphCommit<CommitId> (int index) { return fixParentsDuplicate(finalCommits.get(index)); }
get
274,336
int () { return finalCommits.size(); }
size
274,337
CommitId () { return myDelegate.getId(); }
getId
274,338
List<CommitId> () { return myParents; }
getParents
274,339
long () { return myDelegate.getTimestamp(); }
getTimestamp
274,340
int (@NotNull GraphElement o1, @NotNull GraphElement o2) { if (o1 instanceof GraphEdge edge1 && o2 instanceof GraphEdge edge2) { NormalEdge normalEdge1 = asNormalEdge(edge1); NormalEdge normalEdge2 = asNormalEdge(edge2); if (normalEdge1 == null) return -compare2(edge2, new GraphNode(getNotNullNodeIndex(edge1))); if (normalEdge2 == null) return compare2(edge1, new GraphNode(getNotNullNodeIndex(edge2))); if (normalEdge1.up == normalEdge2.up) { if (getLayoutIndex(normalEdge1.down) != getLayoutIndex(normalEdge2.down)) { return getLayoutIndex(normalEdge1.down) - getLayoutIndex(normalEdge2.down); } else { return normalEdge1.down - normalEdge2.down; } } if (normalEdge1.up < normalEdge2.up) { return compare2(edge1, new GraphNode(normalEdge2.up)); } else { return -compare2(edge2, new GraphNode(normalEdge1.up)); } } if (o1 instanceof GraphEdge && o2 instanceof GraphNode) return compare2((GraphEdge)o1, (GraphNode)o2); if (o1 instanceof GraphNode && o2 instanceof GraphEdge) return -compare2((GraphEdge)o2, (GraphNode)o1); assert false; // both GraphNode return 0; }
compare
274,341
int (@NotNull GraphEdge edge, @NotNull GraphNode node) { NormalEdge normalEdge = asNormalEdge(edge); if (normalEdge == null) { return getLayoutIndex(getNotNullNodeIndex(edge)) - getLayoutIndex(node.getNodeIndex()); } int upEdgeLI = getLayoutIndex(normalEdge.up); int downEdgeLI = getLayoutIndex(normalEdge.down); int nodeLI = getLayoutIndex(node.getNodeIndex()); if (Math.max(upEdgeLI, downEdgeLI) != nodeLI) { return Math.max(upEdgeLI, downEdgeLI) - nodeLI; } else { return normalEdge.up - node.getNodeIndex(); } }
compare2
274,342
int (int nodeIndex) { return myLayoutIndexGetter.fun(nodeIndex); }
getLayoutIndex
274,343
Set<GraphEdge> (int rowIndex) { GraphEdges neighborU = getNeighborU(rowIndex); while (neighborU.myRow < rowIndex) { neighborU = oneDownStep(neighborU); } GraphEdges neighborD = getNeighborD(rowIndex); while (neighborD.myRow > rowIndex) { neighborD = oneUpStep(neighborD); } Set<GraphEdge> result = neighborU.myEdges; result.addAll(neighborD.myEdges); return result; }
getEdgesInRow
274,344
void () { cacheNU.clear(); cacheND.clear(); }
invalidate
274,345
GraphEdges (int rowIndex) { int upNeighborIndex = getUpNeighborIndex(rowIndex); GraphEdges graphEdges = cacheNU.get(upNeighborIndex); if (graphEdges == null) { graphEdges = getUCorrectEdges(upNeighborIndex); cacheNU.put(upNeighborIndex, graphEdges); } return graphEdges.copyInstance(); }
getNeighborU
274,346
GraphEdges (int rowIndex) { int downNeighborIndex = getUpNeighborIndex(rowIndex) + BLOCK_SIZE; if (downNeighborIndex >= myGraph.nodesCount()) { return new GraphEdges(myGraph.nodesCount() - 1); } GraphEdges graphEdges = cacheND.get(downNeighborIndex); if (graphEdges == null) { graphEdges = getDCorrectEdges(downNeighborIndex); cacheND.put(downNeighborIndex, graphEdges); } return graphEdges.copyInstance(); }
getNeighborD
274,347
int (int rowIndex) { return (rowIndex / BLOCK_SIZE) * BLOCK_SIZE; }
getUpNeighborIndex
274,348
GraphEdges (int rowIndex) { int startCalculateIndex = Math.max(rowIndex - WALK_SIZE, 0); GraphEdges graphEdges = new GraphEdges(startCalculateIndex); for (int i = startCalculateIndex; i < rowIndex; i++) { graphEdges = oneDownStep(graphEdges); } return graphEdges; }
getUCorrectEdges
274,349
GraphEdges (int rowIndex) { int endCalculateIndex = Math.min(rowIndex + WALK_SIZE, myGraph.nodesCount() - 1); GraphEdges graphEdges = new GraphEdges(endCalculateIndex); for (int i = endCalculateIndex; i > rowIndex; i--) { graphEdges = oneUpStep(graphEdges); } return graphEdges; }
getDCorrectEdges
274,350
GraphEdges (@NotNull GraphEdges graphEdges) { Set<GraphEdge> edgesInCurrentRow = graphEdges.myEdges; int currentRow = graphEdges.myRow; edgesInCurrentRow.addAll(createDownEdges(currentRow)); edgesInCurrentRow.removeAll(createUpEdges(currentRow + 1)); return new GraphEdges(edgesInCurrentRow, currentRow + 1); }
oneDownStep
274,351
GraphEdges (@NotNull GraphEdges graphEdges) { Set<GraphEdge> edgesInCurrentRow = graphEdges.myEdges; int currentRow = graphEdges.myRow; edgesInCurrentRow.addAll(createUpEdges(currentRow)); edgesInCurrentRow.removeAll(createDownEdges(currentRow - 1)); return new GraphEdges(edgesInCurrentRow, currentRow - 1); }
oneUpStep
274,352
List<GraphEdge> (int nodeIndex) { return myGraph.getAdjacentEdges(nodeIndex, EdgeFilter.NORMAL_UP); }
createUpEdges
274,353
List<GraphEdge> (int nodeIndex) { return myGraph.getAdjacentEdges(nodeIndex, EdgeFilter.NORMAL_DOWN); }
createDownEdges
274,354
GraphElement () { return myGraphElement; }
getGraphElement
274,355
int () { return myRowIndex; }
getRowIndex
274,356
int () { return myPositionInCurrentRow; }
getPositionInCurrentRow
274,357
int () { return myPresentationManager.getColorId(myGraphElement); }
getColorId
274,358
boolean () { return myPresentationManager.isSelected(this); }
isSelected
274,359
PrintElementWithGraphElement (@NotNull PrintElementWithGraphElement element, @NotNull GraphElement convertedGraphElement) { return new PrintElementWithGraphElement(element.getRowIndex(), element.getPositionInCurrentRow(), convertedGraphElement, element.myPresentationManager) { }; }
converted
274,360
int () { return myPositionInOtherRow; }
getPositionInOtherRow
274,361
Type () { return myType; }
getType
274,362
LineStyle () { return myLineStyle; }
getLineStyle
274,363
boolean () { return myHasArrow; }
hasArrow
274,364
boolean (Object o) { if (this == o) return true; if (!(o instanceof EdgePrintElement that)) return false; if (myPositionInCurrentRow != that.getPositionInCurrentRow()) return false; if (myPositionInOtherRow != that.getPositionInOtherRow()) return false; if (myRowIndex != that.getRowIndex()) return false; if (myType != that.getType()) return false; if (myHasArrow != that.hasArrow()) return false; return true; }
equals
274,365
int () { int result = myRowIndex; result = 31 * result + myPositionInCurrentRow; result = 31 * result + myPositionInOtherRow; result = 37 * result + myType.hashCode(); result = 31 * result + (myHasArrow ? 1 : 0); return result; }
hashCode
274,366
boolean (Object o) { if (this == o) return true; if (!(o instanceof NodePrintElement that)) return false; if (myPositionInCurrentRow != that.getPositionInCurrentRow()) return false; if (myRowIndex != that.getRowIndex()) return false; return true; }
equals
274,367
int () { int result = myRowIndex; result = 31 * result + myPositionInCurrentRow; return result; }
hashCode
274,368
LinearGraph () { return myPermanentGraphInfo.getLinearGraph(); }
getCompiledGraph
274,369
LinearGraphAnswer (@NotNull LinearGraphAction action) { return LinearGraphUtils.DEFAULT_GRAPH_ANSWER; }
performLinearGraphAction
274,370
LinearGraphAnswer (@NotNull LinearGraphAction action) { // filter prohibits any actions on delegate graph for now LinearGraphAnswer answer = performAction(action); if (answer != null) return answer; return LinearGraphUtils.DEFAULT_GRAPH_ANSWER; }
performLinearGraphAction
274,371
GraphElement (@NotNull GraphElement graphElement) { // filter prohibits any actions on delegate graph for now return null; }
convertToDelegate
274,372
LinearGraphAnswer (@NotNull LinearGraphAnswer delegateAnswer) { if (delegateAnswer == LinearGraphUtils.DEFAULT_GRAPH_ANSWER) return delegateAnswer; throw new UnsupportedOperationException(); // todo fix later }
delegateGraphChanged
274,373
LinearGraphAnswer (@NotNull LinearGraphAction action) { return null; }
performAction
274,374
LinearGraph () { return myCollapsedGraph.getCompiledGraph(); }
getCompiledGraph
274,375
CollapsedGraph () { return myCollapsedGraph; }
getCollapsedGraph
274,376
Collection<Node<Integer>> () { return Collections.emptyList(); }
getChangedNodes
274,377
Collection<Edge<Integer>> () { return Collections.emptyList(); }
getChangedEdges
274,378
EdgeImpl<Integer> (@NotNull GraphEdge edge, @NotNull LinearGraph graph, boolean removed) { Integer up = null; Integer down = null; if (edge.getUpNodeIndex() != null) { up = graph.getNodeId(edge.getUpNodeIndex()); } if (edge.getDownNodeIndex() != null) { down = graph.getNodeId(edge.getDownNodeIndex()); } return new EdgeImpl<>(up, down, edge.getTargetId(), removed); }
edgeChanged
274,379
GraphChanges<Integer> (Collection<GraphEdge> removedEdges, Collection<GraphEdge> addedEdges, LinearGraph delegateGraph) { final Set<GraphChanges.Edge<Integer>> edgeChanges = new HashSet<>(); for (GraphEdge edge : removedEdges) { edgeChanges.add(edgeChanged(edge, delegateGraph, true)); } for (GraphEdge edge : addedEdges) { edgeChanges.add(edgeChanged(edge, delegateGraph, false)); } return new GraphChanges.GraphChangesImpl<>(Collections.emptySet(), edgeChanges); }
edgesReplaced
274,380
LinearGraphAnswer (@NotNull LinearGraphAction action) { LinearGraphAnswer answer = performAction(action); if (answer != null) { return answer; } VisibleGraphImpl.LinearGraphActionImpl delegateAction = new VisibleGraphImpl.LinearGraphActionImpl(convertToDelegate(action.getAffectedElement()), action.getType()); return delegateGraphChanged(myDelegateController.performLinearGraphAction(delegateAction)); }
performLinearGraphAction
274,381
PrintElementWithGraphElement (@Nullable PrintElementWithGraphElement element) { if (element == null) return null; GraphElement convertedGraphElement = convertToDelegate(element.getGraphElement()); if (convertedGraphElement == null) return null; return PrintElementWithGraphElement.converted(element, convertedGraphElement); }
convertToDelegate
274,382
GraphElement (@NotNull GraphElement graphElement) { return graphElement; }
convertToDelegate
274,383
LinearGraphController () { return myDelegateController; }
getDelegateController
274,384
LinearGraphController (@NotNull SortType sortType) { if (sortType == SortType.Normal) { return new BaseController(this); } else if (sortType == SortType.LinearBek) { return new LinearBekController(new BekBaseController(this, myBekIntMap.get()), this); } return new BekBaseController(this, myBekIntMap.get()); }
createBaseController
274,385
LinearGraphController (@NotNull LinearGraphController baseController, @NotNull SortType sortType, @Nullable Set<? extends CommitId> visibleHeads, @Nullable Set<? extends CommitId> matchingCommits) { Set<Integer> visibleHeadsIds = visibleHeads != null ? myPermanentCommitsInfo.convertToNodeIds(visibleHeads, true) : null; if (matchingCommits != null) { return new FilteredController(baseController, this, myPermanentCommitsInfo.convertToNodeIds(matchingCommits), visibleHeadsIds); } if (sortType == SortType.LinearBek) { if (visibleHeadsIds != null) { return new BranchFilterController(baseController, this, visibleHeadsIds); } return baseController; } return new CollapsedController(baseController, this, visibleHeadsIds); }
createFilteredController
274,386
VisibleGraph<CommitId> (@NotNull SortType sortType, @Nullable Set<? extends CommitId> visibleHeads, @Nullable Set<? extends CommitId> matchingCommits, @NotNull BiConsumer<? super LinearGraphController, ? super PermanentGraphInfo<CommitId>> preprocessor) { LinearGraphController controller = createFilteredController(createBaseController(sortType), sortType, visibleHeads, matchingCommits); preprocessor.accept(controller, this); return new VisibleGraphImpl<>(controller, this, myGraphColorGetter); }
createVisibleGraph
274,387
VisibleGraph<CommitId> (@NotNull SortType sortType, @Nullable Set<? extends CommitId> visibleHeads, @Nullable Set<? extends CommitId> matchingCommits) { return createVisibleGraph(sortType, visibleHeads, matchingCommits, (controller, info) -> { }); }
createVisibleGraph
274,388
List<GraphCommit<CommitId>> () { return new AbstractList<>() { @Override public GraphCommit<CommitId> get(int index) { CommitId commitId = myPermanentCommitsInfo.getCommitId(index); List<Integer> downNodes = LinearGraphUtils.getDownNodesIncludeNotLoad(myPermanentLinearGraph, index); List<CommitId> parentsCommitIds = myPermanentCommitsInfo.convertToCommitIdList(downNodes); return GraphCommitImpl.createCommit(commitId, parentsCommitIds, myPermanentCommitsInfo.getTimestamp(index)); } @Override public int size() { return myPermanentLinearGraph.nodesCount(); } }; }
getAllCommits
274,389
GraphCommit<CommitId> (int index) { CommitId commitId = myPermanentCommitsInfo.getCommitId(index); List<Integer> downNodes = LinearGraphUtils.getDownNodesIncludeNotLoad(myPermanentLinearGraph, index); List<CommitId> parentsCommitIds = myPermanentCommitsInfo.convertToCommitIdList(downNodes); return GraphCommitImpl.createCommit(commitId, parentsCommitIds, myPermanentCommitsInfo.getTimestamp(index)); }
get
274,390
int () { return myPermanentLinearGraph.nodesCount(); }
size
274,391
List<CommitId> (@NotNull CommitId commit) { int commitIndex = myPermanentCommitsInfo.getNodeId(commit); return myPermanentCommitsInfo.convertToCommitIdList(LinearGraphUtils.getUpNodes(myPermanentLinearGraph, commitIndex)); }
getChildren
274,392
Set<CommitId> (@NotNull CommitId commit) { int commitIndex = myPermanentCommitsInfo.getNodeId(commit); return myPermanentCommitsInfo.convertToCommitIdSet(myReachableNodes.getContainingBranches(commitIndex, myBranchNodeIds)); }
getContainingBranches
274,393
Predicate<CommitId> (@NotNull final Collection<? extends CommitId> heads) { List<Integer> headIds = ContainerUtil.map(heads, head -> myPermanentCommitsInfo.getNodeId(head)); if (!heads.isEmpty() && ContainerUtil.getFirstItem(heads) instanceof Integer) { IntSet branchNodes = new IntOpenHashSet(); myReachableNodes.walkDown(headIds, node -> branchNodes.add(((Integer)myPermanentCommitsInfo.getCommitId(node)).intValue())); return new IntContainedInBranchCondition<>(branchNodes); } else { final Set<CommitId> branchNodes = new HashSet<>(); myReachableNodes.walkDown(headIds, node -> branchNodes.add(myPermanentCommitsInfo.getCommitId(node))); return new ContainedInBranchCondition<>(branchNodes); } }
getContainedInBranchCondition
274,394
PermanentCommitsInfoImpl<CommitId> () { return myPermanentCommitsInfo; }
getPermanentCommitsInfo
274,395
PermanentLinearGraphImpl () { return myPermanentLinearGraph; }
getLinearGraph
274,396
GraphLayoutImpl () { return myPermanentGraphLayout; }
getPermanentGraphLayout
274,397
Set<Integer> () { return myBranchNodeIds; }
getBranchNodeIds
274,398
Integer (CommitId dom) { int nodeId = -(myNotLoadedCommits.size() + 2); myNotLoadedCommits.put(nodeId, dom); return nodeId; }
fun
274,399
Int2ObjectMap<CommitId> () { return myNotLoadedCommits; }
getNotLoadedCommits