Unnamed: 0
int64 0
305k
| body
stringlengths 7
52.9k
| name
stringlengths 1
185
|
|---|---|---|
13,900
|
boolean (Content c1, Content c2) { if (!(c1 instanceof Element) && !(c2 instanceof Element)) { return c1.getValue().equals(c2.getValue()); } return c1 instanceof Element && c2 instanceof Element && areElementsEqual((Element)c1, (Element)c2); }
|
contentsEqual
|
13,901
|
boolean (@NotNull List<Attribute> l1, @NotNull List<Attribute> l2) { if (l1.size() != l2.size()) return false; for (int i = 0; i < l1.size(); i++) { if (!attEqual(l1.get(i), l2.get(i))) return false; } return true; }
|
isAttributesEqual
|
13,902
|
boolean (@NotNull Attribute a1, @NotNull Attribute a2) { return a1.getName().equals(a2.getName()) && a1.getValue().equals(a2.getValue()); }
|
attEqual
|
13,903
|
int (@NotNull Element root) { return addToHash(0, root); }
|
getTreeHash
|
13,904
|
int (int i, @NotNull Element element) { i = addToHash(i, element.getName()); for (Attribute attribute : element.getAttributes()) { i = addToHash(i, attribute.getName()); i = addToHash(i, attribute.getValue()); } for (Content child : element.getContent()) { if (child instanceof Element) { i = addToHash(i, (Element)child); } else if (child instanceof Text) { String text = ((Text)child).getText(); if (!StringUtilRt.isEmptyOrSpaces(text)) { i = addToHash(i, text); } } } return i; }
|
addToHash
|
13,905
|
int (int i, @NotNull String s) { return i * 31 + s.hashCode(); }
|
addToHash
|
13,906
|
String () { return myFinalName; }
|
getFinalName
|
13,907
|
void (String finalName) { myFinalName = finalName; }
|
setFinalName
|
13,908
|
String () { return myDefaultGoal; }
|
getDefaultGoal
|
13,909
|
void (String defaultGoal) { myDefaultGoal = defaultGoal; }
|
setDefaultGoal
|
13,910
|
String () { return myDirectory; }
|
getDirectory
|
13,911
|
void (String directory) { myDirectory = directory; }
|
setDirectory
|
13,912
|
List<MavenResource> () { return myResources; }
|
getResources
|
13,913
|
void (List<MavenResource> resources) { myResources = new ArrayList<MavenResource>(resources); }
|
setResources
|
13,914
|
List<MavenResource> () { return myTestResources; }
|
getTestResources
|
13,915
|
void (List<MavenResource> testResources) { myTestResources = new ArrayList<MavenResource>(testResources); }
|
setTestResources
|
13,916
|
List<String> () { return myFilters; }
|
getFilters
|
13,917
|
void (List<String> filters) { myFilters = new ArrayList<String>(filters); }
|
setFilters
|
13,918
|
String () { return myId; }
|
getId
|
13,919
|
String () { return mySource; }
|
getSource
|
13,920
|
void (MavenProfileActivation activation) { myActivation = activation; }
|
setActivation
|
13,921
|
MavenProfileActivation () { return myActivation; }
|
getActivation
|
13,922
|
MavenBuildBase () { return myBuild; }
|
getBuild
|
13,923
|
String () { return myExists; }
|
getExists
|
13,924
|
String () { return myMissing; }
|
getMissing
|
13,925
|
MavenId () { return myMavenId; }
|
getMavenId
|
13,926
|
String () { return myRelativePath; }
|
getRelativePath
|
13,927
|
Set<MavenId> (String artifactId) { Set<MavenId> ids = myArtifactToIdToMavenIdMapping.get(artifactId); return null == ids ? Collections.emptySet() : ids; }
|
getAvailableIdsForArtifactId
|
13,928
|
String () { return myName; }
|
getName
|
13,929
|
String () { return myFamily; }
|
getFamily
|
13,930
|
String () { return myArch; }
|
getArch
|
13,931
|
String () { return myVersion; }
|
getVersion
|
13,932
|
String () { return myGroupId; }
|
getGroupId
|
13,933
|
String () { return myArtifactId; }
|
getArtifactId
|
13,934
|
String () { return myVersion; }
|
getVersion
|
13,935
|
String () { return myPackaging; }
|
getPackaging
|
13,936
|
String () { return myClassifier; }
|
getClassifier
|
13,937
|
String () { return myClassNames; }
|
getClassNames
|
13,938
|
String () { return myRepositoryId; }
|
getRepositoryId
|
13,939
|
String () { StringBuilder builder = new StringBuilder(); MavenId.append(builder, myGroupId); MavenId.append(builder, myArtifactId); MavenId.append(builder, myPackaging); if (!StringUtilRt.isEmptyOrSpaces(myClassifier)) MavenId.append(builder, myClassifier); MavenId.append(builder, myVersion); MavenId.append(builder, myRepositoryId); return builder.toString(); }
|
toString
|
13,940
|
boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final MavenArtifactInfo that = (MavenArtifactInfo)o; if (myArtifactId != null ? !myArtifactId.equals(that.myArtifactId) : that.myArtifactId != null) return false; if (myClassNames != null ? !myClassNames.equals(that.myClassNames) : that.myClassNames != null) return false; if (myClassifier != null ? !myClassifier.equals(that.myClassifier) : that.myClassifier != null) return false; if (myGroupId != null ? !myGroupId.equals(that.myGroupId) : that.myGroupId != null) return false; if (myPackaging != null ? !myPackaging.equals(that.myPackaging) : that.myPackaging != null) return false; if (myRepositoryId != null ? !myRepositoryId.equals(that.myRepositoryId) : that.myRepositoryId != null) return false; if (myVersion != null ? !myVersion.equals(that.myVersion) : that.myVersion != null) return false; return true; }
|
equals
|
13,941
|
int () { int result = myGroupId != null ? myGroupId.hashCode() : 0; result = 31 * result + (myArtifactId != null ? myArtifactId.hashCode() : 0); result = 31 * result + (myVersion != null ? myVersion.hashCode() : 0); result = 31 * result + (myPackaging != null ? myPackaging.hashCode() : 0); result = 31 * result + (myClassifier != null ? myClassifier.hashCode() : 0); result = 31 * result + (myClassNames != null ? myClassNames.hashCode() : 0); result = 31 * result + (myRepositoryId != null ? myRepositoryId.hashCode() : 0); return result; }
|
hashCode
|
13,942
|
String () { return myGroupId; }
|
getGroupId
|
13,943
|
String () { return myArtifactId; }
|
getArtifactId
|
13,944
|
String () { return myVersion; }
|
getVersion
|
13,945
|
String () { return myBaseVersion; }
|
getBaseVersion
|
13,946
|
MavenId () { return new MavenId(myGroupId, myArtifactId, myVersion); }
|
getMavenId
|
13,947
|
String () { return myType; }
|
getType
|
13,948
|
String () { return myClassifier; }
|
getClassifier
|
13,949
|
String () { return myScope; }
|
getScope
|
13,950
|
void (String scope) { myScope = scope; }
|
setScope
|
13,951
|
boolean () { return myOptional; }
|
isOptional
|
13,952
|
boolean () { if (myOptional) return false; return MavenConstants.SCOPE_COMPILE.equals(myScope) || MavenConstants.SCOPE_RUNTIME.equals(myScope); }
|
isExportable
|
13,953
|
String () { return myExtension; }
|
getExtension
|
13,954
|
String () { if (MavenConstants.TYPE_TEST_JAR.equals(myType)) { return "jar"; } if (MavenConstants.TYPE_EJB_CLIENT.equals(myType)) { return "ejb"; } return myType; }
|
getPackaging
|
13,955
|
boolean () { return isResolved(ourDefaultFileExists); }
|
isResolved
|
13,956
|
boolean (Predicate<? super File> fileExists) { if (myResolved && !myStubbed) { long currentTime = System.currentTimeMillis(); if (myLastFileCheckTimeStamp + 2000 < currentTime) { // File.exists() is a slow operation, don't run it more than once a second if (!fileExists.test(myFile)) { return false; // Don't cache result if file is not exist. } myLastFileCheckTimeStamp = currentTime; } return true; } return false; }
|
isResolved
|
13,957
|
boolean () { return myResolved; }
|
isResolvedArtifact
|
13,958
|
File () { return myFile; }
|
getFile
|
13,959
|
String () { return FileUtilRt.toSystemIndependentName(myFile.getPath()); }
|
getPath
|
13,960
|
String () { return getRelativePathForExtraArtifact(null, null); }
|
getRelativePath
|
13,961
|
String (@Nullable String extraArtifactClassifier, @Nullable String customExtension) { StringBuilder res = new StringBuilder(); appendFileName(res, extraArtifactClassifier, customExtension, true); return res.toString(); }
|
getFileNameWithBaseVersion
|
13,962
|
void (StringBuilder result, @Nullable String extraArtifactClassifier, @Nullable String customExtension, boolean useBaseVersion) { result.append(myArtifactId); result.append('-'); result.append(useBaseVersion ? myBaseVersion : myVersion); String fullClassifier = getFullClassifier(extraArtifactClassifier); if (fullClassifier != null) { result.append("-").append(fullClassifier); } result.append("."); result.append(customExtension == null ? myExtension : customExtension); }
|
appendFileName
|
13,963
|
String (@Nullable String extraArtifactClassifier, @Nullable String customExtension) { StringBuilder result = new StringBuilder(); result.append(myGroupId.replace('.', '/')); result.append('/'); result.append(myArtifactId); result.append('/'); result.append(myBaseVersion); result.append('/'); appendFileName(result, extraArtifactClassifier, customExtension, false); return result.toString(); }
|
getRelativePathForExtraArtifact
|
13,964
|
String (@Nullable String extraClassifier) { if (StringUtilRt.isEmptyOrSpaces(extraClassifier)) { return myClassifier; } String result = ""; if (MavenConstants.TYPE_TEST_JAR.equals(myType) || "tests".equals(myClassifier)) { result += "test"; } if (!StringUtilRt.isEmptyOrSpaces(extraClassifier)) { result += (!result.isEmpty() ? "-" + extraClassifier : extraClassifier); } return StringUtilRt.isEmptyOrSpaces(result) ? null : result; }
|
getFullClassifier
|
13,965
|
String (@Nullable String extraArtifactClassifier, @Nullable String customExtension) { String path = getPath(); if (extraArtifactClassifier == null && customExtension == null && Objects.equals(myVersion, myBaseVersion)) { return path; } int slashPos = path.lastIndexOf('/'); if (slashPos != -1) { StringBuilder res = new StringBuilder(); res.append(path, 0, slashPos + 1); res.append(myArtifactId); res.append('-'); res.append(myVersion); String fullClassifier = getFullClassifier(extraArtifactClassifier); if (fullClassifier != null) { res.append('-').append(fullClassifier); } res.append('.'); res.append(customExtension == null ? myExtension : customExtension); return res.toString(); } // unknown path format: try to add a classified at the end of the filename int dotPos = path.lastIndexOf('.'); if (dotPos != -1) {// sometimes path doesn't contain '.'; but i can't find any reason why. return path.substring(0, dotPos) + '-' + extraArtifactClassifier + (customExtension == null ? myExtension : customExtension); } return path; }
|
getPathForExtraArtifact
|
13,966
|
String () { StringBuilder builder = new StringBuilder(); MavenId.append(builder, myGroupId); MavenId.append(builder, myArtifactId); MavenId.append(builder, myVersion); return builder.toString(); }
|
getDisplayStringSimple
|
13,967
|
String () { StringBuilder builder = new StringBuilder(); MavenId.append(builder, myGroupId); MavenId.append(builder, myArtifactId); MavenId.append(builder, myType); MavenId.append(builder, myVersion); return builder.toString(); }
|
getDisplayStringWithType
|
13,968
|
String () { StringBuilder builder = new StringBuilder(); MavenId.append(builder, myGroupId); MavenId.append(builder, myArtifactId); MavenId.append(builder, myType); if (!StringUtilRt.isEmptyOrSpaces(myClassifier)) MavenId.append(builder, myClassifier); MavenId.append(builder, myVersion); return builder.toString(); }
|
getDisplayStringWithTypeAndClassifier
|
13,969
|
String () { StringBuilder builder = new StringBuilder(); MavenId.append(builder, myGroupId); MavenId.append(builder, myArtifactId); MavenId.append(builder, myType); if (!StringUtilRt.isEmptyOrSpaces(myClassifier)) MavenId.append(builder, myClassifier); MavenId.append(builder, myVersion); if (!StringUtilRt.isEmptyOrSpaces(myScope)) MavenId.append(builder, myScope); return builder.toString(); }
|
getDisplayStringFull
|
13,970
|
String () { String res = myLibraryNameCache; if (res == null) { StringBuilder builder = new StringBuilder(MAVEN_LIB_PREFIX); MavenId.appendFirst(builder, myGroupId); MavenId.append(builder, myArtifactId); if (!StringUtilRt.isEmptyOrSpaces(myType) && !MavenConstants.TYPE_JAR.equals(myType)) MavenId.append(builder, myType); if (!StringUtilRt.isEmptyOrSpaces(myClassifier)) MavenId.append(builder, myClassifier); String version = !StringUtilRt.isEmptyOrSpaces(myBaseVersion) ? myBaseVersion : myVersion; if (!StringUtilRt.isEmptyOrSpaces(version)) MavenId.append(builder, version); res = builder.toString(); myLibraryNameCache = res; } return res; }
|
getLibraryName
|
13,971
|
String () { return getLibraryName().substring(MAVEN_LIB_PREFIX.length()); }
|
getDisplayStringForLibraryName
|
13,972
|
boolean () { return myFileUnresolved; }
|
isFileUnresolved
|
13,973
|
void (boolean fileUnresolved) { myFileUnresolved = fileUnresolved; }
|
setFileUnresolved
|
13,974
|
boolean (@Nullable String libraryName) { return libraryName != null && libraryName.startsWith(MAVEN_LIB_PREFIX); }
|
isMavenLibrary
|
13,975
|
String () { return getDisplayStringFull(); }
|
toString
|
13,976
|
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MavenArtifact that = (MavenArtifact)o; return Objects.equals(myGroupId, that.myGroupId) && Objects.equals(myArtifactId, that.myArtifactId) && Objects.equals(myVersion, that.myVersion) && Objects.equals(myBaseVersion, that.myBaseVersion) && Objects.equals(myType, that.myType) && Objects.equals(myClassifier, that.myClassifier) && Objects.equals(myScope, that.myScope) && Objects.equals(myExtension, that.myExtension) && Objects.equals(myFile, that.myFile); }
|
equals
|
13,977
|
int () { int result = myGroupId != null ? myGroupId.hashCode() : 0; result = 31 * result + (myArtifactId != null ? myArtifactId.hashCode() : 0); result = 31 * result + (myVersion != null ? myVersion.hashCode() : 0); result = 31 * result + (myBaseVersion != null ? myBaseVersion.hashCode() : 0); result = 31 * result + (myType != null ? myType.hashCode() : 0); result = 31 * result + (myClassifier != null ? myClassifier.hashCode() : 0); result = 31 * result + (myScope != null ? myScope.hashCode() : 0); result = 31 * result + (myExtension != null ? myExtension.hashCode() : 0); result = 31 * result + (myFile != null ? myFile.hashCode() : 0); return result; }
|
hashCode
|
13,978
|
MavenArtifact (File newFile, File newLocalRepository) { return new MavenArtifact( myGroupId, myArtifactId, myVersion, myBaseVersion, myType, myClassifier, myScope, myOptional, myExtension, newFile, newLocalRepository, myResolved, myStubbed); }
|
replaceFile
|
13,979
|
String () { return myId; }
|
getId
|
13,980
|
String () { return myName; }
|
getName
|
13,981
|
String () { return myUrl; }
|
getUrl
|
13,982
|
IndexKind () { return myKind; }
|
getKind
|
13,983
|
String () { StringBuilder builder = new StringBuilder(); MavenId.append(builder, myId); MavenId.append(builder, myName); MavenId.append(builder, myUrl); return builder.toString(); }
|
toString
|
13,984
|
MavenProjectProblem (String path, String description, boolean recoverable) { return createProblem(path, description, MavenProjectProblem.ProblemType.STRUCTURE, recoverable); }
|
createStructureProblem
|
13,985
|
MavenProjectProblem (String path, String description) { return createProblem(path, description, MavenProjectProblem.ProblemType.STRUCTURE, false); }
|
createStructureProblem
|
13,986
|
MavenProjectProblem (String path, MavenProjectProblem.ProblemType type) { return createProblem(path, MessageFormat.format("''{0}'' has syntax errors", new File(path).getName()), type, false); }
|
createSyntaxProblem
|
13,987
|
MavenProjectProblem (String path, String description, MavenProjectProblem.ProblemType type, boolean recoverable) { return new MavenProjectProblem(path, description, type, recoverable); }
|
createProblem
|
13,988
|
MavenProjectProblem (String path, String description, boolean recoverable, MavenArtifact mavenArtifact) { return new MavenProjectProblem(path, description, ProblemType.REPOSITORY, recoverable, mavenArtifact); }
|
createRepositoryProblem
|
13,989
|
MavenProjectProblem (String path, String description, boolean recoverable, MavenArtifact mavenArtifact) { return new MavenProjectProblem(path, description, ProblemType.DEPENDENCY, recoverable, mavenArtifact); }
|
createUnresolvedArtifactProblem
|
13,990
|
Collection<MavenProjectProblem> () { return createProblemsList(Collections.emptySet()); }
|
createProblemsList
|
13,991
|
Collection<MavenProjectProblem> (Collection<? extends MavenProjectProblem> copyThis) { return new LinkedHashSet<MavenProjectProblem>(copyThis); }
|
createProblemsList
|
13,992
|
String () { return myPath; }
|
getPath
|
13,993
|
boolean () { return myRecoverable; }
|
isRecoverable
|
13,994
|
ProblemType () { return myType; }
|
getType
|
13,995
|
MavenArtifact () { return myMavenArtifact; }
|
getMavenArtifact
|
13,996
|
String () { return myType + ":" + myDescription + ":" + myPath; }
|
toString
|
13,997
|
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MavenProjectProblem that = (MavenProjectProblem)o; if (!Objects.equals(myDescription, that.myDescription)) return false; if (myType != that.myType) return false; if (!Objects.equals(myPath, that.myPath)) return false; return true; }
|
equals
|
13,998
|
int () { int result = myPath != null ? myPath.hashCode() : 0; result = 31 * result + (myDescription != null ? myDescription.hashCode() : 0); result = 31 * result + (myType != null ? myType.hashCode() : 0); return result; }
|
hashCode
|
13,999
|
Test () { TestSuite testSuite = new TestSuite("All Shell Script tests"); testSuite.addTest(LexerSuite.suite()); testSuite.addTest(ParserSuite.suite()); testSuite.addTest(CompletionAndTemplateSuite.suite()); testSuite.addTest(InspectionsSuite.suite()); testSuite.addTest(OthersSuite.suite()); return testSuite; }
|
suite
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.