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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
148,800 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java | ConstraintNetwork.removeRelation | synchronized boolean removeRelation(Interval i1, Interval i2) {
if (i1 == i2 || !containsInterval(i1) || !containsInterval(i2)) {
return false;
}
Object i1Start = i1.getStart();
Object i1Finish = i1.getFinish();
Object i2Start = i2.getStart();
Object i2Finish... | java | synchronized boolean removeRelation(Interval i1, Interval i2) {
if (i1 == i2 || !containsInterval(i1) || !containsInterval(i2)) {
return false;
}
Object i1Start = i1.getStart();
Object i1Finish = i1.getFinish();
Object i2Start = i2.getStart();
Object i2Finish... | [
"synchronized",
"boolean",
"removeRelation",
"(",
"Interval",
"i1",
",",
"Interval",
"i2",
")",
"{",
"if",
"(",
"i1",
"==",
"i2",
"||",
"!",
"containsInterval",
"(",
"i1",
")",
"||",
"!",
"containsInterval",
"(",
"i2",
")",
")",
"{",
"return",
"false",
... | Remove the distance relation between two intervals, if such a relation
exists.
@param i1
an interval.
@param i2
another interval.
@return true if the graph changed as a result of this operation, false
otherwise. | [
"Remove",
"the",
"distance",
"relation",
"between",
"two",
"intervals",
"if",
"such",
"a",
"relation",
"exists",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java#L99-L128 |
148,801 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java | ConstraintNetwork.removeInterval | synchronized boolean removeInterval(Interval i) {
calcMinDuration = null;
calcMaxDuration = null;
calcMinFinish = null;
calcMaxFinish = null;
calcMinStart = null;
calcMaxStart = null;
shortestDistancesFromTimeZeroSource = null;
shortestDistancesFromTimeZer... | java | synchronized boolean removeInterval(Interval i) {
calcMinDuration = null;
calcMaxDuration = null;
calcMinFinish = null;
calcMaxFinish = null;
calcMinStart = null;
calcMaxStart = null;
shortestDistancesFromTimeZeroSource = null;
shortestDistancesFromTimeZer... | [
"synchronized",
"boolean",
"removeInterval",
"(",
"Interval",
"i",
")",
"{",
"calcMinDuration",
"=",
"null",
";",
"calcMaxDuration",
"=",
"null",
";",
"calcMinFinish",
"=",
"null",
";",
"calcMaxFinish",
"=",
"null",
";",
"calcMinStart",
"=",
"null",
";",
"calc... | Remove an interval from this graph.
@param i
an interval.
@return true if the graph changed as a result of this operation, false
otherwise. | [
"Remove",
"an",
"interval",
"from",
"this",
"graph",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java#L138-L157 |
148,802 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java | ConstraintNetwork.containsInterval | private boolean containsInterval(Interval i) {
if (i != null) {
return directedGraph.contains(i.getStart())
&& directedGraph.contains(i.getFinish());
} else {
return false;
}
} | java | private boolean containsInterval(Interval i) {
if (i != null) {
return directedGraph.contains(i.getStart())
&& directedGraph.contains(i.getFinish());
} else {
return false;
}
} | [
"private",
"boolean",
"containsInterval",
"(",
"Interval",
"i",
")",
"{",
"if",
"(",
"i",
"!=",
"null",
")",
"{",
"return",
"directedGraph",
".",
"contains",
"(",
"i",
".",
"getStart",
"(",
")",
")",
"&&",
"directedGraph",
".",
"contains",
"(",
"i",
".... | Determine if an interval is contained in this graph.
@param i
an interval.
@return <code>true</code> if the given interval is found,
<code>false</code> otherwise. | [
"Determine",
"if",
"an",
"interval",
"is",
"contained",
"in",
"this",
"graph",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java#L167-L174 |
148,803 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java | ConstraintNetwork.addInterval | synchronized boolean addInterval(Interval i) {
if (i == null || containsInterval(i) || !intervals.add(i)) {
return false;
}
Object iStart = i.getStart();
Object iFinish = i.getFinish();
directedGraph.add(iStart);
directedGraph.add(iFinish);
Weight m... | java | synchronized boolean addInterval(Interval i) {
if (i == null || containsInterval(i) || !intervals.add(i)) {
return false;
}
Object iStart = i.getStart();
Object iFinish = i.getFinish();
directedGraph.add(iStart);
directedGraph.add(iFinish);
Weight m... | [
"synchronized",
"boolean",
"addInterval",
"(",
"Interval",
"i",
")",
"{",
"if",
"(",
"i",
"==",
"null",
"||",
"containsInterval",
"(",
"i",
")",
"||",
"!",
"intervals",
".",
"add",
"(",
"i",
")",
")",
"{",
"return",
"false",
";",
"}",
"Object",
"iSta... | Add an interval to this graph.
@param i
an interval.
@return <code>true</code> if successful, <code>false</code> if the
interval could not be added. If there was a problem adding the
interval, then the constraint network may be in an inconsistent
state (e.g., part of the interval got added). | [
"Add",
"an",
"interval",
"to",
"this",
"graph",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java#L186-L222 |
148,804 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java | ConstraintNetwork.getMinimumStart | synchronized Weight getMinimumStart() {
if (calcMinStart == null) {
// Find the shortest distance from a start to time zero.
Weight result = WeightFactory.NEG_INFINITY;
if (shortestDistancesFromTimeZeroDestination == null) {
shortestDistancesFromTimeZeroDestin... | java | synchronized Weight getMinimumStart() {
if (calcMinStart == null) {
// Find the shortest distance from a start to time zero.
Weight result = WeightFactory.NEG_INFINITY;
if (shortestDistancesFromTimeZeroDestination == null) {
shortestDistancesFromTimeZeroDestin... | [
"synchronized",
"Weight",
"getMinimumStart",
"(",
")",
"{",
"if",
"(",
"calcMinStart",
"==",
"null",
")",
"{",
"// Find the shortest distance from a start to time zero.",
"Weight",
"result",
"=",
"WeightFactory",
".",
"NEG_INFINITY",
";",
"if",
"(",
"shortestDistancesFr... | Calculates and returns the minimum path from time zero to the start of an
interval.
@return a <code>Weight</code> object. | [
"Calculates",
"and",
"returns",
"the",
"minimum",
"path",
"from",
"time",
"zero",
"to",
"the",
"start",
"of",
"an",
"interval",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java#L230-L251 |
148,805 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java | ConstraintNetwork.getMaximumStart | synchronized Weight getMaximumStart() {
if (calcMaxStart == null) {
// Find the longest distance from time zero to a start.
Weight result = WeightFactory.POS_INFINITY;
if (shortestDistancesFromTimeZeroSource == null) {
shortestDistancesFromTimeZeroSource = Bel... | java | synchronized Weight getMaximumStart() {
if (calcMaxStart == null) {
// Find the longest distance from time zero to a start.
Weight result = WeightFactory.POS_INFINITY;
if (shortestDistancesFromTimeZeroSource == null) {
shortestDistancesFromTimeZeroSource = Bel... | [
"synchronized",
"Weight",
"getMaximumStart",
"(",
")",
"{",
"if",
"(",
"calcMaxStart",
"==",
"null",
")",
"{",
"// Find the longest distance from time zero to a start.",
"Weight",
"result",
"=",
"WeightFactory",
".",
"POS_INFINITY",
";",
"if",
"(",
"shortestDistancesFro... | Calculates and returns the maximum path from time zero to the start of an
interval.
@return a <code>Weight</code> object. | [
"Calculates",
"and",
"returns",
"the",
"maximum",
"path",
"from",
"time",
"zero",
"to",
"the",
"start",
"of",
"an",
"interval",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java#L259-L280 |
148,806 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java | ConstraintNetwork.getMinimumFinish | synchronized Weight getMinimumFinish() {
if (calcMinFinish == null) {
// Find the shortest distance from a finish to time zero.
Weight result = WeightFactory.POS_INFINITY;
if (shortestDistancesFromTimeZeroDestination == null) {
shortestDistancesFromTimeZeroDes... | java | synchronized Weight getMinimumFinish() {
if (calcMinFinish == null) {
// Find the shortest distance from a finish to time zero.
Weight result = WeightFactory.POS_INFINITY;
if (shortestDistancesFromTimeZeroDestination == null) {
shortestDistancesFromTimeZeroDes... | [
"synchronized",
"Weight",
"getMinimumFinish",
"(",
")",
"{",
"if",
"(",
"calcMinFinish",
"==",
"null",
")",
"{",
"// Find the shortest distance from a finish to time zero.",
"Weight",
"result",
"=",
"WeightFactory",
".",
"POS_INFINITY",
";",
"if",
"(",
"shortestDistance... | Calculates and returns the minimum path from time zero to the finish of
an interval.
@return a <code>Weight</code> object. | [
"Calculates",
"and",
"returns",
"the",
"minimum",
"path",
"from",
"time",
"zero",
"to",
"the",
"finish",
"of",
"an",
"interval",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java#L288-L309 |
148,807 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java | ConstraintNetwork.getMaximumFinish | synchronized Weight getMaximumFinish() {
if (calcMaxFinish == null) {
// Find the longest distance from time zero to a finish.
Weight result = WeightFactory.NEG_INFINITY;
if (shortestDistancesFromTimeZeroSource == null) {
shortestDistancesFromTimeZeroSource = ... | java | synchronized Weight getMaximumFinish() {
if (calcMaxFinish == null) {
// Find the longest distance from time zero to a finish.
Weight result = WeightFactory.NEG_INFINITY;
if (shortestDistancesFromTimeZeroSource == null) {
shortestDistancesFromTimeZeroSource = ... | [
"synchronized",
"Weight",
"getMaximumFinish",
"(",
")",
"{",
"if",
"(",
"calcMaxFinish",
"==",
"null",
")",
"{",
"// Find the longest distance from time zero to a finish.",
"Weight",
"result",
"=",
"WeightFactory",
".",
"NEG_INFINITY",
";",
"if",
"(",
"shortestDistances... | Calculates and returns the maximum path from time zero to the finish of
an interval.
@return a <code>Weight</code> object. | [
"Calculates",
"and",
"returns",
"the",
"maximum",
"path",
"from",
"time",
"zero",
"to",
"the",
"finish",
"of",
"an",
"interval",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java#L317-L337 |
148,808 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java | ConstraintNetwork.getMaximumDuration | synchronized Weight getMaximumDuration() {
if (calcMaxDuration == null) {
Weight max = WeightFactory.ZERO;
for (int i = 0, n = intervals.size(); i < n; i++) {
Object start = intervals.get(i).getStart();
Map<?, Weight> d = BellmanFord.calcShortestDistances(... | java | synchronized Weight getMaximumDuration() {
if (calcMaxDuration == null) {
Weight max = WeightFactory.ZERO;
for (int i = 0, n = intervals.size(); i < n; i++) {
Object start = intervals.get(i).getStart();
Map<?, Weight> d = BellmanFord.calcShortestDistances(... | [
"synchronized",
"Weight",
"getMaximumDuration",
"(",
")",
"{",
"if",
"(",
"calcMaxDuration",
"==",
"null",
")",
"{",
"Weight",
"max",
"=",
"WeightFactory",
".",
"ZERO",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"n",
"=",
"intervals",
".",
"size",
"("... | Calculates and returns the maximum time distance from the start of an
interval to the finish of an interval.
@return a <code>Weight</code> object. | [
"Calculates",
"and",
"returns",
"the",
"maximum",
"time",
"distance",
"from",
"the",
"start",
"of",
"an",
"interval",
"to",
"the",
"finish",
"of",
"an",
"interval",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java#L345-L364 |
148,809 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java | ConstraintNetwork.getMinimumDuration | synchronized Weight getMinimumDuration() {
if (calcMinDuration == null) {
Weight min = WeightFactory.POS_INFINITY;
for (int i = 0, n = intervals.size(); i < n; i++) {
Object finish = intervals.get(i).getFinish();
Map<?, Weight> d = BellmanFord.calcShortest... | java | synchronized Weight getMinimumDuration() {
if (calcMinDuration == null) {
Weight min = WeightFactory.POS_INFINITY;
for (int i = 0, n = intervals.size(); i < n; i++) {
Object finish = intervals.get(i).getFinish();
Map<?, Weight> d = BellmanFord.calcShortest... | [
"synchronized",
"Weight",
"getMinimumDuration",
"(",
")",
"{",
"if",
"(",
"calcMinDuration",
"==",
"null",
")",
"{",
"Weight",
"min",
"=",
"WeightFactory",
".",
"POS_INFINITY",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"n",
"=",
"intervals",
".",
"size... | Calculates and returns the minimum time distance from the start of an
interval to the finish of an interval.
@return a <code>Weight</code> object. | [
"Calculates",
"and",
"returns",
"the",
"minimum",
"time",
"distance",
"from",
"the",
"start",
"of",
"an",
"interval",
"to",
"the",
"finish",
"of",
"an",
"interval",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java#L372-L391 |
148,810 | sematext/sematext-metrics | src/main/java/com/sematext/metrics/client/SematextClient.java | SematextClient.send | public void send(StDatapoint datapoint) {
StDatapointValidator.validate(datapoint);
sender.send(Collections.singletonList(datapoint));
} | java | public void send(StDatapoint datapoint) {
StDatapointValidator.validate(datapoint);
sender.send(Collections.singletonList(datapoint));
} | [
"public",
"void",
"send",
"(",
"StDatapoint",
"datapoint",
")",
"{",
"StDatapointValidator",
".",
"validate",
"(",
"datapoint",
")",
";",
"sender",
".",
"send",
"(",
"Collections",
".",
"singletonList",
"(",
"datapoint",
")",
")",
";",
"}"
] | Send datapoint.
@param datapoint datapoint
@throws IllegalArgumentException if datapoint is invalid | [
"Send",
"datapoint",
"."
] | a89ebb9eca2e4e8d8547e68bc9bc1f01aeb3975c | https://github.com/sematext/sematext-metrics/blob/a89ebb9eca2e4e8d8547e68bc9bc1f01aeb3975c/src/main/java/com/sematext/metrics/client/SematextClient.java#L65-L68 |
148,811 | sematext/sematext-metrics | src/main/java/com/sematext/metrics/client/SematextClient.java | SematextClient.send | public void send(List<StDatapoint> datapoints) {
for (StDatapoint metric : datapoints) {
StDatapointValidator.validate(metric);
}
sender.send(datapoints);
} | java | public void send(List<StDatapoint> datapoints) {
for (StDatapoint metric : datapoints) {
StDatapointValidator.validate(metric);
}
sender.send(datapoints);
} | [
"public",
"void",
"send",
"(",
"List",
"<",
"StDatapoint",
">",
"datapoints",
")",
"{",
"for",
"(",
"StDatapoint",
"metric",
":",
"datapoints",
")",
"{",
"StDatapointValidator",
".",
"validate",
"(",
"metric",
")",
";",
"}",
"sender",
".",
"send",
"(",
"... | Send datapoints list.
@param datapoints datapoints
@throws IllegalArgumentException if one of datapoints is invalid | [
"Send",
"datapoints",
"list",
"."
] | a89ebb9eca2e4e8d8547e68bc9bc1f01aeb3975c | https://github.com/sematext/sematext-metrics/blob/a89ebb9eca2e4e8d8547e68bc9bc1f01aeb3975c/src/main/java/com/sematext/metrics/client/SematextClient.java#L75-L80 |
148,812 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/AbstractSource.java | AbstractSource.addSourceListener | @Override
public final void addSourceListener(SourceListener<S> listener) {
if (listener != null) {
this.listenerList.add(listener);
}
} | java | @Override
public final void addSourceListener(SourceListener<S> listener) {
if (listener != null) {
this.listenerList.add(listener);
}
} | [
"@",
"Override",
"public",
"final",
"void",
"addSourceListener",
"(",
"SourceListener",
"<",
"S",
">",
"listener",
")",
"{",
"if",
"(",
"listener",
"!=",
"null",
")",
"{",
"this",
".",
"listenerList",
".",
"add",
"(",
"listener",
")",
";",
"}",
"}"
] | Adds a listener that gets called whenever something changes.
@param listener a {@link DataSourceListener}. | [
"Adds",
"a",
"listener",
"that",
"gets",
"called",
"whenever",
"something",
"changes",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/AbstractSource.java#L78-L83 |
148,813 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/AbstractSource.java | AbstractSource.fireSourceUpdated | protected void fireSourceUpdated(S e) {
for (int i = 0, n = this.listenerList.size(); i < n; i++) {
this.listenerList.get(i).sourceUpdated(e);
}
} | java | protected void fireSourceUpdated(S e) {
for (int i = 0, n = this.listenerList.size(); i < n; i++) {
this.listenerList.get(i).sourceUpdated(e);
}
} | [
"protected",
"void",
"fireSourceUpdated",
"(",
"S",
"e",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"n",
"=",
"this",
".",
"listenerList",
".",
"size",
"(",
")",
";",
"i",
"<",
"n",
";",
"i",
"++",
")",
"{",
"this",
".",
"listenerList",
"... | Notifies registered listeners that the source has been updated.
@param e a {@link SourceUpdatedEvent} representing an update.
@see SourceListener | [
"Notifies",
"registered",
"listeners",
"that",
"the",
"source",
"has",
"been",
"updated",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/AbstractSource.java#L102-L106 |
148,814 | eurekaclinical/protempa | protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/AbstractSQLGenerator.java | AbstractSQLGenerator.removeNonApplicableFilters | private static void removeNonApplicableFilters(
Collection<EntitySpec> entitySpecs, Set<Filter> filtersCopy,
EntitySpec entitySpec) {
Set<EntitySpec> entitySpecsSet = new HashSet<>();
Set<String> filterPropIds = new HashSet<>();
String[] entitySpecPropIds = entitySpec.get... | java | private static void removeNonApplicableFilters(
Collection<EntitySpec> entitySpecs, Set<Filter> filtersCopy,
EntitySpec entitySpec) {
Set<EntitySpec> entitySpecsSet = new HashSet<>();
Set<String> filterPropIds = new HashSet<>();
String[] entitySpecPropIds = entitySpec.get... | [
"private",
"static",
"void",
"removeNonApplicableFilters",
"(",
"Collection",
"<",
"EntitySpec",
">",
"entitySpecs",
",",
"Set",
"<",
"Filter",
">",
"filtersCopy",
",",
"EntitySpec",
"entitySpec",
")",
"{",
"Set",
"<",
"EntitySpec",
">",
"entitySpecsSet",
"=",
"... | Remove filters that are not directly applicable to the given entity spec
and are not applicable to other entity specs that refer to it.
@param entitySpecs
@param filtersCopy
@param entitySpec | [
"Remove",
"filters",
"that",
"are",
"not",
"directly",
"applicable",
"to",
"the",
"given",
"entity",
"spec",
"and",
"are",
"not",
"applicable",
"to",
"other",
"entity",
"specs",
"that",
"refer",
"to",
"it",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/AbstractSQLGenerator.java#L581-L605 |
148,815 | eurekaclinical/protempa | protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/AbstractSQLGenerator.java | AbstractSQLGenerator.needsPropIdInClause | static boolean needsPropIdInClause(Set<String> queryPropIds,
String[] entitySpecPropIds) {
Set<String> entitySpecPropIdsSet = Arrays.asSet(entitySpecPropIds);
// Filter propIds that are not in the entitySpecPropIds array.
List<String> filteredPropIds = new ArrayList<>(
... | java | static boolean needsPropIdInClause(Set<String> queryPropIds,
String[] entitySpecPropIds) {
Set<String> entitySpecPropIdsSet = Arrays.asSet(entitySpecPropIds);
// Filter propIds that are not in the entitySpecPropIds array.
List<String> filteredPropIds = new ArrayList<>(
... | [
"static",
"boolean",
"needsPropIdInClause",
"(",
"Set",
"<",
"String",
">",
"queryPropIds",
",",
"String",
"[",
"]",
"entitySpecPropIds",
")",
"{",
"Set",
"<",
"String",
">",
"entitySpecPropIdsSet",
"=",
"Arrays",
".",
"asSet",
"(",
"entitySpecPropIds",
")",
"... | Returns whether an IN clause containing the proposition ids of interest
should be added to the WHERE clause.
@param queryPropIds the proposition ids to query.
@param entitySpecPropIds the proposition ids corresponding to the current
entity spec.
@return <code>true</code> if the query contains < 85% of the proposition
... | [
"Returns",
"whether",
"an",
"IN",
"clause",
"containing",
"the",
"proposition",
"ids",
"of",
"interest",
"should",
"be",
"added",
"to",
"the",
"WHERE",
"clause",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/AbstractSQLGenerator.java#L649-L664 |
148,816 | openbase/jul | processing/default/src/main/java/org/openbase/jul/processing/VersionProcessor.java | VersionProcessor.getVersion | private String getVersion(final Class launcherClass, final String groupId, final String artifactId) throws NotAvailableException {
String version = null;
// try to load from maven properties first
try {
Properties p = new Properties();
InputStream is = getClass().getReso... | java | private String getVersion(final Class launcherClass, final String groupId, final String artifactId) throws NotAvailableException {
String version = null;
// try to load from maven properties first
try {
Properties p = new Properties();
InputStream is = getClass().getReso... | [
"private",
"String",
"getVersion",
"(",
"final",
"Class",
"launcherClass",
",",
"final",
"String",
"groupId",
",",
"final",
"String",
"artifactId",
")",
"throws",
"NotAvailableException",
"{",
"String",
"version",
"=",
"null",
";",
"// try to load from maven propertie... | Method tries to detect the application Version.
@param launcherClass the launcher to extract the class path.
@param groupId the group id of the application.
@param artifactId the artifact id of the application.
@return the semantic version of the application is returned.
@throws NotAvailableException is thrown if the v... | [
"Method",
"tries",
"to",
"detect",
"the",
"application",
"Version",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/processing/default/src/main/java/org/openbase/jul/processing/VersionProcessor.java#L40-L72 |
148,817 | jbundle/jcalendarbutton | src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java | JCalendarPopup.init | public void init(String strDateParam, Date dateTarget, String strLanguage)
{
if (strDateParam != null)
dateParam = strDateParam; // Property name
initComponents();
this.setName("JCalendarPopup");
nowDate = new Date();
if (dateTarget == null)
date... | java | public void init(String strDateParam, Date dateTarget, String strLanguage)
{
if (strDateParam != null)
dateParam = strDateParam; // Property name
initComponents();
this.setName("JCalendarPopup");
nowDate = new Date();
if (dateTarget == null)
date... | [
"public",
"void",
"init",
"(",
"String",
"strDateParam",
",",
"Date",
"dateTarget",
",",
"String",
"strLanguage",
")",
"{",
"if",
"(",
"strDateParam",
"!=",
"null",
")",
"dateParam",
"=",
"strDateParam",
";",
"// Property name",
"initComponents",
"(",
")",
";"... | Creates new form CalendarPopup.
@param strDateParam The name of the date property (defaults to "date").
@param date The initial date for this button.
@param strLanguage The language to use. | [
"Creates",
"new",
"form",
"CalendarPopup",
"."
] | 2944e6a0b634b83768d5c0b7b4a2898176421403 | https://github.com/jbundle/jcalendarbutton/blob/2944e6a0b634b83768d5c0b7b4a2898176421403/src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java#L150-L180 |
148,818 | jbundle/jcalendarbutton | src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java | JCalendarPopup.nextMonthActionPerformed | private void nextMonthActionPerformed (ActionEvent evt)
{
calendar.setTime(targetPanelDate);
calendar.add(Calendar.MONTH, 1);
calendar.set(Calendar.HOUR_OF_DAY, 12);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND,... | java | private void nextMonthActionPerformed (ActionEvent evt)
{
calendar.setTime(targetPanelDate);
calendar.add(Calendar.MONTH, 1);
calendar.set(Calendar.HOUR_OF_DAY, 12);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND,... | [
"private",
"void",
"nextMonthActionPerformed",
"(",
"ActionEvent",
"evt",
")",
"{",
"calendar",
".",
"setTime",
"(",
"targetPanelDate",
")",
";",
"calendar",
".",
"add",
"(",
"Calendar",
".",
"MONTH",
",",
"1",
")",
";",
"calendar",
".",
"set",
"(",
"Calen... | User pressed the "next month" button, change the calendar.
@param evt The action event (ignored). | [
"User",
"pressed",
"the",
"next",
"month",
"button",
"change",
"the",
"calendar",
"."
] | 2944e6a0b634b83768d5c0b7b4a2898176421403 | https://github.com/jbundle/jcalendarbutton/blob/2944e6a0b634b83768d5c0b7b4a2898176421403/src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java#L385-L395 |
148,819 | jbundle/jcalendarbutton | src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java | JCalendarPopup.nextYearActionPerformed | private void nextYearActionPerformed (ActionEvent evt)
{
calendar.setTime(targetPanelDate);
calendar.add(Calendar.YEAR, 1);
calendar.set(Calendar.HOUR_OF_DAY, 12);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0... | java | private void nextYearActionPerformed (ActionEvent evt)
{
calendar.setTime(targetPanelDate);
calendar.add(Calendar.YEAR, 1);
calendar.set(Calendar.HOUR_OF_DAY, 12);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0... | [
"private",
"void",
"nextYearActionPerformed",
"(",
"ActionEvent",
"evt",
")",
"{",
"calendar",
".",
"setTime",
"(",
"targetPanelDate",
")",
";",
"calendar",
".",
"add",
"(",
"Calendar",
".",
"YEAR",
",",
"1",
")",
";",
"calendar",
".",
"set",
"(",
"Calenda... | User pressed the "next year" button, change the calendar.
@param evt The action event (ignored). | [
"User",
"pressed",
"the",
"next",
"year",
"button",
"change",
"the",
"calendar",
"."
] | 2944e6a0b634b83768d5c0b7b4a2898176421403 | https://github.com/jbundle/jcalendarbutton/blob/2944e6a0b634b83768d5c0b7b4a2898176421403/src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java#L415-L425 |
148,820 | jbundle/jcalendarbutton | src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java | JCalendarPopup.getFirstDateInCalendar | public Date getFirstDateInCalendar(Date dateTarget)
{
// Now get the first box on the calendar
int iFirstDayOfWeek = calendar.getFirstDayOfWeek();
calendar.setTime(dateTarget);
int iTargetDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
int iOffset = -Math.abs(iTargetDayOfWeek... | java | public Date getFirstDateInCalendar(Date dateTarget)
{
// Now get the first box on the calendar
int iFirstDayOfWeek = calendar.getFirstDayOfWeek();
calendar.setTime(dateTarget);
int iTargetDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
int iOffset = -Math.abs(iTargetDayOfWeek... | [
"public",
"Date",
"getFirstDateInCalendar",
"(",
"Date",
"dateTarget",
")",
"{",
"// Now get the first box on the calendar",
"int",
"iFirstDayOfWeek",
"=",
"calendar",
".",
"getFirstDayOfWeek",
"(",
")",
";",
"calendar",
".",
"setTime",
"(",
"dateTarget",
")",
";",
... | Given the first date of the calendar, get the first date of that week.
@param dateTarget A valid date.
@return The first day in the week (day of week depends on Locale). | [
"Given",
"the",
"first",
"date",
"of",
"the",
"calendar",
"get",
"the",
"first",
"date",
"of",
"that",
"week",
"."
] | 2944e6a0b634b83768d5c0b7b4a2898176421403 | https://github.com/jbundle/jcalendarbutton/blob/2944e6a0b634b83768d5c0b7b4a2898176421403/src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java#L446-L461 |
148,821 | jbundle/jcalendarbutton | src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java | JCalendarPopup.mouseEntered | public void mouseEntered(MouseEvent evt)
{
JLabel button = (JLabel)evt.getSource();
oldBorder = button.getBorder();
button.setBorder(ROLLOVER_BORDER);
} | java | public void mouseEntered(MouseEvent evt)
{
JLabel button = (JLabel)evt.getSource();
oldBorder = button.getBorder();
button.setBorder(ROLLOVER_BORDER);
} | [
"public",
"void",
"mouseEntered",
"(",
"MouseEvent",
"evt",
")",
"{",
"JLabel",
"button",
"=",
"(",
"JLabel",
")",
"evt",
".",
"getSource",
"(",
")",
";",
"oldBorder",
"=",
"button",
".",
"getBorder",
"(",
")",
";",
"button",
".",
"setBorder",
"(",
"RO... | Invoked when the mouse enters a component. | [
"Invoked",
"when",
"the",
"mouse",
"enters",
"a",
"component",
"."
] | 2944e6a0b634b83768d5c0b7b4a2898176421403 | https://github.com/jbundle/jcalendarbutton/blob/2944e6a0b634b83768d5c0b7b4a2898176421403/src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java#L538-L543 |
148,822 | jbundle/jcalendarbutton | src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java | JCalendarPopup.mouseExited | public void mouseExited(MouseEvent evt)
{
JLabel button = (JLabel)evt.getSource();
button.setBorder(oldBorder);
} | java | public void mouseExited(MouseEvent evt)
{
JLabel button = (JLabel)evt.getSource();
button.setBorder(oldBorder);
} | [
"public",
"void",
"mouseExited",
"(",
"MouseEvent",
"evt",
")",
"{",
"JLabel",
"button",
"=",
"(",
"JLabel",
")",
"evt",
".",
"getSource",
"(",
")",
";",
"button",
".",
"setBorder",
"(",
"oldBorder",
")",
";",
"}"
] | Invoked when the mouse exits a component. | [
"Invoked",
"when",
"the",
"mouse",
"exits",
"a",
"component",
"."
] | 2944e6a0b634b83768d5c0b7b4a2898176421403 | https://github.com/jbundle/jcalendarbutton/blob/2944e6a0b634b83768d5c0b7b4a2898176421403/src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java#L547-L551 |
148,823 | jbundle/jcalendarbutton | src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java | JCalendarPopup.getJPopupMenu | private JPopupMenu getJPopupMenu()
{
Container parent = this.getParent();
while (parent != null)
{
if (parent instanceof JPopupMenu)
return (JPopupMenu)parent;
parent = parent.getParent();
}
return null;
} | java | private JPopupMenu getJPopupMenu()
{
Container parent = this.getParent();
while (parent != null)
{
if (parent instanceof JPopupMenu)
return (JPopupMenu)parent;
parent = parent.getParent();
}
return null;
} | [
"private",
"JPopupMenu",
"getJPopupMenu",
"(",
")",
"{",
"Container",
"parent",
"=",
"this",
".",
"getParent",
"(",
")",
";",
"while",
"(",
"parent",
"!=",
"null",
")",
"{",
"if",
"(",
"parent",
"instanceof",
"JPopupMenu",
")",
"return",
"(",
"JPopupMenu",... | Get the parent popup menu.
@return The popup menu. | [
"Get",
"the",
"parent",
"popup",
"menu",
"."
] | 2944e6a0b634b83768d5c0b7b4a2898176421403 | https://github.com/jbundle/jcalendarbutton/blob/2944e6a0b634b83768d5c0b7b4a2898176421403/src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java#L556-L566 |
148,824 | openbase/jul | visual/javafx/src/main/java/org/openbase/jul/visual/javafx/geometry/svg/SVGLogoPaneController.java | SVGLogoPaneController.setText | public void setText(final String text) {
this.text.setText(text);
this.text.setFont(Font.font(this.text.getFont().getFamily(), FontWeight.BOLD, size / 2));
stack.requestLayout();
} | java | public void setText(final String text) {
this.text.setText(text);
this.text.setFont(Font.font(this.text.getFont().getFamily(), FontWeight.BOLD, size / 2));
stack.requestLayout();
} | [
"public",
"void",
"setText",
"(",
"final",
"String",
"text",
")",
"{",
"this",
".",
"text",
".",
"setText",
"(",
"text",
")",
";",
"this",
".",
"text",
".",
"setFont",
"(",
"Font",
".",
"font",
"(",
"this",
".",
"text",
".",
"getFont",
"(",
")",
... | Method sets the text displayed next to the logo.
@param text | [
"Method",
"sets",
"the",
"text",
"displayed",
"next",
"to",
"the",
"logo",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/visual/javafx/src/main/java/org/openbase/jul/visual/javafx/geometry/svg/SVGLogoPaneController.java#L62-L66 |
148,825 | openbase/jul | visual/javafx/src/main/java/org/openbase/jul/visual/javafx/geometry/svg/SVGLogoPaneController.java | SVGLogoPaneController.setSvgIcon | public void setSvgIcon(final SVGIcon svgIcon) {
if (this.svgIcon != null) {
stack.getChildren().remove(this.svgIcon);
}
this.svgIcon = svgIcon;
this.svgIcon.setSize(size);
stack.getChildren().add(this.svgIcon);
stack.requestLayout();
} | java | public void setSvgIcon(final SVGIcon svgIcon) {
if (this.svgIcon != null) {
stack.getChildren().remove(this.svgIcon);
}
this.svgIcon = svgIcon;
this.svgIcon.setSize(size);
stack.getChildren().add(this.svgIcon);
stack.requestLayout();
} | [
"public",
"void",
"setSvgIcon",
"(",
"final",
"SVGIcon",
"svgIcon",
")",
"{",
"if",
"(",
"this",
".",
"svgIcon",
"!=",
"null",
")",
"{",
"stack",
".",
"getChildren",
"(",
")",
".",
"remove",
"(",
"this",
".",
"svgIcon",
")",
";",
"}",
"this",
".",
... | Method sets the icon to display.
@param svgIcon | [
"Method",
"sets",
"the",
"icon",
"to",
"display",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/visual/javafx/src/main/java/org/openbase/jul/visual/javafx/geometry/svg/SVGLogoPaneController.java#L80-L88 |
148,826 | openbase/jul | visual/javafx/src/main/java/org/openbase/jul/visual/javafx/geometry/svg/SVGLogoPaneController.java | SVGLogoPaneController.setSize | public void setSize(final double size) {
this.size = size;
stack.setPrefSize(size, size);
text.setFont(Font.font(text.getFont().getFamily(), FontWeight.BOLD, size / 2));
svgIcon.setSize(size);
stack.requestLayout();
} | java | public void setSize(final double size) {
this.size = size;
stack.setPrefSize(size, size);
text.setFont(Font.font(text.getFont().getFamily(), FontWeight.BOLD, size / 2));
svgIcon.setSize(size);
stack.requestLayout();
} | [
"public",
"void",
"setSize",
"(",
"final",
"double",
"size",
")",
"{",
"this",
".",
"size",
"=",
"size",
";",
"stack",
".",
"setPrefSize",
"(",
"size",
",",
"size",
")",
";",
"text",
".",
"setFont",
"(",
"Font",
".",
"font",
"(",
"text",
".",
"getF... | Method can be used to set the size of this component.
@param size | [
"Method",
"can",
"be",
"used",
"to",
"set",
"the",
"size",
"of",
"this",
"component",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/visual/javafx/src/main/java/org/openbase/jul/visual/javafx/geometry/svg/SVGLogoPaneController.java#L94-L100 |
148,827 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/PropositionUtil.java | PropositionUtil.getView | public static <T extends TemporalProposition> List<T> getView(
List<T> params, Long minValid, Long maxValid) {
if (params != null) {
if (minValid == null && maxValid == null) {
return params;
} else {
int min = minValid != null ? binarySearchMi... | java | public static <T extends TemporalProposition> List<T> getView(
List<T> params, Long minValid, Long maxValid) {
if (params != null) {
if (minValid == null && maxValid == null) {
return params;
} else {
int min = minValid != null ? binarySearchMi... | [
"public",
"static",
"<",
"T",
"extends",
"TemporalProposition",
">",
"List",
"<",
"T",
">",
"getView",
"(",
"List",
"<",
"T",
">",
"params",
",",
"Long",
"minValid",
",",
"Long",
"maxValid",
")",
"{",
"if",
"(",
"params",
"!=",
"null",
")",
"{",
"if"... | Filters a list of temporal propositions by time.
@param params
a <code>List</code> of propositions.
@param minValid
@param maxValid
@return | [
"Filters",
"a",
"list",
"of",
"temporal",
"propositions",
"by",
"time",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/PropositionUtil.java#L52-L67 |
148,828 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/PropositionUtil.java | PropositionUtil.createPropositionMap | public static <T extends Proposition> Map<String, List<T>> createPropositionMap(
List<T> propositions) {
Map<String, List<T>> result = new HashMap<>();
if (propositions != null) {
for (T prop : propositions) {
String propId = prop.getId();
List<T... | java | public static <T extends Proposition> Map<String, List<T>> createPropositionMap(
List<T> propositions) {
Map<String, List<T>> result = new HashMap<>();
if (propositions != null) {
for (T prop : propositions) {
String propId = prop.getId();
List<T... | [
"public",
"static",
"<",
"T",
"extends",
"Proposition",
">",
"Map",
"<",
"String",
",",
"List",
"<",
"T",
">",
">",
"createPropositionMap",
"(",
"List",
"<",
"T",
">",
"propositions",
")",
"{",
"Map",
"<",
"String",
",",
"List",
"<",
"T",
">",
">",
... | Divides a list of propositions up by id.
@param propositions
a <code>List</code> of <code>Proposition</code>s.
@return a Map of id <code>String</code> -> <code>List</code>, with
propositions in the same order as they were found in the
argument. | [
"Divides",
"a",
"list",
"of",
"propositions",
"up",
"by",
"id",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/PropositionUtil.java#L92-L112 |
148,829 | openbase/jul | extension/protobuf/src/main/java/org/openbase/jul/extension/protobuf/MessageObservable.java | MessageObservable.removeTimestamps | public Builder removeTimestamps(final Builder builder) {
final Descriptors.Descriptor descriptorForType = builder.getDescriptorForType();
for (final Descriptors.FieldDescriptor field : descriptorForType.getFields()) {
// if the field is not repeated, a message and a timestamp it is cleared
... | java | public Builder removeTimestamps(final Builder builder) {
final Descriptors.Descriptor descriptorForType = builder.getDescriptorForType();
for (final Descriptors.FieldDescriptor field : descriptorForType.getFields()) {
// if the field is not repeated, a message and a timestamp it is cleared
... | [
"public",
"Builder",
"removeTimestamps",
"(",
"final",
"Builder",
"builder",
")",
"{",
"final",
"Descriptors",
".",
"Descriptor",
"descriptorForType",
"=",
"builder",
".",
"getDescriptorForType",
"(",
")",
";",
"for",
"(",
"final",
"Descriptors",
".",
"FieldDescri... | Recursively clear timestamp messages from a builder. For efficiency repeated fields are ignored.
@param builder the builder from which all timestamps are cleared
@return the updated builder | [
"Recursively",
"clear",
"timestamp",
"messages",
"from",
"a",
"builder",
".",
"For",
"efficiency",
"repeated",
"fields",
"are",
"ignored",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/protobuf/src/main/java/org/openbase/jul/extension/protobuf/MessageObservable.java#L79-L104 |
148,830 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java | TimestampProcessor.updateTimestampWithCurrentTime | public static <M extends MessageOrBuilder> M updateTimestampWithCurrentTime(final M messageOrBuilder) throws CouldNotPerformException {
return updateTimestamp(System.currentTimeMillis(), messageOrBuilder);
} | java | public static <M extends MessageOrBuilder> M updateTimestampWithCurrentTime(final M messageOrBuilder) throws CouldNotPerformException {
return updateTimestamp(System.currentTimeMillis(), messageOrBuilder);
} | [
"public",
"static",
"<",
"M",
"extends",
"MessageOrBuilder",
">",
"M",
"updateTimestampWithCurrentTime",
"(",
"final",
"M",
"messageOrBuilder",
")",
"throws",
"CouldNotPerformException",
"{",
"return",
"updateTimestamp",
"(",
"System",
".",
"currentTimeMillis",
"(",
"... | Method updates the timestamp field of the given message with the current time.
@param <M> the message type of the message to update.
@param messageOrBuilder the message
@return the updated message
@throws CouldNotPerformException is thrown in case the copy could not be performed e.g. because of a missin... | [
"Method",
"updates",
"the",
"timestamp",
"field",
"of",
"the",
"given",
"message",
"with",
"the",
"current",
"time",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java#L68-L70 |
148,831 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java | TimestampProcessor.updateTimestamp | public static <M extends MessageOrBuilder> M updateTimestamp(final long milliseconds, final M messageOrBuilder) throws CouldNotPerformException {
return updateTimestamp(milliseconds, messageOrBuilder, TimeUnit.MILLISECONDS);
} | java | public static <M extends MessageOrBuilder> M updateTimestamp(final long milliseconds, final M messageOrBuilder) throws CouldNotPerformException {
return updateTimestamp(milliseconds, messageOrBuilder, TimeUnit.MILLISECONDS);
} | [
"public",
"static",
"<",
"M",
"extends",
"MessageOrBuilder",
">",
"M",
"updateTimestamp",
"(",
"final",
"long",
"milliseconds",
",",
"final",
"M",
"messageOrBuilder",
")",
"throws",
"CouldNotPerformException",
"{",
"return",
"updateTimestamp",
"(",
"milliseconds",
"... | Method updates the timestamp field of the given message with the given timestamp.
@param <M> the message type of the message to milliseconds.
@param milliseconds the time to update
@param messageOrBuilder the message
@return the updated message
@throws CouldNotPerformException is thrown in case the ... | [
"Method",
"updates",
"the",
"timestamp",
"field",
"of",
"the",
"given",
"message",
"with",
"the",
"given",
"timestamp",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java#L83-L85 |
148,832 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java | TimestampProcessor.updateTimestamp | public static <M extends MessageOrBuilder> M updateTimestamp(final long time, final M messageOrBuilder, final TimeUnit timeUnit) throws CouldNotPerformException {
long milliseconds = TimeUnit.MILLISECONDS.convert(time, timeUnit);
try {
if (messageOrBuilder == null) {
throw ... | java | public static <M extends MessageOrBuilder> M updateTimestamp(final long time, final M messageOrBuilder, final TimeUnit timeUnit) throws CouldNotPerformException {
long milliseconds = TimeUnit.MILLISECONDS.convert(time, timeUnit);
try {
if (messageOrBuilder == null) {
throw ... | [
"public",
"static",
"<",
"M",
"extends",
"MessageOrBuilder",
">",
"M",
"updateTimestamp",
"(",
"final",
"long",
"time",
",",
"final",
"M",
"messageOrBuilder",
",",
"final",
"TimeUnit",
"timeUnit",
")",
"throws",
"CouldNotPerformException",
"{",
"long",
"millisecon... | Method updates the timestamp field of the given message with the given time in the given timeUnit.
@param <M> the message type of the message which is updated
@param time the time which is put in the timestamp field
@param messageOrBuilder the message
@param timeUnit the unit of time
... | [
"Method",
"updates",
"the",
"timestamp",
"field",
"of",
"the",
"given",
"message",
"with",
"the",
"given",
"time",
"in",
"the",
"given",
"timeUnit",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java#L99-L125 |
148,833 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java | TimestampProcessor.updateTimestamp | public static <M extends MessageOrBuilder> M updateTimestamp(final long timestamp, final M messageOrBuilder, final TimeUnit timeUnit, final Logger logger) {
try {
return updateTimestamp(timestamp, messageOrBuilder, timeUnit);
} catch (CouldNotPerformException ex) {
ExceptionPrint... | java | public static <M extends MessageOrBuilder> M updateTimestamp(final long timestamp, final M messageOrBuilder, final TimeUnit timeUnit, final Logger logger) {
try {
return updateTimestamp(timestamp, messageOrBuilder, timeUnit);
} catch (CouldNotPerformException ex) {
ExceptionPrint... | [
"public",
"static",
"<",
"M",
"extends",
"MessageOrBuilder",
">",
"M",
"updateTimestamp",
"(",
"final",
"long",
"timestamp",
",",
"final",
"M",
"messageOrBuilder",
",",
"final",
"TimeUnit",
"timeUnit",
",",
"final",
"Logger",
"logger",
")",
"{",
"try",
"{",
... | Method updates the timestamp field of the given message with the given timestamp.
In case of an error the original message is returned.
@param <M> the message type of the message to update.
@param timestamp the timestamp to update
@param messageOrBuilder the message
@param timeUnit the time... | [
"Method",
"updates",
"the",
"timestamp",
"field",
"of",
"the",
"given",
"message",
"with",
"the",
"given",
"timestamp",
".",
"In",
"case",
"of",
"an",
"error",
"the",
"original",
"message",
"is",
"returned",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java#L157-L164 |
148,834 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java | TimestampProcessor.updateTimestampWithCurrentTime | public static <M extends MessageOrBuilder> M updateTimestampWithCurrentTime(final M messageOrBuilder, final Logger logger) {
try {
return updateTimestampWithCurrentTime(messageOrBuilder);
} catch (CouldNotPerformException ex) {
ExceptionPrinter.printHistory(ex, logger);
... | java | public static <M extends MessageOrBuilder> M updateTimestampWithCurrentTime(final M messageOrBuilder, final Logger logger) {
try {
return updateTimestampWithCurrentTime(messageOrBuilder);
} catch (CouldNotPerformException ex) {
ExceptionPrinter.printHistory(ex, logger);
... | [
"public",
"static",
"<",
"M",
"extends",
"MessageOrBuilder",
">",
"M",
"updateTimestampWithCurrentTime",
"(",
"final",
"M",
"messageOrBuilder",
",",
"final",
"Logger",
"logger",
")",
"{",
"try",
"{",
"return",
"updateTimestampWithCurrentTime",
"(",
"messageOrBuilder",... | Method updates the timestamp field of the given message with the current time.
In case of an error the original message is returned.
@param <M> the message type of the message to update.
@param messageOrBuilder the message
@param logger the logger which is used for printing the exception stack i... | [
"Method",
"updates",
"the",
"timestamp",
"field",
"of",
"the",
"given",
"message",
"with",
"the",
"current",
"time",
".",
"In",
"case",
"of",
"an",
"error",
"the",
"original",
"message",
"is",
"returned",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java#L232-L239 |
148,835 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java | TimestampProcessor.hasTimestamp | public static boolean hasTimestamp(final MessageOrBuilder messageOrBuilder) {
try {
final FieldDescriptor fieldDescriptor = ProtoBufFieldProcessor.getFieldDescriptor(messageOrBuilder, TIMESTAMP_FIELD_NAME);
return messageOrBuilder.hasField(fieldDescriptor);
} catch (NotAvailableE... | java | public static boolean hasTimestamp(final MessageOrBuilder messageOrBuilder) {
try {
final FieldDescriptor fieldDescriptor = ProtoBufFieldProcessor.getFieldDescriptor(messageOrBuilder, TIMESTAMP_FIELD_NAME);
return messageOrBuilder.hasField(fieldDescriptor);
} catch (NotAvailableE... | [
"public",
"static",
"boolean",
"hasTimestamp",
"(",
"final",
"MessageOrBuilder",
"messageOrBuilder",
")",
"{",
"try",
"{",
"final",
"FieldDescriptor",
"fieldDescriptor",
"=",
"ProtoBufFieldProcessor",
".",
"getFieldDescriptor",
"(",
"messageOrBuilder",
",",
"TIMESTAMP_FIE... | Method return true if the given message contains a timestamp field.
@param messageOrBuilder the message to analyze
@return true if the timestamp field is provided, otherwise false. | [
"Method",
"return",
"true",
"if",
"the",
"given",
"message",
"contains",
"a",
"timestamp",
"field",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java#L246-L253 |
148,836 | ops4j/org.ops4j.pax.wicket | service/src/main/java/org/ops4j/pax/wicket/api/support/AbstractPageFactory.java | AbstractPageFactory.setApplicationName | protected final void setApplicationName(String applicationName) throws IllegalArgumentException {
validateNotEmpty(applicationName, "applicationName");
synchronized (this) {
properties.put(APPLICATION_NAME, applicationName);
}
} | java | protected final void setApplicationName(String applicationName) throws IllegalArgumentException {
validateNotEmpty(applicationName, "applicationName");
synchronized (this) {
properties.put(APPLICATION_NAME, applicationName);
}
} | [
"protected",
"final",
"void",
"setApplicationName",
"(",
"String",
"applicationName",
")",
"throws",
"IllegalArgumentException",
"{",
"validateNotEmpty",
"(",
"applicationName",
",",
"\"applicationName\"",
")",
";",
"synchronized",
"(",
"this",
")",
"{",
"properties",
... | Sets the application name.
@param applicationName The application name. This argument must not be {@code null} or empty.
@throws java.lang.IllegalArgumentException Thrown if the specified {@code applicationName} is {@code null}.
@since 1.0.0 | [
"Sets",
"the",
"application",
"name",
"."
] | ef7cb4bdf918e9e61ec69789b9c690567616faa9 | https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/api/support/AbstractPageFactory.java#L189-L194 |
148,837 | ops4j/org.ops4j.pax.wicket | service/src/main/java/org/ops4j/pax/wicket/api/support/AbstractPageFactory.java | AbstractPageFactory.setPageName | protected final void setPageName(String pageName) throws IllegalArgumentException {
validateNotEmpty(pageName, "pageName");
synchronized (this) {
properties.put(PAGE_NAME, pageName);
}
} | java | protected final void setPageName(String pageName) throws IllegalArgumentException {
validateNotEmpty(pageName, "pageName");
synchronized (this) {
properties.put(PAGE_NAME, pageName);
}
} | [
"protected",
"final",
"void",
"setPageName",
"(",
"String",
"pageName",
")",
"throws",
"IllegalArgumentException",
"{",
"validateNotEmpty",
"(",
"pageName",
",",
"\"pageName\"",
")",
";",
"synchronized",
"(",
"this",
")",
"{",
"properties",
".",
"put",
"(",
"PAG... | Set the page name.
@param pageName The page name. This argument must not be {@code null} or empty.
@throws java.lang.IllegalArgumentException Thrown if the specified {@code pageName} arguments are {@code null}.
@since 1.0.0 | [
"Set",
"the",
"page",
"name",
"."
] | ef7cb4bdf918e9e61ec69789b9c690567616faa9 | https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/api/support/AbstractPageFactory.java#L216-L221 |
148,838 | netkicorp/java-wns-resolver | src/main/java/com/netki/WalletNameResolver.java | WalletNameResolver.resolve | public BitcoinURI resolve(String label, String currency, boolean validateTLSA) throws WalletNameLookupException {
String resolved;
label = label.toLowerCase();
currency = currency.toLowerCase();
if (label.isEmpty()) {
throw new WalletNameLookupException("Wallet Name Label M... | java | public BitcoinURI resolve(String label, String currency, boolean validateTLSA) throws WalletNameLookupException {
String resolved;
label = label.toLowerCase();
currency = currency.toLowerCase();
if (label.isEmpty()) {
throw new WalletNameLookupException("Wallet Name Label M... | [
"public",
"BitcoinURI",
"resolve",
"(",
"String",
"label",
",",
"String",
"currency",
",",
"boolean",
"validateTLSA",
")",
"throws",
"WalletNameLookupException",
"{",
"String",
"resolved",
";",
"label",
"=",
"label",
".",
"toLowerCase",
"(",
")",
";",
"currency"... | Resolve a Wallet Name
This method is thread safe as it does not depend on any externally mutable variables.
@param label DNS Name (i.e., wallet.mattdavid.xyz)
@param currency 3 Letter Code to Denote the Requested Currency (i.e., "btc", "ltc", "dgc")
@param validateTLSA Boolean to require TLSA validation fo... | [
"Resolve",
"a",
"Wallet",
"Name"
] | a7aad04d96c03feb05536aef189617beb4f011bc | https://github.com/netkicorp/java-wns-resolver/blob/a7aad04d96c03feb05536aef189617beb4f011bc/src/main/java/com/netki/WalletNameResolver.java#L138-L176 |
148,839 | netkicorp/java-wns-resolver | src/main/java/com/netki/WalletNameResolver.java | WalletNameResolver.processWalletNameUrl | public BitcoinURI processWalletNameUrl(URL url, boolean verifyTLSA) throws WalletNameLookupException {
HttpsURLConnection conn = null;
InputStream ins;
InputStreamReader isr;
BufferedReader in = null;
Certificate possibleRootCert = null;
if (verifyTLSA) {
tr... | java | public BitcoinURI processWalletNameUrl(URL url, boolean verifyTLSA) throws WalletNameLookupException {
HttpsURLConnection conn = null;
InputStream ins;
InputStreamReader isr;
BufferedReader in = null;
Certificate possibleRootCert = null;
if (verifyTLSA) {
tr... | [
"public",
"BitcoinURI",
"processWalletNameUrl",
"(",
"URL",
"url",
",",
"boolean",
"verifyTLSA",
")",
"throws",
"WalletNameLookupException",
"{",
"HttpsURLConnection",
"conn",
"=",
"null",
";",
"InputStream",
"ins",
";",
"InputStreamReader",
"isr",
";",
"BufferedReade... | Resolve a Wallet Name URL Endpoint
@param url Wallet Name URL Endpoint
@param verifyTLSA Do TLSA validation for URL Endpoint?
@return String data value returned by URL Endpoint
@throws WalletNameLookupException Wallet Name Address Service URL Processing Failure | [
"Resolve",
"a",
"Wallet",
"Name",
"URL",
"Endpoint"
] | a7aad04d96c03feb05536aef189617beb4f011bc | https://github.com/netkicorp/java-wns-resolver/blob/a7aad04d96c03feb05536aef189617beb4f011bc/src/main/java/com/netki/WalletNameResolver.java#L186-L256 |
148,840 | vtatai/srec | core/src/main/java/com/github/srec/util/AWTTreeScanner.java | AWTTreeScanner.scan | public static Component scan(Component root, ScannerMatcher matcher) {
if (matcher.matches(root)) return root;
if (!(root instanceof Container)) return null;
Container container = (Container) root;
for (Component component : container.getComponents()) {
Component found = scan... | java | public static Component scan(Component root, ScannerMatcher matcher) {
if (matcher.matches(root)) return root;
if (!(root instanceof Container)) return null;
Container container = (Container) root;
for (Component component : container.getComponents()) {
Component found = scan... | [
"public",
"static",
"Component",
"scan",
"(",
"Component",
"root",
",",
"ScannerMatcher",
"matcher",
")",
"{",
"if",
"(",
"matcher",
".",
"matches",
"(",
"root",
")",
")",
"return",
"root",
";",
"if",
"(",
"!",
"(",
"root",
"instanceof",
"Container",
")"... | Scans a component tree searching for the one which is matched by the given matcher. In case of multiple matches
the firs one found is returned.
@param root The component root
@param matcher The matcher
@return The component found | [
"Scans",
"a",
"component",
"tree",
"searching",
"for",
"the",
"one",
"which",
"is",
"matched",
"by",
"the",
"given",
"matcher",
".",
"In",
"case",
"of",
"multiple",
"matches",
"the",
"firs",
"one",
"found",
"is",
"returned",
"."
] | 87fa6754a6a5f8569ef628db4d149eea04062568 | https://github.com/vtatai/srec/blob/87fa6754a6a5f8569ef628db4d149eea04062568/core/src/main/java/com/github/srec/util/AWTTreeScanner.java#L38-L47 |
148,841 | openbase/jul | storage/src/main/java/org/openbase/jul/storage/registry/AbstractRegistry.java | AbstractRegistry.isDependingOnConsistentRegistries | protected boolean isDependingOnConsistentRegistries() {
dependingRegistryMapLock.readLock().lock();
try {
return dependingRegistryMap.keySet().stream().noneMatch((registry) -> (!registry.isConsistent()));
} finally {
dependingRegistryMapLock.readLock().unlock();
}... | java | protected boolean isDependingOnConsistentRegistries() {
dependingRegistryMapLock.readLock().lock();
try {
return dependingRegistryMap.keySet().stream().noneMatch((registry) -> (!registry.isConsistent()));
} finally {
dependingRegistryMapLock.readLock().unlock();
}... | [
"protected",
"boolean",
"isDependingOnConsistentRegistries",
"(",
")",
"{",
"dependingRegistryMapLock",
".",
"readLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"try",
"{",
"return",
"dependingRegistryMap",
".",
"keySet",
"(",
")",
".",
"stream",
"(",
")",
".",
... | If this registry depends on other registries, this method can be used to tell this registry if all depending registries are consistent.
@return The method returns should return false if at least one depending registry is not consistent! | [
"If",
"this",
"registry",
"depends",
"on",
"other",
"registries",
"this",
"method",
"can",
"be",
"used",
"to",
"tell",
"this",
"registry",
"if",
"all",
"depending",
"registries",
"are",
"consistent",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/storage/src/main/java/org/openbase/jul/storage/registry/AbstractRegistry.java#L632-L639 |
148,842 | openbase/jul | storage/src/main/java/org/openbase/jul/storage/registry/AbstractRegistry.java | AbstractRegistry.removeDependency | public void removeDependency(final Registry registry) throws CouldNotPerformException {
if (registry == null) {
throw new NotAvailableException("registry");
}
registryLock.writeLock().lock();
try {
dependingRegistryMapLock.writeLock().lock();
try {
... | java | public void removeDependency(final Registry registry) throws CouldNotPerformException {
if (registry == null) {
throw new NotAvailableException("registry");
}
registryLock.writeLock().lock();
try {
dependingRegistryMapLock.writeLock().lock();
try {
... | [
"public",
"void",
"removeDependency",
"(",
"final",
"Registry",
"registry",
")",
"throws",
"CouldNotPerformException",
"{",
"if",
"(",
"registry",
"==",
"null",
")",
"{",
"throw",
"new",
"NotAvailableException",
"(",
"\"registry\"",
")",
";",
"}",
"registryLock",
... | This method allows the removal of a registered registry dependency.
@param registry the dependency to remove.
@throws org.openbase.jul.exception.CouldNotPerformException | [
"This",
"method",
"allows",
"the",
"removal",
"of",
"a",
"registered",
"registry",
"dependency",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/storage/src/main/java/org/openbase/jul/storage/registry/AbstractRegistry.java#L697-L716 |
148,843 | openbase/jul | storage/src/main/java/org/openbase/jul/storage/registry/AbstractRegistry.java | AbstractRegistry.removeAllDependencies | public void removeAllDependencies() {
registryLock.writeLock().lock();
try {
dependingRegistryMapLock.writeLock().lock();
try {
List<Registry> dependingRegistryList = new ArrayList<>(dependingRegistryMap.keySet());
Collections.reverse(dependingRegi... | java | public void removeAllDependencies() {
registryLock.writeLock().lock();
try {
dependingRegistryMapLock.writeLock().lock();
try {
List<Registry> dependingRegistryList = new ArrayList<>(dependingRegistryMap.keySet());
Collections.reverse(dependingRegi... | [
"public",
"void",
"removeAllDependencies",
"(",
")",
"{",
"registryLock",
".",
"writeLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"try",
"{",
"dependingRegistryMapLock",
".",
"writeLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"try",
"{",
"List",
"<",
"... | Removal of all registered registry dependencies in the reversed order in which they where added. | [
"Removal",
"of",
"all",
"registered",
"registry",
"dependencies",
"in",
"the",
"reversed",
"order",
"in",
"which",
"they",
"where",
"added",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/storage/src/main/java/org/openbase/jul/storage/registry/AbstractRegistry.java#L721-L737 |
148,844 | openbase/jul | storage/src/main/java/org/openbase/jul/storage/registry/AbstractRegistry.java | AbstractRegistry.notifyObservers | protected final boolean notifyObservers() {
try {
// It is not waited until the write actions are finished because the notification will be triggered after the lock release.
if (registryLock.isWriteLockedByCurrentThread()) {
logger.debug("Notification of registry[" + this... | java | protected final boolean notifyObservers() {
try {
// It is not waited until the write actions are finished because the notification will be triggered after the lock release.
if (registryLock.isWriteLockedByCurrentThread()) {
logger.debug("Notification of registry[" + this... | [
"protected",
"final",
"boolean",
"notifyObservers",
"(",
")",
"{",
"try",
"{",
"// It is not waited until the write actions are finished because the notification will be triggered after the lock release.",
"if",
"(",
"registryLock",
".",
"isWriteLockedByCurrentThread",
"(",
")",
")... | Method triggers a new registry changed notification on all observers.
The notification will be skipped in case the registry is busy. But a final notification is always guaranteed.
@return true if the notification was performed or false if the notification was skipped. | [
"Method",
"triggers",
"a",
"new",
"registry",
"changed",
"notification",
"on",
"all",
"observers",
".",
"The",
"notification",
"will",
"be",
"skipped",
"in",
"case",
"the",
"registry",
"is",
"busy",
".",
"But",
"a",
"final",
"notification",
"is",
"always",
"... | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/storage/src/main/java/org/openbase/jul/storage/registry/AbstractRegistry.java#L760-L784 |
148,845 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/KnowledgeSourceImpl.java | KnowledgeSourceImpl.getMatchingPropIds | @Override
public List<String> getMatchingPropIds(String searchKey)
throws KnowledgeSourceReadException {
LOGGER.log(Level.INFO,
"Searching knowledge source For search string {0}", searchKey);
Set<String> searchResults = getSearchResultsFromBackend(searchKey);
retu... | java | @Override
public List<String> getMatchingPropIds(String searchKey)
throws KnowledgeSourceReadException {
LOGGER.log(Level.INFO,
"Searching knowledge source For search string {0}", searchKey);
Set<String> searchResults = getSearchResultsFromBackend(searchKey);
retu... | [
"@",
"Override",
"public",
"List",
"<",
"String",
">",
"getMatchingPropIds",
"(",
"String",
"searchKey",
")",
"throws",
"KnowledgeSourceReadException",
"{",
"LOGGER",
".",
"log",
"(",
"Level",
".",
"INFO",
",",
"\"Searching knowledge source For search string {0}\"",
"... | Gets the proposition Definitions from each backend that match the
searchKey
@param searchKey
@return
@throws KnowledgeSourceReadException | [
"Gets",
"the",
"proposition",
"Definitions",
"from",
"each",
"backend",
"that",
"match",
"the",
"searchKey"
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/KnowledgeSourceImpl.java#L758-L765 |
148,846 | ebean-orm/querybean-agent-now-merged-into-ebean-agent- | src/main/java/io/ebean/typequery/agent/AgentManifestReader.java | AgentManifestReader.readManifests | private AgentManifestReader readManifests(ClassLoader classLoader, String path) throws IOException {
Enumeration<URL> resources = classLoader.getResources(path);
while (resources.hasMoreElements()) {
URL url = resources.nextElement();
try {
addResource(url.openStream());
} catch (IOExc... | java | private AgentManifestReader readManifests(ClassLoader classLoader, String path) throws IOException {
Enumeration<URL> resources = classLoader.getResources(path);
while (resources.hasMoreElements()) {
URL url = resources.nextElement();
try {
addResource(url.openStream());
} catch (IOExc... | [
"private",
"AgentManifestReader",
"readManifests",
"(",
"ClassLoader",
"classLoader",
",",
"String",
"path",
")",
"throws",
"IOException",
"{",
"Enumeration",
"<",
"URL",
">",
"resources",
"=",
"classLoader",
".",
"getResources",
"(",
"path",
")",
";",
"while",
... | Read all the specific manifest files and return the set of packages containing type query beans. | [
"Read",
"all",
"the",
"specific",
"manifest",
"files",
"and",
"return",
"the",
"set",
"of",
"packages",
"containing",
"type",
"query",
"beans",
"."
] | a063554fabdbed15ff5e10ad0a0b53b67e039006 | https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/AgentManifestReader.java#L68-L80 |
148,847 | ebean-orm/querybean-agent-now-merged-into-ebean-agent- | src/main/java/io/ebean/typequery/agent/AgentManifestReader.java | AgentManifestReader.add | private void add(String packages) {
if (packages != null) {
String[] split = packages.split(",|;| ");
for (int i = 0; i < split.length; i++) {
String pkg = split[i].trim();
if (!pkg.isEmpty()) {
packageSet.add(pkg);
}
}
}
} | java | private void add(String packages) {
if (packages != null) {
String[] split = packages.split(",|;| ");
for (int i = 0; i < split.length; i++) {
String pkg = split[i].trim();
if (!pkg.isEmpty()) {
packageSet.add(pkg);
}
}
}
} | [
"private",
"void",
"add",
"(",
"String",
"packages",
")",
"{",
"if",
"(",
"packages",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"split",
"=",
"packages",
".",
"split",
"(",
"\",|;| \"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",... | Collect each individual package splitting by delimiters. | [
"Collect",
"each",
"individual",
"package",
"splitting",
"by",
"delimiters",
"."
] | a063554fabdbed15ff5e10ad0a0b53b67e039006 | https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/AgentManifestReader.java#L103-L113 |
148,848 | jboss/jboss-common-beans | src/main/java/org/jboss/common/beans/property/LongEditor.java | LongEditor.setAsText | @Override
public void setAsText(final String text) {
if (BeanUtils.isNull(text)) {
setValue(null);
return;
}
try {
Object newValue = Long.valueOf(text);
setValue(newValue);
} catch (NumberFormatException e) {
throw new Illeg... | java | @Override
public void setAsText(final String text) {
if (BeanUtils.isNull(text)) {
setValue(null);
return;
}
try {
Object newValue = Long.valueOf(text);
setValue(newValue);
} catch (NumberFormatException e) {
throw new Illeg... | [
"@",
"Override",
"public",
"void",
"setAsText",
"(",
"final",
"String",
"text",
")",
"{",
"if",
"(",
"BeanUtils",
".",
"isNull",
"(",
"text",
")",
")",
"{",
"setValue",
"(",
"null",
")",
";",
"return",
";",
"}",
"try",
"{",
"Object",
"newValue",
"=",... | Map the argument text into and Integer using Integer.valueOf. | [
"Map",
"the",
"argument",
"text",
"into",
"and",
"Integer",
"using",
"Integer",
".",
"valueOf",
"."
] | ffb48b1719762534bf92d762eadf91d1815f6748 | https://github.com/jboss/jboss-common-beans/blob/ffb48b1719762534bf92d762eadf91d1815f6748/src/main/java/org/jboss/common/beans/property/LongEditor.java#L38-L50 |
148,849 | kevoree/kevoree-library | mqttServer/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/subscriptions/SubscriptionsStore.java | SubscriptionsStore.init | public void init(IPersistentSubscriptionStore storageService) {
Log.debug("init invoked");
m_storageService = storageService;
//reload any subscriptions persisted
if (Log.DEBUG) {
Log.debug("Reloading all stored subscriptions...subscription tree before {}", dumpTree());
... | java | public void init(IPersistentSubscriptionStore storageService) {
Log.debug("init invoked");
m_storageService = storageService;
//reload any subscriptions persisted
if (Log.DEBUG) {
Log.debug("Reloading all stored subscriptions...subscription tree before {}", dumpTree());
... | [
"public",
"void",
"init",
"(",
"IPersistentSubscriptionStore",
"storageService",
")",
"{",
"Log",
".",
"debug",
"(",
"\"init invoked\"",
")",
";",
"m_storageService",
"=",
"storageService",
";",
"//reload any subscriptions persisted",
"if",
"(",
"Log",
".",
"DEBUG",
... | Initialize basic store structures, like the FS storage to maintain
client's topics subscriptions | [
"Initialize",
"basic",
"store",
"structures",
"like",
"the",
"FS",
"storage",
"to",
"maintain",
"client",
"s",
"topics",
"subscriptions"
] | 617460e6c5881902ebc488a31ecdea179024d8f1 | https://github.com/kevoree/kevoree-library/blob/617460e6c5881902ebc488a31ecdea179024d8f1/mqttServer/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/subscriptions/SubscriptionsStore.java#L81-L98 |
148,850 | foundation-runtime/configuration | configuration-api/src/main/java/com/cisco/oss/foundation/configuration/validation/params/ParamValidators.java | ParamValidators.getValidatorsMap | private static ConcurrentHashMap<Class, List<ParamValidator>> getValidatorsMap() {
// use <ConcurrentHashMap> in case validators are added while initializing parameters through <getValidator> method.
ConcurrentHashMap<Class, List<ParamValidator>> map = new ConcurrentHashMap();
addValidators(map... | java | private static ConcurrentHashMap<Class, List<ParamValidator>> getValidatorsMap() {
// use <ConcurrentHashMap> in case validators are added while initializing parameters through <getValidator> method.
ConcurrentHashMap<Class, List<ParamValidator>> map = new ConcurrentHashMap();
addValidators(map... | [
"private",
"static",
"ConcurrentHashMap",
"<",
"Class",
",",
"List",
"<",
"ParamValidator",
">",
">",
"getValidatorsMap",
"(",
")",
"{",
"// use <ConcurrentHashMap> in case validators are added while initializing parameters through <getValidator> method.",
"ConcurrentHashMap",
"<",... | build a map of all Validator implementations by their class type and required value | [
"build",
"a",
"map",
"of",
"all",
"Validator",
"implementations",
"by",
"their",
"class",
"type",
"and",
"required",
"value"
] | c5bd171a2cca0dc1c8d568f987843ca47c6d1eed | https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/validation/params/ParamValidators.java#L402-L412 |
148,851 | foundation-runtime/configuration | configuration-api/src/main/java/com/cisco/oss/foundation/configuration/validation/params/ParamValidators.java | ParamValidators.getValidator | public static<T extends ParamValidator> T getValidator(Class<T> clazz, boolean required) {
List<ParamValidator> validators = validatorsMap.get(clazz);
if (validators != null) {
if (required) {
return (T)validators.get(0);
}
return (T)validators.get(... | java | public static<T extends ParamValidator> T getValidator(Class<T> clazz, boolean required) {
List<ParamValidator> validators = validatorsMap.get(clazz);
if (validators != null) {
if (required) {
return (T)validators.get(0);
}
return (T)validators.get(... | [
"public",
"static",
"<",
"T",
"extends",
"ParamValidator",
">",
"T",
"getValidator",
"(",
"Class",
"<",
"T",
">",
"clazz",
",",
"boolean",
"required",
")",
"{",
"List",
"<",
"ParamValidator",
">",
"validators",
"=",
"validatorsMap",
".",
"get",
"(",
"clazz... | return the relevant Validator by the given class type and required indication | [
"return",
"the",
"relevant",
"Validator",
"by",
"the",
"given",
"class",
"type",
"and",
"required",
"indication"
] | c5bd171a2cca0dc1c8d568f987843ca47c6d1eed | https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/validation/params/ParamValidators.java#L458-L471 |
148,852 | weblicht/wlfxb | src/main/java/eu/clarin/weblicht/wlfxb/ed/xb/ExternalDataStored.java | ExternalDataStored.compose | public static ExternalDataStored compose(ExternalDataLayerStored... layers) {
ExternalDataStored ed = new ExternalDataStored();
for (ExternalDataLayerStored layer : layers) {
ed.layersInOrder[ExternalDataLayerTag.getFromClass(layer.getClass()).ordinal()] = layer;
}
return ed;... | java | public static ExternalDataStored compose(ExternalDataLayerStored... layers) {
ExternalDataStored ed = new ExternalDataStored();
for (ExternalDataLayerStored layer : layers) {
ed.layersInOrder[ExternalDataLayerTag.getFromClass(layer.getClass()).ordinal()] = layer;
}
return ed;... | [
"public",
"static",
"ExternalDataStored",
"compose",
"(",
"ExternalDataLayerStored",
"...",
"layers",
")",
"{",
"ExternalDataStored",
"ed",
"=",
"new",
"ExternalDataStored",
"(",
")",
";",
"for",
"(",
"ExternalDataLayerStored",
"layer",
":",
"layers",
")",
"{",
"e... | Composes the layers into one document. Normally, you should not use this
method, unless you want to manually compose document from the layer
pieces.
@param layers
@return external data composed of the provided layers | [
"Composes",
"the",
"layers",
"into",
"one",
"document",
".",
"Normally",
"you",
"should",
"not",
"use",
"this",
"method",
"unless",
"you",
"want",
"to",
"manually",
"compose",
"document",
"from",
"the",
"layer",
"pieces",
"."
] | a50f3c31062a3d617ed9018aabcc1180a8ceb464 | https://github.com/weblicht/wlfxb/blob/a50f3c31062a3d617ed9018aabcc1180a8ceb464/src/main/java/eu/clarin/weblicht/wlfxb/ed/xb/ExternalDataStored.java#L222-L228 |
148,853 | eurekaclinical/protempa | protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/EntitySpec.java | EntitySpec.hasReferenceTo | public boolean hasReferenceTo(EntitySpec entitySpec) {
if (entitySpec == null) {
throw new IllegalArgumentException("entitySpec cannot be null");
}
boolean found = false;
String entitySpecName = entitySpec.name;
for (ReferenceSpec refSpec : this.referenceSpecs) {
... | java | public boolean hasReferenceTo(EntitySpec entitySpec) {
if (entitySpec == null) {
throw new IllegalArgumentException("entitySpec cannot be null");
}
boolean found = false;
String entitySpecName = entitySpec.name;
for (ReferenceSpec refSpec : this.referenceSpecs) {
... | [
"public",
"boolean",
"hasReferenceTo",
"(",
"EntitySpec",
"entitySpec",
")",
"{",
"if",
"(",
"entitySpec",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"entitySpec cannot be null\"",
")",
";",
"}",
"boolean",
"found",
"=",
"false",
... | Returns whether this entity spec has a reference to another entity spec.
@param entitySpec another entity spec.
@return <code>true</code> or <code>false</code>. | [
"Returns",
"whether",
"this",
"entity",
"spec",
"has",
"a",
"reference",
"to",
"another",
"entity",
"spec",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/EntitySpec.java#L455-L469 |
148,854 | eurekaclinical/protempa | protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/EntitySpec.java | EntitySpec.referencesTo | public ReferenceSpec[] referencesTo(EntitySpec entitySpec) {
if (entitySpec == null) {
throw new IllegalArgumentException("entitySpec cannot be null");
}
List<ReferenceSpec> result = new ArrayList<>();
String entitySpecName = entitySpec.name;
for (ReferenceSpec refSp... | java | public ReferenceSpec[] referencesTo(EntitySpec entitySpec) {
if (entitySpec == null) {
throw new IllegalArgumentException("entitySpec cannot be null");
}
List<ReferenceSpec> result = new ArrayList<>();
String entitySpecName = entitySpec.name;
for (ReferenceSpec refSp... | [
"public",
"ReferenceSpec",
"[",
"]",
"referencesTo",
"(",
"EntitySpec",
"entitySpec",
")",
"{",
"if",
"(",
"entitySpec",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"entitySpec cannot be null\"",
")",
";",
"}",
"List",
"<",
"Refere... | Returns the reference specs that point to the given entity spec.
@param entitySpec another entity spec.
@return a {@link ReferenceSpec[]}. | [
"Returns",
"the",
"reference",
"specs",
"that",
"point",
"to",
"the",
"given",
"entity",
"spec",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/EntitySpec.java#L489-L502 |
148,855 | eurekaclinical/protempa | protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/EntitySpec.java | EntitySpec.getColumnSpecs | public ColumnSpec[] getColumnSpecs() {
Set<ColumnSpec> results = new HashSet<>();
addTo(results, this.baseSpec);
addTo(results, this.codeSpec);
addTo(results, this.constraintSpecs);
addTo(results, this.finishTimeSpec);
addTo(results, this.startTimeOrTimestampSpec);
... | java | public ColumnSpec[] getColumnSpecs() {
Set<ColumnSpec> results = new HashSet<>();
addTo(results, this.baseSpec);
addTo(results, this.codeSpec);
addTo(results, this.constraintSpecs);
addTo(results, this.finishTimeSpec);
addTo(results, this.startTimeOrTimestampSpec);
... | [
"public",
"ColumnSpec",
"[",
"]",
"getColumnSpecs",
"(",
")",
"{",
"Set",
"<",
"ColumnSpec",
">",
"results",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"addTo",
"(",
"results",
",",
"this",
".",
"baseSpec",
")",
";",
"addTo",
"(",
"results",
",",
"t... | Returns the distinct tables specified in this entity spec, not including
references to other entity specs.
@return an array of {@link TableSpec}s. Guaranteed not <code>null</code>. | [
"Returns",
"the",
"distinct",
"tables",
"specified",
"in",
"this",
"entity",
"spec",
"not",
"including",
"references",
"to",
"other",
"entity",
"specs",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/EntitySpec.java#L622-L638 |
148,856 | eurekaclinical/protempa | protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/SqlGeneratorUtil.java | SqlGeneratorUtil.prepareValue | public static String prepareValue(Object val) {
StringBuilder result = new StringBuilder();
boolean numberOrBooleanOrNull;
if (val != null && !(val instanceof Number) && !(val instanceof Boolean)) {
numberOrBooleanOrNull = false;
result.append("'");
} els... | java | public static String prepareValue(Object val) {
StringBuilder result = new StringBuilder();
boolean numberOrBooleanOrNull;
if (val != null && !(val instanceof Number) && !(val instanceof Boolean)) {
numberOrBooleanOrNull = false;
result.append("'");
} els... | [
"public",
"static",
"String",
"prepareValue",
"(",
"Object",
"val",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"boolean",
"numberOrBooleanOrNull",
";",
"if",
"(",
"val",
"!=",
"null",
"&&",
"!",
"(",
"val",
"instanceof",... | Generates an SQL-ready string for the given value based on its type.
@param val the value to prepare
@return a <tt>String</tt> ready to be appended to an SQL statement | [
"Generates",
"an",
"SQL",
"-",
"ready",
"string",
"for",
"the",
"given",
"value",
"based",
"on",
"its",
"type",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/SqlGeneratorUtil.java#L39-L63 |
148,857 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/LowLevelAbstractionFinder.java | LowLevelAbstractionFinder.nextSegmentAfterMatch | private static Segment<PrimitiveParameter> nextSegmentAfterMatch(
PatternFinderUser def, Segment<PrimitiveParameter> seg,
Algorithm algorithm, int minPatternLength, int maxPatternLength) {
if (seg == null) {
return null;
}
int arg;
int x = seg.getFirs... | java | private static Segment<PrimitiveParameter> nextSegmentAfterMatch(
PatternFinderUser def, Segment<PrimitiveParameter> seg,
Algorithm algorithm, int minPatternLength, int maxPatternLength) {
if (seg == null) {
return null;
}
int arg;
int x = seg.getFirs... | [
"private",
"static",
"Segment",
"<",
"PrimitiveParameter",
">",
"nextSegmentAfterMatch",
"(",
"PatternFinderUser",
"def",
",",
"Segment",
"<",
"PrimitiveParameter",
">",
"seg",
",",
"Algorithm",
"algorithm",
",",
"int",
"minPatternLength",
",",
"int",
"maxPatternLengt... | Return the next segment to be searched if the most recently searched
segment matched this rule. The returned segment is calculated according
to the this rule's search parameters.
@param ts
the sequence being searched.
@param seg
the most recently searched segment.
@param lastMatch
the most recent segment to match this... | [
"Return",
"the",
"next",
"segment",
"to",
"be",
"searched",
"if",
"the",
"most",
"recently",
"searched",
"segment",
"matched",
"this",
"rule",
".",
"The",
"returned",
"segment",
"is",
"calculated",
"according",
"to",
"the",
"this",
"rule",
"s",
"search",
"pa... | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/LowLevelAbstractionFinder.java#L93-L123 |
148,858 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/LowLevelAbstractionFinder.java | LowLevelAbstractionFinder.getXIndex | private static int getXIndex(PatternFinderUser def, int x,
Segment<PrimitiveParameter> lastMatch) {
int skipStart = def.getSkipStart();
if (lastMatch != null && skipStart > 0) {
return Math.max(x, lastMatch.getFirstIndex() + skipStart);
} else if (lastMatch != null && def... | java | private static int getXIndex(PatternFinderUser def, int x,
Segment<PrimitiveParameter> lastMatch) {
int skipStart = def.getSkipStart();
if (lastMatch != null && skipStart > 0) {
return Math.max(x, lastMatch.getFirstIndex() + skipStart);
} else if (lastMatch != null && def... | [
"private",
"static",
"int",
"getXIndex",
"(",
"PatternFinderUser",
"def",
",",
"int",
"x",
",",
"Segment",
"<",
"PrimitiveParameter",
">",
"lastMatch",
")",
"{",
"int",
"skipStart",
"=",
"def",
".",
"getSkipStart",
"(",
")",
";",
"if",
"(",
"lastMatch",
"!... | Return the first value of the next segment to be searched.
@param x
the first value of the most recently searched segment.
@param lastMatch
the most recent segment to match this rule.
@return the first value of the next segment to search. | [
"Return",
"the",
"first",
"value",
"of",
"the",
"next",
"segment",
"to",
"be",
"searched",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/LowLevelAbstractionFinder.java#L221-L231 |
148,859 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/LowLevelAbstractionFinder.java | LowLevelAbstractionFinder.getYIndex | private static int getYIndex(PatternFinderUser def, int y,
Segment<PrimitiveParameter> lastMatch) {
int skipEnd = def.getSkipEnd();
if (lastMatch != null && skipEnd > 0) {
return Math.max(y, lastMatch.getLastIndex() + skipEnd);
} else if (lastMatch != null && def.getSkip(... | java | private static int getYIndex(PatternFinderUser def, int y,
Segment<PrimitiveParameter> lastMatch) {
int skipEnd = def.getSkipEnd();
if (lastMatch != null && skipEnd > 0) {
return Math.max(y, lastMatch.getLastIndex() + skipEnd);
} else if (lastMatch != null && def.getSkip(... | [
"private",
"static",
"int",
"getYIndex",
"(",
"PatternFinderUser",
"def",
",",
"int",
"y",
",",
"Segment",
"<",
"PrimitiveParameter",
">",
"lastMatch",
")",
"{",
"int",
"skipEnd",
"=",
"def",
".",
"getSkipEnd",
"(",
")",
";",
"if",
"(",
"lastMatch",
"!=",
... | Return the last value of the next segment to be searched.
@param y
the last value of the most recently searched segment.
@param lastMatch
the most recent segment to match this rule.
@return the last value of the next segment to search. | [
"Return",
"the",
"last",
"value",
"of",
"the",
"next",
"segment",
"to",
"be",
"searched",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/LowLevelAbstractionFinder.java#L242-L252 |
148,860 | openbase/jul | processing/xml/src/main/java/org/openbase/jul/processing/xml/processing/XMLProcessor.java | XMLProcessor.existenceCheck | public void existenceCheck(final Nodes nodes, final String nodeNameForDebugging) throws XMLParsingException {
if (nodes.size() == 0) {
throw new XMLParsingException("Message doesn't contain a " + nodeNameForDebugging + "node!");
}
} | java | public void existenceCheck(final Nodes nodes, final String nodeNameForDebugging) throws XMLParsingException {
if (nodes.size() == 0) {
throw new XMLParsingException("Message doesn't contain a " + nodeNameForDebugging + "node!");
}
} | [
"public",
"void",
"existenceCheck",
"(",
"final",
"Nodes",
"nodes",
",",
"final",
"String",
"nodeNameForDebugging",
")",
"throws",
"XMLParsingException",
"{",
"if",
"(",
"nodes",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"XMLParsingException"... | Does nothing if nodes contains at least one node. Throws InvalidCfgDocException otherwise.
@param nodes
@param nodeNameForDebugging
@throws XMLParsingException | [
"Does",
"nothing",
"if",
"nodes",
"contains",
"at",
"least",
"one",
"node",
".",
"Throws",
"InvalidCfgDocException",
"otherwise",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/processing/xml/src/main/java/org/openbase/jul/processing/xml/processing/XMLProcessor.java#L326-L330 |
148,861 | openbase/jul | processing/xml/src/main/java/org/openbase/jul/processing/xml/processing/XMLProcessor.java | XMLProcessor.xorCheck | public static void xorCheck(final Nodes nodes1, final Nodes nodes2, final String nodeTypeForDebugging) throws XMLParsingException {
if (nodes1.size() > 0 && nodes2.size() > 0) {
throw new XMLParsingException("Message contains more than one " + nodeTypeForDebugging + " node. Only one permitted.");
... | java | public static void xorCheck(final Nodes nodes1, final Nodes nodes2, final String nodeTypeForDebugging) throws XMLParsingException {
if (nodes1.size() > 0 && nodes2.size() > 0) {
throw new XMLParsingException("Message contains more than one " + nodeTypeForDebugging + " node. Only one permitted.");
... | [
"public",
"static",
"void",
"xorCheck",
"(",
"final",
"Nodes",
"nodes1",
",",
"final",
"Nodes",
"nodes2",
",",
"final",
"String",
"nodeTypeForDebugging",
")",
"throws",
"XMLParsingException",
"{",
"if",
"(",
"nodes1",
".",
"size",
"(",
")",
">",
"0",
"&&",
... | Does nothing if only one of nodes1 or nodes2 contains more than zero nodes. Throws InvalidCfgDocException otherwise.
@param nodes1
@param nodes2
@param nodeTypeForDebugging
@throws XMLParsingException | [
"Does",
"nothing",
"if",
"only",
"one",
"of",
"nodes1",
"or",
"nodes2",
"contains",
"more",
"than",
"zero",
"nodes",
".",
"Throws",
"InvalidCfgDocException",
"otherwise",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/processing/xml/src/main/java/org/openbase/jul/processing/xml/processing/XMLProcessor.java#L340-L344 |
148,862 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/classloader/ComponentRegistry.java | ComponentRegistry.getComponentsVersions | public synchronized Map<String, String> getComponentsVersions() {
SortedMap<String, String> keys = new TreeMap<>(componentVersions);
return keys;
} | java | public synchronized Map<String, String> getComponentsVersions() {
SortedMap<String, String> keys = new TreeMap<>(componentVersions);
return keys;
} | [
"public",
"synchronized",
"Map",
"<",
"String",
",",
"String",
">",
"getComponentsVersions",
"(",
")",
"{",
"SortedMap",
"<",
"String",
",",
"String",
">",
"keys",
"=",
"new",
"TreeMap",
"<>",
"(",
"componentVersions",
")",
";",
"return",
"keys",
";",
"}"
... | Returns the list of registered Components and Versions as Map.
@return Map, never null | [
"Returns",
"the",
"list",
"of",
"registered",
"Components",
"and",
"Versions",
"as",
"Map",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/classloader/ComponentRegistry.java#L85-L88 |
148,863 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/classloader/ComponentRegistry.java | ComponentRegistry.registerComponent | public synchronized void registerComponent(Class<?> _clazz, String _version) {
componentVersions.put(_clazz.getName(), _version);
} | java | public synchronized void registerComponent(Class<?> _clazz, String _version) {
componentVersions.put(_clazz.getName(), _version);
} | [
"public",
"synchronized",
"void",
"registerComponent",
"(",
"Class",
"<",
"?",
">",
"_clazz",
",",
"String",
"_version",
")",
"{",
"componentVersions",
".",
"put",
"(",
"_clazz",
".",
"getName",
"(",
")",
",",
"_version",
")",
";",
"}"
] | Register a class with version.
@param _clazz class
@param _version version | [
"Register",
"a",
"class",
"with",
"version",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/classloader/ComponentRegistry.java#L106-L108 |
148,864 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/classloader/ComponentRegistry.java | ComponentRegistry.isIncluded | private synchronized boolean isIncluded(String _clazzName) {
if (includes.size() > 0) {
for (String include : includes) {
if (_clazzName.startsWith(include)) {
return true;
}
}
} // if we dont have a list, we include nothing (t... | java | private synchronized boolean isIncluded(String _clazzName) {
if (includes.size() > 0) {
for (String include : includes) {
if (_clazzName.startsWith(include)) {
return true;
}
}
} // if we dont have a list, we include nothing (t... | [
"private",
"synchronized",
"boolean",
"isIncluded",
"(",
"String",
"_clazzName",
")",
"{",
"if",
"(",
"includes",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"for",
"(",
"String",
"include",
":",
"includes",
")",
"{",
"if",
"(",
"_clazzName",
".",
"star... | Check if the given FQCN matches to any given include pattern.
@param _clazzName class
@return true if included, false otherwise | [
"Check",
"if",
"the",
"given",
"FQCN",
"matches",
"to",
"any",
"given",
"include",
"pattern",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/classloader/ComponentRegistry.java#L135-L145 |
148,865 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/classloader/ComponentRegistry.java | ComponentRegistry.registerComponent | public synchronized void registerComponent(Class<?> _clazz) {
if (_clazz == null) {
return;
}
if (isIncluded(_clazz.getName()) || _clazz.getName().equals(this.getClass().getName())) {
String classVersion = getVersionWithReflection(_clazz);
if (classVersion !=... | java | public synchronized void registerComponent(Class<?> _clazz) {
if (_clazz == null) {
return;
}
if (isIncluded(_clazz.getName()) || _clazz.getName().equals(this.getClass().getName())) {
String classVersion = getVersionWithReflection(_clazz);
if (classVersion !=... | [
"public",
"synchronized",
"void",
"registerComponent",
"(",
"Class",
"<",
"?",
">",
"_clazz",
")",
"{",
"if",
"(",
"_clazz",
"==",
"null",
")",
"{",
"return",
";",
"}",
"if",
"(",
"isIncluded",
"(",
"_clazz",
".",
"getName",
"(",
")",
")",
"||",
"_cl... | Register a class using the Class-Object.
@param _clazz class | [
"Register",
"a",
"class",
"using",
"the",
"Class",
"-",
"Object",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/classloader/ComponentRegistry.java#L151-L162 |
148,866 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/classloader/ComponentRegistry.java | ComponentRegistry.registerComponent | public synchronized void registerComponent(String _string) {
if (isIncluded(_string)) {
Class<?> dummy;
try {
dummy = Class.forName(_string);
String classVersion = getVersionWithReflection(dummy);
if (classVersion != null) {
... | java | public synchronized void registerComponent(String _string) {
if (isIncluded(_string)) {
Class<?> dummy;
try {
dummy = Class.forName(_string);
String classVersion = getVersionWithReflection(dummy);
if (classVersion != null) {
... | [
"public",
"synchronized",
"void",
"registerComponent",
"(",
"String",
"_string",
")",
"{",
"if",
"(",
"isIncluded",
"(",
"_string",
")",
")",
"{",
"Class",
"<",
"?",
">",
"dummy",
";",
"try",
"{",
"dummy",
"=",
"Class",
".",
"forName",
"(",
"_string",
... | Register a component with FQCN only. This method will try to get the class version using reflections!
@param _string fqcn | [
"Register",
"a",
"component",
"with",
"FQCN",
"only",
".",
"This",
"method",
"will",
"try",
"to",
"get",
"the",
"class",
"version",
"using",
"reflections!"
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/classloader/ComponentRegistry.java#L170-L184 |
148,867 | sematext/sematext-metrics | src/main/java/com/sematext/metrics/client/StDatapoint.java | StDatapoint.name | public static Builder name(String name) {
if (name == null || name.trim().isEmpty()) {
throw new IllegalArgumentException("Name should be defined.");
}
return new Builder(name);
} | java | public static Builder name(String name) {
if (name == null || name.trim().isEmpty()) {
throw new IllegalArgumentException("Name should be defined.");
}
return new Builder(name);
} | [
"public",
"static",
"Builder",
"name",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"name",
"==",
"null",
"||",
"name",
".",
"trim",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Name should be defined.\""... | Create new datapoint builder for metric's name.
@param name metric's name
@return datapoint builder instance
@throws IllegalArgumentException if name is empty or {@code null} | [
"Create",
"new",
"datapoint",
"builder",
"for",
"metric",
"s",
"name",
"."
] | a89ebb9eca2e4e8d8547e68bc9bc1f01aeb3975c | https://github.com/sematext/sematext-metrics/blob/a89ebb9eca2e4e8d8547e68bc9bc1f01aeb3975c/src/main/java/com/sematext/metrics/client/StDatapoint.java#L191-L196 |
148,868 | openbase/jul | processing/default/src/main/java/org/openbase/jul/processing/QuaternionEulerTransform.java | QuaternionEulerTransform.transform | public static Vector3d transform(final Quat4d quat4d) {
Vector3d result = new Vector3d();
double test = quat4d.x * quat4d.z + quat4d.y * quat4d.w;
if (test >= 0.5) { // singularity at north pole
result.x = 0;
result.y = Math.PI / 2;
result.z = 2 * Math.atan2(... | java | public static Vector3d transform(final Quat4d quat4d) {
Vector3d result = new Vector3d();
double test = quat4d.x * quat4d.z + quat4d.y * quat4d.w;
if (test >= 0.5) { // singularity at north pole
result.x = 0;
result.y = Math.PI / 2;
result.z = 2 * Math.atan2(... | [
"public",
"static",
"Vector3d",
"transform",
"(",
"final",
"Quat4d",
"quat4d",
")",
"{",
"Vector3d",
"result",
"=",
"new",
"Vector3d",
"(",
")",
";",
"double",
"test",
"=",
"quat4d",
".",
"x",
"*",
"quat4d",
".",
"z",
"+",
"quat4d",
".",
"y",
"*",
"q... | Conversion from quaternion to Euler rotation.
The x value fr
@param quat4d the quaternion from which the euler rotation is computed.
@return a vector with the mapping: x = roll, y = pitch, z = yaw | [
"Conversion",
"from",
"quaternion",
"to",
"Euler",
"rotation",
".",
"The",
"x",
"value",
"fr"
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/processing/default/src/main/java/org/openbase/jul/processing/QuaternionEulerTransform.java#L85-L109 |
148,869 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/value/ValueList.java | ValueList.getInstance | public static <V extends Value> ValueList<V> getInstance(V... value) {
ValueList<V> result = new ValueList<>(value.length);
for (V val : value) {
result.add(val);
}
return result;
} | java | public static <V extends Value> ValueList<V> getInstance(V... value) {
ValueList<V> result = new ValueList<>(value.length);
for (V val : value) {
result.add(val);
}
return result;
} | [
"public",
"static",
"<",
"V",
"extends",
"Value",
">",
"ValueList",
"<",
"V",
">",
"getInstance",
"(",
"V",
"...",
"value",
")",
"{",
"ValueList",
"<",
"V",
">",
"result",
"=",
"new",
"ValueList",
"<>",
"(",
"value",
".",
"length",
")",
";",
"for",
... | Creates a list of the provided elements in the same order.
@param value zero or more values.
@return a list of the provided values. | [
"Creates",
"a",
"list",
"of",
"the",
"provided",
"elements",
"in",
"the",
"same",
"order",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/value/ValueList.java#L47-L53 |
148,870 | foundation-runtime/configuration | configuration-api/src/main/java/com/cisco/oss/foundation/configuration/validation/params/ParamReaders.java | ParamReaders.getValuesMap | private static<V> TreeMap<String, V> getValuesMap (String prefix, ParamReader<V> reader) {
TreeMap<String, V> map = null;
Iterator iter = config().getKeys(prefix);
while(iter.hasNext()){
String key = iter.next().toString();
if (map == null) {
map = new ... | java | private static<V> TreeMap<String, V> getValuesMap (String prefix, ParamReader<V> reader) {
TreeMap<String, V> map = null;
Iterator iter = config().getKeys(prefix);
while(iter.hasNext()){
String key = iter.next().toString();
if (map == null) {
map = new ... | [
"private",
"static",
"<",
"V",
">",
"TreeMap",
"<",
"String",
",",
"V",
">",
"getValuesMap",
"(",
"String",
"prefix",
",",
"ParamReader",
"<",
"V",
">",
"reader",
")",
"{",
"TreeMap",
"<",
"String",
",",
"V",
">",
"map",
"=",
"null",
";",
"Iterator",... | return a map with all keys and values where the entries are sorted by the configured order | [
"return",
"a",
"map",
"with",
"all",
"keys",
"and",
"values",
"where",
"the",
"entries",
"are",
"sorted",
"by",
"the",
"configured",
"order"
] | c5bd171a2cca0dc1c8d568f987843ca47c6d1eed | https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/validation/params/ParamReaders.java#L411-L427 |
148,871 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/backend/dsb/filter/PositionFilter.java | PositionFilter.init | private void init() {
if (ival == null) {
this.ival = intervalFactory.getInstance(start, startGran, finish, finishGran);
if (startSide == null) {
startSide = Side.START;
}
if (finishSide == null) {
finishSide = Side.FINISH;
... | java | private void init() {
if (ival == null) {
this.ival = intervalFactory.getInstance(start, startGran, finish, finishGran);
if (startSide == null) {
startSide = Side.START;
}
if (finishSide == null) {
finishSide = Side.FINISH;
... | [
"private",
"void",
"init",
"(",
")",
"{",
"if",
"(",
"ival",
"==",
"null",
")",
"{",
"this",
".",
"ival",
"=",
"intervalFactory",
".",
"getInstance",
"(",
"start",
",",
"startGran",
",",
"finish",
",",
"finishGran",
")",
";",
"if",
"(",
"startSide",
... | Complete this object's initialization. This method should be called
externally only by Castor. | [
"Complete",
"this",
"object",
"s",
"initialization",
".",
"This",
"method",
"should",
"be",
"called",
"externally",
"only",
"by",
"Castor",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/backend/dsb/filter/PositionFilter.java#L95-L105 |
148,872 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/value/DateValue.java | DateValue.getInstance | public static DateValue getInstance(Date date) {
DateValue result;
if (date != null) {
synchronized (cache) {
result = cache.get(date);
if (result == null) {
result = new DateValue(date);
cache.put(date, result);
... | java | public static DateValue getInstance(Date date) {
DateValue result;
if (date != null) {
synchronized (cache) {
result = cache.get(date);
if (result == null) {
result = new DateValue(date);
cache.put(date, result);
... | [
"public",
"static",
"DateValue",
"getInstance",
"(",
"Date",
"date",
")",
"{",
"DateValue",
"result",
";",
"if",
"(",
"date",
"!=",
"null",
")",
"{",
"synchronized",
"(",
"cache",
")",
"{",
"result",
"=",
"cache",
".",
"get",
"(",
"date",
")",
";",
"... | Constructs a new date value from a Java date object. Uses a cache to
reuse date value objects.
@param date a {@link Date}. If <code>null</code> a new date value is
created using the current time.
@return a {@link DateValue}. | [
"Constructs",
"a",
"new",
"date",
"value",
"from",
"a",
"Java",
"date",
"object",
".",
"Uses",
"a",
"cache",
"to",
"reuse",
"date",
"value",
"objects",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/value/DateValue.java#L67-L81 |
148,873 | eurekaclinical/eurekaclinical-i2b2-integration-service | src/main/java/org/eurekaclinical/i2b2integration/service/resource/FreemarkerBuiltIns.java | FreemarkerBuiltIns.eval | String eval(String expr, Map<String, ? extends Object> model) throws TemplateException {
if (expr == null) {
throw new IllegalArgumentException("expr cannot be null");
}
try {
Template t = new Template("t", "${(" + expr.trim() + ")?c}", this.cfg);
StringWriter w = new StringWriter();
try (StringWriter... | java | String eval(String expr, Map<String, ? extends Object> model) throws TemplateException {
if (expr == null) {
throw new IllegalArgumentException("expr cannot be null");
}
try {
Template t = new Template("t", "${(" + expr.trim() + ")?c}", this.cfg);
StringWriter w = new StringWriter();
try (StringWriter... | [
"String",
"eval",
"(",
"String",
"expr",
",",
"Map",
"<",
"String",
",",
"?",
"extends",
"Object",
">",
"model",
")",
"throws",
"TemplateException",
"{",
"if",
"(",
"expr",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"expr ca... | Evaluates a string as a Freemarker Template Language expression.
@param expr a Freemarker Template Language expression. Cannot be
<code>null</code>.
@param model a map of variable names to values. The variables may be used
in the expression.
@return the result of the expression as a string. Guaranteed not
<code>null<... | [
"Evaluates",
"a",
"string",
"as",
"a",
"Freemarker",
"Template",
"Language",
"expression",
"."
] | 218fb8d6b5734dc076345693739d284c313f2669 | https://github.com/eurekaclinical/eurekaclinical-i2b2-integration-service/blob/218fb8d6b5734dc076345693739d284c313f2669/src/main/java/org/eurekaclinical/i2b2integration/service/resource/FreemarkerBuiltIns.java#L78-L92 |
148,874 | eurekaclinical/protempa | protempa-ksb-protege/src/main/java/org/protempa/backend/ksb/protege/Util.java | Util.parseTimeConstraint | static Integer parseTimeConstraint(Instance instance, String constraint,
ConnectionManager cm) throws KnowledgeSourceReadException {
Integer constraintValue = null;
if (instance != null && constraint != null) {
constraintValue = (Integer) cm.getOwnSlotValue(instance,
... | java | static Integer parseTimeConstraint(Instance instance, String constraint,
ConnectionManager cm) throws KnowledgeSourceReadException {
Integer constraintValue = null;
if (instance != null && constraint != null) {
constraintValue = (Integer) cm.getOwnSlotValue(instance,
... | [
"static",
"Integer",
"parseTimeConstraint",
"(",
"Instance",
"instance",
",",
"String",
"constraint",
",",
"ConnectionManager",
"cm",
")",
"throws",
"KnowledgeSourceReadException",
"{",
"Integer",
"constraintValue",
"=",
"null",
";",
"if",
"(",
"instance",
"!=",
"nu... | Calculates a time constraint in milliseconds from a pair of time
constraint and units values in a Protege instance.
@param instance a Protege <code>Instance</code> object.
@param constraint a time constraint slot name. The named slot is expected
to have an Integer value.
@param constraintUnits a time constraint units ... | [
"Calculates",
"a",
"time",
"constraint",
"in",
"milliseconds",
"from",
"a",
"pair",
"of",
"time",
"constraint",
"and",
"units",
"values",
"in",
"a",
"Protege",
"instance",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-ksb-protege/src/main/java/org/protempa/backend/ksb/protege/Util.java#L208-L217 |
148,875 | eurekaclinical/protempa | protempa-ksb-protege/src/main/java/org/protempa/backend/ksb/protege/Util.java | Util.setInverseIsAs | static void setInverseIsAs(Instance propInstance,
AbstractPropositionDefinition propDef, ConnectionManager cm)
throws KnowledgeSourceReadException {
Collection<?> isas = propInstance.getDirectOwnSlotValues(cm
.getSlot("inverseIsA"));
Logger logger = Util.logger();... | java | static void setInverseIsAs(Instance propInstance,
AbstractPropositionDefinition propDef, ConnectionManager cm)
throws KnowledgeSourceReadException {
Collection<?> isas = propInstance.getDirectOwnSlotValues(cm
.getSlot("inverseIsA"));
Logger logger = Util.logger();... | [
"static",
"void",
"setInverseIsAs",
"(",
"Instance",
"propInstance",
",",
"AbstractPropositionDefinition",
"propDef",
",",
"ConnectionManager",
"cm",
")",
"throws",
"KnowledgeSourceReadException",
"{",
"Collection",
"<",
"?",
">",
"isas",
"=",
"propInstance",
".",
"ge... | Sets inverseIsA on the given proposition definition. Automatically
resolves duplicate entries but logs a warning.
@param propInstance a Protege proposition definition {@link Instance}.
@param propDef the corresponding {@link AbstractPropositionDefinition}.
@param cm a {@link ConnectionManager}.
@throws KnowledgeSource... | [
"Sets",
"inverseIsA",
"on",
"the",
"given",
"proposition",
"definition",
".",
"Automatically",
"resolves",
"duplicate",
"entries",
"but",
"logs",
"a",
"warning",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-ksb-protege/src/main/java/org/protempa/backend/ksb/protege/Util.java#L339-L352 |
148,876 | eurekaclinical/protempa | protempa-ksb-protege/src/main/java/org/protempa/backend/ksb/protege/Util.java | Util.isParameter | private static boolean isParameter(Instance extendedParameter,
ConnectionManager cm) throws KnowledgeSourceReadException {
Instance proposition = (Instance) cm.getOwnSlotValue(extendedParameter,
cm.getSlot("proposition"));
if (proposition.hasType(cm.getCls("Parameter"))) {
... | java | private static boolean isParameter(Instance extendedParameter,
ConnectionManager cm) throws KnowledgeSourceReadException {
Instance proposition = (Instance) cm.getOwnSlotValue(extendedParameter,
cm.getSlot("proposition"));
if (proposition.hasType(cm.getCls("Parameter"))) {
... | [
"private",
"static",
"boolean",
"isParameter",
"(",
"Instance",
"extendedParameter",
",",
"ConnectionManager",
"cm",
")",
"throws",
"KnowledgeSourceReadException",
"{",
"Instance",
"proposition",
"=",
"(",
"Instance",
")",
"cm",
".",
"getOwnSlotValue",
"(",
"extendedP... | Returns whether a Protege instance is a Parameter.
@param extendedParameter a Protege instance that is assumed to be a
Proposition.
@return <code>true</code> if the provided Protege instance is a
Parameter, <code>false</code> otherwise. | [
"Returns",
"whether",
"a",
"Protege",
"instance",
"is",
"a",
"Parameter",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-ksb-protege/src/main/java/org/protempa/backend/ksb/protege/Util.java#L704-L713 |
148,877 | eurekaclinical/protempa | protempa-ksb-protege/src/main/java/org/protempa/backend/ksb/protege/Util.java | Util.propositionId | private static String propositionId(Instance extendedProposition) {
Instance proposition = (Instance) extendedProposition
.getOwnSlotValue(extendedProposition.getKnowledgeBase()
.getSlot("proposition"));
if (proposition.hasType(proposition.getKnowledgeBase().getCls(
... | java | private static String propositionId(Instance extendedProposition) {
Instance proposition = (Instance) extendedProposition
.getOwnSlotValue(extendedProposition.getKnowledgeBase()
.getSlot("proposition"));
if (proposition.hasType(proposition.getKnowledgeBase().getCls(
... | [
"private",
"static",
"String",
"propositionId",
"(",
"Instance",
"extendedProposition",
")",
"{",
"Instance",
"proposition",
"=",
"(",
"Instance",
")",
"extendedProposition",
".",
"getOwnSlotValue",
"(",
"extendedProposition",
".",
"getKnowledgeBase",
"(",
")",
".",
... | Returns the proposition id for an extended proposition definition.
@param extendedProposition an ExtendedProposition.
@return a proposition id {@link String}. | [
"Returns",
"the",
"proposition",
"id",
"for",
"an",
"extended",
"proposition",
"definition",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-ksb-protege/src/main/java/org/protempa/backend/ksb/protege/Util.java#L721-L733 |
148,878 | WinRoad-NET/htmldoclet4jdk8 | src/main/java/net/winroad/htmldoclet4jdk8/HtmlDoclet.java | HtmlDoclet.generateWRAPIDetailFiles | protected void generateWRAPIDetailFiles(RootDoc root, WRDoc wrDoc) {
List<String> tagList = new ArrayList<String>(wrDoc.getWRTags());
for (String tag : tagList) {
List<OpenAPI> openAPIList = wrDoc.getTaggedOpenAPIs().get(tag);
Set<String> filesGenerated = new HashSet<String>();
for (OpenAPI openAPI : openA... | java | protected void generateWRAPIDetailFiles(RootDoc root, WRDoc wrDoc) {
List<String> tagList = new ArrayList<String>(wrDoc.getWRTags());
for (String tag : tagList) {
List<OpenAPI> openAPIList = wrDoc.getTaggedOpenAPIs().get(tag);
Set<String> filesGenerated = new HashSet<String>();
for (OpenAPI openAPI : openA... | [
"protected",
"void",
"generateWRAPIDetailFiles",
"(",
"RootDoc",
"root",
",",
"WRDoc",
"wrDoc",
")",
"{",
"List",
"<",
"String",
">",
"tagList",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"wrDoc",
".",
"getWRTags",
"(",
")",
")",
";",
"for",
"(",
... | Generate the tag documentation.
@param root
the RootDoc of source to document.
@param wrDoc
the data structure representing the doc to generate. | [
"Generate",
"the",
"tag",
"documentation",
"."
] | 1e0aa93c12e0228fb0f7a1b4f8e89d9a17cbe5c7 | https://github.com/WinRoad-NET/htmldoclet4jdk8/blob/1e0aa93c12e0228fb0f7a1b4f8e89d9a17cbe5c7/src/main/java/net/winroad/htmldoclet4jdk8/HtmlDoclet.java#L234-L282 |
148,879 | dmfs/xmlobjects | src/org/dmfs/xmlobjects/pull/XmlObjectPull.java | XmlObjectPull.moveToNext | public <T> boolean moveToNext(ElementDescriptor<T> type, XmlPath path) throws XmlPullParserException, XmlObjectPullParserException, IOException
{
pullInternal(type, null, path, true, false);
return !isEndOfDocument();
} | java | public <T> boolean moveToNext(ElementDescriptor<T> type, XmlPath path) throws XmlPullParserException, XmlObjectPullParserException, IOException
{
pullInternal(type, null, path, true, false);
return !isEndOfDocument();
} | [
"public",
"<",
"T",
">",
"boolean",
"moveToNext",
"(",
"ElementDescriptor",
"<",
"T",
">",
"type",
",",
"XmlPath",
"path",
")",
"throws",
"XmlPullParserException",
",",
"XmlObjectPullParserException",
",",
"IOException",
"{",
"pullInternal",
"(",
"type",
",",
"n... | Moves forward to the start of the next element that matches the given type and path.
@return <code>true</code> if there is such an element, false otherwise.
@throws XmlPullParserException
@throws XmlObjectPullParserException
@throws IOException | [
"Moves",
"forward",
"to",
"the",
"start",
"of",
"the",
"next",
"element",
"that",
"matches",
"the",
"given",
"type",
"and",
"path",
"."
] | b68ddd0ce994d804fc2ec6da1096bf0d883b37f9 | https://github.com/dmfs/xmlobjects/blob/b68ddd0ce994d804fc2ec6da1096bf0d883b37f9/src/org/dmfs/xmlobjects/pull/XmlObjectPull.java#L82-L86 |
148,880 | dmfs/xmlobjects | src/org/dmfs/xmlobjects/pull/XmlObjectPull.java | XmlObjectPull.moveToNextSibling | public <T> boolean moveToNextSibling(ElementDescriptor<T> type, XmlPath path) throws XmlPullParserException, XmlObjectPullParserException, IOException
{
return pullInternal(type, null, path, true, true) != null || mParser.getDepth() == path.length() + 1;
} | java | public <T> boolean moveToNextSibling(ElementDescriptor<T> type, XmlPath path) throws XmlPullParserException, XmlObjectPullParserException, IOException
{
return pullInternal(type, null, path, true, true) != null || mParser.getDepth() == path.length() + 1;
} | [
"public",
"<",
"T",
">",
"boolean",
"moveToNextSibling",
"(",
"ElementDescriptor",
"<",
"T",
">",
"type",
",",
"XmlPath",
"path",
")",
"throws",
"XmlPullParserException",
",",
"XmlObjectPullParserException",
",",
"IOException",
"{",
"return",
"pullInternal",
"(",
... | Moves forward to the start of the next element that matches the given type and path without leaving the current sub-tree. If there is no other element of
that type in the current sub-tree, this mehtod will stop at the closing tab current sub-tree. Calling this methods with the same parameters won't get you
any further.... | [
"Moves",
"forward",
"to",
"the",
"start",
"of",
"the",
"next",
"element",
"that",
"matches",
"the",
"given",
"type",
"and",
"path",
"without",
"leaving",
"the",
"current",
"sub",
"-",
"tree",
".",
"If",
"there",
"is",
"no",
"other",
"element",
"of",
"tha... | b68ddd0ce994d804fc2ec6da1096bf0d883b37f9 | https://github.com/dmfs/xmlobjects/blob/b68ddd0ce994d804fc2ec6da1096bf0d883b37f9/src/org/dmfs/xmlobjects/pull/XmlObjectPull.java#L99-L102 |
148,881 | dmfs/xmlobjects | src/org/dmfs/xmlobjects/pull/XmlObjectPull.java | XmlObjectPull.getCurrentElementQualifiedName | public QualifiedName getCurrentElementQualifiedName()
{
XmlPullParser parser = mParser;
return QualifiedName.get(parser.getNamespace(), parser.getName());
} | java | public QualifiedName getCurrentElementQualifiedName()
{
XmlPullParser parser = mParser;
return QualifiedName.get(parser.getNamespace(), parser.getName());
} | [
"public",
"QualifiedName",
"getCurrentElementQualifiedName",
"(",
")",
"{",
"XmlPullParser",
"parser",
"=",
"mParser",
";",
"return",
"QualifiedName",
".",
"get",
"(",
"parser",
".",
"getNamespace",
"(",
")",
",",
"parser",
".",
"getName",
"(",
")",
")",
";",
... | Returns the qualified name of the current element.
@return | [
"Returns",
"the",
"qualified",
"name",
"of",
"the",
"current",
"element",
"."
] | b68ddd0ce994d804fc2ec6da1096bf0d883b37f9 | https://github.com/dmfs/xmlobjects/blob/b68ddd0ce994d804fc2ec6da1096bf0d883b37f9/src/org/dmfs/xmlobjects/pull/XmlObjectPull.java#L122-L126 |
148,882 | dmfs/xmlobjects | src/org/dmfs/xmlobjects/pull/XmlObjectPull.java | XmlObjectPull.pull | public <T> T pull(ElementDescriptor<T> type, T recycle, XmlPath path) throws XmlPullParserException, IOException, XmlObjectPullParserException
{
return pullInternal(type, recycle, path, false, false);
} | java | public <T> T pull(ElementDescriptor<T> type, T recycle, XmlPath path) throws XmlPullParserException, IOException, XmlObjectPullParserException
{
return pullInternal(type, recycle, path, false, false);
} | [
"public",
"<",
"T",
">",
"T",
"pull",
"(",
"ElementDescriptor",
"<",
"T",
">",
"type",
",",
"T",
"recycle",
",",
"XmlPath",
"path",
")",
"throws",
"XmlPullParserException",
",",
"IOException",
",",
"XmlObjectPullParserException",
"{",
"return",
"pullInternal",
... | Pull the next object of the given type from the XML stream. If the current position is within such an object the current object is returned.
@param type
@param recycle
@param path
@return
@throws XmlPullParserException
@throws IOException
@throws XmlObjectPullParserException | [
"Pull",
"the",
"next",
"object",
"of",
"the",
"given",
"type",
"from",
"the",
"XML",
"stream",
".",
"If",
"the",
"current",
"position",
"is",
"within",
"such",
"an",
"object",
"the",
"current",
"object",
"is",
"returned",
"."
] | b68ddd0ce994d804fc2ec6da1096bf0d883b37f9 | https://github.com/dmfs/xmlobjects/blob/b68ddd0ce994d804fc2ec6da1096bf0d883b37f9/src/org/dmfs/xmlobjects/pull/XmlObjectPull.java#L164-L167 |
148,883 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/PrimitiveParameter.java | PrimitiveParameter.getGranularity | public Granularity getGranularity() {
Interval interval = getInterval();
if (interval != null) {
return interval.getStartGranularity();
} else {
return null;
}
} | java | public Granularity getGranularity() {
Interval interval = getInterval();
if (interval != null) {
return interval.getStartGranularity();
} else {
return null;
}
} | [
"public",
"Granularity",
"getGranularity",
"(",
")",
"{",
"Interval",
"interval",
"=",
"getInterval",
"(",
")",
";",
"if",
"(",
"interval",
"!=",
"null",
")",
"{",
"return",
"interval",
".",
"getStartGranularity",
"(",
")",
";",
"}",
"else",
"{",
"return",... | Returns the granularity of this parameter's timestamp.
@return a {@link Granularity} object. | [
"Returns",
"the",
"granularity",
"of",
"this",
"parameter",
"s",
"timestamp",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/PrimitiveParameter.java#L96-L103 |
148,884 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/PrimitiveParameter.java | PrimitiveParameter.setGranularity | public void setGranularity(Granularity granularity) {
Interval interval = getInterval();
if (interval != null) {
resetInterval(interval.getMinStart(), granularity);
} else {
resetInterval(null, granularity);
}
} | java | public void setGranularity(Granularity granularity) {
Interval interval = getInterval();
if (interval != null) {
resetInterval(interval.getMinStart(), granularity);
} else {
resetInterval(null, granularity);
}
} | [
"public",
"void",
"setGranularity",
"(",
"Granularity",
"granularity",
")",
"{",
"Interval",
"interval",
"=",
"getInterval",
"(",
")",
";",
"if",
"(",
"interval",
"!=",
"null",
")",
"{",
"resetInterval",
"(",
"interval",
".",
"getMinStart",
"(",
")",
",",
... | Sets the granularity of this parameter's timestamp.
@param granularity
a {@link Granularity} object. | [
"Sets",
"the",
"granularity",
"of",
"this",
"parameter",
"s",
"timestamp",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/PrimitiveParameter.java#L111-L118 |
148,885 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/SliceConsequence.java | SliceConsequence.evaluate | @Override
public void evaluate(KnowledgeHelper arg0, WorkingMemory arg1) {
@SuppressWarnings("unchecked")
List<TemporalProposition> pl = (List<TemporalProposition>) arg0
.get(arg0.getDeclaration("result"));
Comparator<TemporalProposition> comp;
if (this.reverse) {
... | java | @Override
public void evaluate(KnowledgeHelper arg0, WorkingMemory arg1) {
@SuppressWarnings("unchecked")
List<TemporalProposition> pl = (List<TemporalProposition>) arg0
.get(arg0.getDeclaration("result"));
Comparator<TemporalProposition> comp;
if (this.reverse) {
... | [
"@",
"Override",
"public",
"void",
"evaluate",
"(",
"KnowledgeHelper",
"arg0",
",",
"WorkingMemory",
"arg1",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"List",
"<",
"TemporalProposition",
">",
"pl",
"=",
"(",
"List",
"<",
"TemporalProposition"... | Called when there exist the minimum necessary number of intervals with
the specified proposition id in order to compute the temporal slice
corresponding to this rule.
@param arg0
a {@link KnowledgeHelper}
@param arg1
a {@link WorkingMemory}
@see JBossRuleCreator | [
"Called",
"when",
"there",
"exist",
"the",
"minimum",
"necessary",
"number",
"of",
"intervals",
"with",
"the",
"specified",
"proposition",
"id",
"in",
"order",
"to",
"compute",
"the",
"temporal",
"slice",
"corresponding",
"to",
"this",
"rule",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/SliceConsequence.java#L123-L147 |
148,886 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/dest/table/AbstractTabularWriter.java | AbstractTabularWriter.writeValue | @Override
public final void writeValue(Value inValue, Format inFormat) throws TabularWriterException {
this.valueVisitor.setFormat(inFormat);
inValue.accept(this.valueVisitor);
TabularWriterException exception = this.valueVisitor.getException();
this.valueVisitor.clear();
if ... | java | @Override
public final void writeValue(Value inValue, Format inFormat) throws TabularWriterException {
this.valueVisitor.setFormat(inFormat);
inValue.accept(this.valueVisitor);
TabularWriterException exception = this.valueVisitor.getException();
this.valueVisitor.clear();
if ... | [
"@",
"Override",
"public",
"final",
"void",
"writeValue",
"(",
"Value",
"inValue",
",",
"Format",
"inFormat",
")",
"throws",
"TabularWriterException",
"{",
"this",
".",
"valueVisitor",
".",
"setFormat",
"(",
"inFormat",
")",
";",
"inValue",
".",
"accept",
"(",... | Writes the provided value, taking into account the type of value that it
is and the provided formatter.
@param inValue the value to write. Cannot be <code>null</code>.
@param inFormat the formatter to use.
@throws TabularWriterException if an error occurs trying to write the
value. | [
"Writes",
"the",
"provided",
"value",
"taking",
"into",
"account",
"the",
"type",
"of",
"value",
"that",
"it",
"is",
"and",
"the",
"provided",
"formatter",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/dest/table/AbstractTabularWriter.java#L119-L128 |
148,887 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/backend/CommonsBackend.java | CommonsBackend.initialize | public static void initialize(Object backend,
BackendInstanceSpec backendInstanceSpec) {
assert backend != null : "backend cannot be null";
assert backendInstanceSpec != null :
"backendInstanceSpec cannot be null";
for (Method method : backend.getClass().getMethods()) {
... | java | public static void initialize(Object backend,
BackendInstanceSpec backendInstanceSpec) {
assert backend != null : "backend cannot be null";
assert backendInstanceSpec != null :
"backendInstanceSpec cannot be null";
for (Method method : backend.getClass().getMethods()) {
... | [
"public",
"static",
"void",
"initialize",
"(",
"Object",
"backend",
",",
"BackendInstanceSpec",
"backendInstanceSpec",
")",
"{",
"assert",
"backend",
"!=",
"null",
":",
"\"backend cannot be null\"",
";",
"assert",
"backendInstanceSpec",
"!=",
"null",
":",
"\"backendIn... | Sets the fields corresponding to the properties in the configuration.
@param backend a backend.
@param backendInstanceSpec a {@link BackendInstanceSpec} | [
"Sets",
"the",
"fields",
"corresponding",
"to",
"the",
"properties",
"in",
"the",
"configuration",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/backend/CommonsBackend.java#L52-L75 |
148,888 | openbase/jul | pattern/launch/src/main/java/org/openbase/jul/pattern/launch/AbstractLauncher.java | AbstractLauncher.instantiateLaunchable | protected L instantiateLaunchable() throws CouldNotPerformException {
try {
return launchableClass.newInstance();
} catch (java.lang.InstantiationException | IllegalAccessException ex) {
throw new CouldNotPerformException("Could not load launchable class!", ex);
}
} | java | protected L instantiateLaunchable() throws CouldNotPerformException {
try {
return launchableClass.newInstance();
} catch (java.lang.InstantiationException | IllegalAccessException ex) {
throw new CouldNotPerformException("Could not load launchable class!", ex);
}
} | [
"protected",
"L",
"instantiateLaunchable",
"(",
")",
"throws",
"CouldNotPerformException",
"{",
"try",
"{",
"return",
"launchableClass",
".",
"newInstance",
"(",
")",
";",
"}",
"catch",
"(",
"java",
".",
"lang",
".",
"InstantiationException",
"|",
"IllegalAccessEx... | Method creates a launchable instance without any arguments.. In case the launchable needs arguments you can overwrite this method and instantiate the launchable by ourself.
@return the new instantiated launchable.
@throws CouldNotPerformException is thrown in case the launchable could not properly be instantiated. | [
"Method",
"creates",
"a",
"launchable",
"instance",
"without",
"any",
"arguments",
"..",
"In",
"case",
"the",
"launchable",
"needs",
"arguments",
"you",
"can",
"overwrite",
"this",
"method",
"and",
"instantiate",
"the",
"launchable",
"by",
"ourself",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/pattern/launch/src/main/java/org/openbase/jul/pattern/launch/AbstractLauncher.java#L148-L154 |
148,889 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/dest/table/Link.java | Link.validate | void validate(KnowledgeSource knowledgeSource) throws
LinkValidationFailedException, KnowledgeSourceReadException {
List<String> invalidPropIds = new ArrayList<>();
List<PropositionDefinition> propDefs = knowledgeSource.readPropositionDefinitions(this.propIdsAsSet.toArray(new String[this.pro... | java | void validate(KnowledgeSource knowledgeSource) throws
LinkValidationFailedException, KnowledgeSourceReadException {
List<String> invalidPropIds = new ArrayList<>();
List<PropositionDefinition> propDefs = knowledgeSource.readPropositionDefinitions(this.propIdsAsSet.toArray(new String[this.pro... | [
"void",
"validate",
"(",
"KnowledgeSource",
"knowledgeSource",
")",
"throws",
"LinkValidationFailedException",
",",
"KnowledgeSourceReadException",
"{",
"List",
"<",
"String",
">",
"invalidPropIds",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"List",
"<",
"Proposi... | Validates the fields of this link specification against the knowledge
source.
@param knowledgeSource a {@link KnowledgeSource}. Guaranteed not
<code>null</code>.
@throws QueryResultsHandlerValidationFailedException if validation
failed.
@throws KnowledgeSourceReadException if the knowledge source could not be
read. | [
"Validates",
"the",
"fields",
"of",
"this",
"link",
"specification",
"against",
"the",
"knowledge",
"source",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/dest/table/Link.java#L202-L220 |
148,890 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/dest/table/Link.java | Link.createHeaderFragment | final String createHeaderFragment(String ref) {
int size = this.propIdsAsSet.size();
boolean sep1Needed = size > 0 && this.constraints.length > 0;
String sep1 = sep1Needed ? ", " : "";
String id = size > 0 ? "id=" : "";
boolean parenNeeded = size > 0 || this.constraints.length > ... | java | final String createHeaderFragment(String ref) {
int size = this.propIdsAsSet.size();
boolean sep1Needed = size > 0 && this.constraints.length > 0;
String sep1 = sep1Needed ? ", " : "";
String id = size > 0 ? "id=" : "";
boolean parenNeeded = size > 0 || this.constraints.length > ... | [
"final",
"String",
"createHeaderFragment",
"(",
"String",
"ref",
")",
"{",
"int",
"size",
"=",
"this",
".",
"propIdsAsSet",
".",
"size",
"(",
")",
";",
"boolean",
"sep1Needed",
"=",
"size",
">",
"0",
"&&",
"this",
".",
"constraints",
".",
"length",
">",
... | Returns the default header fragment for this link.
@param ref the name {@link String} of the reference of this link.
@return a header fragment {@link String}.
@see #headerFragment() | [
"Returns",
"the",
"default",
"header",
"fragment",
"for",
"this",
"link",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/dest/table/Link.java#L238-L256 |
148,891 | openbase/jul | schedule/src/main/java/org/openbase/jul/schedule/Timeout.java | Timeout.restart | public void restart(final long waitTime) throws CouldNotPerformException {
logger.debug("Reset timer.");
try {
synchronized (lock) {
cancel();
start(waitTime);
}
} catch (ShutdownInProgressException ex) {
throw ex;
} cat... | java | public void restart(final long waitTime) throws CouldNotPerformException {
logger.debug("Reset timer.");
try {
synchronized (lock) {
cancel();
start(waitTime);
}
} catch (ShutdownInProgressException ex) {
throw ex;
} cat... | [
"public",
"void",
"restart",
"(",
"final",
"long",
"waitTime",
")",
"throws",
"CouldNotPerformException",
"{",
"logger",
".",
"debug",
"(",
"\"Reset timer.\"",
")",
";",
"try",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"cancel",
"(",
")",
";",
"start",
"... | Method restarts the timeout.
@param waitTime the new wait time to update.
@throws CouldNotPerformException is thrown in case the timeout could not be restarted.
@throws ShutdownInProgressException is thrown in case the the system is currently shutting down. | [
"Method",
"restarts",
"the",
"timeout",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/schedule/src/main/java/org/openbase/jul/schedule/Timeout.java#L86-L98 |
148,892 | openbase/jul | schedule/src/main/java/org/openbase/jul/schedule/Timeout.java | Timeout.start | public void start(final long waitTime) throws CouldNotPerformException {
try {
internal_start(waitTime);
} catch (CouldNotPerformException | RejectedExecutionException ex) {
if (ex instanceof RejectedExecutionException && GlobalScheduledExecutorService.getInstance().getExecutorSe... | java | public void start(final long waitTime) throws CouldNotPerformException {
try {
internal_start(waitTime);
} catch (CouldNotPerformException | RejectedExecutionException ex) {
if (ex instanceof RejectedExecutionException && GlobalScheduledExecutorService.getInstance().getExecutorSe... | [
"public",
"void",
"start",
"(",
"final",
"long",
"waitTime",
")",
"throws",
"CouldNotPerformException",
"{",
"try",
"{",
"internal_start",
"(",
"waitTime",
")",
";",
"}",
"catch",
"(",
"CouldNotPerformException",
"|",
"RejectedExecutionException",
"ex",
")",
"{",
... | Start the timeout with the given wait time. The default wait time is not modified and still the same as before.
@param waitTime The time to wait until the timeout is reached.
@throws CouldNotPerformException is thrown in case the timeout could not be started.
@throws ShutdownInProgressException is thrown in case the ... | [
"Start",
"the",
"timeout",
"with",
"the",
"given",
"wait",
"time",
".",
"The",
"default",
"wait",
"time",
"is",
"not",
"modified",
"and",
"still",
"the",
"same",
"as",
"before",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/schedule/src/main/java/org/openbase/jul/schedule/Timeout.java#L148-L157 |
148,893 | openbase/jul | schedule/src/main/java/org/openbase/jul/schedule/Timeout.java | Timeout.internal_start | private void internal_start(final long waitTime) throws RejectedExecutionException, CouldNotPerformException {
synchronized (lock) {
if (isActive()) {
logger.debug("Reject start, not interrupted or expired.");
return;
}
expired = false;
... | java | private void internal_start(final long waitTime) throws RejectedExecutionException, CouldNotPerformException {
synchronized (lock) {
if (isActive()) {
logger.debug("Reject start, not interrupted or expired.");
return;
}
expired = false;
... | [
"private",
"void",
"internal_start",
"(",
"final",
"long",
"waitTime",
")",
"throws",
"RejectedExecutionException",
",",
"CouldNotPerformException",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"if",
"(",
"isActive",
"(",
")",
")",
"{",
"logger",
".",
"debug",
... | Internal synchronized start method.
@param waitTime The time to wait until the timeout is reached.
@throws RejectedExecutionException is thrown if the timeout task could not be scheduled.
@throws CouldNotPerformException is thrown in case the timeout could not be started. | [
"Internal",
"synchronized",
"start",
"method",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/schedule/src/main/java/org/openbase/jul/schedule/Timeout.java#L167-L198 |
148,894 | jboss/jboss-common-beans | src/main/java/org/jboss/common/beans/property/DOMWriter.java | DOMWriter.sortAttributes | private Attr[] sortAttributes(NamedNodeMap attrs) {
int len = (attrs != null) ? attrs.getLength() : 0;
Attr[] array = new Attr[len];
for (int i = 0; i < len; i++) {
array[i] = (Attr) attrs.item(i);
}
for (int i = 0; i < len - 1; i++) {
String name = array... | java | private Attr[] sortAttributes(NamedNodeMap attrs) {
int len = (attrs != null) ? attrs.getLength() : 0;
Attr[] array = new Attr[len];
for (int i = 0; i < len; i++) {
array[i] = (Attr) attrs.item(i);
}
for (int i = 0; i < len - 1; i++) {
String name = array... | [
"private",
"Attr",
"[",
"]",
"sortAttributes",
"(",
"NamedNodeMap",
"attrs",
")",
"{",
"int",
"len",
"=",
"(",
"attrs",
"!=",
"null",
")",
"?",
"attrs",
".",
"getLength",
"(",
")",
":",
"0",
";",
"Attr",
"[",
"]",
"array",
"=",
"new",
"Attr",
"[",
... | Returns a sorted list of attributes. | [
"Returns",
"a",
"sorted",
"list",
"of",
"attributes",
"."
] | ffb48b1719762534bf92d762eadf91d1815f6748 | https://github.com/jboss/jboss-common-beans/blob/ffb48b1719762534bf92d762eadf91d1815f6748/src/main/java/org/jboss/common/beans/property/DOMWriter.java#L465-L489 |
148,895 | openbase/jul | communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractConfigurableController.java | AbstractConfigurableController.init | @Override
public void init(final CONFIG config) throws InitializationException, InterruptedException {
try {
try(final CloseableWriteLockWrapper ignored = getManageWriteLock(this)) {
if (config == null) {
throw new NotAvailableException("config");
... | java | @Override
public void init(final CONFIG config) throws InitializationException, InterruptedException {
try {
try(final CloseableWriteLockWrapper ignored = getManageWriteLock(this)) {
if (config == null) {
throw new NotAvailableException("config");
... | [
"@",
"Override",
"public",
"void",
"init",
"(",
"final",
"CONFIG",
"config",
")",
"throws",
"InitializationException",
",",
"InterruptedException",
"{",
"try",
"{",
"try",
"(",
"final",
"CloseableWriteLockWrapper",
"ignored",
"=",
"getManageWriteLock",
"(",
"this",
... | Initialize the controller with a configuration.
@param config the configuration
@throws InitializationException if the initialization fails
@throws java.lang.InterruptedException if the initialization is interrupted | [
"Initialize",
"the",
"controller",
"with",
"a",
"configuration",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractConfigurableController.java#L66-L80 |
148,896 | openbase/jul | communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractConfigurableController.java | AbstractConfigurableController.applyConfigUpdate | @Override
public CONFIG applyConfigUpdate(final CONFIG config) throws CouldNotPerformException, InterruptedException {
try {
boolean scopeChanged;
try(final CloseableWriteLockWrapper ignored = getManageWriteLock(this)) {
this.config = config;
if (supp... | java | @Override
public CONFIG applyConfigUpdate(final CONFIG config) throws CouldNotPerformException, InterruptedException {
try {
boolean scopeChanged;
try(final CloseableWriteLockWrapper ignored = getManageWriteLock(this)) {
this.config = config;
if (supp... | [
"@",
"Override",
"public",
"CONFIG",
"applyConfigUpdate",
"(",
"final",
"CONFIG",
"config",
")",
"throws",
"CouldNotPerformException",
",",
"InterruptedException",
"{",
"try",
"{",
"boolean",
"scopeChanged",
";",
"try",
"(",
"final",
"CloseableWriteLockWrapper",
"igno... | Apply an update to the configuration of this controller.
@param config the updated configuration
@return the updated configuration
@throws CouldNotPerformException if the update could not be performed
@throws InterruptedException if the update has been interrupted | [
"Apply",
"an",
"update",
"to",
"the",
"configuration",
"of",
"this",
"controller",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractConfigurableController.java#L92-L125 |
148,897 | foundation-runtime/configuration | configuration-lib/src/main/java/com/cisco/oss/foundation/configuration/InfraPropertyPlaceholderConfigurer.java | InfraPropertyPlaceholderConfigurer.resolvePlaceholder | @Override
protected String resolvePlaceholder(String placeholder, Properties props) {
String resolvedPlaceholder = super.resolvePlaceholder(placeholder, props);
if (null == resolvedPlaceholder) {
LOGGER.trace("could not resolve place holder for key: " + placeholder + ". Please check your configur... | java | @Override
protected String resolvePlaceholder(String placeholder, Properties props) {
String resolvedPlaceholder = super.resolvePlaceholder(placeholder, props);
if (null == resolvedPlaceholder) {
LOGGER.trace("could not resolve place holder for key: " + placeholder + ". Please check your configur... | [
"@",
"Override",
"protected",
"String",
"resolvePlaceholder",
"(",
"String",
"placeholder",
",",
"Properties",
"props",
")",
"{",
"String",
"resolvedPlaceholder",
"=",
"super",
".",
"resolvePlaceholder",
"(",
"placeholder",
",",
"props",
")",
";",
"if",
"(",
"nu... | trim the string value before it is returned to the caller method.
@see org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#resolvePlaceholder(String, java.util.Properties) | [
"trim",
"the",
"string",
"value",
"before",
"it",
"is",
"returned",
"to",
"the",
"caller",
"method",
"."
] | c5bd171a2cca0dc1c8d568f987843ca47c6d1eed | https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-lib/src/main/java/com/cisco/oss/foundation/configuration/InfraPropertyPlaceholderConfigurer.java#L42-L52 |
148,898 | dmfs/xmlobjects | src/org/dmfs/xmlobjects/pull/ParserContext.java | ParserContext.getDepthStateMap | private Map<ElementDescriptor<?>, Object> getDepthStateMap(int depth, boolean create)
{
if (mState == null)
{
mState = new ArrayList<Map<ElementDescriptor<?>, Object>>(Math.max(16, depth + 8));
}
// fill array list with null values up to the current depth
while (depth > mState.size())
{
mState.add(n... | java | private Map<ElementDescriptor<?>, Object> getDepthStateMap(int depth, boolean create)
{
if (mState == null)
{
mState = new ArrayList<Map<ElementDescriptor<?>, Object>>(Math.max(16, depth + 8));
}
// fill array list with null values up to the current depth
while (depth > mState.size())
{
mState.add(n... | [
"private",
"Map",
"<",
"ElementDescriptor",
"<",
"?",
">",
",",
"Object",
">",
"getDepthStateMap",
"(",
"int",
"depth",
",",
"boolean",
"create",
")",
"{",
"if",
"(",
"mState",
"==",
"null",
")",
"{",
"mState",
"=",
"new",
"ArrayList",
"<",
"Map",
"<",... | Return the element state map for the given depth, creating non-existing maps if required.
@param depth
The depth for which to retrieve the state map.
@param create
<code>true</code> to create a new map if it doesn't exist.
@return | [
"Return",
"the",
"element",
"state",
"map",
"for",
"the",
"given",
"depth",
"creating",
"non",
"-",
"existing",
"maps",
"if",
"required",
"."
] | b68ddd0ce994d804fc2ec6da1096bf0d883b37f9 | https://github.com/dmfs/xmlobjects/blob/b68ddd0ce994d804fc2ec6da1096bf0d883b37f9/src/org/dmfs/xmlobjects/pull/ParserContext.java#L170-L194 |
148,899 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/classloader/ClassLoaderWithRegistry.java | ClassLoaderWithRegistry.addIncludedPackageNames | public void addIncludedPackageNames(String _packageName) {
if (_packageName.endsWith(".")) {
includePackageNames.add(_packageName);
ComponentRegistry.getInstance().addPackageToIncludeList(_packageName);
}
} | java | public void addIncludedPackageNames(String _packageName) {
if (_packageName.endsWith(".")) {
includePackageNames.add(_packageName);
ComponentRegistry.getInstance().addPackageToIncludeList(_packageName);
}
} | [
"public",
"void",
"addIncludedPackageNames",
"(",
"String",
"_packageName",
")",
"{",
"if",
"(",
"_packageName",
".",
"endsWith",
"(",
"\".\"",
")",
")",
"{",
"includePackageNames",
".",
"add",
"(",
"_packageName",
")",
";",
"ComponentRegistry",
".",
"getInstanc... | Add a package name which should be loaded with this classloader.
@param _packageName name of the package, has to end with '.' | [
"Add",
"a",
"package",
"name",
"which",
"should",
"be",
"loaded",
"with",
"this",
"classloader",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/classloader/ClassLoaderWithRegistry.java#L52-L57 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.