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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
151,200 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/event/RecordChangedHandler.java | RecordChangedHandler.setTheDate | public void setTheDate()
{
boolean[] rgbEnabled = m_field.setEnableListeners(false);
Calendar calAfter = m_field.getCalendar();
Calendar calBefore = m_field.getCalendar();
m_field.setValue(DateTimeField.currentTime(), DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); // File written o... | java | public void setTheDate()
{
boolean[] rgbEnabled = m_field.setEnableListeners(false);
Calendar calAfter = m_field.getCalendar();
Calendar calBefore = m_field.getCalendar();
m_field.setValue(DateTimeField.currentTime(), DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); // File written o... | [
"public",
"void",
"setTheDate",
"(",
")",
"{",
"boolean",
"[",
"]",
"rgbEnabled",
"=",
"m_field",
".",
"setEnableListeners",
"(",
"false",
")",
";",
"Calendar",
"calAfter",
"=",
"m_field",
".",
"getCalendar",
"(",
")",
";",
"Calendar",
"calBefore",
"=",
"m... | Set the date field to the current time.
Also make sure the time is not the same as it is currently. | [
"Set",
"the",
"date",
"field",
"to",
"the",
"current",
"time",
".",
"Also",
"make",
"sure",
"the",
"time",
"is",
"not",
"the",
"same",
"as",
"it",
"is",
"currently",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/RecordChangedHandler.java#L169-L187 |
151,201 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/event/RecordChangedHandler.java | RecordChangedHandler.clearTemporaryKeyField | public void clearTemporaryKeyField()
{
Record record = this.getOwner();
KeyArea keyArea = record.getKeyArea(0);
if (keyArea.getKeyFields(false, true) == 2)
if (m_fakeKeyField != null) // Always
keyArea.removeKeyField(m_fakeKeyField);
} | java | public void clearTemporaryKeyField()
{
Record record = this.getOwner();
KeyArea keyArea = record.getKeyArea(0);
if (keyArea.getKeyFields(false, true) == 2)
if (m_fakeKeyField != null) // Always
keyArea.removeKeyField(m_fakeKeyField);
} | [
"public",
"void",
"clearTemporaryKeyField",
"(",
")",
"{",
"Record",
"record",
"=",
"this",
".",
"getOwner",
"(",
")",
";",
"KeyArea",
"keyArea",
"=",
"record",
".",
"getKeyArea",
"(",
"0",
")",
";",
"if",
"(",
"keyArea",
".",
"getKeyFields",
"(",
"false... | Remove the temporary key field. | [
"Remove",
"the",
"temporary",
"key",
"field",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/RecordChangedHandler.java#L217-L224 |
151,202 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static <E> void swap(E[] array1, int array1Index, E[] array2, int array2Index) {
if(array1[array1Index] != array2[array2Index]) {
E hold = array1[array1Index];
array1[array1Index] = array2[array2Index];
array2[array2Index] = hold;
}
} | java | public static <E> void swap(E[] array1, int array1Index, E[] array2, int array2Index) {
if(array1[array1Index] != array2[array2Index]) {
E hold = array1[array1Index];
array1[array1Index] = array2[array2Index];
array2[array2Index] = hold;
}
} | [
"public",
"static",
"<",
"E",
">",
"void",
"swap",
"(",
"E",
"[",
"]",
"array1",
",",
"int",
"array1Index",
",",
"E",
"[",
"]",
"array2",
",",
"int",
"array2Index",
")",
"{",
"if",
"(",
"array1",
"[",
"array1Index",
"]",
"!=",
"array2",
"[",
"array... | Swap the elements of two arrays at the specified positions.
@param <E> the type of elements in this array.
@param array1 one of the arrays that will have one of its values swapped.
@param array1Index the index of the first array that will be swapped.
@param array2 the other array that will have one of its values swap... | [
"Swap",
"the",
"elements",
"of",
"two",
"arrays",
"at",
"the",
"specified",
"positions",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L39-L46 |
151,203 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static <E> void swap(E[] array1, E[] array2, int index) {
TrivialSwap.swap(array1, index, array2, index);
} | java | public static <E> void swap(E[] array1, E[] array2, int index) {
TrivialSwap.swap(array1, index, array2, index);
} | [
"public",
"static",
"<",
"E",
">",
"void",
"swap",
"(",
"E",
"[",
"]",
"array1",
",",
"E",
"[",
"]",
"array2",
",",
"int",
"index",
")",
"{",
"TrivialSwap",
".",
"swap",
"(",
"array1",
",",
"index",
",",
"array2",
",",
"index",
")",
";",
"}"
] | Swap the elements of two arrays at the same position
@param <E> the type of elements in this list.
@param array1 one of the arrays that will have one of its values swapped.
@param array2 the other array that will have one of its values swapped.
@param index the index of the arrays that will have their values swapped. | [
"Swap",
"the",
"elements",
"of",
"two",
"arrays",
"at",
"the",
"same",
"position"
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L57-L59 |
151,204 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static <E> void swap(E[] array, int index1, int index2) {
TrivialSwap.swap(array, index1, array, index2);
} | java | public static <E> void swap(E[] array, int index1, int index2) {
TrivialSwap.swap(array, index1, array, index2);
} | [
"public",
"static",
"<",
"E",
">",
"void",
"swap",
"(",
"E",
"[",
"]",
"array",
",",
"int",
"index1",
",",
"int",
"index2",
")",
"{",
"TrivialSwap",
".",
"swap",
"(",
"array",
",",
"index1",
",",
"array",
",",
"index2",
")",
";",
"}"
] | Swap two elements of array at the specified positions
@param <E> the type of elements in this list.
@param array array that will have two of its values swapped.
@param index1 one of the indexes of the array.
@param index2 other index of the array. | [
"Swap",
"two",
"elements",
"of",
"array",
"at",
"the",
"specified",
"positions"
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L70-L72 |
151,205 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static <E> void swap(List<E> list1, int list1Index, List<E> list2, int list2Index) {
if(list1.get(list1Index) != list2.get(list2Index)) {
E hold = list1.remove(list1Index);
if(list1 != list2 || list1Index > list2Index){
list1.add(list1Index, list2.get(... | java | public static <E> void swap(List<E> list1, int list1Index, List<E> list2, int list2Index) {
if(list1.get(list1Index) != list2.get(list2Index)) {
E hold = list1.remove(list1Index);
if(list1 != list2 || list1Index > list2Index){
list1.add(list1Index, list2.get(... | [
"public",
"static",
"<",
"E",
">",
"void",
"swap",
"(",
"List",
"<",
"E",
">",
"list1",
",",
"int",
"list1Index",
",",
"List",
"<",
"E",
">",
"list2",
",",
"int",
"list2Index",
")",
"{",
"if",
"(",
"list1",
".",
"get",
"(",
"list1Index",
")",
"!=... | Swap the elements of two lists at the specified positions. The run time of this method
depends on the implementation of the lists since elements are removed and added in the
lists.
@param <E> the type of elements in this list.
@param list1 one of the lists that will have one of its values swapped.
@param list1Index t... | [
"Swap",
"the",
"elements",
"of",
"two",
"lists",
"at",
"the",
"specified",
"positions",
".",
"The",
"run",
"time",
"of",
"this",
"method",
"depends",
"on",
"the",
"implementation",
"of",
"the",
"lists",
"since",
"elements",
"are",
"removed",
"and",
"added",
... | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L103-L117 |
151,206 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static <E> void swap(List<E> list1, List<E> list2, int index) {
TrivialSwap.swap(list1, index, list2, index);
} | java | public static <E> void swap(List<E> list1, List<E> list2, int index) {
TrivialSwap.swap(list1, index, list2, index);
} | [
"public",
"static",
"<",
"E",
">",
"void",
"swap",
"(",
"List",
"<",
"E",
">",
"list1",
",",
"List",
"<",
"E",
">",
"list2",
",",
"int",
"index",
")",
"{",
"TrivialSwap",
".",
"swap",
"(",
"list1",
",",
"index",
",",
"list2",
",",
"index",
")",
... | Swap all the elements of two lists at the same position. The run time of this method
depends on the implementation of the lists since elements are removed and added in the
lists.
@param <E> the type of elements in this list.
@param list1 one of the lists that will have one of its values swapped.
@param list2 the othe... | [
"Swap",
"all",
"the",
"elements",
"of",
"two",
"lists",
"at",
"the",
"same",
"position",
".",
"The",
"run",
"time",
"of",
"this",
"method",
"depends",
"on",
"the",
"implementation",
"of",
"the",
"lists",
"since",
"elements",
"are",
"removed",
"and",
"added... | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L130-L132 |
151,207 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static <E> void swap(List<E> list, int index1, int index2) {
TrivialSwap.swap(list, index1, list, index2);
} | java | public static <E> void swap(List<E> list, int index1, int index2) {
TrivialSwap.swap(list, index1, list, index2);
} | [
"public",
"static",
"<",
"E",
">",
"void",
"swap",
"(",
"List",
"<",
"E",
">",
"list",
",",
"int",
"index1",
",",
"int",
"index2",
")",
"{",
"TrivialSwap",
".",
"swap",
"(",
"list",
",",
"index1",
",",
"list",
",",
"index2",
")",
";",
"}"
] | Swap two elements of a list at the specified positions. The run time of this method
depends on the implementation of the lists since elements are removed and added in the
lists.
@param <E> the type of elements in this list.
@param list list that will have two of its values swapped.
@param index1 one of the indexes of... | [
"Swap",
"two",
"elements",
"of",
"a",
"list",
"at",
"the",
"specified",
"positions",
".",
"The",
"run",
"time",
"of",
"this",
"method",
"depends",
"on",
"the",
"implementation",
"of",
"the",
"lists",
"since",
"elements",
"are",
"removed",
"and",
"added",
"... | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L145-L147 |
151,208 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static <E> void swap(List<E> list1, List<E> list2) {
int minLength = Math.min(list1.size(), list2.size());
for(int i = 0; i < minLength; i++) {
TrivialSwap.swap(list1, list2, i);
}
} | java | public static <E> void swap(List<E> list1, List<E> list2) {
int minLength = Math.min(list1.size(), list2.size());
for(int i = 0; i < minLength; i++) {
TrivialSwap.swap(list1, list2, i);
}
} | [
"public",
"static",
"<",
"E",
">",
"void",
"swap",
"(",
"List",
"<",
"E",
">",
"list1",
",",
"List",
"<",
"E",
">",
"list2",
")",
"{",
"int",
"minLength",
"=",
"Math",
".",
"min",
"(",
"list1",
".",
"size",
"(",
")",
",",
"list2",
".",
"size",
... | Helper method that swaps all the elements of the arrays. The run time of this method
depends on the implementation of the lists since elements are removed and added in the
lists. It also depends on the length of the shortest list.
@param <E> the type of elements in this list.
@param list1 one array that will have its... | [
"Helper",
"method",
"that",
"swaps",
"all",
"the",
"elements",
"of",
"the",
"arrays",
".",
"The",
"run",
"time",
"of",
"this",
"method",
"depends",
"on",
"the",
"implementation",
"of",
"the",
"lists",
"since",
"elements",
"are",
"removed",
"and",
"added",
... | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L159-L165 |
151,209 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static void swap(int[] intArray1, int array1Index, int[] intArray2, int array2Index) {
if(intArray1[array1Index] != intArray2[array2Index]) {
int hold = intArray1[array1Index];
intArray1[array1Index] = intArray2[array2Index];
intArray2[array2Index] = hold;
}
... | java | public static void swap(int[] intArray1, int array1Index, int[] intArray2, int array2Index) {
if(intArray1[array1Index] != intArray2[array2Index]) {
int hold = intArray1[array1Index];
intArray1[array1Index] = intArray2[array2Index];
intArray2[array2Index] = hold;
}
... | [
"public",
"static",
"void",
"swap",
"(",
"int",
"[",
"]",
"intArray1",
",",
"int",
"array1Index",
",",
"int",
"[",
"]",
"intArray2",
",",
"int",
"array2Index",
")",
"{",
"if",
"(",
"intArray1",
"[",
"array1Index",
"]",
"!=",
"intArray2",
"[",
"array2Inde... | Swap the elements of two int arrays at the specified positions.
@param intArray1 one of the arrays that will have one of its values swapped.
@param array1Index the index of the first array that will be swapped.
@param intArray2 the other array that will have one of its values swapped.
@param array2Index the index of t... | [
"Swap",
"the",
"elements",
"of",
"two",
"int",
"arrays",
"at",
"the",
"specified",
"positions",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L175-L182 |
151,210 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static void swap(short[] shortArray1, int array1Index, short[] shortArray2, int array2Index) {
if(shortArray1[array1Index] != shortArray2[array2Index]) {
short hold = shortArray1[array1Index];
shortArray1[array1Index] = shortArray2[array2Index];
shortArray2[array2Index... | java | public static void swap(short[] shortArray1, int array1Index, short[] shortArray2, int array2Index) {
if(shortArray1[array1Index] != shortArray2[array2Index]) {
short hold = shortArray1[array1Index];
shortArray1[array1Index] = shortArray2[array2Index];
shortArray2[array2Index... | [
"public",
"static",
"void",
"swap",
"(",
"short",
"[",
"]",
"shortArray1",
",",
"int",
"array1Index",
",",
"short",
"[",
"]",
"shortArray2",
",",
"int",
"array2Index",
")",
"{",
"if",
"(",
"shortArray1",
"[",
"array1Index",
"]",
"!=",
"shortArray2",
"[",
... | Swap the elements of two short arrays at the specified positions.
@param shortArray1 one of the arrays that will have one of its values swapped.
@param array1Index the index of the first array that will be swapped.
@param shortArray2 the other array that will have one of its values swapped.
@param array2Index the inde... | [
"Swap",
"the",
"elements",
"of",
"two",
"short",
"arrays",
"at",
"the",
"specified",
"positions",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L337-L344 |
151,211 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static void swap(short[] shortArray1, short[] shortArray2, int index) {
TrivialSwap.swap(shortArray1, index, shortArray2, index);
} | java | public static void swap(short[] shortArray1, short[] shortArray2, int index) {
TrivialSwap.swap(shortArray1, index, shortArray2, index);
} | [
"public",
"static",
"void",
"swap",
"(",
"short",
"[",
"]",
"shortArray1",
",",
"short",
"[",
"]",
"shortArray2",
",",
"int",
"index",
")",
"{",
"TrivialSwap",
".",
"swap",
"(",
"shortArray1",
",",
"index",
",",
"shortArray2",
",",
"index",
")",
";",
"... | Swap the elements of two short arrays at the same position
@param shortArray1 one of the arrays that will have one of its values swapped.
@param shortArray2 the other array that will have one of its values swapped.
@param index the index of the arrays that will have their values swapped. | [
"Swap",
"the",
"elements",
"of",
"two",
"short",
"arrays",
"at",
"the",
"same",
"position"
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L353-L355 |
151,212 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static void swap(float[] floatArray1, int array1Index, float[] floatArray2, int array2Index) {
if(floatArray1[array1Index] != floatArray2[array2Index]) {
float hold = floatArray1[array1Index];
floatArray1[array1Index] = floatArray2[array2Index];
floatArray2[array2Index... | java | public static void swap(float[] floatArray1, int array1Index, float[] floatArray2, int array2Index) {
if(floatArray1[array1Index] != floatArray2[array2Index]) {
float hold = floatArray1[array1Index];
floatArray1[array1Index] = floatArray2[array2Index];
floatArray2[array2Index... | [
"public",
"static",
"void",
"swap",
"(",
"float",
"[",
"]",
"floatArray1",
",",
"int",
"array1Index",
",",
"float",
"[",
"]",
"floatArray2",
",",
"int",
"array2Index",
")",
"{",
"if",
"(",
"floatArray1",
"[",
"array1Index",
"]",
"!=",
"floatArray2",
"[",
... | Swap the elements of two float arrays at the specified positions.
@param floatArray1 one of the arrays that will have one of its values swapped.
@param array1Index the index of the first array that will be swapped.
@param floatArray2 the other array that will have one of its values swapped.
@param array2Index the inde... | [
"Swap",
"the",
"elements",
"of",
"two",
"float",
"arrays",
"at",
"the",
"specified",
"positions",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L445-L452 |
151,213 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static void swap(float[] floatArray1, float[] floatArray2, int index) {
TrivialSwap.swap(floatArray1, index, floatArray2, index);
} | java | public static void swap(float[] floatArray1, float[] floatArray2, int index) {
TrivialSwap.swap(floatArray1, index, floatArray2, index);
} | [
"public",
"static",
"void",
"swap",
"(",
"float",
"[",
"]",
"floatArray1",
",",
"float",
"[",
"]",
"floatArray2",
",",
"int",
"index",
")",
"{",
"TrivialSwap",
".",
"swap",
"(",
"floatArray1",
",",
"index",
",",
"floatArray2",
",",
"index",
")",
";",
"... | Swap the elements of two float arrays at the same position
@param floatArray1 one of the arrays that will have one of its values swapped.
@param floatArray2 the other array that will have one of its values swapped.
@param index the index of the arrays that will have their values swapped. | [
"Swap",
"the",
"elements",
"of",
"two",
"float",
"arrays",
"at",
"the",
"same",
"position"
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L461-L463 |
151,214 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static void swap(float[] floatArray, int index1, int index2) {
TrivialSwap.swap(floatArray, index1, floatArray, index2);
} | java | public static void swap(float[] floatArray, int index1, int index2) {
TrivialSwap.swap(floatArray, index1, floatArray, index2);
} | [
"public",
"static",
"void",
"swap",
"(",
"float",
"[",
"]",
"floatArray",
",",
"int",
"index1",
",",
"int",
"index2",
")",
"{",
"TrivialSwap",
".",
"swap",
"(",
"floatArray",
",",
"index1",
",",
"floatArray",
",",
"index2",
")",
";",
"}"
] | Swap two elements of a float array at the specified positions
@param floatArray array that will have two of its values swapped.
@param index1 one of the indexes of the array.
@param index2 other index of the array. | [
"Swap",
"two",
"elements",
"of",
"a",
"float",
"array",
"at",
"the",
"specified",
"positions"
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L472-L474 |
151,215 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static void swap(double[] doubleArray1, int array1Index, double[] doubleArray2, int array2Index) {
if(doubleArray1[array1Index] != doubleArray2[array2Index]) {
double hold = doubleArray1[array1Index];
doubleArray1[array1Index] = doubleArray2[array2Index];
doubleArray2[... | java | public static void swap(double[] doubleArray1, int array1Index, double[] doubleArray2, int array2Index) {
if(doubleArray1[array1Index] != doubleArray2[array2Index]) {
double hold = doubleArray1[array1Index];
doubleArray1[array1Index] = doubleArray2[array2Index];
doubleArray2[... | [
"public",
"static",
"void",
"swap",
"(",
"double",
"[",
"]",
"doubleArray1",
",",
"int",
"array1Index",
",",
"double",
"[",
"]",
"doubleArray2",
",",
"int",
"array2Index",
")",
"{",
"if",
"(",
"doubleArray1",
"[",
"array1Index",
"]",
"!=",
"doubleArray2",
... | Swap the elements of two double arrays at the specified positions.
@param doubleArray1 one of the arrays that will have one of its values swapped.
@param array1Index the index of the first array that will be swapped.
@param doubleArray2 the other array that will have one of its values swapped.
@param array2Index the i... | [
"Swap",
"the",
"elements",
"of",
"two",
"double",
"arrays",
"at",
"the",
"specified",
"positions",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L499-L506 |
151,216 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static void swap(double[] doubleArray1, double[] doubleArray2, int index) {
TrivialSwap.swap(doubleArray1, index, doubleArray2, index);
} | java | public static void swap(double[] doubleArray1, double[] doubleArray2, int index) {
TrivialSwap.swap(doubleArray1, index, doubleArray2, index);
} | [
"public",
"static",
"void",
"swap",
"(",
"double",
"[",
"]",
"doubleArray1",
",",
"double",
"[",
"]",
"doubleArray2",
",",
"int",
"index",
")",
"{",
"TrivialSwap",
".",
"swap",
"(",
"doubleArray1",
",",
"index",
",",
"doubleArray2",
",",
"index",
")",
";... | Swap the elements of two double arrays at the same position
@param doubleArray1 one of the arrays that will have one of its values swapped.
@param doubleArray2 the other array that will have one of its values swapped.
@param index the index of the arrays that will have their values swapped. | [
"Swap",
"the",
"elements",
"of",
"two",
"double",
"arrays",
"at",
"the",
"same",
"position"
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L515-L517 |
151,217 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java | TrivialSwap.swap | public static void swap(double[] doubleArray, int index1, int index2) {
TrivialSwap.swap(doubleArray, index1, doubleArray, index2);
} | java | public static void swap(double[] doubleArray, int index1, int index2) {
TrivialSwap.swap(doubleArray, index1, doubleArray, index2);
} | [
"public",
"static",
"void",
"swap",
"(",
"double",
"[",
"]",
"doubleArray",
",",
"int",
"index1",
",",
"int",
"index2",
")",
"{",
"TrivialSwap",
".",
"swap",
"(",
"doubleArray",
",",
"index1",
",",
"doubleArray",
",",
"index2",
")",
";",
"}"
] | Swap two elements of a double array at the specified positions
@param doubleArray array that will have two of its values swapped.
@param index1 one of the indexes of the array.
@param index2 other index of the array. | [
"Swap",
"two",
"elements",
"of",
"a",
"double",
"array",
"at",
"the",
"specified",
"positions"
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/TrivialSwap.java#L526-L528 |
151,218 | davidcarboni-archive/httpino | src/main/java/com/github/davidcarboni/httpino/Http.java | Http.getFile | public static Path getFile(HttpServletRequest request)
throws IOException {
Path result = null;
// Set up the objects that do all the heavy lifting
DiskFileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
tr... | java | public static Path getFile(HttpServletRequest request)
throws IOException {
Path result = null;
// Set up the objects that do all the heavy lifting
DiskFileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
tr... | [
"public",
"static",
"Path",
"getFile",
"(",
"HttpServletRequest",
"request",
")",
"throws",
"IOException",
"{",
"Path",
"result",
"=",
"null",
";",
"// Set up the objects that do all the heavy lifting",
"DiskFileItemFactory",
"factory",
"=",
"new",
"DiskFileItemFactory",
... | Handles reading an uploaded file.
@param request The http request.
@return A temp file containing the file data.
@throws IOException If an error occurs in processing the file. | [
"Handles",
"reading",
"an",
"uploaded",
"file",
"."
] | a78c91874e6d9b2e452cf3aa68d4fea804d977ca | https://github.com/davidcarboni-archive/httpino/blob/a78c91874e6d9b2e452cf3aa68d4fea804d977ca/src/main/java/com/github/davidcarboni/httpino/Http.java#L385-L407 |
151,219 | davidcarboni-archive/httpino | src/main/java/com/github/davidcarboni/httpino/Http.java | Http.combineHeaders | private Header[] combineHeaders(NameValuePair[] headers) {
Header[] fullHeaders = new Header[this.headers.size() + headers.length];
// Add class-level headers (for all requests)
for (int i = 0; i < this.headers.size(); i++) {
fullHeaders[i] = this.headers.get(i);
}
... | java | private Header[] combineHeaders(NameValuePair[] headers) {
Header[] fullHeaders = new Header[this.headers.size() + headers.length];
// Add class-level headers (for all requests)
for (int i = 0; i < this.headers.size(); i++) {
fullHeaders[i] = this.headers.get(i);
}
... | [
"private",
"Header",
"[",
"]",
"combineHeaders",
"(",
"NameValuePair",
"[",
"]",
"headers",
")",
"{",
"Header",
"[",
"]",
"fullHeaders",
"=",
"new",
"Header",
"[",
"this",
".",
"headers",
".",
"size",
"(",
")",
"+",
"headers",
".",
"length",
"]",
";",
... | Sets the combined request headers.
@param headers Additional header values to add over and above {@link #headers}. | [
"Sets",
"the",
"combined",
"request",
"headers",
"."
] | a78c91874e6d9b2e452cf3aa68d4fea804d977ca | https://github.com/davidcarboni-archive/httpino/blob/a78c91874e6d9b2e452cf3aa68d4fea804d977ca/src/main/java/com/github/davidcarboni/httpino/Http.java#L415-L432 |
151,220 | tvesalainen/util | util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java | SymmetricDifferenceMatcher.map | public void map(I item, T target)
{
mapSet.add(item, target);
reverseMap.add(target, item);
} | java | public void map(I item, T target)
{
mapSet.add(item, target);
reverseMap.add(target, item);
} | [
"public",
"void",
"map",
"(",
"I",
"item",
",",
"T",
"target",
")",
"{",
"mapSet",
".",
"add",
"(",
"item",
",",
"target",
")",
";",
"reverseMap",
".",
"add",
"(",
"target",
",",
"item",
")",
";",
"}"
] | Maps item to target
@param item
@param target | [
"Maps",
"item",
"to",
"target"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java#L72-L76 |
151,221 | tvesalainen/util | util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java | SymmetricDifferenceMatcher.map | public void map(Collection<I> items, T target)
{
for (I item : items)
{
map(item, target);
}
} | java | public void map(Collection<I> items, T target)
{
for (I item : items)
{
map(item, target);
}
} | [
"public",
"void",
"map",
"(",
"Collection",
"<",
"I",
">",
"items",
",",
"T",
"target",
")",
"{",
"for",
"(",
"I",
"item",
":",
"items",
")",
"{",
"map",
"(",
"item",
",",
"target",
")",
";",
"}",
"}"
] | Maps collections of items to target
@param items
@param target | [
"Maps",
"collections",
"of",
"items",
"to",
"target"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java#L82-L88 |
151,222 | tvesalainen/util | util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java | SymmetricDifferenceMatcher.unmap | public void unmap(Collection<I> items, T target)
{
for (I item : items)
{
unmap(item, target);
}
} | java | public void unmap(Collection<I> items, T target)
{
for (I item : items)
{
unmap(item, target);
}
} | [
"public",
"void",
"unmap",
"(",
"Collection",
"<",
"I",
">",
"items",
",",
"T",
"target",
")",
"{",
"for",
"(",
"I",
"item",
":",
"items",
")",
"{",
"unmap",
"(",
"item",
",",
"target",
")",
";",
"}",
"}"
] | Remove collection mappings to target
@param items
@param target | [
"Remove",
"collection",
"mappings",
"to",
"target"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java#L104-L110 |
151,223 | tvesalainen/util | util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java | SymmetricDifferenceMatcher.unmap | public void unmap(T target)
{
Set<I> items = reverseMap.get(target);
items.forEach((i)->mapSet.removeItem(i, target));
reverseMap.remove(target);
} | java | public void unmap(T target)
{
Set<I> items = reverseMap.get(target);
items.forEach((i)->mapSet.removeItem(i, target));
reverseMap.remove(target);
} | [
"public",
"void",
"unmap",
"(",
"T",
"target",
")",
"{",
"Set",
"<",
"I",
">",
"items",
"=",
"reverseMap",
".",
"get",
"(",
"target",
")",
";",
"items",
".",
"forEach",
"(",
"(",
"i",
")",
"-",
">",
"mapSet",
".",
"removeItem",
"(",
"i",
",",
"... | Remove all mappings to target
@param target | [
"Remove",
"all",
"mappings",
"to",
"target"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java#L115-L120 |
151,224 | tvesalainen/util | util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java | SymmetricDifferenceMatcher.match | public T match(Collection<I> items)
{
for (I item : items)
{
T match = match(item);
if (match != null)
{
return match;
}
}
return null;
} | java | public T match(Collection<I> items)
{
for (I item : items)
{
T match = match(item);
if (match != null)
{
return match;
}
}
return null;
} | [
"public",
"T",
"match",
"(",
"Collection",
"<",
"I",
">",
"items",
")",
"{",
"for",
"(",
"I",
"item",
":",
"items",
")",
"{",
"T",
"match",
"=",
"match",
"(",
"item",
")",
";",
"if",
"(",
"match",
"!=",
"null",
")",
"{",
"return",
"match",
";",... | Returns target if one of collection items match. Otherwise returns null.
Matched targets mappings are removed.
@param items
@return | [
"Returns",
"target",
"if",
"one",
"of",
"collection",
"items",
"match",
".",
"Otherwise",
"returns",
"null",
".",
"Matched",
"targets",
"mappings",
"are",
"removed",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java#L127-L138 |
151,225 | tvesalainen/util | util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java | SymmetricDifferenceMatcher.match | public T match(I item)
{
Set<T> set = mapSet.get(item);
if (set.size() == 1)
{
T match = set.iterator().next();
unmap(match);
return match;
}
return null;
} | java | public T match(I item)
{
Set<T> set = mapSet.get(item);
if (set.size() == 1)
{
T match = set.iterator().next();
unmap(match);
return match;
}
return null;
} | [
"public",
"T",
"match",
"(",
"I",
"item",
")",
"{",
"Set",
"<",
"T",
">",
"set",
"=",
"mapSet",
".",
"get",
"(",
"item",
")",
";",
"if",
"(",
"set",
".",
"size",
"(",
")",
"==",
"1",
")",
"{",
"T",
"match",
"=",
"set",
".",
"iterator",
"(",... | Returns target if item match. Otherwise returns null.
Matched targets mappings are removed.
@param item
@return | [
"Returns",
"target",
"if",
"item",
"match",
".",
"Otherwise",
"returns",
"null",
".",
"Matched",
"targets",
"mappings",
"are",
"removed",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java#L145-L155 |
151,226 | tvesalainen/util | util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java | SymmetricDifferenceMatcher.match | public <A> void match(Map<A,? extends Collection<I>> samples, BiConsumer<T, A> consumer)
{
Map<A,Collection<I>> m = new HashMap<>(samples);
boolean cont = true;
while (cont)
{
cont = false;
Iterator<Entry<A, Collection<I>>> iterator = m.entrySet().itera... | java | public <A> void match(Map<A,? extends Collection<I>> samples, BiConsumer<T, A> consumer)
{
Map<A,Collection<I>> m = new HashMap<>(samples);
boolean cont = true;
while (cont)
{
cont = false;
Iterator<Entry<A, Collection<I>>> iterator = m.entrySet().itera... | [
"public",
"<",
"A",
">",
"void",
"match",
"(",
"Map",
"<",
"A",
",",
"?",
"extends",
"Collection",
"<",
"I",
">",
">",
"samples",
",",
"BiConsumer",
"<",
"T",
",",
"A",
">",
"consumer",
")",
"{",
"Map",
"<",
"A",
",",
"Collection",
"<",
"I",
">... | Matches A objects to T targets. Each A is mapped to subset of items. Each
match is passed to consumer. Map is traversed as long as there are matches.
Each match will remove targets mappings.
@param <A>
@param samples
@param consumer | [
"Matches",
"A",
"objects",
"to",
"T",
"targets",
".",
"Each",
"A",
"is",
"mapped",
"to",
"subset",
"of",
"items",
".",
"Each",
"match",
"is",
"passed",
"to",
"consumer",
".",
"Map",
"is",
"traversed",
"as",
"long",
"as",
"there",
"are",
"matches",
".",... | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/SymmetricDifferenceMatcher.java#L164-L184 |
151,227 | tacitknowledge/discovery | src/main/java/com/tacitknowledge/util/discovery/ClassDiscoveryUtil.java | ClassDiscoveryUtil.getResources | public static String[] getResources(String basePath, String regex)
{
RegexResourceCriteria criteria = new RegexResourceCriteria(regex);
String[] resourcesNames = classpathResources.getResources(basePath, criteria);
return resourcesNames;
} | java | public static String[] getResources(String basePath, String regex)
{
RegexResourceCriteria criteria = new RegexResourceCriteria(regex);
String[] resourcesNames = classpathResources.getResources(basePath, criteria);
return resourcesNames;
} | [
"public",
"static",
"String",
"[",
"]",
"getResources",
"(",
"String",
"basePath",
",",
"String",
"regex",
")",
"{",
"RegexResourceCriteria",
"criteria",
"=",
"new",
"RegexResourceCriteria",
"(",
"regex",
")",
";",
"String",
"[",
"]",
"resourcesNames",
"=",
"c... | Returns the names of the resources in the given directory that match the
given regular expression.
@param basePath the directory containing the resources
@param regex the regular expression used to filter the resources
@return the names of the resources in the given directory that match the
given regular expression | [
"Returns",
"the",
"names",
"of",
"the",
"resources",
"in",
"the",
"given",
"directory",
"that",
"match",
"the",
"given",
"regular",
"expression",
"."
] | 700f5492c9cb5c0146d684acb38b71fd4ef4e97a | https://github.com/tacitknowledge/discovery/blob/700f5492c9cb5c0146d684acb38b71fd4ef4e97a/src/main/java/com/tacitknowledge/util/discovery/ClassDiscoveryUtil.java#L82-L87 |
151,228 | tacitknowledge/discovery | src/main/java/com/tacitknowledge/util/discovery/ClassDiscoveryUtil.java | ClassDiscoveryUtil.getClasses | public static Class[] getClasses(String basePackage, Class requiredInterface)
{
return getClasses(basePackage, new Class[] {requiredInterface});
} | java | public static Class[] getClasses(String basePackage, Class requiredInterface)
{
return getClasses(basePackage, new Class[] {requiredInterface});
} | [
"public",
"static",
"Class",
"[",
"]",
"getClasses",
"(",
"String",
"basePackage",
",",
"Class",
"requiredInterface",
")",
"{",
"return",
"getClasses",
"(",
"basePackage",
",",
"new",
"Class",
"[",
"]",
"{",
"requiredInterface",
"}",
")",
";",
"}"
] | Returns an array of concrete classes in the given package that implement the
specified interface.
@param basePackage the name of the package containing the classes to discover
@param requiredInterface the inteface that the returned classes must implement
@return an array of concrete classes in the given package that... | [
"Returns",
"an",
"array",
"of",
"concrete",
"classes",
"in",
"the",
"given",
"package",
"that",
"implement",
"the",
"specified",
"interface",
"."
] | 700f5492c9cb5c0146d684acb38b71fd4ef4e97a | https://github.com/tacitknowledge/discovery/blob/700f5492c9cb5c0146d684acb38b71fd4ef4e97a/src/main/java/com/tacitknowledge/util/discovery/ClassDiscoveryUtil.java#L98-L101 |
151,229 | tacitknowledge/discovery | src/main/java/com/tacitknowledge/util/discovery/ClassDiscoveryUtil.java | ClassDiscoveryUtil.getClasses | public static Class[] getClasses(String basePackage, Class[] requiredInterfaces)
{
List classes = new ArrayList();
ClassCriteria criteria = new ClassCriteria(requiredInterfaces);
String basePath = basePackage.replace('.', File.separatorChar);
String[] resourcesNames = classpathResour... | java | public static Class[] getClasses(String basePackage, Class[] requiredInterfaces)
{
List classes = new ArrayList();
ClassCriteria criteria = new ClassCriteria(requiredInterfaces);
String basePath = basePackage.replace('.', File.separatorChar);
String[] resourcesNames = classpathResour... | [
"public",
"static",
"Class",
"[",
"]",
"getClasses",
"(",
"String",
"basePackage",
",",
"Class",
"[",
"]",
"requiredInterfaces",
")",
"{",
"List",
"classes",
"=",
"new",
"ArrayList",
"(",
")",
";",
"ClassCriteria",
"criteria",
"=",
"new",
"ClassCriteria",
"(... | Returns an array of concrete classes in the given package that implement
all of the specified interfaces.
@param basePackage the name of the package containing the classes to discover
@param requiredInterfaces the intefaces that the returned classes must implement
@return an array of concrete classes in the given pa... | [
"Returns",
"an",
"array",
"of",
"concrete",
"classes",
"in",
"the",
"given",
"package",
"that",
"implement",
"all",
"of",
"the",
"specified",
"interfaces",
"."
] | 700f5492c9cb5c0146d684acb38b71fd4ef4e97a | https://github.com/tacitknowledge/discovery/blob/700f5492c9cb5c0146d684acb38b71fd4ef4e97a/src/main/java/com/tacitknowledge/util/discovery/ClassDiscoveryUtil.java#L112-L137 |
151,230 | tacitknowledge/discovery | src/main/java/com/tacitknowledge/util/discovery/ClassDiscoveryUtil.java | ClassDiscoveryUtil.getClassName | public static String getClassName(String resourceName)
{
String className = resourceName.replace(File.separatorChar, '.');
if (className.length() > 7)
{
className = className.substring(0, className.length() - 6);
}
return className;
} | java | public static String getClassName(String resourceName)
{
String className = resourceName.replace(File.separatorChar, '.');
if (className.length() > 7)
{
className = className.substring(0, className.length() - 6);
}
return className;
} | [
"public",
"static",
"String",
"getClassName",
"(",
"String",
"resourceName",
")",
"{",
"String",
"className",
"=",
"resourceName",
".",
"replace",
"(",
"File",
".",
"separatorChar",
",",
"'",
"'",
")",
";",
"if",
"(",
"className",
".",
"length",
"(",
")",
... | Returns the fully qualified class name represented by the given resource.
@param resourceName the file name of the resource to convert to a class
name; may not be <code>null</code>
@return the fully qualified class name represented by the given resource | [
"Returns",
"the",
"fully",
"qualified",
"class",
"name",
"represented",
"by",
"the",
"given",
"resource",
"."
] | 700f5492c9cb5c0146d684acb38b71fd4ef4e97a | https://github.com/tacitknowledge/discovery/blob/700f5492c9cb5c0146d684acb38b71fd4ef4e97a/src/main/java/com/tacitknowledge/util/discovery/ClassDiscoveryUtil.java#L146-L154 |
151,231 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/ProxyTask.java | ProxyTask.getSessionFromPath | public BaseHolder getSessionFromPath(String strSessionPathID)
{
if (strSessionPathID == null)
return null;
BaseHolder rootHolder = null;
// Now, traverse the path
int iStartPosition = 0;
int iEndPosition = 0;
while (iEndPosition < strSessionPathID.length()... | java | public BaseHolder getSessionFromPath(String strSessionPathID)
{
if (strSessionPathID == null)
return null;
BaseHolder rootHolder = null;
// Now, traverse the path
int iStartPosition = 0;
int iEndPosition = 0;
while (iEndPosition < strSessionPathID.length()... | [
"public",
"BaseHolder",
"getSessionFromPath",
"(",
"String",
"strSessionPathID",
")",
"{",
"if",
"(",
"strSessionPathID",
"==",
"null",
")",
"return",
"null",
";",
"BaseHolder",
"rootHolder",
"=",
"null",
";",
"// Now, traverse the path",
"int",
"iStartPosition",
"=... | Look up this session in the hierarchy. | [
"Look",
"up",
"this",
"session",
"in",
"the",
"hierarchy",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/ProxyTask.java#L214-L237 |
151,232 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/ProxyTask.java | ProxyTask.getApplicationProperties | public Map<String, Object> getApplicationProperties(Map<String, Object> properties)
{
if (properties == null)
return null;
Map<String, Object> propApp = new Hashtable<String,Object>();
if (properties.get(DBParams.LANGUAGE) != null)
propApp.put(DBParams.LANGUAGE, prope... | java | public Map<String, Object> getApplicationProperties(Map<String, Object> properties)
{
if (properties == null)
return null;
Map<String, Object> propApp = new Hashtable<String,Object>();
if (properties.get(DBParams.LANGUAGE) != null)
propApp.put(DBParams.LANGUAGE, prope... | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"getApplicationProperties",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"{",
"if",
"(",
"properties",
"==",
"null",
")",
"return",
"null",
";",
"Map",
"<",
"String",
",",
"Object",... | Get application properties from proxy properties.
@return Just the application properties | [
"Get",
"application",
"properties",
"from",
"proxy",
"properties",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/ProxyTask.java#L329-L339 |
151,233 | js-lib-com/commons | src/main/java/js/util/FilteredStrings.java | FilteredStrings.add | @Override
public boolean add(String string) {
if (filter.accept(string)) {
list.add(string);
return true;
}
return false;
} | java | @Override
public boolean add(String string) {
if (filter.accept(string)) {
list.add(string);
return true;
}
return false;
} | [
"@",
"Override",
"public",
"boolean",
"add",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"filter",
".",
"accept",
"(",
"string",
")",
")",
"{",
"list",
".",
"add",
"(",
"string",
")",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
] | Add a string if it matches this filter pattern.
@param string string to add to this strings list.
@return true if given <code>string</code> argument matches the pattern and was added to this strings list. | [
"Add",
"a",
"string",
"if",
"it",
"matches",
"this",
"filter",
"pattern",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/FilteredStrings.java#L53-L60 |
151,234 | jbundle/jbundle | thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/sort/SortableHeaderRenderer.java | SortableHeaderRenderer.getTableCellRendererComponent | public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
Component c = tableCellRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
... | java | public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
Component c = tableCellRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
... | [
"public",
"Component",
"getTableCellRendererComponent",
"(",
"JTable",
"table",
",",
"Object",
"value",
",",
"boolean",
"isSelected",
",",
"boolean",
"hasFocus",
",",
"int",
"row",
",",
"int",
"column",
")",
"{",
"Component",
"c",
"=",
"tableCellRenderer",
".",
... | Tweek the column label if this column is sorted. | [
"Tweek",
"the",
"column",
"label",
"if",
"this",
"column",
"is",
"sorted",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/sort/SortableHeaderRenderer.java#L47-L71 |
151,235 | jbundle/jbundle | main/db/src/main/java/org/jbundle/main/db/base/ContactType.java | ContactType.getContactTypeFromID | public String getContactTypeFromID(String strContactTypeID)
{
if (Utility.isNumeric(strContactTypeID))
{
int iOldKeyArea = this.getDefaultOrder();
this.setKeyArea(ContactType.ID_KEY);
this.getCounterField().setString(strContactTypeID);
try {
... | java | public String getContactTypeFromID(String strContactTypeID)
{
if (Utility.isNumeric(strContactTypeID))
{
int iOldKeyArea = this.getDefaultOrder();
this.setKeyArea(ContactType.ID_KEY);
this.getCounterField().setString(strContactTypeID);
try {
... | [
"public",
"String",
"getContactTypeFromID",
"(",
"String",
"strContactTypeID",
")",
"{",
"if",
"(",
"Utility",
".",
"isNumeric",
"(",
"strContactTypeID",
")",
")",
"{",
"int",
"iOldKeyArea",
"=",
"this",
".",
"getDefaultOrder",
"(",
")",
";",
"this",
".",
"s... | GetContactTypeFromID Method. | [
"GetContactTypeFromID",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/db/base/ContactType.java#L162-L179 |
151,236 | jbundle/jbundle | main/db/src/main/java/org/jbundle/main/db/base/ContactType.java | ContactType.makeRecordFromRecordName | public Record makeRecordFromRecordName(String strRecordName, RecordOwner recordOwner)
{
int iOldKeyArea = this.getDefaultOrder();
try {
this.addNew();
this.setKeyArea(ContactType.CODE_KEY);
this.getField(ContactType.CODE).setString(strRecordName);
if (... | java | public Record makeRecordFromRecordName(String strRecordName, RecordOwner recordOwner)
{
int iOldKeyArea = this.getDefaultOrder();
try {
this.addNew();
this.setKeyArea(ContactType.CODE_KEY);
this.getField(ContactType.CODE).setString(strRecordName);
if (... | [
"public",
"Record",
"makeRecordFromRecordName",
"(",
"String",
"strRecordName",
",",
"RecordOwner",
"recordOwner",
")",
"{",
"int",
"iOldKeyArea",
"=",
"this",
".",
"getDefaultOrder",
"(",
")",
";",
"try",
"{",
"this",
".",
"addNew",
"(",
")",
";",
"this",
"... | MakeRecordFromRecordName Method. | [
"MakeRecordFromRecordName",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/db/base/ContactType.java#L183-L196 |
151,237 | jbundle/jbundle | main/db/src/main/java/org/jbundle/main/db/base/ContactType.java | ContactType.makeContactRecord | public Record makeContactRecord(RecordOwner recordOwner)
{
String strRecordClass = this.getField(ContactType.RECORD_CLASS).toString();
return Record.makeRecordFromClassName(strRecordClass, recordOwner, true, false);
} | java | public Record makeContactRecord(RecordOwner recordOwner)
{
String strRecordClass = this.getField(ContactType.RECORD_CLASS).toString();
return Record.makeRecordFromClassName(strRecordClass, recordOwner, true, false);
} | [
"public",
"Record",
"makeContactRecord",
"(",
"RecordOwner",
"recordOwner",
")",
"{",
"String",
"strRecordClass",
"=",
"this",
".",
"getField",
"(",
"ContactType",
".",
"RECORD_CLASS",
")",
".",
"toString",
"(",
")",
";",
"return",
"Record",
".",
"makeRecordFrom... | MakeContactRecord Method. | [
"MakeContactRecord",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/db/base/ContactType.java#L200-L204 |
151,238 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageTransport.java | MessageTransport.isDirectTransport | public static boolean isDirectTransport(String strTransportCode)
{
if ((MessageTransport.DIRECT.equalsIgnoreCase(strTransportCode))
|| (MessageTransport.SERVER.equalsIgnoreCase(strTransportCode))
|| (MessageTransport.CLIENT.equalsIgnoreCase(strTransportCode)))
return ... | java | public static boolean isDirectTransport(String strTransportCode)
{
if ((MessageTransport.DIRECT.equalsIgnoreCase(strTransportCode))
|| (MessageTransport.SERVER.equalsIgnoreCase(strTransportCode))
|| (MessageTransport.CLIENT.equalsIgnoreCase(strTransportCode)))
return ... | [
"public",
"static",
"boolean",
"isDirectTransport",
"(",
"String",
"strTransportCode",
")",
"{",
"if",
"(",
"(",
"MessageTransport",
".",
"DIRECT",
".",
"equalsIgnoreCase",
"(",
"strTransportCode",
")",
")",
"||",
"(",
"MessageTransport",
".",
"SERVER",
".",
"eq... | Is this transport code a direct type?. | [
"Is",
"this",
"transport",
"code",
"a",
"direct",
"type?",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageTransport.java#L208-L215 |
151,239 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageTransport.java | MessageTransport.createMessageTransport | public Object createMessageTransport(String messageTransportType, Task task)
{
MessageTransport messageTransport = this.getMessageTransport(messageTransportType);
String className = null;
if (messageTransport != null)
className = ((PropertiesField)messageTransport.getField(Messag... | java | public Object createMessageTransport(String messageTransportType, Task task)
{
MessageTransport messageTransport = this.getMessageTransport(messageTransportType);
String className = null;
if (messageTransport != null)
className = ((PropertiesField)messageTransport.getField(Messag... | [
"public",
"Object",
"createMessageTransport",
"(",
"String",
"messageTransportType",
",",
"Task",
"task",
")",
"{",
"MessageTransport",
"messageTransport",
"=",
"this",
".",
"getMessageTransport",
"(",
"messageTransportType",
")",
";",
"String",
"className",
"=",
"nul... | Get the message transport for this type
@param messageTransportType
@returns The concrete BaseMessageTransport implementation. | [
"Get",
"the",
"message",
"transport",
"for",
"this",
"type"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageTransport.java#L221-L237 |
151,240 | 99soft/sameas4j | src/main/java/org/nnsoft/sameas4j/SameAsServiceImpl.java | SameAsServiceImpl.invokeURL | private <T> T invokeURL(String toBeInvoked, Class<T> returnType) throws SameAsServiceException {
URL url;
try {
url = new URL(toBeInvoked);
} catch (MalformedURLException e) {
throw new SameAsServiceException("An error occurred while building the URL '"
... | java | private <T> T invokeURL(String toBeInvoked, Class<T> returnType) throws SameAsServiceException {
URL url;
try {
url = new URL(toBeInvoked);
} catch (MalformedURLException e) {
throw new SameAsServiceException("An error occurred while building the URL '"
... | [
"private",
"<",
"T",
">",
"T",
"invokeURL",
"(",
"String",
"toBeInvoked",
",",
"Class",
"<",
"T",
">",
"returnType",
")",
"throws",
"SameAsServiceException",
"{",
"URL",
"url",
";",
"try",
"{",
"url",
"=",
"new",
"URL",
"(",
"toBeInvoked",
")",
";",
"}... | Invokes a Sameas.org service URL and parses the JSON response.
@param <T> the expected return type.
@param toBeInvoked the service URL has to be invoked.
@param returnType the type the JSON response has to be bind to.
@return the bound object.
@throws SameAsServiceException is any error occurs. | [
"Invokes",
"a",
"Sameas",
".",
"org",
"service",
"URL",
"and",
"parses",
"the",
"JSON",
"response",
"."
] | d6fcb6a137c5a80278001a6d11ee917be4f5ea41 | https://github.com/99soft/sameas4j/blob/d6fcb6a137c5a80278001a6d11ee917be4f5ea41/src/main/java/org/nnsoft/sameas4j/SameAsServiceImpl.java#L111-L176 |
151,241 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBaseScreen.java | JBaseScreen.disconnectControls | public void disconnectControls(FieldList fieldList)
{
if (fieldList == null)
{ // Disconnect controls from all fieldlists
for (int i = 0; ; i++)
{ // Step 1 - Disconnect the controls from the fields
fieldList = this.getFieldList(i);
if ... | java | public void disconnectControls(FieldList fieldList)
{
if (fieldList == null)
{ // Disconnect controls from all fieldlists
for (int i = 0; ; i++)
{ // Step 1 - Disconnect the controls from the fields
fieldList = this.getFieldList(i);
if ... | [
"public",
"void",
"disconnectControls",
"(",
"FieldList",
"fieldList",
")",
"{",
"if",
"(",
"fieldList",
"==",
"null",
")",
"{",
"// Disconnect controls from all fieldlists",
"for",
"(",
"int",
"i",
"=",
"0",
";",
";",
"i",
"++",
")",
"{",
"// Step 1 - Disconn... | Go through all the fields in this record and remove all their components.
Free the component if they are freeable.
@param fieldList The record to remove the field component references from. | [
"Go",
"through",
"all",
"the",
"fields",
"in",
"this",
"record",
"and",
"remove",
"all",
"their",
"components",
".",
"Free",
"the",
"component",
"if",
"they",
"are",
"freeable",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBaseScreen.java#L223-L256 |
151,242 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBaseScreen.java | JBaseScreen.doAction | public boolean doAction(String strAction, int iOptions)
{
if (strAction == Constants.SUBMIT)
{
this.controlsToFields(); // Move screen data to record
}
else if (strAction == Constants.RESET)
{
this.resetFields();
}
return super.doAct... | java | public boolean doAction(String strAction, int iOptions)
{
if (strAction == Constants.SUBMIT)
{
this.controlsToFields(); // Move screen data to record
}
else if (strAction == Constants.RESET)
{
this.resetFields();
}
return super.doAct... | [
"public",
"boolean",
"doAction",
"(",
"String",
"strAction",
",",
"int",
"iOptions",
")",
"{",
"if",
"(",
"strAction",
"==",
"Constants",
".",
"SUBMIT",
")",
"{",
"this",
".",
"controlsToFields",
"(",
")",
";",
"// Move screen data to record",
"}",
"else",
"... | Process this action.
This class calls controltofields on submit and resetfields on reset.
@param strAction The message or command to propagate. | [
"Process",
"this",
"action",
".",
"This",
"class",
"calls",
"controltofields",
"on",
"submit",
"and",
"resetfields",
"on",
"reset",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBaseScreen.java#L291-L302 |
151,243 | FrodeRanders/java-vopn | src/main/java/org/gautelis/vopn/lang/DynamicLoader.java | DynamicLoader.createObject | public C createObject(String className, Class clazz) throws ClassNotFoundException {
return createObject(className, clazz, /* no dynamic init */ null);
} | java | public C createObject(String className, Class clazz) throws ClassNotFoundException {
return createObject(className, clazz, /* no dynamic init */ null);
} | [
"public",
"C",
"createObject",
"(",
"String",
"className",
",",
"Class",
"clazz",
")",
"throws",
"ClassNotFoundException",
"{",
"return",
"createObject",
"(",
"className",
",",
"clazz",
",",
"/* no dynamic init */",
"null",
")",
";",
"}"
] | Creates an instance from a Class.
@param className name of class -- used for logging purposes and nothing else.
@param clazz the class template from which an object is wrought.
@throws ClassNotFoundException if class could not be found. | [
"Creates",
"an",
"instance",
"from",
"a",
"Class",
"."
] | 4c7b2f90201327af4eaa3cd46b3fee68f864e5cc | https://github.com/FrodeRanders/java-vopn/blob/4c7b2f90201327af4eaa3cd46b3fee68f864e5cc/src/main/java/org/gautelis/vopn/lang/DynamicLoader.java#L329-L331 |
151,244 | FrodeRanders/java-vopn | src/main/java/org/gautelis/vopn/lang/DynamicLoader.java | DynamicLoader.createMethod | public Method createMethod(C object, String methodName, Class[] parameterTypes) throws NoSuchMethodException {
Class clazz = object.getClass();
try {
@SuppressWarnings("unchecked")
Method method = clazz.getMethod(methodName, parameterTypes);
return method;
}... | java | public Method createMethod(C object, String methodName, Class[] parameterTypes) throws NoSuchMethodException {
Class clazz = object.getClass();
try {
@SuppressWarnings("unchecked")
Method method = clazz.getMethod(methodName, parameterTypes);
return method;
}... | [
"public",
"Method",
"createMethod",
"(",
"C",
"object",
",",
"String",
"methodName",
",",
"Class",
"[",
"]",
"parameterTypes",
")",
"throws",
"NoSuchMethodException",
"{",
"Class",
"clazz",
"=",
"object",
".",
"getClass",
"(",
")",
";",
"try",
"{",
"@",
"S... | Creates a method for a class.
@param object the object to which the method belongs.
@param methodName name of method.
@param parameterTypes an array of parameter types for the method.
@throws NoSuchMethodException if method is not found on object. | [
"Creates",
"a",
"method",
"for",
"a",
"class",
"."
] | 4c7b2f90201327af4eaa3cd46b3fee68f864e5cc | https://github.com/FrodeRanders/java-vopn/blob/4c7b2f90201327af4eaa3cd46b3fee68f864e5cc/src/main/java/org/gautelis/vopn/lang/DynamicLoader.java#L340-L354 |
151,245 | caspervg/SC4D-LEX4J | lex4j/src/main/java/net/caspervg/lex4j/route/SearchRoute.java | SearchRoute.addFilter | public void addFilter(Filter filter, Object value) {
if (filter.getParameterClass().isInstance(value)) {
parameters.put(filter.repr(), value);
} else {
String msg = "You need to supply the correct parameter for the " +
filter + " filter. Expecting a(n) " + filt... | java | public void addFilter(Filter filter, Object value) {
if (filter.getParameterClass().isInstance(value)) {
parameters.put(filter.repr(), value);
} else {
String msg = "You need to supply the correct parameter for the " +
filter + " filter. Expecting a(n) " + filt... | [
"public",
"void",
"addFilter",
"(",
"Filter",
"filter",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"filter",
".",
"getParameterClass",
"(",
")",
".",
"isInstance",
"(",
"value",
")",
")",
"{",
"parameters",
".",
"put",
"(",
"filter",
".",
"repr",
"("... | Adds a parameter to the search operation
@param filter the filter to be added
@param value value of the filter to be added. String.valueOf() of this Object is used for the search. | [
"Adds",
"a",
"parameter",
"to",
"the",
"search",
"operation"
] | 3d086ec70c817119a88573c2e23af27276cdb1d6 | https://github.com/caspervg/SC4D-LEX4J/blob/3d086ec70c817119a88573c2e23af27276cdb1d6/lex4j/src/main/java/net/caspervg/lex4j/route/SearchRoute.java#L45-L53 |
151,246 | caspervg/SC4D-LEX4J | lex4j/src/main/java/net/caspervg/lex4j/route/SearchRoute.java | SearchRoute.doSearch | public List<Lot> doSearch(ExtraLotInfo extras) {
ClientResource resource = new ClientResource(Route.SEARCH.url());
Route.handleExtraInfo(resource, extras, auth);
Route.addParameters(resource.getReference(), this.parameters);
try {
Representation repr = resource.get();
... | java | public List<Lot> doSearch(ExtraLotInfo extras) {
ClientResource resource = new ClientResource(Route.SEARCH.url());
Route.handleExtraInfo(resource, extras, auth);
Route.addParameters(resource.getReference(), this.parameters);
try {
Representation repr = resource.get();
... | [
"public",
"List",
"<",
"Lot",
">",
"doSearch",
"(",
"ExtraLotInfo",
"extras",
")",
"{",
"ClientResource",
"resource",
"=",
"new",
"ClientResource",
"(",
"Route",
".",
"SEARCH",
".",
"url",
"(",
")",
")",
";",
"Route",
".",
"handleExtraInfo",
"(",
"resource... | Performs the search operation based on filters that are currently active.
@param extras Which extra lot information should be included in each search result
@return the lots/files that were returned by the search operation
@see ExtraLotInfo | [
"Performs",
"the",
"search",
"operation",
"based",
"on",
"filters",
"that",
"are",
"currently",
"active",
"."
] | 3d086ec70c817119a88573c2e23af27276cdb1d6 | https://github.com/caspervg/SC4D-LEX4J/blob/3d086ec70c817119a88573c2e23af27276cdb1d6/lex4j/src/main/java/net/caspervg/lex4j/route/SearchRoute.java#L89-L101 |
151,247 | tvesalainen/util | util/src/main/java/org/vesalainen/util/fi/StringParser.java | StringParser.skipped | public String skipped()
{
int start = 0;
if (stack.size() > 1)
{
start = stack.get(stack.size() - 2).end();
}
int end = stack.get(stack.size() - 1).start();
return text.subSequence(start, end).toString();
} | java | public String skipped()
{
int start = 0;
if (stack.size() > 1)
{
start = stack.get(stack.size() - 2).end();
}
int end = stack.get(stack.size() - 1).start();
return text.subSequence(start, end).toString();
} | [
"public",
"String",
"skipped",
"(",
")",
"{",
"int",
"start",
"=",
"0",
";",
"if",
"(",
"stack",
".",
"size",
"(",
")",
">",
"1",
")",
"{",
"start",
"=",
"stack",
".",
"get",
"(",
"stack",
".",
"size",
"(",
")",
"-",
"2",
")",
".",
"end",
"... | Returns the skipped text after successfull call to find
@return | [
"Returns",
"the",
"skipped",
"text",
"after",
"successfull",
"call",
"to",
"find"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/fi/StringParser.java#L111-L120 |
151,248 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultLorem.java | JDefaultLorem.paragraph | public static String paragraph(int sentenceCount, boolean supplemental, int randomSentencesToAdd) {
String paragraphString = sentences(sentenceCount + RandomUtils.nextInt(randomSentencesToAdd), supplemental);
return paragraphString;
} | java | public static String paragraph(int sentenceCount, boolean supplemental, int randomSentencesToAdd) {
String paragraphString = sentences(sentenceCount + RandomUtils.nextInt(randomSentencesToAdd), supplemental);
return paragraphString;
} | [
"public",
"static",
"String",
"paragraph",
"(",
"int",
"sentenceCount",
",",
"boolean",
"supplemental",
",",
"int",
"randomSentencesToAdd",
")",
"{",
"String",
"paragraphString",
"=",
"sentences",
"(",
"sentenceCount",
"+",
"RandomUtils",
".",
"nextInt",
"(",
"ran... | random lorem paragraph
@param sentenceCount min number of sentences
@param supplemental if true add additional words
@param randomSentencesToAdd max random number of sentences to add
@return paragraph string | [
"random",
"lorem",
"paragraph"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultLorem.java#L72-L76 |
151,249 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultLorem.java | JDefaultLorem.words | public static List<String> words(int count, boolean supplemental) {
List<String> words = new ArrayList<String>();
for (int i = 0; i < count; i++) {
String wordString = word();
if (supplemental) {
wordString = wordString + fetchString("lorem.supplemental");
... | java | public static List<String> words(int count, boolean supplemental) {
List<String> words = new ArrayList<String>();
for (int i = 0; i < count; i++) {
String wordString = word();
if (supplemental) {
wordString = wordString + fetchString("lorem.supplemental");
... | [
"public",
"static",
"List",
"<",
"String",
">",
"words",
"(",
"int",
"count",
",",
"boolean",
"supplemental",
")",
"{",
"List",
"<",
"String",
">",
"words",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0... | generate a list of random words
@param count of words to add to the list
@param supplemental if true add additional word to each word
@return word list | [
"generate",
"a",
"list",
"of",
"random",
"words"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultLorem.java#L181-L192 |
151,250 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.getOwner | public static final String getOwner(Path file) throws IOException
{
if (supports("posix"))
{
UserPrincipal owner = (UserPrincipal) Files.getAttribute(file, "posix:owner");
return owner.getName();
}
else
{
JavaLogging.getLogger(Posi... | java | public static final String getOwner(Path file) throws IOException
{
if (supports("posix"))
{
UserPrincipal owner = (UserPrincipal) Files.getAttribute(file, "posix:owner");
return owner.getName();
}
else
{
JavaLogging.getLogger(Posi... | [
"public",
"static",
"final",
"String",
"getOwner",
"(",
"Path",
"file",
")",
"throws",
"IOException",
"{",
"if",
"(",
"supports",
"(",
"\"posix\"",
")",
")",
"{",
"UserPrincipal",
"owner",
"=",
"(",
"UserPrincipal",
")",
"Files",
".",
"getAttribute",
"(",
... | Return linux file owner name. Or ""
@param file
@return
@throws IOException | [
"Return",
"linux",
"file",
"owner",
"name",
".",
"Or"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L92-L104 |
151,251 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.getGroup | public static final String getGroup(Path file) throws IOException
{
if (supports("posix"))
{
PosixFileAttributeView view = Files.getFileAttributeView(file, PosixFileAttributeView.class);
PosixFileAttributes attrs = view.readAttributes();
GroupPrincipal group... | java | public static final String getGroup(Path file) throws IOException
{
if (supports("posix"))
{
PosixFileAttributeView view = Files.getFileAttributeView(file, PosixFileAttributeView.class);
PosixFileAttributes attrs = view.readAttributes();
GroupPrincipal group... | [
"public",
"static",
"final",
"String",
"getGroup",
"(",
"Path",
"file",
")",
"throws",
"IOException",
"{",
"if",
"(",
"supports",
"(",
"\"posix\"",
")",
")",
"{",
"PosixFileAttributeView",
"view",
"=",
"Files",
".",
"getFileAttributeView",
"(",
"file",
",",
... | Return linux file group name. Or ""
@param file
@return
@throws IOException | [
"Return",
"linux",
"file",
"group",
"name",
".",
"Or"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L111-L125 |
151,252 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.permsPart | private static String permsPart(String perms)
{
int length = perms.length();
if (length > 10 || length < 9)
{
throw new IllegalArgumentException(perms+" not permission. E.g. -rwxr--r--");
}
return length == 10 ? perms.substring(1) : perms;
} | java | private static String permsPart(String perms)
{
int length = perms.length();
if (length > 10 || length < 9)
{
throw new IllegalArgumentException(perms+" not permission. E.g. -rwxr--r--");
}
return length == 10 ? perms.substring(1) : perms;
} | [
"private",
"static",
"String",
"permsPart",
"(",
"String",
"perms",
")",
"{",
"int",
"length",
"=",
"perms",
".",
"length",
"(",
")",
";",
"if",
"(",
"length",
">",
"10",
"||",
"length",
"<",
"9",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"... | Returns permission part of mode string
@param perms
@return | [
"Returns",
"permission",
"part",
"of",
"mode",
"string"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L131-L139 |
151,253 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.getModeString | public static final String getModeString(Path path) throws IOException
{
char letter = getFileTypeLetter(path);
if (supports("posix"))
{
Set<PosixFilePermission> perms = Files.getPosixFilePermissions(path);
return letter+PosixFilePermissions.toString(perms);
... | java | public static final String getModeString(Path path) throws IOException
{
char letter = getFileTypeLetter(path);
if (supports("posix"))
{
Set<PosixFilePermission> perms = Files.getPosixFilePermissions(path);
return letter+PosixFilePermissions.toString(perms);
... | [
"public",
"static",
"final",
"String",
"getModeString",
"(",
"Path",
"path",
")",
"throws",
"IOException",
"{",
"char",
"letter",
"=",
"getFileTypeLetter",
"(",
"path",
")",
";",
"if",
"(",
"supports",
"(",
"\"posix\"",
")",
")",
"{",
"Set",
"<",
"PosixFil... | Returns mode string for path. Real mode for linux. Others guess work.
@param path
@return
@throws IOException | [
"Returns",
"mode",
"string",
"for",
"path",
".",
"Real",
"mode",
"for",
"linux",
".",
"Others",
"guess",
"work",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L146-L167 |
151,254 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.setGroup | public static final void setGroup(String name, Path... files) throws IOException
{
if (supports("posix"))
{
for (Path file : files)
{
FileSystem fs = file.getFileSystem();
UserPrincipalLookupService upls = fs.getUserPrincipalLookupServic... | java | public static final void setGroup(String name, Path... files) throws IOException
{
if (supports("posix"))
{
for (Path file : files)
{
FileSystem fs = file.getFileSystem();
UserPrincipalLookupService upls = fs.getUserPrincipalLookupServic... | [
"public",
"static",
"final",
"void",
"setGroup",
"(",
"String",
"name",
",",
"Path",
"...",
"files",
")",
"throws",
"IOException",
"{",
"if",
"(",
"supports",
"(",
"\"posix\"",
")",
")",
"{",
"for",
"(",
"Path",
"file",
":",
"files",
")",
"{",
"FileSys... | Change group of given files. Works only in linux
@param name
@param files
@throws IOException
@see org.vesalainen.util.OSProcess#call(java.lang.String...) | [
"Change",
"group",
"of",
"given",
"files",
".",
"Works",
"only",
"in",
"linux"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L175-L192 |
151,255 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.setOwner | public static final void setOwner(String name, Path... files) throws IOException
{
if (supports("posix"))
{
for (Path file : files)
{
FileSystem fs = file.getFileSystem();
UserPrincipalLookupService upls = fs.getUserPrincipalLookupServic... | java | public static final void setOwner(String name, Path... files) throws IOException
{
if (supports("posix"))
{
for (Path file : files)
{
FileSystem fs = file.getFileSystem();
UserPrincipalLookupService upls = fs.getUserPrincipalLookupServic... | [
"public",
"static",
"final",
"void",
"setOwner",
"(",
"String",
"name",
",",
"Path",
"...",
"files",
")",
"throws",
"IOException",
"{",
"if",
"(",
"supports",
"(",
"\"posix\"",
")",
")",
"{",
"for",
"(",
"Path",
"file",
":",
"files",
")",
"{",
"FileSys... | Change user of given files. Works only in linux.
@param name
@param files
@throws IOException
@see java.nio.file.Files#setOwner(java.nio.file.Path, java.nio.file.attribute.UserPrincipal) | [
"Change",
"user",
"of",
"given",
"files",
".",
"Works",
"only",
"in",
"linux",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L200-L216 |
151,256 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.setPermission | public static final void setPermission(Path path, String perms) throws IOException
{
checkFileType(path, perms);
if (supports("posix"))
{
Set<PosixFilePermission> posixPerms = PosixFilePermissions.fromString(permsPart(perms));
Files.setPosixFilePermissions(path,... | java | public static final void setPermission(Path path, String perms) throws IOException
{
checkFileType(path, perms);
if (supports("posix"))
{
Set<PosixFilePermission> posixPerms = PosixFilePermissions.fromString(permsPart(perms));
Files.setPosixFilePermissions(path,... | [
"public",
"static",
"final",
"void",
"setPermission",
"(",
"Path",
"path",
",",
"String",
"perms",
")",
"throws",
"IOException",
"{",
"checkFileType",
"(",
"path",
",",
"perms",
")",
";",
"if",
"(",
"supports",
"(",
"\"posix\"",
")",
")",
"{",
"Set",
"<"... | Set posix permissions if supported.
@param path
@param perms 10 or 9 length E.g. -rwxr--r--
@throws java.io.IOException | [
"Set",
"posix",
"permissions",
"if",
"supported",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L223-L235 |
151,257 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.checkFileType | public static final void checkFileType(Path path, String perms)
{
if (perms.length() != 10)
{
throw new IllegalArgumentException(perms+" not permission. E.g. -rwxr--r--");
}
switch (perms.charAt(0))
{
case '-':
if (!Files.isReg... | java | public static final void checkFileType(Path path, String perms)
{
if (perms.length() != 10)
{
throw new IllegalArgumentException(perms+" not permission. E.g. -rwxr--r--");
}
switch (perms.charAt(0))
{
case '-':
if (!Files.isReg... | [
"public",
"static",
"final",
"void",
"checkFileType",
"(",
"Path",
"path",
",",
"String",
"perms",
")",
"{",
"if",
"(",
"perms",
".",
"length",
"(",
")",
"!=",
"10",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"perms",
"+",
"\" not permissio... | Throws IllegalArgumentException if perms length != 10 or files type doesn't
match with permission.
@param path
@param perms | [
"Throws",
"IllegalArgumentException",
"if",
"perms",
"length",
"!",
"=",
"10",
"or",
"files",
"type",
"doesn",
"t",
"match",
"with",
"permission",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L242-L271 |
151,258 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.getFileTypeLetter | public static final char getFileTypeLetter(Path path)
{
if (Files.isRegularFile(path))
{
return '-';
}
if (Files.isDirectory(path))
{
return 'd';
}
if (Files.isSymbolicLink(path))
{
return 'l';
}... | java | public static final char getFileTypeLetter(Path path)
{
if (Files.isRegularFile(path))
{
return '-';
}
if (Files.isDirectory(path))
{
return 'd';
}
if (Files.isSymbolicLink(path))
{
return 'l';
}... | [
"public",
"static",
"final",
"char",
"getFileTypeLetter",
"(",
"Path",
"path",
")",
"{",
"if",
"(",
"Files",
".",
"isRegularFile",
"(",
"path",
")",
")",
"{",
"return",
"'",
"'",
";",
"}",
"if",
"(",
"Files",
".",
"isDirectory",
"(",
"path",
")",
")"... | Returns '-' for regular file, 'd' for directory or 'l' for symbolic link.
@param path
@return | [
"Returns",
"-",
"for",
"regular",
"file",
"d",
"for",
"directory",
"or",
"l",
"for",
"symbolic",
"link",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L277-L292 |
151,259 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.create | public static final Path create(Path path, String perms) throws IOException
{
return create(path, null, perms);
} | java | public static final Path create(Path path, String perms) throws IOException
{
return create(path, null, perms);
} | [
"public",
"static",
"final",
"Path",
"create",
"(",
"Path",
"path",
",",
"String",
"perms",
")",
"throws",
"IOException",
"{",
"return",
"create",
"(",
"path",
",",
"null",
",",
"perms",
")",
";",
"}"
] | Creates regular file or directory
@param path
@param perms E.g. -rwxr--r--
@return
@throws IOException | [
"Creates",
"regular",
"file",
"or",
"directory"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L300-L303 |
151,260 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.create | public static final Path create(Path path, Path target, String perms) throws IOException
{
FileAttribute<?>[] attrs = getFileAttributes(perms);
switch (perms.charAt(0))
{
case '-':
return Files.createFile(path, attrs);
case 'l':
... | java | public static final Path create(Path path, Path target, String perms) throws IOException
{
FileAttribute<?>[] attrs = getFileAttributes(perms);
switch (perms.charAt(0))
{
case '-':
return Files.createFile(path, attrs);
case 'l':
... | [
"public",
"static",
"final",
"Path",
"create",
"(",
"Path",
"path",
",",
"Path",
"target",
",",
"String",
"perms",
")",
"throws",
"IOException",
"{",
"FileAttribute",
"<",
"?",
">",
"[",
"]",
"attrs",
"=",
"getFileAttributes",
"(",
"perms",
")",
";",
"sw... | Creates regular file, directory or symbolic link
@param path
@param target Can be null
@param perms E.g. -rwxr--r--
@return
@throws IOException | [
"Creates",
"regular",
"file",
"directory",
"or",
"symbolic",
"link"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L312-L330 |
151,261 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.supports | public static final boolean supports(String view)
{
Set<String> supportedFileAttributeViews = FileSystems.getDefault().supportedFileAttributeViews();
return supportedFileAttributeViews.contains(view);
} | java | public static final boolean supports(String view)
{
Set<String> supportedFileAttributeViews = FileSystems.getDefault().supportedFileAttributeViews();
return supportedFileAttributeViews.contains(view);
} | [
"public",
"static",
"final",
"boolean",
"supports",
"(",
"String",
"view",
")",
"{",
"Set",
"<",
"String",
">",
"supportedFileAttributeViews",
"=",
"FileSystems",
".",
"getDefault",
"(",
")",
".",
"supportedFileAttributeViews",
"(",
")",
";",
"return",
"supporte... | Return true if default file system supports given view
@param view
@return | [
"Return",
"true",
"if",
"default",
"file",
"system",
"supports",
"given",
"view"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L635-L639 |
151,262 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.getOwnerAsAttribute | public static final FileAttribute<UserPrincipal> getOwnerAsAttribute(String owner) throws IOException
{
if (supports("posix"))
{
UserPrincipalLookupService upls = FileSystems.getDefault().getUserPrincipalLookupService();
UserPrincipal user = upls.lookupPrincipalByName(ow... | java | public static final FileAttribute<UserPrincipal> getOwnerAsAttribute(String owner) throws IOException
{
if (supports("posix"))
{
UserPrincipalLookupService upls = FileSystems.getDefault().getUserPrincipalLookupService();
UserPrincipal user = upls.lookupPrincipalByName(ow... | [
"public",
"static",
"final",
"FileAttribute",
"<",
"UserPrincipal",
">",
"getOwnerAsAttribute",
"(",
"String",
"owner",
")",
"throws",
"IOException",
"{",
"if",
"(",
"supports",
"(",
"\"posix\"",
")",
")",
"{",
"UserPrincipalLookupService",
"upls",
"=",
"FileSyste... | Return file owner as attribute if posix supported. Otherwise returns null.
@param owner
@return
@throws IOException | [
"Return",
"file",
"owner",
"as",
"attribute",
"if",
"posix",
"supported",
".",
"Otherwise",
"returns",
"null",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L646-L658 |
151,263 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java | PosixHelp.getGroupAsAttribute | public static final FileAttribute<GroupPrincipal> getGroupAsAttribute(String group) throws IOException
{
if (supports("posix"))
{
UserPrincipalLookupService upls = FileSystems.getDefault().getUserPrincipalLookupService();
GroupPrincipal grp = upls.lookupPrincipalByGroupN... | java | public static final FileAttribute<GroupPrincipal> getGroupAsAttribute(String group) throws IOException
{
if (supports("posix"))
{
UserPrincipalLookupService upls = FileSystems.getDefault().getUserPrincipalLookupService();
GroupPrincipal grp = upls.lookupPrincipalByGroupN... | [
"public",
"static",
"final",
"FileAttribute",
"<",
"GroupPrincipal",
">",
"getGroupAsAttribute",
"(",
"String",
"group",
")",
"throws",
"IOException",
"{",
"if",
"(",
"supports",
"(",
"\"posix\"",
")",
")",
"{",
"UserPrincipalLookupService",
"upls",
"=",
"FileSyst... | Return file group as attribute if posix supported. Otherwise returns null.
@param group
@return
@throws IOException | [
"Return",
"file",
"group",
"as",
"attribute",
"if",
"posix",
"supported",
".",
"Otherwise",
"returns",
"null",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L665-L677 |
151,264 | mlhartme/jasmin | src/main/java/net/oneandone/jasmin/model/Engine.java | Engine.request | public int request(String path, HttpServletResponse response, boolean gzip) throws IOException {
Content content;
byte[] bytes;
try {
content = doRequest(path);
} catch (IOException e) {
Servlet.LOG.error("request failed: " + e.getMessage(), e);
respo... | java | public int request(String path, HttpServletResponse response, boolean gzip) throws IOException {
Content content;
byte[] bytes;
try {
content = doRequest(path);
} catch (IOException e) {
Servlet.LOG.error("request failed: " + e.getMessage(), e);
respo... | [
"public",
"int",
"request",
"(",
"String",
"path",
",",
"HttpServletResponse",
"response",
",",
"boolean",
"gzip",
")",
"throws",
"IOException",
"{",
"Content",
"content",
";",
"byte",
"[",
"]",
"bytes",
";",
"try",
"{",
"content",
"=",
"doRequest",
"(",
"... | Output is prepared in-memory before the response is written because
a) that's the common case where output is cached. If output is to big for this, that whole caching doesn't work
b) I send sent proper error pages
c) I can return the number of bytes actually written
@return bytes written or -1 if building the module co... | [
"Output",
"is",
"prepared",
"in",
"-",
"memory",
"before",
"the",
"response",
"is",
"written",
"because",
"a",
")",
"that",
"s",
"the",
"common",
"case",
"where",
"output",
"is",
"cached",
".",
"If",
"output",
"is",
"to",
"big",
"for",
"this",
"that",
... | 1c44339a2555ae7ffb7d40fd3a7d80d81c3fc39d | https://github.com/mlhartme/jasmin/blob/1c44339a2555ae7ffb7d40fd3a7d80d81c3fc39d/src/main/java/net/oneandone/jasmin/model/Engine.java#L88-L122 |
151,265 | mlhartme/jasmin | src/main/java/net/oneandone/jasmin/model/Engine.java | Engine.request | public String request(String path) throws IOException {
Content content;
content = doRequest(path);
return new String(unzip(content.bytes), ENCODING);
} | java | public String request(String path) throws IOException {
Content content;
content = doRequest(path);
return new String(unzip(content.bytes), ENCODING);
} | [
"public",
"String",
"request",
"(",
"String",
"path",
")",
"throws",
"IOException",
"{",
"Content",
"content",
";",
"content",
"=",
"doRequest",
"(",
"path",
")",
";",
"return",
"new",
"String",
"(",
"unzip",
"(",
"content",
".",
"bytes",
")",
",",
"ENCO... | Convenience method for testing | [
"Convenience",
"method",
"for",
"testing"
] | 1c44339a2555ae7ffb7d40fd3a7d80d81c3fc39d | https://github.com/mlhartme/jasmin/blob/1c44339a2555ae7ffb7d40fd3a7d80d81c3fc39d/src/main/java/net/oneandone/jasmin/model/Engine.java#L139-L144 |
151,266 | mlhartme/jasmin | src/main/java/net/oneandone/jasmin/model/Engine.java | Engine.doComputeUnlimited | private Content doComputeUnlimited(String path, CountDownLatch gate) throws IOException {
long startContent;
long endContent;
ByteArrayOutputStream result;
References references;
byte[] bytes;
String hash;
Content content;
if (gate.getCount() != 1) {
... | java | private Content doComputeUnlimited(String path, CountDownLatch gate) throws IOException {
long startContent;
long endContent;
ByteArrayOutputStream result;
References references;
byte[] bytes;
String hash;
Content content;
if (gate.getCount() != 1) {
... | [
"private",
"Content",
"doComputeUnlimited",
"(",
"String",
"path",
",",
"CountDownLatch",
"gate",
")",
"throws",
"IOException",
"{",
"long",
"startContent",
";",
"long",
"endContent",
";",
"ByteArrayOutputStream",
"result",
";",
"References",
"references",
";",
"byt... | exactly one thread will invoke this method for one path | [
"exactly",
"one",
"thread",
"will",
"invoke",
"this",
"method",
"for",
"one",
"path"
] | 1c44339a2555ae7ffb7d40fd3a7d80d81c3fc39d | https://github.com/mlhartme/jasmin/blob/1c44339a2555ae7ffb7d40fd3a7d80d81c3fc39d/src/main/java/net/oneandone/jasmin/model/Engine.java#L232-L276 |
151,267 | DDTH/ddth-tsc | ddth-tsc-core/src/main/java/com/github/ddth/tsc/AbstractCounterFactory.java | AbstractCounterFactory.destroyCounter | protected void destroyCounter(ICounter counter) {
try {
if (counter instanceof AbstractCounter) {
((AbstractCounter) counter).destroy();
}
} catch (Exception e) {
}
} | java | protected void destroyCounter(ICounter counter) {
try {
if (counter instanceof AbstractCounter) {
((AbstractCounter) counter).destroy();
}
} catch (Exception e) {
}
} | [
"protected",
"void",
"destroyCounter",
"(",
"ICounter",
"counter",
")",
"{",
"try",
"{",
"if",
"(",
"counter",
"instanceof",
"AbstractCounter",
")",
"{",
"(",
"(",
"AbstractCounter",
")",
"counter",
")",
".",
"destroy",
"(",
")",
";",
"}",
"}",
"catch",
... | Destroys and removes a counter from the cache.
@param counter
@since 0.2.0 | [
"Destroys",
"and",
"removes",
"a",
"counter",
"from",
"the",
"cache",
"."
] | d233c304c8fed2f3c069de42a36b7bbd5c8be01b | https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/AbstractCounterFactory.java#L85-L92 |
151,268 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/event/ControlFileHandler.java | ControlFileHandler.init | public void init(Record record)
{
super.init(record);
this.setMasterSlaveFlag(FileListener.RUN_IN_MASTER | FileListener.DONT_REPLICATE_TO_SLAVE);
} | java | public void init(Record record)
{
super.init(record);
this.setMasterSlaveFlag(FileListener.RUN_IN_MASTER | FileListener.DONT_REPLICATE_TO_SLAVE);
} | [
"public",
"void",
"init",
"(",
"Record",
"record",
")",
"{",
"super",
".",
"init",
"(",
"record",
")",
";",
"this",
".",
"setMasterSlaveFlag",
"(",
"FileListener",
".",
"RUN_IN_MASTER",
"|",
"FileListener",
".",
"DONT_REPLICATE_TO_SLAVE",
")",
";",
"}"
] | ControlFileHandler - Constructor.
@param record My owner (usually passed as null, and set on addListener in setOwner()). | [
"ControlFileHandler",
"-",
"Constructor",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/ControlFileHandler.java#L53-L57 |
151,269 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/event/ControlFileHandler.java | ControlFileHandler.setOwner | public void setOwner(ListenerOwner owner)
{
super.setOwner(owner);
if (owner == null)
return;
boolean bEnabledFlag = this.setEnabledListener(true); // Disabled automatically on setOwner.
try { // Open this table and move to the control record
if (!this... | java | public void setOwner(ListenerOwner owner)
{
super.setOwner(owner);
if (owner == null)
return;
boolean bEnabledFlag = this.setEnabledListener(true); // Disabled automatically on setOwner.
try { // Open this table and move to the control record
if (!this... | [
"public",
"void",
"setOwner",
"(",
"ListenerOwner",
"owner",
")",
"{",
"super",
".",
"setOwner",
"(",
"owner",
")",
";",
"if",
"(",
"owner",
"==",
"null",
")",
"return",
";",
"boolean",
"bEnabledFlag",
"=",
"this",
".",
"setEnabledListener",
"(",
"true",
... | Set the field or file that owns this listener.
This method calls doNewRecord when the owner is set.
@see doNewRecord.
@param owner My owner. | [
"Set",
"the",
"field",
"or",
"file",
"that",
"owns",
"this",
"listener",
".",
"This",
"method",
"calls",
"doNewRecord",
"when",
"the",
"owner",
"is",
"set",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/ControlFileHandler.java#L64-L82 |
151,270 | eostermueller/headlessInTraceClient | src/main/java/org/headlessintrace/client/connection/command/ClassInstrumentationCommand.java | ClassInstrumentationCommand.create | public static ClassInstrumentationCommand create(String rawMultiLineText) {
List<String> list = rawTextToList(rawMultiLineText);
String classesIncludeRegEx = getStringFromList(list);
ClassInstrumentationCommand cic = new ClassInstrumentationCommand();
cic.setIncludeClassRegEx(classesIncludeRegEx);
... | java | public static ClassInstrumentationCommand create(String rawMultiLineText) {
List<String> list = rawTextToList(rawMultiLineText);
String classesIncludeRegEx = getStringFromList(list);
ClassInstrumentationCommand cic = new ClassInstrumentationCommand();
cic.setIncludeClassRegEx(classesIncludeRegEx);
... | [
"public",
"static",
"ClassInstrumentationCommand",
"create",
"(",
"String",
"rawMultiLineText",
")",
"{",
"List",
"<",
"String",
">",
"list",
"=",
"rawTextToList",
"(",
"rawMultiLineText",
")",
";",
"String",
"classesIncludeRegEx",
"=",
"getStringFromList",
"(",
"li... | Designed to take the text straight from the list box.
@param rawMultiLineText
@return | [
"Designed",
"to",
"take",
"the",
"text",
"straight",
"from",
"the",
"list",
"box",
"."
] | 50b1dccc5ff9e342c7c1d06b5a382e8c0afc7604 | https://github.com/eostermueller/headlessInTraceClient/blob/50b1dccc5ff9e342c7c1d06b5a382e8c0afc7604/src/main/java/org/headlessintrace/client/connection/command/ClassInstrumentationCommand.java#L55-L63 |
151,271 | js-lib-com/commons | src/main/java/js/converter/UrlConverter.java | UrlConverter.asObject | @Override
public <T> T asObject(String string, Class<T> valueType) throws ConverterException {
// at this point value type is guaranteed to be URL
try {
return (T) new URL(string);
} catch (MalformedURLException e) {
throw new ConverterException(e.getMessage());
}
} | java | @Override
public <T> T asObject(String string, Class<T> valueType) throws ConverterException {
// at this point value type is guaranteed to be URL
try {
return (T) new URL(string);
} catch (MalformedURLException e) {
throw new ConverterException(e.getMessage());
}
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"T",
"asObject",
"(",
"String",
"string",
",",
"Class",
"<",
"T",
">",
"valueType",
")",
"throws",
"ConverterException",
"{",
"// at this point value type is guaranteed to be URL\r",
"try",
"{",
"return",
"(",
"T",
")",
... | Convert URL string representation into URL instance.
@throws ConverterException if given string is not a valid URL. | [
"Convert",
"URL",
"string",
"representation",
"into",
"URL",
"instance",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/converter/UrlConverter.java#L23-L31 |
151,272 | jbundle/jbundle | base/screen/model/src/main/java/org/jbundle/base/screen/view/ViewFactory.java | ViewFactory.getViewFactory | public static ViewFactory getViewFactory(String strSubPackage, char chPrefix)
{
ViewFactory viewFactory = null;
viewFactory = (ViewFactory)m_htFactories.get(strSubPackage);
if (viewFactory == null)
{
viewFactory = new ViewFactory(strSubPackage, chPrefix);
m_ht... | java | public static ViewFactory getViewFactory(String strSubPackage, char chPrefix)
{
ViewFactory viewFactory = null;
viewFactory = (ViewFactory)m_htFactories.get(strSubPackage);
if (viewFactory == null)
{
viewFactory = new ViewFactory(strSubPackage, chPrefix);
m_ht... | [
"public",
"static",
"ViewFactory",
"getViewFactory",
"(",
"String",
"strSubPackage",
",",
"char",
"chPrefix",
")",
"{",
"ViewFactory",
"viewFactory",
"=",
"null",
";",
"viewFactory",
"=",
"(",
"ViewFactory",
")",
"m_htFactories",
".",
"get",
"(",
"strSubPackage",
... | Lookup a standard view factory.
@param strSubPackage The subpackage name (such as swing/xml/etc.).
@param chPrefix The prefix to add on the view classes.
@return The View Factory for this sub-package. | [
"Lookup",
"a",
"standard",
"view",
"factory",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/view/ViewFactory.java#L213-L223 |
151,273 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/thread/BaseRecordOwner.java | BaseRecordOwner.addRecord | public void addRecord(Rec record, boolean bMainQuery)
{
if (m_vRecordList == null)
m_vRecordList = new RecordList(null);
if (record == null)
return;
if (((Record)record).getRecordOwner() != null) // Screen already here?
if (((Record)record).getRecordO... | java | public void addRecord(Rec record, boolean bMainQuery)
{
if (m_vRecordList == null)
m_vRecordList = new RecordList(null);
if (record == null)
return;
if (((Record)record).getRecordOwner() != null) // Screen already here?
if (((Record)record).getRecordO... | [
"public",
"void",
"addRecord",
"(",
"Rec",
"record",
",",
"boolean",
"bMainQuery",
")",
"{",
"if",
"(",
"m_vRecordList",
"==",
"null",
")",
"m_vRecordList",
"=",
"new",
"RecordList",
"(",
"null",
")",
";",
"if",
"(",
"record",
"==",
"null",
")",
"return"... | Add this record to this screen.
@param record The record to add.
@param bMainQuery If this is the main record. | [
"Add",
"this",
"record",
"to",
"this",
"screen",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/thread/BaseRecordOwner.java#L162-L174 |
151,274 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/thread/BaseRecordOwner.java | BaseRecordOwner.removeRecord | public boolean removeRecord(Rec record)
{
if (m_vRecordList == null)
return false;
boolean bFlag = m_vRecordList.removeRecord(record);
if (((Record)record).getRecordOwner() == this)
((Record)record).setRecordOwner(null);
return bFlag;
} | java | public boolean removeRecord(Rec record)
{
if (m_vRecordList == null)
return false;
boolean bFlag = m_vRecordList.removeRecord(record);
if (((Record)record).getRecordOwner() == this)
((Record)record).setRecordOwner(null);
return bFlag;
} | [
"public",
"boolean",
"removeRecord",
"(",
"Rec",
"record",
")",
"{",
"if",
"(",
"m_vRecordList",
"==",
"null",
")",
"return",
"false",
";",
"boolean",
"bFlag",
"=",
"m_vRecordList",
".",
"removeRecord",
"(",
"record",
")",
";",
"if",
"(",
"(",
"(",
"Reco... | Remove this record from this screen.
@param record The record to remove.
@return true if successful. | [
"Remove",
"this",
"record",
"from",
"this",
"screen",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/thread/BaseRecordOwner.java#L180-L188 |
151,275 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/thread/BaseRecordOwner.java | BaseRecordOwner.addListenerMessageFilter | public void addListenerMessageFilter(BaseMessageFilter messageFilter)
{
if (m_messageFilterList == null)
m_messageFilterList = new MessageListenerFilterList(this);
m_messageFilterList.addMessageFilter(messageFilter);
} | java | public void addListenerMessageFilter(BaseMessageFilter messageFilter)
{
if (m_messageFilterList == null)
m_messageFilterList = new MessageListenerFilterList(this);
m_messageFilterList.addMessageFilter(messageFilter);
} | [
"public",
"void",
"addListenerMessageFilter",
"(",
"BaseMessageFilter",
"messageFilter",
")",
"{",
"if",
"(",
"m_messageFilterList",
"==",
"null",
")",
"m_messageFilterList",
"=",
"new",
"MessageListenerFilterList",
"(",
"this",
")",
";",
"m_messageFilterList",
".",
"... | Add this message filter to my list. | [
"Add",
"this",
"message",
"filter",
"to",
"my",
"list",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/thread/BaseRecordOwner.java#L283-L288 |
151,276 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/thread/BaseRecordOwner.java | BaseRecordOwner.getEnvironment | public Environment getEnvironment()
{
if (this.getTask() != null)
if (this.getTask().getApplication() instanceof BaseApplication)
return ((BaseApplication)this.getTask().getApplication()).getEnvironment();
return null;
} | java | public Environment getEnvironment()
{
if (this.getTask() != null)
if (this.getTask().getApplication() instanceof BaseApplication)
return ((BaseApplication)this.getTask().getApplication()).getEnvironment();
return null;
} | [
"public",
"Environment",
"getEnvironment",
"(",
")",
"{",
"if",
"(",
"this",
".",
"getTask",
"(",
")",
"!=",
"null",
")",
"if",
"(",
"this",
".",
"getTask",
"(",
")",
".",
"getApplication",
"(",
")",
"instanceof",
"BaseApplication",
")",
"return",
"(",
... | Get the environment.
From the database owner interface.
@return The Environment. | [
"Get",
"the",
"environment",
".",
"From",
"the",
"database",
"owner",
"interface",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/thread/BaseRecordOwner.java#L436-L442 |
151,277 | jbundle/jbundle | base/screen/model/src/main/java/org/jbundle/base/screen/model/report/parser/BaseMenuParser.java | BaseMenuParser.printHtmlItems | public void printHtmlItems(PrintWriter out, String strTag, String strParams, String strData)
{
int iTableColumns = 1;
String strColumns = this.getProperty(DBParams.COLUMNS, strParams);
if ((strColumns != null) && (strColumns.length() > 0))
iTableColumns = Integer.parseInt(strColu... | java | public void printHtmlItems(PrintWriter out, String strTag, String strParams, String strData)
{
int iTableColumns = 1;
String strColumns = this.getProperty(DBParams.COLUMNS, strParams);
if ((strColumns != null) && (strColumns.length() > 0))
iTableColumns = Integer.parseInt(strColu... | [
"public",
"void",
"printHtmlItems",
"(",
"PrintWriter",
"out",
",",
"String",
"strTag",
",",
"String",
"strParams",
",",
"String",
"strData",
")",
"{",
"int",
"iTableColumns",
"=",
"1",
";",
"String",
"strColumns",
"=",
"this",
".",
"getProperty",
"(",
"DBPa... | Detail items. | [
"Detail",
"items",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/report/parser/BaseMenuParser.java#L186-L246 |
151,278 | wigforss/Ka-Commons-Reflection | src/main/java/org/kasource/commons/reflection/util/ConstructorUtils.java | ConstructorUtils.getInstance | public static <T> T getInstance(String className, Class<T> ofType) throws IllegalStateException {
return getInstance(className, ofType, new Class<?>[]{}, new Object[]{});
} | java | public static <T> T getInstance(String className, Class<T> ofType) throws IllegalStateException {
return getInstance(className, ofType, new Class<?>[]{}, new Object[]{});
} | [
"public",
"static",
"<",
"T",
">",
"T",
"getInstance",
"(",
"String",
"className",
",",
"Class",
"<",
"T",
">",
"ofType",
")",
"throws",
"IllegalStateException",
"{",
"return",
"getInstance",
"(",
"className",
",",
"ofType",
",",
"new",
"Class",
"<",
"?",
... | Creates and returns a new instance of class with name className, loading the class and using the default constructor.
@param <T>
@param className
@param ofType
@return a new instance of class loaded from className.
@throws IllegalStateException if className could not be loaded or if that class does not have a default... | [
"Creates",
"and",
"returns",
"a",
"new",
"instance",
"of",
"class",
"with",
"name",
"className",
"loading",
"the",
"class",
"and",
"using",
"the",
"default",
"constructor",
"."
] | a80f7a164cd800089e4f4dd948ca6f0e7badcf33 | https://github.com/wigforss/Ka-Commons-Reflection/blob/a80f7a164cd800089e4f4dd948ca6f0e7badcf33/src/main/java/org/kasource/commons/reflection/util/ConstructorUtils.java#L115-L117 |
151,279 | jbundle/jbundle | thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/cal/JCalendarDualField.java | JCalendarDualField.addFocusListener | public void addFocusListener(FocusListener l)
{
super.addFocusListener(l);
if (l instanceof JBasePanel)
{
m_tf.addFocusListener(l);
if (m_button != null)
m_button.addFocusListener(l);
if (m_buttonTime != null)
m_buttonTime.a... | java | public void addFocusListener(FocusListener l)
{
super.addFocusListener(l);
if (l instanceof JBasePanel)
{
m_tf.addFocusListener(l);
if (m_button != null)
m_button.addFocusListener(l);
if (m_buttonTime != null)
m_buttonTime.a... | [
"public",
"void",
"addFocusListener",
"(",
"FocusListener",
"l",
")",
"{",
"super",
".",
"addFocusListener",
"(",
"l",
")",
";",
"if",
"(",
"l",
"instanceof",
"JBasePanel",
")",
"{",
"m_tf",
".",
"addFocusListener",
"(",
"l",
")",
";",
"if",
"(",
"m_butt... | When a focus listener is added to this, actually add it to the components.
@param l The listener to add. | [
"When",
"a",
"focus",
"listener",
"is",
"added",
"to",
"this",
"actually",
"add",
"it",
"to",
"the",
"components",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/cal/JCalendarDualField.java#L204-L215 |
151,280 | tvesalainen/util | util/src/main/java/org/vesalainen/util/ThreadLocalFormatter.java | ThreadLocalFormatter.getFormatter | public static Formatter getFormatter()
{
Formatter formatter = out.get();
if (formatter == null)
{
formatter = new Formatter(new StringBuilder());
out.set(formatter);
}
else
{
StringBuilder sb = (StringBuilder) formatter.o... | java | public static Formatter getFormatter()
{
Formatter formatter = out.get();
if (formatter == null)
{
formatter = new Formatter(new StringBuilder());
out.set(formatter);
}
else
{
StringBuilder sb = (StringBuilder) formatter.o... | [
"public",
"static",
"Formatter",
"getFormatter",
"(",
")",
"{",
"Formatter",
"formatter",
"=",
"out",
".",
"get",
"(",
")",
";",
"if",
"(",
"formatter",
"==",
"null",
")",
"{",
"formatter",
"=",
"new",
"Formatter",
"(",
"new",
"StringBuilder",
"(",
")",
... | Returns thread-local formatter. Inner Appendable is StringBuider which's
length is set to 0.
@return | [
"Returns",
"thread",
"-",
"local",
"formatter",
".",
"Inner",
"Appendable",
"is",
"StringBuider",
"which",
"s",
"length",
"is",
"set",
"to",
"0",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/ThreadLocalFormatter.java#L79-L93 |
151,281 | tvesalainen/util | vfs/src/main/java/org/vesalainen/vfs/VirtualFile.java | VirtualFile.readView | ByteBuffer readView(int position)
{
ByteBuffer bb = content.duplicate().asReadOnlyBuffer();
bb.position(position);
return bb;
} | java | ByteBuffer readView(int position)
{
ByteBuffer bb = content.duplicate().asReadOnlyBuffer();
bb.position(position);
return bb;
} | [
"ByteBuffer",
"readView",
"(",
"int",
"position",
")",
"{",
"ByteBuffer",
"bb",
"=",
"content",
".",
"duplicate",
"(",
")",
".",
"asReadOnlyBuffer",
"(",
")",
";",
"bb",
".",
"position",
"(",
"position",
")",
";",
"return",
"bb",
";",
"}"
] | Returns read-only view of content. Position = 0, limit=size;
@return ByteBuffer position set to given position limit is file size. | [
"Returns",
"read",
"-",
"only",
"view",
"of",
"content",
".",
"Position",
"=",
"0",
"limit",
"=",
"size",
";"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/vfs/src/main/java/org/vesalainen/vfs/VirtualFile.java#L326-L331 |
151,282 | tvesalainen/util | vfs/src/main/java/org/vesalainen/vfs/VirtualFile.java | VirtualFile.writeView | ByteBuffer writeView(int position, int needs) throws IOException
{
int waterMark = position+needs;
if (waterMark > content.capacity())
{
if (refSet.containsKey(content))
{
throw new IOException("cannot grow file because of writable mapping for c... | java | ByteBuffer writeView(int position, int needs) throws IOException
{
int waterMark = position+needs;
if (waterMark > content.capacity())
{
if (refSet.containsKey(content))
{
throw new IOException("cannot grow file because of writable mapping for c... | [
"ByteBuffer",
"writeView",
"(",
"int",
"position",
",",
"int",
"needs",
")",
"throws",
"IOException",
"{",
"int",
"waterMark",
"=",
"position",
"+",
"needs",
";",
"if",
"(",
"waterMark",
">",
"content",
".",
"capacity",
"(",
")",
")",
"{",
"if",
"(",
"... | Returns view of content.
@return ByteBuffer position set to given position limit is position+needs. | [
"Returns",
"view",
"of",
"content",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/vfs/src/main/java/org/vesalainen/vfs/VirtualFile.java#L336-L356 |
151,283 | tvesalainen/util | vfs/src/main/java/org/vesalainen/vfs/VirtualFile.java | VirtualFile.commit | void commit(ByteBuffer bb)
{
content.limit(Math.max(content.limit(), bb.position()));
boolean removed = refSet.removeItem(content, bb);
assert removed;
} | java | void commit(ByteBuffer bb)
{
content.limit(Math.max(content.limit(), bb.position()));
boolean removed = refSet.removeItem(content, bb);
assert removed;
} | [
"void",
"commit",
"(",
"ByteBuffer",
"bb",
")",
"{",
"content",
".",
"limit",
"(",
"Math",
".",
"max",
"(",
"content",
".",
"limit",
"(",
")",
",",
"bb",
".",
"position",
"(",
")",
")",
")",
";",
"boolean",
"removed",
"=",
"refSet",
".",
"removeIte... | called after writing to commit that writing succeeded up to position.
If position > size the size is updated.
@param pos | [
"called",
"after",
"writing",
"to",
"commit",
"that",
"writing",
"succeeded",
"up",
"to",
"position",
".",
"If",
"position",
">",
"size",
"the",
"size",
"is",
"updated",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/vfs/src/main/java/org/vesalainen/vfs/VirtualFile.java#L366-L371 |
151,284 | js-lib-com/transaction.hibernate | src/main/java/js/transaction/hibernate/SqlQueryImpl.java | SqlQueryImpl.query | private SQLQuery query(Class<?>... entity) {
SQLQuery q = session.createSQLQuery(sql);
if (entity.length == 1) {
q.addEntity(entity[0]);
}
for (Map.Entry<String, Type> scalar : scalars.entrySet()) {
q.addScalar(scalar.getKey(), scalar.getValue());
}
for (int i = 0; i < positionedParameters.len... | java | private SQLQuery query(Class<?>... entity) {
SQLQuery q = session.createSQLQuery(sql);
if (entity.length == 1) {
q.addEntity(entity[0]);
}
for (Map.Entry<String, Type> scalar : scalars.entrySet()) {
q.addScalar(scalar.getKey(), scalar.getValue());
}
for (int i = 0; i < positionedParameters.len... | [
"private",
"SQLQuery",
"query",
"(",
"Class",
"<",
"?",
">",
"...",
"entity",
")",
"{",
"SQLQuery",
"q",
"=",
"session",
".",
"createSQLQuery",
"(",
"sql",
")",
";",
"if",
"(",
"entity",
".",
"length",
"==",
"1",
")",
"{",
"q",
".",
"addEntity",
"(... | Create SQL query object and initialize it from this helper properties.
@param entity optional Hibernate entity.
@return newly create SQL object. | [
"Create",
"SQL",
"query",
"object",
"and",
"initialize",
"it",
"from",
"this",
"helper",
"properties",
"."
] | 3aaafa6fa573f27733e6edaef3a4b2cf97cf67d6 | https://github.com/js-lib-com/transaction.hibernate/blob/3aaafa6fa573f27733e6edaef3a4b2cf97cf67d6/src/main/java/js/transaction/hibernate/SqlQueryImpl.java#L194-L230 |
151,285 | kirgor/enklib | sql/src/main/java/com/kirgor/enklib/sql/proxy/ParameterUtils.java | ParameterUtils.likePrefix | public static String likePrefix(String param) {
return param != null ? param.toLowerCase().replace("_", "\\_").replace("%", "\\%") + "%" : null;
} | java | public static String likePrefix(String param) {
return param != null ? param.toLowerCase().replace("_", "\\_").replace("%", "\\%") + "%" : null;
} | [
"public",
"static",
"String",
"likePrefix",
"(",
"String",
"param",
")",
"{",
"return",
"param",
"!=",
"null",
"?",
"param",
".",
"toLowerCase",
"(",
")",
".",
"replace",
"(",
"\"_\"",
",",
"\"\\\\_\"",
")",
".",
"replace",
"(",
"\"%\"",
",",
"\"\\\\%\""... | Builds prefix search parameter for LIKE operator from non-formatted string.
Basically, this method insert escape character before special symbols and adds '%' at the end. | [
"Builds",
"prefix",
"search",
"parameter",
"for",
"LIKE",
"operator",
"from",
"non",
"-",
"formatted",
"string",
".",
"Basically",
"this",
"method",
"insert",
"escape",
"character",
"before",
"special",
"symbols",
"and",
"adds",
"%",
"at",
"the",
"end",
"."
] | 8a24db296dc43db5d8fe509cf64ace0a0c7be8f2 | https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/sql/src/main/java/com/kirgor/enklib/sql/proxy/ParameterUtils.java#L28-L30 |
151,286 | jbundle/jbundle | thin/base/screen/util-misc/src/main/java/org/jbundle/thin/base/screen/util/html/SyncPageLoader.java | SyncPageLoader.run | public void run()
{
if ((m_url == null) && (m_strHtmlText == null))
{ // restore the original cursor
if (m_bChangeCursor)
{
if (m_applet != null)
m_applet.setStatus(0, m_editorPane, m_oldCursor);
else
{
... | java | public void run()
{
if ((m_url == null) && (m_strHtmlText == null))
{ // restore the original cursor
if (m_bChangeCursor)
{
if (m_applet != null)
m_applet.setStatus(0, m_editorPane, m_oldCursor);
else
{
... | [
"public",
"void",
"run",
"(",
")",
"{",
"if",
"(",
"(",
"m_url",
"==",
"null",
")",
"&&",
"(",
"m_strHtmlText",
"==",
"null",
")",
")",
"{",
"// restore the original cursor",
"if",
"(",
"m_bChangeCursor",
")",
"{",
"if",
"(",
"m_applet",
"!=",
"null",
... | Display the target html in the pane. | [
"Display",
"the",
"target",
"html",
"in",
"the",
"pane",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util-misc/src/main/java/org/jbundle/thin/base/screen/util/html/SyncPageLoader.java#L88-L165 |
151,287 | jbundle/jbundle | thin/base/screen/util-misc/src/main/java/org/jbundle/thin/base/screen/util/html/SyncPageLoader.java | SyncPageLoader.setText | public void setText(Document doc, String text)
{
StringReader reader = new StringReader(text);
HTMLEditorKit kit = (HTMLEditorKit) m_editorPane.getEditorKitForContentType(HTML_CONTENT);
try {
int iLength = doc.getLength();
if (iLength > 0)
doc.remove(0... | java | public void setText(Document doc, String text)
{
StringReader reader = new StringReader(text);
HTMLEditorKit kit = (HTMLEditorKit) m_editorPane.getEditorKitForContentType(HTML_CONTENT);
try {
int iLength = doc.getLength();
if (iLength > 0)
doc.remove(0... | [
"public",
"void",
"setText",
"(",
"Document",
"doc",
",",
"String",
"text",
")",
"{",
"StringReader",
"reader",
"=",
"new",
"StringReader",
"(",
"text",
")",
";",
"HTMLEditorKit",
"kit",
"=",
"(",
"HTMLEditorKit",
")",
"m_editorPane",
".",
"getEditorKitForCont... | Set the control to this html text.
@param doc
@param text | [
"Set",
"the",
"control",
"to",
"this",
"html",
"text",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util-misc/src/main/java/org/jbundle/thin/base/screen/util/html/SyncPageLoader.java#L171-L185 |
151,288 | kazocsaba/matrix | src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java | ImmutableMatrixFactory.createVector | public static ImmutableVector2 createVector(final double x, final double y) {
return new ImmutableVector2(new ImmutableData(2, 1) {
@Override
public double getQuick(int row, int col) {
if (row == 0)
return x;
else
return y;
}
});
} | java | public static ImmutableVector2 createVector(final double x, final double y) {
return new ImmutableVector2(new ImmutableData(2, 1) {
@Override
public double getQuick(int row, int col) {
if (row == 0)
return x;
else
return y;
}
});
} | [
"public",
"static",
"ImmutableVector2",
"createVector",
"(",
"final",
"double",
"x",
",",
"final",
"double",
"y",
")",
"{",
"return",
"new",
"ImmutableVector2",
"(",
"new",
"ImmutableData",
"(",
"2",
",",
"1",
")",
"{",
"@",
"Override",
"public",
"double",
... | Creates a new immutable 2D column vector.
@param x the x coordinate of the new vector
@param y the y coordinate of the new vector
@return the new vector | [
"Creates",
"a",
"new",
"immutable",
"2D",
"column",
"vector",
"."
] | 018570db945fe616b25606fe605fa6e0c180ab5b | https://github.com/kazocsaba/matrix/blob/018570db945fe616b25606fe605fa6e0c180ab5b/src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java#L24-L34 |
151,289 | kazocsaba/matrix | src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java | ImmutableMatrixFactory.createVector | public static ImmutableVector3 createVector(final double x, final double y, final double z) {
return new ImmutableVector3(new ImmutableData(3, 1) {
@Override
public double getQuick(int row, int col) {
switch (row) {
case 0:
return x;
case 1:
return y;
default:
return z;
... | java | public static ImmutableVector3 createVector(final double x, final double y, final double z) {
return new ImmutableVector3(new ImmutableData(3, 1) {
@Override
public double getQuick(int row, int col) {
switch (row) {
case 0:
return x;
case 1:
return y;
default:
return z;
... | [
"public",
"static",
"ImmutableVector3",
"createVector",
"(",
"final",
"double",
"x",
",",
"final",
"double",
"y",
",",
"final",
"double",
"z",
")",
"{",
"return",
"new",
"ImmutableVector3",
"(",
"new",
"ImmutableData",
"(",
"3",
",",
"1",
")",
"{",
"@",
... | Creates a new immutable 3D column vector.
@param x the x coordinate of the new vector
@param y the y coordinate of the new vector
@param z the z coordinate of the new vector
@return the new vector | [
"Creates",
"a",
"new",
"immutable",
"3D",
"column",
"vector",
"."
] | 018570db945fe616b25606fe605fa6e0c180ab5b | https://github.com/kazocsaba/matrix/blob/018570db945fe616b25606fe605fa6e0c180ab5b/src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java#L44-L58 |
151,290 | kazocsaba/matrix | src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java | ImmutableMatrixFactory.createVector | public static ImmutableVector4 createVector(final double x, final double y, final double z, final double h) {
return new ImmutableVector4(new ImmutableData(4, 1) {
@Override
public double getQuick(int row, int col) {
switch (row) {
case 0:
return x;
case 1:
return y;
case 2:
... | java | public static ImmutableVector4 createVector(final double x, final double y, final double z, final double h) {
return new ImmutableVector4(new ImmutableData(4, 1) {
@Override
public double getQuick(int row, int col) {
switch (row) {
case 0:
return x;
case 1:
return y;
case 2:
... | [
"public",
"static",
"ImmutableVector4",
"createVector",
"(",
"final",
"double",
"x",
",",
"final",
"double",
"y",
",",
"final",
"double",
"z",
",",
"final",
"double",
"h",
")",
"{",
"return",
"new",
"ImmutableVector4",
"(",
"new",
"ImmutableData",
"(",
"4",
... | Creates a new immutable 4D column vector.
@param x the x coordinate of the new vector
@param y the y coordinate of the new vector
@param z the z coordinate of the new vector
@param h the h coordinate of the new vector
@return the new vector | [
"Creates",
"a",
"new",
"immutable",
"4D",
"column",
"vector",
"."
] | 018570db945fe616b25606fe605fa6e0c180ab5b | https://github.com/kazocsaba/matrix/blob/018570db945fe616b25606fe605fa6e0c180ab5b/src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java#L69-L85 |
151,291 | kazocsaba/matrix | src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java | ImmutableMatrixFactory.zeros | public static ImmutableMatrix zeros(final int rows, final int cols) {
if (rows <= 0 || cols <= 0) throw new IllegalArgumentException("Invalid dimensions");
return create(new ImmutableData(rows, cols) {
@Override
public double getQuick(int row, int col) {
return 0;
}
});
} | java | public static ImmutableMatrix zeros(final int rows, final int cols) {
if (rows <= 0 || cols <= 0) throw new IllegalArgumentException("Invalid dimensions");
return create(new ImmutableData(rows, cols) {
@Override
public double getQuick(int row, int col) {
return 0;
}
});
} | [
"public",
"static",
"ImmutableMatrix",
"zeros",
"(",
"final",
"int",
"rows",
",",
"final",
"int",
"cols",
")",
"{",
"if",
"(",
"rows",
"<=",
"0",
"||",
"cols",
"<=",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid dimensions\"",
")",
... | Returns an immutable matrix of the specified size whose elements are all 0.
@param rows the number of rows
@param cols the number of columns
@return a <code>rows</code>×<code>cols</code> matrix whose elements are all 0
@throws IllegalArgumentException if either argument is non-positive | [
"Returns",
"an",
"immutable",
"matrix",
"of",
"the",
"specified",
"size",
"whose",
"elements",
"are",
"all",
"0",
"."
] | 018570db945fe616b25606fe605fa6e0c180ab5b | https://github.com/kazocsaba/matrix/blob/018570db945fe616b25606fe605fa6e0c180ab5b/src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java#L223-L231 |
151,292 | kazocsaba/matrix | src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java | ImmutableMatrixFactory.identity | public static ImmutableMatrix identity(final int size) {
if (size <= 0) throw new IllegalArgumentException("Invalid size");
return create(new ImmutableData(size, size) {
@Override
public double getQuick(int row, int col) {
return row == col ? 1 : 0;
}
});
} | java | public static ImmutableMatrix identity(final int size) {
if (size <= 0) throw new IllegalArgumentException("Invalid size");
return create(new ImmutableData(size, size) {
@Override
public double getQuick(int row, int col) {
return row == col ? 1 : 0;
}
});
} | [
"public",
"static",
"ImmutableMatrix",
"identity",
"(",
"final",
"int",
"size",
")",
"{",
"if",
"(",
"size",
"<=",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid size\"",
")",
";",
"return",
"create",
"(",
"new",
"ImmutableData",
"(",
... | Returns an immutable identity matrix of the specified dimension.
@param size the dimension of the matrix
@return a <code>size</code>×<code>size</code> identity matrix
@throws IllegalArgumentException if the size is not positive | [
"Returns",
"an",
"immutable",
"identity",
"matrix",
"of",
"the",
"specified",
"dimension",
"."
] | 018570db945fe616b25606fe605fa6e0c180ab5b | https://github.com/kazocsaba/matrix/blob/018570db945fe616b25606fe605fa6e0c180ab5b/src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java#L258-L266 |
151,293 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageRecordDesc.java | MessageRecordDesc.handlePutRawRecordData | public int handlePutRawRecordData(Rec record)
{
int iErrorCode = Constant.NORMAL_RETURN;
int iRecordCount = this.getRecordCount(record);
Rec recTargetRecord = this.setDataIndex(RESET_INDEX, record); // Reset index if multiple
for (int index = 1; index <= iRecordCo... | java | public int handlePutRawRecordData(Rec record)
{
int iErrorCode = Constant.NORMAL_RETURN;
int iRecordCount = this.getRecordCount(record);
Rec recTargetRecord = this.setDataIndex(RESET_INDEX, record); // Reset index if multiple
for (int index = 1; index <= iRecordCo... | [
"public",
"int",
"handlePutRawRecordData",
"(",
"Rec",
"record",
")",
"{",
"int",
"iErrorCode",
"=",
"Constant",
".",
"NORMAL_RETURN",
";",
"int",
"iRecordCount",
"=",
"this",
".",
"getRecordCount",
"(",
"record",
")",
";",
"Rec",
"recTargetRecord",
"=",
"this... | Move the correct fields from ALL the detail records to the map.
Typically, you override this and loop through the records in the table.
If this method is used, is must be overidden to move the correct fields.
@param record The record to get the data from. | [
"Move",
"the",
"correct",
"fields",
"from",
"ALL",
"the",
"detail",
"records",
"to",
"the",
"map",
".",
"Typically",
"you",
"override",
"this",
"and",
"loop",
"through",
"the",
"records",
"in",
"the",
"table",
".",
"If",
"this",
"method",
"is",
"used",
"... | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageRecordDesc.java#L68-L88 |
151,294 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageRecordDesc.java | MessageRecordDesc.updateRecord | public Rec updateRecord(Rec record, boolean bRefresh)
{
try {
Object bookmark = null;
if (record.getEditMode() == Constant.EDIT_IN_PROGRESS)
{
if (bRefresh)
bookmark = record.getTable().getHandle(0);
record.getTable().se... | java | public Rec updateRecord(Rec record, boolean bRefresh)
{
try {
Object bookmark = null;
if (record.getEditMode() == Constant.EDIT_IN_PROGRESS)
{
if (bRefresh)
bookmark = record.getTable().getHandle(0);
record.getTable().se... | [
"public",
"Rec",
"updateRecord",
"(",
"Rec",
"record",
",",
"boolean",
"bRefresh",
")",
"{",
"try",
"{",
"Object",
"bookmark",
"=",
"null",
";",
"if",
"(",
"record",
".",
"getEditMode",
"(",
")",
"==",
"Constant",
".",
"EDIT_IN_PROGRESS",
")",
"{",
"if",... | Update this record if it has been changed
@param record
@return The record (or null if error) | [
"Update",
"this",
"record",
"if",
"it",
"has",
"been",
"changed"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageRecordDesc.java#L185-L215 |
151,295 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageRecordDesc.java | MessageRecordDesc.freeSubNodeRecord | public boolean freeSubNodeRecord(Rec record)
{
m_recTargetFieldList = null;
if (record != null)
{
record.free();
return true;
}
return false;
} | java | public boolean freeSubNodeRecord(Rec record)
{
m_recTargetFieldList = null;
if (record != null)
{
record.free();
return true;
}
return false;
} | [
"public",
"boolean",
"freeSubNodeRecord",
"(",
"Rec",
"record",
")",
"{",
"m_recTargetFieldList",
"=",
"null",
";",
"if",
"(",
"record",
"!=",
"null",
")",
"{",
"record",
".",
"free",
"(",
")",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"... | Create the sub-detail record.
@param record
@return | [
"Create",
"the",
"sub",
"-",
"detail",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageRecordDesc.java#L302-L311 |
151,296 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/BitReferenceField.java | BitReferenceField.getBitsToCheck | public int getBitsToCheck()
{
if (m_iBitsToCheck == 0)
{
Record record = this.makeReferenceRecord();
try {
record.close();
while (record.hasNext()) // 0 = First Day -> 6 = Last Day of Week
{
record.next();... | java | public int getBitsToCheck()
{
if (m_iBitsToCheck == 0)
{
Record record = this.makeReferenceRecord();
try {
record.close();
while (record.hasNext()) // 0 = First Day -> 6 = Last Day of Week
{
record.next();... | [
"public",
"int",
"getBitsToCheck",
"(",
")",
"{",
"if",
"(",
"m_iBitsToCheck",
"==",
"0",
")",
"{",
"Record",
"record",
"=",
"this",
".",
"makeReferenceRecord",
"(",
")",
";",
"try",
"{",
"record",
".",
"close",
"(",
")",
";",
"while",
"(",
"record",
... | Mask of valid bits. | [
"Mask",
"of",
"valid",
"bits",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BitReferenceField.java#L121-L139 |
151,297 | microfocus-idol/java-configuration-impl | src/main/java/com/hp/autonomy/frontend/configuration/redis/RedisConfig.java | RedisConfig.basicValidate | @Override
public void basicValidate(final String section) throws ConfigException {
super.basicValidate(CONFIG_SECTION);
if (address == null && (sentinels == null || sentinels.isEmpty())) {
throw new ConfigException(CONFIG_SECTION, "Redis configuration requires either an address or at le... | java | @Override
public void basicValidate(final String section) throws ConfigException {
super.basicValidate(CONFIG_SECTION);
if (address == null && (sentinels == null || sentinels.isEmpty())) {
throw new ConfigException(CONFIG_SECTION, "Redis configuration requires either an address or at le... | [
"@",
"Override",
"public",
"void",
"basicValidate",
"(",
"final",
"String",
"section",
")",
"throws",
"ConfigException",
"{",
"super",
".",
"basicValidate",
"(",
"CONFIG_SECTION",
")",
";",
"if",
"(",
"address",
"==",
"null",
"&&",
"(",
"sentinels",
"==",
"n... | Validates the configuration
@throws ConfigException If either:
<ul>
<li>address is non null and invalid</li>
<li>address is null and sentinels is null or empty </li>
<li>sentinels is non null and non empty and masterName is null or blank</li>
<li>any sentinels are invalid</li>
</ul> | [
"Validates",
"the",
"configuration"
] | cd9d744cacfaaae3c76cacc211e65742bbc7b00a | https://github.com/microfocus-idol/java-configuration-impl/blob/cd9d744cacfaaae3c76cacc211e65742bbc7b00a/src/main/java/com/hp/autonomy/frontend/configuration/redis/RedisConfig.java#L57-L74 |
151,298 | openCage/eightyfs | src/main/java/de/pfabulist/lindwurm/eighty/path/RealPath.java | RealPath.to | public EightyPath to() {
EightyPath inital = start;
final RealIt it = new RealIt( start );
if( !Repeater.repeat().
upto( 1000 ).
until( () -> {
it.set( minusOne( it ) );
return !it.foundSymLink;
} )... | java | public EightyPath to() {
EightyPath inital = start;
final RealIt it = new RealIt( start );
if( !Repeater.repeat().
upto( 1000 ).
until( () -> {
it.set( minusOne( it ) );
return !it.foundSymLink;
} )... | [
"public",
"EightyPath",
"to",
"(",
")",
"{",
"EightyPath",
"inital",
"=",
"start",
";",
"final",
"RealIt",
"it",
"=",
"new",
"RealIt",
"(",
"start",
")",
";",
"if",
"(",
"!",
"Repeater",
".",
"repeat",
"(",
")",
".",
"upto",
"(",
"1000",
")",
".",
... | build an absolute, normalized and symbolic link free path of the same file or dir
@return | [
"build",
"an",
"absolute",
"normalized",
"and",
"symbolic",
"link",
"free",
"path",
"of",
"the",
"same",
"file",
"or",
"dir"
] | 708ec4d336ee5e3dbd4196099f64091eaf6b3387 | https://github.com/openCage/eightyfs/blob/708ec4d336ee5e3dbd4196099f64091eaf6b3387/src/main/java/de/pfabulist/lindwurm/eighty/path/RealPath.java#L55-L77 |
151,299 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/proxy/BaseHolder.java | BaseHolder.free | public void free()
{
if ((m_mapChildHolders != null) && (m_mapChildHolders.size() > 0))
{
Utility.getLogger().info("Not all sub-sessions freed by client - I will free them");
synchronized (this)
{
Object[] keys = m_mapChildHolders.keySet().toArray(... | java | public void free()
{
if ((m_mapChildHolders != null) && (m_mapChildHolders.size() > 0))
{
Utility.getLogger().info("Not all sub-sessions freed by client - I will free them");
synchronized (this)
{
Object[] keys = m_mapChildHolders.keySet().toArray(... | [
"public",
"void",
"free",
"(",
")",
"{",
"if",
"(",
"(",
"m_mapChildHolders",
"!=",
"null",
")",
"&&",
"(",
"m_mapChildHolders",
".",
"size",
"(",
")",
">",
"0",
")",
")",
"{",
"Utility",
".",
"getLogger",
"(",
")",
".",
"info",
"(",
"\"Not all sub-s... | Free the resources for this holder. | [
"Free",
"the",
"resources",
"for",
"this",
"holder",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/proxy/BaseHolder.java#L67-L88 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.