Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
5,600
List<GenericAttributeValue<String>> () { final GenericAttributeValue<String> verifyProperty = getVerifyProperty(); if (verifyProperty.getRawText() != null) { return Collections.singletonList(verifyProperty); } return Collections.singletonList(getPropertyName()); }
getPropertyDefiningAttributes
5,601
boolean () { return CustomAntElementsRegistry.getInstance(getAntProject()).hasTypeLoadingErrors(this); }
hasTypeLoadingErrors
5,602
boolean (final Class clazz) { if ("taskdef".equals(getXmlTag().getName())) { // in taskdef, the adapter is always set to Task return true; } final String adaptto = getAdaptto().getStringValue(); if (adaptto != null && isAssignableFrom(adaptto, clazz)) { return isAssignableFrom(Task.class.getName(), clazz); } final Stri...
isTask
5,603
boolean (final String baseClassName, final Class clazz) { try { final ClassLoader loader = clazz.getClassLoader(); if (loader != null) { final Class baseClass = loader.loadClass(baseClassName); return baseClass.isAssignableFrom(clazz); } } catch (ClassNotFoundException ignored) { } return false; }
isAssignableFrom
5,604
String (String path) { if (path.endsWith("/")) { return path.substring(0, path.length() - 1); } return path; }
cutTrailingSlash
5,605
boolean () { return true; }
isSoft
5,606
FileReference (final TextRange range, final int index, final String text) { return new AntDomFileReference(this, range, index, text); }
createFileReference
5,607
XmlAttributeValue () { return (XmlAttributeValue)super.getElement(); }
getElement
5,608
boolean () { if (super.isAbsolutePathReference()) { return true; } String path = getPathString(); return FileUtil.isAbsolute(path); }
isAbsolutePathReference
5,609
Collection<PsiFileSystemItem> () { final AntDomElement element = myValue.getParentOfType(AntDomElement.class, false); final AntDomProject containingProject = element != null? element.getAntProject() : null; if (containingProject != null) { if (isAbsolutePathReference()) { return toFileSystemItems(ManagingFS.getInstance...
computeDefaultContexts
5,610
List<File> (@Nullable @NonNls String s, ConvertContext context) { final GenericAttributeValue attribValue = context.getInvocationElement().getParentOfType(GenericAttributeValue.class, false); if (attribValue == null) { return null; } final String path = attribValue.getStringValue(); if (path == null) { return null; } f...
fromString
5,611
String () { return myBaseDir; }
compute
5,612
AntDomProject (GenericAttributeValue attribValue) { AntDomProject project = attribValue.getParentOfType(AntDomProject.class, false); if (project != null) { project = project.getContextAntProject(); } return project; }
getEffectiveAntProject
5,613
String (@Nullable List<File> files, ConvertContext context) { final GenericAttributeValue attribValue = context.getInvocationElement().getParentOfType(GenericAttributeValue.class, false); if (attribValue == null) { return null; } return attribValue.getRawText(); }
toString
5,614
DomTarget (DomElement parent, DomElement nameElement) { if (parent instanceof AntDomElement && nameElement.equals(((AntDomElement)parent).getId())) { // id attrib is defined return DomTarget.getTarget(parent, (GenericDomValue)nameElement); } if (parent instanceof AntDomProperty && nameElement.equals(((AntDomProperty)pa...
createDomTarget
5,615
String (ConvertContext context, GenericAttributeValue attribValue) { return DEFAULT_ANTFILE_NAME; }
getAttributeDefaultValue
5,616
String () { return AntBundle.message("unknown.macro.attribute", getCanonicalText()); }
getUnresolvedMessagePattern
5,617
PsiElement () { return ResolveCache.getInstance(getElement().getProject()).resolveWithCaching(this, MyResolver.INSTANCE, false, false); }
resolve
5,618
AntDomMacroDef () { final PsiElement element = getElement(); final DomElement domElement = DomUtil.getDomElement(element); if (domElement == null) { return null; } return domElement.getParentOfType(AntDomMacroDef.class, false); }
getParentMacrodef
5,619
PsiElement (@NotNull PsiReference psiReference, boolean incompleteCode) { final PsiElement element = psiReference.getElement(); final DomElement domElement = DomUtil.getDomElement(element); if (domElement == null) { return null; } final AntDomMacroDef macrodef = domElement.getParentOfType(AntDomMacroDef.class, false); ...
resolve
5,620
Class () { return CustomAntElementsRegistry.getInstance(getAntProject()).lookupClass(getXmlName()); }
getDefinitionClass
5,621
AntDomNamedElement () { return CustomAntElementsRegistry.getInstance(getAntProject()).getDeclaringElement(getXmlName()); }
getDeclaringElement
5,622
XmlName () { if (myXmlName == null) { myXmlName = new XmlName(getXmlElementName(), getXmlElementNamespace()); } return myXmlName; }
getXmlName
5,623
Class () { return null; }
lookupClass
5,624
String () { return null; }
getError
5,625
ClassProvider (Class clazz) { return clazz == null? EMPTY : new LoadedClassProvider(clazz); }
create
5,626
ClassProvider (@Nullable String className, @NotNull ClassLoader loader) { return className == null? EMPTY : new LazyLoadClassProvider(className, loader); }
create
5,627
Class () { return myClass; }
lookupClass
5,628
String () { return null; }
getError
5,629
Class () { return getResult().getFirst(); }
lookupClass
5,630
List<GenericAttributeValue<String>> () { return Collections.singletonList(getPropertyName()); }
getPropertyDefiningAttributes
5,631
PropertyExpansionListener (PropertyExpansionListener listener) { final PropertyExpansionListener prevListener = myPropertyExpansionListener; myPropertyExpansionListener = listener; return prevListener; }
setPropertyExpansionListener
5,632
boolean () { return myResolver.hasNext(); }
hasPropertiesToExpand
5,633
void (PropertiesProvider provider) { while (myResolver.hasNext()) { final String propName = myResolver.next(); final String value = provider.getPropertyValue(propName); if (value != null) { myNamesToSkip.add(propName); // prevent infinite recursion final String propValue; if (provider instanceof PropertiesProvider.Skip...
acceptProvider
5,634
void (String propName, String propValue) { final PropertyExpansionListener listener = myPropertyExpansionListener; if (listener != null) { listener.onPropertyExpanded(propName, propValue); } }
notifyPropertyExpanded
5,635
String () { return myResolver.getResult(); }
getResult
5,636
String (int index) { return myPropertyNames.get(index).getFirst(); }
getPropertyName
5,637
int (int index) { return myPropertyNames.get(index).getSecond(); }
getPropertyOffset
5,638
void (int index, int value) { final Pair<String, Integer> pair = myPropertyNames.get(index); myPropertyNames.set(index, new Pair<>(pair.getFirst(), value)); }
setPropertyOffset
5,639
boolean () { return (myCurrentIndex + 1) < myPropertyNames.size(); }
hasNext
5,640
String () { return getPropertyName(++myCurrentIndex); }
next
5,641
void () { replace(""); }
remove
5,642
List<File> (@Nullable AntDomPattern pattern, Set<AntFilesProvider> processed) { assert pattern != null; final File singleFile = getCanonicalFile(getFile().getStringValue()); if (singleFile == null || pattern.hasIncludePatterns()) { // if singleFile is specified, there are no implicit includes final File root = getCanon...
getFiles
5,643
void (List<? super File> container, File from, String relativePath, final AntDomPattern pattern) { if (myDirsProcessed > MAX_DIRS_TO_PROCESS) { return; } myDirsProcessed++; final File[] children = from.listFiles(); if (children != null) { for (File child : children) { if (child.isDirectory()) { final String childPath =...
collectFiles
5,644
String (final String parentPath, final String name) { if (parentPath.length() == 0) { return name; } return parentPath + "/" + name; }
makePath
5,645
AntDomProject () { return getParentOfType(AntDomProject.class, false); }
getAntProject
5,646
AntDomProject () { final AntConfigurationBase antConfig = AntConfigurationBase.getInstance(getManager().getProject()); final XmlElement xmlElement = getXmlElement(); if (xmlElement == null) { return getAntProject(); } PsiFile containingFile = xmlElement.getContainingFile(); if (containingFile != null) { containingFile ...
getContextAntProject
5,647
List<AntDomElement> () { final List<DomElement> children = DomUtil.getDefinedChildren(this, true, false); final int size = children.size(); if (size == 0) { return Collections.emptyList(); } final List<AntDomElement> antChildren = new ArrayList<AntDomElement>(size); for (DomElement child : children) { if (child instanc...
getAntChildren
5,648
Iterator<AntDomElement> () { final List<DomElement> children = DomUtil.getDefinedChildren(this, true, false); if (children.isEmpty()) { return Collections.emptyIterator(); } final Iterator<DomElement> it = children.iterator(); return new Iterator<>() { private DomElement myUnprocessedElement; @Override public boolean h...
getAntChildrenIterator
5,649
boolean () { findNextAntElement(); return myUnprocessedElement != null; }
hasNext
5,650
AntDomElement () { findNextAntElement(); if (myUnprocessedElement == null) { throw new NoSuchElementException(); } final AntDomElement antElement = (AntDomElement)myUnprocessedElement; myUnprocessedElement = null; return antElement; }
next
5,651
void () { if (myUnprocessedElement != null) { return; } do { if (!it.hasNext()) { break; } myUnprocessedElement = it.next(); } while (!(myUnprocessedElement instanceof AntDomElement)); }
findNextAntElement
5,652
void () { Iterator.super.remove(); }
remove
5,653
boolean () { return Role.TASK == getChildDescription().getUserData(ROLE); }
isTask
5,654
boolean () { return Role.DATA_TYPE == getChildDescription().getUserData(ROLE); }
isDataType
5,655
String () { final XmlTag tag = getXmlTag(); if (tag == null) { return super.toString(); } final String name = tag.getName(); if (name.isEmpty()) { return super.toString(); } return name; }
toString
5,656
String () { return SHORT_NAME; }
getShortName
5,657
void (@NotNull DomElement element, @NotNull DomElementAnnotationHolder holder, @NotNull DomHighlightingHelper helper) { if (element instanceof GenericDomValue) { final XmlElement valueElement = DomUtil.getValueElement(((GenericDomValue)element)); if (valueElement != null) { checkReferences(valueElement, holder, element...
checkDomElement
5,658
void (final XmlElement xmlElement, final @NonNls DomElementAnnotationHolder holder, DomElement domElement) { if (xmlElement == null) { return; } Set<PsiReference> processed = null; Collection<PropertiesFile> propertyFiles = null; // to be initialized lazily for (final PsiReference ref : xmlElement.getReferences()) { if...
checkReferences
5,659
boolean (PsiReference ref) { if (ref.resolve() != null) { return true; } if (ref instanceof PsiPolyVariantReference) { return ((PsiPolyVariantReference)ref).multiResolve(false).length > 0; } return false; }
isResolvable
5,660
Collection<PropertiesFile> (@Nullable AntDomProject antDomProject, @NotNull XmlElement stopElement) { if (antDomProject == null) { return Collections.emptyList(); } final Set<PropertiesFile> files = new HashSet<>(); final int stopOffset = stopElement.getTextOffset(); for (Iterator<AntDomElement> iterator = antDomProjec...
getPropertyFiles
5,661
void (AntDomElement element) { if (!element.isDataType()) { // optimization super.visitAntDomElement(element); } }
visitAntDomElement
5,662
void (AntDomAntCallParam antCallParam) { if (myPropertyName.equals(antCallParam.getName().getStringValue())) { final PsiElement elem = antCallParam.getNavigationElement(myPropertyName); if (elem != null) { myResult.add(elem); } } }
visitAntDomAntCallParam
5,663
List<PsiElement> (@NotNull AntDomProject project, @NotNull @NlsSafe String propertyName) { final AntCallParamsFinder resolver = new AntCallParamsFinder(propertyName); project.accept(resolver); return resolver.myResult; }
resolve
5,664
void () { registerReferenceInjector(new AntReferenceInjector()); }
initializeFileDescription
5,665
AntDomFileReferenceSet () { return (AntDomFileReferenceSet)super.getFileReferenceSet(); }
getFileReferenceSet
5,666
String () { return AntBundle.message("file.doesnt.exist", getCanonicalRepresentationText()); }
getUnresolvedMessagePattern
5,667
String () { final String value = getCanonicalText(); return AntStringResolver.computeString(getFileReferenceSet().getAttributeValue(), value); }
getCanonicalRepresentationText
5,668
boolean () { return mySkipByAnnotator; }
shouldBeSkippedByAnnotator
5,669
void (boolean value) { mySkipByAnnotator = value; }
setShouldBeSkippedByAnnotator
5,670
Boolean (@Nullable @NonNls String s, ConvertContext context) { if (s == null || s.length() == 0) { return DEFAULT_VALUE; } return "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s); }
fromString
5,671
String (@Nullable Boolean aBoolean, ConvertContext context) { final GenericAttributeValue attribValue = context.getInvocationElement().getParentOfType(GenericAttributeValue.class, false); if (attribValue == null) { return null; } return attribValue.getRawText(); }
toString
5,672
AntDomPattern () { return null; // not available for this data type }
getAntPattern
5,673
List<File> (@Nullable AntDomPattern pattern, Set<AntFilesProvider> processed) { final File root = getCanonicalFile(getDir().getStringValue()); if (root == null) { return Collections.emptyList(); } final ArrayList<File> files = new ArrayList<>(); final String filenames = getFilesString().getStringValue(); if (filenames ...
getFiles
5,674
List<GenericAttributeValue<String>> () { return Arrays.asList(getOutputPropertyName(), getResultPropertyName(), getErrorPropertyName()); }
getPropertyDefiningAttributes
5,675
AntDomPattern () { return null; // not available }
getAntPattern
5,676
List<File> (AntDomPattern pattern, Set<AntFilesProvider> processed) { final List<File> files = new ArrayList<>(); final File baseDir = getCanonicalFile("."); addLocation(baseDir, files, getLocation().getStringValue()); final String pathString = getPath().getStringValue(); if (pathString != null) { final PathTokenizer t...
getFiles
5,677
void (final File baseDir, final List<? super File> files, final String locationPath) { if (locationPath != null) { File file = new File(locationPath); if (file.isAbsolute()) { files.add(file); } else { files.add(new File(baseDir, locationPath)); } } }
addLocation
5,678
String (@Nullable TargetResolver.Result result, ConvertContext context) { return result != null? result.getRefsString() : null; }
toString
5,679
Iterator<String> () { final List<GenericAttributeValue<String>> attribs = getPropertyDefiningAttributes(); final List<String> result = new ArrayList<>(attribs.size()); for (GenericAttributeValue<String> attribValue : attribs) { final String name = attribValue.getStringValue(); if (name != null && !name.isEmpty()) { res...
getNamesIterator
5,680
PsiElement (String propertyName) { for (GenericAttributeValue<String> value : getPropertyDefiningAttributes()) { if (!propertyName.equals(value.getStringValue())) { continue; } final DomTarget domTarget = DomTarget.getTarget(this, value); return domTarget != null? PomService.convertToPsi(domTarget) : null; } for (Strin...
getNavigationElement
5,681
String (final String propertyName) { for (GenericAttributeValue<String> value : getPropertyDefiningAttributes()) { if (propertyName.equals(value.getStringValue())) { return calcPropertyValue(propertyName); } } for (String implicitPropName : getImplicitPropertyNames()) { if (propertyName.equals(implicitPropName)) { retu...
getPropertyValue
5,682
List<GenericAttributeValue<String>> () { return Collections.emptyList(); }
getPropertyDefiningAttributes
5,683
List<String> () { return Collections.emptyList(); }
getImplicitPropertyNames
5,684
void (AntDomCustomElement custom) { if (!mySkipCustomTags) { super.visitAntDomCustomElement(custom); } }
visitAntDomCustomElement
5,685
String (@NotNull final DomElement context, @NotNull @NlsSafe String valueString) { PropertyExpander expander = new PropertyExpander(valueString); if (!expander.hasPropertiesToExpand()) { return valueString; } final Map<String, String> cached = RESOLVED_STRINGS_MAP_KEY.get(context); if (cached != null) { expander.accept...
computeString
5,686
void (String propName, String propValue) { cacheResult(context, RESOLVED_STRINGS_MAP_KEY, propName, propValue); }
onPropertyExpanded
5,687
void (PropertiesProvider propertiesProvider) { myExpander.acceptProvider(propertiesProvider); if (!myExpander.hasPropertiesToExpand()) { stop(); } }
propertyProviderFound
5,688
Iterator<String> () { if (allNames == null) { allNames = new HashSet<>(myCached.keySet()); } return allNames.iterator(); }
getNamesIterator
5,689
String (String propertyName) { return myCached.get(propertyName); }
getPropertyValue
5,690
PsiElement (String propertyName) { return null; }
getNavigationElement
5,691
List<GenericAttributeValue<String>> () { return Collections.singletonList(getAddPropertyName()); }
getPropertyDefiningAttributes
5,692
boolean () { return myShouldBeSkippedByAnnotator; }
shouldBeSkippedByAnnotator
5,693
String () { return AntBundle.message("unknown.property", getCanonicalText()); }
getUnresolvedMessagePattern
5,694
void (boolean value) { myShouldBeSkippedByAnnotator = value; }
setShouldBeSkippedByAnnotator
5,695
PsiElement () { final ResolveResult res = doResolve(); return res != null ? res.getElement() : null; }
resolve
5,696
MyResolveResult () { final ResolveResult[] resolveResults = multiResolve(false); return resolveResults.length == 1 ? (MyResolveResult)resolveResults[0] : null; }
doResolve
5,697
boolean (@NotNull PsiElement element) { // optimization to exclude obvious variants final DomElement domElement = AntDomReferenceBase.toDomElement(element); if (domElement instanceof AntDomProperty prop) { final String propName = prop.getName().getRawText(); if (propName != null && prop.getPrefix().getRawText() == null...
isReferenceTo
5,698
PsiElement () { return myElement; }
getElement
5,699
PropertiesProvider () { return myProvider; }
getProvider