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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
149,800 | craterdog/java-general-utilities | src/main/java/craterdog/utils/ByteUtils.java | ByteUtils.bigDecimalToBytes | static public int bigDecimalToBytes(BigDecimal decimal, byte[] buffer, int index) {
BigInteger intVal = decimal.unscaledValue();
int length = 12 + (intVal.bitLength() + 8) / 8;
int scale = decimal.scale();
System.arraycopy(intToBytes(scale), 0, buffer, index, 4); // copy in the scale
... | java | static public int bigDecimalToBytes(BigDecimal decimal, byte[] buffer, int index) {
BigInteger intVal = decimal.unscaledValue();
int length = 12 + (intVal.bitLength() + 8) / 8;
int scale = decimal.scale();
System.arraycopy(intToBytes(scale), 0, buffer, index, 4); // copy in the scale
... | [
"static",
"public",
"int",
"bigDecimalToBytes",
"(",
"BigDecimal",
"decimal",
",",
"byte",
"[",
"]",
"buffer",
",",
"int",
"index",
")",
"{",
"BigInteger",
"intVal",
"=",
"decimal",
".",
"unscaledValue",
"(",
")",
";",
"int",
"length",
"=",
"12",
"+",
"(... | This function converts a big decimal into its corresponding byte format and inserts
it into the specified buffer at the specified index.
@param decimal The big decimal to be converted.
@param buffer The byte array.
@param index The index in the array to begin inserting bytes.
@return The number of bytes inserted. | [
"This",
"function",
"converts",
"a",
"big",
"decimal",
"into",
"its",
"corresponding",
"byte",
"format",
"and",
"inserts",
"it",
"into",
"the",
"specified",
"buffer",
"at",
"the",
"specified",
"index",
"."
] | a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57 | https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/ByteUtils.java#L499-L513 |
149,801 | craterdog/java-general-utilities | src/main/java/craterdog/utils/ByteUtils.java | ByteUtils.bytesToBigDecimal | static public BigDecimal bytesToBigDecimal(byte[] buffer, int index) {
int scale = bytesToInt(buffer, index);
index += 4;
int precision = bytesToInt(buffer, index);
index += 4;
BigInteger intVal = bytesToBigInteger(buffer, index);
return new BigDecimal(intVal, scale, new ... | java | static public BigDecimal bytesToBigDecimal(byte[] buffer, int index) {
int scale = bytesToInt(buffer, index);
index += 4;
int precision = bytesToInt(buffer, index);
index += 4;
BigInteger intVal = bytesToBigInteger(buffer, index);
return new BigDecimal(intVal, scale, new ... | [
"static",
"public",
"BigDecimal",
"bytesToBigDecimal",
"(",
"byte",
"[",
"]",
"buffer",
",",
"int",
"index",
")",
"{",
"int",
"scale",
"=",
"bytesToInt",
"(",
"buffer",
",",
"index",
")",
";",
"index",
"+=",
"4",
";",
"int",
"precision",
"=",
"bytesToInt... | This function converts the bytes in a byte array at the specified index to its
corresponding big decimal value.
@param buffer The byte array containing the big decimal.
@param index The index for the first byte in the byte array.
@return The corresponding big decimal value. | [
"This",
"function",
"converts",
"the",
"bytes",
"in",
"a",
"byte",
"array",
"at",
"the",
"specified",
"index",
"to",
"its",
"corresponding",
"big",
"decimal",
"value",
"."
] | a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57 | https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/ByteUtils.java#L536-L543 |
149,802 | craterdog/java-general-utilities | src/main/java/craterdog/utils/ByteUtils.java | ByteUtils.stringToBytes | static public int stringToBytes(String string, byte[] buffer, int index) {
byte[] bytes = string.getBytes();
int length = bytes.length;
System.arraycopy(bytes, 0, buffer, index, length);
return length;
} | java | static public int stringToBytes(String string, byte[] buffer, int index) {
byte[] bytes = string.getBytes();
int length = bytes.length;
System.arraycopy(bytes, 0, buffer, index, length);
return length;
} | [
"static",
"public",
"int",
"stringToBytes",
"(",
"String",
"string",
",",
"byte",
"[",
"]",
"buffer",
",",
"int",
"index",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"string",
".",
"getBytes",
"(",
")",
";",
"int",
"length",
"=",
"bytes",
".",
"length... | This function converts a string into its corresponding byte format and inserts
it into the specified buffer at the specified index.
@param string The string to be converted.
@param buffer The byte array.
@param index The index in the array to begin inserting bytes.
@return The number of bytes inserted. | [
"This",
"function",
"converts",
"a",
"string",
"into",
"its",
"corresponding",
"byte",
"format",
"and",
"inserts",
"it",
"into",
"the",
"specified",
"buffer",
"at",
"the",
"specified",
"index",
"."
] | a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57 | https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/ByteUtils.java#L581-L586 |
149,803 | craterdog/java-general-utilities | src/main/java/craterdog/utils/ByteUtils.java | ByteUtils.compare | static public int compare(byte[] first, byte[] second) {
// choose the shorter array length
int firstLength = first.length;
int secondLength = second.length;
int shorterLength = Math.min(firstLength, secondLength);
// compare matching bytes
for (int i = 0; i < shorterLen... | java | static public int compare(byte[] first, byte[] second) {
// choose the shorter array length
int firstLength = first.length;
int secondLength = second.length;
int shorterLength = Math.min(firstLength, secondLength);
// compare matching bytes
for (int i = 0; i < shorterLen... | [
"static",
"public",
"int",
"compare",
"(",
"byte",
"[",
"]",
"first",
",",
"byte",
"[",
"]",
"second",
")",
"{",
"// choose the shorter array length",
"int",
"firstLength",
"=",
"first",
".",
"length",
";",
"int",
"secondLength",
"=",
"second",
".",
"length"... | This function compares two byte arrays for canonical ordering.
@param first The first byte array.
@param second The second byte array.
@return The signum result of the comparison. | [
"This",
"function",
"compares",
"two",
"byte",
"arrays",
"for",
"canonical",
"ordering",
"."
] | a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57 | https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/ByteUtils.java#L671-L689 |
149,804 | bwkimmel/jdcp | jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/PreferencesDialog.java | PreferencesDialog.readPreferences | private void readPreferences() {
boolean runOnStartup = pref.getBoolean("runOnStartup", true);
getRunOnStartupCheckBox().setSelected(runOnStartup);
int maxCpus = pref.getInt("maxCpus", 0);
if (maxCpus <= 0) {
getLimitCpusCheckBox().setSelected(false);
getMaxCpusTextField().setValue(Runtime.... | java | private void readPreferences() {
boolean runOnStartup = pref.getBoolean("runOnStartup", true);
getRunOnStartupCheckBox().setSelected(runOnStartup);
int maxCpus = pref.getInt("maxCpus", 0);
if (maxCpus <= 0) {
getLimitCpusCheckBox().setSelected(false);
getMaxCpusTextField().setValue(Runtime.... | [
"private",
"void",
"readPreferences",
"(",
")",
"{",
"boolean",
"runOnStartup",
"=",
"pref",
".",
"getBoolean",
"(",
"\"runOnStartup\"",
",",
"true",
")",
";",
"getRunOnStartupCheckBox",
"(",
")",
".",
"setSelected",
"(",
"runOnStartup",
")",
";",
"int",
"maxC... | Updates the form elements based on preferences. | [
"Updates",
"the",
"form",
"elements",
"based",
"on",
"preferences",
"."
] | 630c5150c245054e2556ff370f4bad2ec793dfb7 | https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/PreferencesDialog.java#L114-L148 |
149,805 | bwkimmel/jdcp | jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/PreferencesDialog.java | PreferencesDialog.writePreferences | private void writePreferences() {
boolean runOnStartup = getRunOnStartupCheckBox().isSelected();
pref.putBoolean("runOnStartup", runOnStartup);
if (getLimitCpusCheckBox().isSelected()) {
int maxCpus = ((Number) getMaxCpusTextField().getValue()).intValue();
pref.putInt("maxCpus", maxCpus);
}... | java | private void writePreferences() {
boolean runOnStartup = getRunOnStartupCheckBox().isSelected();
pref.putBoolean("runOnStartup", runOnStartup);
if (getLimitCpusCheckBox().isSelected()) {
int maxCpus = ((Number) getMaxCpusTextField().getValue()).intValue();
pref.putInt("maxCpus", maxCpus);
}... | [
"private",
"void",
"writePreferences",
"(",
")",
"{",
"boolean",
"runOnStartup",
"=",
"getRunOnStartupCheckBox",
"(",
")",
".",
"isSelected",
"(",
")",
";",
"pref",
".",
"putBoolean",
"(",
"\"runOnStartup\"",
",",
"runOnStartup",
")",
";",
"if",
"(",
"getLimit... | Writes the form values to preferences. | [
"Writes",
"the",
"form",
"values",
"to",
"preferences",
"."
] | 630c5150c245054e2556ff370f4bad2ec793dfb7 | https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/PreferencesDialog.java#L153-L173 |
149,806 | trustathsh/ifmapj | src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identity.java | Identity.extendedIdentifierEquals | private boolean extendedIdentifierEquals(String eid1, String eid2) {
try {
return DomHelpers.compare(DomHelpers.toDocument(eid1, null),
DomHelpers.toDocument(eid2, null));
} catch (MarshalException e) {
return false;
}
} | java | private boolean extendedIdentifierEquals(String eid1, String eid2) {
try {
return DomHelpers.compare(DomHelpers.toDocument(eid1, null),
DomHelpers.toDocument(eid2, null));
} catch (MarshalException e) {
return false;
}
} | [
"private",
"boolean",
"extendedIdentifierEquals",
"(",
"String",
"eid1",
",",
"String",
"eid2",
")",
"{",
"try",
"{",
"return",
"DomHelpers",
".",
"compare",
"(",
"DomHelpers",
".",
"toDocument",
"(",
"eid1",
",",
"null",
")",
",",
"DomHelpers",
".",
"toDocu... | Compare two extended identifiers
@param eid1 Extended identifier XML string
@param eid2 Extended identifier XML string
@return boolean true if both are equal
@since 0.1.5 | [
"Compare",
"two",
"extended",
"identifiers"
] | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identity.java#L181-L188 |
149,807 | trustathsh/ifmapj | src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identity.java | Identity.distinguishedNameEquals | private boolean distinguishedNameEquals(String dsn1, String dsn2) {
return new X500Principal(dsn1).equals(new X500Principal(dsn2));
} | java | private boolean distinguishedNameEquals(String dsn1, String dsn2) {
return new X500Principal(dsn1).equals(new X500Principal(dsn2));
} | [
"private",
"boolean",
"distinguishedNameEquals",
"(",
"String",
"dsn1",
",",
"String",
"dsn2",
")",
"{",
"return",
"new",
"X500Principal",
"(",
"dsn1",
")",
".",
"equals",
"(",
"new",
"X500Principal",
"(",
"dsn2",
")",
")",
";",
"}"
] | Compare two DSN
@param dsn1 Distinguished name (X.500 DSN) string
@param dsn2 Distinguished name (X.500 DSN) string
@return boolean true if both DSN are equal
@since 0.1.5 | [
"Compare",
"two",
"DSN"
] | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identity.java#L198-L200 |
149,808 | ruifigueira/platypus | src/main/java/platypus/internal/Classes.java | Classes.getAllInterfaces | private static void getAllInterfaces(Class<?> cls, Collection<Class<?>> interfacesFound) {
while (cls != null) {
Class<?>[] interfaces = cls.getInterfaces();
for (int i = 0; i < interfaces.length; i++) {
interfacesFound.add(interfaces[i]);
getAllInterface... | java | private static void getAllInterfaces(Class<?> cls, Collection<Class<?>> interfacesFound) {
while (cls != null) {
Class<?>[] interfaces = cls.getInterfaces();
for (int i = 0; i < interfaces.length; i++) {
interfacesFound.add(interfaces[i]);
getAllInterface... | [
"private",
"static",
"void",
"getAllInterfaces",
"(",
"Class",
"<",
"?",
">",
"cls",
",",
"Collection",
"<",
"Class",
"<",
"?",
">",
">",
"interfacesFound",
")",
"{",
"while",
"(",
"cls",
"!=",
"null",
")",
"{",
"Class",
"<",
"?",
">",
"[",
"]",
"i... | Get the interfaces for the specified class.
@param cls the class to look up, may be <code>null</code>
@param interfacesFound the <code>Set</code> of interfaces for the class | [
"Get",
"the",
"interfaces",
"for",
"the",
"specified",
"class",
"."
] | d848de1a7af1171307e955cb73783efd626a8af8 | https://github.com/ruifigueira/platypus/blob/d848de1a7af1171307e955cb73783efd626a8af8/src/main/java/platypus/internal/Classes.java#L54-L65 |
149,809 | nhurion/vaadin-for-heroku | src/main/java/eu/hurion/vaadin/heroku/FilterDefinitionBuilder.java | FilterDefinitionBuilder.withParameter | public FilterDefinitionBuilder withParameter(final String name, final String value) {
if (parameters.containsKey(name)) {
// The spec does not define this but the TCK expects the first
// definition to take precedence
return this;
}
this.parameters.put(name, v... | java | public FilterDefinitionBuilder withParameter(final String name, final String value) {
if (parameters.containsKey(name)) {
// The spec does not define this but the TCK expects the first
// definition to take precedence
return this;
}
this.parameters.put(name, v... | [
"public",
"FilterDefinitionBuilder",
"withParameter",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"parameters",
".",
"containsKey",
"(",
"name",
")",
")",
"{",
"// The spec does not define this but the TCK expects the first",
... | Add a parameter with its associated value.
One a parameter has been added, its value cannot be changed.
@param name the name of the parameter
@param value the value of the parameter
@return this | [
"Add",
"a",
"parameter",
"with",
"its",
"associated",
"value",
".",
"One",
"a",
"parameter",
"has",
"been",
"added",
"its",
"value",
"cannot",
"be",
"changed",
"."
] | 51b1c22827934eb6105b0cfb0254cc15df23e991 | https://github.com/nhurion/vaadin-for-heroku/blob/51b1c22827934eb6105b0cfb0254cc15df23e991/src/main/java/eu/hurion/vaadin/heroku/FilterDefinitionBuilder.java#L72-L80 |
149,810 | mlhartme/mork | src/main/java/net/oneandone/mork/scanner/CompleteFA.java | CompleteFA.create | public static FA create(FA fa, int errorSi) {
FA cfa; // result
int[] sorted;
int si;
int idx;
int faSize;
State faState;
State cfaState;
int nextChar;
int width;
Range range;
int nextSi;
faSize = fa.size();
cfa = n... | java | public static FA create(FA fa, int errorSi) {
FA cfa; // result
int[] sorted;
int si;
int idx;
int faSize;
State faState;
State cfaState;
int nextChar;
int width;
Range range;
int nextSi;
faSize = fa.size();
cfa = n... | [
"public",
"static",
"FA",
"create",
"(",
"FA",
"fa",
",",
"int",
"errorSi",
")",
"{",
"FA",
"cfa",
";",
"// result",
"int",
"[",
"]",
"sorted",
";",
"int",
"si",
";",
"int",
"idx",
";",
"int",
"faSize",
";",
"State",
"faState",
";",
"State",
"cfaSt... | The last state of the automaton returned is the error state. | [
"The",
"last",
"state",
"of",
"the",
"automaton",
"returned",
"is",
"the",
"error",
"state",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/CompleteFA.java#L30-L76 |
149,811 | bwkimmel/jdcp | jdcp-console/src/main/java/ca/eandb/jdcp/client/ScriptFacade.java | ScriptFacade.setJobPriority | public void setJobPriority(UUID jobId, int priority) throws Exception {
config.getJobService().setJobPriority(jobId, priority);
} | java | public void setJobPriority(UUID jobId, int priority) throws Exception {
config.getJobService().setJobPriority(jobId, priority);
} | [
"public",
"void",
"setJobPriority",
"(",
"UUID",
"jobId",
",",
"int",
"priority",
")",
"throws",
"Exception",
"{",
"config",
".",
"getJobService",
"(",
")",
".",
"setJobPriority",
"(",
"jobId",
",",
"priority",
")",
";",
"}"
] | Sets the priority of the specified job.
@param jobId The <code>UUID</code> of the job for which to set the
priority.
@param priority The priority to assign to the job.
@throws Exception if an error occurs in delegating the request to the
configured job service | [
"Sets",
"the",
"priority",
"of",
"the",
"specified",
"job",
"."
] | 630c5150c245054e2556ff370f4bad2ec793dfb7 | https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-console/src/main/java/ca/eandb/jdcp/client/ScriptFacade.java#L71-L73 |
149,812 | BellaDati/belladati-sdk-api | src/main/java/com/belladati/sdk/dataset/data/DataColumn.java | DataColumn.toJson | public JsonNode toJson() {
ObjectNode node = new ObjectMapper().createObjectNode();
node.put("code", code);
if (format != null) {
node.put("format", format);
}
return node;
} | java | public JsonNode toJson() {
ObjectNode node = new ObjectMapper().createObjectNode();
node.put("code", code);
if (format != null) {
node.put("format", format);
}
return node;
} | [
"public",
"JsonNode",
"toJson",
"(",
")",
"{",
"ObjectNode",
"node",
"=",
"new",
"ObjectMapper",
"(",
")",
".",
"createObjectNode",
"(",
")",
";",
"node",
".",
"put",
"(",
"\"code\"",
",",
"code",
")",
";",
"if",
"(",
"format",
"!=",
"null",
")",
"{"... | Returns this column in JSON representation.
@return this column in JSON representation | [
"Returns",
"this",
"column",
"in",
"JSON",
"representation",
"."
] | ec45a42048d8255838ad0200aa6784a8e8a121c1 | https://github.com/BellaDati/belladati-sdk-api/blob/ec45a42048d8255838ad0200aa6784a8e8a121c1/src/main/java/com/belladati/sdk/dataset/data/DataColumn.java#L58-L65 |
149,813 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/ClassRef.java | ClassRef.findComponent | public static Type findComponent(Class<?> type) {
int i;
Type cmp;
for (i = 0; i < Type.PRIMITIVES.length; i++) {
cmp = Type.PRIMITIVES[i];
if (type == cmp.type) {
return cmp;
}
}
return Type.REFERENCE;
} | java | public static Type findComponent(Class<?> type) {
int i;
Type cmp;
for (i = 0; i < Type.PRIMITIVES.length; i++) {
cmp = Type.PRIMITIVES[i];
if (type == cmp.type) {
return cmp;
}
}
return Type.REFERENCE;
} | [
"public",
"static",
"Type",
"findComponent",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"int",
"i",
";",
"Type",
"cmp",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"Type",
".",
"PRIMITIVES",
".",
"length",
";",
"i",
"++",
")",
"{",
"cmp"... | returns Type.REFERENCE_TYPE; | [
"returns",
"Type",
".",
"REFERENCE_TYPE",
";"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/ClassRef.java#L120-L131 |
149,814 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/ClassRef.java | ClassRef.wrappedType | public static Class<?> wrappedType(Class<?> c) {
int i;
if (c.isPrimitive()) {
for (i = 0; i < Type.PRIMITIVES.length; i++) {
if (Type.PRIMITIVES[i].type == c) {
return Type.PRIMITIVES[i].wrapper;
}
}
throw new Runt... | java | public static Class<?> wrappedType(Class<?> c) {
int i;
if (c.isPrimitive()) {
for (i = 0; i < Type.PRIMITIVES.length; i++) {
if (Type.PRIMITIVES[i].type == c) {
return Type.PRIMITIVES[i].wrapper;
}
}
throw new Runt... | [
"public",
"static",
"Class",
"<",
"?",
">",
"wrappedType",
"(",
"Class",
"<",
"?",
">",
"c",
")",
"{",
"int",
"i",
";",
"if",
"(",
"c",
".",
"isPrimitive",
"(",
")",
")",
"{",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"Type",
".",
"PRIMITIVES... | additional functionality for primitive Java Classes | [
"additional",
"functionality",
"for",
"primitive",
"Java",
"Classes"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/ClassRef.java#L302-L315 |
149,815 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/ClassRef.java | ClassRef.classFind | public static Class<?> classFind(String name) {
try {
return Class.forName(name);
} catch (ClassNotFoundException e) {
return findType(name).type;
}
} | java | public static Class<?> classFind(String name) {
try {
return Class.forName(name);
} catch (ClassNotFoundException e) {
return findType(name).type;
}
} | [
"public",
"static",
"Class",
"<",
"?",
">",
"classFind",
"(",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"Class",
".",
"forName",
"(",
"name",
")",
";",
"}",
"catch",
"(",
"ClassNotFoundException",
"e",
")",
"{",
"return",
"findType",
"(",
"name... | Looks up a class by name. In contrast to Class.forName, primitive
classes are found and not found is indicated by null.
@param name the name of the Class to be found
@return the Class found, null if nothing was found | [
"Looks",
"up",
"a",
"class",
"by",
"name",
".",
"In",
"contrast",
"to",
"Class",
".",
"forName",
"primitive",
"classes",
"are",
"found",
"and",
"not",
"found",
"is",
"indicated",
"by",
"null",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/ClassRef.java#L338-L344 |
149,816 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/ClassRef.java | ClassRef.commonBase | public static Class<?> commonBase(Class<?> a, Class<?> b) {
Class<?> result;
Class<?> ifc;
if (b == null) {
throw new IllegalArgumentException();
} else if (a == null) {
return b;
} else {
result = commonSuperClass(a, b);
if (Objec... | java | public static Class<?> commonBase(Class<?> a, Class<?> b) {
Class<?> result;
Class<?> ifc;
if (b == null) {
throw new IllegalArgumentException();
} else if (a == null) {
return b;
} else {
result = commonSuperClass(a, b);
if (Objec... | [
"public",
"static",
"Class",
"<",
"?",
">",
"commonBase",
"(",
"Class",
"<",
"?",
">",
"a",
",",
"Class",
"<",
"?",
">",
"b",
")",
"{",
"Class",
"<",
"?",
">",
"result",
";",
"Class",
"<",
"?",
">",
"ifc",
";",
"if",
"(",
"b",
"==",
"null",
... | Gets the common base of two classes. Common base is the most special
class both argument are assignable to. The common base for
different primitive types is null; the common base for a primitive
type and a reference type is null.
@param a first class, may be null
@param b second class
@return the common base; b,... | [
"Gets",
"the",
"common",
"base",
"of",
"two",
"classes",
".",
"Common",
"base",
"is",
"the",
"most",
"special",
"class",
"both",
"argument",
"are",
"assignable",
"to",
".",
"The",
"common",
"base",
"for",
"different",
"primitive",
"types",
"is",
"null",
";... | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/ClassRef.java#L356-L374 |
149,817 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/ClassRef.java | ClassRef.write | public static void write(ObjectOutput out, Class<?> cl) throws IOException {
int dim;
if (cl == null) {
out.writeByte(-1);
} else {
dim = 0;
while (cl.isArray()) {
dim++;
cl = cl.getComponentType();
}
i... | java | public static void write(ObjectOutput out, Class<?> cl) throws IOException {
int dim;
if (cl == null) {
out.writeByte(-1);
} else {
dim = 0;
while (cl.isArray()) {
dim++;
cl = cl.getComponentType();
}
i... | [
"public",
"static",
"void",
"write",
"(",
"ObjectOutput",
"out",
",",
"Class",
"<",
"?",
">",
"cl",
")",
"throws",
"IOException",
"{",
"int",
"dim",
";",
"if",
"(",
"cl",
"==",
"null",
")",
"{",
"out",
".",
"writeByte",
"(",
"-",
"1",
")",
";",
"... | Writes a class Object.
@param out target to write to
@param cl class to be written | [
"Writes",
"a",
"class",
"Object",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/ClassRef.java#L407-L426 |
149,818 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/ClassRef.java | ClassRef.read | public static Class<?> read(ObjectInput in) throws java.io.IOException {
byte dim;
Class<?> cl;
String name;
dim = in.readByte();
if (dim == -1) {
return null;
} else {
name = in.readUTF();
cl = classFind(name);
if (cl == n... | java | public static Class<?> read(ObjectInput in) throws java.io.IOException {
byte dim;
Class<?> cl;
String name;
dim = in.readByte();
if (dim == -1) {
return null;
} else {
name = in.readUTF();
cl = classFind(name);
if (cl == n... | [
"public",
"static",
"Class",
"<",
"?",
">",
"read",
"(",
"ObjectInput",
"in",
")",
"throws",
"java",
".",
"io",
".",
"IOException",
"{",
"byte",
"dim",
";",
"Class",
"<",
"?",
">",
"cl",
";",
"String",
"name",
";",
"dim",
"=",
"in",
".",
"readByte"... | Reads a class Object.
@param in source to read from
@return the Class read | [
"Reads",
"a",
"class",
"Object",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/ClassRef.java#L433-L453 |
149,819 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/ClassRef.java | ClassRef.writeClasses | public static void writeClasses(ObjectOutput out, Class<?>[] types)
throws java.io.IOException {
int i;
if (types.length > Byte.MAX_VALUE) {
throw new RuntimeException("to many dimensions");
}
out.writeByte((byte) types.length);
for (i = 0; i < types.leng... | java | public static void writeClasses(ObjectOutput out, Class<?>[] types)
throws java.io.IOException {
int i;
if (types.length > Byte.MAX_VALUE) {
throw new RuntimeException("to many dimensions");
}
out.writeByte((byte) types.length);
for (i = 0; i < types.leng... | [
"public",
"static",
"void",
"writeClasses",
"(",
"ObjectOutput",
"out",
",",
"Class",
"<",
"?",
">",
"[",
"]",
"types",
")",
"throws",
"java",
".",
"io",
".",
"IOException",
"{",
"int",
"i",
";",
"if",
"(",
"types",
".",
"length",
">",
"Byte",
".",
... | Writes an array of Class objects.
@param out target to write to
@param types Classes to be written | [
"Writes",
"an",
"array",
"of",
"Class",
"objects",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/ClassRef.java#L460-L471 |
149,820 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/ClassRef.java | ClassRef.readClasses | public static Class<?>[] readClasses(ObjectInput in)
throws java.io.IOException, ClassNotFoundException {
int i, len;
Class<?>[] result;
len = in.readByte();
result = new Class[len];
for (i = 0; i < len; i++) {
result[i] = read(in);
}
retu... | java | public static Class<?>[] readClasses(ObjectInput in)
throws java.io.IOException, ClassNotFoundException {
int i, len;
Class<?>[] result;
len = in.readByte();
result = new Class[len];
for (i = 0; i < len; i++) {
result[i] = read(in);
}
retu... | [
"public",
"static",
"Class",
"<",
"?",
">",
"[",
"]",
"readClasses",
"(",
"ObjectInput",
"in",
")",
"throws",
"java",
".",
"io",
".",
"IOException",
",",
"ClassNotFoundException",
"{",
"int",
"i",
",",
"len",
";",
"Class",
"<",
"?",
">",
"[",
"]",
"r... | Reads an array of Class objects.
@param in source to read from
@return the Classes read | [
"Reads",
"an",
"array",
"of",
"Class",
"objects",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/ClassRef.java#L478-L489 |
149,821 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/ClassRef.java | ClassRef.emitArrayNew | public void emitArrayNew(Code dest) {
Type typeCode;
typeCode = getTypeCode();
if (typeCode.id == T_REFERENCE) {
dest.emit(ANEWARRAY, this);
} else {
dest.emit(NEWARRAY, typeCode.id);
}
} | java | public void emitArrayNew(Code dest) {
Type typeCode;
typeCode = getTypeCode();
if (typeCode.id == T_REFERENCE) {
dest.emit(ANEWARRAY, this);
} else {
dest.emit(NEWARRAY, typeCode.id);
}
} | [
"public",
"void",
"emitArrayNew",
"(",
"Code",
"dest",
")",
"{",
"Type",
"typeCode",
";",
"typeCode",
"=",
"getTypeCode",
"(",
")",
";",
"if",
"(",
"typeCode",
".",
"id",
"==",
"T_REFERENCE",
")",
"{",
"dest",
".",
"emit",
"(",
"ANEWARRAY",
",",
"this"... | create an array with this as component type | [
"create",
"an",
"array",
"with",
"this",
"as",
"component",
"type"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/ClassRef.java#L536-L545 |
149,822 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/ClassDef.java | ClassDef.write | public void write(Output dest) throws IOException {
int i, max;
dest.writeU2(Access.toFlags(accessFlags));
dest.writeClassRef(thisClass);
if (superClass != null) {
dest.writeClassRef(superClass);
} else {
dest.writeU2(0);
}
max = interfac... | java | public void write(Output dest) throws IOException {
int i, max;
dest.writeU2(Access.toFlags(accessFlags));
dest.writeClassRef(thisClass);
if (superClass != null) {
dest.writeClassRef(superClass);
} else {
dest.writeU2(0);
}
max = interfac... | [
"public",
"void",
"write",
"(",
"Output",
"dest",
")",
"throws",
"IOException",
"{",
"int",
"i",
",",
"max",
";",
"dest",
".",
"writeU2",
"(",
"Access",
".",
"toFlags",
"(",
"accessFlags",
")",
")",
";",
"dest",
".",
"writeClassRef",
"(",
"thisClass",
... | Write this class file to the specified output stream. | [
"Write",
"this",
"class",
"file",
"to",
"the",
"specified",
"output",
"stream",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/ClassDef.java#L154-L185 |
149,823 | mlhartme/mork | src/main/java/net/oneandone/mork/grammar/Concat.java | Concat.with | public boolean with(PrefixSet op) {
PrefixSet next;
long tmp;
Prefix l;
Prefix r;
next = new PrefixSet();
l = todo.iterator();
while (l.step()) {
r = op.iterator();
while (r.step()) {
tmp = Prefix.concat(l.data, r.data, k);... | java | public boolean with(PrefixSet op) {
PrefixSet next;
long tmp;
Prefix l;
Prefix r;
next = new PrefixSet();
l = todo.iterator();
while (l.step()) {
r = op.iterator();
while (r.step()) {
tmp = Prefix.concat(l.data, r.data, k);... | [
"public",
"boolean",
"with",
"(",
"PrefixSet",
"op",
")",
"{",
"PrefixSet",
"next",
";",
"long",
"tmp",
";",
"Prefix",
"l",
";",
"Prefix",
"r",
";",
"next",
"=",
"new",
"PrefixSet",
"(",
")",
";",
"l",
"=",
"todo",
".",
"iterator",
"(",
")",
";",
... | true when done | [
"true",
"when",
"done"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/grammar/Concat.java#L42-L63 |
149,824 | trustathsh/ifmapj | src/main/java/de/hshannover/f4/trust/ifmapj/extendedIdentifiers/ExtendedIdentifiers.java | ExtendedIdentifiers.createExtendedIdentifier | public static Identity createExtendedIdentifier(String namespaceUri, String namespacePrefix, String identifierName,
String attributeValue,
String administrativeDomain) {
Document doc = mDocumentBuilder.newDocument();
Element e = doc.createElementNS(namespaceUri,
namespacePrefix
+ ":" + identifierNam... | java | public static Identity createExtendedIdentifier(String namespaceUri, String namespacePrefix, String identifierName,
String attributeValue,
String administrativeDomain) {
Document doc = mDocumentBuilder.newDocument();
Element e = doc.createElementNS(namespaceUri,
namespacePrefix
+ ":" + identifierNam... | [
"public",
"static",
"Identity",
"createExtendedIdentifier",
"(",
"String",
"namespaceUri",
",",
"String",
"namespacePrefix",
",",
"String",
"identifierName",
",",
"String",
"attributeValue",
",",
"String",
"administrativeDomain",
")",
"{",
"Document",
"doc",
"=",
"mDo... | Creates an Extended Identifier.
@param namespaceUri
URI of the namespace of the inner XML of the Extended Identifier
@param namespacePrefix
prefix of the namespace of the inner XML of the Extended Identifier
@param identifierName
the name value of the Extended Identifier (will be the root node of the inner XML)
@param... | [
"Creates",
"an",
"Extended",
"Identifier",
"."
] | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/extendedIdentifiers/ExtendedIdentifiers.java#L93-L111 |
149,825 | trustathsh/ifmapj | src/main/java/de/hshannover/f4/trust/ifmapj/extendedIdentifiers/ExtendedIdentifiers.java | ExtendedIdentifiers.createExtendedIdentifier | public static Identity createExtendedIdentifier(String namespaceUri, String namespacePrefix, String identifierName,
String attributeValue) {
return createExtendedIdentifier(namespaceUri, namespacePrefix, identifierName, attributeValue, "");
} | java | public static Identity createExtendedIdentifier(String namespaceUri, String namespacePrefix, String identifierName,
String attributeValue) {
return createExtendedIdentifier(namespaceUri, namespacePrefix, identifierName, attributeValue, "");
} | [
"public",
"static",
"Identity",
"createExtendedIdentifier",
"(",
"String",
"namespaceUri",
",",
"String",
"namespacePrefix",
",",
"String",
"identifierName",
",",
"String",
"attributeValue",
")",
"{",
"return",
"createExtendedIdentifier",
"(",
"namespaceUri",
",",
"name... | Creates an Extended Identifier; uses an empty string for the administrativeDomain attribute.
@param namespaceUri
URI of the namespace of the inner XML of the Extended Identifier
@param namespacePrefix
prefix of the namespace of the inner XML of the Extended Identifier
@param identifierName
the name value of the Extend... | [
"Creates",
"an",
"Extended",
"Identifier",
";",
"uses",
"an",
"empty",
"string",
"for",
"the",
"administrativeDomain",
"attribute",
"."
] | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/extendedIdentifiers/ExtendedIdentifiers.java#L126-L129 |
149,826 | qmetric/halreader | src/main/java/com/qmetric/hal/reader/HalResource.java | HalResource.getLinkByRel | public Optional<Link> getLinkByRel(final String rel)
{
return Optional.ofNullable(representation.getLinkByRel(rel));
} | java | public Optional<Link> getLinkByRel(final String rel)
{
return Optional.ofNullable(representation.getLinkByRel(rel));
} | [
"public",
"Optional",
"<",
"Link",
">",
"getLinkByRel",
"(",
"final",
"String",
"rel",
")",
"{",
"return",
"Optional",
".",
"ofNullable",
"(",
"representation",
".",
"getLinkByRel",
"(",
"rel",
")",
")",
";",
"}"
] | Get link.
@param rel Relation name
@return Link | [
"Get",
"link",
"."
] | 584167b25ac7ae0559c6e3cdd300b8a02e59b00b | https://github.com/qmetric/halreader/blob/584167b25ac7ae0559c6e3cdd300b8a02e59b00b/src/main/java/com/qmetric/hal/reader/HalResource.java#L49-L52 |
149,827 | qmetric/halreader | src/main/java/com/qmetric/hal/reader/HalResource.java | HalResource.getResourcesByRel | public List<HalResource> getResourcesByRel(final String rel)
{
final List<? extends ReadableRepresentation> resources = representation.getResourcesByRel(rel);
return resources.stream()
.map(representation -> new HalResource(objectMapper, representation))
.collect(Col... | java | public List<HalResource> getResourcesByRel(final String rel)
{
final List<? extends ReadableRepresentation> resources = representation.getResourcesByRel(rel);
return resources.stream()
.map(representation -> new HalResource(objectMapper, representation))
.collect(Col... | [
"public",
"List",
"<",
"HalResource",
">",
"getResourcesByRel",
"(",
"final",
"String",
"rel",
")",
"{",
"final",
"List",
"<",
"?",
"extends",
"ReadableRepresentation",
">",
"resources",
"=",
"representation",
".",
"getResourcesByRel",
"(",
"rel",
")",
";",
"r... | Get embedded resources by relation
@param rel Relation name
@return Embedded resources | [
"Get",
"embedded",
"resources",
"by",
"relation"
] | 584167b25ac7ae0559c6e3cdd300b8a02e59b00b | https://github.com/qmetric/halreader/blob/584167b25ac7ae0559c6e3cdd300b8a02e59b00b/src/main/java/com/qmetric/hal/reader/HalResource.java#L71-L78 |
149,828 | qmetric/halreader | src/main/java/com/qmetric/hal/reader/HalResource.java | HalResource.getValueAsString | public Optional<String> getValueAsString(final String name)
{
return Optional.ofNullable((String) representation.getValue(name, null));
} | java | public Optional<String> getValueAsString(final String name)
{
return Optional.ofNullable((String) representation.getValue(name, null));
} | [
"public",
"Optional",
"<",
"String",
">",
"getValueAsString",
"(",
"final",
"String",
"name",
")",
"{",
"return",
"Optional",
".",
"ofNullable",
"(",
"(",
"String",
")",
"representation",
".",
"getValue",
"(",
"name",
",",
"null",
")",
")",
";",
"}"
] | Get property value by name.
@param name property name
@return value as string | [
"Get",
"property",
"value",
"by",
"name",
"."
] | 584167b25ac7ae0559c6e3cdd300b8a02e59b00b | https://github.com/qmetric/halreader/blob/584167b25ac7ae0559c6e3cdd300b8a02e59b00b/src/main/java/com/qmetric/hal/reader/HalResource.java#L86-L89 |
149,829 | qmetric/halreader | src/main/java/com/qmetric/hal/reader/HalResource.java | HalResource.getResourceAsObject | public <T> T getResourceAsObject(final TypeToken<T> type)
{
try
{
//noinspection unchecked
return (T) objectMapper.readValue(((ContentRepresentation) getUnderlyingRepresentation()).getContent(), objectMapper.constructType(type.getType()));
}
catch (IOException... | java | public <T> T getResourceAsObject(final TypeToken<T> type)
{
try
{
//noinspection unchecked
return (T) objectMapper.readValue(((ContentRepresentation) getUnderlyingRepresentation()).getContent(), objectMapper.constructType(type.getType()));
}
catch (IOException... | [
"public",
"<",
"T",
">",
"T",
"getResourceAsObject",
"(",
"final",
"TypeToken",
"<",
"T",
">",
"type",
")",
"{",
"try",
"{",
"//noinspection unchecked",
"return",
"(",
"T",
")",
"objectMapper",
".",
"readValue",
"(",
"(",
"(",
"ContentRepresentation",
")",
... | Parse root resource as an object.
@param type Type
@return Object representation as an object | [
"Parse",
"root",
"resource",
"as",
"an",
"object",
"."
] | 584167b25ac7ae0559c6e3cdd300b8a02e59b00b | https://github.com/qmetric/halreader/blob/584167b25ac7ae0559c6e3cdd300b8a02e59b00b/src/main/java/com/qmetric/hal/reader/HalResource.java#L127-L139 |
149,830 | mlhartme/mork | src/main/java/net/oneandone/mork/scanner/Minimizer.java | Minimizer.setDistinct | private void setDistinct(int leftSi, int rightSi) {
IntArrayList tmp;
int pair;
int i, max;
tmp = distinct[leftSi][rightSi];
if (tmp != YES) {
distinct[leftSi][rightSi] = YES;
if (tmp != UNKNOWN) {
max = tmp.size();
for (i ... | java | private void setDistinct(int leftSi, int rightSi) {
IntArrayList tmp;
int pair;
int i, max;
tmp = distinct[leftSi][rightSi];
if (tmp != YES) {
distinct[leftSi][rightSi] = YES;
if (tmp != UNKNOWN) {
max = tmp.size();
for (i ... | [
"private",
"void",
"setDistinct",
"(",
"int",
"leftSi",
",",
"int",
"rightSi",
")",
"{",
"IntArrayList",
"tmp",
";",
"int",
"pair",
";",
"int",
"i",
",",
"max",
";",
"tmp",
"=",
"distinct",
"[",
"leftSi",
"]",
"[",
"rightSi",
"]",
";",
"if",
"(",
"... | Mark the pair to be distinct. Recursively marks depending pairs. | [
"Mark",
"the",
"pair",
"to",
"be",
"distinct",
".",
"Recursively",
"marks",
"depending",
"pairs",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/Minimizer.java#L237-L253 |
149,831 | mlhartme/mork | src/main/java/net/oneandone/mork/reflect/Constructor.java | Constructor.forClass | public static Selection forClass(Class cl) {
java.lang.reflect.Constructor[] constrs;
int i;
List<Function> lst;
Function fn;
lst = new ArrayList<Function>();
constrs = cl.getConstructors();
for (i = 0; i < constrs.length; i++) {
fn = create(constrs[i... | java | public static Selection forClass(Class cl) {
java.lang.reflect.Constructor[] constrs;
int i;
List<Function> lst;
Function fn;
lst = new ArrayList<Function>();
constrs = cl.getConstructors();
for (i = 0; i < constrs.length; i++) {
fn = create(constrs[i... | [
"public",
"static",
"Selection",
"forClass",
"(",
"Class",
"cl",
")",
"{",
"java",
".",
"lang",
".",
"reflect",
".",
"Constructor",
"[",
"]",
"constrs",
";",
"int",
"i",
";",
"List",
"<",
"Function",
">",
"lst",
";",
"Function",
"fn",
";",
"lst",
"="... | Gets all valid Constructors for the specified Class.
@param cl the clase whose constructors are searched
@return all valid Constructors found. | [
"Gets",
"all",
"valid",
"Constructors",
"for",
"the",
"specified",
"Class",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/reflect/Constructor.java#L56-L71 |
149,832 | mlhartme/mork | src/main/java/net/oneandone/mork/reflect/Constructor.java | Constructor.invoke | @Override
public Object invoke(Object[] vals) throws InvocationTargetException {
try {
return constr.newInstance(vals);
} catch (InvocationTargetException | IllegalArgumentException e) {
throw e;
} catch (IllegalAccessException e) {
// runtime exception, i... | java | @Override
public Object invoke(Object[] vals) throws InvocationTargetException {
try {
return constr.newInstance(vals);
} catch (InvocationTargetException | IllegalArgumentException e) {
throw e;
} catch (IllegalAccessException e) {
// runtime exception, i... | [
"@",
"Override",
"public",
"Object",
"invoke",
"(",
"Object",
"[",
"]",
"vals",
")",
"throws",
"InvocationTargetException",
"{",
"try",
"{",
"return",
"constr",
".",
"newInstance",
"(",
"vals",
")",
";",
"}",
"catch",
"(",
"InvocationTargetException",
"|",
"... | Invokes the Java constructor.
@param vals arguments to the Java constructor
@return the Object returned by the Java constructor | [
"Invokes",
"the",
"Java",
"constructor",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/reflect/Constructor.java#L136-L150 |
149,833 | mlhartme/mork | src/main/java/net/oneandone/mork/reflect/Constructor.java | Constructor.write | public static void write(ObjectOutput out, java.lang.reflect.Constructor constr) throws IOException {
Class cl;
if (constr == null) {
ClassRef.write(out, null);
} else {
cl = constr.getDeclaringClass();
ClassRef.write(out, cl);
ClassRef.writeClass... | java | public static void write(ObjectOutput out, java.lang.reflect.Constructor constr) throws IOException {
Class cl;
if (constr == null) {
ClassRef.write(out, null);
} else {
cl = constr.getDeclaringClass();
ClassRef.write(out, cl);
ClassRef.writeClass... | [
"public",
"static",
"void",
"write",
"(",
"ObjectOutput",
"out",
",",
"java",
".",
"lang",
".",
"reflect",
".",
"Constructor",
"constr",
")",
"throws",
"IOException",
"{",
"Class",
"cl",
";",
"if",
"(",
"constr",
"==",
"null",
")",
"{",
"ClassRef",
".",
... | Writes a Java Constructor.
@param out target to write to
@param constr the Java Construtor to be written | [
"Writes",
"a",
"Java",
"Constructor",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/reflect/Constructor.java#L180-L190 |
149,834 | mlhartme/mork | src/main/java/net/oneandone/mork/reflect/Constructor.java | Constructor.read | public static java.lang.reflect.Constructor read(ObjectInput in) throws ClassNotFoundException, IOException, NoSuchMethodException {
Class cl;
Class[] types;
cl = ClassRef.read(in);
if (cl == null) {
return null;
} else {
types = ClassRef.readClasses(in);... | java | public static java.lang.reflect.Constructor read(ObjectInput in) throws ClassNotFoundException, IOException, NoSuchMethodException {
Class cl;
Class[] types;
cl = ClassRef.read(in);
if (cl == null) {
return null;
} else {
types = ClassRef.readClasses(in);... | [
"public",
"static",
"java",
".",
"lang",
".",
"reflect",
".",
"Constructor",
"read",
"(",
"ObjectInput",
"in",
")",
"throws",
"ClassNotFoundException",
",",
"IOException",
",",
"NoSuchMethodException",
"{",
"Class",
"cl",
";",
"Class",
"[",
"]",
"types",
";",
... | Reads a Java Constructor.
@param in source to read from
@return the Java Constructor read | [
"Reads",
"a",
"Java",
"Constructor",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/reflect/Constructor.java#L197-L208 |
149,835 | eurekaclinical/javautil | src/main/java/org/arp/javautil/sql/DatabaseMetaDataWrapper.java | DatabaseMetaDataWrapper.isDatabaseCompatible | public boolean isDatabaseCompatible(String databaseProductNameRegex, DatabaseVersion minVersion, DatabaseVersion maxVersion) throws SQLException {
readMetaDataIfNeeded();
if (!this.databaseProductName.matches(databaseProductNameRegex)) {
return false;
}
return new VersionRan... | java | public boolean isDatabaseCompatible(String databaseProductNameRegex, DatabaseVersion minVersion, DatabaseVersion maxVersion) throws SQLException {
readMetaDataIfNeeded();
if (!this.databaseProductName.matches(databaseProductNameRegex)) {
return false;
}
return new VersionRan... | [
"public",
"boolean",
"isDatabaseCompatible",
"(",
"String",
"databaseProductNameRegex",
",",
"DatabaseVersion",
"minVersion",
",",
"DatabaseVersion",
"maxVersion",
")",
"throws",
"SQLException",
"{",
"readMetaDataIfNeeded",
"(",
")",
";",
"if",
"(",
"!",
"this",
".",
... | Compares database product name and version information to that reported
by the database.
@param databaseProductNameRegex a regular expression that the actual
database product name will match. Use a regular expression that is
unlikely to overlap with the product names of other database systems.
@param minVersion the ex... | [
"Compares",
"database",
"product",
"name",
"and",
"version",
"information",
"to",
"that",
"reported",
"by",
"the",
"database",
"."
] | 779bbc5bf096c75f8eed4f99ca45b99c1d44df43 | https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/sql/DatabaseMetaDataWrapper.java#L72-L79 |
149,836 | eurekaclinical/javautil | src/main/java/org/arp/javautil/sql/DatabaseMetaDataWrapper.java | DatabaseMetaDataWrapper.isDriverCompatible | public boolean isDriverCompatible(String driverName, DriverVersion minVersion, DriverVersion maxVersion) throws SQLException {
readMetaDataIfNeeded();
if (!this.driverName.equals(driverName)) {
return false;
}
return new VersionRange(minVersion, maxVersion).isWithinR... | java | public boolean isDriverCompatible(String driverName, DriverVersion minVersion, DriverVersion maxVersion) throws SQLException {
readMetaDataIfNeeded();
if (!this.driverName.equals(driverName)) {
return false;
}
return new VersionRange(minVersion, maxVersion).isWithinR... | [
"public",
"boolean",
"isDriverCompatible",
"(",
"String",
"driverName",
",",
"DriverVersion",
"minVersion",
",",
"DriverVersion",
"maxVersion",
")",
"throws",
"SQLException",
"{",
"readMetaDataIfNeeded",
"(",
")",
";",
"if",
"(",
"!",
"this",
".",
"driverName",
".... | Compares JDBC driver name and version information to that reported
by the driver.
@param driverName the expected driver name.
@param minVersion the expected minimum version, if any.
@param maxVersion the expected maximum version, if any.
@return whether the actual JDBC driver name and version match the
provided argume... | [
"Compares",
"JDBC",
"driver",
"name",
"and",
"version",
"information",
"to",
"that",
"reported",
"by",
"the",
"driver",
"."
] | 779bbc5bf096c75f8eed4f99ca45b99c1d44df43 | https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/sql/DatabaseMetaDataWrapper.java#L95-L102 |
149,837 | mlhartme/mork | examples/command/src/main/java/command/Declarations.java | Declarations.checkDuplicates | private void checkDuplicates() throws Failure {
int i;
Variable v;
String name;
for (i = 0; i < vars.length; i++) {
v = vars[i];
name = v.getName();
if (lookup(name) != v) {
throw new Failure("duplicate variable name: " + name);
... | java | private void checkDuplicates() throws Failure {
int i;
Variable v;
String name;
for (i = 0; i < vars.length; i++) {
v = vars[i];
name = v.getName();
if (lookup(name) != v) {
throw new Failure("duplicate variable name: " + name);
... | [
"private",
"void",
"checkDuplicates",
"(",
")",
"throws",
"Failure",
"{",
"int",
"i",
";",
"Variable",
"v",
";",
"String",
"name",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"vars",
".",
"length",
";",
"i",
"++",
")",
"{",
"v",
"=",
"vars",
... | Throws Failure if there are multiple variables with the same name. | [
"Throws",
"Failure",
"if",
"there",
"are",
"multiple",
"variables",
"with",
"the",
"same",
"name",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/examples/command/src/main/java/command/Declarations.java#L14-L26 |
149,838 | trustathsh/ifmapj | src/main/java/util/DateHelpers.java | DateHelpers.getUtcTimeAsIso8601 | public static String getUtcTimeAsIso8601(Calendar cal) {
try {
if (cal == null) {
return DatatypeFactory.newInstance().newXMLGregorianCalendar(
new GregorianCalendar(TimeZone.getTimeZone("UTC")))
.toXMLFormat().replaceAll("\\.[0-9]{3}", "");
}
GregorianCalendar suppliedDateCalendar =
ne... | java | public static String getUtcTimeAsIso8601(Calendar cal) {
try {
if (cal == null) {
return DatatypeFactory.newInstance().newXMLGregorianCalendar(
new GregorianCalendar(TimeZone.getTimeZone("UTC")))
.toXMLFormat().replaceAll("\\.[0-9]{3}", "");
}
GregorianCalendar suppliedDateCalendar =
ne... | [
"public",
"static",
"String",
"getUtcTimeAsIso8601",
"(",
"Calendar",
"cal",
")",
"{",
"try",
"{",
"if",
"(",
"cal",
"==",
"null",
")",
"{",
"return",
"DatatypeFactory",
".",
"newInstance",
"(",
")",
".",
"newXMLGregorianCalendar",
"(",
"new",
"GregorianCalend... | Formats the given Calendar to an ISO-8601 compliant string
without milliseconds.
@param cal the java.util.Calendar to convert
@return date and time as UTC ISO-8601 string representation. | [
"Formats",
"the",
"given",
"Calendar",
"to",
"an",
"ISO",
"-",
"8601",
"compliant",
"string",
"without",
"milliseconds",
"."
] | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/util/DateHelpers.java#L73-L92 |
149,839 | io7m/jcanephora | com.io7m.jcanephora.profiler/src/main/java/com/io7m/jcanephora/profiler/JCGLProfiling.java | JCGLProfiling.startFrame | @Override
public JCGLProfilingFrameType startFrame()
{
final Frame f = this.frames[this.frame_index];
f.start();
this.frame_index = (this.frame_index + 1) % this.frames.length;
return f;
} | java | @Override
public JCGLProfilingFrameType startFrame()
{
final Frame f = this.frames[this.frame_index];
f.start();
this.frame_index = (this.frame_index + 1) % this.frames.length;
return f;
} | [
"@",
"Override",
"public",
"JCGLProfilingFrameType",
"startFrame",
"(",
")",
"{",
"final",
"Frame",
"f",
"=",
"this",
".",
"frames",
"[",
"this",
".",
"frame_index",
"]",
";",
"f",
".",
"start",
"(",
")",
";",
"this",
".",
"frame_index",
"=",
"(",
"thi... | Start rendering a frame.
@return A new frame | [
"Start",
"rendering",
"a",
"frame",
"."
] | 0004c1744b7f0969841d04cd4fa693f402b10980 | https://github.com/io7m/jcanephora/blob/0004c1744b7f0969841d04cd4fa693f402b10980/com.io7m.jcanephora.profiler/src/main/java/com/io7m/jcanephora/profiler/JCGLProfiling.java#L78-L85 |
149,840 | io7m/jcanephora | com.io7m.jcanephora.profiler/src/main/java/com/io7m/jcanephora/profiler/JCGLProfiling.java | JCGLProfiling.trimContexts | @Override
public void trimContexts()
{
for (int index = 0; index < this.frames.length; ++index) {
final Frame f = this.frames[index];
f.trimRecursive();
}
this.frame_index = 0;
} | java | @Override
public void trimContexts()
{
for (int index = 0; index < this.frames.length; ++index) {
final Frame f = this.frames[index];
f.trimRecursive();
}
this.frame_index = 0;
} | [
"@",
"Override",
"public",
"void",
"trimContexts",
"(",
")",
"{",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"this",
".",
"frames",
".",
"length",
";",
"++",
"index",
")",
"{",
"final",
"Frame",
"f",
"=",
"this",
".",
"frames",
"[",
... | Trim any cached internal storage.
This is primarily useful because implementations are expected to reuse a
lot of data structures internally (because the graph of renderers and
filters being profiled rarely changes). | [
"Trim",
"any",
"cached",
"internal",
"storage",
"."
] | 0004c1744b7f0969841d04cd4fa693f402b10980 | https://github.com/io7m/jcanephora/blob/0004c1744b7f0969841d04cd4fa693f402b10980/com.io7m.jcanephora.profiler/src/main/java/com/io7m/jcanephora/profiler/JCGLProfiling.java#L94-L103 |
149,841 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/Code.java | Code.layout | private void layout(Output dest) {
Instruction instr;
int instrSize, varSize;
IntArrayList vars; // indexes of instructions with variable length
IntArrayList lens; // lengths of var-len instructions
int i, j, k, ofs;
int shrink, len;
boolean changes;
in... | java | private void layout(Output dest) {
Instruction instr;
int instrSize, varSize;
IntArrayList vars; // indexes of instructions with variable length
IntArrayList lens; // lengths of var-len instructions
int i, j, k, ofs;
int shrink, len;
boolean changes;
in... | [
"private",
"void",
"layout",
"(",
"Output",
"dest",
")",
"{",
"Instruction",
"instr",
";",
"int",
"instrSize",
",",
"varSize",
";",
"IntArrayList",
"vars",
";",
"// indexes of instructions with variable length",
"IntArrayList",
"lens",
";",
"// lengths of var-len instru... | compute ofs for all instructions. | [
"compute",
"ofs",
"for",
"all",
"instructions",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/Code.java#L162-L208 |
149,842 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/Code.java | Code.resolveLabel | public int resolveLabel(int idx) {
int trueIdx;
if (idx < 0) {
trueIdx = labels.get(-idx);
if (trueIdx < 0) {
throw new RuntimeException("undefined label: " + idx);
}
return trueIdx;
} else {
return idx;
}
} | java | public int resolveLabel(int idx) {
int trueIdx;
if (idx < 0) {
trueIdx = labels.get(-idx);
if (trueIdx < 0) {
throw new RuntimeException("undefined label: " + idx);
}
return trueIdx;
} else {
return idx;
}
} | [
"public",
"int",
"resolveLabel",
"(",
"int",
"idx",
")",
"{",
"int",
"trueIdx",
";",
"if",
"(",
"idx",
"<",
"0",
")",
"{",
"trueIdx",
"=",
"labels",
".",
"get",
"(",
"-",
"idx",
")",
";",
"if",
"(",
"trueIdx",
"<",
"0",
")",
"{",
"throw",
"new"... | a forward reference is first declared and then defined | [
"a",
"forward",
"reference",
"is",
"first",
"declared",
"and",
"then",
"defined"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/Code.java#L267-L279 |
149,843 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/Code.java | Code.emitGeneric | public void emitGeneric(int opcode, Object[] args) {
Instruction instr;
InstructionType type;
type = Set.TYPES[opcode];
instr = new Instruction(-1, type, args);
instructions.add(instr);
} | java | public void emitGeneric(int opcode, Object[] args) {
Instruction instr;
InstructionType type;
type = Set.TYPES[opcode];
instr = new Instruction(-1, type, args);
instructions.add(instr);
} | [
"public",
"void",
"emitGeneric",
"(",
"int",
"opcode",
",",
"Object",
"[",
"]",
"args",
")",
"{",
"Instruction",
"instr",
";",
"InstructionType",
"type",
";",
"type",
"=",
"Set",
".",
"TYPES",
"[",
"opcode",
"]",
";",
"instr",
"=",
"new",
"Instruction",
... | pc is increased by 1. | [
"pc",
"is",
"increased",
"by",
"1",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/Code.java#L330-L337 |
149,844 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/Code.java | Code.calcStackSize | private int calcStackSize() {
int i, max;
int result;
int[] startStack;
ExceptionInfo e;
int tmp;
int unreachable;
IntBitSet todo;
List<Jsr> jsrs;
jsrs = Jsr.findJsrs(this);
startStack = new int[instructions.size()];
for (i = 0; i ... | java | private int calcStackSize() {
int i, max;
int result;
int[] startStack;
ExceptionInfo e;
int tmp;
int unreachable;
IntBitSet todo;
List<Jsr> jsrs;
jsrs = Jsr.findJsrs(this);
startStack = new int[instructions.size()];
for (i = 0; i ... | [
"private",
"int",
"calcStackSize",
"(",
")",
"{",
"int",
"i",
",",
"max",
";",
"int",
"result",
";",
"int",
"[",
"]",
"startStack",
";",
"ExceptionInfo",
"e",
";",
"int",
"tmp",
";",
"int",
"unreachable",
";",
"IntBitSet",
"todo",
";",
"List",
"<",
"... | computed the stack size | [
"computed",
"the",
"stack",
"size"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/Code.java#L431-L477 |
149,845 | seedstack/jms-addon | src/main/java/org/seedstack/jms/internal/JmsPlugin.java | JmsPlugin.registerConnection | public void registerConnection(Connection connection, ConnectionDefinition connectionDefinition) {
checkNotNull(connection);
checkNotNull(connectionDefinition);
if (this.connectionDefinitions.putIfAbsent(connectionDefinition.getName(), connectionDefinition) != null) {
throw SeedExce... | java | public void registerConnection(Connection connection, ConnectionDefinition connectionDefinition) {
checkNotNull(connection);
checkNotNull(connectionDefinition);
if (this.connectionDefinitions.putIfAbsent(connectionDefinition.getName(), connectionDefinition) != null) {
throw SeedExce... | [
"public",
"void",
"registerConnection",
"(",
"Connection",
"connection",
",",
"ConnectionDefinition",
"connectionDefinition",
")",
"{",
"checkNotNull",
"(",
"connection",
")",
";",
"checkNotNull",
"(",
"connectionDefinition",
")",
";",
"if",
"(",
"this",
".",
"conne... | Register an existing JMS connection to be managed by the JMS plugin.
@param connection the connection.
@param connectionDefinition the connection definition. | [
"Register",
"an",
"existing",
"JMS",
"connection",
"to",
"be",
"managed",
"by",
"the",
"JMS",
"plugin",
"."
] | d6014811daaac29f591b32bfd2358500fb25d804 | https://github.com/seedstack/jms-addon/blob/d6014811daaac29f591b32bfd2358500fb25d804/src/main/java/org/seedstack/jms/internal/JmsPlugin.java#L299-L318 |
149,846 | seedstack/jms-addon | src/main/java/org/seedstack/jms/internal/JmsPlugin.java | JmsPlugin.registerMessageListener | public void registerMessageListener(MessageListenerDefinition messageListenerDefinition) {
checkNotNull(messageListenerDefinition);
ConnectionDefinition connectionDefinition = connectionDefinitions.get(messageListenerDefinition.getConnectionName());
if (connectionDefinition.isJeeMode() && messa... | java | public void registerMessageListener(MessageListenerDefinition messageListenerDefinition) {
checkNotNull(messageListenerDefinition);
ConnectionDefinition connectionDefinition = connectionDefinitions.get(messageListenerDefinition.getConnectionName());
if (connectionDefinition.isJeeMode() && messa... | [
"public",
"void",
"registerMessageListener",
"(",
"MessageListenerDefinition",
"messageListenerDefinition",
")",
"{",
"checkNotNull",
"(",
"messageListenerDefinition",
")",
";",
"ConnectionDefinition",
"connectionDefinition",
"=",
"connectionDefinitions",
".",
"get",
"(",
"me... | Register a message listener definition to be managed by the JMS plugin.
@param messageListenerDefinition the message listener definition. | [
"Register",
"a",
"message",
"listener",
"definition",
"to",
"be",
"managed",
"by",
"the",
"JMS",
"plugin",
"."
] | d6014811daaac29f591b32bfd2358500fb25d804 | https://github.com/seedstack/jms-addon/blob/d6014811daaac29f591b32bfd2358500fb25d804/src/main/java/org/seedstack/jms/internal/JmsPlugin.java#L325-L346 |
149,847 | lukas-krecan/lambda-param-name-extractor | src/main/java/net/javacrumbs/lambdaextractor/ParameterNameExtractor.java | ParameterNameExtractor.extractParameterNames | public static List<String> extractParameterNames(Serializable lambda, int lambdaParametersCount) {
SerializedLambda serializedLambda = serialized(lambda);
Method lambdaMethod = lambdaMethod(serializedLambda);
String[] paramNames = paramNameReader.getParamNames(lambdaMethod);
return asLi... | java | public static List<String> extractParameterNames(Serializable lambda, int lambdaParametersCount) {
SerializedLambda serializedLambda = serialized(lambda);
Method lambdaMethod = lambdaMethod(serializedLambda);
String[] paramNames = paramNameReader.getParamNames(lambdaMethod);
return asLi... | [
"public",
"static",
"List",
"<",
"String",
">",
"extractParameterNames",
"(",
"Serializable",
"lambda",
",",
"int",
"lambdaParametersCount",
")",
"{",
"SerializedLambda",
"serializedLambda",
"=",
"serialized",
"(",
"lambda",
")",
";",
"Method",
"lambdaMethod",
"=",
... | Extracts names of a serializable lambda parameters
@param lambda Serializable lambda
@param lambdaParametersCount number of lambda parameters | [
"Extracts",
"names",
"of",
"a",
"serializable",
"lambda",
"parameters"
] | dec73479df14797771c8ec92819577f32a679362 | https://github.com/lukas-krecan/lambda-param-name-extractor/blob/dec73479df14797771c8ec92819577f32a679362/src/main/java/net/javacrumbs/lambdaextractor/ParameterNameExtractor.java#L47-L53 |
149,848 | Metrink/croquet | croquet-core/src/main/java/com/metrink/croquet/AbstractSettings.java | AbstractSettings.initialize | protected final void initialize() {
// Enabling development mode forces these settings. This is somewhat inelegant, because to configure one of
// these values differently will require disabling development mode and manually configure the remaining values.
if (development) {
loggingS... | java | protected final void initialize() {
// Enabling development mode forces these settings. This is somewhat inelegant, because to configure one of
// these values differently will require disabling development mode and manually configure the remaining values.
if (development) {
loggingS... | [
"protected",
"final",
"void",
"initialize",
"(",
")",
"{",
"// Enabling development mode forces these settings. This is somewhat inelegant, because to configure one of",
"// these values differently will require disabling development mode and manually configure the remaining values.",
"if",
"(",... | Perform post de-serialization modification of the Settings. | [
"Perform",
"post",
"de",
"-",
"serialization",
"modification",
"of",
"the",
"Settings",
"."
] | 1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b | https://github.com/Metrink/croquet/blob/1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b/croquet-core/src/main/java/com/metrink/croquet/AbstractSettings.java#L40-L50 |
149,849 | Metrink/croquet | croquet-core/src/main/java/com/metrink/croquet/AbstractSettings.java | AbstractSettings.getClassOrDefault | @SuppressWarnings("unchecked")
protected <T> Class<T> getClassOrDefault(final String className, final Class<T> defaultResult) {
try {
return className == null
? defaultResult
: (Class<T>)Class.forName(className);
} catch (final ClassNotFoundExcepti... | java | @SuppressWarnings("unchecked")
protected <T> Class<T> getClassOrDefault(final String className, final Class<T> defaultResult) {
try {
return className == null
? defaultResult
: (Class<T>)Class.forName(className);
} catch (final ClassNotFoundExcepti... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"<",
"T",
">",
"Class",
"<",
"T",
">",
"getClassOrDefault",
"(",
"final",
"String",
"className",
",",
"final",
"Class",
"<",
"T",
">",
"defaultResult",
")",
"{",
"try",
"{",
"return",
"classN... | Helper method used to obtain a class from a fully qualified class name. If the value is null or an exception is
thrown, return the default result instead.
@param className the fully qualified class name to try
@param defaultResult the nullable default result
@param <T> the class type
@return the class or null | [
"Helper",
"method",
"used",
"to",
"obtain",
"a",
"class",
"from",
"a",
"fully",
"qualified",
"class",
"name",
".",
"If",
"the",
"value",
"is",
"null",
"or",
"an",
"exception",
"is",
"thrown",
"return",
"the",
"default",
"result",
"instead",
"."
] | 1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b | https://github.com/Metrink/croquet/blob/1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b/croquet-core/src/main/java/com/metrink/croquet/AbstractSettings.java#L65-L75 |
149,850 | eurekaclinical/eurekaclinical-standard-apis | src/main/java/org/eurekaclinical/standardapis/dao/GenericDao.java | GenericDao.getAll | @Override
public List<T> getAll(int firstResult, int maxResults) {
return getDatabaseSupport().getAll(getEntityClass(), firstResult, maxResults);
} | java | @Override
public List<T> getAll(int firstResult, int maxResults) {
return getDatabaseSupport().getAll(getEntityClass(), firstResult, maxResults);
} | [
"@",
"Override",
"public",
"List",
"<",
"T",
">",
"getAll",
"(",
"int",
"firstResult",
",",
"int",
"maxResults",
")",
"{",
"return",
"getDatabaseSupport",
"(",
")",
".",
"getAll",
"(",
"getEntityClass",
"(",
")",
",",
"firstResult",
",",
"maxResults",
")",... | Gets all of this DAO's entities.
@return a list of entities. Guaranteed not <code>null</code>. | [
"Gets",
"all",
"of",
"this",
"DAO",
"s",
"entities",
"."
] | 690036dde82a4f2c2106d32403cdf1c713429377 | https://github.com/eurekaclinical/eurekaclinical-standard-apis/blob/690036dde82a4f2c2106d32403cdf1c713429377/src/main/java/org/eurekaclinical/standardapis/dao/GenericDao.java#L166-L169 |
149,851 | eurekaclinical/eurekaclinical-standard-apis | src/main/java/org/eurekaclinical/standardapis/dao/GenericDao.java | GenericDao.getListAsc | protected List<T> getListAsc(SingularAttribute<T, ?> attribute) {
EntityManager entityManager = this.getEntityManager();
CriteriaBuilder builder = entityManager.getCriteriaBuilder();
CriteriaQuery<T> criteriaQuery = builder.createQuery(getEntityClass());
Root<T> root = criteriaQuery.from... | java | protected List<T> getListAsc(SingularAttribute<T, ?> attribute) {
EntityManager entityManager = this.getEntityManager();
CriteriaBuilder builder = entityManager.getCriteriaBuilder();
CriteriaQuery<T> criteriaQuery = builder.createQuery(getEntityClass());
Root<T> root = criteriaQuery.from... | [
"protected",
"List",
"<",
"T",
">",
"getListAsc",
"(",
"SingularAttribute",
"<",
"T",
",",
"?",
">",
"attribute",
")",
"{",
"EntityManager",
"entityManager",
"=",
"this",
".",
"getEntityManager",
"(",
")",
";",
"CriteriaBuilder",
"builder",
"=",
"entityManager... | Gets all of this DAO's entities ordered by the provided attribute in
ascending order.
@param attribute the attribute to order by.
@return an ordered list of entities. Guaranteed not <code>null</code>. | [
"Gets",
"all",
"of",
"this",
"DAO",
"s",
"entities",
"ordered",
"by",
"the",
"provided",
"attribute",
"in",
"ascending",
"order",
"."
] | 690036dde82a4f2c2106d32403cdf1c713429377 | https://github.com/eurekaclinical/eurekaclinical-standard-apis/blob/690036dde82a4f2c2106d32403cdf1c713429377/src/main/java/org/eurekaclinical/standardapis/dao/GenericDao.java#L179-L186 |
149,852 | eurekaclinical/eurekaclinical-standard-apis | src/main/java/org/eurekaclinical/standardapis/dao/GenericDao.java | GenericDao.getListByAttribute | protected <Y> List<T> getListByAttribute(SingularAttribute<T, Y> attribute, Y value) {
return getDatabaseSupport().getListByAttribute(getEntityClass(), attribute, value);
} | java | protected <Y> List<T> getListByAttribute(SingularAttribute<T, Y> attribute, Y value) {
return getDatabaseSupport().getListByAttribute(getEntityClass(), attribute, value);
} | [
"protected",
"<",
"Y",
">",
"List",
"<",
"T",
">",
"getListByAttribute",
"(",
"SingularAttribute",
"<",
"T",
",",
"Y",
">",
"attribute",
",",
"Y",
"value",
")",
"{",
"return",
"getDatabaseSupport",
"(",
")",
".",
"getListByAttribute",
"(",
"getEntityClass",
... | Gets the entities that have the target value of the specified attribute.
@param <Y> the type of the attribute and target value.
@param attribute the attribute of the entity to compare.
@param value the target value of the given attribute.
@return the matching entities. Guaranteed not <code>null</code>. | [
"Gets",
"the",
"entities",
"that",
"have",
"the",
"target",
"value",
"of",
"the",
"specified",
"attribute",
"."
] | 690036dde82a4f2c2106d32403cdf1c713429377 | https://github.com/eurekaclinical/eurekaclinical-standard-apis/blob/690036dde82a4f2c2106d32403cdf1c713429377/src/main/java/org/eurekaclinical/standardapis/dao/GenericDao.java#L254-L256 |
149,853 | eurekaclinical/eurekaclinical-standard-apis | src/main/java/org/eurekaclinical/standardapis/dao/GenericDao.java | GenericDao.getListByAttributeIn | protected <Y> List<T> getListByAttributeIn(SingularAttribute<T, Y> attribute, List<Y> values) {
return getDatabaseSupport().getListByAttributeIn(getEntityClass(), attribute, values);
} | java | protected <Y> List<T> getListByAttributeIn(SingularAttribute<T, Y> attribute, List<Y> values) {
return getDatabaseSupport().getListByAttributeIn(getEntityClass(), attribute, values);
} | [
"protected",
"<",
"Y",
">",
"List",
"<",
"T",
">",
"getListByAttributeIn",
"(",
"SingularAttribute",
"<",
"T",
",",
"Y",
">",
"attribute",
",",
"List",
"<",
"Y",
">",
"values",
")",
"{",
"return",
"getDatabaseSupport",
"(",
")",
".",
"getListByAttributeIn"... | Gets the entities that have any of the target values of the specified
attribute.
@param <Y> the type of the attribute and target value.
@param attribute the attribute of the entity to compare.
@param values the target values of the given attribute.
@return the matching entities. Guaranteed not <code>null</code>. | [
"Gets",
"the",
"entities",
"that",
"have",
"any",
"of",
"the",
"target",
"values",
"of",
"the",
"specified",
"attribute",
"."
] | 690036dde82a4f2c2106d32403cdf1c713429377 | https://github.com/eurekaclinical/eurekaclinical-standard-apis/blob/690036dde82a4f2c2106d32403cdf1c713429377/src/main/java/org/eurekaclinical/standardapis/dao/GenericDao.java#L287-L289 |
149,854 | dhemery/hartley | src/main/java/com/dhemery/expressing/Expressive.java | Expressive.the | public boolean the(Condition condition, Ticker ticker) {
try {
poll(ticker, condition);
return true;
} catch (PollTimeoutException ignored) {
return false;
}
} | java | public boolean the(Condition condition, Ticker ticker) {
try {
poll(ticker, condition);
return true;
} catch (PollTimeoutException ignored) {
return false;
}
} | [
"public",
"boolean",
"the",
"(",
"Condition",
"condition",
",",
"Ticker",
"ticker",
")",
"{",
"try",
"{",
"poll",
"(",
"ticker",
",",
"condition",
")",
";",
"return",
"true",
";",
"}",
"catch",
"(",
"PollTimeoutException",
"ignored",
")",
"{",
"return",
... | Report whether the condition is satisfied during a poll. | [
"Report",
"whether",
"the",
"condition",
"is",
"satisfied",
"during",
"a",
"poll",
"."
] | 7754bd6bc12695f2249601b8890da530a61fcf33 | https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/expressing/Expressive.java#L136-L143 |
149,855 | dhemery/hartley | src/main/java/com/dhemery/expressing/Expressive.java | Expressive.the | public <V> boolean the(Sampler<V> variable, Ticker ticker, Matcher<? super V> criteria) {
return the(sampleOf(variable, criteria), ticker);
} | java | public <V> boolean the(Sampler<V> variable, Ticker ticker, Matcher<? super V> criteria) {
return the(sampleOf(variable, criteria), ticker);
} | [
"public",
"<",
"V",
">",
"boolean",
"the",
"(",
"Sampler",
"<",
"V",
">",
"variable",
",",
"Ticker",
"ticker",
",",
"Matcher",
"<",
"?",
"super",
"V",
">",
"criteria",
")",
"{",
"return",
"the",
"(",
"sampleOf",
"(",
"variable",
",",
"criteria",
")",... | Report whether a polled sample of the variable satisfies the criteria. | [
"Report",
"whether",
"a",
"polled",
"sample",
"of",
"the",
"variable",
"satisfies",
"the",
"criteria",
"."
] | 7754bd6bc12695f2249601b8890da530a61fcf33 | https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/expressing/Expressive.java#L148-L150 |
149,856 | dhemery/hartley | src/main/java/com/dhemery/expressing/Expressive.java | Expressive.waitUntil | public <V> void waitUntil(Sampler<V> variable, Matcher<? super V> criteria) {
waitUntil(variable, eventually(), criteria);
} | java | public <V> void waitUntil(Sampler<V> variable, Matcher<? super V> criteria) {
waitUntil(variable, eventually(), criteria);
} | [
"public",
"<",
"V",
">",
"void",
"waitUntil",
"(",
"Sampler",
"<",
"V",
">",
"variable",
",",
"Matcher",
"<",
"?",
"super",
"V",
">",
"criteria",
")",
"{",
"waitUntil",
"(",
"variable",
",",
"eventually",
"(",
")",
",",
"criteria",
")",
";",
"}"
] | Wait until a polled sample of the variable satisfies the criteria.
Uses a default ticker. | [
"Wait",
"until",
"a",
"polled",
"sample",
"of",
"the",
"variable",
"satisfies",
"the",
"criteria",
".",
"Uses",
"a",
"default",
"ticker",
"."
] | 7754bd6bc12695f2249601b8890da530a61fcf33 | https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/expressing/Expressive.java#L192-L194 |
149,857 | dhemery/hartley | src/main/java/com/dhemery/expressing/Expressive.java | Expressive.waitUntil | public void waitUntil(Sampler<Boolean> variable, Ticker ticker) {
waitUntil(variable, ticker, isQuietlyTrue());
} | java | public void waitUntil(Sampler<Boolean> variable, Ticker ticker) {
waitUntil(variable, ticker, isQuietlyTrue());
} | [
"public",
"void",
"waitUntil",
"(",
"Sampler",
"<",
"Boolean",
">",
"variable",
",",
"Ticker",
"ticker",
")",
"{",
"waitUntil",
"(",
"variable",
",",
"ticker",
",",
"isQuietlyTrue",
"(",
")",
")",
";",
"}"
] | Wait until a polled sample of the variable is [@code true). | [
"Wait",
"until",
"a",
"polled",
"sample",
"of",
"the",
"variable",
"is",
"["
] | 7754bd6bc12695f2249601b8890da530a61fcf33 | https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/expressing/Expressive.java#L214-L216 |
149,858 | dhemery/hartley | src/main/java/com/dhemery/expressing/Expressive.java | Expressive.when | public <S,V> S when(S subject, Feature<? super S, V> feature, Matcher<? super V> criteria) {
return when(subject, feature, eventually(), criteria);
} | java | public <S,V> S when(S subject, Feature<? super S, V> feature, Matcher<? super V> criteria) {
return when(subject, feature, eventually(), criteria);
} | [
"public",
"<",
"S",
",",
"V",
">",
"S",
"when",
"(",
"S",
"subject",
",",
"Feature",
"<",
"?",
"super",
"S",
",",
"V",
">",
"feature",
",",
"Matcher",
"<",
"?",
"super",
"V",
">",
"criteria",
")",
"{",
"return",
"when",
"(",
"subject",
",",
"fe... | Return the subject when a polled sample of the feature satisfies the criteria.
Uses a default ticker. | [
"Return",
"the",
"subject",
"when",
"a",
"polled",
"sample",
"of",
"the",
"feature",
"satisfies",
"the",
"criteria",
".",
"Uses",
"a",
"default",
"ticker",
"."
] | 7754bd6bc12695f2249601b8890da530a61fcf33 | https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/expressing/Expressive.java#L252-L254 |
149,859 | dhemery/hartley | src/main/java/com/dhemery/expressing/Expressive.java | Expressive.when | public <S,V> void when(S subject, Feature<? super S, V> feature, Ticker ticker, Matcher<? super V> criteria, Action<? super S> action) {
waitUntil(subject, feature, ticker, criteria);
action.actOn(subject);
} | java | public <S,V> void when(S subject, Feature<? super S, V> feature, Ticker ticker, Matcher<? super V> criteria, Action<? super S> action) {
waitUntil(subject, feature, ticker, criteria);
action.actOn(subject);
} | [
"public",
"<",
"S",
",",
"V",
">",
"void",
"when",
"(",
"S",
"subject",
",",
"Feature",
"<",
"?",
"super",
"S",
",",
"V",
">",
"feature",
",",
"Ticker",
"ticker",
",",
"Matcher",
"<",
"?",
"super",
"V",
">",
"criteria",
",",
"Action",
"<",
"?",
... | Act on the subject when a polled sample of the feature satisfies the criteria. | [
"Act",
"on",
"the",
"subject",
"when",
"a",
"polled",
"sample",
"of",
"the",
"feature",
"satisfies",
"the",
"criteria",
"."
] | 7754bd6bc12695f2249601b8890da530a61fcf33 | https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/expressing/Expressive.java#L298-L301 |
149,860 | likethecolor/Alchemy-API | src/main/java/com/likethecolor/alchemy/api/entity/DisambiguatedAlchemyEntity.java | DisambiguatedAlchemyEntity.setLatitude | public void setLatitude(final String latitude) {
if(StringUtils.isBlank(latitude)) {
return;
}
try {
setLatitude(Double.parseDouble(latitude.trim()));
}
catch(Exception e) {
// nothing is set
}
} | java | public void setLatitude(final String latitude) {
if(StringUtils.isBlank(latitude)) {
return;
}
try {
setLatitude(Double.parseDouble(latitude.trim()));
}
catch(Exception e) {
// nothing is set
}
} | [
"public",
"void",
"setLatitude",
"(",
"final",
"String",
"latitude",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"latitude",
")",
")",
"{",
"return",
";",
"}",
"try",
"{",
"setLatitude",
"(",
"Double",
".",
"parseDouble",
"(",
"latitude",
".... | Set the latitude.
@param latitude latitude
@see #setGeo(String) | [
"Set",
"the",
"latitude",
"."
] | 5208cfc92a878ceeaff052787af29da92d98db7e | https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/entity/DisambiguatedAlchemyEntity.java#L284-L294 |
149,861 | likethecolor/Alchemy-API | src/main/java/com/likethecolor/alchemy/api/entity/DisambiguatedAlchemyEntity.java | DisambiguatedAlchemyEntity.setLongitude | public void setLongitude(final String longitude) {
if(StringUtils.isBlank(longitude)) {
return;
}
try {
setLongitude(Double.parseDouble(longitude.trim()));
}
catch(Exception e) {
// nothing is set
}
} | java | public void setLongitude(final String longitude) {
if(StringUtils.isBlank(longitude)) {
return;
}
try {
setLongitude(Double.parseDouble(longitude.trim()));
}
catch(Exception e) {
// nothing is set
}
} | [
"public",
"void",
"setLongitude",
"(",
"final",
"String",
"longitude",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"longitude",
")",
")",
"{",
"return",
";",
"}",
"try",
"{",
"setLongitude",
"(",
"Double",
".",
"parseDouble",
"(",
"longitude",... | Set the longitude.
@param longitude longitude
@see #setGeo(String) | [
"Set",
"the",
"longitude",
"."
] | 5208cfc92a878ceeaff052787af29da92d98db7e | https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/entity/DisambiguatedAlchemyEntity.java#L323-L333 |
149,862 | likethecolor/Alchemy-API | src/main/java/com/likethecolor/alchemy/api/entity/DisambiguatedAlchemyEntity.java | DisambiguatedAlchemyEntity.addSubtype | public void addSubtype(String subtype) {
if(!StringUtils.isBlank(subtype) && !subtypes.contains(subtype.trim())) {
subtypes.add(subtype.trim());
}
} | java | public void addSubtype(String subtype) {
if(!StringUtils.isBlank(subtype) && !subtypes.contains(subtype.trim())) {
subtypes.add(subtype.trim());
}
} | [
"public",
"void",
"addSubtype",
"(",
"String",
"subtype",
")",
"{",
"if",
"(",
"!",
"StringUtils",
".",
"isBlank",
"(",
"subtype",
")",
"&&",
"!",
"subtypes",
".",
"contains",
"(",
"subtype",
".",
"trim",
"(",
")",
")",
")",
"{",
"subtypes",
".",
"ad... | Set the disambiguated entity subType. SubTypes expose additional
ontological mappings for a detected entity, such as identification of a
Person as a Politician or Athlete.
@param subtype disambiguated entity subType | [
"Set",
"the",
"disambiguated",
"entity",
"subType",
".",
"SubTypes",
"expose",
"additional",
"ontological",
"mappings",
"for",
"a",
"detected",
"entity",
"such",
"as",
"identification",
"of",
"a",
"Person",
"as",
"a",
"Politician",
"or",
"Athlete",
"."
] | 5208cfc92a878ceeaff052787af29da92d98db7e | https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/entity/DisambiguatedAlchemyEntity.java#L443-L447 |
149,863 | likethecolor/Alchemy-API | src/main/java/com/likethecolor/alchemy/api/entity/DisambiguatedAlchemyEntity.java | DisambiguatedAlchemyEntity.setWebsite | public void setWebsite(String website) {
if(website != null) {
website = website.trim();
}
this.website = website;
} | java | public void setWebsite(String website) {
if(website != null) {
website = website.trim();
}
this.website = website;
} | [
"public",
"void",
"setWebsite",
"(",
"String",
"website",
")",
"{",
"if",
"(",
"website",
"!=",
"null",
")",
"{",
"website",
"=",
"website",
".",
"trim",
"(",
")",
";",
"}",
"this",
".",
"website",
"=",
"website",
";",
"}"
] | Set the website associated with this concept tag.
@param website website associated with this concept tag | [
"Set",
"the",
"website",
"associated",
"with",
"this",
"concept",
"tag",
"."
] | 5208cfc92a878ceeaff052787af29da92d98db7e | https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/entity/DisambiguatedAlchemyEntity.java#L497-L502 |
149,864 | mlhartme/mork | src/main/java/net/oneandone/mork/grammar/Ebnf.java | Ebnf.translate | public static Grammar translate(Rule[] rules, StringArrayList symbolTable) throws ActionException {
int i;
Ebnf builder;
Grammar tmp;
Grammar buffer;
int firstHelper;
int lastHelper;
firstHelper = symbolTable.size();
buffer = new Grammar(rules[0].getLeft(... | java | public static Grammar translate(Rule[] rules, StringArrayList symbolTable) throws ActionException {
int i;
Ebnf builder;
Grammar tmp;
Grammar buffer;
int firstHelper;
int lastHelper;
firstHelper = symbolTable.size();
buffer = new Grammar(rules[0].getLeft(... | [
"public",
"static",
"Grammar",
"translate",
"(",
"Rule",
"[",
"]",
"rules",
",",
"StringArrayList",
"symbolTable",
")",
"throws",
"ActionException",
"{",
"int",
"i",
";",
"Ebnf",
"builder",
";",
"Grammar",
"tmp",
";",
"Grammar",
"buffer",
";",
"int",
"firstH... | helper symbols are added without gaps, starting with freeHelper. | [
"helper",
"symbols",
"are",
"added",
"without",
"gaps",
"starting",
"with",
"freeHelper",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/grammar/Ebnf.java#L30-L53 |
149,865 | mlhartme/mork | src/main/java/net/oneandone/mork/mapping/Mapper.java | Mapper.newInstance | public Mapper newInstance() {
Mapper mapper;
mapper = new Mapper(name, parser.newInstance(), oag.newInstance());
mapper.setLogging(logParsing, logAttribution);
return mapper;
} | java | public Mapper newInstance() {
Mapper mapper;
mapper = new Mapper(name, parser.newInstance(), oag.newInstance());
mapper.setLogging(logParsing, logAttribution);
return mapper;
} | [
"public",
"Mapper",
"newInstance",
"(",
")",
"{",
"Mapper",
"mapper",
";",
"mapper",
"=",
"new",
"Mapper",
"(",
"name",
",",
"parser",
".",
"newInstance",
"(",
")",
",",
"oag",
".",
"newInstance",
"(",
")",
")",
";",
"mapper",
".",
"setLogging",
"(",
... | Creates a new mapper instance.
Shares common data (esp. scanner and parser table with this instance. | [
"Creates",
"a",
"new",
"mapper",
"instance",
".",
"Shares",
"common",
"data",
"(",
"esp",
".",
"scanner",
"and",
"parser",
"table",
"with",
"this",
"instance",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/mapping/Mapper.java#L88-L94 |
149,866 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/Encrypter.java | Encrypter.decryptText | public synchronized String decryptText(String text) {
try {
// Mise en mode Decrypt
cipher.init(Cipher.DECRYPT_MODE, this.createDESSecretKey(stringKey));
// Obtention des bytes
byte[] encodedByteText = new Base64().decode(text);
// Decryption
byte[] byteText = cipher.doFinal(encodedBy... | java | public synchronized String decryptText(String text) {
try {
// Mise en mode Decrypt
cipher.init(Cipher.DECRYPT_MODE, this.createDESSecretKey(stringKey));
// Obtention des bytes
byte[] encodedByteText = new Base64().decode(text);
// Decryption
byte[] byteText = cipher.doFinal(encodedBy... | [
"public",
"synchronized",
"String",
"decryptText",
"(",
"String",
"text",
")",
"{",
"try",
"{",
"// Mise en mode Decrypt",
"cipher",
".",
"init",
"(",
"Cipher",
".",
"DECRYPT_MODE",
",",
"this",
".",
"createDESSecretKey",
"(",
"stringKey",
")",
")",
";",
"// O... | Methode de decryptage d'un texte
@param text Texte a decrypter
@return Texte decrypte | [
"Methode",
"de",
"decryptage",
"d",
"un",
"texte"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/Encrypter.java#L101-L122 |
149,867 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/Encrypter.java | Encrypter.encryptText | public synchronized String encryptText(String text) {
try {
// Mise en mode Encrypt
cipher.init(Cipher.ENCRYPT_MODE, this.createDESSecretKey(stringKey));
// Obtention des bytes
byte[] byteText = text.getBytes();
// Encodage
byte[] encodedByteText = cipher.doFinal(byteText);
// Reto... | java | public synchronized String encryptText(String text) {
try {
// Mise en mode Encrypt
cipher.init(Cipher.ENCRYPT_MODE, this.createDESSecretKey(stringKey));
// Obtention des bytes
byte[] byteText = text.getBytes();
// Encodage
byte[] encodedByteText = cipher.doFinal(byteText);
// Reto... | [
"public",
"synchronized",
"String",
"encryptText",
"(",
"String",
"text",
")",
"{",
"try",
"{",
"// Mise en mode Encrypt",
"cipher",
".",
"init",
"(",
"Cipher",
".",
"ENCRYPT_MODE",
",",
"this",
".",
"createDESSecretKey",
"(",
"stringKey",
")",
")",
";",
"// O... | Methode d'encryptage d'un texte
@param text Texte a encrypter
@return Texte encrypte | [
"Methode",
"d",
"encryptage",
"d",
"un",
"texte"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/Encrypter.java#L129-L149 |
149,868 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/Encrypter.java | Encrypter.hashText | public synchronized String hashText(String text) {
// Hachage du texte
return new Base64().encodeToString(digester.digest(text.getBytes()));
} | java | public synchronized String hashText(String text) {
// Hachage du texte
return new Base64().encodeToString(digester.digest(text.getBytes()));
} | [
"public",
"synchronized",
"String",
"hashText",
"(",
"String",
"text",
")",
"{",
"// Hachage du texte",
"return",
"new",
"Base64",
"(",
")",
".",
"encodeToString",
"(",
"digester",
".",
"digest",
"(",
"text",
".",
"getBytes",
"(",
")",
")",
")",
";",
"}"
] | Methode de hachage d'un texte
@param text Texte a hacher
@return Texte hache | [
"Methode",
"de",
"hachage",
"d",
"un",
"texte"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/Encrypter.java#L156-L160 |
149,869 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/Encrypter.java | Encrypter.createDESSecretKey | private SecretKey createDESSecretKey(String keytext){
try {
// Generation de la cle DES basees sur une mot de passe
DESKeySpec desKeySpec = new DESKeySpec(keytext.getBytes());
// On retourne la cle DES
return SecretKeyFactory.getInstance("DES").generateSecret(desKeySpec);
} catch (Excepti... | java | private SecretKey createDESSecretKey(String keytext){
try {
// Generation de la cle DES basees sur une mot de passe
DESKeySpec desKeySpec = new DESKeySpec(keytext.getBytes());
// On retourne la cle DES
return SecretKeyFactory.getInstance("DES").generateSecret(desKeySpec);
} catch (Excepti... | [
"private",
"SecretKey",
"createDESSecretKey",
"(",
"String",
"keytext",
")",
"{",
"try",
"{",
"// Generation de la cle DES basees sur une mot de passe",
"DESKeySpec",
"desKeySpec",
"=",
"new",
"DESKeySpec",
"(",
"keytext",
".",
"getBytes",
"(",
")",
")",
";",
"// On r... | Methode de generation de cle prives sur la base d'un mot de passe
@param keytext Texte cle
@return Cle secrete | [
"Methode",
"de",
"generation",
"de",
"cle",
"prives",
"sur",
"la",
"base",
"d",
"un",
"mot",
"de",
"passe"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/Encrypter.java#L167-L182 |
149,870 | eurekaclinical/datastore | src/main/java/org/eurekaclinical/datastore/bdb/BdbStoreShutdownHook.java | BdbStoreShutdownHook.shutdown | void shutdown() throws IOException {
synchronized (this) {
for (BdbEnvironmentInfo envInfo : this.envInfos) {
try {
envInfo.getClassCatalog().close();
} catch (DatabaseException ignore) {
LOGGER.log(Level.SEVERE, "Failure closin... | java | void shutdown() throws IOException {
synchronized (this) {
for (BdbEnvironmentInfo envInfo : this.envInfos) {
try {
envInfo.getClassCatalog().close();
} catch (DatabaseException ignore) {
LOGGER.log(Level.SEVERE, "Failure closin... | [
"void",
"shutdown",
"(",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"this",
")",
"{",
"for",
"(",
"BdbEnvironmentInfo",
"envInfo",
":",
"this",
".",
"envInfos",
")",
"{",
"try",
"{",
"envInfo",
".",
"getClassCatalog",
"(",
")",
".",
"close",
... | Cleanly shuts down all databases in the provided environment.
@throws IOException if a database delete attempt failed.
@throws DatabaseException if an error occurs while closing the class
catalog database. | [
"Cleanly",
"shuts",
"down",
"all",
"databases",
"in",
"the",
"provided",
"environment",
"."
] | a03a70819bb562ba45eac66ca49f778035ee45e0 | https://github.com/eurekaclinical/datastore/blob/a03a70819bb562ba45eac66ca49f778035ee45e0/src/main/java/org/eurekaclinical/datastore/bdb/BdbStoreShutdownHook.java#L72-L90 |
149,871 | eurekaclinical/datastore | src/main/java/org/eurekaclinical/datastore/bdb/BdbStoreShutdownHook.java | BdbStoreShutdownHook.run | @Override
public void run() {
try {
shutdown();
} catch (IOException ex) {
LOGGER.log(Level.SEVERE, "Error during shutdown", ex);
}
} | java | @Override
public void run() {
try {
shutdown();
} catch (IOException ex) {
LOGGER.log(Level.SEVERE, "Error during shutdown", ex);
}
} | [
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"shutdown",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"ex",
")",
"{",
"LOGGER",
".",
"log",
"(",
"Level",
".",
"SEVERE",
",",
"\"Error during shutdown\"",
",",
"ex",
")",
";"... | Runs the shutdown hook. | [
"Runs",
"the",
"shutdown",
"hook",
"."
] | a03a70819bb562ba45eac66ca49f778035ee45e0 | https://github.com/eurekaclinical/datastore/blob/a03a70819bb562ba45eac66ca49f778035ee45e0/src/main/java/org/eurekaclinical/datastore/bdb/BdbStoreShutdownHook.java#L95-L102 |
149,872 | eurekaclinical/javautil | src/main/java/org/arp/javautil/sql/DriverManagerConnectionSpec.java | DriverManagerConnectionSpec.getOrCreate | @Override
public Connection getOrCreate() throws SQLException {
Connection con = DriverManager.getConnection(this.url, this.user, this.password);
con.setAutoCommit(isAutoCommitEnabled());
return con;
} | java | @Override
public Connection getOrCreate() throws SQLException {
Connection con = DriverManager.getConnection(this.url, this.user, this.password);
con.setAutoCommit(isAutoCommitEnabled());
return con;
} | [
"@",
"Override",
"public",
"Connection",
"getOrCreate",
"(",
")",
"throws",
"SQLException",
"{",
"Connection",
"con",
"=",
"DriverManager",
".",
"getConnection",
"(",
"this",
".",
"url",
",",
"this",
".",
"user",
",",
"this",
".",
"password",
")",
";",
"co... | Creates a database connection or gets an existing connection with
the JDBC URL, username and password specified in the constructor.
@return a {@link Connection}.
@throws SQLException if an error occurred creating/getting a
{@link Connection}, possibly because the JDBC URL, username and/or
password are invalid. | [
"Creates",
"a",
"database",
"connection",
"or",
"gets",
"an",
"existing",
"connection",
"with",
"the",
"JDBC",
"URL",
"username",
"and",
"password",
"specified",
"in",
"the",
"constructor",
"."
] | 779bbc5bf096c75f8eed4f99ca45b99c1d44df43 | https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/sql/DriverManagerConnectionSpec.java#L71-L76 |
149,873 | trustathsh/ifmapj | src/main/java/de/hshannover/f4/trust/ifmapj/messages/Requests.java | Requests.registerRequestHandler | public static void registerRequestHandler(RequestHandler<? extends Request> rh) {
if (rh == null) {
throw new NullPointerException("rh is null");
}
if (rh.handles() == null) {
throw new NullPointerException("rh.handles() returns null");
}
if (sRequestHandlers == null) {
initializeDefaultHandlers();... | java | public static void registerRequestHandler(RequestHandler<? extends Request> rh) {
if (rh == null) {
throw new NullPointerException("rh is null");
}
if (rh.handles() == null) {
throw new NullPointerException("rh.handles() returns null");
}
if (sRequestHandlers == null) {
initializeDefaultHandlers();... | [
"public",
"static",
"void",
"registerRequestHandler",
"(",
"RequestHandler",
"<",
"?",
"extends",
"Request",
">",
"rh",
")",
"{",
"if",
"(",
"rh",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"rh is null\"",
")",
";",
"}",
"if",
"... | Register a custom request handler.
@param rh | [
"Register",
"a",
"custom",
"request",
"handler",
"."
] | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/messages/Requests.java#L102-L121 |
149,874 | leadware/jpersistence-tools | jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/PropertyContainer.java | PropertyContainer.add | public PropertyContainer add(String property) {
// Si la propriete n'est pas nulle
if(property != null && property.trim().length() > 0) properties.add(property);
// On retourne le conteneur
return this;
} | java | public PropertyContainer add(String property) {
// Si la propriete n'est pas nulle
if(property != null && property.trim().length() > 0) properties.add(property);
// On retourne le conteneur
return this;
} | [
"public",
"PropertyContainer",
"add",
"(",
"String",
"property",
")",
"{",
"// Si la propriete n'est pas nulle\r",
"if",
"(",
"property",
"!=",
"null",
"&&",
"property",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
">",
"0",
")",
"properties",
".",
"add",... | Methode d'ajour d'une propriete
@param property Propriete a ajouter
@return Conteneur de proprietes | [
"Methode",
"d",
"ajour",
"d",
"une",
"propriete"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/PropertyContainer.java#L58-L65 |
149,875 | gondor/kbop | src/main/java/org/pacesys/kbop/internal/PoolableObject.java | PoolableObject.initialize | @SuppressWarnings("unchecked")
<K, E extends PoolableObject<V>> E initialize(PoolKey<K> key, IKeyedObjectPool<?, V> pool) {
this.key = key;
this.pool = pool;
return (E) this;
} | java | @SuppressWarnings("unchecked")
<K, E extends PoolableObject<V>> E initialize(PoolKey<K> key, IKeyedObjectPool<?, V> pool) {
this.key = key;
this.pool = pool;
return (E) this;
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"<",
"K",
",",
"E",
"extends",
"PoolableObject",
"<",
"V",
">",
">",
"E",
"initialize",
"(",
"PoolKey",
"<",
"K",
">",
"key",
",",
"IKeyedObjectPool",
"<",
"?",
",",
"V",
">",
"pool",
")",
"{",
"thi... | Initializes this Object when initially created by the Pool for allocation
@param <K> The Key wrapped Type
@param <E> the Entry Type
@param key The Key which is associated with this Pool Object
@param pool the pool creating this allocation
@return Poolable Object | [
"Initializes",
"this",
"Object",
"when",
"initially",
"created",
"by",
"the",
"Pool",
"for",
"allocation"
] | a176fd845f1e146610f03a1cb3cb0d661ebf4faa | https://github.com/gondor/kbop/blob/a176fd845f1e146610f03a1cb3cb0d661ebf4faa/src/main/java/org/pacesys/kbop/internal/PoolableObject.java#L41-L46 |
149,876 | gondor/kbop | src/main/java/org/pacesys/kbop/internal/PoolableObject.java | PoolableObject.flagOwner | @SuppressWarnings("unchecked")
<K, E extends PoolableObject<V>> E flagOwner() {
this.owner = Thread.currentThread();
return (E) this;
} | java | @SuppressWarnings("unchecked")
<K, E extends PoolableObject<V>> E flagOwner() {
this.owner = Thread.currentThread();
return (E) this;
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"<",
"K",
",",
"E",
"extends",
"PoolableObject",
"<",
"V",
">",
">",
"E",
"flagOwner",
"(",
")",
"{",
"this",
".",
"owner",
"=",
"Thread",
".",
"currentThread",
"(",
")",
";",
"return",
"(",
"E",
")... | Flags the current thread as the new Owner of this Object
@param <K> the Key wrapped Type
@param <E> the Entry Type
@return PoolableObject for method chaining | [
"Flags",
"the",
"current",
"thread",
"as",
"the",
"new",
"Owner",
"of",
"this",
"Object"
] | a176fd845f1e146610f03a1cb3cb0d661ebf4faa | https://github.com/gondor/kbop/blob/a176fd845f1e146610f03a1cb3cb0d661ebf4faa/src/main/java/org/pacesys/kbop/internal/PoolableObject.java#L55-L59 |
149,877 | gondor/kbop | src/main/java/org/pacesys/kbop/internal/PoolableObject.java | PoolableObject.releaseOwner | @SuppressWarnings("unchecked")
<K, E extends PoolableObject<V>> E releaseOwner() {
this.owner = null;
return (E) this;
} | java | @SuppressWarnings("unchecked")
<K, E extends PoolableObject<V>> E releaseOwner() {
this.owner = null;
return (E) this;
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"<",
"K",
",",
"E",
"extends",
"PoolableObject",
"<",
"V",
">",
">",
"E",
"releaseOwner",
"(",
")",
"{",
"this",
".",
"owner",
"=",
"null",
";",
"return",
"(",
"E",
")",
"this",
";",
"}"
] | Releases the current owning thread from this Object
@param <K> the Key wrapped Type
@param <E> the Entry type
@return PoolableObject for method chaining | [
"Releases",
"the",
"current",
"owning",
"thread",
"from",
"this",
"Object"
] | a176fd845f1e146610f03a1cb3cb0d661ebf4faa | https://github.com/gondor/kbop/blob/a176fd845f1e146610f03a1cb3cb0d661ebf4faa/src/main/java/org/pacesys/kbop/internal/PoolableObject.java#L68-L72 |
149,878 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.loadDAOGeneratorAnnotations | public static List<Annotation> loadDAOGeneratorAnnotations(Field field) {
// Liste des annotations retrouvees
List<Annotation> daoAnnotations = new ArrayList<Annotation>();
// Si l'objet est null
if(field == null) {
// On retourne une liste vide
return daoAnnotations;
}
// Obt... | java | public static List<Annotation> loadDAOGeneratorAnnotations(Field field) {
// Liste des annotations retrouvees
List<Annotation> daoAnnotations = new ArrayList<Annotation>();
// Si l'objet est null
if(field == null) {
// On retourne une liste vide
return daoAnnotations;
}
// Obt... | [
"public",
"static",
"List",
"<",
"Annotation",
">",
"loadDAOGeneratorAnnotations",
"(",
"Field",
"field",
")",
"{",
"// Liste des annotations retrouvees\r",
"List",
"<",
"Annotation",
">",
"daoAnnotations",
"=",
"new",
"ArrayList",
"<",
"Annotation",
">",
"(",
")",
... | Methode permettant de charger toutes les annotations DAO de generation sur la propriete
@param field Champ a inspecter
@return Liste des annotations DAO de generation retrouvees | [
"Methode",
"permettant",
"de",
"charger",
"toutes",
"les",
"annotations",
"DAO",
"de",
"generation",
"sur",
"la",
"propriete"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L186-L221 |
149,879 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.loadDAOValidatorAnnotations | public static List<Annotation> loadDAOValidatorAnnotations(Object object) {
// Liste des annotations retrouvees
List<Annotation> daoAnnotations = new ArrayList<Annotation>();
// Si l'objet est null
if(object == null) {
// On retourne une liste vide
return daoAnnotations;
}
// ... | java | public static List<Annotation> loadDAOValidatorAnnotations(Object object) {
// Liste des annotations retrouvees
List<Annotation> daoAnnotations = new ArrayList<Annotation>();
// Si l'objet est null
if(object == null) {
// On retourne une liste vide
return daoAnnotations;
}
// ... | [
"public",
"static",
"List",
"<",
"Annotation",
">",
"loadDAOValidatorAnnotations",
"(",
"Object",
"object",
")",
"{",
"// Liste des annotations retrouvees\r",
"List",
"<",
"Annotation",
">",
"daoAnnotations",
"=",
"new",
"ArrayList",
"<",
"Annotation",
">",
"(",
")"... | Methode permettant de charger toutes les annotations DAO sur l'objet pour un mode donne et un temps d'evaluation donne
@param object Objet a inspecter
@return Liste des annotations DAO retrouvees | [
"Methode",
"permettant",
"de",
"charger",
"toutes",
"les",
"annotations",
"DAO",
"sur",
"l",
"objet",
"pour",
"un",
"mode",
"donne",
"et",
"un",
"temps",
"d",
"evaluation",
"donne"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L228-L263 |
149,880 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.loadDAOValidatorClass | public static List<Class<? extends IDAOValidator<? extends Annotation>>> loadDAOValidatorClass(Object object) {
// Liste de classes de validation retrouvees
List<Class<? extends IDAOValidator<? extends Annotation>>> result = new ArrayList<Class<? extends IDAOValidator<? extends Annotation>>>();
// Si l... | java | public static List<Class<? extends IDAOValidator<? extends Annotation>>> loadDAOValidatorClass(Object object) {
// Liste de classes de validation retrouvees
List<Class<? extends IDAOValidator<? extends Annotation>>> result = new ArrayList<Class<? extends IDAOValidator<? extends Annotation>>>();
// Si l... | [
"public",
"static",
"List",
"<",
"Class",
"<",
"?",
"extends",
"IDAOValidator",
"<",
"?",
"extends",
"Annotation",
">",
">",
">",
"loadDAOValidatorClass",
"(",
"Object",
"object",
")",
"{",
"// Liste de classes de validation retrouvees\r",
"List",
"<",
"Class",
"<... | Methode permettant de charger toutes les Classes de validation de l'Objet en fonction du Mode
@param object Objet a inspecter
@return Liste des classes d'implementation | [
"Methode",
"permettant",
"de",
"charger",
"toutes",
"les",
"Classes",
"de",
"validation",
"de",
"l",
"Objet",
"en",
"fonction",
"du",
"Mode"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L270-L309 |
149,881 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.getGenerationLogicClass | public static Class<? extends IDAOGeneratorManager<? extends Annotation>> getGenerationLogicClass(Annotation annotation) {
// Si l'annotation est nulle
if(annotation == null) {
// On retourne null
return null;
}
// Recherche dans la MAP
Class<? extends IDAOGeneratorManager<? extends ... | java | public static Class<? extends IDAOGeneratorManager<? extends Annotation>> getGenerationLogicClass(Annotation annotation) {
// Si l'annotation est nulle
if(annotation == null) {
// On retourne null
return null;
}
// Recherche dans la MAP
Class<? extends IDAOGeneratorManager<? extends ... | [
"public",
"static",
"Class",
"<",
"?",
"extends",
"IDAOGeneratorManager",
"<",
"?",
"extends",
"Annotation",
">",
">",
"getGenerationLogicClass",
"(",
"Annotation",
"annotation",
")",
"{",
"// Si l'annotation est nulle\r",
"if",
"(",
"annotation",
"==",
"null",
")",... | Methode permettant d'obtenir la classe de gestion du generateur
@param annotation Annotation a inspecter
@return Class d'implementation de la logique de generation | [
"Methode",
"permettant",
"d",
"obtenir",
"la",
"classe",
"de",
"gestion",
"du",
"generateur"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L316-L336 |
149,882 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.getValidationLogicClass | public static Class<? extends IDAOValidator<? extends Annotation>> getValidationLogicClass(Annotation annotation) {
// Si l'annotation est nulle
if(annotation == null) {
// On retourne null
return null;
}
// Recherche dans la MAP
Class<? extends IDAOValidator<? extends Annotation>> m... | java | public static Class<? extends IDAOValidator<? extends Annotation>> getValidationLogicClass(Annotation annotation) {
// Si l'annotation est nulle
if(annotation == null) {
// On retourne null
return null;
}
// Recherche dans la MAP
Class<? extends IDAOValidator<? extends Annotation>> m... | [
"public",
"static",
"Class",
"<",
"?",
"extends",
"IDAOValidator",
"<",
"?",
"extends",
"Annotation",
">",
">",
"getValidationLogicClass",
"(",
"Annotation",
"annotation",
")",
"{",
"// Si l'annotation est nulle\r",
"if",
"(",
"annotation",
"==",
"null",
")",
"{",... | Methode permettant d'obtenir la classe d'implementation de la
logique de validation parametree sur l'annotation
@param annotation Annotation a inspecter
@return Class d'implementation de la logique de validation | [
"Methode",
"permettant",
"d",
"obtenir",
"la",
"classe",
"d",
"implementation",
"de",
"la",
"logique",
"de",
"validation",
"parametree",
"sur",
"l",
"annotation"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L344-L364 |
149,883 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.arraryContains | public static <T extends Object> boolean arraryContains(T[] array, T value) {
// Si le tableau est vide
if(array == null || array.length == 0) {
// On retourne false
return false;
}
// Si le mode est vide
if(value == null) {
// On retourne false
return false;
}
... | java | public static <T extends Object> boolean arraryContains(T[] array, T value) {
// Si le tableau est vide
if(array == null || array.length == 0) {
// On retourne false
return false;
}
// Si le mode est vide
if(value == null) {
// On retourne false
return false;
}
... | [
"public",
"static",
"<",
"T",
"extends",
"Object",
">",
"boolean",
"arraryContains",
"(",
"T",
"[",
"]",
"array",
",",
"T",
"value",
")",
"{",
"// Si le tableau est vide\r",
"if",
"(",
"array",
"==",
"null",
"||",
"array",
".",
"length",
"==",
"0",
")",
... | Methode permettant de savoir si un Objet de type T est contenu dans un Tableau d'objet de type T
@param array Tableau d'objet d'un type T
@param value Objet d'un Type T
@param <T> Type de valeurs du tableau
@return Etat de presence | [
"Methode",
"permettant",
"de",
"savoir",
"si",
"un",
"Objet",
"de",
"type",
"T",
"est",
"contenu",
"dans",
"un",
"Tableau",
"d",
"objet",
"de",
"type",
"T"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L373-L406 |
149,884 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.isExpressionContainsENV | public static boolean isExpressionContainsENV(String expression) {
// Si la chaine est vide : false
if(expression == null || expression.trim().length() == 0) {
// On retourne false
return false;
}
// On split
return isExpressionContainPattern(expression, ENV_CHAIN_PATTERN);
} | java | public static boolean isExpressionContainsENV(String expression) {
// Si la chaine est vide : false
if(expression == null || expression.trim().length() == 0) {
// On retourne false
return false;
}
// On split
return isExpressionContainPattern(expression, ENV_CHAIN_PATTERN);
} | [
"public",
"static",
"boolean",
"isExpressionContainsENV",
"(",
"String",
"expression",
")",
"{",
"// Si la chaine est vide : false\r",
"if",
"(",
"expression",
"==",
"null",
"||",
"expression",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"{... | Methode permettant de verifier si un chemin contient des variables d'environnement
@param expression Chaine a controler
@return Resultat de la verification | [
"Methode",
"permettant",
"de",
"verifier",
"si",
"un",
"chemin",
"contient",
"des",
"variables",
"d",
"environnement"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L413-L424 |
149,885 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.resolveEnvironmentsParameters | public static String resolveEnvironmentsParameters(String expression) {
// Si l'expression est vide
if(expression == null || expression.trim().length() == 0) {
// On retourne null
return null;
}
// Tant que la chaene traitee contient des ENVs
while(isExpressionContainPattern(expression... | java | public static String resolveEnvironmentsParameters(String expression) {
// Si l'expression est vide
if(expression == null || expression.trim().length() == 0) {
// On retourne null
return null;
}
// Tant que la chaene traitee contient des ENVs
while(isExpressionContainPattern(expression... | [
"public",
"static",
"String",
"resolveEnvironmentsParameters",
"(",
"String",
"expression",
")",
"{",
"// Si l'expression est vide\r",
"if",
"(",
"expression",
"==",
"null",
"||",
"expression",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"{... | Methode permettant de resoudre les variables d'environnement dans une chemin
@param expression Expression du chemin
@return Expression resolue | [
"Methode",
"permettant",
"de",
"resoudre",
"les",
"variables",
"d",
"environnement",
"dans",
"une",
"chemin"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L442-L470 |
149,886 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.computeExpression | public static ExpressionModel computeExpression(String expression) {
// Si l'expression est vide
if(expression == null || expression.trim().length() == 0) {
// On retourne null
return null;
}
// On Instancie un model d'expression
ExpressionModel expressionModel = new ExpressionModel(... | java | public static ExpressionModel computeExpression(String expression) {
// Si l'expression est vide
if(expression == null || expression.trim().length() == 0) {
// On retourne null
return null;
}
// On Instancie un model d'expression
ExpressionModel expressionModel = new ExpressionModel(... | [
"public",
"static",
"ExpressionModel",
"computeExpression",
"(",
"String",
"expression",
")",
"{",
"// Si l'expression est vide\r",
"if",
"(",
"expression",
"==",
"null",
"||",
"expression",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
... | Methode de resolution d'une Expression
@param expression Expression a transformer
@return Modele de l'expression transformee | [
"Methode",
"de",
"resolution",
"d",
"une",
"Expression"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L477-L547 |
149,887 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.extractFunctionName | public static String extractFunctionName(String functionToken) {
// Si le Token est null
if(functionToken == null || functionToken.trim().length() == 0){
// On retourne la chaine
return functionToken;
}
int index0 = functionToken.indexOf(SIMPLE_FUNCTION_LEFT_DELIMITER);
int index1 = ... | java | public static String extractFunctionName(String functionToken) {
// Si le Token est null
if(functionToken == null || functionToken.trim().length() == 0){
// On retourne la chaine
return functionToken;
}
int index0 = functionToken.indexOf(SIMPLE_FUNCTION_LEFT_DELIMITER);
int index1 = ... | [
"public",
"static",
"String",
"extractFunctionName",
"(",
"String",
"functionToken",
")",
"{",
"// Si le Token est null\r",
"if",
"(",
"functionToken",
"==",
"null",
"||",
"functionToken",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
... | Methode permettant d'extraire le nom de la fonction
@param functionToken Topken de fonction
@return Nom de la fonction | [
"Methode",
"permettant",
"d",
"extraire",
"le",
"nom",
"de",
"la",
"fonction"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L614-L631 |
149,888 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.extractToken | public static String[] extractToken(String expression, String pattern) {
// Si la chaine est vide
if(expression == null || expression.trim().length() == 0) {
// On retourne null;
return null;
}
// Si le pattern est null
if(pattern == null) {
// On retourne null;
return n... | java | public static String[] extractToken(String expression, String pattern) {
// Si la chaine est vide
if(expression == null || expression.trim().length() == 0) {
// On retourne null;
return null;
}
// Si le pattern est null
if(pattern == null) {
// On retourne null;
return n... | [
"public",
"static",
"String",
"[",
"]",
"extractToken",
"(",
"String",
"expression",
",",
"String",
"pattern",
")",
"{",
"// Si la chaine est vide\r",
"if",
"(",
"expression",
"==",
"null",
"||",
"expression",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
... | Methode d'extraction de toutes les sous-chaines respectant le pattern donne
@param expression Expression mere
@param pattern Pattern a rechercher
@return Liste des sous-chaines respectant ce pattern | [
"Methode",
"d",
"extraction",
"de",
"toutes",
"les",
"sous",
"-",
"chaines",
"respectant",
"le",
"pattern",
"donne"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L660-L701 |
149,889 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.checkContainsInvalidCharacter | public static boolean checkContainsInvalidCharacter(String text, String invalidCharacters){
if(text == null || text.trim().length() == 0 || invalidCharacters == null) return false;
for (char c : invalidCharacters.toCharArray()) {
if(text.indexOf(new String(new char[]{c})) >= 0) return true;
}
re... | java | public static boolean checkContainsInvalidCharacter(String text, String invalidCharacters){
if(text == null || text.trim().length() == 0 || invalidCharacters == null) return false;
for (char c : invalidCharacters.toCharArray()) {
if(text.indexOf(new String(new char[]{c})) >= 0) return true;
}
re... | [
"public",
"static",
"boolean",
"checkContainsInvalidCharacter",
"(",
"String",
"text",
",",
"String",
"invalidCharacters",
")",
"{",
"if",
"(",
"text",
"==",
"null",
"||",
"text",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
"||",
"invalidCha... | Methode qui teste si une chaine donnee contient un des caracteres d'une liste
@param text Chaine dans laquelle on rcherche les caracteres
@param invalidCharacters Liste ds caracteres recherches
@return Etat de contenance | [
"Methode",
"qui",
"teste",
"si",
"une",
"chaine",
"donnee",
"contient",
"un",
"des",
"caracteres",
"d",
"une",
"liste"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L810-L818 |
149,890 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.isAlphaNumericString | public static boolean isAlphaNumericString(String text){
// Le Pattern representant une chaine AlphaNumerique
Pattern pattern = Pattern.compile("\\w+");
// Test
return (text != null) && (text.trim().length() > 0) && (pattern.matcher(text).matches());
} | java | public static boolean isAlphaNumericString(String text){
// Le Pattern representant une chaine AlphaNumerique
Pattern pattern = Pattern.compile("\\w+");
// Test
return (text != null) && (text.trim().length() > 0) && (pattern.matcher(text).matches());
} | [
"public",
"static",
"boolean",
"isAlphaNumericString",
"(",
"String",
"text",
")",
"{",
"// Le Pattern representant une chaine AlphaNumerique\r",
"Pattern",
"pattern",
"=",
"Pattern",
".",
"compile",
"(",
"\"\\\\w+\"",
")",
";",
"// Test\r",
"return",
"(",
"text",
"!=... | Methode qui teste si une chaine ne contient que des caracteres alphanumeriques
@param text Chaine a tester
@return Statut de contenance | [
"Methode",
"qui",
"teste",
"si",
"une",
"chaine",
"ne",
"contient",
"que",
"des",
"caracteres",
"alphanumeriques"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L825-L832 |
149,891 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java | DAOValidatorHelper.getAllFields | public static List<Field> getAllFields(Class<?> type, boolean ignoreRoot) {
// Liste des champs
List<Field> fields = new ArrayList<Field>();
// Ajout des champs directs de la classe
fields.addAll(Arrays.asList(type.getDeclaredFields()));
// Superclasse
Class<?> superType = type.getSupercla... | java | public static List<Field> getAllFields(Class<?> type, boolean ignoreRoot) {
// Liste des champs
List<Field> fields = new ArrayList<Field>();
// Ajout des champs directs de la classe
fields.addAll(Arrays.asList(type.getDeclaredFields()));
// Superclasse
Class<?> superType = type.getSupercla... | [
"public",
"static",
"List",
"<",
"Field",
">",
"getAllFields",
"(",
"Class",
"<",
"?",
">",
"type",
",",
"boolean",
"ignoreRoot",
")",
"{",
"// Liste des champs\r",
"List",
"<",
"Field",
">",
"fields",
"=",
"new",
"ArrayList",
"<",
"Field",
">",
"(",
")"... | Methode permettant d'obtenir la liste de tous les champs d'une classe
@param type Classes source
@param ignoreRoot ignorer ou traiter le root
@return Liste des classes | [
"Methode",
"permettant",
"d",
"obtenir",
"la",
"liste",
"de",
"tous",
"les",
"champs",
"d",
"une",
"classe"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L840-L856 |
149,892 | mlhartme/mork | src/main/java/net/oneandone/mork/grammar/Grammar.java | Grammar.forProductions | public static Grammar forProductions(String ... prods) {
StringArrayList symbolTable;
Grammar grammar;
String s;
String[] stringProd;
int[] prod;
int idx;
grammar = new Grammar();
symbolTable = grammar.symbolTable;
idx = 0; // definite assignment
... | java | public static Grammar forProductions(String ... prods) {
StringArrayList symbolTable;
Grammar grammar;
String s;
String[] stringProd;
int[] prod;
int idx;
grammar = new Grammar();
symbolTable = grammar.symbolTable;
idx = 0; // definite assignment
... | [
"public",
"static",
"Grammar",
"forProductions",
"(",
"String",
"...",
"prods",
")",
"{",
"StringArrayList",
"symbolTable",
";",
"Grammar",
"grammar",
";",
"String",
"s",
";",
"String",
"[",
"]",
"stringProd",
";",
"int",
"[",
"]",
"prod",
";",
"int",
"idx... | start symbol is set to the subject of the first production. | [
"start",
"symbol",
"is",
"set",
"to",
"the",
"subject",
"of",
"the",
"first",
"production",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/grammar/Grammar.java#L39-L72 |
149,893 | mlhartme/mork | src/main/java/net/oneandone/mork/grammar/Grammar.java | Grammar.packSymbols | public void packSymbols(int first, int end) {
int src;
int dest;
boolean touched;
dest = first;
for (src = first; src < end; src++) {
touched = renameSymbol(src, dest);
if (touched) {
dest++;
} else {
// src not... | java | public void packSymbols(int first, int end) {
int src;
int dest;
boolean touched;
dest = first;
for (src = first; src < end; src++) {
touched = renameSymbol(src, dest);
if (touched) {
dest++;
} else {
// src not... | [
"public",
"void",
"packSymbols",
"(",
"int",
"first",
",",
"int",
"end",
")",
"{",
"int",
"src",
";",
"int",
"dest",
";",
"boolean",
"touched",
";",
"dest",
"=",
"first",
";",
"for",
"(",
"src",
"=",
"first",
";",
"src",
"<",
"end",
";",
"src",
"... | pack helper symbols
@param end = last + 1 | [
"pack",
"helper",
"symbols"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/grammar/Grammar.java#L492-L506 |
149,894 | mlhartme/mork | src/main/java/net/oneandone/mork/grammar/Grammar.java | Grammar.expandSymbol | public void expandSymbol(int symbol) {
int prod, maxProd;
int ofs, maxOfs;
int ofs2, maxOfs2;
int i, j;
boolean found;
int count, nextCount;
IntArrayList next;
int[][] expand;
List<int[]> expandLst;
int right;
maxProd = getProducti... | java | public void expandSymbol(int symbol) {
int prod, maxProd;
int ofs, maxOfs;
int ofs2, maxOfs2;
int i, j;
boolean found;
int count, nextCount;
IntArrayList next;
int[][] expand;
List<int[]> expandLst;
int right;
maxProd = getProducti... | [
"public",
"void",
"expandSymbol",
"(",
"int",
"symbol",
")",
"{",
"int",
"prod",
",",
"maxProd",
";",
"int",
"ofs",
",",
"maxOfs",
";",
"int",
"ofs2",
",",
"maxOfs2",
";",
"int",
"i",
",",
"j",
";",
"boolean",
"found",
";",
"int",
"count",
",",
"ne... | expansion is not performed recurively | [
"expansion",
"is",
"not",
"performed",
"recurively"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/grammar/Grammar.java#L541-L604 |
149,895 | mlhartme/mork | src/main/java/net/oneandone/mork/grammar/Grammar.java | Grammar.addNullable | public void addNullable(IntBitSet result) {
IntBitSet remaining; // indexes of productions
boolean modified;
int i;
int prod;
int max;
remaining = new IntBitSet();
remaining.addRange(0, getProductionCount() - 1);
do {
modified = false;
... | java | public void addNullable(IntBitSet result) {
IntBitSet remaining; // indexes of productions
boolean modified;
int i;
int prod;
int max;
remaining = new IntBitSet();
remaining.addRange(0, getProductionCount() - 1);
do {
modified = false;
... | [
"public",
"void",
"addNullable",
"(",
"IntBitSet",
"result",
")",
"{",
"IntBitSet",
"remaining",
";",
"// indexes of productions",
"boolean",
"modified",
";",
"int",
"i",
";",
"int",
"prod",
";",
"int",
"max",
";",
"remaining",
"=",
"new",
"IntBitSet",
"(",
... | Returns a symbols that can derive the empty word. Also called removable symbols | [
"Returns",
"a",
"symbols",
"that",
"can",
"derive",
"the",
"empty",
"word",
".",
"Also",
"called",
"removable",
"symbols"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/grammar/Grammar.java#L607-L635 |
149,896 | likethecolor/Alchemy-API | src/main/java/com/likethecolor/alchemy/api/util/NumberUtil.java | NumberUtil.getValue | private static int getValue(String str, boolean getMaximumValue) {
int multiplier = 1;
String upperOrLowerValue = null;
final String[] rangeUnit = splitRangeUnit(str);
if(rangeUnit.length == 2) {
multiplier = getMultiplier(rangeUnit[1]);
}
String[] range = splitRange(rangeUnit[0]);
... | java | private static int getValue(String str, boolean getMaximumValue) {
int multiplier = 1;
String upperOrLowerValue = null;
final String[] rangeUnit = splitRangeUnit(str);
if(rangeUnit.length == 2) {
multiplier = getMultiplier(rangeUnit[1]);
}
String[] range = splitRange(rangeUnit[0]);
... | [
"private",
"static",
"int",
"getValue",
"(",
"String",
"str",
",",
"boolean",
"getMaximumValue",
")",
"{",
"int",
"multiplier",
"=",
"1",
";",
"String",
"upperOrLowerValue",
"=",
"null",
";",
"final",
"String",
"[",
"]",
"rangeUnit",
"=",
"splitRangeUnit",
"... | Return the specified value from the string.
@param str string to parse; assume it is either a single value or a range (delimited by "-")
@param getMaximumValue if true return the maximum value
@return specified value from the string | [
"Return",
"the",
"specified",
"value",
"from",
"the",
"string",
"."
] | 5208cfc92a878ceeaff052787af29da92d98db7e | https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/util/NumberUtil.java#L95-L114 |
149,897 | eurekaclinical/eurekaclinical-standard-apis | src/main/java/org/eurekaclinical/standardapis/props/EurekaClinicalProperties.java | EurekaClinicalProperties.getValue | protected final String getValue(final String propertyName, String defaultValue) {
String value = getValue(propertyName);
if (value == null) {
if (defaultValue == null) {
LOGGER.warn(
"Property '{}' is not specified in "
+ getCla... | java | protected final String getValue(final String propertyName, String defaultValue) {
String value = getValue(propertyName);
if (value == null) {
if (defaultValue == null) {
LOGGER.warn(
"Property '{}' is not specified in "
+ getCla... | [
"protected",
"final",
"String",
"getValue",
"(",
"final",
"String",
"propertyName",
",",
"String",
"defaultValue",
")",
"{",
"String",
"value",
"=",
"getValue",
"(",
"propertyName",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"if",
"(",
"defaultV... | Returns the String value of the given property name, or the given default
if the given property name does not exist.
@param propertyName The name of the property to fetch a value for.
@param defaultValue The default value to return if the property name does
not exist.
@return A string containing either the value of th... | [
"Returns",
"the",
"String",
"value",
"of",
"the",
"given",
"property",
"name",
"or",
"the",
"given",
"default",
"if",
"the",
"given",
"property",
"name",
"does",
"not",
"exist",
"."
] | 690036dde82a4f2c2106d32403cdf1c713429377 | https://github.com/eurekaclinical/eurekaclinical-standard-apis/blob/690036dde82a4f2c2106d32403cdf1c713429377/src/main/java/org/eurekaclinical/standardapis/props/EurekaClinicalProperties.java#L164-L176 |
149,898 | eurekaclinical/eurekaclinical-standard-apis | src/main/java/org/eurekaclinical/standardapis/props/EurekaClinicalProperties.java | EurekaClinicalProperties.getIntValue | protected final int getIntValue(final String propertyName, int defaultValue) {
int result;
String property = this.properties.getProperty(propertyName);
try {
result = Integer.parseInt(property);
} catch (NumberFormatException e) {
LOGGER.warn("Invalid integer prop... | java | protected final int getIntValue(final String propertyName, int defaultValue) {
int result;
String property = this.properties.getProperty(propertyName);
try {
result = Integer.parseInt(property);
} catch (NumberFormatException e) {
LOGGER.warn("Invalid integer prop... | [
"protected",
"final",
"int",
"getIntValue",
"(",
"final",
"String",
"propertyName",
",",
"int",
"defaultValue",
")",
"{",
"int",
"result",
";",
"String",
"property",
"=",
"this",
".",
"properties",
".",
"getProperty",
"(",
"propertyName",
")",
";",
"try",
"{... | Utility method to get an int from the properties file.
@param propertyName The name of the property.
@param defaultValue The default value to return, if the property is not
found, or is malformed.
@return The property value, as an int. | [
"Utility",
"method",
"to",
"get",
"an",
"int",
"from",
"the",
"properties",
"file",
"."
] | 690036dde82a4f2c2106d32403cdf1c713429377 | https://github.com/eurekaclinical/eurekaclinical-standard-apis/blob/690036dde82a4f2c2106d32403cdf1c713429377/src/main/java/org/eurekaclinical/standardapis/props/EurekaClinicalProperties.java#L229-L240 |
149,899 | mlhartme/mork | src/main/java/net/oneandone/mork/compiler/Mork.java | Mork.compileCurrent | private boolean compileCurrent() throws IOException {
Specification spec;
Mapper result;
output.normal(currentJob.source + ":");
if (currentJob.listing != null) {
output.openListing(currentJob.listing);
}
spec = (Specification) mapperMapper.invoke(currentJob.... | java | private boolean compileCurrent() throws IOException {
Specification spec;
Mapper result;
output.normal(currentJob.source + ":");
if (currentJob.listing != null) {
output.openListing(currentJob.listing);
}
spec = (Specification) mapperMapper.invoke(currentJob.... | [
"private",
"boolean",
"compileCurrent",
"(",
")",
"throws",
"IOException",
"{",
"Specification",
"spec",
";",
"Mapper",
"result",
";",
"output",
".",
"normal",
"(",
"currentJob",
".",
"source",
"+",
"\":\"",
")",
";",
"if",
"(",
"currentJob",
".",
"listing",... | Helper for compile | [
"Helper",
"for",
"compile"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/compiler/Mork.java#L78-L101 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.