Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
293,100
boolean (PsiElement match, @NotNull MatchContext context) { return handle(match, 0, -1, context); }
handle
293,101
boolean (PsiElement match, int start, int end, @NotNull MatchContext context) { if (!validate(match, start, end, context)) { myNestedResult = null; return false; } if (!Configuration.CONTEXT_VAR_NAME.equals(name)) { addResult(match, start, end, context); } return true; }
handle
293,102
MatchResultImpl (@NotNull PsiElement match, int start, int end) { final StructuralSearchProfile profile = StructuralSearchUtil.getProfileByPsiElement(match); assert profile != null; final String image = profile.getText(match, start, end); if (myNestedResult == null) { return new MatchResultImpl(name, image, match, star...
createMatch
293,103
boolean (@NotNull MatchContext context, int matchedOccurs) { if (target) return matchedOccurs > 0; if (minOccurs > matchedOccurs) return false; if (maxOccurs < matchedOccurs) return false; return true; }
validate
293,104
int () { return minOccurs; }
getMinOccurs
293,105
int () { return maxOccurs; }
getMaxOccurs
293,106
void (int numberOfResults, @NotNull MatchContext context) { if (numberOfResults == 0) return; final MatchResultImpl substitution = context.getResult().getChild(name); if (substitution != null) { if (substitution.hasChildren()) { while (numberOfResults > 0) { --numberOfResults; final MatchResult matchResult = substituti...
removeLastResults
293,107
boolean (@NotNull NodeIterator patternNodes, @NotNull NodeIterator matchNodes, @NotNull MatchContext context) { return doMatchSequentially(patternNodes, matchNodes, context); }
matchSequentially
293,108
boolean (NodeIterator patternNodes, NodeIterator matchNodes, @NotNull MatchContext context) { final boolean oldValue = context.shouldRecursivelyMatch(); context.setShouldRecursivelyMatch(false); final boolean result = super.matchSequentially(patternNodes, matchNodes, context); context.setShouldRecursivelyMatch(oldValue...
doMatchSequentiallyBySimpleHandler
293,109
boolean (@NotNull NodeIterator patternNodes, @NotNull NodeIterator matchNodes, @NotNull MatchContext context) { final int previousMatchedOccurs = matchedOccurs; final FilteringNodeIterator fNodes = new FilteringNodeIterator(matchNodes, VARS_DELIM_FILTER); try { final CompiledPattern pattern = context.getPattern(); fina...
doMatchSequentially
293,110
boolean (@NotNull MatchContext context) { if (totalMatchedOccurs == -1) { totalMatchedOccurs = matchedOccurs; return true; } MatchResult result = context.hasResult() ? context.getResult().getChild(name) : null; if (result == null && context.getPreviousResult() != null) { result = context.getPreviousResult().getChild(na...
checkSameOccurrencesConstraint
293,111
void (boolean target) { this.target = target; }
setTarget
293,112
void (@NotNull MatchingHandler matchHandler) { this.matchHandler = matchHandler; }
setMatchHandler
293,113
boolean () { return target; }
isTarget
293,114
String () { return name; }
getName
293,115
void () { super.reset(); totalMatchedOccurs = -1; }
reset
293,116
boolean (@NotNull PsiElement patternElement, @NotNull PsiElement matchedElement) { return maxOccurs <= 1 && !target; }
shouldAdvanceThePatternFor
293,117
void (MatchResultImpl nestedResult) { myNestedResult = nestedResult; }
setNestedResult
293,118
MatchResultImpl () { return myNestedResult; }
getNestedResult
293,119
boolean (PsiElement patternNode, PsiElement matchedNode, final @NotNull MatchContext matchContext) { if (patternNode == null || matchedNode == null || matchedNode.getClass() == patternNode.getClass()) { return myDelegate.match(patternNode, matchedNode, matchContext); } /*if (patternNode != null && matchedNode != null &...
match
293,120
boolean (@NotNull PsiElement patternNode, PsiElement matchedNode, @NotNull MatchContext context) { final PsiElement newPatternNode = skipNodeIfNecessary(patternNode); if (newPatternNode != patternNode) { return context.getPattern().getHandler(newPatternNode).canMatch(newPatternNode, matchedNode, context); } return myDe...
canMatch
293,121
boolean (final @NotNull NodeIterator patternNodes, final @NotNull NodeIterator matchNodes, final @NotNull MatchContext context) { return myDelegate.matchSequentially(patternNodes, matchNodes, context); }
matchSequentially
293,122
boolean (final @NotNull NodeIterator matchNodes) { return myDelegate.isMatchSequentiallySucceeded(matchNodes); }
isMatchSequentiallySucceeded
293,123
MatchingHandler () { return myDelegate; }
getDelegate
293,124
PsiElement (PsiElement element) { PsiElement onlyChild = null; for (PsiElement child = element.getFirstChild(); child != null; child = child.getNextSibling()) { if (DuplocatorUtil.isIgnoredNode(element) || child.getTextLength() == 0) { continue; } if (onlyChild != null) { return null; } onlyChild = child; } return only...
getOnlyNonWhitespaceChild
293,125
PsiElement (PsiElement element) { return skipNodeIfNecessary(element, null, null); }
skipNodeIfNecessary
293,126
PsiElement (PsiElement element, EquivalenceDescriptor descriptor, NodeFilter filter) { return DuplocatorUtil.skipNodeIfNecessary(element, descriptor, filter != null ? filter : LexicalNodesFilter.getInstance()); }
skipNodeIfNecessary
293,127
boolean (PsiElement patternNode, PsiElement matchedNode, @NotNull MatchContext context) { return match(matchedNode, matchedNode.getText(), 0, context); }
match
293,128
boolean (@NotNull PsiElement matchedNode, @NotNull String text, int textOffset, @NotNull MatchContext context) { if (myMatcher == null) { myMatcher = Pattern.compile(myRegexp, (myCaseSensitive ? 0 : Pattern.CASE_INSENSITIVE) | Pattern.DOTALL).matcher(text); } else { myMatcher.reset(text); } if (!myMatcher.matches()) { ...
match
293,129
boolean (PsiElement patternNode, PsiElement matchedNode, @NotNull MatchContext context) { return handler.handle(matchedNode, context); }
match
293,130
boolean (PsiElement patternNode, PsiElement matchedNode, @NotNull MatchContext context) { if (!super.match(patternNode, matchedNode, context)) return false; return context.getMatcher().match(patternNode, matchedNode); }
match
293,131
boolean (@NotNull PsiElement matchedNode, @NotNull MatchContext context) { return match(matchedNode, 0, -1, context); }
match
293,132
boolean (@NotNull PsiElement matchedNode, int start, int end, @NotNull MatchContext context) { final List<MatchResult> results = matcher.matchByDownUp(matchedNode); for (MatchResult result : results) { if (PsiTreeUtil.isAncestor(result.getMatch(), matchedNode, false)) { return true; } } return false; }
match
293,133
Object (MatchResult result, PsiElement context) { try { Map<String, Object> variableMap = new HashMap<>(); myVariableNames.forEach(n -> variableMap.put(n, null)); variableMap.put(ScriptLog.SCRIPT_LOG_VAR_NAME, myScriptLog); if (result != null) { buildVariableMap(result.getRoot(), variableMap); if (context == null) { co...
evaluate
293,134
boolean (@NotNull PsiElement matchedNode, int start, int end, @NotNull MatchContext context) { return first.match(matchedNode, start, end, context) && second.match(matchedNode, start, end, context); }
match
293,135
MatchPredicate () { return first; }
getFirst
293,136
MatchPredicate () { return second; }
getSecond
293,137
boolean (@NotNull PsiElement matchedNode, int start, int end, @NotNull MatchContext context) { return !myPredicate.match(matchedNode, start, end, context); }
match
293,138
MatchPredicate () { return myPredicate; }
getPredicate
293,139
boolean (@NotNull PsiElement match, int start, int end, @NotNull MatchContext context) { return Boolean.TRUE.equals(scriptSupport.evaluate(context.hasResult() ? context.getResult() : null, match)); }
match
293,140
boolean (@NotNull PsiElement matchedNode, int start, int end, @NotNull MatchContext context) { matchedNode = StructuralSearchUtil.getParentIfIdentifier(matchedNode); final List<PsiReference> references = PsiReferenceService.getService().getReferences(matchedNode, PsiReferenceService.Hints.NO_HINTS); return references.s...
match
293,141
boolean (@NotNull PsiElement match, int start, int end, @NotNull MatchContext context) { return false; }
match
293,142
void () { try { @NonNls String realRegexp = regexp; if (wholeWords) { realRegexp = ".*?\\b(?:" + realRegexp + ")\\b.*?"; } pattern = Pattern.compile(realRegexp, (caseSensitive ? 0 : Pattern.CASE_INSENSITIVE) | (multiline ? Pattern.DOTALL : 0)); } catch (PatternSyntaxException ex) { throw new MalformedPatternException(S...
compilePattern
293,143
boolean () { return couldBeOptimized; }
couldBeOptimized
293,144
String () { return regexp; }
getRegExp
293,145
boolean (@NotNull PsiElement matchedNode, int start, int end, @NotNull MatchContext context) { final String text = myNodeTextGenerator != null ? myNodeTextGenerator.getText(matchedNode) : StructuralSearchUtil.getMeaningfulText(matchedNode); boolean result = doMatch(text, start, end, context, matchedNode); if (!result) ...
match
293,146
boolean (@NotNull String text, @NotNull MatchContext context, @NotNull PsiElement matchedElement) { return doMatch(text, 0, -1 ,context, matchedElement); }
doMatch
293,147
boolean (@NotNull String text, int from, int end, @NotNull MatchContext context, @NotNull PsiElement matchedElement) { if (from > 0 || end != -1) text = text.substring(from, (end == -1 || end >= text.length()) ? text.length() : end); if (simpleString) return matchesSimpleString(text); setMultilineIfApplicable(text); fi...
doMatch
293,148
boolean (@NotNull String text) { if (simpleString) return matchesSimpleString(text); setMultilineIfApplicable(text); return pattern.matcher(text).matches(); }
match
293,149
boolean (@NotNull String text) { return caseSensitive ? text.equals(regexp) : text.equalsIgnoreCase(regexp); }
matchesSimpleString
293,150
void (@NotNull String text) { if(!multiline && text.contains("\n")) setMultiline(true); }
setMultilineIfApplicable
293,151
void (NodeTextGenerator nodeTextGenerator) { myNodeTextGenerator = nodeTextGenerator; }
setNodeTextGenerator
293,152
void (boolean b) { multiline = b; compilePattern(); }
setMultiline
293,153
boolean () { return wholeWords; }
isWholeWords
293,154
void (Object message) { log(message, NotificationType.INFORMATION); }
info
293,155
void (Object message) { log(message, NotificationType.WARNING); }
warn
293,156
void (Object message) { log(message, NotificationType.ERROR); }
error
293,157
void (Object message, NotificationType type) { final StackTraceElement[] stackTrace = new Throwable().getStackTrace(); String location = ""; for (StackTraceElement e : stackTrace) { final String methodName = e.getMethodName(); if ("run".equals(methodName)) { final String fileName = e.getFileName(); assert fileName != n...
log
293,158
int () { return port_; }
getPort
293,159
long () { return pid_; }
getPid
293,160
boolean () { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; }
isInitialized
293,161
int () { int size = memoizedSize; if (size != -1) return size; size = 0; if (port_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, port_); } if (!token_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, token_); } if (pid_ != 0L) { size += com.google.protobuf.Co...
getSerializedSize
293,162
boolean (final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.intellij.execution.process.mediator.rpc.Handshake)) { return super.equals(obj); } com.intellij.execution.process.mediator.rpc.Handshake other = (com.intellij.execution.process.mediator.rpc.Handshake) obj; if (getPort() != ...
equals
293,163
int () { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PORT_FIELD_NUMBER; hash = (53 * hash) + getPort(); hash = (37 * hash) + TOKEN_FIELD_NUMBER; hash = (53 * hash) + getToken().hashCode(); hash = (37 * hash) + PID_FIELD_NUM...
hashCode
293,164
Builder () { return newBuilder(); }
newBuilderForType
293,165
Builder () { return DEFAULT_INSTANCE.toBuilder(); }
newBuilder
293,166
Builder (com.intellij.execution.process.mediator.rpc.Handshake prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
newBuilder
293,167
Builder () { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); }
toBuilder
293,168
Builder ( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; }
newBuilderForType
293,169
void () { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } }
maybeForceBuilderInitialization
293,170
Builder () { super.clear(); port_ = 0; token_ = com.google.protobuf.ByteString.EMPTY; pid_ = 0L; return this; }
clear
293,171
Builder () { return super.clone(); }
clone
293,172
Builder ( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); }
setField
293,173
Builder ( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); }
clearField
293,174
Builder ( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); }
clearOneof
293,175
Builder ( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); }
setRepeatedField
293,176
Builder ( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); }
addRepeatedField
293,177
Builder (com.google.protobuf.Message other) { if (other instanceof com.intellij.execution.process.mediator.rpc.Handshake) { return mergeFrom((com.intellij.execution.process.mediator.rpc.Handshake)other); } else { super.mergeFrom(other); return this; } }
mergeFrom
293,178
Builder (com.intellij.execution.process.mediator.rpc.Handshake other) { if (other == com.intellij.execution.process.mediator.rpc.Handshake.getDefaultInstance()) return this; if (other.getPort() != 0) { setPort(other.getPort()); } if (other.getToken() != com.google.protobuf.ByteString.EMPTY) { setToken(other.getToken())...
mergeFrom
293,179
boolean () { return true; }
isInitialized
293,180
int () { return port_; }
getPort
293,181
Builder (int value) { port_ = value; onChanged(); return this; }
setPort
293,182
Builder () { port_ = 0; onChanged(); return this; }
clearPort
293,183
Builder (com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } token_ = value; onChanged(); return this; }
setToken
293,184
Builder () { token_ = getDefaultInstance().getToken(); onChanged(); return this; }
clearToken
293,185
long () { return pid_; }
getPid
293,186
Builder (long value) { pid_ = value; onChanged(); return this; }
setPid
293,187
Builder () { pid_ = 0L; onChanged(); return this; }
clearPid
293,188
Builder ( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); }
setUnknownFields
293,189
Builder ( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); }
mergeUnknownFields
293,190
StateOneofCase (int value) { return forNumber(value); }
valueOf
293,191
StateOneofCase (int value) { switch (value) { case 2: return STATE_NEW; case 3: return STATE_ACTIVE; case 4: return STATE_EXPIRED; case 0: return STATEONEOF_NOT_SET; default: return null; } }
forNumber
293,192
int () { return this.value; }
getNumber
293,193
StateOneofCase () { return StateOneofCase.forNumber( stateOneofCase_); }
getStateOneofCase
293,194
boolean () { return quotaOptions_ != null; }
hasQuotaOptions
293,195
boolean () { return stateOneofCase_ == 2; }
hasStateNew
293,196
boolean () { return stateOneofCase_ == 3; }
hasStateActive
293,197
boolean () { return stateOneofCase_ == 4; }
hasStateExpired
293,198
boolean () { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; }
isInitialized
293,199
int () { int size = memoizedSize; if (size != -1) return size; size = 0; if (quotaOptions_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getQuotaOptions()); } if (stateOneofCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.google.protobuf.Empty) st...
getSerializedSize