Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
50,200 | boolean () { return true; } | isEnabledByDefault |
50,201 | Visitor (final InspectionManager manager, final boolean isOnTheFly) { return new Visitor(manager, isOnTheFly) { @Override protected void checkExpression(XPathExpression expression) { if (!(expression instanceof XPathBinaryExpression expr)) { return; } if (expr.getOperator() == XPathTokenTypes.EQ) { final XPathExpressio... | createVisitor |
50,202 | void (XPathExpression expression) { if (!(expression instanceof XPathBinaryExpression expr)) { return; } if (expr.getOperator() == XPathTokenTypes.EQ) { final XPathExpression lop = expr.getLOperand(); final XPathExpression rop = expr.getROperand(); if (isNameComparison(lop, rop)) { assert rop != null; final ProblemDesc... | checkExpression |
50,203 | boolean (XPathExpression op1, XPathExpression op2) { if (!isNameFunctionCall(op1)) return false; if (!(op2 instanceof XPathString)) { return false; } final String value = ((XPathString)op2).getValue(); return value != null && value.contains(":"); } | isNameComparison |
50,204 | boolean (XPathExpression op1) { if (!(op1 instanceof XPathFunctionCall fc)) { return false; } return "name".equals(fc.getFunctionName()); } | isNameFunctionCall |
50,205 | String () { return "HardwiredNamespacePrefix"; } | getShortName |
50,206 | boolean (Language language) { return language == XPathFileType.XPATH.getLanguage() || language == XPathFileType.XPATH2.getLanguage(); } | acceptsLanguage |
50,207 | String () { return getFamilyName(); } | getText |
50,208 | String () { return XPathBundle.message("intention.family.name.remove.redundant.conversion"); } | getFamilyName |
50,209 | String () { return getFamilyName(); } | getText |
50,210 | String () { return XPathBundle.message("intention.family.name.remove.explicit.type.conversion"); } | getFamilyName |
50,211 | boolean (@NotNull Project project, @NotNull PsiFile file, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { return super.isAvailable(project, file, startElement, endElement) && ((XPathFunctionCall)startElement).getArgumentList().length == 1; } | isAvailable |
50,212 | String () { return getFamilyName(); } | getText |
50,213 | String () { return XPathBundle.message("intention.family.name.make.type.conversion.explicit"); } | getFamilyName |
50,214 | void (@NotNull Project project, @NotNull PsiFile file, Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { invokeImpl(project, file); } | invoke |
50,215 | FunctionContext () { FunctionContext context = myFunctionContext; if (context == null) { context = createFunctionContext(); } return (myFunctionContext = context); } | getFunctionContext |
50,216 | FunctionContext () { return DefaultFunctionContext.getInstance(getContextType()); } | createFunctionContext |
50,217 | XPathQuickFixFactory () { return XPathQuickFixFactoryImpl.INSTANCE; } | getQuickFixFactory |
50,218 | void (PsiFile file) { assert file instanceof XPathFile; file.putCopyableUserData(KEY, this); } | attachTo |
50,219 | void (XmlElement context) { context.putCopyableUserData(KEY, this); } | attachTo |
50,220 | void (@NotNull PsiFile file1, @NotNull XPathFile file2) { final ContextProvider contextProvider = getContextProvider(file1); if (!(contextProvider instanceof DefaultProvider)) { contextProvider.attachTo(file2); } } | copy |
50,221 | ContextProvider (PsiFile psiFile) { ContextProvider provider = psiFile.getCopyableUserData(KEY); if (provider != null && provider.isValid()) { return provider; } final PsiElement context = psiFile.getContext(); if (context != null) { provider = context.getCopyableUserData(KEY); if (provider != null && provider.isValid(... | getContextProvider |
50,222 | boolean () { final XmlElement contextElement = getContextElement(); return contextElement != null && contextElement.isValid(); } | isValid |
50,223 | ContextProvider (PsiFile psiFile) { if (psiFile instanceof XPathFile) { final ContextProvider instance = ContextProviderExtension.getInstance((XPathFile)psiFile); if (instance != null) { instance.attachTo(psiFile); return instance; } } return new DefaultProvider(PsiTreeUtil.getContextOfType(psiFile, XmlElement.class, t... | getFromExtensionOrDefault |
50,224 | ContextProvider (PsiElement element) { return element instanceof XPathElement ? getContextProvider(element instanceof XPathFile ? (PsiFile)element : element.getContainingFile()) : new DefaultProvider(PsiTreeUtil.getParentOfType(element, XmlElement.class, false)); } | getContextProvider |
50,225 | PsiFile[] (XPathFile file) { return PsiFile.EMPTY_ARRAY; } | getRelatedFiles |
50,226 | XPathType (XPathExpression expr) { return XPathType.UNKNOWN; } | getExpectedType |
50,227 | QName (QNameElement element) { final PrefixedName qname = element.getQName(); return qname != null ? getQName(qname, element) : null; } | getQName |
50,228 | QName (@NotNull PrefixedName qName, XPathElement context) { final String prefix = qName.getPrefix(); final NamespaceContext namespaceContext = getNamespaceContext(); if (namespaceContext != null) { if (prefix != null) { final XmlElement element = PsiTreeUtil.getContextOfType(context, XmlElement.class, true); final Stri... | getQName |
50,229 | boolean (XPathElement context) { // http://www.w3.org/TR/xslt20/#unprefixed-qnames return (context instanceof XPathNodeTest && ((XPathNodeTest)context).getPrincipalType() == XPathNodeTest.PrincipalType.ELEMENT) || context instanceof XPath2TypeElement; } | isDefaultCapableElement |
50,230 | boolean (XmlFile file) { return Boolean.TRUE.equals(file.getUserData(XML_FILE_WITH_XPATH_INJECTTION)); } | hasXPathInjections |
50,231 | void (final PsiFile file) { final Boolean flag = file.getUserData(XML_FILE_WITH_XPATH_INJECTTION); // This is a very ugly hack, but it is required to make the implicit usages provider recognize namespace declarations used from // within injected XPath fragments during IDEA startup. Otherwise, the namespace declarations... | setXPathInjected |
50,232 | ContextType () { return myContextType; } | getContextType |
50,233 | XmlElement () { return myContextElement; } | getContextElement |
50,234 | NamespaceContext () { return myNamespaceContext; } | getNamespaceContext |
50,235 | VariableContext () { return null; } | getVariableContext |
50,236 | Set<QName> (boolean forValidation) { return null; } | getAttributes |
50,237 | Set<QName> (boolean forValidation) { return null; } | getElements |
50,238 | XPathVariable (XPathVariableReference reference) { return null; } | resolve |
50,239 | boolean () { return false; } | canResolve |
50,240 | boolean (PsiElement element, XPathVariableReference reference) { return false; } | isReferenceTo |
50,241 | Language () { return myLanguage; } | getLanguage |
50,242 | Fix<XPathExpression>[] (XPathExpression expression, XPathType type, boolean explicit) { //noinspection unchecked return explicit ? new Fix[]{ new RemoveExplicitConversionFix(expression), new MakeTypeExplicitFix(expression, type), } : new Fix[]{ new MakeTypeExplicitFix(expression, type), }; } | createImplicitTypeConversionFixes |
50,243 | Fix<XPathExpression>[] (XPathExpression expression) { //noinspection unchecked return new Fix[]{ new RemoveRedundantConversionFix(expression), }; } | createRedundantTypeConversionFixes |
50,244 | Fix<XPathNodeTest>[] (XPathNodeTest test) { //noinspection unchecked return new Fix[0]; } | createUnknownNodeTestFixes |
50,245 | boolean (PsiElement element, XPathInspection inspection) { return false; } | isSuppressedFor |
50,246 | ContextType (XPathFile file) { return ContextProvider.getContextProvider(file).getContextType(); } | fromFile |
50,247 | XPathVersion () { return myVersion; } | getVersion |
50,248 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final ContextType that = (ContextType)o; if (!myName.equals(that.myName)) return false; return true; } | equals |
50,249 | int () { return myName.hashCode(); } | hashCode |
50,250 | String () { return myName; } | toString |
50,251 | ContextProvider (XPathFile file) { for (ContextProviderExtension extension : EXTENSION_POINT_NAME.getExtensionList()) { if (extension.accepts(file)) { return extension.getContextProvider(file); } } return null; } | getInstance |
50,252 | XPathType (String type, XPath2SequenceType.Cardinality c) { if ("none".equals(type)) { return XPathType.UNKNOWN; } XPathType r = null; if ("numeric".equals(type)) { r = XPath2Type.NUMERIC; } else if (type.startsWith("xs:")) { final String base = type.substring(3); r = XPath2Type.fromName(new QName(XPath2Type.XMLSCHEMA_... | mapType |
50,253 | String (Lexer lexer, IElementType token) { assert lexer.getTokenType() == token : lexer.getTokenType() + ": " + lexer.getTokenText(); final String s = lexer.getTokenText(); lexer.advance(); return s; } | match |
50,254 | String (Lexer lexer) { String type = parseQName(lexer); if (type == null) { if (lexer.getTokenType() == XPath2TokenTypes.ITEM || lexer.getTokenType() == XPathTokenTypes.FUNCTION_NAME || lexer.getTokenType() == XPathTokenTypes.NODE_TYPE) { type = lexer.getTokenText(); lexer.advance(); match(lexer, XPathTokenTypes.LPAREN... | parseType |
50,255 | String (Lexer lexer) { String name; if (lexer.getTokenType() == XPathTokenTypes.NCNAME) { name = lexer.getTokenText(); lexer.advance(); if (lexer.getTokenType() == XPathTokenTypes.COL) { lexer.advance(); assert lexer.getTokenType() == XPathTokenTypes.NCNAME; name += (":" + lexer.getTokenText()); lexer.advance(); } } el... | parseQName |
50,256 | void (Map<Pair<QName, Integer>, Function> decls, String s) { final Pair<String, ? extends Function> pair = parseFuntionDeclaration(s); final Function func = pair.second; final boolean fn = pair.first.equals("fn") || pair.first.length() == 0; final boolean xs = pair.first.equals("xs"); final Pair<QName, Integer> key = P... | addFunction |
50,257 | String () { final StringBuilder sb = new StringBuilder(type.getName()); if (kind == Parameter.Kind.OPTIONAL) sb.append("?"); if (kind == Parameter.Kind.VARARG) sb.append("*"); return sb.toString(); } | toString |
50,258 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final Parameter parameter = (Parameter)o; if (kind != parameter.kind) return false; return type.equals(parameter.type); } | equals |
50,259 | int () { int result = type.hashCode(); result = 31 * result + kind.hashCode(); return result; } | hashCode |
50,260 | int (Parameter[] parameters) { int arity = 0; boolean stop = false; for (Parameter parameter : parameters) { assert !stop; if (parameter.kind == Parameter.Kind.REQUIRED) { arity++; } else if (parameter.kind == Parameter.Kind.OPTIONAL) { stop = true; } else if (parameter.kind == Parameter.Kind.VARARG) { stop = true; } }... | calcArity |
50,261 | String () { return getName() + "(" + StringUtil.join(Arrays.asList(parameters), ", ") + ")"; } | buildSignature |
50,262 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final FunctionImpl function = (FunctionImpl)o; if (!name.equals(function.name)) return false; return true; } | equals |
50,263 | int () { return name.hashCode(); } | hashCode |
50,264 | String () { return name; } | getName |
50,265 | XPathType () { return returnType; } | getReturnType |
50,266 | int () { return minArity; } | getMinArity |
50,267 | FunctionContext (ContextType contextType, Factory<? extends FunctionContext> factory) { return ourInstances.computeIfAbsent(contextType, k -> factory.create()); } | getInstance |
50,268 | void (Map<Pair<QName, Integer>, Function> decls, String value) { FunctionDeclarationParsing.addFunction(decls, value); } | addFunction |
50,269 | void (Map<Pair<QName, Integer>, Function> decls, Function value) { decls.put(Pair.create(new QName(null, value.getName()), value.getParameters().length), value); } | addFunction |
50,270 | void (Map<Pair<QName, Integer>, Function> decls, String namespace, Function value) { decls.put(Pair.create(new QName(namespace, value.getName()), value.getParameters().length), value); } | addFunction |
50,271 | boolean () { return false; } | allowsExtensions |
50,272 | FunctionContext (final ContextType type) { return AbstractFunctionContext.getInstance(type, () -> new DefaultFunctionContext(type)); } | getInstance |
50,273 | Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, XpathIcons.class.getClassLoader(), cacheKey, flags); } | load |
50,274 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } | zzUnpackcmap_top |
50,275 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } | zzUnpackcmap_blocks |
50,276 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } | zzUnpackAction |
50,277 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length() - 1; while (i < l) { int high = packed.charAt(i++) << 16; result[j++] = high | packed.charAt(i++); } return j; } | zzUnpackRowMap |
50,278 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); value--; do result[j++] = value; while (--count > 0); } return j; } | zzUnpacktrans |
50,279 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } | zzUnpackAttribute |
50,280 | void (int start) { zzCurrentPos = zzStartRead = start; } | setStart |
50,281 | IElementType () { yybegin(S1); return XPathTokenTypes.NCNAME; } | ncName |
50,282 | int () { return Integer.MAX_VALUE; } | zzMaxBufferLen |
50,283 | boolean () { return true; } | zzCanGrow |
50,284 | int (int input) { int offset = input & 255; return offset == input ? ZZ_CMAP_BLOCKS[offset] : ZZ_CMAP_BLOCKS[ZZ_CMAP_TOP[input >> 8] | offset]; } | zzCMap |
50,285 | int () { return zzStartRead; } | getTokenStart |
50,286 | int () { return getTokenStart() + yylength(); } | getTokenEnd |
50,287 | void (CharSequence buffer, int start, int end, int initialState) { zzBuffer = buffer; zzCurrentPos = zzMarkedPos = zzStartRead = start; zzAtEOF = false; zzAtBOL = true; zzEndRead = end; yybegin(initialState); } | reset |
50,288 | int () { return zzLexicalState; } | yystate |
50,289 | void (int newState) { zzLexicalState = newState; } | yybegin |
50,290 | CharSequence () { return zzBuffer.subSequence(zzStartRead, zzMarkedPos); } | yytext |
50,291 | char (int pos) { return zzBuffer.charAt(zzStartRead+pos); } | yycharat |
50,292 | int () { return zzMarkedPos-zzStartRead; } | yylength |
50,293 | void (int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); } | zzScanError |
50,294 | void (int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; } | yypushback |
50,295 | void () { try { final Writer out = result.getWriter(); if (out != null) { out.flush(); out.close(); } else if (result.getOutputStream() != null) { result.getOutputStream().flush(); result.getOutputStream().close(); } } catch (IOException e) { // no chance to fix... } } | run |
50,296 | XSLTMain () { final String mainClass = System.getProperty("xslt.main"); if (mainClass == null) { return new XSLTRunner(); } try { return (XSLTMain)Class.forName(mainClass).newInstance(); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { throw new AssertionError(e); } } | loadMain |
50,297 | void (TransformerException exception) { handleException(exception, "WARNING"); } | warning |
50,298 | void (TransformerException exception) { handleException(exception, "ERROR"); myTrouble[0] = true; } | error |
50,299 | void (TransformerException exception) { handleException(exception, "FATAL"); myTrouble[0] = true; } | fatalError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.