Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
288,600 | long () { return myOldLength; } | getOldLength |
288,601 | long () { return myNewLength; } | getNewLength |
288,602 | boolean () { return myOldTimestamp != UNDEFINED_TIMESTAMP_OR_LENGTH || myNewTimestamp != UNDEFINED_TIMESTAMP_OR_LENGTH || myOldLength != UNDEFINED_TIMESTAMP_OR_LENGTH || myNewLength != UNDEFINED_TIMESTAMP_OR_LENGTH; } | isLengthAndTimestampDiffProvided |
288,603 | String () { return "VfsEvent[update: " + myFile.getPresentableUrl() + ", oldTimestamp:" + myOldTimestamp + ", newTimestamp:" + myNewTimestamp + ", oldModificationStamp:" + myOldModificationStamp + ", newModificationStamp:" + myNewModificationStamp + ", oldLength:" + myOldLength + ", newLength:" + myNewLength + "]"; } | toString |
288,604 | String () { return myFile.getPath(); } | computePath |
288,605 | VirtualFileSystem () { return myFile.getFileSystem(); } | getFileSystem |
288,606 | boolean () { return myFile.isValid() && myFile.getModificationStamp() == myOldModificationStamp; } | isValid |
288,607 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final VFileContentChangeEvent event = (VFileContentChangeEvent)o; if (myNewModificationStamp != event.myNewModificationStamp) return false; if (myOldModificationStamp != event.myOldModificationStamp) return false; if (!myFile.equals(event.myFile)) return false; return true; } | equals |
288,608 | int () { int result = myFile.hashCode(); result = 31 * result + (int)(myOldModificationStamp ^ (myOldModificationStamp >>> 32)); result = 31 * result + (int)(myNewModificationStamp ^ (myNewModificationStamp >>> 32)); return result; } | hashCode |
288,609 | VirtualFile () { return myFile; } | getFile |
288,610 | VirtualFile () { return myNewParent; } | getNewParent |
288,611 | String () { return myNewChildName; } | getNewChildName |
288,612 | String () { return "VfsEvent[copy " + myFile +" to " + myNewParent + " as " + myNewChildName +"]"; } | toString |
288,613 | String () { return myNewParent.getPath() + "/" + myNewChildName; } | computePath |
288,614 | VirtualFileSystem () { return myFile.getFileSystem(); } | getFileSystem |
288,615 | boolean () { return myFile.isValid() && myNewParent.findChild(myNewChildName) == null; } | isValid |
288,616 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final VFileCopyEvent event = (VFileCopyEvent)o; if (!myFile.equals(event.myFile)) return false; if (!myNewChildName.equals(event.myNewChildName)) return false; if (!myNewParent.equals(event.myNewParent)) return false; return true; } | equals |
288,617 | int () { int result = myFile.hashCode(); result = 31 * result + myNewParent.hashCode(); result = 31 * result + myNewChildName.hashCode(); return result; } | hashCode |
288,618 | VirtualFile () { return myFile; } | getFile |
288,619 | String () { return "VfsEvent[deleted: " + myFile.getUrl() + "]"; } | toString |
288,620 | String () { return myFile.getPath(); } | computePath |
288,621 | VirtualFileSystem () { return myFile.getFileSystem(); } | getFileSystem |
288,622 | boolean () { return myFile.isValid(); } | isValid |
288,623 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final VFileDeleteEvent event = (VFileDeleteEvent)o; return myFile.equals(event.myFile); } | equals |
288,624 | int () { return myFile.hashCode(); } | hashCode |
288,625 | boolean () { return myRequestor == REFRESH_REQUESTOR; } | isFromRefresh |
288,626 | boolean () { return myRequestor instanceof SavingRequestor; } | isFromSave |
288,627 | Object () { return myRequestor; } | getRequestor |
288,628 | String () { String path = myCachedPath; if (path == null) { myCachedPath = path = computePath(); } return path; } | getPath |
288,629 | void (Object requestor, @VirtualFile.PropName @NotNull String propertyName, Object oldValue, Object newValue) { if (Comparing.equal(oldValue, newValue) && FileContentUtilCore.FORCE_RELOAD_REQUESTOR != requestor) { throw new IllegalArgumentException("Values must be different, got the same: " + oldValue); } switch (propertyName) { case VirtualFile.PROP_NAME: if (oldValue == null) throw new IllegalArgumentException("oldName must not be null"); if (!(oldValue instanceof String)) throw new IllegalArgumentException("oldName must be String, got " + oldValue); if (newValue == null) throw new IllegalArgumentException("newName must not be null"); if (!(newValue instanceof String)) throw new IllegalArgumentException("newName must be String, got " + newValue); break; case VirtualFile.PROP_ENCODING: if (oldValue == null) throw new IllegalArgumentException("oldCharset must not be null"); if (!(oldValue instanceof Charset)) throw new IllegalArgumentException("oldValue must be Charset, got "+oldValue); break; case VirtualFile.PROP_WRITABLE: if (!(oldValue instanceof Boolean)) throw new IllegalArgumentException("oldWriteable must be boolean, got " + oldValue); if (!(newValue instanceof Boolean)) throw new IllegalArgumentException("newWriteable must be boolean, got " + newValue); break; case VirtualFile.PROP_HIDDEN: if (!(oldValue instanceof Boolean)) throw new IllegalArgumentException("oldHidden must be boolean, got " + oldValue); if (!(newValue instanceof Boolean)) throw new IllegalArgumentException("newHidden must be boolean, got " + newValue); break; case VirtualFile.PROP_SYMLINK_TARGET: if (oldValue != null && !(oldValue instanceof String)) { throw new IllegalArgumentException("oldSymTarget must be String, got " + oldValue); } if (newValue != null && !(newValue instanceof String)) { throw new IllegalArgumentException("newSymTarget must be String, got " + newValue); } break; case VirtualFile.PROP_CHILDREN_CASE_SENSITIVITY: if (!(oldValue instanceof FileAttributes.CaseSensitivity)) { throw new IllegalArgumentException("oldValue must be FileAttributes.CaseSensitivity but got " + oldValue); } if (!(newValue instanceof FileAttributes.CaseSensitivity)) { throw new IllegalArgumentException("newValue must be FileAttributes.CaseSensitivity but got " + newValue); } if (oldValue.equals(newValue)) { throw new IllegalArgumentException("newValue must be different from the oldValue but got " + newValue); } break; default: throw new IllegalArgumentException( "Unknown property name '" + propertyName + "'. " + "Must be one of VirtualFile.{PROP_NAME|PROP_ENCODING|PROP_WRITABLE|PROP_HIDDEN|PROP_SYMLINK_TARGET}"); } } | checkPropertyValuesCorrect |
288,630 | boolean () { return VirtualFile.PROP_NAME.equals(myPropertyName) && getRequestor() != FileContentUtilCore.FORCE_RELOAD_REQUESTOR; } | isRename |
288,631 | VirtualFile () { return myFile; } | getFile |
288,632 | Object () { return myNewValue; } | getNewValue |
288,633 | Object () { return myOldValue; } | getOldValue |
288,634 | String () { return myPropertyName; } | getPropertyName |
288,635 | String () { return computePath(); } | getPath |
288,636 | String () { return myFile.getPath(); } | computePath |
288,637 | VirtualFileSystem () { return myFile.getFileSystem(); } | getFileSystem |
288,638 | boolean () { return myFile.isValid(); } | isValid |
288,639 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; VFilePropertyChangeEvent event = (VFilePropertyChangeEvent)o; if (!myFile.equals(event.myFile)) return false; if (!Objects.equals(myNewValue, event.myNewValue)) return false; if (!Objects.equals(myOldValue, event.myOldValue)) return false; if (!myPropertyName.equals(event.myPropertyName)) return false; return true; } | equals |
288,640 | int () { int result = myFile.hashCode(); result = 31 * result + myPropertyName.hashCode(); result = 31 * result + (myOldValue != null ? myOldValue.hashCode() : 0); result = 31 * result + (myNewValue != null ? myNewValue.hashCode() : 0); return result; } | hashCode |
288,641 | String () { return "VfsEvent[property(" + myPropertyName + ") changed for '" + myFile + "': " + myOldValue + " -> " + myNewValue + ']'; } | toString |
288,642 | String () { return getPathWithFileName(myOldValue); } | getOldPath |
288,643 | String () { return getPathWithFileName(myNewValue); } | getNewPath |
288,644 | String (Object fileName) { if (VirtualFile.PROP_NAME.equals(myPropertyName)) { // fileName must be String, according to `checkPropertyValuesCorrect` implementation VirtualFile parent = myFile.getParent(); if (parent == null) { return (String)fileName; } return parent.getPath() + "/" + fileName; } return getPath(); } | getPathWithFileName |
288,645 | VirtualFile () { return myFile; } | getFile |
288,646 | VirtualFile () { return myNewParent; } | getNewParent |
288,647 | VirtualFile () { return myOldParent; } | getOldParent |
288,648 | String () { return "VfsEvent[move " + myFile.getName() +" from " + myOldParent + " to " + myNewParent + "]"; } | toString |
288,649 | String () { return computePath(); } | getPath |
288,650 | String () { return myFile.getPath(); } | computePath |
288,651 | VirtualFileSystem () { return myFile.getFileSystem(); } | getFileSystem |
288,652 | boolean () { return myFile.isValid() && Comparing.equal(myFile.getParent(), myOldParent) && myOldParent.isValid(); } | isValid |
288,653 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final VFileMoveEvent event = (VFileMoveEvent)o; if (!myFile.equals(event.myFile)) return false; if (!myNewParent.equals(event.myNewParent)) return false; if (!myOldParent.equals(event.myOldParent)) return false; return true; } | equals |
288,654 | int () { int result = myFile.hashCode(); result = 31 * result + myOldParent.hashCode(); result = 31 * result + myNewParent.hashCode(); return result; } | hashCode |
288,655 | String () { return myOldParent.getPath() + "/" + myFile.getName(); } | getOldPath |
288,656 | String () { return myNewParent.getPath() + "/" + myFile.getName(); } | getNewPath |
288,657 | VirtualFilePointerManager () { return ApplicationManager.getApplication().getService(VirtualFilePointerManager.class); } | getInstance |
288,658 | void () { super.clearCaches(); removeTempCopy(); } | clearCaches |
288,659 | void () { FileUtil.delete(getTempFile()); } | removeTempCopy |
288,660 | File () { File file = getFile(); String hash = Integer.toHexString(file.getPath().hashCode()); return new File(PathManager.getSystemPath() + '/' + getTempDir() + '/' + file.getName() + '_' + hash); } | getTempFile |
288,661 | void (final @NotNull List<? extends @NotNull VFileEvent> events) { for (VFileEvent event : events) { if (myFileSystem == null || myFileSystem == event.getFileSystem()) { fireBefore(myAdapted, event); } } } | before |
288,662 | void (final @NotNull List<? extends @NotNull VFileEvent> events) { for (VFileEvent event : events) { if (myFileSystem == null || myFileSystem == event.getFileSystem()) { fireAfter(myAdapted, event); } } } | after |
288,663 | void (@NotNull VirtualFileListener adapted, @NotNull VFileEvent event) { if (event instanceof VFileContentChangeEvent) { final VFileContentChangeEvent ce = (VFileContentChangeEvent)event; final VirtualFile file = ce.getFile(); adapted.contentsChanged( new VirtualFileEvent(event.getRequestor(), file, file.getParent(), ce.getOldModificationStamp(), ce.getModificationStamp())); } else if (event instanceof VFileCopyEvent) { final VFileCopyEvent ce = (VFileCopyEvent)event; final VirtualFile original = ce.getFile(); final VirtualFile copy = ce.getNewParent().findChild(ce.getNewChildName()); if (copy != null) { adapted.fileCopied(new VirtualFileCopyEvent(event.getRequestor(), original, copy)); } } else if (event instanceof VFileCreateEvent) { final VFileCreateEvent ce = (VFileCreateEvent)event; final VirtualFile newChild = ce.getFile(); if (newChild != null) { adapted.fileCreated(new VirtualFileEvent(event.getRequestor(), newChild, ce.getParent(), 0, 0)); } } else if (event instanceof VFileDeleteEvent) { final VFileDeleteEvent de = (VFileDeleteEvent)event; adapted.fileDeleted(new VirtualFileEvent(event.getRequestor(), de.getFile(), de.getFile().getParent(), 0, 0)); } else if (event instanceof VFileMoveEvent) { final VFileMoveEvent me = (VFileMoveEvent)event; adapted.fileMoved(new VirtualFileMoveEvent(event.getRequestor(), me.getFile(), me.getOldParent(), me.getNewParent())); } else if (event instanceof VFilePropertyChangeEvent) { final VFilePropertyChangeEvent pce = (VFilePropertyChangeEvent)event; adapted.propertyChanged( new VirtualFilePropertyEvent(event.getRequestor(), pce.getFile(), pce.getPropertyName(), pce.getOldValue(), pce.getNewValue())); } } | fireAfter |
288,664 | void (@NotNull VirtualFileListener adapted, @NotNull VFileEvent event) { if (event instanceof VFileContentChangeEvent) { final VFileContentChangeEvent ce = (VFileContentChangeEvent)event; final VirtualFile file = ce.getFile(); adapted.beforeContentsChange( new VirtualFileEvent(event.getRequestor(), file, file.getParent(), ce.getOldModificationStamp(), ce.getModificationStamp())); } else if (event instanceof VFileDeleteEvent) { final VFileDeleteEvent de = (VFileDeleteEvent)event; adapted.beforeFileDeletion(new VirtualFileEvent(event.getRequestor(), de.getFile(), de.getFile().getParent(), 0, 0)); } else if (event instanceof VFileMoveEvent) { final VFileMoveEvent me = (VFileMoveEvent)event; adapted.beforeFileMovement(new VirtualFileMoveEvent(event.getRequestor(), me.getFile(), me.getOldParent(), me.getNewParent())); } else if (event instanceof VFilePropertyChangeEvent) { final VFilePropertyChangeEvent pce = (VFilePropertyChangeEvent)event; adapted.beforePropertyChange( new VirtualFilePropertyEvent(event.getRequestor(), pce.getFile(), pce.getPropertyName(), pce.getOldValue(), pce.getNewValue())); } } | fireBefore |
288,665 | File () { return myPath; } | getFile |
288,666 | void (@NotNull File path) { synchronized (myLock) { assert myEntries.get() == null && myChildrenEntries.get() == null && !myCorrupted : "Archive already opened"; myPath = path; } } | setFile |
288,667 | void () { synchronized (myLock) { myEntries.clear(); myChildrenEntries.clear(); myCorrupted = false; } } | clearCaches |
288,668 | EntryInfo () { return new EntryInfo("", true, DEFAULT_LENGTH, DEFAULT_TIMESTAMP, null); } | createRootEntry |
288,669 | void (@NotNull Map<String, EntryInfo> map, @NotNull String entryName, @Nullable BiFunction<@NotNull EntryInfo, @NotNull String, ? extends @NotNull EntryInfo> entryFun) { processEntry(map, null, entryName, entryFun); } | processEntry |
288,670 | String (@NotNull String entryName) { return StringUtil.trimTrailing(StringUtil.trimLeading(FileUtil.normalize(entryName), '/'), '/'); } | normalizeName |
288,671 | EntryInfo (Map<String, EntryInfo> map, @Nullable Logger logger, String normalizedName) { EntryInfo entry = map.get(normalizedName); if (entry == null || !entry.isDirectory) { if (logger != null && entry != null) logger.trace("duplicate entry: " + getFile() + "!/" + normalizedName); if (normalizedName.isEmpty()) { entry = createRootEntry(); } else { Pair<String, String> path = split(normalizedName); EntryInfo parent = directoryEntry(map, logger, path.first); entry = new EntryInfo(path.second, true, DEFAULT_LENGTH, DEFAULT_TIMESTAMP, parent); } map.put(normalizedName, entry); } return entry; } | directoryEntry |
288,672 | int (EntryInfo info) { return System.identityHashCode(info); } | hash |
288,673 | EntryInfo (Object o) { if (o instanceof EntryInfo) return ((EntryInfo)o).parent; return ((EntryInfo[])o)[0].parent; } | key |
288,674 | int () { return size; } | size |
288,675 | void (V item) { if (size >= (4 * entries.length) / 5) rehash(); V v = doPut(entries, item); if (v == null) size++; } | add |
288,676 | V (Object[] a, V o) { K key = keyValueMapper.key(o); int index = hashIndex(a, key); V obj = (V)a[index]; a[index] = o; return obj; } | doPut |
288,677 | int (Object[] a, K key) { int hash = keyValueMapper.hash(key) & 0x7fffffff; int index = hash % a.length; V candidate = (V)a[index]; if (candidate == null || keyValueMapper.valueHasKey(candidate, key)) { return index; } final int probe = 1 + (hash % (a.length - 2)); do { index -= probe; if (index < 0) index += a.length; candidate = (V)a[index]; } while (candidate != null && !keyValueMapper.valueHasKey(candidate, key)); return index; } | hashIndex |
288,678 | void () { Object[] b = new Object[PrimeFinder.nextPrime(entries.length * 2)]; for (int i = entries.length; --i >= 0; ) { V ns = (V)entries[i]; if (ns != null) doPut(b, ns); } entries = b; } | rehash |
288,679 | V (K key) { return (V)entries[hashIndex(entries, key)]; } | get |
288,680 | boolean (V value, K key) { return key == key(value); // identity } | valueHasKey |
288,681 | boolean () { return true; } | isIdentity |
288,682 | int (int desiredCapacity) { int i = Arrays.binarySearch(primeCapacities, desiredCapacity); if (i<0) { // desired capacity not found, choose next prime greater // than desired capacity i = -i -1; // remember the semantics of binarySearch... } return primeCapacities[i]; } | nextPrime |
288,683 | RangeMarker () { return myGuardedBlock; } | getGuardedBlock |
288,684 | DocumentEvent () { return myIllegalAttemptEvent; } | getIllegalAttemptEvent |
288,685 | boolean (int line) { return getTrailingSpacesToLeave(line) >= 0; } | isStripSpacesAllowedForLine |
288,686 | FoldingGroup (@NonNls String debugName) { return new FoldingGroup(debugName); } | newGroup |
288,687 | long () { return myId; } | getId |
288,688 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FoldingGroup group = (FoldingGroup)o; if (myId != group.myId) return false; return true; } | equals |
288,689 | int () { return (int)(myId ^ (myId >>> 32)); } | hashCode |
288,690 | String () { return myDebugName; } | toString |
288,691 | Document () { return myDocument; } | getDocument |
288,692 | Project () { return myProject; } | getProject |
288,693 | boolean (int line) { return false; } | isStripSpacesAllowedForLine |
288,694 | boolean (int line) { return false; } | isStripSpacesAllowedForLine |
288,695 | boolean (int line) { return true; } | isStripSpacesAllowedForLine |
288,696 | boolean (int line) { return true; } | isStripSpacesAllowedForLine |
288,697 | Document () { return myDocument; } | getDocument |
288,698 | int (Object o1, Object o2) { return Integer.compare(getPriority(o1), getPriority(o2)); } | compare |
288,699 | int (@NotNull Object o) { if (o instanceof PrioritizedDocumentListener) { return ((PrioritizedDocumentListener)o).getPriority(); } return Integer.MAX_VALUE; } | getPriority |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.