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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
44,700 | btrplace/scheduler | choco/src/main/java/org/btrplace/scheduler/choco/runner/Metrics.java | Metrics.add | public void add(Metrics m) {
timeCount += m.timeCount;
readingTimeCount += m.readingTimeCount;
nodes += m.nodes;
backtracks += m.backtracks;
fails += m.fails;
restarts += m.restarts;
} | java | public void add(Metrics m) {
timeCount += m.timeCount;
readingTimeCount += m.readingTimeCount;
nodes += m.nodes;
backtracks += m.backtracks;
fails += m.fails;
restarts += m.restarts;
} | [
"public",
"void",
"add",
"(",
"Metrics",
"m",
")",
"{",
"timeCount",
"+=",
"m",
".",
"timeCount",
";",
"readingTimeCount",
"+=",
"m",
".",
"readingTimeCount",
";",
"nodes",
"+=",
"m",
".",
"nodes",
";",
"backtracks",
"+=",
"m",
".",
"backtracks",
";",
... | Add metrics.
All the metrics are aggregated to the current instance
@param m the metrics to add | [
"Add",
"metrics",
".",
"All",
"the",
"metrics",
"are",
"aggregated",
"to",
"the",
"current",
"instance"
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/runner/Metrics.java#L97-L104 |
44,701 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/LayerImpl.java | LayerImpl.generateCacheKey | protected String generateCacheKey(HttpServletRequest request, Map<String, ICacheKeyGenerator> cacheKeyGenerators) throws IOException {
String cacheKey = null;
if (cacheKeyGenerators != null) {
// First, decompose any composite cache key generators into their
// constituent cache key generators so that we ... | java | protected String generateCacheKey(HttpServletRequest request, Map<String, ICacheKeyGenerator> cacheKeyGenerators) throws IOException {
String cacheKey = null;
if (cacheKeyGenerators != null) {
// First, decompose any composite cache key generators into their
// constituent cache key generators so that we ... | [
"protected",
"String",
"generateCacheKey",
"(",
"HttpServletRequest",
"request",
",",
"Map",
"<",
"String",
",",
"ICacheKeyGenerator",
">",
"cacheKeyGenerators",
")",
"throws",
"IOException",
"{",
"String",
"cacheKey",
"=",
"null",
";",
"if",
"(",
"cacheKeyGenerator... | Generates a cache key for the layer.
@param request
the request object
@param cacheKeyGenerators
map of cache key generator class names to instance objects
@return the cache key
@throws IOException | [
"Generates",
"a",
"cache",
"key",
"for",
"the",
"layer",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/LayerImpl.java#L654-L674 |
44,702 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/LayerImpl.java | LayerImpl.readObject | private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
// Call the default implementation to de-serialize our object
in.defaultReadObject();
// init transients
_validateLastModified = new AtomicBoolean(true);
_cacheKeyGenMutex = new Semaphore(1);
_isReportCacheInfo ... | java | private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
// Call the default implementation to de-serialize our object
in.defaultReadObject();
// init transients
_validateLastModified = new AtomicBoolean(true);
_cacheKeyGenMutex = new Semaphore(1);
_isReportCacheInfo ... | [
"private",
"void",
"readObject",
"(",
"ObjectInputStream",
"in",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"// Call the default implementation to de-serialize our object\r",
"in",
".",
"defaultReadObject",
"(",
")",
";",
"// init transients\r",
"_valid... | De-serialize this object from an ObjectInputStream
@param in The ObjectInputStream
@throws IOException
@throws ClassNotFoundException | [
"De",
"-",
"serialize",
"this",
"object",
"from",
"an",
"ObjectInputStream"
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/LayerImpl.java#L763-L770 |
44,703 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/LayerImpl.java | LayerImpl.getLastModified | protected long getLastModified(IAggregator aggregator, ModuleList modules) {
long result = 0L;
for (ModuleList.ModuleListEntry entry : modules) {
IResource resource = entry.getModule().getResource(aggregator);
long lastMod = resource.lastModified();
result = Math.max(result, lastMod);
}
return r... | java | protected long getLastModified(IAggregator aggregator, ModuleList modules) {
long result = 0L;
for (ModuleList.ModuleListEntry entry : modules) {
IResource resource = entry.getModule().getResource(aggregator);
long lastMod = resource.lastModified();
result = Math.max(result, lastMod);
}
return r... | [
"protected",
"long",
"getLastModified",
"(",
"IAggregator",
"aggregator",
",",
"ModuleList",
"modules",
")",
"{",
"long",
"result",
"=",
"0L",
";",
"for",
"(",
"ModuleList",
".",
"ModuleListEntry",
"entry",
":",
"modules",
")",
"{",
"IResource",
"resource",
"=... | Returns the newest last modified time of the files in the list
@param aggregator
@param modules
The list of ModuleFile objects
@return The newest last modified time of all the files in the list | [
"Returns",
"the",
"newest",
"last",
"modified",
"time",
"of",
"the",
"files",
"in",
"the",
"list"
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/LayerImpl.java#L1031-L1039 |
44,704 | nikolavp/approval | approval-core/src/main/java/com/github/approval/Approvals.java | Approvals.verify | public static void verify(short value, Path path) {
Approval.of(short.class)
.withReporter(reporter)
.build()
.verify(value, path);
} | java | public static void verify(short value, Path path) {
Approval.of(short.class)
.withReporter(reporter)
.build()
.verify(value, path);
} | [
"public",
"static",
"void",
"verify",
"(",
"short",
"value",
",",
"Path",
"path",
")",
"{",
"Approval",
".",
"of",
"(",
"short",
".",
"class",
")",
".",
"withReporter",
"(",
"reporter",
")",
".",
"build",
"(",
")",
".",
"verify",
"(",
"value",
",",
... | An overload for verifying a single short value. This will call the approval object with proper reporter and use the path for verification.
@param value the short that needs to be verified
@param path the path in which to store the approval file | [
"An",
"overload",
"for",
"verifying",
"a",
"single",
"short",
"value",
".",
"This",
"will",
"call",
"the",
"approval",
"object",
"with",
"proper",
"reporter",
"and",
"use",
"the",
"path",
"for",
"verification",
"."
] | 5e32ecc3bc7f631e94a7049894fdd99a3aa5b1b8 | https://github.com/nikolavp/approval/blob/5e32ecc3bc7f631e94a7049894fdd99a3aa5b1b8/approval-core/src/main/java/com/github/approval/Approvals.java#L182-L187 |
44,705 | btrplace/scheduler | btrpsl/src/main/java/org/btrplace/btrpsl/element/DefaultBtrpOperand.java | DefaultBtrpOperand.prettyType | public static String prettyType(BtrpOperand o) {
if (o == IgnorableOperand.getInstance()) {
return "??";
}
return prettyType(o.degree(), o.type());
} | java | public static String prettyType(BtrpOperand o) {
if (o == IgnorableOperand.getInstance()) {
return "??";
}
return prettyType(o.degree(), o.type());
} | [
"public",
"static",
"String",
"prettyType",
"(",
"BtrpOperand",
"o",
")",
"{",
"if",
"(",
"o",
"==",
"IgnorableOperand",
".",
"getInstance",
"(",
")",
")",
"{",
"return",
"\"??\"",
";",
"}",
"return",
"prettyType",
"(",
"o",
".",
"degree",
"(",
")",
",... | Generate a pretty type for an operand.
@param o the operand
@return a string that describes the operand type. | [
"Generate",
"a",
"pretty",
"type",
"for",
"an",
"operand",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/btrpsl/src/main/java/org/btrplace/btrpsl/element/DefaultBtrpOperand.java#L113-L118 |
44,706 | btrplace/scheduler | btrpsl/src/main/java/org/btrplace/btrpsl/element/DefaultBtrpOperand.java | DefaultBtrpOperand.prettyType | public static String prettyType(int degree, Type t) {
StringBuilder b = new StringBuilder();
for (int i = degree; i > 0; i--) {
b.append("set<");
}
b.append(t.toString().toLowerCase());
for (int i = 0; i < degree; i++) {
b.append(">");
}
re... | java | public static String prettyType(int degree, Type t) {
StringBuilder b = new StringBuilder();
for (int i = degree; i > 0; i--) {
b.append("set<");
}
b.append(t.toString().toLowerCase());
for (int i = 0; i < degree; i++) {
b.append(">");
}
re... | [
"public",
"static",
"String",
"prettyType",
"(",
"int",
"degree",
",",
"Type",
"t",
")",
"{",
"StringBuilder",
"b",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"degree",
";",
"i",
">",
"0",
";",
"i",
"--",
")",
"{",
"... | Pretty textual representation of a given element type.
@param degree 0 for a literal, 1 for a set, 2 for a set of sets, ...
@param t the literal
@return a String | [
"Pretty",
"textual",
"representation",
"of",
"a",
"given",
"element",
"type",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/btrpsl/src/main/java/org/btrplace/btrpsl/element/DefaultBtrpOperand.java#L127-L137 |
44,707 | btrplace/scheduler | choco/src/main/java/org/btrplace/scheduler/choco/view/DefaultCumulatives.java | DefaultCumulatives.addDim | @Override
public void addDim(List<IntVar> c, int[] cUse, IntVar[] dUse) {
capacities.add(c);
cUsages.add(cUse);
dUsages.add(dUse);
} | java | @Override
public void addDim(List<IntVar> c, int[] cUse, IntVar[] dUse) {
capacities.add(c);
cUsages.add(cUse);
dUsages.add(dUse);
} | [
"@",
"Override",
"public",
"void",
"addDim",
"(",
"List",
"<",
"IntVar",
">",
"c",
",",
"int",
"[",
"]",
"cUse",
",",
"IntVar",
"[",
"]",
"dUse",
")",
"{",
"capacities",
".",
"add",
"(",
"c",
")",
";",
"cUsages",
".",
"add",
"(",
"cUse",
")",
"... | Add a dimension.
@param c the resource capacity of each of the nodes
@param cUse the resource usage of each of the cSlices
@param dUse the resource usage of each of the dSlices | [
"Add",
"a",
"dimension",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/view/DefaultCumulatives.java#L62-L67 |
44,708 | btrplace/scheduler | choco/src/main/java/org/btrplace/scheduler/choco/view/DefaultCumulatives.java | DefaultCumulatives.beforeSolve | @Override
@SuppressWarnings("squid:S3346")
public boolean beforeSolve(ReconfigurationProblem rp) {
super.beforeSolve(rp);
if (rp.getSourceModel().getMapping().getNbNodes() == 0 || capacities.isEmpty()) {
return true;
}
int nbDims = capacities.size();
int nbRe... | java | @Override
@SuppressWarnings("squid:S3346")
public boolean beforeSolve(ReconfigurationProblem rp) {
super.beforeSolve(rp);
if (rp.getSourceModel().getMapping().getNbNodes() == 0 || capacities.isEmpty()) {
return true;
}
int nbDims = capacities.size();
int nbRe... | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"squid:S3346\"",
")",
"public",
"boolean",
"beforeSolve",
"(",
"ReconfigurationProblem",
"rp",
")",
"{",
"super",
".",
"beforeSolve",
"(",
"rp",
")",
";",
"if",
"(",
"rp",
".",
"getSourceModel",
"(",
")",
".",... | Build the constraint.
@return the resulting constraint | [
"Build",
"the",
"constraint",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/view/DefaultCumulatives.java#L74-L131 |
44,709 | btrplace/scheduler | choco/src/main/java/org/btrplace/scheduler/choco/view/DefaultCumulatives.java | DefaultCumulatives.symmetryBreakingForStayingVMs | private boolean symmetryBreakingForStayingVMs(ReconfigurationProblem rp) {
for (VM vm : rp.getFutureRunningVMs()) {
VMTransition a = rp.getVMAction(vm);
Slice dSlice = a.getDSlice();
Slice cSlice = a.getCSlice();
if (dSlice != null && cSlice != null) {
... | java | private boolean symmetryBreakingForStayingVMs(ReconfigurationProblem rp) {
for (VM vm : rp.getFutureRunningVMs()) {
VMTransition a = rp.getVMAction(vm);
Slice dSlice = a.getDSlice();
Slice cSlice = a.getCSlice();
if (dSlice != null && cSlice != null) {
... | [
"private",
"boolean",
"symmetryBreakingForStayingVMs",
"(",
"ReconfigurationProblem",
"rp",
")",
"{",
"for",
"(",
"VM",
"vm",
":",
"rp",
".",
"getFutureRunningVMs",
"(",
")",
")",
"{",
"VMTransition",
"a",
"=",
"rp",
".",
"getVMAction",
"(",
"vm",
")",
";",
... | Symmetry breaking for VMs that stay running, on the same node.
@return {@code true} iff the symmetry breaking does not lead to a problem without solutions | [
"Symmetry",
"breaking",
"for",
"VMs",
"that",
"stay",
"running",
"on",
"the",
"same",
"node",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/view/DefaultCumulatives.java#L165-L187 |
44,710 | berkesa/datatree | src/main/java/io/datatree/Tree.java | Tree.getPath | protected StringBuilder getPath(StringBuilder path, int startIndex, boolean addPoint) {
boolean simple = true;
if (key != null) {
if (addPoint && path.length() > 0) {
path.insert(0, '.');
}
if (key instanceof Integer) {
path.insert(0, ']');
if (startIndex == 0) {
path.insert(0, ke... | java | protected StringBuilder getPath(StringBuilder path, int startIndex, boolean addPoint) {
boolean simple = true;
if (key != null) {
if (addPoint && path.length() > 0) {
path.insert(0, '.');
}
if (key instanceof Integer) {
path.insert(0, ']');
if (startIndex == 0) {
path.insert(0, ke... | [
"protected",
"StringBuilder",
"getPath",
"(",
"StringBuilder",
"path",
",",
"int",
"startIndex",
",",
"boolean",
"addPoint",
")",
"{",
"boolean",
"simple",
"=",
"true",
";",
"if",
"(",
"key",
"!=",
"null",
")",
"{",
"if",
"(",
"addPoint",
"&&",
"path",
"... | Recursive path-builder method.
@param path
path builder
@param startIndex
first index within array (startIndex = 0 -> zero based
array-indexing)
@param addPoint
a point is insertable into the path
@return path of this node | [
"Recursive",
"path",
"-",
"builder",
"method",
"."
] | 79aea9b45c7b46ab28af0a09310bc01c421c6b3a | https://github.com/berkesa/datatree/blob/79aea9b45c7b46ab28af0a09310bc01c421c6b3a/src/main/java/io/datatree/Tree.java#L402-L425 |
44,711 | berkesa/datatree | src/main/java/io/datatree/Tree.java | Tree.setType | public Tree setType(Class<?> type) {
if (value == null || value.getClass() == type) {
return this;
}
value = DataConverterRegistry.convert(type, value);
if (parent != null && key != null) {
if (key instanceof String) {
parent.putObjectInternal((String) key, value, false);
} else {
pare... | java | public Tree setType(Class<?> type) {
if (value == null || value.getClass() == type) {
return this;
}
value = DataConverterRegistry.convert(type, value);
if (parent != null && key != null) {
if (key instanceof String) {
parent.putObjectInternal((String) key, value, false);
} else {
pare... | [
"public",
"Tree",
"setType",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"if",
"(",
"value",
"==",
"null",
"||",
"value",
".",
"getClass",
"(",
")",
"==",
"type",
")",
"{",
"return",
"this",
";",
"}",
"value",
"=",
"DataConverterRegistry",
".",
... | Sets this node's type and converts the value into the specified type.
@param type
new type
@return this node | [
"Sets",
"this",
"node",
"s",
"type",
"and",
"converts",
"the",
"value",
"into",
"the",
"specified",
"type",
"."
] | 79aea9b45c7b46ab28af0a09310bc01c421c6b3a | https://github.com/berkesa/datatree/blob/79aea9b45c7b46ab28af0a09310bc01c421c6b3a/src/main/java/io/datatree/Tree.java#L446-L460 |
44,712 | berkesa/datatree | src/main/java/io/datatree/Tree.java | Tree.insert | public Tree insert(int index, byte[] value, boolean asBase64String) {
if (asBase64String) {
return insertObjectInternal(index, BASE64.encode(value));
}
return insertObjectInternal(index, value);
} | java | public Tree insert(int index, byte[] value, boolean asBase64String) {
if (asBase64String) {
return insertObjectInternal(index, BASE64.encode(value));
}
return insertObjectInternal(index, value);
} | [
"public",
"Tree",
"insert",
"(",
"int",
"index",
",",
"byte",
"[",
"]",
"value",
",",
"boolean",
"asBase64String",
")",
"{",
"if",
"(",
"asBase64String",
")",
"{",
"return",
"insertObjectInternal",
"(",
"index",
",",
"BASE64",
".",
"encode",
"(",
"value",
... | Inserts the specified byte array at the specified position in this List.
@param index
index at which the specified element is to be inserted
@param value
array value to be inserted
@param asBase64String
store byte array as BASE64 String
@return this node
@throws IndexOutOfBoundsException
if the index is out of range | [
"Inserts",
"the",
"specified",
"byte",
"array",
"at",
"the",
"specified",
"position",
"in",
"this",
"List",
"."
] | 79aea9b45c7b46ab28af0a09310bc01c421c6b3a | https://github.com/berkesa/datatree/blob/79aea9b45c7b46ab28af0a09310bc01c421c6b3a/src/main/java/io/datatree/Tree.java#L1485-L1490 |
44,713 | berkesa/datatree | src/main/java/io/datatree/Tree.java | Tree.putObject | public Tree putObject(String path, Object value) {
return putObjectInternal(path, getNodeValue(value), false);
} | java | public Tree putObject(String path, Object value) {
return putObjectInternal(path, getNodeValue(value), false);
} | [
"public",
"Tree",
"putObject",
"(",
"String",
"path",
",",
"Object",
"value",
")",
"{",
"return",
"putObjectInternal",
"(",
"path",
",",
"getNodeValue",
"(",
"value",
")",
",",
"false",
")",
";",
"}"
] | Puts a node with the specified value into the specified path.
@param path
path (e.g. "path.to.node[0]")
@param value
the new value
@return container node | [
"Puts",
"a",
"node",
"with",
"the",
"specified",
"value",
"into",
"the",
"specified",
"path",
"."
] | 79aea9b45c7b46ab28af0a09310bc01c421c6b3a | https://github.com/berkesa/datatree/blob/79aea9b45c7b46ab28af0a09310bc01c421c6b3a/src/main/java/io/datatree/Tree.java#L2140-L2142 |
44,714 | btrplace/scheduler | json/src/main/java/org/btrplace/json/JSON.java | JSON.readInstance | public static Instance readInstance(File f) {
try (Reader in = makeIn(f)) {
return readInstance(in);
} catch (IOException e) {
throw new IllegalArgumentException(e);
}
} | java | public static Instance readInstance(File f) {
try (Reader in = makeIn(f)) {
return readInstance(in);
} catch (IOException e) {
throw new IllegalArgumentException(e);
}
} | [
"public",
"static",
"Instance",
"readInstance",
"(",
"File",
"f",
")",
"{",
"try",
"(",
"Reader",
"in",
"=",
"makeIn",
"(",
"f",
")",
")",
"{",
"return",
"readInstance",
"(",
"in",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
... | Read an instance from a file.
A file ending with '.gz' is uncompressed first
@param f the file to parse
@return the resulting instance
@throws IllegalArgumentException if an error occurred while reading the file | [
"Read",
"an",
"instance",
"from",
"a",
"file",
".",
"A",
"file",
"ending",
"with",
".",
"gz",
"is",
"uncompressed",
"first"
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSON.java#L64-L70 |
44,715 | btrplace/scheduler | json/src/main/java/org/btrplace/json/JSON.java | JSON.readInstance | public static Instance readInstance(Reader r) {
try {
InstanceConverter c = new InstanceConverter();
return c.fromJSON(r);
} catch (JSONConverterException e) {
throw new IllegalArgumentException(e);
}
} | java | public static Instance readInstance(Reader r) {
try {
InstanceConverter c = new InstanceConverter();
return c.fromJSON(r);
} catch (JSONConverterException e) {
throw new IllegalArgumentException(e);
}
} | [
"public",
"static",
"Instance",
"readInstance",
"(",
"Reader",
"r",
")",
"{",
"try",
"{",
"InstanceConverter",
"c",
"=",
"new",
"InstanceConverter",
"(",
")",
";",
"return",
"c",
".",
"fromJSON",
"(",
"r",
")",
";",
"}",
"catch",
"(",
"JSONConverterExcepti... | Read an instance.
@param r the stream to read
@return the resulting instance
@throws IllegalArgumentException if an error occurred while reading the json | [
"Read",
"an",
"instance",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSON.java#L79-L86 |
44,716 | btrplace/scheduler | json/src/main/java/org/btrplace/json/JSON.java | JSON.write | public static void write(Instance instance, File f) {
try (OutputStreamWriter out = makeOut(f)) {
write(instance, out);
} catch (IOException e) {
throw new IllegalArgumentException(e);
}
} | java | public static void write(Instance instance, File f) {
try (OutputStreamWriter out = makeOut(f)) {
write(instance, out);
} catch (IOException e) {
throw new IllegalArgumentException(e);
}
} | [
"public",
"static",
"void",
"write",
"(",
"Instance",
"instance",
",",
"File",
"f",
")",
"{",
"try",
"(",
"OutputStreamWriter",
"out",
"=",
"makeOut",
"(",
"f",
")",
")",
"{",
"write",
"(",
"instance",
",",
"out",
")",
";",
"}",
"catch",
"(",
"IOExce... | Write an instance.
@param instance the instance to write
@param f the output file. If it ends with '.gz' it will be gzipped
@throws IllegalArgumentException if an error occurred while writing the json | [
"Write",
"an",
"instance",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSON.java#L95-L101 |
44,717 | btrplace/scheduler | json/src/main/java/org/btrplace/json/JSON.java | JSON.write | public static void write(Instance instance, Appendable a) {
try {
InstanceConverter c = new InstanceConverter();
c.toJSON(instance).writeJSONString(a);
} catch (IOException | JSONConverterException e) {
throw new IllegalArgumentException(e);
}
} | java | public static void write(Instance instance, Appendable a) {
try {
InstanceConverter c = new InstanceConverter();
c.toJSON(instance).writeJSONString(a);
} catch (IOException | JSONConverterException e) {
throw new IllegalArgumentException(e);
}
} | [
"public",
"static",
"void",
"write",
"(",
"Instance",
"instance",
",",
"Appendable",
"a",
")",
"{",
"try",
"{",
"InstanceConverter",
"c",
"=",
"new",
"InstanceConverter",
"(",
")",
";",
"c",
".",
"toJSON",
"(",
"instance",
")",
".",
"writeJSONString",
"(",... | Write an instance
@param instance the instance to write
@param a the stream to write on.
@throws IllegalArgumentException if an error occurred while writing the json | [
"Write",
"an",
"instance"
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSON.java#L110-L117 |
44,718 | btrplace/scheduler | json/src/main/java/org/btrplace/json/JSON.java | JSON.readReconfigurationPlan | public static ReconfigurationPlan readReconfigurationPlan(File f) {
try (Reader in = makeIn(f)) {
return readReconfigurationPlan(in);
} catch (IOException e) {
throw new IllegalArgumentException(e);
}
} | java | public static ReconfigurationPlan readReconfigurationPlan(File f) {
try (Reader in = makeIn(f)) {
return readReconfigurationPlan(in);
} catch (IOException e) {
throw new IllegalArgumentException(e);
}
} | [
"public",
"static",
"ReconfigurationPlan",
"readReconfigurationPlan",
"(",
"File",
"f",
")",
"{",
"try",
"(",
"Reader",
"in",
"=",
"makeIn",
"(",
"f",
")",
")",
"{",
"return",
"readReconfigurationPlan",
"(",
"in",
")",
";",
"}",
"catch",
"(",
"IOException",
... | Read a reconfiguration plan from a file.
A file ending with '.gz' is uncompressed first
@param f the file to parse
@return the resulting plan
@throws IllegalArgumentException if an error occurred while reading the file | [
"Read",
"a",
"reconfiguration",
"plan",
"from",
"a",
"file",
".",
"A",
"file",
"ending",
"with",
".",
"gz",
"is",
"uncompressed",
"first"
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSON.java#L143-L149 |
44,719 | btrplace/scheduler | json/src/main/java/org/btrplace/json/JSON.java | JSON.readReconfigurationPlan | public static ReconfigurationPlan readReconfigurationPlan(Reader r) {
try {
ReconfigurationPlanConverter c = new ReconfigurationPlanConverter();
return c.fromJSON(r);
} catch (JSONConverterException e) {
throw new IllegalArgumentException(e);
}
} | java | public static ReconfigurationPlan readReconfigurationPlan(Reader r) {
try {
ReconfigurationPlanConverter c = new ReconfigurationPlanConverter();
return c.fromJSON(r);
} catch (JSONConverterException e) {
throw new IllegalArgumentException(e);
}
} | [
"public",
"static",
"ReconfigurationPlan",
"readReconfigurationPlan",
"(",
"Reader",
"r",
")",
"{",
"try",
"{",
"ReconfigurationPlanConverter",
"c",
"=",
"new",
"ReconfigurationPlanConverter",
"(",
")",
";",
"return",
"c",
".",
"fromJSON",
"(",
"r",
")",
";",
"}... | Read a plan.
@param r the stream to read
@return the resulting reconfiguration plan
@throws IllegalArgumentException if an error occurred while reading the json | [
"Read",
"a",
"plan",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSON.java#L158-L165 |
44,720 | btrplace/scheduler | api/src/main/java/org/btrplace/model/constraint/SplitAmong.java | SplitAmong.getAssociatedPGroup | public Collection<Node> getAssociatedPGroup(Node u) {
for (Collection<Node> pGrp : pGroups) {
if (pGrp.contains(u)) {
return pGrp;
}
}
return Collections.emptySet();
} | java | public Collection<Node> getAssociatedPGroup(Node u) {
for (Collection<Node> pGrp : pGroups) {
if (pGrp.contains(u)) {
return pGrp;
}
}
return Collections.emptySet();
} | [
"public",
"Collection",
"<",
"Node",
">",
"getAssociatedPGroup",
"(",
"Node",
"u",
")",
"{",
"for",
"(",
"Collection",
"<",
"Node",
">",
"pGrp",
":",
"pGroups",
")",
"{",
"if",
"(",
"pGrp",
".",
"contains",
"(",
"u",
")",
")",
"{",
"return",
"pGrp",
... | Get the group of nodes associated to a given node.
@param u the node
@return the associated group of nodes if exists. An empty set otherwise | [
"Get",
"the",
"group",
"of",
"nodes",
"associated",
"to",
"a",
"given",
"node",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/model/constraint/SplitAmong.java#L126-L133 |
44,721 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/deps/DepUtils.java | DepUtils.removeRedundantPaths | static public Collection<URI> removeRedundantPaths(Collection<URI> uris) {
List<URI> result = new ArrayList<URI>();
for (URI uri : uris) {
String path = uri.getPath();
if (!path.endsWith("/")) { //$NON-NLS-1$
path += "/"; //$NON-NLS-1$
}
boolean addIt = true;
for (int i = 0; i < result.s... | java | static public Collection<URI> removeRedundantPaths(Collection<URI> uris) {
List<URI> result = new ArrayList<URI>();
for (URI uri : uris) {
String path = uri.getPath();
if (!path.endsWith("/")) { //$NON-NLS-1$
path += "/"; //$NON-NLS-1$
}
boolean addIt = true;
for (int i = 0; i < result.s... | [
"static",
"public",
"Collection",
"<",
"URI",
">",
"removeRedundantPaths",
"(",
"Collection",
"<",
"URI",
">",
"uris",
")",
"{",
"List",
"<",
"URI",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"URI",
">",
"(",
")",
";",
"for",
"(",
"URI",
"uri",
":"... | Removes URIs containing duplicate and non-orthogonal paths so that the
collection contains only unique and non-overlapping paths.
@param uris collection of URIs
@return a new collection with redundant paths removed | [
"Removes",
"URIs",
"containing",
"duplicate",
"and",
"non",
"-",
"orthogonal",
"paths",
"so",
"that",
"the",
"collection",
"contains",
"only",
"unique",
"and",
"non",
"-",
"overlapping",
"paths",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/deps/DepUtils.java#L86-L117 |
44,722 | m-m-m/util | gwt/src/main/resources/net/sf/mmm/util/gwt/supersource/net/sf/mmm/util/lang/api/ComparatorHelper.java | ComparatorHelper.convert | static Object convert(Object object, Class<?> otherType) {
if (otherType == BigDecimal.class) {
if (object instanceof BigInteger) {
return new BigDecimal((BigInteger) object);
} else if (object instanceof Number) {
return BigDecimal.valueOf(((Number) object).doubleValue());
}
... | java | static Object convert(Object object, Class<?> otherType) {
if (otherType == BigDecimal.class) {
if (object instanceof BigInteger) {
return new BigDecimal((BigInteger) object);
} else if (object instanceof Number) {
return BigDecimal.valueOf(((Number) object).doubleValue());
}
... | [
"static",
"Object",
"convert",
"(",
"Object",
"object",
",",
"Class",
"<",
"?",
">",
"otherType",
")",
"{",
"if",
"(",
"otherType",
"==",
"BigDecimal",
".",
"class",
")",
"{",
"if",
"(",
"object",
"instanceof",
"BigInteger",
")",
"{",
"return",
"new",
... | This method converts the given value to a more common type.
@param object is the value to convert.
@param otherType the type of the value to compare that differs from the type
@return a simpler representation of {@code value} or the same {@code value} if on simpler type
is known. | [
"This",
"method",
"converts",
"the",
"given",
"value",
"to",
"a",
"more",
"common",
"type",
"."
] | f0e4e084448f8dfc83ca682a9e1618034a094ce6 | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/gwt/src/main/resources/net/sf/mmm/util/gwt/supersource/net/sf/mmm/util/lang/api/ComparatorHelper.java#L25-L39 |
44,723 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java | CacheEntry.getInputStream | public InputStream getInputStream(HttpServletRequest request, MutableObject<byte[]> sourceMapResult) throws IOException {
// Check bytes before filename when reading and reverse order when setting.
// The following local variables intentionally hide the instance variables.
byte[] bytes = this.bytes;
byte[] ... | java | public InputStream getInputStream(HttpServletRequest request, MutableObject<byte[]> sourceMapResult) throws IOException {
// Check bytes before filename when reading and reverse order when setting.
// The following local variables intentionally hide the instance variables.
byte[] bytes = this.bytes;
byte[] ... | [
"public",
"InputStream",
"getInputStream",
"(",
"HttpServletRequest",
"request",
",",
"MutableObject",
"<",
"byte",
"[",
"]",
">",
"sourceMapResult",
")",
"throws",
"IOException",
"{",
"// Check bytes before filename when reading and reverse order when setting.\r",
"// The foll... | Return an input stream to the layer. Has side effect of setting the
appropriate Content-Type, Content-Length and Content-Encoding headers
in the response.
@param request
the request object
@param sourceMapResult
(Output) mutable object reference to the source map. May be null
if source maps are not being requested.
... | [
"Return",
"an",
"input",
"stream",
"to",
"the",
"layer",
".",
"Has",
"side",
"effect",
"of",
"setting",
"the",
"appropriate",
"Content",
"-",
"Type",
"Content",
"-",
"Length",
"and",
"Content",
"-",
"Encoding",
"headers",
"in",
"the",
"response",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java#L92-L137 |
44,724 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java | CacheEntry.tryGetInputStream | public InputStream tryGetInputStream(HttpServletRequest request, MutableObject<byte[]> sourceMapResult) throws IOException {
InputStream result = null;
// Check bytes before filename when reading and reverse order when setting
if (bytes != null || filename != null) {
try {
result = getInputStream(requ... | java | public InputStream tryGetInputStream(HttpServletRequest request, MutableObject<byte[]> sourceMapResult) throws IOException {
InputStream result = null;
// Check bytes before filename when reading and reverse order when setting
if (bytes != null || filename != null) {
try {
result = getInputStream(requ... | [
"public",
"InputStream",
"tryGetInputStream",
"(",
"HttpServletRequest",
"request",
",",
"MutableObject",
"<",
"byte",
"[",
"]",
">",
"sourceMapResult",
")",
"throws",
"IOException",
"{",
"InputStream",
"result",
"=",
"null",
";",
"// Check bytes before filename when re... | Can fail by returning null, but won't throw an exception.
@param request
the request object
@param sourceMapResult
(Output) mutable object reference to the source map. May be null
if source maps are not being requested.
@return The LayerInputStream, or null if data is not available
@throws IOException | [
"Can",
"fail",
"by",
"returning",
"null",
"but",
"won",
"t",
"throw",
"an",
"exception",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java#L150-L164 |
44,725 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java | CacheEntry.setData | public void setData(byte[] bytes, byte[] sourceMap) {
this.sourceMap = sourceMap;
sourceMapSize = sourceMap != null ? sourceMap.length : 0;
setBytes(bytes);
} | java | public void setData(byte[] bytes, byte[] sourceMap) {
this.sourceMap = sourceMap;
sourceMapSize = sourceMap != null ? sourceMap.length : 0;
setBytes(bytes);
} | [
"public",
"void",
"setData",
"(",
"byte",
"[",
"]",
"bytes",
",",
"byte",
"[",
"]",
"sourceMap",
")",
"{",
"this",
".",
"sourceMap",
"=",
"sourceMap",
";",
"sourceMapSize",
"=",
"sourceMap",
"!=",
"null",
"?",
"sourceMap",
".",
"length",
":",
"0",
";",... | Sets the contents of the cache entry with source map info.
@param bytes The layer content
@param sourceMap The source map for the layer | [
"Sets",
"the",
"contents",
"of",
"the",
"cache",
"entry",
"with",
"source",
"map",
"info",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java#L182-L186 |
44,726 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java | CacheEntry.delete | public synchronized void delete(final ICacheManager mgr) {
delete = true;
if (filename != null) {
mgr.deleteFileDelayed(filename);
}
} | java | public synchronized void delete(final ICacheManager mgr) {
delete = true;
if (filename != null) {
mgr.deleteFileDelayed(filename);
}
} | [
"public",
"synchronized",
"void",
"delete",
"(",
"final",
"ICacheManager",
"mgr",
")",
"{",
"delete",
"=",
"true",
";",
"if",
"(",
"filename",
"!=",
"null",
")",
"{",
"mgr",
".",
"deleteFileDelayed",
"(",
"filename",
")",
";",
"}",
"}"
] | Delete the cached build after the specified delay in minues
@param mgr
The cache manager. May be null if persist hasn't yet been
called, in which case, persist will have no effect when it
is called. | [
"Delete",
"the",
"cached",
"build",
"after",
"the",
"specified",
"delay",
"in",
"minues"
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java#L196-L201 |
44,727 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java | CacheEntry.persist | public void persist(final ICacheManager mgr) throws IOException {
if (delete) return;
if (sourceMapSize == 0) {
// No source map. Just stream the file
mgr.createCacheFileAsync("layer.", //$NON-NLS-1$
new ByteArrayInputStream(bytes),
new CreateCompletionCallback(mgr));
} else {
// cache... | java | public void persist(final ICacheManager mgr) throws IOException {
if (delete) return;
if (sourceMapSize == 0) {
// No source map. Just stream the file
mgr.createCacheFileAsync("layer.", //$NON-NLS-1$
new ByteArrayInputStream(bytes),
new CreateCompletionCallback(mgr));
} else {
// cache... | [
"public",
"void",
"persist",
"(",
"final",
"ICacheManager",
"mgr",
")",
"throws",
"IOException",
"{",
"if",
"(",
"delete",
")",
"return",
";",
"if",
"(",
"sourceMapSize",
"==",
"0",
")",
"{",
"// No source map. Just stream the file\r",
"mgr",
".",
"createCacheF... | Asynchronously write the layer build content to disk and set filename to the
name of the cache files when done.
@param mgr The cache manager
@throws IOException | [
"Asynchronously",
"write",
"the",
"layer",
"build",
"content",
"to",
"disk",
"and",
"set",
"filename",
"to",
"the",
"name",
"of",
"the",
"cache",
"files",
"when",
"done",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java#L232-L247 |
44,728 | btrplace/scheduler | json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java | ConstraintsConverter.register | public void register(ConstraintConverter<? extends Constraint> c) {
java2json.put(c.getSupportedConstraint(), c);
json2java.put(c.getJSONId(), c);
} | java | public void register(ConstraintConverter<? extends Constraint> c) {
java2json.put(c.getSupportedConstraint(), c);
json2java.put(c.getJSONId(), c);
} | [
"public",
"void",
"register",
"(",
"ConstraintConverter",
"<",
"?",
"extends",
"Constraint",
">",
"c",
")",
"{",
"java2json",
".",
"put",
"(",
"c",
".",
"getSupportedConstraint",
"(",
")",
",",
"c",
")",
";",
"json2java",
".",
"put",
"(",
"c",
".",
"ge... | Register a converter for a specific constraint.
@param c the converter to register | [
"Register",
"a",
"converter",
"for",
"a",
"specific",
"constraint",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java#L108-L112 |
44,729 | btrplace/scheduler | json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java | ConstraintsConverter.fromJSON | public Constraint fromJSON(Model mo, JSONObject in) throws JSONConverterException {
checkKeys(in, "id");
Object id = in.get("id");
ConstraintConverter<? extends Constraint> c = json2java.get(id.toString());
if (c == null) {
throw new JSONConverterException("No converter avail... | java | public Constraint fromJSON(Model mo, JSONObject in) throws JSONConverterException {
checkKeys(in, "id");
Object id = in.get("id");
ConstraintConverter<? extends Constraint> c = json2java.get(id.toString());
if (c == null) {
throw new JSONConverterException("No converter avail... | [
"public",
"Constraint",
"fromJSON",
"(",
"Model",
"mo",
",",
"JSONObject",
"in",
")",
"throws",
"JSONConverterException",
"{",
"checkKeys",
"(",
"in",
",",
"\"id\"",
")",
";",
"Object",
"id",
"=",
"in",
".",
"get",
"(",
"\"id\"",
")",
";",
"ConstraintConve... | Convert a json-encoded constraint.
@param mo the model to rely on
@param in the constraint to decode
@return the resulting constraint
@throws JSONConverterException if the conversion failed | [
"Convert",
"a",
"json",
"-",
"encoded",
"constraint",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java#L140-L148 |
44,730 | btrplace/scheduler | json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java | ConstraintsConverter.toJSON | public JSONObject toJSON(Constraint o) throws JSONConverterException {
ConstraintConverter c = java2json.get(o.getClass());
if (c == null) {
throw new JSONConverterException("No converter available for a constraint with the '" + o.getClass() + "' className");
}
return c.toJSO... | java | public JSONObject toJSON(Constraint o) throws JSONConverterException {
ConstraintConverter c = java2json.get(o.getClass());
if (c == null) {
throw new JSONConverterException("No converter available for a constraint with the '" + o.getClass() + "' className");
}
return c.toJSO... | [
"public",
"JSONObject",
"toJSON",
"(",
"Constraint",
"o",
")",
"throws",
"JSONConverterException",
"{",
"ConstraintConverter",
"c",
"=",
"java2json",
".",
"get",
"(",
"o",
".",
"getClass",
"(",
")",
")",
";",
"if",
"(",
"c",
"==",
"null",
")",
"{",
"thro... | Serialise a constraint.
@param o the constraint
@return the resulting encoded constraint
@throws JSONConverterException if the conversion failed | [
"Serialise",
"a",
"constraint",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java#L156-L162 |
44,731 | btrplace/scheduler | json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java | ConstraintsConverter.listFromJSON | public List<SatConstraint> listFromJSON(Model mo, JSONArray in) throws JSONConverterException {
List<SatConstraint> l = new ArrayList<>(in.size());
for (Object o : in) {
if (!(o instanceof JSONObject)) {
throw new JSONConverterException("Expected an array of JSONObject but go... | java | public List<SatConstraint> listFromJSON(Model mo, JSONArray in) throws JSONConverterException {
List<SatConstraint> l = new ArrayList<>(in.size());
for (Object o : in) {
if (!(o instanceof JSONObject)) {
throw new JSONConverterException("Expected an array of JSONObject but go... | [
"public",
"List",
"<",
"SatConstraint",
">",
"listFromJSON",
"(",
"Model",
"mo",
",",
"JSONArray",
"in",
")",
"throws",
"JSONConverterException",
"{",
"List",
"<",
"SatConstraint",
">",
"l",
"=",
"new",
"ArrayList",
"<>",
"(",
"in",
".",
"size",
"(",
")",
... | Convert a list of json-encoded sat-constraints.
@param mo the model to rely on
@param in the constraints to decode
@return the constraint list. Might be empty
@throws JSONConverterException if the conversion failed | [
"Convert",
"a",
"list",
"of",
"json",
"-",
"encoded",
"sat",
"-",
"constraints",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java#L171-L180 |
44,732 | btrplace/scheduler | json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java | ConstraintsConverter.toJSON | public JSONArray toJSON(Collection<SatConstraint> e) throws JSONConverterException {
JSONArray arr = new JSONArray();
for (SatConstraint cstr : e) {
arr.add(toJSON(cstr));
}
return arr;
} | java | public JSONArray toJSON(Collection<SatConstraint> e) throws JSONConverterException {
JSONArray arr = new JSONArray();
for (SatConstraint cstr : e) {
arr.add(toJSON(cstr));
}
return arr;
} | [
"public",
"JSONArray",
"toJSON",
"(",
"Collection",
"<",
"SatConstraint",
">",
"e",
")",
"throws",
"JSONConverterException",
"{",
"JSONArray",
"arr",
"=",
"new",
"JSONArray",
"(",
")",
";",
"for",
"(",
"SatConstraint",
"cstr",
":",
"e",
")",
"{",
"arr",
".... | Serialise a list of sat-constraints.
@param e the list to serialise
@return the resulting encoded list
@throws JSONConverterException if the conversion failed | [
"Serialise",
"a",
"list",
"of",
"sat",
"-",
"constraints",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java#L188-L194 |
44,733 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/cache/CacheImpl.java | CacheImpl.clear | public synchronized void clear() {
_layerCache.clear();
_moduleCache.clear();
_gzipCache.clear();
for (IGenericCache cache : _namedCaches.values()) {
cache.clear();
}
} | java | public synchronized void clear() {
_layerCache.clear();
_moduleCache.clear();
_gzipCache.clear();
for (IGenericCache cache : _namedCaches.values()) {
cache.clear();
}
} | [
"public",
"synchronized",
"void",
"clear",
"(",
")",
"{",
"_layerCache",
".",
"clear",
"(",
")",
";",
"_moduleCache",
".",
"clear",
"(",
")",
";",
"_gzipCache",
".",
"clear",
"(",
")",
";",
"for",
"(",
"IGenericCache",
"cache",
":",
"_namedCaches",
".",
... | Help out the GC by clearing out the cache maps. | [
"Help",
"out",
"the",
"GC",
"by",
"clearing",
"out",
"the",
"cache",
"maps",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/cache/CacheImpl.java#L119-L126 |
44,734 | jMotif/GI | src/main/java/net/seninp/gi/repair/RePairGrammar.java | RePairGrammar.toGrammarRules | public String toGrammarRules() {
StringBuffer sb = new StringBuffer();
System.out.println("R0 -> " + this.r0String);
for (int i = 1; i <= this.theRules.size(); i++) {
RePairRule r = this.theRules.get(i);
sb.append(THE_R).append(r.ruleNumber).append(" -> ").append(r.toRuleString()).append(" : ")
... | java | public String toGrammarRules() {
StringBuffer sb = new StringBuffer();
System.out.println("R0 -> " + this.r0String);
for (int i = 1; i <= this.theRules.size(); i++) {
RePairRule r = this.theRules.get(i);
sb.append(THE_R).append(r.ruleNumber).append(" -> ").append(r.toRuleString()).append(" : ")
... | [
"public",
"String",
"toGrammarRules",
"(",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"R0 -> \"",
"+",
"this",
".",
"r0String",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
"... | Prints out the grammar as text.
@return textual representation of the grammar. | [
"Prints",
"out",
"the",
"grammar",
"as",
"text",
"."
] | 381212dd4f193246a6df82bd46f0d2bcd04a68d6 | https://github.com/jMotif/GI/blob/381212dd4f193246a6df82bd46f0d2bcd04a68d6/src/main/java/net/seninp/gi/repair/RePairGrammar.java#L129-L138 |
44,735 | jMotif/GI | src/main/java/net/seninp/gi/repair/RePairGrammar.java | RePairGrammar.toGrammarRulesData | public GrammarRules toGrammarRulesData() {
GrammarRules res = new GrammarRules();
GrammarRuleRecord r0 = new GrammarRuleRecord();
r0.setRuleNumber(0);
r0.setRuleString(this.r0String);
r0.setExpandedRuleString(this.r0ExpandedString);
r0.setOccurrences(new int[] { 0 });
r0.setMeanLength(-1);... | java | public GrammarRules toGrammarRulesData() {
GrammarRules res = new GrammarRules();
GrammarRuleRecord r0 = new GrammarRuleRecord();
r0.setRuleNumber(0);
r0.setRuleString(this.r0String);
r0.setExpandedRuleString(this.r0ExpandedString);
r0.setOccurrences(new int[] { 0 });
r0.setMeanLength(-1);... | [
"public",
"GrammarRules",
"toGrammarRulesData",
"(",
")",
"{",
"GrammarRules",
"res",
"=",
"new",
"GrammarRules",
"(",
")",
";",
"GrammarRuleRecord",
"r0",
"=",
"new",
"GrammarRuleRecord",
"(",
")",
";",
"r0",
".",
"setRuleNumber",
"(",
"0",
")",
";",
"r0",
... | Build a grammarviz-"portable" grammar object.
@return a grammarviz-"portable" grammar object. | [
"Build",
"a",
"grammarviz",
"-",
"portable",
"grammar",
"object",
"."
] | 381212dd4f193246a6df82bd46f0d2bcd04a68d6 | https://github.com/jMotif/GI/blob/381212dd4f193246a6df82bd46f0d2bcd04a68d6/src/main/java/net/seninp/gi/repair/RePairGrammar.java#L145-L192 |
44,736 | jMotif/GI | src/main/java/net/seninp/gi/repair/RePairGrammar.java | RePairGrammar.buildIntervals | public void buildIntervals(SAXRecords records, double[] originalTimeSeries,
int slidingWindowSize) {
records.buildIndex();
for (int ruleIdx = 1; ruleIdx <= this.theRules.size(); ruleIdx++) {
RePairRule rr = this.theRules.get(ruleIdx);
String[] split = rr.expandedRuleString.split(" ");
... | java | public void buildIntervals(SAXRecords records, double[] originalTimeSeries,
int slidingWindowSize) {
records.buildIndex();
for (int ruleIdx = 1; ruleIdx <= this.theRules.size(); ruleIdx++) {
RePairRule rr = this.theRules.get(ruleIdx);
String[] split = rr.expandedRuleString.split(" ");
... | [
"public",
"void",
"buildIntervals",
"(",
"SAXRecords",
"records",
",",
"double",
"[",
"]",
"originalTimeSeries",
",",
"int",
"slidingWindowSize",
")",
"{",
"records",
".",
"buildIndex",
"(",
")",
";",
"for",
"(",
"int",
"ruleIdx",
"=",
"1",
";",
"ruleIdx",
... | Builds a table of intervals corresponding to the grammar rules.
@param records the records to build intervals for.
@param originalTimeSeries the timeseries.
@param slidingWindowSize the sliding window size. | [
"Builds",
"a",
"table",
"of",
"intervals",
"corresponding",
"to",
"the",
"grammar",
"rules",
"."
] | 381212dd4f193246a6df82bd46f0d2bcd04a68d6 | https://github.com/jMotif/GI/blob/381212dd4f193246a6df82bd46f0d2bcd04a68d6/src/main/java/net/seninp/gi/repair/RePairGrammar.java#L201-L224 |
44,737 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/CompilerUtil.java | CompilerUtil.fromPrimitive | private static Class<?> fromPrimitive(Class<?> clazz) {
Class<?> clazz2 = PRIMITIVE_TO_CLASS.get(clazz);
return clazz2 == null ? clazz : clazz2;
} | java | private static Class<?> fromPrimitive(Class<?> clazz) {
Class<?> clazz2 = PRIMITIVE_TO_CLASS.get(clazz);
return clazz2 == null ? clazz : clazz2;
} | [
"private",
"static",
"Class",
"<",
"?",
">",
"fromPrimitive",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"Class",
"<",
"?",
">",
"clazz2",
"=",
"PRIMITIVE_TO_CLASS",
".",
"get",
"(",
"clazz",
")",
";",
"return",
"clazz2",
"==",
"null",
"?",
"cla... | Converts and returns the specified class, if it represents a primitive, to the associated
non-primitive class, or else returns the specified class if it is not a primitive.
@param clazz
the input class
@return the associated non-primitive class, or the input class if it is not a primitive | [
"Converts",
"and",
"returns",
"the",
"specified",
"class",
"if",
"it",
"represents",
"a",
"primitive",
"to",
"the",
"associated",
"non",
"-",
"primitive",
"class",
"or",
"else",
"returns",
"the",
"specified",
"class",
"if",
"it",
"is",
"not",
"a",
"primitive... | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/CompilerUtil.java#L80-L83 |
44,738 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/CompilerUtil.java | CompilerUtil.findNamedDiagnosticGroup | private static DiagnosticGroup findNamedDiagnosticGroup(String name) {
final String sourceMethod = "findNamedDiagnosticGroup"; //$NON-NLS-1$
final boolean isTraceLogging = log.isLoggable(Level.FINER);
if (isTraceLogging) {
log.entering(sourceClass, sourceMethod, new Object[]{name});
}
DiagnosticGroup... | java | private static DiagnosticGroup findNamedDiagnosticGroup(String name) {
final String sourceMethod = "findNamedDiagnosticGroup"; //$NON-NLS-1$
final boolean isTraceLogging = log.isLoggable(Level.FINER);
if (isTraceLogging) {
log.entering(sourceClass, sourceMethod, new Object[]{name});
}
DiagnosticGroup... | [
"private",
"static",
"DiagnosticGroup",
"findNamedDiagnosticGroup",
"(",
"String",
"name",
")",
"{",
"final",
"String",
"sourceMethod",
"=",
"\"findNamedDiagnosticGroup\"",
";",
"//$NON-NLS-1$\r",
"final",
"boolean",
"isTraceLogging",
"=",
"log",
".",
"isLoggable",
"(",... | Tries to match the provided name with a named Diagnostic group defined in the
DiagnosticGroups class.
@param name
the name to match
@return The matching named DiagnosticGroup static instance or null | [
"Tries",
"to",
"match",
"the",
"provided",
"name",
"with",
"a",
"named",
"Diagnostic",
"group",
"defined",
"in",
"the",
"DiagnosticGroups",
"class",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/CompilerUtil.java#L502-L532 |
44,739 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/modulebuilder/css/CSSModuleBuilder.java | CSSModuleBuilder.postcss | protected String postcss(HttpServletRequest request, String css, IResource res) throws IOException {
if (threadScopes == null) {
return css;
}
Context cx = Context.enter();
Scriptable threadScope = null;
String result = null;
try {
threadScope = threadScopes.poll(SCOPE_POOL_TIMEOUT_SECONDS, Ti... | java | protected String postcss(HttpServletRequest request, String css, IResource res) throws IOException {
if (threadScopes == null) {
return css;
}
Context cx = Context.enter();
Scriptable threadScope = null;
String result = null;
try {
threadScope = threadScopes.poll(SCOPE_POOL_TIMEOUT_SECONDS, Ti... | [
"protected",
"String",
"postcss",
"(",
"HttpServletRequest",
"request",
",",
"String",
"css",
",",
"IResource",
"res",
")",
"throws",
"IOException",
"{",
"if",
"(",
"threadScopes",
"==",
"null",
")",
"{",
"return",
"css",
";",
"}",
"Context",
"cx",
"=",
"C... | Runs given CSS through PostCSS processor for minification and any other processing
by configured plugins
.
@param request
@param css
@param res
@return The processed CSS.
@throws IOException | [
"Runs",
"given",
"CSS",
"through",
"PostCSS",
"processor",
"for",
"minification",
"and",
"any",
"other",
"processing",
"by",
"configured",
"plugins",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/modulebuilder/css/CSSModuleBuilder.java#L740-L775 |
44,740 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/modulebuilder/css/CSSModuleBuilder.java | CSSModuleBuilder.createThreadScope | protected Scriptable createThreadScope(Context cx, Scriptable protoScope) {
// Create the scope object
Scriptable scope = cx.newObject(protoScope);
scope.setPrototype(protoScope);
scope.setParentScope(null);
// Set "global" variable to point to global scope
scope.put("global", scope, scope); //$NO... | java | protected Scriptable createThreadScope(Context cx, Scriptable protoScope) {
// Create the scope object
Scriptable scope = cx.newObject(protoScope);
scope.setPrototype(protoScope);
scope.setParentScope(null);
// Set "global" variable to point to global scope
scope.put("global", scope, scope); //$NO... | [
"protected",
"Scriptable",
"createThreadScope",
"(",
"Context",
"cx",
",",
"Scriptable",
"protoScope",
")",
"{",
"// Create the scope object\r",
"Scriptable",
"scope",
"=",
"cx",
".",
"newObject",
"(",
"protoScope",
")",
";",
"scope",
".",
"setPrototype",
"(",
"pr... | Creates a thread scope for the PostCSS processor and it's plugins. Thread scopes allow
PostCSS to process multiple CSS modules concurrently, each executing in a separate thread,
without interfering with each other.
@param cx
the Rhino Context
@param protoScope
the parent scope object
@return the thread scope | [
"Creates",
"a",
"thread",
"scope",
"for",
"the",
"PostCSS",
"processor",
"and",
"it",
"s",
"plugins",
".",
"Thread",
"scopes",
"allow",
"PostCSS",
"to",
"process",
"multiple",
"CSS",
"modules",
"concurrently",
"each",
"executing",
"in",
"a",
"separate",
"threa... | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/modulebuilder/css/CSSModuleBuilder.java#L940-L981 |
44,741 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/modulebuilder/css/CSSModuleBuilder.java | CSSModuleBuilder.dequote | public String dequote(String in) {
String result = in.trim();
if (result.charAt(0) == '"' && result.charAt(result.length()-1) == '"') {
return result.substring(1, result.length()-1);
}
if (result.charAt(0) == '\'' && result.charAt(result.length()-1) == '\'') {
return result.substring(1, result.lengt... | java | public String dequote(String in) {
String result = in.trim();
if (result.charAt(0) == '"' && result.charAt(result.length()-1) == '"') {
return result.substring(1, result.length()-1);
}
if (result.charAt(0) == '\'' && result.charAt(result.length()-1) == '\'') {
return result.substring(1, result.lengt... | [
"public",
"String",
"dequote",
"(",
"String",
"in",
")",
"{",
"String",
"result",
"=",
"in",
".",
"trim",
"(",
")",
";",
"if",
"(",
"result",
".",
"charAt",
"(",
"0",
")",
"==",
"'",
"'",
"&&",
"result",
".",
"charAt",
"(",
"result",
".",
"length... | Removes single or double quotes from a quoted string. The entire string
is expected to be quoted, with possible leading or trailing whitespace.
If the string is not quoted, then it is returned unmodified.
@param in
The possibly quoted string
@return The string with quotes removed | [
"Removes",
"single",
"or",
"double",
"quotes",
"from",
"a",
"quoted",
"string",
".",
"The",
"entire",
"string",
"is",
"expected",
"to",
"be",
"quoted",
"with",
"possible",
"leading",
"or",
"trailing",
"whitespace",
".",
"If",
"the",
"string",
"is",
"not",
... | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/modulebuilder/css/CSSModuleBuilder.java#L1166-L1175 |
44,742 | nabedge/mixer2 | src/main/java/org/mixer2/xhtml/builder/TableBuilder.java | TableBuilder.tr | public tr tr(int index) {
while (trList.size() <= index) {
trList.add(new tr());
}
return trList.get(index);
} | java | public tr tr(int index) {
while (trList.size() <= index) {
trList.add(new tr());
}
return trList.get(index);
} | [
"public",
"tr",
"tr",
"(",
"int",
"index",
")",
"{",
"while",
"(",
"trList",
".",
"size",
"(",
")",
"<=",
"index",
")",
"{",
"trList",
".",
"add",
"(",
"new",
"tr",
"(",
")",
")",
";",
"}",
"return",
"trList",
".",
"get",
"(",
"index",
")",
"... | Get tr of specified index. If there no tr at the specified index, new tr will be created.
@param index 0=first tr, 1= second tr
@return | [
"Get",
"tr",
"of",
"specified",
"index",
".",
"If",
"there",
"no",
"tr",
"at",
"the",
"specified",
"index",
"new",
"tr",
"will",
"be",
"created",
"."
] | 8c2db27cfcd65bf0b1e0242ef9362ebd8033777c | https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/builder/TableBuilder.java#L338-L343 |
44,743 | nabedge/mixer2 | src/main/java/org/mixer2/xhtml/builder/TableBuilder.java | TableBuilder.addTr | public tr addTr(Map<String, Object> attrMap) {
tr tr = new tr();
tr.setAttr(attrMap);
trList.add(tr);
return tr;
} | java | public tr addTr(Map<String, Object> attrMap) {
tr tr = new tr();
tr.setAttr(attrMap);
trList.add(tr);
return tr;
} | [
"public",
"tr",
"addTr",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"attrMap",
")",
"{",
"tr",
"tr",
"=",
"new",
"tr",
"(",
")",
";",
"tr",
".",
"setAttr",
"(",
"attrMap",
")",
";",
"trList",
".",
"add",
"(",
"tr",
")",
";",
"return",
"tr",... | add new tr having specified attributes. | [
"add",
"new",
"tr",
"having",
"specified",
"attributes",
"."
] | 8c2db27cfcd65bf0b1e0242ef9362ebd8033777c | https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/builder/TableBuilder.java#L358-L363 |
44,744 | nabedge/mixer2 | src/main/java/org/mixer2/xhtml/builder/TableBuilder.java | TableBuilder.addTr | public <T extends AbstractJaxb> TableBuilder addTr(List<Object> tdList)
throws TagTypeUnmatchException {
return addTr(tdList, null);
} | java | public <T extends AbstractJaxb> TableBuilder addTr(List<Object> tdList)
throws TagTypeUnmatchException {
return addTr(tdList, null);
} | [
"public",
"<",
"T",
"extends",
"AbstractJaxb",
">",
"TableBuilder",
"addTr",
"(",
"List",
"<",
"Object",
">",
"tdList",
")",
"throws",
"TagTypeUnmatchException",
"{",
"return",
"addTr",
"(",
"tdList",
",",
"null",
")",
";",
"}"
] | add new tr having td tags that has content of each value of list.
@param tdList
@return
@throws TagTypeUnmatchException | [
"add",
"new",
"tr",
"having",
"td",
"tags",
"that",
"has",
"content",
"of",
"each",
"value",
"of",
"list",
"."
] | 8c2db27cfcd65bf0b1e0242ef9362ebd8033777c | https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/builder/TableBuilder.java#L372-L375 |
44,745 | nabedge/mixer2 | src/main/java/org/mixer2/xhtml/builder/TableBuilder.java | TableBuilder.addTr | @SuppressWarnings("unchecked")
public <T extends AbstractJaxb> TableBuilder addTr(List<Object> tdList,
Map<String, Object> attrMap) throws TagTypeUnmatchException {
tr tr = new tr();
tr.setAttr(attrMap);
for (Object obj : tdList) {
if (obj instanceof String) {
... | java | @SuppressWarnings("unchecked")
public <T extends AbstractJaxb> TableBuilder addTr(List<Object> tdList,
Map<String, Object> attrMap) throws TagTypeUnmatchException {
tr tr = new tr();
tr.setAttr(attrMap);
for (Object obj : tdList) {
if (obj instanceof String) {
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
"extends",
"AbstractJaxb",
">",
"TableBuilder",
"addTr",
"(",
"List",
"<",
"Object",
">",
"tdList",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"attrMap",
")",
"throws",
"TagTypeUnmat... | add new tr having td tags that has content of each value of list.
The new tr tag have specifed attributes.
@param tdList
@param attrMap attributes for new tr tag
@return
@throws TagTypeUnmatchException | [
"add",
"new",
"tr",
"having",
"td",
"tags",
"that",
"has",
"content",
"of",
"each",
"value",
"of",
"list",
".",
"The",
"new",
"tr",
"tag",
"have",
"specifed",
"attributes",
"."
] | 8c2db27cfcd65bf0b1e0242ef9362ebd8033777c | https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/builder/TableBuilder.java#L386-L404 |
44,746 | nabedge/mixer2 | src/main/java/org/mixer2/xhtml/builder/TableBuilder.java | TableBuilder.tbody | public tbody tbody(int index) {
while (tbodyList.size() <= index) {
tbodyList.add(new tbody());
}
return tbodyList.get(index);
} | java | public tbody tbody(int index) {
while (tbodyList.size() <= index) {
tbodyList.add(new tbody());
}
return tbodyList.get(index);
} | [
"public",
"tbody",
"tbody",
"(",
"int",
"index",
")",
"{",
"while",
"(",
"tbodyList",
".",
"size",
"(",
")",
"<=",
"index",
")",
"{",
"tbodyList",
".",
"add",
"(",
"new",
"tbody",
"(",
")",
")",
";",
"}",
"return",
"tbodyList",
".",
"get",
"(",
"... | Get tbody at specified index
@param index 0=first tbody, 1=second tbody.
添え字です。0なら一つ目のtbody、1なら二つ目のtbody
@return | [
"Get",
"tbody",
"at",
"specified",
"index"
] | 8c2db27cfcd65bf0b1e0242ef9362ebd8033777c | https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/builder/TableBuilder.java#L414-L419 |
44,747 | nabedge/mixer2 | src/main/java/org/mixer2/xhtml/builder/TableBuilder.java | TableBuilder.addTbody | public TableBuilder addTbody(List<List<Object>> trList)
throws TagTypeUnmatchException {
addTbody(trList, null);
return this;
} | java | public TableBuilder addTbody(List<List<Object>> trList)
throws TagTypeUnmatchException {
addTbody(trList, null);
return this;
} | [
"public",
"TableBuilder",
"addTbody",
"(",
"List",
"<",
"List",
"<",
"Object",
">",
">",
"trList",
")",
"throws",
"TagTypeUnmatchException",
"{",
"addTbody",
"(",
"trList",
",",
"null",
")",
";",
"return",
"this",
";",
"}"
] | add new tbody into table having tr,td tags
@param trList List of List for tr,td tags
@return
@throws TagTypeUnmatchException | [
"add",
"new",
"tbody",
"into",
"table",
"having",
"tr",
"td",
"tags"
] | 8c2db27cfcd65bf0b1e0242ef9362ebd8033777c | https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/builder/TableBuilder.java#L438-L442 |
44,748 | nabedge/mixer2 | src/main/java/org/mixer2/xhtml/builder/TableBuilder.java | TableBuilder.build | public Table build() {
Table table = new Table();
Thead _thead = thead.buildThead();
if (_thead != null) {
table.setThead(_thead);
}
Tfoot _tfoot = tfoot.buildTfoot();
if (_tfoot != null) {
table.setTfoot(_tfoot);
}
for (tbody _tbod... | java | public Table build() {
Table table = new Table();
Thead _thead = thead.buildThead();
if (_thead != null) {
table.setThead(_thead);
}
Tfoot _tfoot = tfoot.buildTfoot();
if (_tfoot != null) {
table.setTfoot(_tfoot);
}
for (tbody _tbod... | [
"public",
"Table",
"build",
"(",
")",
"{",
"Table",
"table",
"=",
"new",
"Table",
"(",
")",
";",
"Thead",
"_thead",
"=",
"thead",
".",
"buildThead",
"(",
")",
";",
"if",
"(",
"_thead",
"!=",
"null",
")",
"{",
"table",
".",
"setThead",
"(",
"_thead"... | build table tag object finally.
@return | [
"build",
"table",
"tag",
"object",
"finally",
"."
] | 8c2db27cfcd65bf0b1e0242ef9362ebd8033777c | https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/builder/TableBuilder.java#L619-L636 |
44,749 | m-m-m/util | cli/src/main/java/net/sf/mmm/util/cli/api/AbstractVersionedMain.java | AbstractVersionedMain.getVersion | protected String getVersion() {
Manifest manifest = ManifestLoader.loadManifest(getClass());
String versionNumber = null;
if (manifest != null) {
versionNumber = ManifestLoader.getValue(manifest, Attributes.Name.IMPLEMENTATION_VERSION);
if (versionNumber == null) {
versionNumber = Manif... | java | protected String getVersion() {
Manifest manifest = ManifestLoader.loadManifest(getClass());
String versionNumber = null;
if (manifest != null) {
versionNumber = ManifestLoader.getValue(manifest, Attributes.Name.IMPLEMENTATION_VERSION);
if (versionNumber == null) {
versionNumber = Manif... | [
"protected",
"String",
"getVersion",
"(",
")",
"{",
"Manifest",
"manifest",
"=",
"ManifestLoader",
".",
"loadManifest",
"(",
"getClass",
"(",
")",
")",
";",
"String",
"versionNumber",
"=",
"null",
";",
"if",
"(",
"manifest",
"!=",
"null",
")",
"{",
"versio... | This method gets the Version of this program.
@return the program-version. | [
"This",
"method",
"gets",
"the",
"Version",
"of",
"this",
"program",
"."
] | f0e4e084448f8dfc83ca682a9e1618034a094ce6 | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/cli/src/main/java/net/sf/mmm/util/cli/api/AbstractVersionedMain.java#L34-L48 |
44,750 | m-m-m/util | cli/src/main/java/net/sf/mmm/util/cli/base/AbstractCliValueContainerContainer.java | AbstractCliValueContainerContainer.setValueInternal | protected void setValueInternal(String argument, char separator, GenericType<?> propertyType) {
if (this.valueAlreadySet) {
CliOptionDuplicateException exception = new CliOptionDuplicateException(getParameterContainer().getName());
CliStyleHandling.EXCEPTION.handle(getLogger(), exception);
}
//... | java | protected void setValueInternal(String argument, char separator, GenericType<?> propertyType) {
if (this.valueAlreadySet) {
CliOptionDuplicateException exception = new CliOptionDuplicateException(getParameterContainer().getName());
CliStyleHandling.EXCEPTION.handle(getLogger(), exception);
}
//... | [
"protected",
"void",
"setValueInternal",
"(",
"String",
"argument",
",",
"char",
"separator",
",",
"GenericType",
"<",
"?",
">",
"propertyType",
")",
"{",
"if",
"(",
"this",
".",
"valueAlreadySet",
")",
"{",
"CliOptionDuplicateException",
"exception",
"=",
"new"... | This method parses container value as from a single argument and sets it as new object.
@param argument is the argument representing the container as string.
@param separator is the character used as separator for the container values.
@param propertyType is the {@link GenericType} of the property. | [
"This",
"method",
"parses",
"container",
"value",
"as",
"from",
"a",
"single",
"argument",
"and",
"sets",
"it",
"as",
"new",
"object",
"."
] | f0e4e084448f8dfc83ca682a9e1618034a094ce6 | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/cli/src/main/java/net/sf/mmm/util/cli/base/AbstractCliValueContainerContainer.java#L69-L80 |
44,751 | btrplace/scheduler | split/src/main/java/org/btrplace/scheduler/runner/disjoint/Instances.java | Instances.makeVMIndex | public static TIntIntHashMap makeVMIndex(Collection<Instance> instances) {
TIntIntHashMap index = new TIntIntHashMap();
int p = 0;
for (Instance i : instances) {
Mapping m = i.getModel().getMapping();
for (Node n : m.getOnlineNodes()) {
for (VM v : m.getRu... | java | public static TIntIntHashMap makeVMIndex(Collection<Instance> instances) {
TIntIntHashMap index = new TIntIntHashMap();
int p = 0;
for (Instance i : instances) {
Mapping m = i.getModel().getMapping();
for (Node n : m.getOnlineNodes()) {
for (VM v : m.getRu... | [
"public",
"static",
"TIntIntHashMap",
"makeVMIndex",
"(",
"Collection",
"<",
"Instance",
">",
"instances",
")",
"{",
"TIntIntHashMap",
"index",
"=",
"new",
"TIntIntHashMap",
"(",
")",
";",
"int",
"p",
"=",
"0",
";",
"for",
"(",
"Instance",
"i",
":",
"insta... | Make an index revealing the position of each VM in a collection
of disjoint instances
@param instances the collection to browse. Instances are supposed to be disjoint
@return the index of every VM. Format {@code VM#id() -> position} | [
"Make",
"an",
"index",
"revealing",
"the",
"position",
"of",
"each",
"VM",
"in",
"a",
"collection",
"of",
"disjoint",
"instances"
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/split/src/main/java/org/btrplace/scheduler/runner/disjoint/Instances.java#L49-L68 |
44,752 | btrplace/scheduler | split/src/main/java/org/btrplace/scheduler/runner/disjoint/Instances.java | Instances.makeNodeIndex | public static TIntIntHashMap makeNodeIndex(Collection<Instance> instances) {
TIntIntHashMap index = new TIntIntHashMap();
int p = 0;
for (Instance i : instances) {
Mapping m = i.getModel().getMapping();
for (Node n : m.getOfflineNodes()) {
index.put(n.id()... | java | public static TIntIntHashMap makeNodeIndex(Collection<Instance> instances) {
TIntIntHashMap index = new TIntIntHashMap();
int p = 0;
for (Instance i : instances) {
Mapping m = i.getModel().getMapping();
for (Node n : m.getOfflineNodes()) {
index.put(n.id()... | [
"public",
"static",
"TIntIntHashMap",
"makeNodeIndex",
"(",
"Collection",
"<",
"Instance",
">",
"instances",
")",
"{",
"TIntIntHashMap",
"index",
"=",
"new",
"TIntIntHashMap",
"(",
")",
";",
"int",
"p",
"=",
"0",
";",
"for",
"(",
"Instance",
"i",
":",
"ins... | Make an index revealing the position of each node in a collection
of disjoint instances
@param instances the collection to browse. Instances are supposed to be disjoint
@return the index of every node. Format {@code Node#id() -> position} | [
"Make",
"an",
"index",
"revealing",
"the",
"position",
"of",
"each",
"node",
"in",
"a",
"collection",
"of",
"disjoint",
"instances"
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/split/src/main/java/org/btrplace/scheduler/runner/disjoint/Instances.java#L77-L91 |
44,753 | m-m-m/util | io/src/main/java/net/sf/mmm/util/io/impl/ProcessableDetectorStream.java | ProcessableDetectorStream.initialize | public void initialize(AbstractDetectorStreamProvider provider, DetectorStreamProcessor lastProcessor) {
List<DetectorStreamProcessorFactory> factoryList = provider.getProcessorFactoryList();
int factoryCount = factoryList.size();
DetectorStreamBufferImpl buffer = new DetectorStreamBufferImpl(lastProce... | java | public void initialize(AbstractDetectorStreamProvider provider, DetectorStreamProcessor lastProcessor) {
List<DetectorStreamProcessorFactory> factoryList = provider.getProcessorFactoryList();
int factoryCount = factoryList.size();
DetectorStreamBufferImpl buffer = new DetectorStreamBufferImpl(lastProce... | [
"public",
"void",
"initialize",
"(",
"AbstractDetectorStreamProvider",
"provider",
",",
"DetectorStreamProcessor",
"lastProcessor",
")",
"{",
"List",
"<",
"DetectorStreamProcessorFactory",
">",
"factoryList",
"=",
"provider",
".",
"getProcessorFactoryList",
"(",
")",
";",... | This method initializes this class. It has to be called to complete the construction.
@param provider is the {@link net.sf.mmm.util.io.api.DetectorStreamProvider} creating this instance.
@param lastProcessor is the last {@link DetectorStreamProcessor} of the chain (the data-receiver). | [
"This",
"method",
"initializes",
"this",
"class",
".",
"It",
"has",
"to",
"be",
"called",
"to",
"complete",
"the",
"construction",
"."
] | f0e4e084448f8dfc83ca682a9e1618034a094ce6 | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/io/src/main/java/net/sf/mmm/util/io/impl/ProcessableDetectorStream.java#L53-L64 |
44,754 | paolorotolo/GittyReporter | library/src/main/java/com/github/paolorotolo/gitty_reporter/reportIssue.java | reportIssue.doInBackground | @Override
protected String doInBackground(String... params) {
// get the string from params, which is an array
String user = params[0];
String password = params[1];
String bugTitle = params[2];
String bugDescription = params[3];
String deviceInfo = params[4];
... | java | @Override
protected String doInBackground(String... params) {
// get the string from params, which is an array
String user = params[0];
String password = params[1];
String bugTitle = params[2];
String bugDescription = params[3];
String deviceInfo = params[4];
... | [
"@",
"Override",
"protected",
"String",
"doInBackground",
"(",
"String",
"...",
"params",
")",
"{",
"// get the string from params, which is an array",
"String",
"user",
"=",
"params",
"[",
"0",
"]",
";",
"String",
"password",
"=",
"params",
"[",
"1",
"]",
";",
... | This is run in a background thread | [
"This",
"is",
"run",
"in",
"a",
"background",
"thread"
] | 2315b224d15b29bce6497165a712be6f23b171e1 | https://github.com/paolorotolo/GittyReporter/blob/2315b224d15b29bce6497165a712be6f23b171e1/library/src/main/java/com/github/paolorotolo/gitty_reporter/reportIssue.java#L39-L68 |
44,755 | paolorotolo/GittyReporter | library/src/main/java/com/github/paolorotolo/gitty_reporter/reportIssue.java | reportIssue.onPostExecute | @Override
protected void onPostExecute(String result) {
super.onPostExecute(result);
if (result.equals("ok")) {
progress.dismiss();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
mActivity.showDoneAnimation();
} else {
... | java | @Override
protected void onPostExecute(String result) {
super.onPostExecute(result);
if (result.equals("ok")) {
progress.dismiss();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
mActivity.showDoneAnimation();
} else {
... | [
"@",
"Override",
"protected",
"void",
"onPostExecute",
"(",
"String",
"result",
")",
"{",
"super",
".",
"onPostExecute",
"(",
"result",
")",
";",
"if",
"(",
"result",
".",
"equals",
"(",
"\"ok\"",
")",
")",
"{",
"progress",
".",
"dismiss",
"(",
")",
";... | This runs in UI when background thread finishes | [
"This",
"runs",
"in",
"UI",
"when",
"background",
"thread",
"finishes"
] | 2315b224d15b29bce6497165a712be6f23b171e1 | https://github.com/paolorotolo/GittyReporter/blob/2315b224d15b29bce6497165a712be6f23b171e1/library/src/main/java/com/github/paolorotolo/gitty_reporter/reportIssue.java#L77-L112 |
44,756 | Berico-Technologies/CLAVIN-NERD | src/main/java/com/bericotech/clavin/nerd/WorkflowDemoNERD.java | WorkflowDemoNERD.main | public static void main(String[] args) throws Exception {
getparseArticle();
geoparseUppercaseArticle();
resolveStanfordEntities();
// And we're done...
System.out.println("\n\"That's all folks!\"");
} | java | public static void main(String[] args) throws Exception {
getparseArticle();
geoparseUppercaseArticle();
resolveStanfordEntities();
// And we're done...
System.out.println("\n\"That's all folks!\"");
} | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"getparseArticle",
"(",
")",
";",
"geoparseUppercaseArticle",
"(",
")",
";",
"resolveStanfordEntities",
"(",
")",
";",
"// And we're done...",
"System",
".",
... | Run this after installing and configuring CLAVIN to get a sense of
how to use it in a few different ways.
@param args not used
@throws Exception Error by contract | [
"Run",
"this",
"after",
"installing",
"and",
"configuring",
"CLAVIN",
"to",
"get",
"a",
"sense",
"of",
"how",
"to",
"use",
"it",
"in",
"a",
"few",
"different",
"ways",
"."
] | 96a51b841ce42f3e406f45d7949d31f73e5e12d5 | https://github.com/Berico-Technologies/CLAVIN-NERD/blob/96a51b841ce42f3e406f45d7949d31f73e5e12d5/src/main/java/com/bericotech/clavin/nerd/WorkflowDemoNERD.java#L67-L75 |
44,757 | Berico-Technologies/CLAVIN-NERD | src/main/java/com/bericotech/clavin/nerd/WorkflowDemoNERD.java | WorkflowDemoNERD.getparseArticle | private static void getparseArticle() throws Exception {
// Instantiate a CLAVIN GeoParser using the StanfordExtractor
GeoParser parser = GeoParserFactory.getDefault("./IndexDirectory", new StanfordExtractor(), 1, 1, false);
// Unstructured text file about Somalia to be geoparsed
... | java | private static void getparseArticle() throws Exception {
// Instantiate a CLAVIN GeoParser using the StanfordExtractor
GeoParser parser = GeoParserFactory.getDefault("./IndexDirectory", new StanfordExtractor(), 1, 1, false);
// Unstructured text file about Somalia to be geoparsed
... | [
"private",
"static",
"void",
"getparseArticle",
"(",
")",
"throws",
"Exception",
"{",
"// Instantiate a CLAVIN GeoParser using the StanfordExtractor",
"GeoParser",
"parser",
"=",
"GeoParserFactory",
".",
"getDefault",
"(",
"\"./IndexDirectory\"",
",",
"new",
"StanfordExtracto... | Standard usage of CLAVIN. Instantiate a default GeoParser, give
it some text, check out the locations it extracts and resolves.
@throws Exception | [
"Standard",
"usage",
"of",
"CLAVIN",
".",
"Instantiate",
"a",
"default",
"GeoParser",
"give",
"it",
"some",
"text",
"check",
"out",
"the",
"locations",
"it",
"extracts",
"and",
"resolves",
"."
] | 96a51b841ce42f3e406f45d7949d31f73e5e12d5 | https://github.com/Berico-Technologies/CLAVIN-NERD/blob/96a51b841ce42f3e406f45d7949d31f73e5e12d5/src/main/java/com/bericotech/clavin/nerd/WorkflowDemoNERD.java#L83-L100 |
44,758 | Berico-Technologies/CLAVIN-NERD | src/main/java/com/bericotech/clavin/nerd/WorkflowDemoNERD.java | WorkflowDemoNERD.resolveStanfordEntities | private static void resolveStanfordEntities() throws IOException, ClavinException {
/*#####################################################################
*
* Start with Stanford NER -- no need to get CLAVIN involved for now.
*
*#############################################... | java | private static void resolveStanfordEntities() throws IOException, ClavinException {
/*#####################################################################
*
* Start with Stanford NER -- no need to get CLAVIN involved for now.
*
*#############################################... | [
"private",
"static",
"void",
"resolveStanfordEntities",
"(",
")",
"throws",
"IOException",
",",
"ClavinException",
"{",
"/*#####################################################################\n *\n * Start with Stanford NER -- no need to get CLAVIN involved for now.\n ... | Sometimes, you might already be using Stanford NER elsewhere in
your application, and you'd like to just pass the output from
Stanford NER directly into CLAVIN, without having to re-run the
input through Stanford NER just to use CLAVIN. This example
shows you how to very easily do exactly that.
@throws IOException
@th... | [
"Sometimes",
"you",
"might",
"already",
"be",
"using",
"Stanford",
"NER",
"elsewhere",
"in",
"your",
"application",
"and",
"you",
"d",
"like",
"to",
"just",
"pass",
"the",
"output",
"from",
"Stanford",
"NER",
"directly",
"into",
"CLAVIN",
"without",
"having",
... | 96a51b841ce42f3e406f45d7949d31f73e5e12d5 | https://github.com/Berico-Technologies/CLAVIN-NERD/blob/96a51b841ce42f3e406f45d7949d31f73e5e12d5/src/main/java/com/bericotech/clavin/nerd/WorkflowDemoNERD.java#L137-L179 |
44,759 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/DependencyList.java | DependencyList.getDependentFeatures | public Set<String> getDependentFeatures() throws IOException {
final boolean entryExitLogging = log.isLoggable(Level.FINER);
final String methodName = "getDependentFeatures"; //$NON-NLS-1$
if (entryExitLogging) {
log.entering(DependencyList.class.getName(), methodName);
}
if (!initialized) {
init... | java | public Set<String> getDependentFeatures() throws IOException {
final boolean entryExitLogging = log.isLoggable(Level.FINER);
final String methodName = "getDependentFeatures"; //$NON-NLS-1$
if (entryExitLogging) {
log.entering(DependencyList.class.getName(), methodName);
}
if (!initialized) {
init... | [
"public",
"Set",
"<",
"String",
">",
"getDependentFeatures",
"(",
")",
"throws",
"IOException",
"{",
"final",
"boolean",
"entryExitLogging",
"=",
"log",
".",
"isLoggable",
"(",
"Level",
".",
"FINER",
")",
";",
"final",
"String",
"methodName",
"=",
"\"getDepend... | Returns the set of features that were discovered when evaluating has!
plugin expressions or aliases when expanding the dependencies. This
information may be required by the cache manager in order to properly
idenify cached responses.
@return The set of discovered feature names.
@throws IOException | [
"Returns",
"the",
"set",
"of",
"features",
"that",
"were",
"discovered",
"when",
"evaluating",
"has!",
"plugin",
"expressions",
"or",
"aliases",
"when",
"expanding",
"the",
"dependencies",
".",
"This",
"information",
"may",
"be",
"required",
"by",
"the",
"cache"... | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/DependencyList.java#L288-L301 |
44,760 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/DependencyList.java | DependencyList.setLabel | public void setLabel(String label) {
final boolean entryExitLogging = log.isLoggable(Level.FINER);
final String methodName = "setLabel"; //$NON-NLS-1$
if (entryExitLogging) {
log.entering(DependencyList.class.getName(), methodName, new Object[]{label});
}
this.label = label;
if (entryExitLogging) ... | java | public void setLabel(String label) {
final boolean entryExitLogging = log.isLoggable(Level.FINER);
final String methodName = "setLabel"; //$NON-NLS-1$
if (entryExitLogging) {
log.entering(DependencyList.class.getName(), methodName, new Object[]{label});
}
this.label = label;
if (entryExitLogging) ... | [
"public",
"void",
"setLabel",
"(",
"String",
"label",
")",
"{",
"final",
"boolean",
"entryExitLogging",
"=",
"log",
".",
"isLoggable",
"(",
"Level",
".",
"FINER",
")",
";",
"final",
"String",
"methodName",
"=",
"\"setLabel\"",
";",
"//$NON-NLS-1$\r",
"if",
"... | Associates an arbitrary text string with this object.
@param label The string to associate with this object | [
"Associates",
"an",
"arbitrary",
"text",
"string",
"with",
"this",
"object",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/DependencyList.java#L308-L318 |
44,761 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/DependencyList.java | DependencyList.initialize | synchronized void initialize() throws IOException {
if (initialized) {
return;
}
final boolean traceLogging = log.isLoggable(Level.FINEST);
final boolean entryExitLogging = log.isLoggable(Level.FINER);
final String methodName = "initialize"; //$NON-NLS-1$
if (entryExitLogging) {
log.entering(D... | java | synchronized void initialize() throws IOException {
if (initialized) {
return;
}
final boolean traceLogging = log.isLoggable(Level.FINEST);
final boolean entryExitLogging = log.isLoggable(Level.FINER);
final String methodName = "initialize"; //$NON-NLS-1$
if (entryExitLogging) {
log.entering(D... | [
"synchronized",
"void",
"initialize",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"initialized",
")",
"{",
"return",
";",
"}",
"final",
"boolean",
"traceLogging",
"=",
"log",
".",
"isLoggable",
"(",
"Level",
".",
"FINEST",
")",
";",
"final",
"boolea... | Internal method called to resolve dependencies the first time one of the
accessor methods is called. This is done in order to make object creation
light-weight and to avoid the possibility of throwing an exception in the
object constructor.
@throws IOException | [
"Internal",
"method",
"called",
"to",
"resolve",
"dependencies",
"the",
"first",
"time",
"one",
"of",
"the",
"accessor",
"methods",
"is",
"called",
".",
"This",
"is",
"done",
"in",
"order",
"to",
"make",
"object",
"creation",
"light",
"-",
"weight",
"and",
... | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/DependencyList.java#L352-L406 |
44,762 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/DependencyList.java | DependencyList.expandDependencies | void expandDependencies(String name, ModuleDepInfo depInfo, ModuleDeps expandedDependencies) throws IOException {
final String methodName = "expandDependencies"; //$NON-NLS-1$
final boolean traceLogging = log.isLoggable(Level.FINEST);
final boolean entryExitLogging = log.isLoggable(Level.FINER);
if (entryEx... | java | void expandDependencies(String name, ModuleDepInfo depInfo, ModuleDeps expandedDependencies) throws IOException {
final String methodName = "expandDependencies"; //$NON-NLS-1$
final boolean traceLogging = log.isLoggable(Level.FINEST);
final boolean entryExitLogging = log.isLoggable(Level.FINER);
if (entryEx... | [
"void",
"expandDependencies",
"(",
"String",
"name",
",",
"ModuleDepInfo",
"depInfo",
",",
"ModuleDeps",
"expandedDependencies",
")",
"throws",
"IOException",
"{",
"final",
"String",
"methodName",
"=",
"\"expandDependencies\"",
";",
"//$NON-NLS-1$\r",
"final",
"boolean"... | Expands the nested dependencies for the specified module
@param name
the name of the module who's dependencies are to be expanded.
Alias name resolution and has! loader plugin branching is
assumed to have been already performed.
@param depInfo
the {@link ModuleDepInfo} for the module, obtained from processing
the modu... | [
"Expands",
"the",
"nested",
"dependencies",
"for",
"the",
"specified",
"module"
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/DependencyList.java#L422-L464 |
44,763 | btrplace/scheduler | examples/src/main/java/org/btrplace/examples/SolverTuning.java | SolverTuning.makeModel | private Model makeModel() {
Model mo = new DefaultModel();
Mapping mapping = mo.getMapping();
int nbNodes = 300;
int nbVMs = 6 * nbNodes;
//Memory usage/consumption in GB
ShareableResource rcMem = new ShareableResource("mem");
//A resource representing the band... | java | private Model makeModel() {
Model mo = new DefaultModel();
Mapping mapping = mo.getMapping();
int nbNodes = 300;
int nbVMs = 6 * nbNodes;
//Memory usage/consumption in GB
ShareableResource rcMem = new ShareableResource("mem");
//A resource representing the band... | [
"private",
"Model",
"makeModel",
"(",
")",
"{",
"Model",
"mo",
"=",
"new",
"DefaultModel",
"(",
")",
";",
"Mapping",
"mapping",
"=",
"mo",
".",
"getMapping",
"(",
")",
";",
"int",
"nbNodes",
"=",
"300",
";",
"int",
"nbVMs",
"=",
"6",
"*",
"nbNodes",
... | A default model with 500 nodes hosting 3000 VMs.
6 VMs per node
Each node has a 10GB network interface and 32 GB RAM
Each VM consumes 1GB Bandwidth and between 1 to 5 GB RAM | [
"A",
"default",
"model",
"with",
"500",
"nodes",
"hosting",
"3000",
"VMs",
".",
"6",
"VMs",
"per",
"node",
"Each",
"node",
"has",
"a",
"10GB",
"network",
"interface",
"and",
"32",
"GB",
"RAM",
"Each",
"VM",
"consumes",
"1GB",
"Bandwidth",
"and",
"between... | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/examples/src/main/java/org/btrplace/examples/SolverTuning.java#L117-L155 |
44,764 | btrplace/scheduler | api/src/main/java/org/btrplace/plan/event/BootNode.java | BootNode.applyAction | @Override
public boolean applyAction(Model c) {
if (c.getMapping().isOffline(node)) {
c.getMapping().addOnlineNode(node);
return true;
}
return false;
} | java | @Override
public boolean applyAction(Model c) {
if (c.getMapping().isOffline(node)) {
c.getMapping().addOnlineNode(node);
return true;
}
return false;
} | [
"@",
"Override",
"public",
"boolean",
"applyAction",
"(",
"Model",
"c",
")",
"{",
"if",
"(",
"c",
".",
"getMapping",
"(",
")",
".",
"isOffline",
"(",
"node",
")",
")",
"{",
"c",
".",
"getMapping",
"(",
")",
".",
"addOnlineNode",
"(",
"node",
")",
"... | Put the node online on the model.
@param c the model to alter
@return {@code true} iff the node was offline and is now online | [
"Put",
"the",
"node",
"online",
"on",
"the",
"model",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/plan/event/BootNode.java#L86-L93 |
44,765 | btrplace/scheduler | api/src/main/java/org/btrplace/plan/event/ShutdownVM.java | ShutdownVM.applyAction | @Override
public boolean applyAction(Model m) {
Mapping map = m.getMapping();
if (map.isOnline(node) &&
map.isRunning(vm) &&
map.getVMLocation(vm).equals(node)) {
map.addReadyVM(vm);
return true;
}
return false;
} | java | @Override
public boolean applyAction(Model m) {
Mapping map = m.getMapping();
if (map.isOnline(node) &&
map.isRunning(vm) &&
map.getVMLocation(vm).equals(node)) {
map.addReadyVM(vm);
return true;
}
return false;
} | [
"@",
"Override",
"public",
"boolean",
"applyAction",
"(",
"Model",
"m",
")",
"{",
"Mapping",
"map",
"=",
"m",
".",
"getMapping",
"(",
")",
";",
"if",
"(",
"map",
".",
"isOnline",
"(",
"node",
")",
"&&",
"map",
".",
"isRunning",
"(",
"vm",
")",
"&&"... | Apply the action by removing the virtual machine from the model.
@param m the model to alter
@return {@code true} | [
"Apply",
"the",
"action",
"by",
"removing",
"the",
"virtual",
"machine",
"from",
"the",
"model",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/plan/event/ShutdownVM.java#L58-L68 |
44,766 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java | SignalUtil.formatMessage | static String formatMessage(String fmt, Object[] args) {
MessageFormat formatter = new MessageFormat(fmt);
Format[] formats = formatter.getFormatsByArgumentIndex();
StringBuffer msg = new StringBuffer();
formatter.format(args, msg, null);
if (args.length > formats.length) {
// We have extra arguement... | java | static String formatMessage(String fmt, Object[] args) {
MessageFormat formatter = new MessageFormat(fmt);
Format[] formats = formatter.getFormatsByArgumentIndex();
StringBuffer msg = new StringBuffer();
formatter.format(args, msg, null);
if (args.length > formats.length) {
// We have extra arguement... | [
"static",
"String",
"formatMessage",
"(",
"String",
"fmt",
",",
"Object",
"[",
"]",
"args",
")",
"{",
"MessageFormat",
"formatter",
"=",
"new",
"MessageFormat",
"(",
"fmt",
")",
";",
"Format",
"[",
"]",
"formats",
"=",
"formatter",
".",
"getFormatsByArgument... | Formats the specified string using the specified arguments. If the argument array contains
more elements than the format string can accommodate, then the additional arguments are
appended to the end of the formatted string.
@param fmt
the format string
@param args
the argument array for the replaceable parameters in t... | [
"Formats",
"the",
"specified",
"string",
"using",
"the",
"specified",
"arguments",
".",
"If",
"the",
"argument",
"array",
"contains",
"more",
"elements",
"than",
"the",
"format",
"string",
"can",
"accommodate",
"then",
"the",
"additional",
"arguments",
"are",
"a... | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java#L61-L75 |
44,767 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java | SignalUtil.logResuming | static void logResuming(String callerClass, String callerMethod, Object waitObj, long start) {
long elapsed = (System.currentTimeMillis() - start)/1000;
log.logp(Level.WARNING, callerClass, callerMethod,
Messages.SignalUtil_2, new Object[]{Thread.currentThread().getId(), elapsed, waitObj});
} | java | static void logResuming(String callerClass, String callerMethod, Object waitObj, long start) {
long elapsed = (System.currentTimeMillis() - start)/1000;
log.logp(Level.WARNING, callerClass, callerMethod,
Messages.SignalUtil_2, new Object[]{Thread.currentThread().getId(), elapsed, waitObj});
} | [
"static",
"void",
"logResuming",
"(",
"String",
"callerClass",
",",
"String",
"callerMethod",
",",
"Object",
"waitObj",
",",
"long",
"start",
")",
"{",
"long",
"elapsed",
"=",
"(",
"System",
".",
"currentTimeMillis",
"(",
")",
"-",
"start",
")",
"/",
"1000... | Logs a warning level message indicating that a thread which has previously been reported
as stuck is now resuming.
@param callerClass
the class name of the caller
@param callerMethod
the method name of the caller
@param waitObj
the object that is being waited on
@param start
the time that the wait began | [
"Logs",
"a",
"warning",
"level",
"message",
"indicating",
"that",
"a",
"thread",
"which",
"has",
"previously",
"been",
"reported",
"as",
"stuck",
"is",
"now",
"resuming",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java#L162-L166 |
44,768 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java | AbstractAggregatorImpl.writeResponse | protected boolean writeResponse(InputStream in, HttpServletRequest request, HttpServletResponse response) throws IOException {
final String sourceMethod = "writeResponse"; //$NON-NLS-1$
final boolean isTraceLogging = log.isLoggable(Level.FINER);
if (isTraceLogging) {
log.entering(AbstractAggregatorImpl.cla... | java | protected boolean writeResponse(InputStream in, HttpServletRequest request, HttpServletResponse response) throws IOException {
final String sourceMethod = "writeResponse"; //$NON-NLS-1$
final boolean isTraceLogging = log.isLoggable(Level.FINER);
if (isTraceLogging) {
log.entering(AbstractAggregatorImpl.cla... | [
"protected",
"boolean",
"writeResponse",
"(",
"InputStream",
"in",
",",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"throws",
"IOException",
"{",
"final",
"String",
"sourceMethod",
"=",
"\"writeResponse\"",
";",
"//$NON-NLS-1$\r",
"fina... | Writes the response to the response object. IOExceptions that occur when writing to the
response output stream are not propagated, but are handled internally. Such exceptions
are assumed to be caused by the client closing the connection and are not real errors.
@param in
the input stream.
@param request
the http reque... | [
"Writes",
"the",
"response",
"to",
"the",
"response",
"object",
".",
"IOExceptions",
"that",
"occur",
"when",
"writing",
"to",
"the",
"response",
"output",
"stream",
"are",
"not",
"propagated",
"but",
"are",
"handled",
"internally",
".",
"Such",
"exceptions",
... | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L917-L948 |
44,769 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java | AbstractAggregatorImpl.logException | void logException(HttpServletRequest req, Level level, String sourceMethod, Throwable t) {
if (log.isLoggable(level)) {
StringBuffer sb = new StringBuffer();
// add the request URI and query args
String uri = req.getRequestURI();
if (uri != null) {
sb.append(uri);
String queryArgs = req.get... | java | void logException(HttpServletRequest req, Level level, String sourceMethod, Throwable t) {
if (log.isLoggable(level)) {
StringBuffer sb = new StringBuffer();
// add the request URI and query args
String uri = req.getRequestURI();
if (uri != null) {
sb.append(uri);
String queryArgs = req.get... | [
"void",
"logException",
"(",
"HttpServletRequest",
"req",
",",
"Level",
"level",
",",
"String",
"sourceMethod",
",",
"Throwable",
"t",
")",
"{",
"if",
"(",
"log",
".",
"isLoggable",
"(",
"level",
")",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuff... | Formats and logs an exception log message including the request url, query args, the exception class
name and exception message.
@param req
the http servlet request
@param level
the logging level
@param sourceMethod
the calling method name
@param t
the exception | [
"Formats",
"and",
"logs",
"an",
"exception",
"log",
"message",
"including",
"the",
"request",
"url",
"query",
"args",
"the",
"exception",
"class",
"name",
"and",
"exception",
"message",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L963-L981 |
44,770 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java | AbstractAggregatorImpl.getPropValue | public String getPropValue (String propName){
String propValue = null;
propValue = System.getProperty(propName);
IServiceReference[] refs = null;
if (propValue == null) {
try {
refs = getPlatformServices().getServiceReferences(IVariableResolver.class.getName(), "(name=" + getName() + ")"); //$NON-... | java | public String getPropValue (String propName){
String propValue = null;
propValue = System.getProperty(propName);
IServiceReference[] refs = null;
if (propValue == null) {
try {
refs = getPlatformServices().getServiceReferences(IVariableResolver.class.getName(), "(name=" + getName() + ")"); //$NON-... | [
"public",
"String",
"getPropValue",
"(",
"String",
"propName",
")",
"{",
"String",
"propValue",
"=",
"null",
";",
"propValue",
"=",
"System",
".",
"getProperty",
"(",
"propName",
")",
";",
"IServiceReference",
"[",
"]",
"refs",
"=",
"null",
";",
"if",
"(",... | Returns the value for the property name used by the aggregator. By default,
it returns the system property indicated by the specified key. This method may be overriden by the platform
dependent implementation of the aggregator.
@param propName
@return Value of the property | [
"Returns",
"the",
"value",
"for",
"the",
"property",
"name",
"used",
"by",
"the",
"aggregator",
".",
"By",
"default",
"it",
"returns",
"the",
"system",
"property",
"indicated",
"by",
"the",
"specified",
"key",
".",
"This",
"method",
"may",
"be",
"overriden",... | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L1089-L1116 |
44,771 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java | AbstractAggregatorImpl.notifyRequestListeners | protected void notifyRequestListeners(RequestNotifierAction action, HttpServletRequest req, HttpServletResponse resp) throws IOException {
// notify any listeners that the config has been updated
IServiceReference[] refs = null;
try {
refs = getPlatformServices().getServiceReferences(IRequestListener.class... | java | protected void notifyRequestListeners(RequestNotifierAction action, HttpServletRequest req, HttpServletResponse resp) throws IOException {
// notify any listeners that the config has been updated
IServiceReference[] refs = null;
try {
refs = getPlatformServices().getServiceReferences(IRequestListener.class... | [
"protected",
"void",
"notifyRequestListeners",
"(",
"RequestNotifierAction",
"action",
",",
"HttpServletRequest",
"req",
",",
"HttpServletResponse",
"resp",
")",
"throws",
"IOException",
"{",
"// notify any listeners that the config has been updated\r",
"IServiceReference",
"[",
... | Calls the registered request notifier listeners.
@param action The request action (start or end)
@param req The request object.
@param resp The response object.
@throws IOException | [
"Calls",
"the",
"registered",
"request",
"notifier",
"listeners",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L1175-L1199 |
44,772 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java | AbstractAggregatorImpl.notifyConfigListeners | protected void notifyConfigListeners(long seq) throws IOException {
IServiceReference[] refs = null;
try {
refs = getPlatformServices().getServiceReferences(IConfigListener.class.getName(), "(name="+getName()+")"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (PlatformServicesException e) {
if (log.isLoggable(... | java | protected void notifyConfigListeners(long seq) throws IOException {
IServiceReference[] refs = null;
try {
refs = getPlatformServices().getServiceReferences(IConfigListener.class.getName(), "(name="+getName()+")"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (PlatformServicesException e) {
if (log.isLoggable(... | [
"protected",
"void",
"notifyConfigListeners",
"(",
"long",
"seq",
")",
"throws",
"IOException",
"{",
"IServiceReference",
"[",
"]",
"refs",
"=",
"null",
";",
"try",
"{",
"refs",
"=",
"getPlatformServices",
"(",
")",
".",
"getServiceReferences",
"(",
"IConfigList... | Call the registered config change listeners
@param seq The change listener sequence number
@throws IOException | [
"Call",
"the",
"registered",
"config",
"change",
"listeners"
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L1207-L1235 |
44,773 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java | AbstractAggregatorImpl.registerExtension | protected void registerExtension(IAggregatorExtension ext, IAggregatorExtension before) {
final String sourceMethod = "registerExtension"; //$NON-NLS-1$
boolean isTraceLogging = log.isLoggable(Level.FINER);
if (isTraceLogging) {
log.entering(AbstractAggregatorImpl.class.getName(), sourceMethod, new Object[... | java | protected void registerExtension(IAggregatorExtension ext, IAggregatorExtension before) {
final String sourceMethod = "registerExtension"; //$NON-NLS-1$
boolean isTraceLogging = log.isLoggable(Level.FINER);
if (isTraceLogging) {
log.entering(AbstractAggregatorImpl.class.getName(), sourceMethod, new Object[... | [
"protected",
"void",
"registerExtension",
"(",
"IAggregatorExtension",
"ext",
",",
"IAggregatorExtension",
"before",
")",
"{",
"final",
"String",
"sourceMethod",
"=",
"\"registerExtension\"",
";",
"//$NON-NLS-1$\r",
"boolean",
"isTraceLogging",
"=",
"log",
".",
"isLogga... | Adds the specified extension to the list of registered extensions.
@param ext
The extension to add
@param before
Reference to an existing extension that the
new extension should be placed before in the list. If null,
then the new extension is added to the end of the list | [
"Adds",
"the",
"specified",
"extension",
"to",
"the",
"list",
"of",
"registered",
"extensions",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L1247-L1317 |
44,774 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java | AbstractAggregatorImpl.initialize | public void initialize(IConfig config)
throws Exception {
// Check last-modified times of resources in the overrides folders. These resources
// are considered to be dynamic in a production environment and we want to
// detect new/changed resources in these folders on startup so that we can clear
// c... | java | public void initialize(IConfig config)
throws Exception {
// Check last-modified times of resources in the overrides folders. These resources
// are considered to be dynamic in a production environment and we want to
// detect new/changed resources in these folders on startup so that we can clear
// c... | [
"public",
"void",
"initialize",
"(",
"IConfig",
"config",
")",
"throws",
"Exception",
"{",
"// Check last-modified times of resources in the overrides folders. These resources\r",
"// are considered to be dynamic in a production environment and we want to\r",
"// detect new/changed resources... | This method does some initialization for the aggregator servlet. This method is called from platform
dependent Aggregator implementation during its initialization.
@param config
The aggregator config
@throws Exception | [
"This",
"method",
"does",
"some",
"initialization",
"for",
"the",
"aggregator",
"servlet",
".",
"This",
"method",
"is",
"called",
"from",
"platform",
"dependent",
"Aggregator",
"implementation",
"during",
"its",
"initialization",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L1541-L1557 |
44,775 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java | AbstractAggregatorImpl.getPathsAndAliases | protected Map<String, URI> getPathsAndAliases(InitParams initParams) {
final String sourceMethod = "getPahtsAndAliases"; //$NON-NLS-1$
boolean isTraceLogging = log.isLoggable(Level.FINER);
if (isTraceLogging) {
log.entering(AbstractAggregatorImpl.class.getName(), sourceMethod, new Object[]{initParams});
... | java | protected Map<String, URI> getPathsAndAliases(InitParams initParams) {
final String sourceMethod = "getPahtsAndAliases"; //$NON-NLS-1$
boolean isTraceLogging = log.isLoggable(Level.FINER);
if (isTraceLogging) {
log.entering(AbstractAggregatorImpl.class.getName(), sourceMethod, new Object[]{initParams});
... | [
"protected",
"Map",
"<",
"String",
",",
"URI",
">",
"getPathsAndAliases",
"(",
"InitParams",
"initParams",
")",
"{",
"final",
"String",
"sourceMethod",
"=",
"\"getPahtsAndAliases\"",
";",
"//$NON-NLS-1$\r",
"boolean",
"isTraceLogging",
"=",
"log",
".",
"isLoggable",... | Returns a mapping of resource aliases to IResources defined in the init-params.
If the IResource is null, then the alias is for the aggregator itself rather
than a resource location.
@param initParams
The aggregator init-params
@return Mapping of aliases to IResources | [
"Returns",
"a",
"mapping",
"of",
"resource",
"aliases",
"to",
"IResources",
"defined",
"in",
"the",
"init",
"-",
"params",
".",
"If",
"the",
"IResource",
"is",
"null",
"then",
"the",
"alias",
"is",
"for",
"the",
"aggregator",
"itself",
"rather",
"than",
"a... | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L1569-L1616 |
44,776 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java | AbstractAggregatorImpl.registerLayerListener | @SuppressWarnings({ "unchecked", "rawtypes" })
protected void registerLayerListener() {
Dictionary dict = new Properties();
dict.put("name", getName()); //$NON-NLS-1$
registrations.add(getPlatformServices().registerService(
ILayerListener.class.getName(), new AggregatorLayerListener(this), dict));
} | java | @SuppressWarnings({ "unchecked", "rawtypes" })
protected void registerLayerListener() {
Dictionary dict = new Properties();
dict.put("name", getName()); //$NON-NLS-1$
registrations.add(getPlatformServices().registerService(
ILayerListener.class.getName(), new AggregatorLayerListener(this), dict));
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
",",
"\"rawtypes\"",
"}",
")",
"protected",
"void",
"registerLayerListener",
"(",
")",
"{",
"Dictionary",
"dict",
"=",
"new",
"Properties",
"(",
")",
";",
"dict",
".",
"put",
"(",
"\"name\"",
",",
"getName"... | Registers the layer listener | [
"Registers",
"the",
"layer",
"listener"
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L1689-L1695 |
44,777 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/BooleanTerm.java | BooleanTerm.andWith | public BooleanTerm andWith(BooleanTerm other) {
if (isFalse() || other.isFalse()) {
// anding with false, the result is false
return BooleanTerm.FALSE;
}
if (other.isTrue()) {
// anding with true, the result is unchanged
return this;
}
if (isTrue()) {
// anding with true, other is unc... | java | public BooleanTerm andWith(BooleanTerm other) {
if (isFalse() || other.isFalse()) {
// anding with false, the result is false
return BooleanTerm.FALSE;
}
if (other.isTrue()) {
// anding with true, the result is unchanged
return this;
}
if (isTrue()) {
// anding with true, other is unc... | [
"public",
"BooleanTerm",
"andWith",
"(",
"BooleanTerm",
"other",
")",
"{",
"if",
"(",
"isFalse",
"(",
")",
"||",
"other",
".",
"isFalse",
"(",
")",
")",
"{",
"// anding with false, the result is false\r",
"return",
"BooleanTerm",
".",
"FALSE",
";",
"}",
"if",
... | Returns the logical AND of this term with the specified
term.
@param other the term to and this term with.
@return the result of ANDing this term with the specified term | [
"Returns",
"the",
"logical",
"AND",
"of",
"this",
"term",
"with",
"the",
"specified",
"term",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/BooleanTerm.java#L154-L177 |
44,778 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/ZipUtil.java | ZipUtil.zip | static public byte[] zip(InputStream in) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
VariableGZIPOutputStream compress = new VariableGZIPOutputStream(bos, 10240); // is 10k too big?
compress.setLevel(Deflater.BEST_COMPRESSION);
Writer writer = new OutputStreamWriter(compre... | java | static public byte[] zip(InputStream in) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
VariableGZIPOutputStream compress = new VariableGZIPOutputStream(bos, 10240); // is 10k too big?
compress.setLevel(Deflater.BEST_COMPRESSION);
Writer writer = new OutputStreamWriter(compre... | [
"static",
"public",
"byte",
"[",
"]",
"zip",
"(",
"InputStream",
"in",
")",
"throws",
"IOException",
"{",
"ByteArrayOutputStream",
"bos",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"VariableGZIPOutputStream",
"compress",
"=",
"new",
"VariableGZIPOutputStrea... | Returns a byte array containing the gzipped contents of the input stream
@param in
the input stream to zip
@return the gzipped contents in a byte array
@throws IOException | [
"Returns",
"a",
"byte",
"array",
"containing",
"the",
"gzipped",
"contents",
"of",
"the",
"input",
"stream"
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/ZipUtil.java#L346-L354 |
44,779 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/ZipUtil.java | ZipUtil.unzip | static public byte[] unzip(InputStream in) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
CopyUtil.copy(new GZIPInputStream(in), bos);
return bos.toByteArray();
} | java | static public byte[] unzip(InputStream in) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
CopyUtil.copy(new GZIPInputStream(in), bos);
return bos.toByteArray();
} | [
"static",
"public",
"byte",
"[",
"]",
"unzip",
"(",
"InputStream",
"in",
")",
"throws",
"IOException",
"{",
"ByteArrayOutputStream",
"bos",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"CopyUtil",
".",
"copy",
"(",
"new",
"GZIPInputStream",
"(",
"in",
... | Returns the unzipped contents of the zipped input stream in a byte array
@param in
the input stream to unzip
@return the unzipped content in a byte array
@throws IOException | [
"Returns",
"the",
"unzipped",
"contents",
"of",
"the",
"zipped",
"input",
"stream",
"in",
"a",
"byte",
"array"
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/ZipUtil.java#L364-L368 |
44,780 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/NLS.java | NLS.bind | public static String bind(String message, Object binding) {
return internalBind(message, null, String.valueOf(binding), null);
} | java | public static String bind(String message, Object binding) {
return internalBind(message, null, String.valueOf(binding), null);
} | [
"public",
"static",
"String",
"bind",
"(",
"String",
"message",
",",
"Object",
"binding",
")",
"{",
"return",
"internalBind",
"(",
"message",
",",
"null",
",",
"String",
".",
"valueOf",
"(",
"binding",
")",
",",
"null",
")",
";",
"}"
] | Bind the given message's substitution locations with the given string value.
@param message the message to be manipulated
@param binding the object to be inserted into the message
@return the manipulated String
@throws IllegalArgumentException if the text appearing within curly braces in the given message does not map... | [
"Bind",
"the",
"given",
"message",
"s",
"substitution",
"locations",
"with",
"the",
"given",
"string",
"value",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/NLS.java#L93-L95 |
44,781 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/NLS.java | NLS.initializeMessages | public static void initializeMessages(final String bundleName, final Class clazz) {
if (System.getSecurityManager() == null) {
load(bundleName, clazz);
return;
}
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
load(bundleName, clazz);
return null;
}
});
} | java | public static void initializeMessages(final String bundleName, final Class clazz) {
if (System.getSecurityManager() == null) {
load(bundleName, clazz);
return;
}
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
load(bundleName, clazz);
return null;
}
});
} | [
"public",
"static",
"void",
"initializeMessages",
"(",
"final",
"String",
"bundleName",
",",
"final",
"Class",
"clazz",
")",
"{",
"if",
"(",
"System",
".",
"getSecurityManager",
"(",
")",
"==",
"null",
")",
"{",
"load",
"(",
"bundleName",
",",
"clazz",
")"... | Initialize the given class with the values from the specified message bundle.
@param bundleName fully qualified path of the class name
@param clazz the class where the constants will exist | [
"Initialize",
"the",
"given",
"class",
"with",
"the",
"values",
"from",
"the",
"specified",
"message",
"bundle",
"."
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/NLS.java#L128-L139 |
44,782 | m-m-m/util | value/src/main/java/net/sf/mmm/util/value/base/StringValueConverterImpl.java | StringValueConverterImpl.parseNumber | private Number parseNumber(String numberValue, Object valueSource) throws WrongValueTypeException {
try {
Double d = Double.valueOf(numberValue);
return this.mathUtil.toSimplestNumber(d);
} catch (NumberFormatException e) {
throw new WrongValueTypeException(e, numberValue, valueSource, Number... | java | private Number parseNumber(String numberValue, Object valueSource) throws WrongValueTypeException {
try {
Double d = Double.valueOf(numberValue);
return this.mathUtil.toSimplestNumber(d);
} catch (NumberFormatException e) {
throw new WrongValueTypeException(e, numberValue, valueSource, Number... | [
"private",
"Number",
"parseNumber",
"(",
"String",
"numberValue",
",",
"Object",
"valueSource",
")",
"throws",
"WrongValueTypeException",
"{",
"try",
"{",
"Double",
"d",
"=",
"Double",
".",
"valueOf",
"(",
"numberValue",
")",
";",
"return",
"this",
".",
"mathU... | This method parses a numeric value.
@param numberValue is the number value as string.
@param valueSource describes the source of the value. This may be the filename where the value was read
from, an XPath where the value was located in an XML document, etc. It is used in exceptions
thrown if something goes wrong. This... | [
"This",
"method",
"parses",
"a",
"numeric",
"value",
"."
] | f0e4e084448f8dfc83ca682a9e1618034a094ce6 | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/value/src/main/java/net/sf/mmm/util/value/base/StringValueConverterImpl.java#L111-L119 |
44,783 | Berico-Technologies/CLAVIN-NERD | src/main/java/com/bericotech/clavin/nerd/StanfordExtractor.java | StanfordExtractor.extractLocationNames | public List<LocationOccurrence> extractLocationNames(String text) {
if (text == null)
throw new IllegalArgumentException("text input to extractLocationNames should not be null");
// extract entities as <Entity Type, Start Index, Stop Index>
return convertNERtoCLAVIN(namedEntityRecog... | java | public List<LocationOccurrence> extractLocationNames(String text) {
if (text == null)
throw new IllegalArgumentException("text input to extractLocationNames should not be null");
// extract entities as <Entity Type, Start Index, Stop Index>
return convertNERtoCLAVIN(namedEntityRecog... | [
"public",
"List",
"<",
"LocationOccurrence",
">",
"extractLocationNames",
"(",
"String",
"text",
")",
"{",
"if",
"(",
"text",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"text input to extractLocationNames should not be null\"",
")",
";",
"//... | Get extracted locations from a plain-text body.
@param text Text content to perform extraction on.
@return List of extracted Location Occurrences. | [
"Get",
"extracted",
"locations",
"from",
"a",
"plain",
"-",
"text",
"body",
"."
] | 96a51b841ce42f3e406f45d7949d31f73e5e12d5 | https://github.com/Berico-Technologies/CLAVIN-NERD/blob/96a51b841ce42f3e406f45d7949d31f73e5e12d5/src/main/java/com/bericotech/clavin/nerd/StanfordExtractor.java#L94-L100 |
44,784 | Berico-Technologies/CLAVIN-NERD | src/main/java/com/bericotech/clavin/nerd/StanfordExtractor.java | StanfordExtractor.convertNERtoCLAVIN | public static List<LocationOccurrence> convertNERtoCLAVIN
(List<Triple<String, Integer, Integer>> entities, String text) {
List<LocationOccurrence> locations = new ArrayList<LocationOccurrence>();
if (entities != null) {
// iterate over each entity Triple
for (Tripl... | java | public static List<LocationOccurrence> convertNERtoCLAVIN
(List<Triple<String, Integer, Integer>> entities, String text) {
List<LocationOccurrence> locations = new ArrayList<LocationOccurrence>();
if (entities != null) {
// iterate over each entity Triple
for (Tripl... | [
"public",
"static",
"List",
"<",
"LocationOccurrence",
">",
"convertNERtoCLAVIN",
"(",
"List",
"<",
"Triple",
"<",
"String",
",",
"Integer",
",",
"Integer",
">",
">",
"entities",
",",
"String",
"text",
")",
"{",
"List",
"<",
"LocationOccurrence",
">",
"locat... | Converts output from Stanford NER to input required by CLAVIN resolver.
@param entities A List<Triple<String, Integer, Integer>> from Stanford NER
@param text text content processed by Stanford NER + CLAVIN resolver
@return List<LocationOccurrence> used by CLAVIN resolver | [
"Converts",
"output",
"from",
"Stanford",
"NER",
"to",
"input",
"required",
"by",
"CLAVIN",
"resolver",
"."
] | 96a51b841ce42f3e406f45d7949d31f73e5e12d5 | https://github.com/Berico-Technologies/CLAVIN-NERD/blob/96a51b841ce42f3e406f45d7949d31f73e5e12d5/src/main/java/com/bericotech/clavin/nerd/StanfordExtractor.java#L109-L126 |
44,785 | m-m-m/util | pojopath/src/main/java/net/sf/mmm/util/pojo/path/base/AbstractPojoPathFunction.java | AbstractPojoPathFunction.getFunctionDescription | protected String getFunctionDescription(String functionName) {
String className = getClass().getSimpleName();
StringBuilder buffer = new StringBuilder(functionName.length() + className.length() + 4);
buffer.append(FUNCTION_NAME_PREFIX);
buffer.append(functionName);
buffer.append(" [");
buffer.a... | java | protected String getFunctionDescription(String functionName) {
String className = getClass().getSimpleName();
StringBuilder buffer = new StringBuilder(functionName.length() + className.length() + 4);
buffer.append(FUNCTION_NAME_PREFIX);
buffer.append(functionName);
buffer.append(" [");
buffer.a... | [
"protected",
"String",
"getFunctionDescription",
"(",
"String",
"functionName",
")",
"{",
"String",
"className",
"=",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
";",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
"functionName",
".",
"le... | This method gets a description of this function.
@param functionName is the name under which this function was invoked.
@return a string describing this function. | [
"This",
"method",
"gets",
"a",
"description",
"of",
"this",
"function",
"."
] | f0e4e084448f8dfc83ca682a9e1618034a094ce6 | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/pojopath/src/main/java/net/sf/mmm/util/pojo/path/base/AbstractPojoPathFunction.java#L47-L57 |
44,786 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/BooleanFormula.java | BooleanFormula.andWith | public BooleanFormula andWith(BooleanFormula other) {
if (other.isTrue()) {
return this;
}
if (other.isFalse() || isFalse()) {
if (booleanTerms == null) {
booleanTerms = new HashSet<BooleanTerm>();
} else {
booleanTerms.clear();
}
isSimplified = true;
return this;
}
if (... | java | public BooleanFormula andWith(BooleanFormula other) {
if (other.isTrue()) {
return this;
}
if (other.isFalse() || isFalse()) {
if (booleanTerms == null) {
booleanTerms = new HashSet<BooleanTerm>();
} else {
booleanTerms.clear();
}
isSimplified = true;
return this;
}
if (... | [
"public",
"BooleanFormula",
"andWith",
"(",
"BooleanFormula",
"other",
")",
"{",
"if",
"(",
"other",
".",
"isTrue",
"(",
")",
")",
"{",
"return",
"this",
";",
"}",
"if",
"(",
"other",
".",
"isFalse",
"(",
")",
"||",
"isFalse",
"(",
")",
")",
"{",
"... | Logically ands the provided terms with the terms in the formula,
replacing this formula with the result
@param other
the terms to and with this formula
@return this object. | [
"Logically",
"ands",
"the",
"provided",
"terms",
"with",
"the",
"terms",
"in",
"the",
"formula",
"replacing",
"this",
"formula",
"with",
"the",
"result"
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/BooleanFormula.java#L324-L353 |
44,787 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/BooleanFormula.java | BooleanFormula.removeTerms | public boolean removeTerms(Set<BooleanTerm> toRemove) {
boolean modified = false;
if (toRemove == null || toRemove.iterator() == null) {
modified = booleanTerms == null || size() != 0;
booleanTerms = new HashSet<BooleanTerm>();
} else if (booleanTerms != null) {
modified = removeAll(toRemove);
}... | java | public boolean removeTerms(Set<BooleanTerm> toRemove) {
boolean modified = false;
if (toRemove == null || toRemove.iterator() == null) {
modified = booleanTerms == null || size() != 0;
booleanTerms = new HashSet<BooleanTerm>();
} else if (booleanTerms != null) {
modified = removeAll(toRemove);
}... | [
"public",
"boolean",
"removeTerms",
"(",
"Set",
"<",
"BooleanTerm",
">",
"toRemove",
")",
"{",
"boolean",
"modified",
"=",
"false",
";",
"if",
"(",
"toRemove",
"==",
"null",
"||",
"toRemove",
".",
"iterator",
"(",
")",
"==",
"null",
")",
"{",
"modified",... | Removes the specified terms from the formula
@param toRemove The set of terms to remove
@return True if the formula was modified | [
"Removes",
"the",
"specified",
"terms",
"from",
"the",
"formula"
] | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/BooleanFormula.java#L361-L370 |
44,788 | OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/BooleanFormula.java | BooleanFormula.addAll | @Override
public boolean addAll(Collection<? extends BooleanTerm> terms) {
boolean modified = false;
// a null booleanTerms means that the expression is
// already true, so no need to modify it
if (terms == null) {
modified = booleanTerms != null;
booleanTerms = null;
} else if (booleanTerms !=... | java | @Override
public boolean addAll(Collection<? extends BooleanTerm> terms) {
boolean modified = false;
// a null booleanTerms means that the expression is
// already true, so no need to modify it
if (terms == null) {
modified = booleanTerms != null;
booleanTerms = null;
} else if (booleanTerms !=... | [
"@",
"Override",
"public",
"boolean",
"addAll",
"(",
"Collection",
"<",
"?",
"extends",
"BooleanTerm",
">",
"terms",
")",
"{",
"boolean",
"modified",
"=",
"false",
";",
"// a null booleanTerms means that the expression is\r",
"// already true, so no need to modify it\r",
... | Adds the terms to the formula. Note that if the formula has
previously been simplified and determined to evaluate to
true, then adding any terms will have no effect. | [
"Adds",
"the",
"terms",
"to",
"the",
"formula",
".",
"Note",
"that",
"if",
"the",
"formula",
"has",
"previously",
"been",
"simplified",
"and",
"determined",
"to",
"evaluate",
"to",
"true",
"then",
"adding",
"any",
"terms",
"will",
"have",
"no",
"effect",
"... | 9f47a96d778251638b1df9a368462176216d5b29 | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/BooleanFormula.java#L440-L454 |
44,789 | btrplace/scheduler | choco/src/main/java/org/btrplace/scheduler/choco/extensions/TaskMonitor.java | TaskMonitor.build | public static TaskMonitor build(IntVar start, IntVar duration, IntVar end) {
return new TaskMonitor(start, duration, end);
} | java | public static TaskMonitor build(IntVar start, IntVar duration, IntVar end) {
return new TaskMonitor(start, duration, end);
} | [
"public",
"static",
"TaskMonitor",
"build",
"(",
"IntVar",
"start",
",",
"IntVar",
"duration",
",",
"IntVar",
"end",
")",
"{",
"return",
"new",
"TaskMonitor",
"(",
"start",
",",
"duration",
",",
"end",
")",
";",
"}"
] | Make a new Monitor
@param start the task start moment
@param duration the task duration
@param end the task end
@return the resulting task. | [
"Make",
"a",
"new",
"Monitor"
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/extensions/TaskMonitor.java#L65-L67 |
44,790 | InsightLab/graphast | core/src/main/java/br/ufc/insightlab/graphast/structure/DefaultGraphStructure.java | DefaultGraphStructure.containsNode | @Override
public boolean containsNode(long id) {
return nodeIdMapping.containsKey(id) && !isRemoved(nodes.get(nodeIdMapping.get(id)));
} | java | @Override
public boolean containsNode(long id) {
return nodeIdMapping.containsKey(id) && !isRemoved(nodes.get(nodeIdMapping.get(id)));
} | [
"@",
"Override",
"public",
"boolean",
"containsNode",
"(",
"long",
"id",
")",
"{",
"return",
"nodeIdMapping",
".",
"containsKey",
"(",
"id",
")",
"&&",
"!",
"isRemoved",
"(",
"nodes",
".",
"get",
"(",
"nodeIdMapping",
".",
"get",
"(",
"id",
")",
")",
"... | Verify whether the node which has the given id is in the graph or not.
@param id the node's id. | [
"Verify",
"whether",
"the",
"node",
"which",
"has",
"the",
"given",
"id",
"is",
"in",
"the",
"graph",
"or",
"not",
"."
] | b81d10c1ea8378e1fb9fcb545dd75d5e6308fd24 | https://github.com/InsightLab/graphast/blob/b81d10c1ea8378e1fb9fcb545dd75d5e6308fd24/core/src/main/java/br/ufc/insightlab/graphast/structure/DefaultGraphStructure.java#L166-L169 |
44,791 | btrplace/scheduler | api/src/main/java/org/btrplace/plan/event/ForgeVM.java | ForgeVM.applyAction | @Override
public boolean applyAction(Model m) {
Mapping map = m.getMapping();
if (!map.contains(id)) {
map.addReadyVM(id);
return true;
}
return false;
} | java | @Override
public boolean applyAction(Model m) {
Mapping map = m.getMapping();
if (!map.contains(id)) {
map.addReadyVM(id);
return true;
}
return false;
} | [
"@",
"Override",
"public",
"boolean",
"applyAction",
"(",
"Model",
"m",
")",
"{",
"Mapping",
"map",
"=",
"m",
".",
"getMapping",
"(",
")",
";",
"if",
"(",
"!",
"map",
".",
"contains",
"(",
"id",
")",
")",
"{",
"map",
".",
"addReadyVM",
"(",
"id",
... | Put the VM in the ready state iff
it does not already belong to the mapping.
@param m the model to modify
@return {@code true} iff successful | [
"Put",
"the",
"VM",
"in",
"the",
"ready",
"state",
"iff",
"it",
"does",
"not",
"already",
"belong",
"to",
"the",
"mapping",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/plan/event/ForgeVM.java#L56-L65 |
44,792 | m-m-m/util | reflect/src/main/java/net/sf/mmm/util/reflect/base/ReflectionUtilImpl.java | ReflectionUtilImpl.visitResourceNames | public void visitResourceNames(String packageName, boolean includeSubPackages, ClassLoader classLoader, ResourceVisitor visitor) {
try {
String path = packageName.replace('.', '/');
if (path.isEmpty()) {
LOG.debug("Scanning entire classpath...");
} else {
LOG.trace("Scanning for r... | java | public void visitResourceNames(String packageName, boolean includeSubPackages, ClassLoader classLoader, ResourceVisitor visitor) {
try {
String path = packageName.replace('.', '/');
if (path.isEmpty()) {
LOG.debug("Scanning entire classpath...");
} else {
LOG.trace("Scanning for r... | [
"public",
"void",
"visitResourceNames",
"(",
"String",
"packageName",
",",
"boolean",
"includeSubPackages",
",",
"ClassLoader",
"classLoader",
",",
"ResourceVisitor",
"visitor",
")",
"{",
"try",
"{",
"String",
"path",
"=",
"packageName",
".",
"replace",
"(",
"'",
... | This method does the actual magic to locate resources on the classpath.
@param packageName is the name of the {@link Package} to scan. Both "." and "/" are accepted as separator (e.g.
"net.sf.mmm.util.reflect).
@param includeSubPackages - if {@code true} all sub-packages of the specified {@link Package} will be includ... | [
"This",
"method",
"does",
"the",
"actual",
"magic",
"to",
"locate",
"resources",
"on",
"the",
"classpath",
"."
] | f0e4e084448f8dfc83ca682a9e1618034a094ce6 | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/reflect/src/main/java/net/sf/mmm/util/reflect/base/ReflectionUtilImpl.java#L731-L759 |
44,793 | btrplace/scheduler | split/src/main/java/org/btrplace/scheduler/runner/disjoint/FixedNodeSetsPartitioning.java | FixedNodeSetsPartitioning.setPartitions | public boolean setPartitions(Collection<Collection<Node>> parts) {
if (!isDisjoint(parts)) {
return false;
}
partitions = parts;
return true;
} | java | public boolean setPartitions(Collection<Collection<Node>> parts) {
if (!isDisjoint(parts)) {
return false;
}
partitions = parts;
return true;
} | [
"public",
"boolean",
"setPartitions",
"(",
"Collection",
"<",
"Collection",
"<",
"Node",
">",
">",
"parts",
")",
"{",
"if",
"(",
"!",
"isDisjoint",
"(",
"parts",
")",
")",
"{",
"return",
"false",
";",
"}",
"partitions",
"=",
"parts",
";",
"return",
"tr... | Set the node partitions
@param parts disjoint set of nodes
@return {@code true} iff the partitions have been set. {@code false} if the
sets were not disjoint | [
"Set",
"the",
"node",
"partitions"
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/split/src/main/java/org/btrplace/scheduler/runner/disjoint/FixedNodeSetsPartitioning.java#L115-L121 |
44,794 | m-m-m/util | cli/src/main/java/net/sf/mmm/util/cli/api/AbstractMain.java | AbstractMain.run | public int run(String... args) {
CliParser parser = getParserBuilder().build(this);
try {
CliModeObject mode = parser.parseParameters(args);
if (this.help) {
assert (mode.getId().equals(CliMode.ID_HELP));
printHelp(parser);
return 0;
}
validate(mode);
retur... | java | public int run(String... args) {
CliParser parser = getParserBuilder().build(this);
try {
CliModeObject mode = parser.parseParameters(args);
if (this.help) {
assert (mode.getId().equals(CliMode.ID_HELP));
printHelp(parser);
return 0;
}
validate(mode);
retur... | [
"public",
"int",
"run",
"(",
"String",
"...",
"args",
")",
"{",
"CliParser",
"parser",
"=",
"getParserBuilder",
"(",
")",
".",
"build",
"(",
"this",
")",
";",
"try",
"{",
"CliModeObject",
"mode",
"=",
"parser",
".",
"parseParameters",
"(",
"args",
")",
... | This method should be invoked from the static main-method.
@param args are the commandline-arguments.
@return the exit code or {@code 0} on success. | [
"This",
"method",
"should",
"be",
"invoked",
"from",
"the",
"static",
"main",
"-",
"method",
"."
] | f0e4e084448f8dfc83ca682a9e1618034a094ce6 | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/cli/src/main/java/net/sf/mmm/util/cli/api/AbstractMain.java#L244-L262 |
44,795 | protegeproject/jpaul | src/main/java/jpaul/Misc/Debug.java | Debug.sortedCollection | public static <T> List<T> sortedCollection(Collection<T> coll) {
List<T> list = new LinkedList<T>(coll);
Collections.sort(list, new UComp<T>());
return list;
} | java | public static <T> List<T> sortedCollection(Collection<T> coll) {
List<T> list = new LinkedList<T>(coll);
Collections.sort(list, new UComp<T>());
return list;
} | [
"public",
"static",
"<",
"T",
">",
"List",
"<",
"T",
">",
"sortedCollection",
"(",
"Collection",
"<",
"T",
">",
"coll",
")",
"{",
"List",
"<",
"T",
">",
"list",
"=",
"new",
"LinkedList",
"<",
"T",
">",
"(",
"coll",
")",
";",
"Collections",
".",
"... | Returns a list containing all the objects from a collection,
in increasing lexicographic order of their string
representations. | [
"Returns",
"a",
"list",
"containing",
"all",
"the",
"objects",
"from",
"a",
"collection",
"in",
"increasing",
"lexicographic",
"order",
"of",
"their",
"string",
"representations",
"."
] | db579ffb16faaa4b0c577ec82c246f7349427714 | https://github.com/protegeproject/jpaul/blob/db579ffb16faaa4b0c577ec82c246f7349427714/src/main/java/jpaul/Misc/Debug.java#L28-L32 |
44,796 | protegeproject/jpaul | src/main/java/jpaul/Misc/Debug.java | Debug.stringImg | public static <T> String stringImg(Collection<T> coll) {
StringBuffer buffer = new StringBuffer();
buffer.append("[ ");
for(T t : sortedCollection(coll)) {
buffer.append(t);
buffer.append(" ");
}
buffer.append("]");
return buffer.toString();
} | java | public static <T> String stringImg(Collection<T> coll) {
StringBuffer buffer = new StringBuffer();
buffer.append("[ ");
for(T t : sortedCollection(coll)) {
buffer.append(t);
buffer.append(" ");
}
buffer.append("]");
return buffer.toString();
} | [
"public",
"static",
"<",
"T",
">",
"String",
"stringImg",
"(",
"Collection",
"<",
"T",
">",
"coll",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"[ \"",
")",
";",
"for",
"(",
"T",
"t",... | Returns a string representation of all elements from a
collection, in increasing lexicographic order of their string
representations. | [
"Returns",
"a",
"string",
"representation",
"of",
"all",
"elements",
"from",
"a",
"collection",
"in",
"increasing",
"lexicographic",
"order",
"of",
"their",
"string",
"representations",
"."
] | db579ffb16faaa4b0c577ec82c246f7349427714 | https://github.com/protegeproject/jpaul/blob/db579ffb16faaa4b0c577ec82c246f7349427714/src/main/java/jpaul/Misc/Debug.java#L37-L48 |
44,797 | protegeproject/jpaul | src/main/java/jpaul/Misc/Debug.java | Debug.stringImg | public static <T> String stringImg(T[] v) {
if(v == null) return "null";
StringBuffer buffer = new StringBuffer();
Arrays.sort(v, new UComp<T>());
for(int i=0; i<v.length; i++) {
buffer.append(v[i]);
buffer.append("\n");
}
return buffer.toString();
} | java | public static <T> String stringImg(T[] v) {
if(v == null) return "null";
StringBuffer buffer = new StringBuffer();
Arrays.sort(v, new UComp<T>());
for(int i=0; i<v.length; i++) {
buffer.append(v[i]);
buffer.append("\n");
}
return buffer.toString();
} | [
"public",
"static",
"<",
"T",
">",
"String",
"stringImg",
"(",
"T",
"[",
"]",
"v",
")",
"{",
"if",
"(",
"v",
"==",
"null",
")",
"return",
"\"null\"",
";",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"Arrays",
".",
"sort",
"... | Returns a string representation of all elements from an array,
in increasing lexicographic order of their string
representations. | [
"Returns",
"a",
"string",
"representation",
"of",
"all",
"elements",
"from",
"an",
"array",
"in",
"increasing",
"lexicographic",
"order",
"of",
"their",
"string",
"representations",
"."
] | db579ffb16faaa4b0c577ec82c246f7349427714 | https://github.com/protegeproject/jpaul/blob/db579ffb16faaa4b0c577ec82c246f7349427714/src/main/java/jpaul/Misc/Debug.java#L53-L65 |
44,798 | btrplace/scheduler | btrpsl/src/main/java/org/btrplace/btrpsl/constraint/migration/SyncBuilder.java | SyncBuilder.buildConstraint | @Override
public List<Sync> buildConstraint(BtrPlaceTree t, List<BtrpOperand> args) {
if (!checkConformance(t, args)) {
return Collections.emptyList();
}
@SuppressWarnings("unchecked")
List<VM> s = (List<VM>) params[0].transform(this, t, args.get(0));
if (s == nu... | java | @Override
public List<Sync> buildConstraint(BtrPlaceTree t, List<BtrpOperand> args) {
if (!checkConformance(t, args)) {
return Collections.emptyList();
}
@SuppressWarnings("unchecked")
List<VM> s = (List<VM>) params[0].transform(this, t, args.get(0));
if (s == nu... | [
"@",
"Override",
"public",
"List",
"<",
"Sync",
">",
"buildConstraint",
"(",
"BtrPlaceTree",
"t",
",",
"List",
"<",
"BtrpOperand",
">",
"args",
")",
"{",
"if",
"(",
"!",
"checkConformance",
"(",
"t",
",",
"args",
")",
")",
"{",
"return",
"Collections",
... | Build a sync constraint.
@param t the current tree
@param args must be 1 set of vms. The set must not be empty
@return a constraint | [
"Build",
"a",
"sync",
"constraint",
"."
] | 611063aad0b47a016e57ebf36fa4dfdf24de09e8 | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/btrpsl/src/main/java/org/btrplace/btrpsl/constraint/migration/SyncBuilder.java#L53-L70 |
44,799 | mapcode-foundation/mapcode-java | src/main/java/com/mapcode/Mapcode.java | Mapcode.getPrecisionFormat | public static int getPrecisionFormat(@Nonnull final String mapcode) throws UnknownPrecisionFormatException {
// First, decode to ASCII.
final String decodedMapcode = convertStringToPlainAscii(mapcode).toUpperCase();
// Syntax needs to be OK.
if (!PATTERN_MAPCODE.matcher(decodedMapcode)... | java | public static int getPrecisionFormat(@Nonnull final String mapcode) throws UnknownPrecisionFormatException {
// First, decode to ASCII.
final String decodedMapcode = convertStringToPlainAscii(mapcode).toUpperCase();
// Syntax needs to be OK.
if (!PATTERN_MAPCODE.matcher(decodedMapcode)... | [
"public",
"static",
"int",
"getPrecisionFormat",
"(",
"@",
"Nonnull",
"final",
"String",
"mapcode",
")",
"throws",
"UnknownPrecisionFormatException",
"{",
"// First, decode to ASCII.",
"final",
"String",
"decodedMapcode",
"=",
"convertStringToPlainAscii",
"(",
"mapcode",
... | This method return the mapcode type, given a mapcode string. If the mapcode string has an invalid
format, an exception is thrown.
Note that this method only checks the syntactic validity of the mapcode, the string format. It does not
check if the mapcode is really a valid mapcode representing a position on Earth.
@pa... | [
"This",
"method",
"return",
"the",
"mapcode",
"type",
"given",
"a",
"mapcode",
"string",
".",
"If",
"the",
"mapcode",
"string",
"has",
"an",
"invalid",
"format",
"an",
"exception",
"is",
"thrown",
"."
] | f12d4d9fbd460472ac0fff1f702f2ac716bc0ab8 | https://github.com/mapcode-foundation/mapcode-java/blob/f12d4d9fbd460472ac0fff1f702f2ac716bc0ab8/src/main/java/com/mapcode/Mapcode.java#L287-L306 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.