id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
64,300 | elki-project/elki | elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java | DiSH.sortClusters | private List<Cluster<SubspaceModel>> sortClusters(Relation<V> relation, Object2ObjectMap<long[], List<ArrayModifiableDBIDs>> clustersMap) {
final int db_dim = RelationUtil.dimensionality(relation);
// int num = 1;
List<Cluster<SubspaceModel>> clusters = new ArrayList<>();
for(long[] pv : clustersMap.key... | java | private List<Cluster<SubspaceModel>> sortClusters(Relation<V> relation, Object2ObjectMap<long[], List<ArrayModifiableDBIDs>> clustersMap) {
final int db_dim = RelationUtil.dimensionality(relation);
// int num = 1;
List<Cluster<SubspaceModel>> clusters = new ArrayList<>();
for(long[] pv : clustersMap.key... | [
"private",
"List",
"<",
"Cluster",
"<",
"SubspaceModel",
">",
">",
"sortClusters",
"(",
"Relation",
"<",
"V",
">",
"relation",
",",
"Object2ObjectMap",
"<",
"long",
"[",
"]",
",",
"List",
"<",
"ArrayModifiableDBIDs",
">",
">",
"clustersMap",
")",
"{",
"fin... | Returns a sorted list of the clusters w.r.t. the subspace dimensionality in
descending order.
@param relation the database storing the objects
@param clustersMap the mapping of bits sets to clusters
@return a sorted list of the clusters | [
"Returns",
"a",
"sorted",
"list",
"of",
"the",
"clusters",
"w",
".",
"r",
".",
"t",
".",
"the",
"subspace",
"dimensionality",
"in",
"descending",
"order",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java#L334-L359 |
64,301 | elki-project/elki | elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java | DiSH.checkClusters | private void checkClusters(Relation<V> relation, Object2ObjectMap<long[], List<ArrayModifiableDBIDs>> clustersMap) {
final int dimensionality = RelationUtil.dimensionality(relation);
// check if there are clusters < minpts
// and add them to not assigned
List<Pair<long[], ArrayModifiableDBIDs>> notAssig... | java | private void checkClusters(Relation<V> relation, Object2ObjectMap<long[], List<ArrayModifiableDBIDs>> clustersMap) {
final int dimensionality = RelationUtil.dimensionality(relation);
// check if there are clusters < minpts
// and add them to not assigned
List<Pair<long[], ArrayModifiableDBIDs>> notAssig... | [
"private",
"void",
"checkClusters",
"(",
"Relation",
"<",
"V",
">",
"relation",
",",
"Object2ObjectMap",
"<",
"long",
"[",
"]",
",",
"List",
"<",
"ArrayModifiableDBIDs",
">",
">",
"clustersMap",
")",
"{",
"final",
"int",
"dimensionality",
"=",
"RelationUtil",
... | Removes the clusters with size < minpts from the cluster map and adds them
to their parents.
@param relation the relation storing the objects
@param clustersMap the map containing the clusters | [
"Removes",
"the",
"clusters",
"with",
"size",
"<",
";",
"minpts",
"from",
"the",
"cluster",
"map",
"and",
"adds",
"them",
"to",
"their",
"parents",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java#L368-L413 |
64,302 | elki-project/elki | elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java | DiSH.findParent | private Pair<long[], ArrayModifiableDBIDs> findParent(Relation<V> relation, Pair<long[], ArrayModifiableDBIDs> child, Object2ObjectMap<long[], List<ArrayModifiableDBIDs>> clustersMap) {
Centroid child_centroid = ProjectedCentroid.make(child.first, relation, child.second);
Pair<long[], ArrayModifiableDBIDs> res... | java | private Pair<long[], ArrayModifiableDBIDs> findParent(Relation<V> relation, Pair<long[], ArrayModifiableDBIDs> child, Object2ObjectMap<long[], List<ArrayModifiableDBIDs>> clustersMap) {
Centroid child_centroid = ProjectedCentroid.make(child.first, relation, child.second);
Pair<long[], ArrayModifiableDBIDs> res... | [
"private",
"Pair",
"<",
"long",
"[",
"]",
",",
"ArrayModifiableDBIDs",
">",
"findParent",
"(",
"Relation",
"<",
"V",
">",
"relation",
",",
"Pair",
"<",
"long",
"[",
"]",
",",
"ArrayModifiableDBIDs",
">",
"child",
",",
"Object2ObjectMap",
"<",
"long",
"[",
... | Returns the parent of the specified cluster
@param relation the relation storing the objects
@param child the child to search the parent for
@param clustersMap the map containing the clusters
@return the parent of the specified cluster | [
"Returns",
"the",
"parent",
"of",
"the",
"specified",
"cluster"
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java#L423-L453 |
64,303 | elki-project/elki | elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java | DiSH.subspaceDimensionality | private int subspaceDimensionality(NumberVector v1, NumberVector v2, long[] pv1, long[] pv2, long[] commonPreferenceVector) {
// number of zero values in commonPreferenceVector
int subspaceDim = v1.getDimensionality() - BitsUtil.cardinality(commonPreferenceVector);
// special case: v1 and v2 are in paralle... | java | private int subspaceDimensionality(NumberVector v1, NumberVector v2, long[] pv1, long[] pv2, long[] commonPreferenceVector) {
// number of zero values in commonPreferenceVector
int subspaceDim = v1.getDimensionality() - BitsUtil.cardinality(commonPreferenceVector);
// special case: v1 and v2 are in paralle... | [
"private",
"int",
"subspaceDimensionality",
"(",
"NumberVector",
"v1",
",",
"NumberVector",
"v2",
",",
"long",
"[",
"]",
"pv1",
",",
"long",
"[",
"]",
"pv2",
",",
"long",
"[",
"]",
"commonPreferenceVector",
")",
"{",
"// number of zero values in commonPreferenceVe... | Compute the common subspace dimensionality of two vectors.
@param v1 First vector
@param v2 Second vector
@param pv1 First preference
@param pv2 Second preference
@param commonPreferenceVector Common preference
@return Usually, v1.dim - commonPreference.cardinality, unless either pv1
and pv2 are a subset of the other. | [
"Compute",
"the",
"common",
"subspace",
"dimensionality",
"of",
"two",
"vectors",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java#L577-L589 |
64,304 | elki-project/elki | elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java | DiSH.weightedDistance | protected static double weightedDistance(NumberVector v1, NumberVector v2, long[] weightVector) {
double sqrDist = 0;
for(int i = BitsUtil.nextSetBit(weightVector, 0); i >= 0; i = BitsUtil.nextSetBit(weightVector, i + 1)) {
double manhattanI = v1.doubleValue(i) - v2.doubleValue(i);
sqrDist += manhat... | java | protected static double weightedDistance(NumberVector v1, NumberVector v2, long[] weightVector) {
double sqrDist = 0;
for(int i = BitsUtil.nextSetBit(weightVector, 0); i >= 0; i = BitsUtil.nextSetBit(weightVector, i + 1)) {
double manhattanI = v1.doubleValue(i) - v2.doubleValue(i);
sqrDist += manhat... | [
"protected",
"static",
"double",
"weightedDistance",
"(",
"NumberVector",
"v1",
",",
"NumberVector",
"v2",
",",
"long",
"[",
"]",
"weightVector",
")",
"{",
"double",
"sqrDist",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"BitsUtil",
".",
"nextSetBit",
"(",... | Computes the weighted distance between the two specified vectors according
to the given preference vector.
@param v1 the first vector
@param v2 the second vector
@param weightVector the preference vector
@return the weighted distance between the two specified vectors according
to the given preference vector | [
"Computes",
"the",
"weighted",
"distance",
"between",
"the",
"two",
"specified",
"vectors",
"according",
"to",
"the",
"given",
"preference",
"vector",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java#L601-L608 |
64,305 | elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/StandardCovarianceMatrixBuilder.java | StandardCovarianceMatrixBuilder.processIds | @Override
public double[][] processIds(DBIDs ids, Relation<? extends NumberVector> database) {
return CovarianceMatrix.make(database, ids).destroyToPopulationMatrix();
} | java | @Override
public double[][] processIds(DBIDs ids, Relation<? extends NumberVector> database) {
return CovarianceMatrix.make(database, ids).destroyToPopulationMatrix();
} | [
"@",
"Override",
"public",
"double",
"[",
"]",
"[",
"]",
"processIds",
"(",
"DBIDs",
"ids",
",",
"Relation",
"<",
"?",
"extends",
"NumberVector",
">",
"database",
")",
"{",
"return",
"CovarianceMatrix",
".",
"make",
"(",
"database",
",",
"ids",
")",
".",... | Compute Covariance Matrix for a collection of database IDs.
@param ids a collection of ids
@param database the database used
@return Covariance Matrix | [
"Compute",
"Covariance",
"Matrix",
"for",
"a",
"collection",
"of",
"database",
"IDs",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/StandardCovarianceMatrixBuilder.java#L46-L49 |
64,306 | elki-project/elki | elki-input/src/main/java/de/lmu/ifi/dbs/elki/datasource/filter/cleaning/VectorDimensionalityFilter.java | VectorDimensionalityFilter.updateMeta | private void updateMeta() {
meta = new BundleMeta();
BundleMeta origmeta = source.getMeta();
for(int i = 0; i < origmeta.size(); i++) {
SimpleTypeInformation<?> type = origmeta.get(i);
if(column < 0) {
// Test whether this type matches
if(TypeUtil.NUMBER_VECTOR_VARIABLE_LENGTH.is... | java | private void updateMeta() {
meta = new BundleMeta();
BundleMeta origmeta = source.getMeta();
for(int i = 0; i < origmeta.size(); i++) {
SimpleTypeInformation<?> type = origmeta.get(i);
if(column < 0) {
// Test whether this type matches
if(TypeUtil.NUMBER_VECTOR_VARIABLE_LENGTH.is... | [
"private",
"void",
"updateMeta",
"(",
")",
"{",
"meta",
"=",
"new",
"BundleMeta",
"(",
")",
";",
"BundleMeta",
"origmeta",
"=",
"source",
".",
"getMeta",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"origmeta",
".",
"size",
"(",
... | Update metadata. | [
"Update",
"metadata",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-input/src/main/java/de/lmu/ifi/dbs/elki/datasource/filter/cleaning/VectorDimensionalityFilter.java#L136-L177 |
64,307 | elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/LogisticDistribution.java | LogisticDistribution.logquantile | public static double logquantile(double val, double loc, double scale) {
return loc + scale * (val - MathUtil.log1mexp(-val));
} | java | public static double logquantile(double val, double loc, double scale) {
return loc + scale * (val - MathUtil.log1mexp(-val));
} | [
"public",
"static",
"double",
"logquantile",
"(",
"double",
"val",
",",
"double",
"loc",
",",
"double",
"scale",
")",
"{",
"return",
"loc",
"+",
"scale",
"*",
"(",
"val",
"-",
"MathUtil",
".",
"log1mexp",
"(",
"-",
"val",
")",
")",
";",
"}"
] | log Quantile function.
TODO: untested.
@param val Value
@param loc Location
@param scale Scale
@return Quantile | [
"log",
"Quantile",
"function",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/LogisticDistribution.java#L199-L201 |
64,308 | elki-project/elki | elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/LogClusterSizes.java | LogClusterSizes.logClusterSizes | public static <C extends Model> void logClusterSizes(Clustering<C> c) {
if(!LOG.isStatistics()) {
return;
}
final List<Cluster<C>> clusters = c.getAllClusters();
final int numc = clusters.size();
LOG.statistics(new StringStatistic(PREFIX + "name", c.getLongName()));
LOG.statistics(new Long... | java | public static <C extends Model> void logClusterSizes(Clustering<C> c) {
if(!LOG.isStatistics()) {
return;
}
final List<Cluster<C>> clusters = c.getAllClusters();
final int numc = clusters.size();
LOG.statistics(new StringStatistic(PREFIX + "name", c.getLongName()));
LOG.statistics(new Long... | [
"public",
"static",
"<",
"C",
"extends",
"Model",
">",
"void",
"logClusterSizes",
"(",
"Clustering",
"<",
"C",
">",
"c",
")",
"{",
"if",
"(",
"!",
"LOG",
".",
"isStatistics",
"(",
")",
")",
"{",
"return",
";",
"}",
"final",
"List",
"<",
"Cluster",
... | Log the cluster sizes of a clustering.
@param c Clustering ot analyze | [
"Log",
"the",
"cluster",
"sizes",
"of",
"a",
"clustering",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/LogClusterSizes.java#L62-L96 |
64,309 | elki-project/elki | elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUESubspace.java | CLIQUESubspace.addDenseUnit | public void addDenseUnit(CLIQUEUnit unit) {
int numdim = unit.dimensionality();
for(int i = 0; i < numdim; i++) {
BitsUtil.setI(getDimensions(), unit.getDimension(i));
}
denseUnits.add(unit);
coverage += unit.numberOfFeatureVectors();
} | java | public void addDenseUnit(CLIQUEUnit unit) {
int numdim = unit.dimensionality();
for(int i = 0; i < numdim; i++) {
BitsUtil.setI(getDimensions(), unit.getDimension(i));
}
denseUnits.add(unit);
coverage += unit.numberOfFeatureVectors();
} | [
"public",
"void",
"addDenseUnit",
"(",
"CLIQUEUnit",
"unit",
")",
"{",
"int",
"numdim",
"=",
"unit",
".",
"dimensionality",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numdim",
";",
"i",
"++",
")",
"{",
"BitsUtil",
".",
"setI",... | Adds the specified dense unit to this subspace.
@param unit the unit to be added. | [
"Adds",
"the",
"specified",
"dense",
"unit",
"to",
"this",
"subspace",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUESubspace.java#L81-L89 |
64,310 | elki-project/elki | elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUESubspace.java | CLIQUESubspace.determineClusters | public List<Pair<Subspace, ModifiableDBIDs>> determineClusters() {
List<Pair<Subspace, ModifiableDBIDs>> clusters = new ArrayList<>();
for(CLIQUEUnit unit : denseUnits) {
if(!unit.isAssigned()) {
ModifiableDBIDs cluster = DBIDUtil.newHashSet();
CLIQUESubspace model = new CLIQUESubspace(ge... | java | public List<Pair<Subspace, ModifiableDBIDs>> determineClusters() {
List<Pair<Subspace, ModifiableDBIDs>> clusters = new ArrayList<>();
for(CLIQUEUnit unit : denseUnits) {
if(!unit.isAssigned()) {
ModifiableDBIDs cluster = DBIDUtil.newHashSet();
CLIQUESubspace model = new CLIQUESubspace(ge... | [
"public",
"List",
"<",
"Pair",
"<",
"Subspace",
",",
"ModifiableDBIDs",
">",
">",
"determineClusters",
"(",
")",
"{",
"List",
"<",
"Pair",
"<",
"Subspace",
",",
"ModifiableDBIDs",
">",
">",
"clusters",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",... | Determines all clusters in this subspace by performing a depth-first search
algorithm to find connected dense units.
@return the clusters in this subspace and the corresponding cluster models | [
"Determines",
"all",
"clusters",
"in",
"this",
"subspace",
"by",
"performing",
"a",
"depth",
"-",
"first",
"search",
"algorithm",
"to",
"find",
"connected",
"dense",
"units",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUESubspace.java#L97-L109 |
64,311 | elki-project/elki | elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUESubspace.java | CLIQUESubspace.dfs | public void dfs(CLIQUEUnit unit, ModifiableDBIDs cluster, CLIQUESubspace model) {
cluster.addDBIDs(unit.getIds());
unit.markAsAssigned();
model.addDenseUnit(unit);
final long[] dims = getDimensions();
for(int dim = BitsUtil.nextSetBit(dims, 0); dim >= 0; dim = BitsUtil.nextSetBit(dims, dim + 1)) {
... | java | public void dfs(CLIQUEUnit unit, ModifiableDBIDs cluster, CLIQUESubspace model) {
cluster.addDBIDs(unit.getIds());
unit.markAsAssigned();
model.addDenseUnit(unit);
final long[] dims = getDimensions();
for(int dim = BitsUtil.nextSetBit(dims, 0); dim >= 0; dim = BitsUtil.nextSetBit(dims, dim + 1)) {
... | [
"public",
"void",
"dfs",
"(",
"CLIQUEUnit",
"unit",
",",
"ModifiableDBIDs",
"cluster",
",",
"CLIQUESubspace",
"model",
")",
"{",
"cluster",
".",
"addDBIDs",
"(",
"unit",
".",
"getIds",
"(",
")",
")",
";",
"unit",
".",
"markAsAssigned",
"(",
")",
";",
"mo... | Depth-first search algorithm to find connected dense units in this subspace
that build a cluster. It starts with a unit, assigns it to a cluster and
finds all units it is connected to.
@param unit the unit
@param cluster the IDs of the feature vectors of the current cluster
@param model the model of the cluster | [
"Depth",
"-",
"first",
"search",
"algorithm",
"to",
"find",
"connected",
"dense",
"units",
"in",
"this",
"subspace",
"that",
"build",
"a",
"cluster",
".",
"It",
"starts",
"with",
"a",
"unit",
"assigns",
"it",
"to",
"a",
"cluster",
"and",
"finds",
"all",
... | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUESubspace.java#L120-L137 |
64,312 | elki-project/elki | elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUESubspace.java | CLIQUESubspace.leftNeighbor | protected CLIQUEUnit leftNeighbor(CLIQUEUnit unit, int dim) {
for(CLIQUEUnit u : denseUnits) {
if(u.containsLeftNeighbor(unit, dim)) {
return u;
}
}
return null;
} | java | protected CLIQUEUnit leftNeighbor(CLIQUEUnit unit, int dim) {
for(CLIQUEUnit u : denseUnits) {
if(u.containsLeftNeighbor(unit, dim)) {
return u;
}
}
return null;
} | [
"protected",
"CLIQUEUnit",
"leftNeighbor",
"(",
"CLIQUEUnit",
"unit",
",",
"int",
"dim",
")",
"{",
"for",
"(",
"CLIQUEUnit",
"u",
":",
"denseUnits",
")",
"{",
"if",
"(",
"u",
".",
"containsLeftNeighbor",
"(",
"unit",
",",
"dim",
")",
")",
"{",
"return",
... | Returns the left neighbor of the given unit in the specified dimension.
@param unit the unit to determine the left neighbor for
@param dim the dimension
@return the left neighbor of the given unit in the specified dimension | [
"Returns",
"the",
"left",
"neighbor",
"of",
"the",
"given",
"unit",
"in",
"the",
"specified",
"dimension",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUESubspace.java#L146-L153 |
64,313 | elki-project/elki | elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUESubspace.java | CLIQUESubspace.rightNeighbor | protected CLIQUEUnit rightNeighbor(CLIQUEUnit unit, int dim) {
for(CLIQUEUnit u : denseUnits) {
if(u.containsRightNeighbor(unit, dim)) {
return u;
}
}
return null;
} | java | protected CLIQUEUnit rightNeighbor(CLIQUEUnit unit, int dim) {
for(CLIQUEUnit u : denseUnits) {
if(u.containsRightNeighbor(unit, dim)) {
return u;
}
}
return null;
} | [
"protected",
"CLIQUEUnit",
"rightNeighbor",
"(",
"CLIQUEUnit",
"unit",
",",
"int",
"dim",
")",
"{",
"for",
"(",
"CLIQUEUnit",
"u",
":",
"denseUnits",
")",
"{",
"if",
"(",
"u",
".",
"containsRightNeighbor",
"(",
"unit",
",",
"dim",
")",
")",
"{",
"return"... | Returns the right neighbor of the given unit in the specified dimension.
@param unit the unit to determine the right neighbor for
@param dim the dimension
@return the right neighbor of the given unit in the specified dimension | [
"Returns",
"the",
"right",
"neighbor",
"of",
"the",
"given",
"unit",
"in",
"the",
"specified",
"dimension",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUESubspace.java#L162-L169 |
64,314 | elki-project/elki | addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java | XSplitter.getCommonSplitDimensions | private IntIterator getCommonSplitDimensions(N node) {
Collection<SplitHistory> splitHistories = new ArrayList<>(node.getNumEntries());
for(int i = 0; i < node.getNumEntries(); i++) {
SpatialEntry entry = node.getEntry(i);
if(!(entry instanceof XTreeDirectoryEntry)) {
throw new RuntimeExcept... | java | private IntIterator getCommonSplitDimensions(N node) {
Collection<SplitHistory> splitHistories = new ArrayList<>(node.getNumEntries());
for(int i = 0; i < node.getNumEntries(); i++) {
SpatialEntry entry = node.getEntry(i);
if(!(entry instanceof XTreeDirectoryEntry)) {
throw new RuntimeExcept... | [
"private",
"IntIterator",
"getCommonSplitDimensions",
"(",
"N",
"node",
")",
"{",
"Collection",
"<",
"SplitHistory",
">",
"splitHistories",
"=",
"new",
"ArrayList",
"<>",
"(",
"node",
".",
"getNumEntries",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"... | Determine the common split dimensions from a list of entries.
@param node node for which to determine the common split
dimensions
@return common split dimensions | [
"Determine",
"the",
"common",
"split",
"dimensions",
"from",
"a",
"list",
"of",
"entries",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java#L379-L389 |
64,315 | elki-project/elki | addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java | XSplitter.mbr | private HyperBoundingBox mbr(final int[] entries, final int from, final int to) {
SpatialEntry first = this.node.getEntry(entries[from]);
ModifiableHyperBoundingBox mbr = new ModifiableHyperBoundingBox(first);
for(int i = from + 1; i < to; i++) {
mbr.extend(this.node.getEntry(entries[i]));
}
r... | java | private HyperBoundingBox mbr(final int[] entries, final int from, final int to) {
SpatialEntry first = this.node.getEntry(entries[from]);
ModifiableHyperBoundingBox mbr = new ModifiableHyperBoundingBox(first);
for(int i = from + 1; i < to; i++) {
mbr.extend(this.node.getEntry(entries[i]));
}
r... | [
"private",
"HyperBoundingBox",
"mbr",
"(",
"final",
"int",
"[",
"]",
"entries",
",",
"final",
"int",
"from",
",",
"final",
"int",
"to",
")",
"{",
"SpatialEntry",
"first",
"=",
"this",
".",
"node",
".",
"getEntry",
"(",
"entries",
"[",
"from",
"]",
")",... | Computes and returns the mbr of the specified nodes, only the nodes between
from and to index are considered.
@param entries the array of node indices
@param from the start index
@param to the end index
@return the mbr of the specified nodes | [
"Computes",
"and",
"returns",
"the",
"mbr",
"of",
"the",
"specified",
"nodes",
"only",
"the",
"nodes",
"between",
"from",
"and",
"to",
"index",
"are",
"considered",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java#L724-L731 |
64,316 | elki-project/elki | elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/ArrayModifiableIntegerDBIDs.java | ArrayModifiableIntegerDBIDs.ensureSize | private void ensureSize(int minsize) {
if(minsize <= store.length) {
return;
}
int asize = store.length;
while(asize < minsize) {
asize = (asize >>> 1) + asize;
}
final int[] prev = store;
store = new int[asize];
System.arraycopy(prev, 0, store, 0, size);
} | java | private void ensureSize(int minsize) {
if(minsize <= store.length) {
return;
}
int asize = store.length;
while(asize < minsize) {
asize = (asize >>> 1) + asize;
}
final int[] prev = store;
store = new int[asize];
System.arraycopy(prev, 0, store, 0, size);
} | [
"private",
"void",
"ensureSize",
"(",
"int",
"minsize",
")",
"{",
"if",
"(",
"minsize",
"<=",
"store",
".",
"length",
")",
"{",
"return",
";",
"}",
"int",
"asize",
"=",
"store",
".",
"length",
";",
"while",
"(",
"asize",
"<",
"minsize",
")",
"{",
"... | Resize as desired.
@param minsize Desired size | [
"Resize",
"as",
"desired",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/ArrayModifiableIntegerDBIDs.java#L123-L134 |
64,317 | elki-project/elki | elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/ArrayModifiableIntegerDBIDs.java | ArrayModifiableIntegerDBIDs.grow | private void grow() {
final int newsize = store.length + (store.length >>> 1);
final int[] prev = store;
store = new int[newsize];
System.arraycopy(prev, 0, store, 0, size);
} | java | private void grow() {
final int newsize = store.length + (store.length >>> 1);
final int[] prev = store;
store = new int[newsize];
System.arraycopy(prev, 0, store, 0, size);
} | [
"private",
"void",
"grow",
"(",
")",
"{",
"final",
"int",
"newsize",
"=",
"store",
".",
"length",
"+",
"(",
"store",
".",
"length",
">>>",
"1",
")",
";",
"final",
"int",
"[",
"]",
"prev",
"=",
"store",
";",
"store",
"=",
"new",
"int",
"[",
"newsi... | Grow array by 50%. | [
"Grow",
"array",
"by",
"50%",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/ArrayModifiableIntegerDBIDs.java#L139-L144 |
64,318 | elki-project/elki | elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/SOS.java | SOS.sumOfProbabilities | public static double sumOfProbabilities(DBIDIter ignore, DBIDArrayIter di, double[] p) {
double s = 0;
for(di.seek(0); di.valid(); di.advance()) {
if(DBIDUtil.equal(ignore, di)) {
continue;
}
final double v = p[di.getOffset()];
if(!(v > 0)) {
break;
}
s += v;
... | java | public static double sumOfProbabilities(DBIDIter ignore, DBIDArrayIter di, double[] p) {
double s = 0;
for(di.seek(0); di.valid(); di.advance()) {
if(DBIDUtil.equal(ignore, di)) {
continue;
}
final double v = p[di.getOffset()];
if(!(v > 0)) {
break;
}
s += v;
... | [
"public",
"static",
"double",
"sumOfProbabilities",
"(",
"DBIDIter",
"ignore",
",",
"DBIDArrayIter",
"di",
",",
"double",
"[",
"]",
"p",
")",
"{",
"double",
"s",
"=",
"0",
";",
"for",
"(",
"di",
".",
"seek",
"(",
"0",
")",
";",
"di",
".",
"valid",
... | Compute the sum of probabilities, stop at first 0, ignore query object.
Note: while SOS ensures the 'ignore' object is not added in the first
place, KNNSOS cannot do so efficiently (yet).
@param ignore Object to ignore.
@param di Object list
@param p Probabilities
@return Sum. | [
"Compute",
"the",
"sum",
"of",
"probabilities",
"stop",
"at",
"first",
"0",
"ignore",
"query",
"object",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/SOS.java#L164-L177 |
64,319 | elki-project/elki | addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/thumbs/ThumbnailThread.java | ThumbnailThread.queue | public synchronized static Task queue(Listener callback) {
final Task task = new Task(callback);
// TODO: synchronization?
if(THREAD != null && THREAD.isAlive()) {
THREAD.queue.add(task);
return task;
}
THREAD = new ThumbnailThread();
THREAD.queue.add(task);
THREAD.start();
r... | java | public synchronized static Task queue(Listener callback) {
final Task task = new Task(callback);
// TODO: synchronization?
if(THREAD != null && THREAD.isAlive()) {
THREAD.queue.add(task);
return task;
}
THREAD = new ThumbnailThread();
THREAD.queue.add(task);
THREAD.start();
r... | [
"public",
"synchronized",
"static",
"Task",
"queue",
"(",
"Listener",
"callback",
")",
"{",
"final",
"Task",
"task",
"=",
"new",
"Task",
"(",
"callback",
")",
";",
"// TODO: synchronization?",
"if",
"(",
"THREAD",
"!=",
"null",
"&&",
"THREAD",
".",
"isAlive"... | Queue a thumbnail task in a global thumbnail thread.
@param callback Callback | [
"Queue",
"a",
"thumbnail",
"task",
"in",
"a",
"global",
"thumbnail",
"thread",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/thumbs/ThumbnailThread.java#L55-L66 |
64,320 | elki-project/elki | addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/thumbs/ThumbnailThread.java | ThumbnailThread.unqueue | public static void unqueue(Task task) {
if(THREAD != null) {
synchronized(THREAD) {
THREAD.queue.remove(task);
}
}
} | java | public static void unqueue(Task task) {
if(THREAD != null) {
synchronized(THREAD) {
THREAD.queue.remove(task);
}
}
} | [
"public",
"static",
"void",
"unqueue",
"(",
"Task",
"task",
")",
"{",
"if",
"(",
"THREAD",
"!=",
"null",
")",
"{",
"synchronized",
"(",
"THREAD",
")",
"{",
"THREAD",
".",
"queue",
".",
"remove",
"(",
"task",
")",
";",
"}",
"}",
"}"
] | Remove a pending task from the queue.
@param task Task to remove. | [
"Remove",
"a",
"pending",
"task",
"from",
"the",
"queue",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/thumbs/ThumbnailThread.java#L73-L79 |
64,321 | elki-project/elki | elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/progress/StepProgress.java | StepProgress.beginStep | public void beginStep(int step, String stepTitle, Logging logger) {
setProcessed(step - 1);
this.stepTitle = stepTitle;
logger.progress(this);
} | java | public void beginStep(int step, String stepTitle, Logging logger) {
setProcessed(step - 1);
this.stepTitle = stepTitle;
logger.progress(this);
} | [
"public",
"void",
"beginStep",
"(",
"int",
"step",
",",
"String",
"stepTitle",
",",
"Logging",
"logger",
")",
"{",
"setProcessed",
"(",
"step",
"-",
"1",
")",
";",
"this",
".",
"stepTitle",
"=",
"stepTitle",
";",
"logger",
".",
"progress",
"(",
"this",
... | Do a new step and log it
@param step Step number
@param stepTitle Step title
@param logger Logger to report to. | [
"Do",
"a",
"new",
"step",
"and",
"log",
"it"
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/progress/StepProgress.java#L80-L84 |
64,322 | elki-project/elki | addons/uncertain/src/main/java/de/lmu/ifi/dbs/elki/data/uncertain/AbstractUncertainObject.java | AbstractUncertainObject.computeBounds | protected static HyperBoundingBox computeBounds(NumberVector[] samples) {
assert(samples.length > 0) : "Cannot compute bounding box of empty set.";
// Compute bounds:
final int dimensions = samples[0].getDimensionality();
final double[] min = new double[dimensions];
final double[] max = new double[d... | java | protected static HyperBoundingBox computeBounds(NumberVector[] samples) {
assert(samples.length > 0) : "Cannot compute bounding box of empty set.";
// Compute bounds:
final int dimensions = samples[0].getDimensionality();
final double[] min = new double[dimensions];
final double[] max = new double[d... | [
"protected",
"static",
"HyperBoundingBox",
"computeBounds",
"(",
"NumberVector",
"[",
"]",
"samples",
")",
"{",
"assert",
"(",
"samples",
".",
"length",
">",
"0",
")",
":",
"\"Cannot compute bounding box of empty set.\"",
";",
"// Compute bounds:",
"final",
"int",
"... | Compute the bounding box for some samples.
@param samples Samples
@return Bounding box. | [
"Compute",
"the",
"bounding",
"box",
"for",
"some",
"samples",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/uncertain/src/main/java/de/lmu/ifi/dbs/elki/data/uncertain/AbstractUncertainObject.java#L50-L69 |
64,323 | elki-project/elki | elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java | MaterializeKNNPreprocessor.preprocess | @Override
protected void preprocess() {
final Logging log = getLogger(); // Could be subclass
createStorage();
ArrayDBIDs ids = DBIDUtil.ensureArray(relation.getDBIDs());
if(log.isStatistics()) {
log.statistics(new LongStatistic(this.getClass().getName() + ".k", k));
}
Duration duratio... | java | @Override
protected void preprocess() {
final Logging log = getLogger(); // Could be subclass
createStorage();
ArrayDBIDs ids = DBIDUtil.ensureArray(relation.getDBIDs());
if(log.isStatistics()) {
log.statistics(new LongStatistic(this.getClass().getName() + ".k", k));
}
Duration duratio... | [
"@",
"Override",
"protected",
"void",
"preprocess",
"(",
")",
"{",
"final",
"Logging",
"log",
"=",
"getLogger",
"(",
")",
";",
"// Could be subclass",
"createStorage",
"(",
")",
";",
"ArrayDBIDs",
"ids",
"=",
"DBIDUtil",
".",
"ensureArray",
"(",
"relation",
... | The actual preprocessing step. | [
"The",
"actual",
"preprocessing",
"step",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java#L107-L152 |
64,324 | elki-project/elki | elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java | MaterializeKNNPreprocessor.objectsInserted | protected void objectsInserted(DBIDs ids) {
final Logging log = getLogger(); // Could be subclass
StepProgress stepprog = log.isVerbose() ? new StepProgress(3) : null;
ArrayDBIDs aids = DBIDUtil.ensureArray(ids);
// materialize the new kNNs
log.beginStep(stepprog, 1, "New insertions ocurred, materi... | java | protected void objectsInserted(DBIDs ids) {
final Logging log = getLogger(); // Could be subclass
StepProgress stepprog = log.isVerbose() ? new StepProgress(3) : null;
ArrayDBIDs aids = DBIDUtil.ensureArray(ids);
// materialize the new kNNs
log.beginStep(stepprog, 1, "New insertions ocurred, materi... | [
"protected",
"void",
"objectsInserted",
"(",
"DBIDs",
"ids",
")",
"{",
"final",
"Logging",
"log",
"=",
"getLogger",
"(",
")",
";",
"// Could be subclass",
"StepProgress",
"stepprog",
"=",
"log",
".",
"isVerbose",
"(",
")",
"?",
"new",
"StepProgress",
"(",
"3... | Called after new objects have been inserted, updates the materialized
neighborhood.
@param ids the ids of the newly inserted objects | [
"Called",
"after",
"new",
"objects",
"have",
"been",
"inserted",
"updates",
"the",
"materialized",
"neighborhood",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java#L186-L210 |
64,325 | elki-project/elki | elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java | MaterializeKNNPreprocessor.objectsRemoved | protected void objectsRemoved(DBIDs ids) {
final Logging log = getLogger();
StepProgress stepprog = log.isVerbose() ? new StepProgress(3) : null;
// delete the materialized (old) kNNs
log.beginStep(stepprog, 1, "New deletions ocurred, remove their materialized kNNs.");
for(DBIDIter iter = ids.iter(... | java | protected void objectsRemoved(DBIDs ids) {
final Logging log = getLogger();
StepProgress stepprog = log.isVerbose() ? new StepProgress(3) : null;
// delete the materialized (old) kNNs
log.beginStep(stepprog, 1, "New deletions ocurred, remove their materialized kNNs.");
for(DBIDIter iter = ids.iter(... | [
"protected",
"void",
"objectsRemoved",
"(",
"DBIDs",
"ids",
")",
"{",
"final",
"Logging",
"log",
"=",
"getLogger",
"(",
")",
";",
"StepProgress",
"stepprog",
"=",
"log",
".",
"isVerbose",
"(",
")",
"?",
"new",
"StepProgress",
"(",
"3",
")",
":",
"null",
... | Called after objects have been removed, updates the materialized
neighborhood.
@param ids the ids of the removed objects | [
"Called",
"after",
"objects",
"have",
"been",
"removed",
"updates",
"the",
"materialized",
"neighborhood",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java#L279-L298 |
64,326 | elki-project/elki | elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java | MaterializeKNNPreprocessor.fireKNNsInserted | protected void fireKNNsInserted(DBIDs insertions, DBIDs updates) {
KNNChangeEvent e = new KNNChangeEvent(this, KNNChangeEvent.Type.INSERT, insertions, updates);
Object[] listeners = listenerList.getListenerList();
for(int i = listeners.length - 2; i >= 0; i -= 2) {
if(listeners[i] == KNNListener.class... | java | protected void fireKNNsInserted(DBIDs insertions, DBIDs updates) {
KNNChangeEvent e = new KNNChangeEvent(this, KNNChangeEvent.Type.INSERT, insertions, updates);
Object[] listeners = listenerList.getListenerList();
for(int i = listeners.length - 2; i >= 0; i -= 2) {
if(listeners[i] == KNNListener.class... | [
"protected",
"void",
"fireKNNsInserted",
"(",
"DBIDs",
"insertions",
",",
"DBIDs",
"updates",
")",
"{",
"KNNChangeEvent",
"e",
"=",
"new",
"KNNChangeEvent",
"(",
"this",
",",
"KNNChangeEvent",
".",
"Type",
".",
"INSERT",
",",
"insertions",
",",
"updates",
")",... | Informs all registered KNNListener that new kNNs have been inserted and as
a result some kNNs have been changed.
@param insertions the ids of the newly inserted kNNs
@param updates the ids of kNNs which have been changed due to the
insertions
@see KNNListener | [
"Informs",
"all",
"registered",
"KNNListener",
"that",
"new",
"kNNs",
"have",
"been",
"inserted",
"and",
"as",
"a",
"result",
"some",
"kNNs",
"have",
"been",
"changed",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java#L309-L317 |
64,327 | elki-project/elki | elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java | MaterializeKNNPreprocessor.fireKNNsRemoved | protected void fireKNNsRemoved(DBIDs removals, DBIDs updates) {
KNNChangeEvent e = new KNNChangeEvent(this, KNNChangeEvent.Type.DELETE, removals, updates);
Object[] listeners = listenerList.getListenerList();
for(int i = listeners.length - 2; i >= 0; i -= 2) {
if(listeners[i] == KNNListener.class) {
... | java | protected void fireKNNsRemoved(DBIDs removals, DBIDs updates) {
KNNChangeEvent e = new KNNChangeEvent(this, KNNChangeEvent.Type.DELETE, removals, updates);
Object[] listeners = listenerList.getListenerList();
for(int i = listeners.length - 2; i >= 0; i -= 2) {
if(listeners[i] == KNNListener.class) {
... | [
"protected",
"void",
"fireKNNsRemoved",
"(",
"DBIDs",
"removals",
",",
"DBIDs",
"updates",
")",
"{",
"KNNChangeEvent",
"e",
"=",
"new",
"KNNChangeEvent",
"(",
"this",
",",
"KNNChangeEvent",
".",
"Type",
".",
"DELETE",
",",
"removals",
",",
"updates",
")",
";... | Informs all registered KNNListener that existing kNNs have been removed and
as a result some kNNs have been changed.
@param removals the ids of the removed kNNs
@param updates the ids of kNNs which have been changed due to the removals
@see KNNListener | [
"Informs",
"all",
"registered",
"KNNListener",
"that",
"existing",
"kNNs",
"have",
"been",
"removed",
"and",
"as",
"a",
"result",
"some",
"kNNs",
"have",
"been",
"changed",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java#L327-L335 |
64,328 | elki-project/elki | elki-classification/src/main/java/de/lmu/ifi/dbs/elki/algorithm/classification/PriorProbabilityClassifier.java | PriorProbabilityClassifier.buildClassifier | @Override
public void buildClassifier(Database database, Relation<? extends ClassLabel> labelrep) {
Object2IntOpenHashMap<ClassLabel> count = new Object2IntOpenHashMap<>();
for(DBIDIter iter = labelrep.iterDBIDs(); iter.valid(); iter.advance()) {
count.addTo(labelrep.get(iter), 1);
}
int max = I... | java | @Override
public void buildClassifier(Database database, Relation<? extends ClassLabel> labelrep) {
Object2IntOpenHashMap<ClassLabel> count = new Object2IntOpenHashMap<>();
for(DBIDIter iter = labelrep.iterDBIDs(); iter.valid(); iter.advance()) {
count.addTo(labelrep.get(iter), 1);
}
int max = I... | [
"@",
"Override",
"public",
"void",
"buildClassifier",
"(",
"Database",
"database",
",",
"Relation",
"<",
"?",
"extends",
"ClassLabel",
">",
"labelrep",
")",
"{",
"Object2IntOpenHashMap",
"<",
"ClassLabel",
">",
"count",
"=",
"new",
"Object2IntOpenHashMap",
"<>",
... | Learns the prior probability for all classes. | [
"Learns",
"the",
"prior",
"probability",
"for",
"all",
"classes",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-classification/src/main/java/de/lmu/ifi/dbs/elki/algorithm/classification/PriorProbabilityClassifier.java#L79-L100 |
64,329 | elki-project/elki | elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/strategies/split/MMRadSplit.java | MMRadSplit.split | @Override
public Assignments<E> split(AbstractMTree<?, N, E, ?> tree, N node) {
final int n = node.getNumEntries();
double[][] distanceMatrix = computeDistanceMatrix(tree, node);
double miSumCR = Double.POSITIVE_INFINITY;
boolean leaf = node.isLeaf();
Assignments<E> bestAssignment = null;
for... | java | @Override
public Assignments<E> split(AbstractMTree<?, N, E, ?> tree, N node) {
final int n = node.getNumEntries();
double[][] distanceMatrix = computeDistanceMatrix(tree, node);
double miSumCR = Double.POSITIVE_INFINITY;
boolean leaf = node.isLeaf();
Assignments<E> bestAssignment = null;
for... | [
"@",
"Override",
"public",
"Assignments",
"<",
"E",
">",
"split",
"(",
"AbstractMTree",
"<",
"?",
",",
"N",
",",
"E",
",",
"?",
">",
"tree",
",",
"N",
"node",
")",
"{",
"final",
"int",
"n",
"=",
"node",
".",
"getNumEntries",
"(",
")",
";",
"doubl... | Selects two objects of the specified node to be promoted and stored into
the parent node. The mM-RAD strategy considers all possible pairs of
objects and, after partitioning the set of entries, promotes the pair of
objects for which the larger of the two covering radiuses is minimum.
@param tree Tree to use
@param nod... | [
"Selects",
"two",
"objects",
"of",
"the",
"specified",
"node",
"to",
"be",
"promoted",
"and",
"stored",
"into",
"the",
"parent",
"node",
".",
"The",
"mM",
"-",
"RAD",
"strategy",
"considers",
"all",
"possible",
"pairs",
"of",
"objects",
"and",
"after",
"pa... | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/strategies/split/MMRadSplit.java#L70-L90 |
64,330 | elki-project/elki | elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/AbstractKMeansInitialization.java | AbstractKMeansInitialization.unboxVectors | public static double[][] unboxVectors(List<? extends NumberVector> means) {
double[][] ret = new double[means.size()][];
for(int i = 0; i < ret.length; i++) {
ret[i] = means.get(i).toArray();
}
return ret;
} | java | public static double[][] unboxVectors(List<? extends NumberVector> means) {
double[][] ret = new double[means.size()][];
for(int i = 0; i < ret.length; i++) {
ret[i] = means.get(i).toArray();
}
return ret;
} | [
"public",
"static",
"double",
"[",
"]",
"[",
"]",
"unboxVectors",
"(",
"List",
"<",
"?",
"extends",
"NumberVector",
">",
"means",
")",
"{",
"double",
"[",
"]",
"[",
"]",
"ret",
"=",
"new",
"double",
"[",
"means",
".",
"size",
"(",
")",
"]",
"[",
... | Unbox database means to primitive means.
@param means Database means
@return List of primitive {@code double[]} means | [
"Unbox",
"database",
"means",
"to",
"primitive",
"means",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/AbstractKMeansInitialization.java#L59-L65 |
64,331 | elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/PearsonCorrelation.java | PearsonCorrelation.put | public void put(double x, double y, double w) {
if(w == 0.) {
return;
}
if(sumWe <= 0.) {
sumX = x * w;
sumY = y * w;
sumWe = w;
return;
}
// Delta to previous mean
final double deltaX = x * sumWe - sumX;
final double deltaY = y * sumWe - sumY;
final double ... | java | public void put(double x, double y, double w) {
if(w == 0.) {
return;
}
if(sumWe <= 0.) {
sumX = x * w;
sumY = y * w;
sumWe = w;
return;
}
// Delta to previous mean
final double deltaX = x * sumWe - sumX;
final double deltaY = y * sumWe - sumY;
final double ... | [
"public",
"void",
"put",
"(",
"double",
"x",
",",
"double",
"y",
",",
"double",
"w",
")",
"{",
"if",
"(",
"w",
"==",
"0.",
")",
"{",
"return",
";",
"}",
"if",
"(",
"sumWe",
"<=",
"0.",
")",
"{",
"sumX",
"=",
"x",
"*",
"w",
";",
"sumY",
"=",... | Put a single value into the correlation statistic.
@param x Value in X
@param y Value in Y
@param w Weight | [
"Put",
"a",
"single",
"value",
"into",
"the",
"correlation",
"statistic",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/PearsonCorrelation.java#L72-L97 |
64,332 | elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/PearsonCorrelation.java | PearsonCorrelation.getCorrelation | public double getCorrelation() {
if(!(sumXX > 0. && sumYY > 0.)) {
return (sumXX == sumYY) ? 1. : 0.;
}
return sumXY / FastMath.sqrt(sumXX * sumYY);
} | java | public double getCorrelation() {
if(!(sumXX > 0. && sumYY > 0.)) {
return (sumXX == sumYY) ? 1. : 0.;
}
return sumXY / FastMath.sqrt(sumXX * sumYY);
} | [
"public",
"double",
"getCorrelation",
"(",
")",
"{",
"if",
"(",
"!",
"(",
"sumXX",
">",
"0.",
"&&",
"sumYY",
">",
"0.",
")",
")",
"{",
"return",
"(",
"sumXX",
"==",
"sumYY",
")",
"?",
"1.",
":",
"0.",
";",
"}",
"return",
"sumXY",
"/",
"FastMath",... | Get the Pearson correlation value.
@return Correlation value | [
"Get",
"the",
"Pearson",
"correlation",
"value",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/PearsonCorrelation.java#L134-L139 |
64,333 | elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/PearsonCorrelation.java | PearsonCorrelation.coefficient | public static double coefficient(double[] x, double[] y) {
final int xdim = x.length;
final int ydim = y.length;
if(xdim != ydim) {
throw new IllegalArgumentException("Invalid arguments: arrays differ in length.");
}
if(xdim == 0) {
throw new IllegalArgumentException("Empty vector.");
... | java | public static double coefficient(double[] x, double[] y) {
final int xdim = x.length;
final int ydim = y.length;
if(xdim != ydim) {
throw new IllegalArgumentException("Invalid arguments: arrays differ in length.");
}
if(xdim == 0) {
throw new IllegalArgumentException("Empty vector.");
... | [
"public",
"static",
"double",
"coefficient",
"(",
"double",
"[",
"]",
"x",
",",
"double",
"[",
"]",
"y",
")",
"{",
"final",
"int",
"xdim",
"=",
"x",
".",
"length",
";",
"final",
"int",
"ydim",
"=",
"y",
".",
"length",
";",
"if",
"(",
"xdim",
"!="... | Compute the Pearson product-moment correlation coefficient for two
FeatureVectors.
@param x first FeatureVector
@param y second FeatureVector
@return the Pearson product-moment correlation coefficient for x and y | [
"Compute",
"the",
"Pearson",
"product",
"-",
"moment",
"correlation",
"coefficient",
"for",
"two",
"FeatureVectors",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/PearsonCorrelation.java#L284-L321 |
64,334 | elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/PearsonCorrelation.java | PearsonCorrelation.weightedCoefficient | public static double weightedCoefficient(NumberVector x, NumberVector y, double[] weights) {
final int xdim = x.getDimensionality();
final int ydim = y.getDimensionality();
if(xdim != ydim) {
throw new IllegalArgumentException("Invalid arguments: number vectors differ in dimensionality.");
}
i... | java | public static double weightedCoefficient(NumberVector x, NumberVector y, double[] weights) {
final int xdim = x.getDimensionality();
final int ydim = y.getDimensionality();
if(xdim != ydim) {
throw new IllegalArgumentException("Invalid arguments: number vectors differ in dimensionality.");
}
i... | [
"public",
"static",
"double",
"weightedCoefficient",
"(",
"NumberVector",
"x",
",",
"NumberVector",
"y",
",",
"double",
"[",
"]",
"weights",
")",
"{",
"final",
"int",
"xdim",
"=",
"x",
".",
"getDimensionality",
"(",
")",
";",
"final",
"int",
"ydim",
"=",
... | Compute the Pearson product-moment correlation coefficient for two
NumberVectors.
@param x first NumberVector
@param y second NumberVector
@param weights Weights
@return the Pearson product-moment correlation coefficient for x and y | [
"Compute",
"the",
"Pearson",
"product",
"-",
"moment",
"correlation",
"coefficient",
"for",
"two",
"NumberVectors",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/PearsonCorrelation.java#L429-L468 |
64,335 | elki-project/elki | elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/arraylike/ExtendedArray.java | ExtendedArray.extend | @SuppressWarnings("unchecked")
public static <T, A> ExtendedArray<T> extend(A array, ArrayAdapter<T, A> getter, T extra) {
return new ExtendedArray<>(array, (ArrayAdapter<T, Object>) getter, extra);
} | java | @SuppressWarnings("unchecked")
public static <T, A> ExtendedArray<T> extend(A array, ArrayAdapter<T, A> getter, T extra) {
return new ExtendedArray<>(array, (ArrayAdapter<T, Object>) getter, extra);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
",",
"A",
">",
"ExtendedArray",
"<",
"T",
">",
"extend",
"(",
"A",
"array",
",",
"ArrayAdapter",
"<",
"T",
",",
"A",
">",
"getter",
",",
"T",
"extra",
")",
"{",
"return... | Static wrapper that has a nicer generics signature.
@param array Array to extend
@param getter Getter for array
@param extra Extra element
@return Extended array | [
"Static",
"wrapper",
"that",
"has",
"a",
"nicer",
"generics",
"signature",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/arraylike/ExtendedArray.java#L90-L93 |
64,336 | elki-project/elki | elki/src/main/java/de/lmu/ifi/dbs/elki/result/SelectionResult.java | SelectionResult.ensureSelectionResult | public static SelectionResult ensureSelectionResult(final Database db) {
List<SelectionResult> selections = ResultUtil.filterResults(db.getHierarchy(), db, SelectionResult.class);
if(!selections.isEmpty()) {
return selections.get(0);
}
SelectionResult sel = new SelectionResult();
ResultUtil.ad... | java | public static SelectionResult ensureSelectionResult(final Database db) {
List<SelectionResult> selections = ResultUtil.filterResults(db.getHierarchy(), db, SelectionResult.class);
if(!selections.isEmpty()) {
return selections.get(0);
}
SelectionResult sel = new SelectionResult();
ResultUtil.ad... | [
"public",
"static",
"SelectionResult",
"ensureSelectionResult",
"(",
"final",
"Database",
"db",
")",
"{",
"List",
"<",
"SelectionResult",
">",
"selections",
"=",
"ResultUtil",
".",
"filterResults",
"(",
"db",
".",
"getHierarchy",
"(",
")",
",",
"db",
",",
"Sel... | Ensure that there also is a selection container object.
@param db Database
@return selection result | [
"Ensure",
"that",
"there",
"also",
"is",
"a",
"selection",
"container",
"object",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/result/SelectionResult.java#L81-L89 |
64,337 | elki-project/elki | addons/3dpc/src/main/java/de/lmu/ifi/dbs/elki/visualization/parallel3d/util/Arcball1DOFAdapter.java | Arcball1DOFAdapter.debugRender | @SuppressWarnings("unused")
public void debugRender(GL2 gl) {
if (!DEBUG || (startcamera == null)) {
return;
}
gl.glLineWidth(3f);
gl.glColor4f(1.f, 0.f, 0.f, .66f);
gl.glBegin(GL.GL_LINES);
gl.glVertex3f(0.f, 0.f, 0.f);
double rot = startangle - startcamera.getRotationZ();
gl.gl... | java | @SuppressWarnings("unused")
public void debugRender(GL2 gl) {
if (!DEBUG || (startcamera == null)) {
return;
}
gl.glLineWidth(3f);
gl.glColor4f(1.f, 0.f, 0.f, .66f);
gl.glBegin(GL.GL_LINES);
gl.glVertex3f(0.f, 0.f, 0.f);
double rot = startangle - startcamera.getRotationZ();
gl.gl... | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"public",
"void",
"debugRender",
"(",
"GL2",
"gl",
")",
"{",
"if",
"(",
"!",
"DEBUG",
"||",
"(",
"startcamera",
"==",
"null",
")",
")",
"{",
"return",
";",
"}",
"gl",
".",
"glLineWidth",
"(",
"3f",
")"... | Render a debugging hint for the arcball tool.
@param gl GL class for rendering- | [
"Render",
"a",
"debugging",
"hint",
"for",
"the",
"arcball",
"tool",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/3dpc/src/main/java/de/lmu/ifi/dbs/elki/visualization/parallel3d/util/Arcball1DOFAdapter.java#L150-L164 |
64,338 | elki-project/elki | elki/src/main/java/de/lmu/ifi/dbs/elki/result/SettingsResult.java | SettingsResult.getSettingsResults | public static List<SettingsResult> getSettingsResults(Result r) {
if(r instanceof SettingsResult) {
List<SettingsResult> ors = new ArrayList<>(1);
ors.add((SettingsResult) r);
return ors;
}
if(r instanceof HierarchicalResult) {
return ResultUtil.filterResults(((HierarchicalResult) r)... | java | public static List<SettingsResult> getSettingsResults(Result r) {
if(r instanceof SettingsResult) {
List<SettingsResult> ors = new ArrayList<>(1);
ors.add((SettingsResult) r);
return ors;
}
if(r instanceof HierarchicalResult) {
return ResultUtil.filterResults(((HierarchicalResult) r)... | [
"public",
"static",
"List",
"<",
"SettingsResult",
">",
"getSettingsResults",
"(",
"Result",
"r",
")",
"{",
"if",
"(",
"r",
"instanceof",
"SettingsResult",
")",
"{",
"List",
"<",
"SettingsResult",
">",
"ors",
"=",
"new",
"ArrayList",
"<>",
"(",
"1",
")",
... | Collect all settings results from a Result
@param r Result
@return List of settings results | [
"Collect",
"all",
"settings",
"results",
"from",
"a",
"Result"
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/result/SettingsResult.java#L68-L78 |
64,339 | elki-project/elki | elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/application/AbstractApplication.java | AbstractApplication.usage | public static String usage(Collection<TrackedParameter> options) {
StringBuilder usage = new StringBuilder(10000);
if(!REFERENCE_VERSION.equals(VERSION)) {
usage.append("ELKI build: ").append(VERSION).append(NEWLINE).append(NEWLINE);
}
usage.append(REFERENCE);
// Collect options
OptionUti... | java | public static String usage(Collection<TrackedParameter> options) {
StringBuilder usage = new StringBuilder(10000);
if(!REFERENCE_VERSION.equals(VERSION)) {
usage.append("ELKI build: ").append(VERSION).append(NEWLINE).append(NEWLINE);
}
usage.append(REFERENCE);
// Collect options
OptionUti... | [
"public",
"static",
"String",
"usage",
"(",
"Collection",
"<",
"TrackedParameter",
">",
"options",
")",
"{",
"StringBuilder",
"usage",
"=",
"new",
"StringBuilder",
"(",
"10000",
")",
";",
"if",
"(",
"!",
"REFERENCE_VERSION",
".",
"equals",
"(",
"VERSION",
")... | Returns a usage message, explaining all known options
@param options Options to show in usage.
@return a usage message explaining all known options | [
"Returns",
"a",
"usage",
"message",
"explaining",
"all",
"known",
"options"
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/application/AbstractApplication.java#L195-L206 |
64,340 | elki-project/elki | elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/application/AbstractApplication.java | AbstractApplication.printErrorMessage | protected static void printErrorMessage(Exception e) {
if(e instanceof AbortException) {
// ensure we actually show the message:
LoggingConfiguration.setVerbose(Level.VERBOSE);
LOG.verbose(e.getMessage());
}
else if(e instanceof UnspecifiedParameterException) {
LOG.error(e.getMessage... | java | protected static void printErrorMessage(Exception e) {
if(e instanceof AbortException) {
// ensure we actually show the message:
LoggingConfiguration.setVerbose(Level.VERBOSE);
LOG.verbose(e.getMessage());
}
else if(e instanceof UnspecifiedParameterException) {
LOG.error(e.getMessage... | [
"protected",
"static",
"void",
"printErrorMessage",
"(",
"Exception",
"e",
")",
"{",
"if",
"(",
"e",
"instanceof",
"AbortException",
")",
"{",
"// ensure we actually show the message:",
"LoggingConfiguration",
".",
"setVerbose",
"(",
"Level",
".",
"VERBOSE",
")",
";... | Print an error message for the given error.
@param e Error Exception. | [
"Print",
"an",
"error",
"message",
"for",
"the",
"given",
"error",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/application/AbstractApplication.java#L213-L228 |
64,341 | elki-project/elki | elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/application/AbstractApplication.java | AbstractApplication.printDescription | private static void printDescription(Class<?> descriptionClass) {
if(descriptionClass == null) {
return;
}
try {
LoggingConfiguration.setVerbose(Level.VERBOSE);
LOG.verbose(OptionUtil.describeParameterizable(new StringBuilder(), descriptionClass, FormatUtil.getConsoleWidth(), "").toString(... | java | private static void printDescription(Class<?> descriptionClass) {
if(descriptionClass == null) {
return;
}
try {
LoggingConfiguration.setVerbose(Level.VERBOSE);
LOG.verbose(OptionUtil.describeParameterizable(new StringBuilder(), descriptionClass, FormatUtil.getConsoleWidth(), "").toString(... | [
"private",
"static",
"void",
"printDescription",
"(",
"Class",
"<",
"?",
">",
"descriptionClass",
")",
"{",
"if",
"(",
"descriptionClass",
"==",
"null",
")",
"{",
"return",
";",
"}",
"try",
"{",
"LoggingConfiguration",
".",
"setVerbose",
"(",
"Level",
".",
... | Print the description for the given parameter | [
"Print",
"the",
"description",
"for",
"the",
"given",
"parameter"
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/application/AbstractApplication.java#L233-L244 |
64,342 | elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geometry/PrimsMinimumSpanningTree.java | PrimsMinimumSpanningTree.processDense | public static <T> void processDense(T data, Adapter<T> adapter, Collector collector) {
// Number of nodes
final int n = adapter.size(data);
// Best distance for each node
double[] best = new double[n];
Arrays.fill(best, Double.POSITIVE_INFINITY);
// Best previous node
int[] src = new int[n];... | java | public static <T> void processDense(T data, Adapter<T> adapter, Collector collector) {
// Number of nodes
final int n = adapter.size(data);
// Best distance for each node
double[] best = new double[n];
Arrays.fill(best, Double.POSITIVE_INFINITY);
// Best previous node
int[] src = new int[n];... | [
"public",
"static",
"<",
"T",
">",
"void",
"processDense",
"(",
"T",
"data",
",",
"Adapter",
"<",
"T",
">",
"adapter",
",",
"Collector",
"collector",
")",
"{",
"// Number of nodes",
"final",
"int",
"n",
"=",
"adapter",
".",
"size",
"(",
"data",
")",
";... | Run Prim's algorithm on a dense graph.
@param data Data set
@param adapter Adapter instance
@param collector Edge collector | [
"Run",
"Prim",
"s",
"algorithm",
"on",
"a",
"dense",
"graph",
"."
] | b54673327e76198ecd4c8a2a901021f1a9174498 | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geometry/PrimsMinimumSpanningTree.java#L131-L177 |
64,343 | SonarOpenCommunity/sonar-cxx | cxx-sensors/src/main/java/org/sonar/cxx/sensors/compiler/CxxCompilerSensor.java | CxxCompilerSensor.isInputValid | protected boolean isInputValid(String filename, String line, String id, String msg) {
return !filename.isEmpty() || !line.isEmpty() || !id.isEmpty() || !msg.isEmpty();
} | java | protected boolean isInputValid(String filename, String line, String id, String msg) {
return !filename.isEmpty() || !line.isEmpty() || !id.isEmpty() || !msg.isEmpty();
} | [
"protected",
"boolean",
"isInputValid",
"(",
"String",
"filename",
",",
"String",
"line",
",",
"String",
"id",
",",
"String",
"msg",
")",
"{",
"return",
"!",
"filename",
".",
"isEmpty",
"(",
")",
"||",
"!",
"line",
".",
"isEmpty",
"(",
")",
"||",
"!",
... | Derived classes can overload this method
@param filename
@param line
@param id
@param msg
@return true, if valid | [
"Derived",
"classes",
"can",
"overload",
"this",
"method"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-sensors/src/main/java/org/sonar/cxx/sensors/compiler/CxxCompilerSensor.java#L116-L118 |
64,344 | SonarOpenCommunity/sonar-cxx | cxx-squid/src/main/java/org/sonar/cxx/CxxVCppBuildLogParser.java | CxxVCppBuildLogParser.parseVCppLine | public void parseVCppLine(String line, String projectPath, String compilationFile) {
this.parseVCppCompilerCLLine(line, projectPath, compilationFile);
} | java | public void parseVCppLine(String line, String projectPath, String compilationFile) {
this.parseVCppCompilerCLLine(line, projectPath, compilationFile);
} | [
"public",
"void",
"parseVCppLine",
"(",
"String",
"line",
",",
"String",
"projectPath",
",",
"String",
"compilationFile",
")",
"{",
"this",
".",
"parseVCppCompilerCLLine",
"(",
"line",
",",
"projectPath",
",",
"compilationFile",
")",
";",
"}"
] | Can be used to create a list of includes, defines and options for a single line If it follows the format of VC++
@param line
@param projectPath
@param compilationFile | [
"Can",
"be",
"used",
"to",
"create",
"a",
"list",
"of",
"includes",
"defines",
"and",
"options",
"for",
"a",
"single",
"line",
"If",
"it",
"follows",
"the",
"format",
"of",
"VC",
"++"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-squid/src/main/java/org/sonar/cxx/CxxVCppBuildLogParser.java#L111-L113 |
64,345 | SonarOpenCommunity/sonar-cxx | cxx-sensors/src/main/java/org/sonar/cxx/sensors/valgrind/ValgrindReportParser.java | ValgrindReportParser.processReport | public Set<ValgrindError> processReport(File report) throws XMLStreamException {
ValgrindReportStreamHandler streamHandler = new ValgrindReportStreamHandler();
new StaxParser(streamHandler).parse(report);
return streamHandler.valgrindErrors;
} | java | public Set<ValgrindError> processReport(File report) throws XMLStreamException {
ValgrindReportStreamHandler streamHandler = new ValgrindReportStreamHandler();
new StaxParser(streamHandler).parse(report);
return streamHandler.valgrindErrors;
} | [
"public",
"Set",
"<",
"ValgrindError",
">",
"processReport",
"(",
"File",
"report",
")",
"throws",
"XMLStreamException",
"{",
"ValgrindReportStreamHandler",
"streamHandler",
"=",
"new",
"ValgrindReportStreamHandler",
"(",
")",
";",
"new",
"StaxParser",
"(",
"streamHan... | Parses given valgrind report
@param report full path of XML report
@return Set<ValgrindError>
@exception XMLStreamException javax.xml.stream.XMLStreamException | [
"Parses",
"given",
"valgrind",
"report"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-sensors/src/main/java/org/sonar/cxx/sensors/valgrind/ValgrindReportParser.java#L46-L50 |
64,346 | SonarOpenCommunity/sonar-cxx | cxx-checks/src/main/java/org/sonar/cxx/checks/metrics/TooManyStatementsPerLineCheck.java | TooManyStatementsPerLineCheck.isGeneratedNodeExcluded | private static boolean isGeneratedNodeExcluded(AstNode astNode) {
AstNode prev = astNode.getPreviousAstNode();
return prev != null
&& prev.getTokenLine() == astNode.getTokenLine()
&& prev.isCopyBookOrGeneratedNode();
} | java | private static boolean isGeneratedNodeExcluded(AstNode astNode) {
AstNode prev = astNode.getPreviousAstNode();
return prev != null
&& prev.getTokenLine() == astNode.getTokenLine()
&& prev.isCopyBookOrGeneratedNode();
} | [
"private",
"static",
"boolean",
"isGeneratedNodeExcluded",
"(",
"AstNode",
"astNode",
")",
"{",
"AstNode",
"prev",
"=",
"astNode",
".",
"getPreviousAstNode",
"(",
")",
";",
"return",
"prev",
"!=",
"null",
"&&",
"prev",
".",
"getTokenLine",
"(",
")",
"==",
"a... | Exclude subsequent generated nodes, if they are consecutive and on the same line. | [
"Exclude",
"subsequent",
"generated",
"nodes",
"if",
"they",
"are",
"consecutive",
"and",
"on",
"the",
"same",
"line",
"."
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-checks/src/main/java/org/sonar/cxx/checks/metrics/TooManyStatementsPerLineCheck.java#L60-L65 |
64,347 | SonarOpenCommunity/sonar-cxx | cxx-checks/src/main/java/org/sonar/cxx/checks/metrics/TooManyStatementsPerLineCheck.java | TooManyStatementsPerLineCheck.isBreakStatementExcluded | private boolean isBreakStatementExcluded(AstNode astNode) {
boolean exclude = false;
if (excludeCaseBreak && astNode.getToken().getType().equals(CxxKeyword.BREAK)) {
for (AstNode statement = astNode.getFirstAncestor(CxxGrammarImpl.statement);
statement != null;
statement = statement.getPre... | java | private boolean isBreakStatementExcluded(AstNode astNode) {
boolean exclude = false;
if (excludeCaseBreak && astNode.getToken().getType().equals(CxxKeyword.BREAK)) {
for (AstNode statement = astNode.getFirstAncestor(CxxGrammarImpl.statement);
statement != null;
statement = statement.getPre... | [
"private",
"boolean",
"isBreakStatementExcluded",
"(",
"AstNode",
"astNode",
")",
"{",
"boolean",
"exclude",
"=",
"false",
";",
"if",
"(",
"excludeCaseBreak",
"&&",
"astNode",
".",
"getToken",
"(",
")",
".",
"getType",
"(",
")",
".",
"equals",
"(",
"CxxKeywo... | Exclude 'break' statement if it is on the same line as the switch label | [
"Exclude",
"break",
"statement",
"if",
"it",
"is",
"on",
"the",
"same",
"line",
"as",
"the",
"switch",
"label"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-checks/src/main/java/org/sonar/cxx/checks/metrics/TooManyStatementsPerLineCheck.java#L101-L118 |
64,348 | SonarOpenCommunity/sonar-cxx | cxx-checks/src/main/java/org/sonar/cxx/checks/metrics/TooManyStatementsPerLineCheck.java | TooManyStatementsPerLineCheck.isEmptyExpressionStatement | private boolean isEmptyExpressionStatement(AstNode astNode) {
if (astNode.is(CxxGrammarImpl.expressionStatement) && ";".equals(astNode.getToken().getValue())) {
AstNode statement = astNode.getFirstAncestor(CxxGrammarImpl.selectionStatement);
if (statement != null) {
return astNode.getTokenLine()... | java | private boolean isEmptyExpressionStatement(AstNode astNode) {
if (astNode.is(CxxGrammarImpl.expressionStatement) && ";".equals(astNode.getToken().getValue())) {
AstNode statement = astNode.getFirstAncestor(CxxGrammarImpl.selectionStatement);
if (statement != null) {
return astNode.getTokenLine()... | [
"private",
"boolean",
"isEmptyExpressionStatement",
"(",
"AstNode",
"astNode",
")",
"{",
"if",
"(",
"astNode",
".",
"is",
"(",
"CxxGrammarImpl",
".",
"expressionStatement",
")",
"&&",
"\";\"",
".",
"equals",
"(",
"astNode",
".",
"getToken",
"(",
")",
".",
"g... | Exclude empty expression statement | [
"Exclude",
"empty",
"expression",
"statement"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-checks/src/main/java/org/sonar/cxx/checks/metrics/TooManyStatementsPerLineCheck.java#L123-L133 |
64,349 | SonarOpenCommunity/sonar-cxx | cxx-squid/src/main/java/org/sonar/cxx/preprocessor/CxxPreprocessor.java | CxxPreprocessor.parsePredefinedUnitMacros | private Map<String, Macro> parsePredefinedUnitMacros(Map<String, Macro> configuredMacros) {
if (!ctorInProgress || (unitMacros != null)) {
throw new IllegalStateException("Preconditions for initial fill-out of predefinedUnitMacros were violated");
}
if (conf.getCompilationUnitSourceFiles().isEmpty() ... | java | private Map<String, Macro> parsePredefinedUnitMacros(Map<String, Macro> configuredMacros) {
if (!ctorInProgress || (unitMacros != null)) {
throw new IllegalStateException("Preconditions for initial fill-out of predefinedUnitMacros were violated");
}
if (conf.getCompilationUnitSourceFiles().isEmpty() ... | [
"private",
"Map",
"<",
"String",
",",
"Macro",
">",
"parsePredefinedUnitMacros",
"(",
"Map",
"<",
"String",
",",
"Macro",
">",
"configuredMacros",
")",
"{",
"if",
"(",
"!",
"ctorInProgress",
"||",
"(",
"unitMacros",
"!=",
"null",
")",
")",
"{",
"throw",
... | Create temporary unitMacros map; This map will be used as an active macros'
storage while parsing of forced includes. After parsing was over extract
resulting macros and destroy the unitMacros. fixedMacros will be set as
active macros again. | [
"Create",
"temporary",
"unitMacros",
"map",
";",
"This",
"map",
"will",
"be",
"used",
"as",
"an",
"active",
"macros",
"storage",
"while",
"parsing",
"of",
"forced",
"includes",
".",
"After",
"parsing",
"was",
"over",
"extract",
"resulting",
"macros",
"and",
... | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-squid/src/main/java/org/sonar/cxx/preprocessor/CxxPreprocessor.java#L214-L241 |
64,350 | SonarOpenCommunity/sonar-cxx | cxx-squid/src/main/java/org/sonar/cxx/CxxLanguage.java | CxxLanguage.getMetric | public <G extends Serializable> Metric<G> getMetric(CxxMetricsFactory.Key metricKey) {
Metric<G> metric = (Metric<G>) this.langSpecificMetrics.get(metricKey);
if (metric == null) {
throw new IllegalStateException("Requested metric " + metricKey + " couldn't be found");
}
return metric;
} | java | public <G extends Serializable> Metric<G> getMetric(CxxMetricsFactory.Key metricKey) {
Metric<G> metric = (Metric<G>) this.langSpecificMetrics.get(metricKey);
if (metric == null) {
throw new IllegalStateException("Requested metric " + metricKey + " couldn't be found");
}
return metric;
} | [
"public",
"<",
"G",
"extends",
"Serializable",
">",
"Metric",
"<",
"G",
">",
"getMetric",
"(",
"CxxMetricsFactory",
".",
"Key",
"metricKey",
")",
"{",
"Metric",
"<",
"G",
">",
"metric",
"=",
"(",
"Metric",
"<",
"G",
">",
")",
"this",
".",
"langSpecific... | Get language specific metric
@throws IllegalStateException if metric was not registered | [
"Get",
"language",
"specific",
"metric"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-squid/src/main/java/org/sonar/cxx/CxxLanguage.java#L117-L123 |
64,351 | SonarOpenCommunity/sonar-cxx | cxx-sensors/src/main/java/org/sonar/cxx/sensors/drmemory/DrMemoryParser.java | DrMemoryParser.getElements | public static List<String> getElements(File file, String charset) {
List<String> list = new ArrayList<>();
try (BufferedReader br = new BufferedReader(
new InputStreamReader(java.nio.file.Files.newInputStream(file.toPath()), charset))) {
StringBuilder sb = new StringBuilder(4096);
String line... | java | public static List<String> getElements(File file, String charset) {
List<String> list = new ArrayList<>();
try (BufferedReader br = new BufferedReader(
new InputStreamReader(java.nio.file.Files.newInputStream(file.toPath()), charset))) {
StringBuilder sb = new StringBuilder(4096);
String line... | [
"public",
"static",
"List",
"<",
"String",
">",
"getElements",
"(",
"File",
"file",
",",
"String",
"charset",
")",
"{",
"List",
"<",
"String",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"try",
"(",
"BufferedReader",
"br",
"=",
"new",
... | get all DrMemory elements from file
@param file with findings
@param charset file encoding character set
@return list of elements from report file | [
"get",
"all",
"DrMemory",
"elements",
"from",
"file"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-sensors/src/main/java/org/sonar/cxx/sensors/drmemory/DrMemoryParser.java#L92-L125 |
64,352 | SonarOpenCommunity/sonar-cxx | cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/CxxIssuesReportSensor.java | CxxIssuesReportSensor.saveUniqueViolation | public void saveUniqueViolation(SensorContext sensorContext, CxxReportIssue issue) {
if (uniqueIssues.add(issue)) {
saveViolation(sensorContext, issue);
}
} | java | public void saveUniqueViolation(SensorContext sensorContext, CxxReportIssue issue) {
if (uniqueIssues.add(issue)) {
saveViolation(sensorContext, issue);
}
} | [
"public",
"void",
"saveUniqueViolation",
"(",
"SensorContext",
"sensorContext",
",",
"CxxReportIssue",
"issue",
")",
"{",
"if",
"(",
"uniqueIssues",
".",
"add",
"(",
"issue",
")",
")",
"{",
"saveViolation",
"(",
"sensorContext",
",",
"issue",
")",
";",
"}",
... | Saves code violation only if it wasn't already saved
@param sensorContext
@param issue | [
"Saves",
"code",
"violation",
"only",
"if",
"it",
"wasn",
"t",
"already",
"saved"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/CxxIssuesReportSensor.java#L130-L134 |
64,353 | SonarOpenCommunity/sonar-cxx | cxx-squid/src/main/java/org/sonar/cxx/CxxAstScanner.java | CxxAstScanner.scanSingleFile | @SafeVarargs
public static SourceFile scanSingleFile(InputFile file, SensorContext sensorContext, CxxLanguage language,
SquidAstVisitor<Grammar>... visitors) {
return scanSingleFileConfig(language, file, new CxxConfiguration(sensorContext.fileSystem().encoding()),
visitors);
} | java | @SafeVarargs
public static SourceFile scanSingleFile(InputFile file, SensorContext sensorContext, CxxLanguage language,
SquidAstVisitor<Grammar>... visitors) {
return scanSingleFileConfig(language, file, new CxxConfiguration(sensorContext.fileSystem().encoding()),
visitors);
} | [
"@",
"SafeVarargs",
"public",
"static",
"SourceFile",
"scanSingleFile",
"(",
"InputFile",
"file",
",",
"SensorContext",
"sensorContext",
",",
"CxxLanguage",
"language",
",",
"SquidAstVisitor",
"<",
"Grammar",
">",
"...",
"visitors",
")",
"{",
"return",
"scanSingleFi... | Helper method for testing checks without having to deploy them on a Sonar instance.
@param file is the file to be checked
@param sensorContext SQ API batch side context
@param visitors AST checks and visitors to use
@param language CxxLanguage to use
@return file checked with measures and issues | [
"Helper",
"method",
"for",
"testing",
"checks",
"without",
"having",
"to",
"deploy",
"them",
"on",
"a",
"Sonar",
"instance",
"."
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-squid/src/main/java/org/sonar/cxx/CxxAstScanner.java#L74-L79 |
64,354 | SonarOpenCommunity/sonar-cxx | cxx-squid/src/main/java/org/sonar/cxx/CxxAstScanner.java | CxxAstScanner.scanSingleFileConfig | public static SourceFile scanSingleFileConfig(CxxLanguage language, InputFile file, CxxConfiguration cxxConfig,
SquidAstVisitor<Grammar>... visitors) {
if (!file.isFile()) {
throw new IllegalArgumentException("File '" + file + "' not found.");
}
AstScanner<Grammar> scanner = create(language, cxxCo... | java | public static SourceFile scanSingleFileConfig(CxxLanguage language, InputFile file, CxxConfiguration cxxConfig,
SquidAstVisitor<Grammar>... visitors) {
if (!file.isFile()) {
throw new IllegalArgumentException("File '" + file + "' not found.");
}
AstScanner<Grammar> scanner = create(language, cxxCo... | [
"public",
"static",
"SourceFile",
"scanSingleFileConfig",
"(",
"CxxLanguage",
"language",
",",
"InputFile",
"file",
",",
"CxxConfiguration",
"cxxConfig",
",",
"SquidAstVisitor",
"<",
"Grammar",
">",
"...",
"visitors",
")",
"{",
"if",
"(",
"!",
"file",
".",
"isFi... | Helper method for scanning a single file
@param file is the file to be checked
@param cxxConfig the plugin configuration
@param visitors AST checks and visitors to use
@param language for sensor
@return file checked with measures and issues | [
"Helper",
"method",
"for",
"scanning",
"a",
"single",
"file"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-squid/src/main/java/org/sonar/cxx/CxxAstScanner.java#L90-L103 |
64,355 | SonarOpenCommunity/sonar-cxx | cxx-sensors/src/main/java/org/sonar/cxx/sensors/coverage/CoberturaParser.java | CoberturaParser.join | public static String join(Path path1, Path path2) {
if (path2.toString().isEmpty()) {
return "";
}
if (!path1.isAbsolute()) {
path1 = Paths.get(".", path1.toString());
}
if (!path2.isAbsolute()) {
path2 = Paths.get(".", path2.toString());
}
Path result = path1.resolve(path... | java | public static String join(Path path1, Path path2) {
if (path2.toString().isEmpty()) {
return "";
}
if (!path1.isAbsolute()) {
path1 = Paths.get(".", path1.toString());
}
if (!path2.isAbsolute()) {
path2 = Paths.get(".", path2.toString());
}
Path result = path1.resolve(path... | [
"public",
"static",
"String",
"join",
"(",
"Path",
"path1",
",",
"Path",
"path2",
")",
"{",
"if",
"(",
"path2",
".",
"toString",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"if",
"(",
"!",
"path1",
".",
"isAbsolute",
... | Join two paths
path1 | path2 | result
---------|----------|-------
empty | empty | empty
empty | absolute | absolute path2
empty | relative | relative path2
absolute | empty | empty
relative | empty | empty
absolute | absolute | absolute path2
absolute | relative | absolute path1 + relative pat... | [
"Join",
"two",
"paths"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-sensors/src/main/java/org/sonar/cxx/sensors/coverage/CoberturaParser.java#L138-L155 |
64,356 | SonarOpenCommunity/sonar-cxx | cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/JsonCompilationDatabase.java | JsonCompilationDatabase.parse | public static void parse(CxxConfiguration config, File compileCommandsFile) throws IOException {
LOG.debug("Parsing 'JSON Compilation Database' format");
ObjectMapper mapper = new ObjectMapper();
mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
mapper.enable(DeserializationFeature.US... | java | public static void parse(CxxConfiguration config, File compileCommandsFile) throws IOException {
LOG.debug("Parsing 'JSON Compilation Database' format");
ObjectMapper mapper = new ObjectMapper();
mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
mapper.enable(DeserializationFeature.US... | [
"public",
"static",
"void",
"parse",
"(",
"CxxConfiguration",
"config",
",",
"File",
"compileCommandsFile",
")",
"throws",
"IOException",
"{",
"LOG",
".",
"debug",
"(",
"\"Parsing 'JSON Compilation Database' format\"",
")",
";",
"ObjectMapper",
"mapper",
"=",
"new",
... | Set up the given CxxConfiguration from the JSON compilation database
@param config
@param compileCommandsFile
@throws IOException | [
"Set",
"up",
"the",
"given",
"CxxConfiguration",
"from",
"the",
"JSON",
"compilation",
"database"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/JsonCompilationDatabase.java#L54-L89 |
64,357 | SonarOpenCommunity/sonar-cxx | cxx-squid/src/main/java/org/sonar/cxx/visitors/AbstractCxxPublicApiVisitor.java | AbstractCxxPublicApiVisitor.getOperatorId | private static String getOperatorId(AstNode operatorFunctionId) {
StringBuilder builder = new StringBuilder(
operatorFunctionId.getTokenValue());
AstNode operator = operatorFunctionId
.getFirstDescendant(CxxGrammarImpl.overloadableOperator);
if (operator != null) {
AstNode opNode = oper... | java | private static String getOperatorId(AstNode operatorFunctionId) {
StringBuilder builder = new StringBuilder(
operatorFunctionId.getTokenValue());
AstNode operator = operatorFunctionId
.getFirstDescendant(CxxGrammarImpl.overloadableOperator);
if (operator != null) {
AstNode opNode = oper... | [
"private",
"static",
"String",
"getOperatorId",
"(",
"AstNode",
"operatorFunctionId",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
"operatorFunctionId",
".",
"getTokenValue",
"(",
")",
")",
";",
"AstNode",
"operator",
"=",
"operatorFunctio... | XXX may go to a utility class | [
"XXX",
"may",
"go",
"to",
"a",
"utility",
"class"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-squid/src/main/java/org/sonar/cxx/visitors/AbstractCxxPublicApiVisitor.java#L210-L227 |
64,358 | SonarOpenCommunity/sonar-cxx | cxx-squid/src/main/java/org/sonar/cxx/visitors/AbstractCxxPublicApiVisitor.java | AbstractCxxPublicApiVisitor.getInlineDocumentation | private static List<Token> getInlineDocumentation(Token token, int line) {
List<Token> comments = new ArrayList<>();
for (Trivia trivia : token.getTrivia()) {
if (trivia.isComment()) {
Token triviaToken = trivia.getToken();
if ((triviaToken != null)
&& (triviaToken.getLine() == ... | java | private static List<Token> getInlineDocumentation(Token token, int line) {
List<Token> comments = new ArrayList<>();
for (Trivia trivia : token.getTrivia()) {
if (trivia.isComment()) {
Token triviaToken = trivia.getToken();
if ((triviaToken != null)
&& (triviaToken.getLine() == ... | [
"private",
"static",
"List",
"<",
"Token",
">",
"getInlineDocumentation",
"(",
"Token",
"token",
",",
"int",
"line",
")",
"{",
"List",
"<",
"Token",
">",
"comments",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Trivia",
"trivia",
":",
"to... | Check if inline Doxygen documentation is attached to the given token at specified line
@param token the token to inspect
@param line line of the inlined documentation
@return true if documentation is found for specified line, false otherwise | [
"Check",
"if",
"inline",
"Doxygen",
"documentation",
"is",
"attached",
"to",
"the",
"given",
"token",
"at",
"specified",
"line"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-squid/src/main/java/org/sonar/cxx/visitors/AbstractCxxPublicApiVisitor.java#L319-L336 |
64,359 | SonarOpenCommunity/sonar-cxx | cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/CxxReportSensor.java | CxxReportSensor.getContextStringProperty | public static String getContextStringProperty(SensorContext context, String name, String def) {
String s = context.config().get(name).orElse(null);
if (s == null || s.isEmpty()) {
return def;
}
return s;
} | java | public static String getContextStringProperty(SensorContext context, String name, String def) {
String s = context.config().get(name).orElse(null);
if (s == null || s.isEmpty()) {
return def;
}
return s;
} | [
"public",
"static",
"String",
"getContextStringProperty",
"(",
"SensorContext",
"context",
",",
"String",
"name",
",",
"String",
"def",
")",
"{",
"String",
"s",
"=",
"context",
".",
"config",
"(",
")",
".",
"get",
"(",
"name",
")",
".",
"orElse",
"(",
"n... | Get string property from configuration. If the string is not set or empty, return the default value.
@param context sensor context
@param name Name of the property
@param def Default value
@return Value of the property if set and not empty, else default value. | [
"Get",
"string",
"property",
"from",
"configuration",
".",
"If",
"the",
"string",
"is",
"not",
"set",
"or",
"empty",
"return",
"the",
"default",
"value",
"."
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/CxxReportSensor.java#L71-L77 |
64,360 | SonarOpenCommunity/sonar-cxx | cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/CxxReportSensor.java | CxxReportSensor.resolveFilename | @Nullable
public static String resolveFilename(final String baseDir, @Nullable final String filename) {
if (filename != null) {
// Normalization can return null if path is null, is invalid,
// or is a path with back-ticks outside known directory structure
String normalizedPath = FilenameU... | java | @Nullable
public static String resolveFilename(final String baseDir, @Nullable final String filename) {
if (filename != null) {
// Normalization can return null if path is null, is invalid,
// or is a path with back-ticks outside known directory structure
String normalizedPath = FilenameU... | [
"@",
"Nullable",
"public",
"static",
"String",
"resolveFilename",
"(",
"final",
"String",
"baseDir",
",",
"@",
"Nullable",
"final",
"String",
"filename",
")",
"{",
"if",
"(",
"filename",
"!=",
"null",
")",
"{",
"// Normalization can return null if path is null, is i... | resolveFilename normalizes the report full path
@param baseDir of the project
@param filename of the report
@return String | [
"resolveFilename",
"normalizes",
"the",
"report",
"full",
"path"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/CxxReportSensor.java#L86-L104 |
64,361 | SonarOpenCommunity/sonar-cxx | cxx-squid/src/main/java/org/sonar/cxx/visitors/MultiLocatitionSquidCheck.java | MultiLocatitionSquidCheck.createMultiLocationViolation | protected void createMultiLocationViolation(CxxReportIssue message) {
SourceFile sourceFile = getSourceFile();
Set<CxxReportIssue> messages = getMultiLocationCheckMessages(sourceFile);
if (messages == null) {
messages = new HashSet<>();
}
messages.add(message);
setMultiLocationViolation(so... | java | protected void createMultiLocationViolation(CxxReportIssue message) {
SourceFile sourceFile = getSourceFile();
Set<CxxReportIssue> messages = getMultiLocationCheckMessages(sourceFile);
if (messages == null) {
messages = new HashSet<>();
}
messages.add(message);
setMultiLocationViolation(so... | [
"protected",
"void",
"createMultiLocationViolation",
"(",
"CxxReportIssue",
"message",
")",
"{",
"SourceFile",
"sourceFile",
"=",
"getSourceFile",
"(",
")",
";",
"Set",
"<",
"CxxReportIssue",
">",
"messages",
"=",
"getMultiLocationCheckMessages",
"(",
"sourceFile",
")... | Add the given message to the current SourceFile object
@see SquidAstVisitorContext<G extends Grammar>.createLineViolation() for simple violations | [
"Add",
"the",
"given",
"message",
"to",
"the",
"current",
"SourceFile",
"object"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-squid/src/main/java/org/sonar/cxx/visitors/MultiLocatitionSquidCheck.java#L98-L106 |
64,362 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.getEpics | public List<Epic> getEpics(Object groupIdOrPath, Integer authorId, String labels,
EpicOrderBy orderBy, SortOrder sortOrder, String search, int page, int perPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm(page, perPage)
.withParam("author_id", authorId)
... | java | public List<Epic> getEpics(Object groupIdOrPath, Integer authorId, String labels,
EpicOrderBy orderBy, SortOrder sortOrder, String search, int page, int perPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm(page, perPage)
.withParam("author_id", authorId)
... | [
"public",
"List",
"<",
"Epic",
">",
"getEpics",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"authorId",
",",
"String",
"labels",
",",
"EpicOrderBy",
"orderBy",
",",
"SortOrder",
"sortOrder",
",",
"String",
"search",
",",
"int",
"page",
",",
"int",
"perPa... | Gets all epics of the requested group and its subgroups using the specified page and per page setting.
<pre><code>GitLab Endpoint: GET /groups/:id/epics</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@param authorId returns epics created by the give... | [
"Gets",
"all",
"epics",
"of",
"the",
"requested",
"group",
"and",
"its",
"subgroups",
"using",
"the",
"specified",
"page",
"and",
"per",
"page",
"setting",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L124-L134 |
64,363 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.getEpic | public Epic getEpic(Object groupIdOrPath, Integer epicIid) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid);
return (response.readEntity(Epic.class));
} | java | public Epic getEpic(Object groupIdOrPath, Integer epicIid) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid);
return (response.readEntity(Epic.class));
} | [
"public",
"Epic",
"getEpic",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"epicIid",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"groups\"",
",",
"getGroupIdOrP... | Get a single epic for the specified group.
<pre><code>GitLab Endpoint: GET /groups/:id/epics/:epic_iid</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@param epicIid the IID of the epic to get
@return an Epic instance for the specified Epic
@throws G... | [
"Get",
"a",
"single",
"epic",
"for",
"the",
"specified",
"group",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L193-L196 |
64,364 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.getOptionalEpic | public Optional<Epic> getOptionalEpic(Object groupIdOrPath, Integer epicIid) {
try {
return (Optional.ofNullable(getEpic(groupIdOrPath, epicIid)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | java | public Optional<Epic> getOptionalEpic(Object groupIdOrPath, Integer epicIid) {
try {
return (Optional.ofNullable(getEpic(groupIdOrPath, epicIid)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | [
"public",
"Optional",
"<",
"Epic",
">",
"getOptionalEpic",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"epicIid",
")",
"{",
"try",
"{",
"return",
"(",
"Optional",
".",
"ofNullable",
"(",
"getEpic",
"(",
"groupIdOrPath",
",",
"epicIid",
")",
")",
")",
"... | Get an Optional instance with the value for the specific Epic.
<pre><code>GitLab Endpoint: GET /groups/:id/epics/:epic_iid</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@param epicIid the IID of the epic to get
@return an Optional instance with the... | [
"Get",
"an",
"Optional",
"instance",
"with",
"the",
"value",
"for",
"the",
"specific",
"Epic",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L207-L213 |
64,365 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.createEpic | public Epic createEpic(Object groupIdOrPath, String title, String labels, String description,
Date startDate, Date endDate) throws GitLabApiException {
Form formData = new GitLabApiForm()
.withParam("title", title, true)
.withParam("labels", labels)
.w... | java | public Epic createEpic(Object groupIdOrPath, String title, String labels, String description,
Date startDate, Date endDate) throws GitLabApiException {
Form formData = new GitLabApiForm()
.withParam("title", title, true)
.withParam("labels", labels)
.w... | [
"public",
"Epic",
"createEpic",
"(",
"Object",
"groupIdOrPath",
",",
"String",
"title",
",",
"String",
"labels",
",",
"String",
"description",
",",
"Date",
"startDate",
",",
"Date",
"endDate",
")",
"throws",
"GitLabApiException",
"{",
"Form",
"formData",
"=",
... | Creates a new epic.
<pre><code>GitLab Endpoint: POST /groups/:id/epics</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@param title the title of the epic (required)
@param labels comma separated list of labels (optional)
@param description the descri... | [
"Creates",
"a",
"new",
"epic",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L229-L240 |
64,366 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.updateEpic | public Epic updateEpic(Object groupIdOrPath, Integer epicIid, String title, String labels, String description,
Date startDate, Date endDate) throws GitLabApiException {
Form formData = new GitLabApiForm()
.withParam("title", title, true)
.withParam("labels", labels)
... | java | public Epic updateEpic(Object groupIdOrPath, Integer epicIid, String title, String labels, String description,
Date startDate, Date endDate) throws GitLabApiException {
Form formData = new GitLabApiForm()
.withParam("title", title, true)
.withParam("labels", labels)
... | [
"public",
"Epic",
"updateEpic",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"epicIid",
",",
"String",
"title",
",",
"String",
"labels",
",",
"String",
"description",
",",
"Date",
"startDate",
",",
"Date",
"endDate",
")",
"throws",
"GitLabApiException",
"{",
... | Updates an existing epic.
<pre><code>GitLab Endpoint: PUT /groups/:id/epics/:epic_iid</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@param epicIid the IID of the epic to update
@param title the title of the epic (optional)
@param labels comma separ... | [
"Updates",
"an",
"existing",
"epic",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L287-L298 |
64,367 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.deleteEpic | public void deleteEpic(Object groupIdOrPath, Integer epicIid) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid);
} | java | public void deleteEpic(Object groupIdOrPath, Integer epicIid) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid);
} | [
"public",
"void",
"deleteEpic",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"epicIid",
")",
"throws",
"GitLabApiException",
"{",
"delete",
"(",
"Response",
".",
"Status",
".",
"NO_CONTENT",
",",
"null",
",",
"\"groups\"",
",",
"getGroupIdOrPath",
"(",
"group... | Deletes an epic.
<pre><code>GitLab Endpoint: DELETE /groups/:id/epics/:epic_iid</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@param epicIid the IID of the epic to delete
@throws GitLabApiException if any exception occurs | [
"Deletes",
"an",
"epic",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L339-L341 |
64,368 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.getEpicIssues | public List<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid) throws GitLabApiException {
return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).all());
} | java | public List<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid) throws GitLabApiException {
return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).all());
} | [
"public",
"List",
"<",
"Epic",
">",
"getEpicIssues",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"epicIid",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getEpicIssues",
"(",
"groupIdOrPath",
",",
"epicIid",
",",
"getDefaultPerPage",
"(",
")",
")... | Gets all issues that are assigned to an epic and the authenticated user has access to.
<pre><code>GitLab Endpoint: GET /groups/:id/epics/:epic_iid/issues</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@param epicIid the IID of the epic to get issues... | [
"Gets",
"all",
"issues",
"that",
"are",
"assigned",
"to",
"an",
"epic",
"and",
"the",
"authenticated",
"user",
"has",
"access",
"to",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L353-L355 |
64,369 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.getEpicIssues | public List<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues");
return (response.readEntity(new... | java | public List<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues");
return (response.readEntity(new... | [
"public",
"List",
"<",
"Epic",
">",
"getEpicIssues",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"epicIid",
",",
"int",
"page",
",",
"int",
"perPage",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"St... | Gets all issues that are assigned to an epic and the authenticated user has access to
using the specified page and per page setting.
<pre><code>GitLab Endpoint: GET /groups/:id/epics/:epic_iid/issues</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@p... | [
"Gets",
"all",
"issues",
"that",
"are",
"assigned",
"to",
"an",
"epic",
"and",
"the",
"authenticated",
"user",
"has",
"access",
"to",
"using",
"the",
"specified",
"page",
"and",
"per",
"page",
"setting",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L370-L373 |
64,370 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.getEpicIssues | public Pager<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Epic>(this, Epic.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues"));
} | java | public Pager<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Epic>(this, Epic.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues"));
} | [
"public",
"Pager",
"<",
"Epic",
">",
"getEpicIssues",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"epicIid",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Epic",
">",
"(",
"this",
",",
"Epic",
... | Get a Pager of all issues that are assigned to an epic and the authenticated user has access to.
<pre><code>GitLab Endpoint: GET /groups/:id/epics/:epic_iid/issues</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@param epicIid the IID of the epic to ... | [
"Get",
"a",
"Pager",
"of",
"all",
"issues",
"that",
"are",
"assigned",
"to",
"an",
"epic",
"and",
"the",
"authenticated",
"user",
"has",
"access",
"to",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L386-L388 |
64,371 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.getEpicIssuesStream | public Stream<Epic> getEpicIssuesStream(Object groupIdOrPath, Integer epicIid) throws GitLabApiException {
return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).stream());
} | java | public Stream<Epic> getEpicIssuesStream(Object groupIdOrPath, Integer epicIid) throws GitLabApiException {
return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Epic",
">",
"getEpicIssuesStream",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"epicIid",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getEpicIssues",
"(",
"groupIdOrPath",
",",
"epicIid",
",",
"getDefaultPerPage",
"(",
"... | Gets all issues that are assigned to an epic and the authenticated user has access to as a Stream.
<pre><code>GitLab Endpoint: GET /groups/:id/epics/:epic_iid/issues</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@param epicIid the IID of the epic t... | [
"Gets",
"all",
"issues",
"that",
"are",
"assigned",
"to",
"an",
"epic",
"and",
"the",
"authenticated",
"user",
"has",
"access",
"to",
"as",
"a",
"Stream",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L400-L402 |
64,372 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.assignIssue | public EpicIssue assignIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException {
Response response = post(Response.Status.CREATED, (Form)null,
"groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid);
return (response.readEntity(Ep... | java | public EpicIssue assignIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException {
Response response = post(Response.Status.CREATED, (Form)null,
"groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid);
return (response.readEntity(Ep... | [
"public",
"EpicIssue",
"assignIssue",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"epicIid",
",",
"Integer",
"issueIid",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"post",
"(",
"Response",
".",
"Status",
".",
"CREATED",
",",
"(",
... | Creates an epic - issue association. If the issue in question belongs to another epic
it is unassigned from that epic.
<pre><code>GitLab Endpoint: POST /groups/:id/epics/:epic_iid/issues/:issue_id</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@para... | [
"Creates",
"an",
"epic",
"-",
"issue",
"association",
".",
"If",
"the",
"issue",
"in",
"question",
"belongs",
"to",
"another",
"epic",
"it",
"is",
"unassigned",
"from",
"that",
"epic",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L416-L420 |
64,373 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.removeIssue | public EpicIssue removeIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException {
Response response = delete(Response.Status.OK, null,
"groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid);
return (response.readEntity(EpicIssue.c... | java | public EpicIssue removeIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException {
Response response = delete(Response.Status.OK, null,
"groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid);
return (response.readEntity(EpicIssue.c... | [
"public",
"EpicIssue",
"removeIssue",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"epicIid",
",",
"Integer",
"issueIid",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"delete",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
... | Remove an epic - issue association.
<pre><code>GitLab Endpoint: DELETE /groups/:id/epics/:epic_iid/issues/:issue_id</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@param epicIid the Epic IID to remove the issue from
@param issueIid the issue IID of ... | [
"Remove",
"an",
"epic",
"-",
"issue",
"association",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L433-L437 |
64,374 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/EpicsApi.java | EpicsApi.updateIssue | public EpicIssue updateIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid, Integer moveBeforeId, Integer moveAfterId) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm()
.withParam("move_before_id", moveBeforeId)
.withParam("move_after_id", moveAfterId);
... | java | public EpicIssue updateIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid, Integer moveBeforeId, Integer moveAfterId) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm()
.withParam("move_before_id", moveBeforeId)
.withParam("move_after_id", moveAfterId);
... | [
"public",
"EpicIssue",
"updateIssue",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"epicIid",
",",
"Integer",
"issueIid",
",",
"Integer",
"moveBeforeId",
",",
"Integer",
"moveAfterId",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"form",
"=",
"new",... | Updates an epic - issue association.
<pre><code>GitLab Endpoint: PUT /groups/:id/epics/:epic_iid/issues/:issue_id</code></pre>
@param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
@param epicIid the Epic IID that the issue is assigned to
@param issueIid the issue IID ... | [
"Updates",
"an",
"epic",
"-",
"issue",
"association",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L452-L459 |
64,375 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/Pager.java | Pager.getHeaderValue | private String getHeaderValue(Response response, String key) throws GitLabApiException {
String value = response.getHeaderString(key);
value = (value != null ? value.trim() : null);
if (value == null || value.length() == 0) {
return (null);
}
return (value);... | java | private String getHeaderValue(Response response, String key) throws GitLabApiException {
String value = response.getHeaderString(key);
value = (value != null ? value.trim() : null);
if (value == null || value.length() == 0) {
return (null);
}
return (value);... | [
"private",
"String",
"getHeaderValue",
"(",
"Response",
"response",
",",
"String",
"key",
")",
"throws",
"GitLabApiException",
"{",
"String",
"value",
"=",
"response",
".",
"getHeaderString",
"(",
"key",
")",
";",
"value",
"=",
"(",
"value",
"!=",
"null",
"?... | Get the specified header value from the Response instance.
@param response the Response instance to get the value from
@param key the HTTP header key to get the value for
@return the specified header value from the Response instance, or null if the header is not present
@throws GitLabApiException if any error occurs | [
"Get",
"the",
"specified",
"header",
"value",
"from",
"the",
"Response",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L139-L148 |
64,376 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/Pager.java | Pager.getIntHeaderValue | private int getIntHeaderValue(Response response, String key) throws GitLabApiException {
String value = getHeaderValue(response, key);
if (value == null) {
return -1;
}
try {
return (Integer.parseInt(value));
} catch (NumberFormatException nfe) ... | java | private int getIntHeaderValue(Response response, String key) throws GitLabApiException {
String value = getHeaderValue(response, key);
if (value == null) {
return -1;
}
try {
return (Integer.parseInt(value));
} catch (NumberFormatException nfe) ... | [
"private",
"int",
"getIntHeaderValue",
"(",
"Response",
"response",
",",
"String",
"key",
")",
"throws",
"GitLabApiException",
"{",
"String",
"value",
"=",
"getHeaderValue",
"(",
"response",
",",
"key",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
... | Get the specified integer header value from the Response instance.
@param response the Response instance to get the value from
@param key the HTTP header key to get the value for
@return the specified integer header value from the Response instance, or -1 if the header is not present
@throws GitLabApiException if any ... | [
"Get",
"the",
"specified",
"integer",
"header",
"value",
"from",
"the",
"Response",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L158-L170 |
64,377 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/Pager.java | Pager.setPageParam | private void setPageParam(int page) {
pageParam.set(0, Integer.toString(page));
queryParams.put(PAGE_PARAM, pageParam);
} | java | private void setPageParam(int page) {
pageParam.set(0, Integer.toString(page));
queryParams.put(PAGE_PARAM, pageParam);
} | [
"private",
"void",
"setPageParam",
"(",
"int",
"page",
")",
"{",
"pageParam",
".",
"set",
"(",
"0",
",",
"Integer",
".",
"toString",
"(",
"page",
")",
")",
";",
"queryParams",
".",
"put",
"(",
"PAGE_PARAM",
",",
"pageParam",
")",
";",
"}"
] | Sets the "page" query parameter.
@param page the value for the "page" query parameter | [
"Sets",
"the",
"page",
"query",
"parameter",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L177-L180 |
64,378 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/Pager.java | Pager.page | public List<T> page(int pageNumber) {
if (pageNumber > totalPages && pageNumber > kaminariNextPage) {
throw new NoSuchElementException();
} else if (pageNumber < 1) {
throw new NoSuchElementException();
}
if (currentPage == 0 && pageNumber == 1) {
... | java | public List<T> page(int pageNumber) {
if (pageNumber > totalPages && pageNumber > kaminariNextPage) {
throw new NoSuchElementException();
} else if (pageNumber < 1) {
throw new NoSuchElementException();
}
if (currentPage == 0 && pageNumber == 1) {
... | [
"public",
"List",
"<",
"T",
">",
"page",
"(",
"int",
"pageNumber",
")",
"{",
"if",
"(",
"pageNumber",
">",
"totalPages",
"&&",
"pageNumber",
">",
"kaminariNextPage",
")",
"{",
"throw",
"new",
"NoSuchElementException",
"(",
")",
";",
"}",
"else",
"if",
"(... | Returns the specified page of List.
@param pageNumber the page to get
@return the specified page of List
@throws NoSuchElementException if the iteration has no more elements
@throws RuntimeException if a GitLab API error occurs, will contain a wrapped GitLabApiException with the details of the error | [
"Returns",
"the",
"specified",
"page",
"of",
"List",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L303-L336 |
64,379 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/Pager.java | Pager.all | public List<T> all() throws GitLabApiException {
// Make sure that current page is 0, this will ensure the whole list is fetched
// regardless of what page the instance is currently on.
currentPage = 0;
List<T> allItems = new ArrayList<>(totalItems);
// Iterate through the pages and ap... | java | public List<T> all() throws GitLabApiException {
// Make sure that current page is 0, this will ensure the whole list is fetched
// regardless of what page the instance is currently on.
currentPage = 0;
List<T> allItems = new ArrayList<>(totalItems);
// Iterate through the pages and ap... | [
"public",
"List",
"<",
"T",
">",
"all",
"(",
")",
"throws",
"GitLabApiException",
"{",
"// Make sure that current page is 0, this will ensure the whole list is fetched\r",
"// regardless of what page the instance is currently on.\r",
"currentPage",
"=",
"0",
";",
"List",
"<",
"... | Gets all the items from each page as a single List instance.
@return all the items from each page as a single List instance
@throws GitLabApiException if any error occurs | [
"Gets",
"all",
"the",
"items",
"from",
"each",
"page",
"as",
"a",
"single",
"List",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L344-L357 |
64,380 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/Pager.java | Pager.stream | public Stream<T> stream() throws GitLabApiException, IllegalStateException {
if (pagerStream == null) {
synchronized (this) {
if (pagerStream == null) {
// Make sure that current page is 0, this will ensure the whole list is streamed
/... | java | public Stream<T> stream() throws GitLabApiException, IllegalStateException {
if (pagerStream == null) {
synchronized (this) {
if (pagerStream == null) {
// Make sure that current page is 0, this will ensure the whole list is streamed
/... | [
"public",
"Stream",
"<",
"T",
">",
"stream",
"(",
")",
"throws",
"GitLabApiException",
",",
"IllegalStateException",
"{",
"if",
"(",
"pagerStream",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"pagerStream",
"==",
"null",
")",
... | Builds and returns a Stream instance which is pre-populated with all items from all pages.
@return a Stream instance which is pre-populated with all items from all pages
@throws IllegalStateException if Stream has already been issued
@throws GitLabApiException if any other error occurs | [
"Builds",
"and",
"returns",
"a",
"Stream",
"instance",
"which",
"is",
"pre",
"-",
"populated",
"with",
"all",
"items",
"from",
"all",
"pages",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L366-L392 |
64,381 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/Pager.java | Pager.lazyStream | public Stream<T> lazyStream() throws IllegalStateException {
if (pagerStream == null) {
synchronized (this) {
if (pagerStream == null) {
// Make sure that current page is 0, this will ensure the whole list is streamed
// regardless of ... | java | public Stream<T> lazyStream() throws IllegalStateException {
if (pagerStream == null) {
synchronized (this) {
if (pagerStream == null) {
// Make sure that current page is 0, this will ensure the whole list is streamed
// regardless of ... | [
"public",
"Stream",
"<",
"T",
">",
"lazyStream",
"(",
")",
"throws",
"IllegalStateException",
"{",
"if",
"(",
"pagerStream",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"pagerStream",
"==",
"null",
")",
"{",
"// Make sure that... | Creates a Stream instance for lazily streaming items from the GitLab server.
@return a Stream instance for lazily streaming items from the GitLab server
@throws IllegalStateException if Stream has already been issued | [
"Creates",
"a",
"Stream",
"instance",
"for",
"lazily",
"streaming",
"items",
"from",
"the",
"GitLab",
"server",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L400-L417 |
64,382 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java | MaskingLoggingFilter.setMaskedHeaderNames | public void setMaskedHeaderNames(final List<String> maskedHeaderNames) {
this.maskedHeaderNames.clear();
if (maskedHeaderNames != null) {
maskedHeaderNames.forEach(h -> {
addMaskedHeaderName(h);
});
}
} | java | public void setMaskedHeaderNames(final List<String> maskedHeaderNames) {
this.maskedHeaderNames.clear();
if (maskedHeaderNames != null) {
maskedHeaderNames.forEach(h -> {
addMaskedHeaderName(h);
});
}
} | [
"public",
"void",
"setMaskedHeaderNames",
"(",
"final",
"List",
"<",
"String",
">",
"maskedHeaderNames",
")",
"{",
"this",
".",
"maskedHeaderNames",
".",
"clear",
"(",
")",
";",
"if",
"(",
"maskedHeaderNames",
"!=",
"null",
")",
"{",
"maskedHeaderNames",
".",
... | Set the list of header names to mask values for. If null, will clear the header names to mask.
@param maskedHeaderNames a list of header names that should have the values masked, if null, will clear
the header names to mask | [
"Set",
"the",
"list",
"of",
"header",
"names",
"to",
"mask",
"values",
"for",
".",
"If",
"null",
"will",
"clear",
"the",
"header",
"names",
"to",
"mask",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java#L143-L150 |
64,383 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java | MaskingLoggingFilter.addMaskedHeaderName | public void addMaskedHeaderName(String maskedHeaderName) {
if (maskedHeaderName != null) {
maskedHeaderName = maskedHeaderName.trim();
if (maskedHeaderName.length() > 0) {
maskedHeaderNames.add(maskedHeaderName.toLowerCase());
}
}
} | java | public void addMaskedHeaderName(String maskedHeaderName) {
if (maskedHeaderName != null) {
maskedHeaderName = maskedHeaderName.trim();
if (maskedHeaderName.length() > 0) {
maskedHeaderNames.add(maskedHeaderName.toLowerCase());
}
}
} | [
"public",
"void",
"addMaskedHeaderName",
"(",
"String",
"maskedHeaderName",
")",
"{",
"if",
"(",
"maskedHeaderName",
"!=",
"null",
")",
"{",
"maskedHeaderName",
"=",
"maskedHeaderName",
".",
"trim",
"(",
")",
";",
"if",
"(",
"maskedHeaderName",
".",
"length",
... | Add a header name to the list of masked header names.
@param maskedHeaderName the masked header name to add | [
"Add",
"a",
"header",
"name",
"to",
"the",
"list",
"of",
"masked",
"header",
"names",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java#L157-L164 |
64,384 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java | MaskingLoggingFilter.printHeaders | protected void printHeaders(final StringBuilder sb,
final long id,
final String prefix,
final MultivaluedMap<String, String> headers) {
getSortedHeaders(headers.entrySet()).forEach(h -> {
final List<?... | java | protected void printHeaders(final StringBuilder sb,
final long id,
final String prefix,
final MultivaluedMap<String, String> headers) {
getSortedHeaders(headers.entrySet()).forEach(h -> {
final List<?... | [
"protected",
"void",
"printHeaders",
"(",
"final",
"StringBuilder",
"sb",
",",
"final",
"long",
"id",
",",
"final",
"String",
"prefix",
",",
"final",
"MultivaluedMap",
"<",
"String",
",",
"String",
">",
"headers",
")",
"{",
"getSortedHeaders",
"(",
"headers",
... | Logs each of the HTTP headers, masking the value of the header if the header key is
in the list of masked header names.
@param sb the StringBuilder to build up the logging info in
@param id the ID for the logging line
@param prefix the logging line prefix character
@param headers a MultiValue map holding the header ke... | [
"Logs",
"each",
"of",
"the",
"HTTP",
"headers",
"masking",
"the",
"value",
"of",
"the",
"header",
"if",
"the",
"header",
"key",
"is",
"in",
"the",
"list",
"of",
"masked",
"header",
"names",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java#L211-L239 |
64,385 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PackagesApi.java | PackagesApi.getPackages | public List<Package> getPackages(Object projectIdOrPath) throws GitLabApiException {
return (getPackages(projectIdOrPath, getDefaultPerPage()).all());
} | java | public List<Package> getPackages(Object projectIdOrPath) throws GitLabApiException {
return (getPackages(projectIdOrPath, getDefaultPerPage()).all());
} | [
"public",
"List",
"<",
"Package",
">",
"getPackages",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getPackages",
"(",
"projectIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"all",
"(",
")",
")",
";",
"... | Get a list of project packages. Both Maven and NPM packages are included in results.
When accessed without authentication, only packages of public projects are returned.
<pre><code>GitLab Endpoint: GET /projects/:id/packages</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), ... | [
"Get",
"a",
"list",
"of",
"project",
"packages",
".",
"Both",
"Maven",
"and",
"NPM",
"packages",
"are",
"included",
"in",
"results",
".",
"When",
"accessed",
"without",
"authentication",
"only",
"packages",
"of",
"public",
"projects",
"are",
"returned",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L57-L59 |
64,386 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PackagesApi.java | PackagesApi.getPackages | public List<Package> getPackages(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "packages");
return response.readEntity(new GenericT... | java | public List<Package> getPackages(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "packages");
return response.readEntity(new GenericT... | [
"public",
"List",
"<",
"Package",
">",
"getPackages",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"page",
",",
"int",
"perPage",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
... | Get a list of project packages for the specified page. Both Maven and NPM packages are included in results.
When accessed without authentication, only packages of public projects are returned.
<pre><code>GitLab Endpoint: GET /projects/:id/packages</code></pre>
@param projectIdOrPath the project in the form of an Inte... | [
"Get",
"a",
"list",
"of",
"project",
"packages",
"for",
"the",
"specified",
"page",
".",
"Both",
"Maven",
"and",
"NPM",
"packages",
"are",
"included",
"in",
"results",
".",
"When",
"accessed",
"without",
"authentication",
"only",
"packages",
"of",
"public",
... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L73-L77 |
64,387 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PackagesApi.java | PackagesApi.getPackages | public Pager<Package> getPackages(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Package>(this, Package.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "packages"));
} | java | public Pager<Package> getPackages(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Package>(this, Package.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "packages"));
} | [
"public",
"Pager",
"<",
"Package",
">",
"getPackages",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Package",
">",
"(",
"this",
",",
"Package",
".",
"class",
",",... | Get a Pager of project packages. Both Maven and NPM packages are included in results.
When accessed without authentication, only packages of public projects are returned.
<pre><code>GitLab Endpoint: GET /projects/:id/packages</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path),... | [
"Get",
"a",
"Pager",
"of",
"project",
"packages",
".",
"Both",
"Maven",
"and",
"NPM",
"packages",
"are",
"included",
"in",
"results",
".",
"When",
"accessed",
"without",
"authentication",
"only",
"packages",
"of",
"public",
"projects",
"are",
"returned",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L90-L93 |
64,388 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PackagesApi.java | PackagesApi.getPackagesStream | public Stream<Package> getPackagesStream(Object projectIdOrPath) throws GitLabApiException {
return (getPackages(projectIdOrPath, getDefaultPerPage()).stream());
} | java | public Stream<Package> getPackagesStream(Object projectIdOrPath) throws GitLabApiException {
return (getPackages(projectIdOrPath, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Package",
">",
"getPackagesStream",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getPackages",
"(",
"projectIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"stream",
"(",
")",
")",... | Get a Stream of project packages. Both Maven and NPM packages are included in results.
When accessed without authentication, only packages of public projects are returned.
<pre><code>GitLab Endpoint: GET /projects/:id/packages</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path)... | [
"Get",
"a",
"Stream",
"of",
"project",
"packages",
".",
"Both",
"Maven",
"and",
"NPM",
"packages",
"are",
"included",
"in",
"results",
".",
"When",
"accessed",
"without",
"authentication",
"only",
"packages",
"of",
"public",
"projects",
"are",
"returned",
"."
... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L105-L107 |
64,389 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PackagesApi.java | PackagesApi.getPackage | public Package getPackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId);
return (response.readEntity(Package.class));
} | java | public Package getPackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId);
return (response.readEntity(Package.class));
} | [
"public",
"Package",
"getPackage",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"packageId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"projects\"",
",",
"g... | Get a single project package.
<pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param packageId the ID of the package to get
@return a Package instance for the specified package ID
@throw... | [
"Get",
"a",
"single",
"project",
"package",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L119-L123 |
64,390 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PackagesApi.java | PackagesApi.getPackageFiles | public List<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).all());
} | java | public List<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).all());
} | [
"public",
"List",
"<",
"PackageFile",
">",
"getPackageFiles",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"packageId",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getPackageFiles",
"(",
"projectIdOrPath",
",",
"packageId",
",",
"getDefaultPerPage",... | Get a list of package files of a single package.
<pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param packageId the ID of the package to get the package files for
@return... | [
"Get",
"a",
"list",
"of",
"package",
"files",
"of",
"a",
"single",
"package",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L135-L137 |
64,391 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PackagesApi.java | PackagesApi.getPackageFiles | public List<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_f... | java | public List<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_f... | [
"public",
"List",
"<",
"PackageFile",
">",
"getPackageFiles",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"packageId",
",",
"int",
"page",
",",
"int",
"perPage",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",... | Get a list of package files of a single package for the specified page.
<pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param packageId the ID of the package to get the pa... | [
"Get",
"a",
"list",
"of",
"package",
"files",
"of",
"a",
"single",
"package",
"for",
"the",
"specified",
"page",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L151-L155 |
64,392 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PackagesApi.java | PackagesApi.getPackageFiles | public Pager<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId, int itemsPerPage) throws GitLabApiException {
return (new Pager<PackageFile>(this, PackageFile.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_files")... | java | public Pager<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId, int itemsPerPage) throws GitLabApiException {
return (new Pager<PackageFile>(this, PackageFile.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_files")... | [
"public",
"Pager",
"<",
"PackageFile",
">",
"getPackageFiles",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"packageId",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"PackageFile",
">",
"(",
"this... | Get a Pager of project package files.
<pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param packageId the ID of the package to get the package files for
@param itemsPerPag... | [
"Get",
"a",
"Pager",
"of",
"project",
"package",
"files",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L168-L171 |
64,393 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PackagesApi.java | PackagesApi.getPackagesStream | public Stream<PackageFile> getPackagesStream(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).stream());
} | java | public Stream<PackageFile> getPackagesStream(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"PackageFile",
">",
"getPackagesStream",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"packageId",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getPackageFiles",
"(",
"projectIdOrPath",
",",
"packageId",
",",
"getDefaultPerPa... | Get a Stream of project package files.
<pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param packageId the ID of the package to get the package files for
@return a Stream ... | [
"Get",
"a",
"Stream",
"of",
"project",
"package",
"files",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L183-L185 |
64,394 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PackagesApi.java | PackagesApi.deletePackage | public void deletePackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
if (packageId == null) {
throw new RuntimeException("packageId cannot be null");
}
delete(Response.Status.NO_CONTENT, null,"projects", getProjectIdOrPath(projectIdOrPath), "packages", p... | java | public void deletePackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
if (packageId == null) {
throw new RuntimeException("packageId cannot be null");
}
delete(Response.Status.NO_CONTENT, null,"projects", getProjectIdOrPath(projectIdOrPath), "packages", p... | [
"public",
"void",
"deletePackage",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"packageId",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"packageId",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"packageId cannot be null\"",
")",
... | Deletes a project package.
<pre><code>GitLab Endpoint: DELETE /projects/:id/packages/:package_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param packageId the ID of the package to delete
@throws GitLabApiException if any exception occurs | [
"Deletes",
"a",
"project",
"package",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L196-L203 |
64,395 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/NamespaceApi.java | NamespaceApi.getNamespaces | public List<Namespace> getNamespaces(int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "namespaces");
return (response.readEntity(new GenericType<List<Namespace>>() {}));
} | java | public List<Namespace> getNamespaces(int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "namespaces");
return (response.readEntity(new GenericType<List<Namespace>>() {}));
} | [
"public",
"List",
"<",
"Namespace",
">",
"getNamespaces",
"(",
"int",
"page",
",",
"int",
"perPage",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getPageQueryParams",
"(",
"pag... | Get a list of the namespaces of the authenticated user. If the user is an administrator,
a list of all namespaces in the GitLab instance is returned.
<pre><code>GitLab Endpoint: GET /namespaces</code></pre>
@param page the page to get
@param perPage the number of Namespace instances per page
@return a List of Namespa... | [
"Get",
"a",
"list",
"of",
"the",
"namespaces",
"of",
"the",
"authenticated",
"user",
".",
"If",
"the",
"user",
"is",
"an",
"administrator",
"a",
"list",
"of",
"all",
"namespaces",
"in",
"the",
"GitLab",
"instance",
"is",
"returned",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NamespaceApi.java#L44-L47 |
64,396 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/NamespaceApi.java | NamespaceApi.getNamespaces | public Pager<Namespace> getNamespaces(int itemsPerPage) throws GitLabApiException {
return (new Pager<Namespace>(this, Namespace.class, itemsPerPage, null, "namespaces"));
} | java | public Pager<Namespace> getNamespaces(int itemsPerPage) throws GitLabApiException {
return (new Pager<Namespace>(this, Namespace.class, itemsPerPage, null, "namespaces"));
} | [
"public",
"Pager",
"<",
"Namespace",
">",
"getNamespaces",
"(",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Namespace",
">",
"(",
"this",
",",
"Namespace",
".",
"class",
",",
"itemsPerPage",
",",
"nul... | Get a Pager of the namespaces of the authenticated user. If the user is an administrator,
a Pager of all namespaces in the GitLab instance is returned.
<pre><code>GitLab Endpoint: GET /namespaces</code></pre>
@param itemsPerPage the number of Project instances that will be fetched per page
@return a Pager of Namespac... | [
"Get",
"a",
"Pager",
"of",
"the",
"namespaces",
"of",
"the",
"authenticated",
"user",
".",
"If",
"the",
"user",
"is",
"an",
"administrator",
"a",
"Pager",
"of",
"all",
"namespaces",
"in",
"the",
"GitLab",
"instance",
"is",
"returned",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NamespaceApi.java#L59-L61 |
64,397 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/NamespaceApi.java | NamespaceApi.findNamespaces | public List<Namespace> findNamespaces(String query) throws GitLabApiException {
return (findNamespaces(query, getDefaultPerPage()).all());
} | java | public List<Namespace> findNamespaces(String query) throws GitLabApiException {
return (findNamespaces(query, getDefaultPerPage()).all());
} | [
"public",
"List",
"<",
"Namespace",
">",
"findNamespaces",
"(",
"String",
"query",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"findNamespaces",
"(",
"query",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"all",
"(",
")",
")",
";",
"}"
] | Get all namespaces that match a string in their name or path.
<pre><code>GitLab Endpoint: GET /namespaces?search=:query</code></pre>
@param query the search string
@return the Namespace List with the matching namespaces
@throws GitLabApiException if any exception occurs | [
"Get",
"all",
"namespaces",
"that",
"match",
"a",
"string",
"in",
"their",
"name",
"or",
"path",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NamespaceApi.java#L85-L87 |
64,398 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/NamespaceApi.java | NamespaceApi.findNamespaces | public List<Namespace> findNamespaces(String query, int page, int perPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true).withParam(PAGE_PARAM, page).withParam(PER_PAGE_PARAM, perPage);
Response response = get(Response.Status.OK, formData.asMa... | java | public List<Namespace> findNamespaces(String query, int page, int perPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true).withParam(PAGE_PARAM, page).withParam(PER_PAGE_PARAM, perPage);
Response response = get(Response.Status.OK, formData.asMa... | [
"public",
"List",
"<",
"Namespace",
">",
"findNamespaces",
"(",
"String",
"query",
",",
"int",
"page",
",",
"int",
"perPage",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
... | Get all namespaces that match a string in their name or path in the specified page range.
<pre><code>GitLab Endpoint: GET /namespaces?search=:query</code></pre>
@param query the search string
@param page the page to get
@param perPage the number of Namespace instances per page
@return the Namespace List with the matc... | [
"Get",
"all",
"namespaces",
"that",
"match",
"a",
"string",
"in",
"their",
"name",
"or",
"path",
"in",
"the",
"specified",
"page",
"range",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NamespaceApi.java#L100-L104 |
64,399 | gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/NamespaceApi.java | NamespaceApi.findNamespaces | public Pager<Namespace> findNamespaces(String query, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true);
return (new Pager<Namespace>(this, Namespace.class, itemsPerPage, formData.asMap(), "namespaces"));
} | java | public Pager<Namespace> findNamespaces(String query, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true);
return (new Pager<Namespace>(this, Namespace.class, itemsPerPage, formData.asMap(), "namespaces"));
} | [
"public",
"Pager",
"<",
"Namespace",
">",
"findNamespaces",
"(",
"String",
"query",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"search\"",
","... | Get a Pager of all namespaces that match a string in their name or path.
<pre><code>GitLab Endpoint: GET /namespaces?search=:query</code></pre>
@param query the search string
@param itemsPerPage the number of Project instances that will be fetched per page
@return a Pager of Namespace instances with the matching name... | [
"Get",
"a",
"Pager",
"of",
"all",
"namespaces",
"that",
"match",
"a",
"string",
"in",
"their",
"name",
"or",
"path",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NamespaceApi.java#L116-L119 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.