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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
153,800 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.search | public static int search(char[] charArray, char value, int occurrence) {
if(occurrence <= 0 || occurrence > charArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
in... | java | public static int search(char[] charArray, char value, int occurrence) {
if(occurrence <= 0 || occurrence > charArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
in... | [
"public",
"static",
"int",
"search",
"(",
"char",
"[",
"]",
"charArray",
",",
"char",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"charArray",
".",
"length",
")",
"{",
"throw",
"new",
"Illeg... | Search for the value in the char array and return the index of the first occurrence from the
beginning of the array.
@param charArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return the... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"char",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"beginning",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L684-L703 |
153,801 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.search | public static int search(byte[] byteArray, byte value, int occurrence) {
if(occurrence <= 0 || occurrence > byteArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
in... | java | public static int search(byte[] byteArray, byte value, int occurrence) {
if(occurrence <= 0 || occurrence > byteArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
in... | [
"public",
"static",
"int",
"search",
"(",
"byte",
"[",
"]",
"byteArray",
",",
"byte",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"byteArray",
".",
"length",
")",
"{",
"throw",
"new",
"Illeg... | Search for the value in the byte array and return the index of the first occurrence from the
beginning of the array.
@param byteArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return the... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"byte",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"beginning",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L814-L833 |
153,802 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.search | public static int search(short[] shortArray, short value, int occurrence) {
if(occurrence <= 0 || occurrence > shortArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | java | public static int search(short[] shortArray, short value, int occurrence) {
if(occurrence <= 0 || occurrence > shortArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | [
"public",
"static",
"int",
"search",
"(",
"short",
"[",
"]",
"shortArray",
",",
"short",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"shortArray",
".",
"length",
")",
"{",
"throw",
"new",
"I... | Search for the value in the short array and return the index of the first occurrence from the
beginning of the array.
@param shortArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return t... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"short",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"beginning",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L944-L963 |
153,803 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.search | public static int search(long[] longArray, long value, int occurrence) {
if(occurrence <= 0 || occurrence > longArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
in... | java | public static int search(long[] longArray, long value, int occurrence) {
if(occurrence <= 0 || occurrence > longArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
in... | [
"public",
"static",
"int",
"search",
"(",
"long",
"[",
"]",
"longArray",
",",
"long",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"longArray",
".",
"length",
")",
"{",
"throw",
"new",
"Illeg... | Search for the value in the long array and return the index of the first occurrence from the
beginning of the array.
@param longArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return the... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"long",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"beginning",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L1074-L1093 |
153,804 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.search | public static int search(float[] floatArray, float value, int occurrence) {
if(occurrence <= 0 || occurrence > floatArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | java | public static int search(float[] floatArray, float value, int occurrence) {
if(occurrence <= 0 || occurrence > floatArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | [
"public",
"static",
"int",
"search",
"(",
"float",
"[",
"]",
"floatArray",
",",
"float",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"floatArray",
".",
"length",
")",
"{",
"throw",
"new",
"I... | Search for the value in the float array and return the index of the first occurrence from the
beginning of the array.
@param floatArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return t... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"float",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"beginning",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L1204-L1223 |
153,805 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.search | public static int search(double[] doubleArray, double value, int occurrence) {
if(occurrence <= 0 || occurrence > doubleArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | java | public static int search(double[] doubleArray, double value, int occurrence) {
if(occurrence <= 0 || occurrence > doubleArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | [
"public",
"static",
"int",
"search",
"(",
"double",
"[",
"]",
"doubleArray",
",",
"double",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"doubleArray",
".",
"length",
")",
"{",
"throw",
"new",
... | Search for the value in the double array and return the index of the first occurrence from the
beginning of the array.
@param doubleArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"double",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"beginning",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L1334-L1353 |
153,806 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.searchLast | public static int searchLast(int[] intArray, int value, int occurrence) {
if(occurrence <= 0 || occurrence > intArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
in... | java | public static int searchLast(int[] intArray, int value, int occurrence) {
if(occurrence <= 0 || occurrence > intArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
in... | [
"public",
"static",
"int",
"searchLast",
"(",
"int",
"[",
"]",
"intArray",
",",
"int",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"intArray",
".",
"length",
")",
"{",
"throw",
"new",
"Illeg... | Search for the value in the int array and return the index of the specified occurrence from the
end of the array.
@param intArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return the ind... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"int",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"specified",
"occurrence",
"from",
"the",
"end",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L1530-L1549 |
153,807 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.searchLast | public static int searchLast(char[] charArray, char value, int occurrence) {
if(occurrence <= 0 || occurrence > charArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | java | public static int searchLast(char[] charArray, char value, int occurrence) {
if(occurrence <= 0 || occurrence > charArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | [
"public",
"static",
"int",
"searchLast",
"(",
"char",
"[",
"]",
"charArray",
",",
"char",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"charArray",
".",
"length",
")",
"{",
"throw",
"new",
"I... | Search for the value in the char array and return the index of the first occurrence from the
end of the array.
@param charArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return the index... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"char",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"end",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L1560-L1579 |
153,808 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.searchLast | public static int searchLast(byte[] byteArray, byte value, int occurrence) {
if(occurrence <= 0 || occurrence > byteArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | java | public static int searchLast(byte[] byteArray, byte value, int occurrence) {
if(occurrence <= 0 || occurrence > byteArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | [
"public",
"static",
"int",
"searchLast",
"(",
"byte",
"[",
"]",
"byteArray",
",",
"byte",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"byteArray",
".",
"length",
")",
"{",
"throw",
"new",
"I... | Search for the value in the byte array and return the index of the first occurrence from the
end of the array.
@param byteArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return the index... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"byte",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"end",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L1590-L1609 |
153,809 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.searchLast | public static int searchLast(short[] shortArray, short value, int occurrence) {
if(occurrence <= 0 || occurrence > shortArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | java | public static int searchLast(short[] shortArray, short value, int occurrence) {
if(occurrence <= 0 || occurrence > shortArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | [
"public",
"static",
"int",
"searchLast",
"(",
"short",
"[",
"]",
"shortArray",
",",
"short",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"shortArray",
".",
"length",
")",
"{",
"throw",
"new",
... | Search for the value in the short array and return the index of the first occurrence from the
end of the array.
@param shortArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return the ind... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"short",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"end",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L1620-L1639 |
153,810 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.searchLast | public static int searchLast(long[] longArray, long value, int occurrence) {
if(occurrence <= 0 || occurrence > longArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | java | public static int searchLast(long[] longArray, long value, int occurrence) {
if(occurrence <= 0 || occurrence > longArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | [
"public",
"static",
"int",
"searchLast",
"(",
"long",
"[",
"]",
"longArray",
",",
"long",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"longArray",
".",
"length",
")",
"{",
"throw",
"new",
"I... | Search for the value in the long array and return the index of the first occurrence from the
end of the array.
@param longArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return the index... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"long",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"end",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L1650-L1669 |
153,811 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.searchLast | public static int searchLast(float[] floatArray, float value, int occurrence) {
if(occurrence <= 0 || occurrence > floatArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | java | public static int searchLast(float[] floatArray, float value, int occurrence) {
if(occurrence <= 0 || occurrence > floatArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
... | [
"public",
"static",
"int",
"searchLast",
"(",
"float",
"[",
"]",
"floatArray",
",",
"float",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"floatArray",
".",
"length",
")",
"{",
"throw",
"new",
... | Search for the value in the float array and return the index of the first occurrence from the
end of the array.
@param floatArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return the ind... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"float",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"end",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L1680-L1699 |
153,812 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java | LinearSearch.searchLast | public static int searchLast(double[] doubleArray, double value, int occurrence) {
if(occurrence <= 0 || occurrence > doubleArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}... | java | public static int searchLast(double[] doubleArray, double value, int occurrence) {
if(occurrence <= 0 || occurrence > doubleArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}... | [
"public",
"static",
"int",
"searchLast",
"(",
"double",
"[",
"]",
"doubleArray",
",",
"double",
"value",
",",
"int",
"occurrence",
")",
"{",
"if",
"(",
"occurrence",
"<=",
"0",
"||",
"occurrence",
">",
"doubleArray",
".",
"length",
")",
"{",
"throw",
"ne... | Search for the value in the double array and return the index of the first occurrence from the
end of the array.
@param doubleArray array that we are searching in.
@param value value that is being searched in the array.
@param occurrence number of times we have seen the value before returning the index.
@return the i... | [
"Search",
"for",
"the",
"value",
"in",
"the",
"double",
"array",
"and",
"return",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"from",
"the",
"end",
"of",
"the",
"array",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L1710-L1729 |
153,813 | js-lib-com/commons | src/main/java/js/converter/FileConverter.java | FileConverter.asObject | @Override
public <T> T asObject(String string, Class<T> valueType) {
// at this point value type is guaranteed to be a File
return (T) new File(string);
} | java | @Override
public <T> T asObject(String string, Class<T> valueType) {
// at this point value type is guaranteed to be a File
return (T) new File(string);
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"T",
"asObject",
"(",
"String",
"string",
",",
"Class",
"<",
"T",
">",
"valueType",
")",
"{",
"// at this point value type is guaranteed to be a File\r",
"return",
"(",
"T",
")",
"new",
"File",
"(",
"string",
")",
";... | Return file instance for the given path string. | [
"Return",
"file",
"instance",
"for",
"the",
"given",
"path",
"string",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/converter/FileConverter.java#L20-L24 |
153,814 | js-lib-com/commons | src/main/java/js/converter/FileConverter.java | FileConverter.asString | @Override
public String asString(Object object) {
// at this point object is guaranteed to be a File
return Files.path2unix(((File) object).getPath());
} | java | @Override
public String asString(Object object) {
// at this point object is guaranteed to be a File
return Files.path2unix(((File) object).getPath());
} | [
"@",
"Override",
"public",
"String",
"asString",
"(",
"Object",
"object",
")",
"{",
"// at this point object is guaranteed to be a File\r",
"return",
"Files",
".",
"path2unix",
"(",
"(",
"(",
"File",
")",
"object",
")",
".",
"getPath",
"(",
")",
")",
";",
"}"
... | Return file object path. | [
"Return",
"file",
"object",
"path",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/converter/FileConverter.java#L27-L31 |
153,815 | NessComputing/components-ness-httpclient | client/src/main/java/com/nesscomputing/httpclient/HttpClient.java | HttpClient.head | public <T> HttpClientRequest.Builder<T> head(final URI uri, final HttpClientResponseHandler<T> httpHandler)
{
return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.HEAD, uri, httpHandler);
} | java | public <T> HttpClientRequest.Builder<T> head(final URI uri, final HttpClientResponseHandler<T> httpHandler)
{
return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.HEAD, uri, httpHandler);
} | [
"public",
"<",
"T",
">",
"HttpClientRequest",
".",
"Builder",
"<",
"T",
">",
"head",
"(",
"final",
"URI",
"uri",
",",
"final",
"HttpClientResponseHandler",
"<",
"T",
">",
"httpHandler",
")",
"{",
"return",
"new",
"HttpClientRequest",
".",
"Builder",
"<",
"... | Start building a HEAD request.
@return a request builder which then can be used to create the actual request. | [
"Start",
"building",
"a",
"HEAD",
"request",
"."
] | 8e97e8576e470449672c81fa7890c60f9986966d | https://github.com/NessComputing/components-ness-httpclient/blob/8e97e8576e470449672c81fa7890c60f9986966d/client/src/main/java/com/nesscomputing/httpclient/HttpClient.java#L173-L176 |
153,816 | NessComputing/components-ness-httpclient | client/src/main/java/com/nesscomputing/httpclient/HttpClient.java | HttpClient.delete | public <T> HttpClientRequest.Builder<T> delete(final URI uri, final HttpClientResponseHandler<T> httpHandler)
{
return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.DELETE, uri, httpHandler);
} | java | public <T> HttpClientRequest.Builder<T> delete(final URI uri, final HttpClientResponseHandler<T> httpHandler)
{
return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.DELETE, uri, httpHandler);
} | [
"public",
"<",
"T",
">",
"HttpClientRequest",
".",
"Builder",
"<",
"T",
">",
"delete",
"(",
"final",
"URI",
"uri",
",",
"final",
"HttpClientResponseHandler",
"<",
"T",
">",
"httpHandler",
")",
"{",
"return",
"new",
"HttpClientRequest",
".",
"Builder",
"<",
... | Start building a DELETE request.
@return a request builder which then can be used to create the actual request. | [
"Start",
"building",
"a",
"DELETE",
"request",
"."
] | 8e97e8576e470449672c81fa7890c60f9986966d | https://github.com/NessComputing/components-ness-httpclient/blob/8e97e8576e470449672c81fa7890c60f9986966d/client/src/main/java/com/nesscomputing/httpclient/HttpClient.java#L193-L196 |
153,817 | NessComputing/components-ness-httpclient | client/src/main/java/com/nesscomputing/httpclient/HttpClient.java | HttpClient.options | public <T> HttpClientRequest.Builder<T> options(final URI uri, final HttpClientResponseHandler<T> httpHandler)
{
return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.OPTIONS, uri, httpHandler);
} | java | public <T> HttpClientRequest.Builder<T> options(final URI uri, final HttpClientResponseHandler<T> httpHandler)
{
return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.OPTIONS, uri, httpHandler);
} | [
"public",
"<",
"T",
">",
"HttpClientRequest",
".",
"Builder",
"<",
"T",
">",
"options",
"(",
"final",
"URI",
"uri",
",",
"final",
"HttpClientResponseHandler",
"<",
"T",
">",
"httpHandler",
")",
"{",
"return",
"new",
"HttpClientRequest",
".",
"Builder",
"<",
... | Start building a OPTIONS request.
@return a request builder which then can be used to create the actual request. | [
"Start",
"building",
"a",
"OPTIONS",
"request",
"."
] | 8e97e8576e470449672c81fa7890c60f9986966d | https://github.com/NessComputing/components-ness-httpclient/blob/8e97e8576e470449672c81fa7890c60f9986966d/client/src/main/java/com/nesscomputing/httpclient/HttpClient.java#L213-L216 |
153,818 | NessComputing/components-ness-httpclient | client/src/main/java/com/nesscomputing/httpclient/HttpClient.java | HttpClient.put | public <T> HttpClientRequest.Builder<T> put(final URI uri, final HttpClientResponseHandler<T> httpHandler)
{
return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.PUT, uri, httpHandler);
} | java | public <T> HttpClientRequest.Builder<T> put(final URI uri, final HttpClientResponseHandler<T> httpHandler)
{
return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.PUT, uri, httpHandler);
} | [
"public",
"<",
"T",
">",
"HttpClientRequest",
".",
"Builder",
"<",
"T",
">",
"put",
"(",
"final",
"URI",
"uri",
",",
"final",
"HttpClientResponseHandler",
"<",
"T",
">",
"httpHandler",
")",
"{",
"return",
"new",
"HttpClientRequest",
".",
"Builder",
"<",
"T... | Start building a PUT request.
@return a request builder which then can be used to create the actual request. | [
"Start",
"building",
"a",
"PUT",
"request",
"."
] | 8e97e8576e470449672c81fa7890c60f9986966d | https://github.com/NessComputing/components-ness-httpclient/blob/8e97e8576e470449672c81fa7890c60f9986966d/client/src/main/java/com/nesscomputing/httpclient/HttpClient.java#L233-L236 |
153,819 | NessComputing/components-ness-httpclient | client/src/main/java/com/nesscomputing/httpclient/HttpClient.java | HttpClient.post | public <T> HttpClientRequest.Builder<T> post(final URI uri, final HttpClientResponseHandler<T> httpHandler)
{
return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.POST, uri, httpHandler);
} | java | public <T> HttpClientRequest.Builder<T> post(final URI uri, final HttpClientResponseHandler<T> httpHandler)
{
return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.POST, uri, httpHandler);
} | [
"public",
"<",
"T",
">",
"HttpClientRequest",
".",
"Builder",
"<",
"T",
">",
"post",
"(",
"final",
"URI",
"uri",
",",
"final",
"HttpClientResponseHandler",
"<",
"T",
">",
"httpHandler",
")",
"{",
"return",
"new",
"HttpClientRequest",
".",
"Builder",
"<",
"... | Start building a POST request.
@return a request builder which then can be used to create the actual request. | [
"Start",
"building",
"a",
"POST",
"request",
"."
] | 8e97e8576e470449672c81fa7890c60f9986966d | https://github.com/NessComputing/components-ness-httpclient/blob/8e97e8576e470449672c81fa7890c60f9986966d/client/src/main/java/com/nesscomputing/httpclient/HttpClient.java#L253-L256 |
153,820 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/shared/BaseSharedTable.java | BaseSharedTable.addListener | public void addListener(FieldListener listener, BaseField field)
{
super.addListener(listener, field);
if (listener.getOwner().getRecord() == this.getRecord()) // Only replicate listeners added to base.
{
Iterator<BaseTable> iterator = this.getTables();
while (itera... | java | public void addListener(FieldListener listener, BaseField field)
{
super.addListener(listener, field);
if (listener.getOwner().getRecord() == this.getRecord()) // Only replicate listeners added to base.
{
Iterator<BaseTable> iterator = this.getTables();
while (itera... | [
"public",
"void",
"addListener",
"(",
"FieldListener",
"listener",
",",
"BaseField",
"field",
")",
"{",
"super",
".",
"addListener",
"(",
"listener",
",",
"field",
")",
";",
"if",
"(",
"listener",
".",
"getOwner",
"(",
")",
".",
"getRecord",
"(",
")",
"=... | Add a field listener to the chain.
The listener must be cloned and added to all records on the list.
@param listener The listener to add.
@param The field to add to. | [
"Add",
"a",
"field",
"listener",
"to",
"the",
"chain",
".",
"The",
"listener",
"must",
"be",
"cloned",
"and",
"added",
"to",
"all",
"records",
"on",
"the",
"list",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/shared/BaseSharedTable.java#L142-L169 |
153,821 | sporniket/p3 | src/main/java/com/sporniket/libre/p3/builtins/WrappedObjectMapperProcessor.java | WrappedObjectMapperProcessor.computeGetterName | private String computeGetterName(String name)
{
StringBuilder _result = new StringBuilder().append(PREFIX__GETTER);
_result.append(Character.toUpperCase(name.charAt(0))).append(name.substring(1));
return _result.toString();
} | java | private String computeGetterName(String name)
{
StringBuilder _result = new StringBuilder().append(PREFIX__GETTER);
_result.append(Character.toUpperCase(name.charAt(0))).append(name.substring(1));
return _result.toString();
} | [
"private",
"String",
"computeGetterName",
"(",
"String",
"name",
")",
"{",
"StringBuilder",
"_result",
"=",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"PREFIX__GETTER",
")",
";",
"_result",
".",
"append",
"(",
"Character",
".",
"toUpperCase",
"(",
... | Compute the getter name.
@param name
the name of the property to read.
@return the getter name. | [
"Compute",
"the",
"getter",
"name",
"."
] | fc20b3066dc4a9cd759090adae0a6b02508df135 | https://github.com/sporniket/p3/blob/fc20b3066dc4a9cd759090adae0a6b02508df135/src/main/java/com/sporniket/libre/p3/builtins/WrappedObjectMapperProcessor.java#L105-L110 |
153,822 | sporniket/p3 | src/main/java/com/sporniket/libre/p3/builtins/WrappedObjectMapperProcessor.java | WrappedObjectMapperProcessor.computeSetterName | private String computeSetterName(String name)
{
StringBuilder _result = new StringBuilder().append(PREFIX__SETTER);
_result.append(Character.toUpperCase(name.charAt(0))).append(name.substring(1));
return _result.toString();
} | java | private String computeSetterName(String name)
{
StringBuilder _result = new StringBuilder().append(PREFIX__SETTER);
_result.append(Character.toUpperCase(name.charAt(0))).append(name.substring(1));
return _result.toString();
} | [
"private",
"String",
"computeSetterName",
"(",
"String",
"name",
")",
"{",
"StringBuilder",
"_result",
"=",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"PREFIX__SETTER",
")",
";",
"_result",
".",
"append",
"(",
"Character",
".",
"toUpperCase",
"(",
... | Compute the setter name.
@param name
the name of the property to read.
@return the setter name. | [
"Compute",
"the",
"setter",
"name",
"."
] | fc20b3066dc4a9cd759090adae0a6b02508df135 | https://github.com/sporniket/p3/blob/fc20b3066dc4a9cd759090adae0a6b02508df135/src/main/java/com/sporniket/libre/p3/builtins/WrappedObjectMapperProcessor.java#L119-L124 |
153,823 | sporniket/p3 | src/main/java/com/sporniket/libre/p3/builtins/WrappedObjectMapperProcessor.java | WrappedObjectMapperProcessor.findSetterTarget | private SetterTarget findSetterTarget(String path) throws NoSuchMethodException, IllegalAccessException,
InvocationTargetException
{
String[] _accessStack = path.split(REGEXP__CHAR_DOT);
if (0 == _accessStack.length)
{
throw new IllegalArgumentException(path);
}
int _setterIndex = _accessStack.length -... | java | private SetterTarget findSetterTarget(String path) throws NoSuchMethodException, IllegalAccessException,
InvocationTargetException
{
String[] _accessStack = path.split(REGEXP__CHAR_DOT);
if (0 == _accessStack.length)
{
throw new IllegalArgumentException(path);
}
int _setterIndex = _accessStack.length -... | [
"private",
"SetterTarget",
"findSetterTarget",
"(",
"String",
"path",
")",
"throws",
"NoSuchMethodException",
",",
"IllegalAccessException",
",",
"InvocationTargetException",
"{",
"String",
"[",
"]",
"_accessStack",
"=",
"path",
".",
"split",
"(",
"REGEXP__CHAR_DOT",
... | Find the object to change and the setter method name.
@param path
the path to the object and setter.
@return a {@link SetterTarget} storing the object to change and the setter name.
@throws NoSuchMethodException
when a getter does not exists.
@throws IllegalAccessException
when there is a problem.
@throws InvocationTa... | [
"Find",
"the",
"object",
"to",
"change",
"and",
"the",
"setter",
"method",
"name",
"."
] | fc20b3066dc4a9cd759090adae0a6b02508df135 | https://github.com/sporniket/p3/blob/fc20b3066dc4a9cd759090adae0a6b02508df135/src/main/java/com/sporniket/libre/p3/builtins/WrappedObjectMapperProcessor.java#L208-L227 |
153,824 | pressgang-ccms/PressGangCCMSRESTv1Common | src/main/java/org/jboss/pressgang/ccms/rest/v1/components/ComponentImageV1.java | ComponentImageV1.getDocbookFileName | public static String getDocbookFileName(final RESTImageV1 source) {
checkArgument(source != null, "The source parameter can not be null");
if (source.getLanguageImages_OTM() != null && source.getLanguageImages_OTM().getItems() != null) {
final List<RESTLanguageImageV1> langImages = source.g... | java | public static String getDocbookFileName(final RESTImageV1 source) {
checkArgument(source != null, "The source parameter can not be null");
if (source.getLanguageImages_OTM() != null && source.getLanguageImages_OTM().getItems() != null) {
final List<RESTLanguageImageV1> langImages = source.g... | [
"public",
"static",
"String",
"getDocbookFileName",
"(",
"final",
"RESTImageV1",
"source",
")",
"{",
"checkArgument",
"(",
"source",
"!=",
"null",
",",
"\"The source parameter can not be null\"",
")",
";",
"if",
"(",
"source",
".",
"getLanguageImages_OTM",
"(",
")",... | The docbook file name for an image is the ID of the image and the
extension of the first language image. This does imply that you can not
mix and match image formats within a single image.
@param source The RESTImageV1 object to get the docbook filename for
@return The docbook file name | [
"The",
"docbook",
"file",
"name",
"for",
"an",
"image",
"is",
"the",
"ID",
"of",
"the",
"image",
"and",
"the",
"extension",
"of",
"the",
"first",
"language",
"image",
".",
"This",
"does",
"imply",
"that",
"you",
"can",
"not",
"mix",
"and",
"match",
"im... | 0641d21b127297b47035f3b8e55fba81251b419c | https://github.com/pressgang-ccms/PressGangCCMSRESTv1Common/blob/0641d21b127297b47035f3b8e55fba81251b419c/src/main/java/org/jboss/pressgang/ccms/rest/v1/components/ComponentImageV1.java#L91-L110 |
153,825 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java | WriteRecordClass.writeFieldOffsets | public void writeFieldOffsets(FieldIterator fieldIterator, CodeType codeType)
{ // Now, write all the field offsets out in the header file
ClassInfo recClassInfo = (ClassInfo)this.getMainRecord();
boolean firstTime = true;
String strBaseFieldName;
String strFieldName = "MainField"; ... | java | public void writeFieldOffsets(FieldIterator fieldIterator, CodeType codeType)
{ // Now, write all the field offsets out in the header file
ClassInfo recClassInfo = (ClassInfo)this.getMainRecord();
boolean firstTime = true;
String strBaseFieldName;
String strFieldName = "MainField"; ... | [
"public",
"void",
"writeFieldOffsets",
"(",
"FieldIterator",
"fieldIterator",
",",
"CodeType",
"codeType",
")",
"{",
"// Now, write all the field offsets out in the header file",
"ClassInfo",
"recClassInfo",
"=",
"(",
"ClassInfo",
")",
"this",
".",
"getMainRecord",
"(",
"... | Write the constants for the field offsets
@param codeType | [
"Write",
"the",
"constants",
"for",
"the",
"field",
"offsets"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java#L749-L827 |
153,826 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java | WriteRecordClass.keyInBase | public boolean keyInBase(Record recClassInfo, Record recKeyInfo)
{
try {
if (recClassInfo2 == null)
recClassInfo2 = new ClassInfo(this);
if (recKeyInfo2 == null)
{
recKeyInfo2 = new KeyInfo(this);
recKeyInfo2.setKeyArea(KeyI... | java | public boolean keyInBase(Record recClassInfo, Record recKeyInfo)
{
try {
if (recClassInfo2 == null)
recClassInfo2 = new ClassInfo(this);
if (recKeyInfo2 == null)
{
recKeyInfo2 = new KeyInfo(this);
recKeyInfo2.setKeyArea(KeyI... | [
"public",
"boolean",
"keyInBase",
"(",
"Record",
"recClassInfo",
",",
"Record",
"recKeyInfo",
")",
"{",
"try",
"{",
"if",
"(",
"recClassInfo2",
"==",
"null",
")",
"recClassInfo2",
"=",
"new",
"ClassInfo",
"(",
"this",
")",
";",
"if",
"(",
"recKeyInfo2",
"=... | Is this key already included in a base record?
@return | [
"Is",
"this",
"key",
"already",
"included",
"in",
"a",
"base",
"record?"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java#L832-L871 |
153,827 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java | WriteRecordClass.writeFileMakeViews | public void writeFileMakeViews()
{
if (this.readThisMethod("makeScreen"))
{
this.writeThisMethod(CodeType.THICK);
return; // if no views specified, use default methods
}
if (true)
{
ClassInfo recClassInfo = (ClassInfo)this.getM... | java | public void writeFileMakeViews()
{
if (this.readThisMethod("makeScreen"))
{
this.writeThisMethod(CodeType.THICK);
return; // if no views specified, use default methods
}
if (true)
{
ClassInfo recClassInfo = (ClassInfo)this.getM... | [
"public",
"void",
"writeFileMakeViews",
"(",
")",
"{",
"if",
"(",
"this",
".",
"readThisMethod",
"(",
"\"makeScreen\"",
")",
")",
"{",
"this",
".",
"writeThisMethod",
"(",
"CodeType",
".",
"THICK",
")",
";",
"return",
";",
"// if no views specified, use default ... | Write the TableDoc code to DoMakeViews. | [
"Write",
"the",
"TableDoc",
"code",
"to",
"DoMakeViews",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java#L885-L937 |
153,828 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java | WriteRecordClass.writeFree | public void writeFree()
{
Record recClassInfo = this.getMainRecord();
ClassFields recClassFields = new ClassFields(this);
try {
String strFieldName;
String strFieldClass;
// Now, zero out all the class fields
recClassFields.setKeyArea(C... | java | public void writeFree()
{
Record recClassInfo = this.getMainRecord();
ClassFields recClassFields = new ClassFields(this);
try {
String strFieldName;
String strFieldClass;
// Now, zero out all the class fields
recClassFields.setKeyArea(C... | [
"public",
"void",
"writeFree",
"(",
")",
"{",
"Record",
"recClassInfo",
"=",
"this",
".",
"getMainRecord",
"(",
")",
";",
"ClassFields",
"recClassFields",
"=",
"new",
"ClassFields",
"(",
"this",
")",
";",
"try",
"{",
"String",
"strFieldName",
";",
"String",
... | Free the class. | [
"Free",
"the",
"class",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java#L1251-L1308 |
153,829 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java | WriteRecordClass.readRecordClass | public void readRecordClass(String strRecordClass)
{
String strBaseClass;
Record recClassInfo = this.getMainRecord();
if (!this.readThisClass(strRecordClass))
strBaseClass = "Record";
else
{
strBaseClass = recClassInfo.getField(ClassInfo.BASE_CLASS_NAM... | java | public void readRecordClass(String strRecordClass)
{
String strBaseClass;
Record recClassInfo = this.getMainRecord();
if (!this.readThisClass(strRecordClass))
strBaseClass = "Record";
else
{
strBaseClass = recClassInfo.getField(ClassInfo.BASE_CLASS_NAM... | [
"public",
"void",
"readRecordClass",
"(",
"String",
"strRecordClass",
")",
"{",
"String",
"strBaseClass",
";",
"Record",
"recClassInfo",
"=",
"this",
".",
"getMainRecord",
"(",
")",
";",
"if",
"(",
"!",
"this",
".",
"readThisClass",
"(",
"strRecordClass",
")",... | Read the Class for this record | [
"Read",
"the",
"Class",
"for",
"this",
"record"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java#L1312-L1327 |
153,830 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java | WriteRecordClass.getBaseDataClass | public void getBaseDataClass(FieldStuff fieldStuff)
{
Record recClassInfo2 = m_recClassInfo2;
FieldData recFieldData = (FieldData)this.getRecord(FieldData.FIELD_DATA_FILE);
String strRecordClass = recFieldData.getField(FieldData.FIELD_CLASS).getString();
fieldStuff.strBaseFi... | java | public void getBaseDataClass(FieldStuff fieldStuff)
{
Record recClassInfo2 = m_recClassInfo2;
FieldData recFieldData = (FieldData)this.getRecord(FieldData.FIELD_DATA_FILE);
String strRecordClass = recFieldData.getField(FieldData.FIELD_CLASS).getString();
fieldStuff.strBaseFi... | [
"public",
"void",
"getBaseDataClass",
"(",
"FieldStuff",
"fieldStuff",
")",
"{",
"Record",
"recClassInfo2",
"=",
"m_recClassInfo2",
";",
"FieldData",
"recFieldData",
"=",
"(",
"FieldData",
")",
"this",
".",
"getRecord",
"(",
"FieldData",
".",
"FIELD_DATA_FILE",
")... | Read thru the classes until you get a Physical data class. | [
"Read",
"thru",
"the",
"classes",
"until",
"you",
"get",
"a",
"Physical",
"data",
"class",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java#L1391-L1433 |
153,831 | jbundle/jbundle | app/program/manual/backup/src/main/java/org/jbundle/app/program/manual/backup/BackupServerApp.java | BackupServerApp.actionPerformed | @Override
public void actionPerformed(ActionEvent e)
{
if (e.getSource() == m_cycletimer)
this.startNextFile();
else if (e.getSource() == m_timeouttimer)
this.checkTimeout();
} | java | @Override
public void actionPerformed(ActionEvent e)
{
if (e.getSource() == m_cycletimer)
this.startNextFile();
else if (e.getSource() == m_timeouttimer)
this.checkTimeout();
} | [
"@",
"Override",
"public",
"void",
"actionPerformed",
"(",
"ActionEvent",
"e",
")",
"{",
"if",
"(",
"e",
".",
"getSource",
"(",
")",
"==",
"m_cycletimer",
")",
"this",
".",
"startNextFile",
"(",
")",
";",
"else",
"if",
"(",
"e",
".",
"getSource",
"(",
... | Timer handling. | [
"Timer",
"handling",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/backup/src/main/java/org/jbundle/app/program/manual/backup/BackupServerApp.java#L291-L298 |
153,832 | jbundle/jbundle | app/program/manual/backup/src/main/java/org/jbundle/app/program/manual/backup/BackupServerApp.java | BackupServerApp.flush | public synchronized void flush(boolean bSendFakeTrx)
{
try {
if (bSendFakeTrx)
this.getWriter().writeObject(FAKE_TRX);
this.getWriter().flush();
} catch (IOException e) {
e.printStackTrace();
}
} | java | public synchronized void flush(boolean bSendFakeTrx)
{
try {
if (bSendFakeTrx)
this.getWriter().writeObject(FAKE_TRX);
this.getWriter().flush();
} catch (IOException e) {
e.printStackTrace();
}
} | [
"public",
"synchronized",
"void",
"flush",
"(",
"boolean",
"bSendFakeTrx",
")",
"{",
"try",
"{",
"if",
"(",
"bSendFakeTrx",
")",
"this",
".",
"getWriter",
"(",
")",
".",
"writeObject",
"(",
"FAKE_TRX",
")",
";",
"this",
".",
"getWriter",
"(",
")",
".",
... | Flush the buffer.
@param bSendFakeTrx Send a fake trx before flushing (This guarantees activity on the stream before the flush [In case it just autoflushed the entire buffer]) | [
"Flush",
"the",
"buffer",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/backup/src/main/java/org/jbundle/app/program/manual/backup/BackupServerApp.java#L323-L332 |
153,833 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/InfoTopic.java | InfoTopic.getIdAndOptionsString | protected String getIdAndOptionsString() {
final String options = getOptionsString();
if (isTopicANewTopic()) {
return id + (options.equals("") ? "" : (", " + options));
} else {
return id + (revision == null ? "" : (", rev: " + revision)) + (options.equals("") ? "" : (",... | java | protected String getIdAndOptionsString() {
final String options = getOptionsString();
if (isTopicANewTopic()) {
return id + (options.equals("") ? "" : (", " + options));
} else {
return id + (revision == null ? "" : (", rev: " + revision)) + (options.equals("") ? "" : (",... | [
"protected",
"String",
"getIdAndOptionsString",
"(",
")",
"{",
"final",
"String",
"options",
"=",
"getOptionsString",
"(",
")",
";",
"if",
"(",
"isTopicANewTopic",
"(",
")",
")",
"{",
"return",
"id",
"+",
"(",
"options",
".",
"equals",
"(",
"\"\"",
")",
... | Get the ID and Options string for the topic.
@return | [
"Get",
"the",
"ID",
"and",
"Options",
"string",
"for",
"the",
"topic",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/InfoTopic.java#L359-L366 |
153,834 | jbundle/jbundle | main/db/src/main/java/org/jbundle/main/db/base/BaseStatus.java | BaseStatus.isWaiting | public static boolean isWaiting(int iStatusID)
{
switch (iStatusID)
{
case REQUEST_SENT:
case DATA_REQUIRED:
return true;
case NULL_STATUS:
case NO_STATUS:
case PROPOSAL:
case ACCEPTED:
case CANCELED:... | java | public static boolean isWaiting(int iStatusID)
{
switch (iStatusID)
{
case REQUEST_SENT:
case DATA_REQUIRED:
return true;
case NULL_STATUS:
case NO_STATUS:
case PROPOSAL:
case ACCEPTED:
case CANCELED:... | [
"public",
"static",
"boolean",
"isWaiting",
"(",
"int",
"iStatusID",
")",
"{",
"switch",
"(",
"iStatusID",
")",
"{",
"case",
"REQUEST_SENT",
":",
"case",
"DATA_REQUIRED",
":",
"return",
"true",
";",
"case",
"NULL_STATUS",
":",
"case",
"NO_STATUS",
":",
"case... | Is this status waiting for an event to occur?. | [
"Is",
"this",
"status",
"waiting",
"for",
"an",
"event",
"to",
"occur?",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/db/base/BaseStatus.java#L137-L159 |
153,835 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/comp/ChangePasswordDialog.java | ChangePasswordDialog.getNewPassword | public String getNewPassword()
{
char[] rgchNewPassword = newPasswordField.getPassword();
char[] rgchConfirmPassword = confirmPasswordField.getPassword();
String strNewPassword = new String(rgchNewPassword);
String strConfirmPassword = new String(rgchConfirmPassword);
if (str... | java | public String getNewPassword()
{
char[] rgchNewPassword = newPasswordField.getPassword();
char[] rgchConfirmPassword = confirmPasswordField.getPassword();
String strNewPassword = new String(rgchNewPassword);
String strConfirmPassword = new String(rgchConfirmPassword);
if (str... | [
"public",
"String",
"getNewPassword",
"(",
")",
"{",
"char",
"[",
"]",
"rgchNewPassword",
"=",
"newPasswordField",
".",
"getPassword",
"(",
")",
";",
"char",
"[",
"]",
"rgchConfirmPassword",
"=",
"confirmPasswordField",
".",
"getPassword",
"(",
")",
";",
"Stri... | Compare the new and confirm password and return the new password. | [
"Compare",
"the",
"new",
"and",
"confirm",
"password",
"and",
"return",
"the",
"new",
"password",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/comp/ChangePasswordDialog.java#L55-L65 |
153,836 | tvesalainen/util | util/src/main/java/org/vesalainen/math/Circles.java | Circles.isInside | public static boolean isInside(Circle c1, Circle c2)
{
return distanceFromCenter(c1, c2.getX(), c2.getY())+c2.getRadius() < c1.getRadius();
} | java | public static boolean isInside(Circle c1, Circle c2)
{
return distanceFromCenter(c1, c2.getX(), c2.getY())+c2.getRadius() < c1.getRadius();
} | [
"public",
"static",
"boolean",
"isInside",
"(",
"Circle",
"c1",
",",
"Circle",
"c2",
")",
"{",
"return",
"distanceFromCenter",
"(",
"c1",
",",
"c2",
".",
"getX",
"(",
")",
",",
"c2",
".",
"getY",
"(",
")",
")",
"+",
"c2",
".",
"getRadius",
"(",
")"... | Returns true if c2 is inside of c1
@param c1
@param c2
@return | [
"Returns",
"true",
"if",
"c2",
"is",
"inside",
"of",
"c1"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/Circles.java#L60-L63 |
153,837 | wigforss/Ka-Commons-Reflection | src/main/java/org/kasource/commons/reflection/collection/ClassMap.java | ClassMap.get | public T get(Class<?> clazz) {
if(map == null || map.isEmpty()) {
return null;
}
Class<?> classToInspect = clazz;
T object = map.get(classToInspect);
if(object == null && !excludeInterfaces) {
object = getByInterfaces(classToInspect);
}
whi... | java | public T get(Class<?> clazz) {
if(map == null || map.isEmpty()) {
return null;
}
Class<?> classToInspect = clazz;
T object = map.get(classToInspect);
if(object == null && !excludeInterfaces) {
object = getByInterfaces(classToInspect);
}
whi... | [
"public",
"T",
"get",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"if",
"(",
"map",
"==",
"null",
"||",
"map",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"Class",
"<",
"?",
">",
"classToInspect",
"=",
"clazz",
";",
"T",... | Returns the value of a map entry which key matches the supplied class
or any of its super classes or any of its interfaces.
Values are resolved using the most specific classes and interfaces first
and then more general (base classes).
@param clazz Class to resolve value for by inspecting the class META data.
@return... | [
"Returns",
"the",
"value",
"of",
"a",
"map",
"entry",
"which",
"key",
"matches",
"the",
"supplied",
"class",
"or",
"any",
"of",
"its",
"super",
"classes",
"or",
"any",
"of",
"its",
"interfaces",
"."
] | a80f7a164cd800089e4f4dd948ca6f0e7badcf33 | https://github.com/wigforss/Ka-Commons-Reflection/blob/a80f7a164cd800089e4f4dd948ca6f0e7badcf33/src/main/java/org/kasource/commons/reflection/collection/ClassMap.java#L51-L68 |
153,838 | wigforss/Ka-Commons-Reflection | src/main/java/org/kasource/commons/reflection/collection/ClassMap.java | ClassMap.getByInterfaces | public T getByInterfaces(Class<?> clazz) {
T object = null;
Class<?>[] interfaces = clazz.getInterfaces();
for (Class<?> interfaceClass : interfaces) {
object = map.get(interfaceClass);
if(object != null) {
break;
}
}
return obj... | java | public T getByInterfaces(Class<?> clazz) {
T object = null;
Class<?>[] interfaces = clazz.getInterfaces();
for (Class<?> interfaceClass : interfaces) {
object = map.get(interfaceClass);
if(object != null) {
break;
}
}
return obj... | [
"public",
"T",
"getByInterfaces",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"T",
"object",
"=",
"null",
";",
"Class",
"<",
"?",
">",
"[",
"]",
"interfaces",
"=",
"clazz",
".",
"getInterfaces",
"(",
")",
";",
"for",
"(",
"Class",
"<",
"?",
"... | Returns the vale associated with the any
interface implemented by the supplied class.
This method will return the first match only, if
more than one value can be resolved the first is
returned.
@param clazz Class to inspect interfaces of.
@return The resolved value if found, else null. | [
"Returns",
"the",
"vale",
"associated",
"with",
"the",
"any",
"interface",
"implemented",
"by",
"the",
"supplied",
"class",
"."
] | a80f7a164cd800089e4f4dd948ca6f0e7badcf33 | https://github.com/wigforss/Ka-Commons-Reflection/blob/a80f7a164cd800089e4f4dd948ca6f0e7badcf33/src/main/java/org/kasource/commons/reflection/collection/ClassMap.java#L83-L93 |
153,839 | jbundle/jbundle | base/message/core/src/main/java/org/jbundle/base/message/core/local/LocalMessageReceiver.java | LocalMessageReceiver.getMessageFilterList | public MessageReceiverFilterList getMessageFilterList()
{
if (m_filterList == null)
{
String strFilterType = null;
App app = this.getMessageQueue().getMessageManager().getApplication();
if (app != null)
strFilterType = app.getProperty(MessageConsta... | java | public MessageReceiverFilterList getMessageFilterList()
{
if (m_filterList == null)
{
String strFilterType = null;
App app = this.getMessageQueue().getMessageManager().getApplication();
if (app != null)
strFilterType = app.getProperty(MessageConsta... | [
"public",
"MessageReceiverFilterList",
"getMessageFilterList",
"(",
")",
"{",
"if",
"(",
"m_filterList",
"==",
"null",
")",
"{",
"String",
"strFilterType",
"=",
"null",
";",
"App",
"app",
"=",
"this",
".",
"getMessageQueue",
"(",
")",
".",
"getMessageManager",
... | Get the message filter list.
Create a new filter list the first time.
@return The filter list. | [
"Get",
"the",
"message",
"filter",
"list",
".",
"Create",
"a",
"new",
"filter",
"list",
"the",
"first",
"time",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/core/src/main/java/org/jbundle/base/message/core/local/LocalMessageReceiver.java#L73-L85 |
153,840 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/balancing/MeteredBalancingPolicy.java | MeteredBalancingPolicy.claimWork | @Override
public void claimWork() throws InterruptedException
{
synchronized (cluster.allWorkUnits) {
for (String workUnit : getUnclaimed()) {
if (isPeggedToMe(workUnit)) {
claimWorkPeggedToMe(workUnit);
}
}
final do... | java | @Override
public void claimWork() throws InterruptedException
{
synchronized (cluster.allWorkUnits) {
for (String workUnit : getUnclaimed()) {
if (isPeggedToMe(workUnit)) {
claimWorkPeggedToMe(workUnit);
}
}
final do... | [
"@",
"Override",
"public",
"void",
"claimWork",
"(",
")",
"throws",
"InterruptedException",
"{",
"synchronized",
"(",
"cluster",
".",
"allWorkUnits",
")",
"{",
"for",
"(",
"String",
"workUnit",
":",
"getUnclaimed",
"(",
")",
")",
"{",
"if",
"(",
"isPeggedToM... | Begins by claiming all work units that are pegged to this node.
Then, continues to claim work from the available pool until we've claimed
equal to or slightly more than the total desired load. | [
"Begins",
"by",
"claiming",
"all",
"work",
"units",
"that",
"are",
"pegged",
"to",
"this",
"node",
".",
"Then",
"continues",
"to",
"claim",
"work",
"from",
"the",
"available",
"pool",
"until",
"we",
"ve",
"claimed",
"equal",
"to",
"or",
"slightly",
"more",... | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/balancing/MeteredBalancingPolicy.java#L77-L100 |
153,841 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/balancing/MeteredBalancingPolicy.java | MeteredBalancingPolicy.myLoad | public double myLoad()
{
double load = 0d;
/*
LOG.debug(cluster.loadMap.toString);
LOG.debug(cluster.myWorkUnits.toString);
*/
for (String wu : cluster.myWorkUnits) {
Double d = cluster.getWorkUnitLoad(wu);
if (d != null) {
load... | java | public double myLoad()
{
double load = 0d;
/*
LOG.debug(cluster.loadMap.toString);
LOG.debug(cluster.myWorkUnits.toString);
*/
for (String wu : cluster.myWorkUnits) {
Double d = cluster.getWorkUnitLoad(wu);
if (d != null) {
load... | [
"public",
"double",
"myLoad",
"(",
")",
"{",
"double",
"load",
"=",
"0d",
";",
"/*\n LOG.debug(cluster.loadMap.toString);\n LOG.debug(cluster.myWorkUnits.toString);\n */",
"for",
"(",
"String",
"wu",
":",
"cluster",
".",
"myWorkUnits",
")",
"{",
"Doub... | Determines the current load on this instance when smart rebalancing is enabled.
This load is determined by the sum of all of this node's meters' one minute rate. | [
"Determines",
"the",
"current",
"load",
"on",
"this",
"instance",
"when",
"smart",
"rebalancing",
"is",
"enabled",
".",
"This",
"load",
"is",
"determined",
"by",
"the",
"sum",
"of",
"all",
"of",
"this",
"node",
"s",
"meters",
"one",
"minute",
"rate",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/balancing/MeteredBalancingPolicy.java#L128-L142 |
153,842 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/balancing/MeteredBalancingPolicy.java | MeteredBalancingPolicy.scheduleLoadTicks | private void scheduleLoadTicks() {
Runnable sendLoadToZookeeper = new Runnable() {
@Override
public void run() {
final List<String> loads = new ArrayList<String>();
synchronized (meters) {
for (Map.Entry<String,Meter> entry : meters.ent... | java | private void scheduleLoadTicks() {
Runnable sendLoadToZookeeper = new Runnable() {
@Override
public void run() {
final List<String> loads = new ArrayList<String>();
synchronized (meters) {
for (Map.Entry<String,Meter> entry : meters.ent... | [
"private",
"void",
"scheduleLoadTicks",
"(",
")",
"{",
"Runnable",
"sendLoadToZookeeper",
"=",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"final",
"List",
"<",
"String",
">",
"loads",
"=",
"new",
"ArrayList",... | Once a minute, pass off information about the amount of load generated per
work unit off to Zookeeper for use in the claiming and rebalancing process. | [
"Once",
"a",
"minute",
"pass",
"off",
"information",
"about",
"the",
"amount",
"of",
"load",
"generated",
"per",
"work",
"unit",
"off",
"to",
"Zookeeper",
"for",
"use",
"in",
"the",
"claiming",
"and",
"rebalancing",
"process",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/balancing/MeteredBalancingPolicy.java#L148-L190 |
153,843 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java | ConnectionHandler.createConnection | public void createConnection(ICredentials credentials, ConnectorClusterConfig config) throws ConnectionException {
logger.info("Creating new connection...");
Connection connection = createNativeConnection(credentials, config);
String connectionName = config.getName().getName();
synchro... | java | public void createConnection(ICredentials credentials, ConnectorClusterConfig config) throws ConnectionException {
logger.info("Creating new connection...");
Connection connection = createNativeConnection(credentials, config);
String connectionName = config.getName().getName();
synchro... | [
"public",
"void",
"createConnection",
"(",
"ICredentials",
"credentials",
",",
"ConnectorClusterConfig",
"config",
")",
"throws",
"ConnectionException",
"{",
"logger",
".",
"info",
"(",
"\"Creating new connection...\"",
")",
";",
"Connection",
"connection",
"=",
"create... | This method create a connection.
@param credentials the cluster configuration.
@param config the connection options.
@throws ConnectionException if the connection already exists. | [
"This",
"method",
"create",
"a",
"connection",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java#L72-L90 |
153,844 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java | ConnectionHandler.isConnected | public boolean isConnected(String clusterName) {
boolean isConnected = false;
synchronized (connections) {
if (connections.containsKey(clusterName)) {
isConnected = connections.get(clusterName).isConnected();
}
}
return isConnected;
} | java | public boolean isConnected(String clusterName) {
boolean isConnected = false;
synchronized (connections) {
if (connections.containsKey(clusterName)) {
isConnected = connections.get(clusterName).isConnected();
}
}
return isConnected;
} | [
"public",
"boolean",
"isConnected",
"(",
"String",
"clusterName",
")",
"{",
"boolean",
"isConnected",
"=",
"false",
";",
"synchronized",
"(",
"connections",
")",
"{",
"if",
"(",
"connections",
".",
"containsKey",
"(",
"clusterName",
")",
")",
"{",
"isConnected... | Return if a connection is connected.
@param clusterName the connection name.
@return true if the connection is connected. False in other case. | [
"Return",
"if",
"a",
"connection",
"is",
"connected",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java#L113-L121 |
153,845 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java | ConnectionHandler.getConnection | public Connection getConnection(String name) throws ExecutionException {
Connection connection = null;
synchronized (connections) {
if (connections.containsKey(name)) {
connection = connections.get(name);
} else {
String msg = "The connection [" +... | java | public Connection getConnection(String name) throws ExecutionException {
Connection connection = null;
synchronized (connections) {
if (connections.containsKey(name)) {
connection = connections.get(name);
} else {
String msg = "The connection [" +... | [
"public",
"Connection",
"getConnection",
"(",
"String",
"name",
")",
"throws",
"ExecutionException",
"{",
"Connection",
"connection",
"=",
"null",
";",
"synchronized",
"(",
"connections",
")",
"{",
"if",
"(",
"connections",
".",
"containsKey",
"(",
"name",
")",
... | This method return a connection.
@param name the connection name.
@return the connection.
@throws ExecutionException if the connection does not exist. | [
"This",
"method",
"return",
"a",
"connection",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java#L141-L154 |
153,846 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java | ConnectionHandler.startJob | public void startJob(String targetCluster) throws ExecutionException {
getConnection(targetCluster).setJobInProgress(true);
logger.info("a new job has been started in cluster [" + targetCluster + "]");
} | java | public void startJob(String targetCluster) throws ExecutionException {
getConnection(targetCluster).setJobInProgress(true);
logger.info("a new job has been started in cluster [" + targetCluster + "]");
} | [
"public",
"void",
"startJob",
"(",
"String",
"targetCluster",
")",
"throws",
"ExecutionException",
"{",
"getConnection",
"(",
"targetCluster",
")",
".",
"setJobInProgress",
"(",
"true",
")",
";",
"logger",
".",
"info",
"(",
"\"a new job has been started in cluster [\"... | This method start a work for a connections.
@param targetCluster the connections cluster name.
@throws ExecutionException if the work can not start. | [
"This",
"method",
"start",
"a",
"work",
"for",
"a",
"connections",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java#L162-L165 |
153,847 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java | ConnectionHandler.endJob | public void endJob(String targetCluster) throws ExecutionException {
getConnection(targetCluster).setJobInProgress(false);
logger.info("a new job has been finished in cluster [" + targetCluster + "]");
} | java | public void endJob(String targetCluster) throws ExecutionException {
getConnection(targetCluster).setJobInProgress(false);
logger.info("a new job has been finished in cluster [" + targetCluster + "]");
} | [
"public",
"void",
"endJob",
"(",
"String",
"targetCluster",
")",
"throws",
"ExecutionException",
"{",
"getConnection",
"(",
"targetCluster",
")",
".",
"setJobInProgress",
"(",
"false",
")",
";",
"logger",
".",
"info",
"(",
"\"a new job has been finished in cluster [\"... | This method finalize a work for a connections.
@param targetCluster the connections cluster name.
@throws ExecutionException if the work can not finish. | [
"This",
"method",
"finalize",
"a",
"work",
"for",
"a",
"connections",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java#L173-L176 |
153,848 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java | ComponentPrint.surveyComponents | public void surveyComponents(Component component)
{
// First, climb up and get the title from the frame.
Component frame = component;
while (frame != null)
{
if (frame instanceof Frame)
{
title = ((Frame)frame).getTitle();
break... | java | public void surveyComponents(Component component)
{
// First, climb up and get the title from the frame.
Component frame = component;
while (frame != null)
{
if (frame instanceof Frame)
{
title = ((Frame)frame).getTitle();
break... | [
"public",
"void",
"surveyComponents",
"(",
"Component",
"component",
")",
"{",
"// First, climb up and get the title from the frame.",
"Component",
"frame",
"=",
"component",
";",
"while",
"(",
"frame",
"!=",
"null",
")",
"{",
"if",
"(",
"frame",
"instanceof",
"Fram... | Survey the components.
@param component The top-level parent. | [
"Survey",
"the",
"components",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java#L82-L109 |
153,849 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java | ComponentPrint.addComponents | public void addComponents(Container container, Vector<Component> vector)
{
int components = container.getComponentCount();
int[] componentOrder = this.getComponentOrder(container);
for (int i = 0; i < components; i++)
{
Component component = container.getComponent(compone... | java | public void addComponents(Container container, Vector<Component> vector)
{
int components = container.getComponentCount();
int[] componentOrder = this.getComponentOrder(container);
for (int i = 0; i < components; i++)
{
Component component = container.getComponent(compone... | [
"public",
"void",
"addComponents",
"(",
"Container",
"container",
",",
"Vector",
"<",
"Component",
">",
"vector",
")",
"{",
"int",
"components",
"=",
"container",
".",
"getComponentCount",
"(",
")",
";",
"int",
"[",
"]",
"componentOrder",
"=",
"this",
".",
... | Go through all the components and order the ones that I need to print.
@param container The container to start at.
@param vector The vector to add the components to. | [
"Go",
"through",
"all",
"the",
"components",
"and",
"order",
"the",
"ones",
"that",
"I",
"need",
"to",
"print",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java#L115-L149 |
153,850 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java | ComponentPrint.getComponentOrder | public int[] getComponentOrder(Container container)
{
int components = container.getComponentCount();
int[] componentOrder = new int[components];
int[] rgY = new int[components];
// First assume order is Y order
for (int i = 0; i < components; i++)
{
compo... | java | public int[] getComponentOrder(Container container)
{
int components = container.getComponentCount();
int[] componentOrder = new int[components];
int[] rgY = new int[components];
// First assume order is Y order
for (int i = 0; i < components; i++)
{
compo... | [
"public",
"int",
"[",
"]",
"getComponentOrder",
"(",
"Container",
"container",
")",
"{",
"int",
"components",
"=",
"container",
".",
"getComponentCount",
"(",
")",
";",
"int",
"[",
"]",
"componentOrder",
"=",
"new",
"int",
"[",
"components",
"]",
";",
"int... | Get the component order by how they are ordered vertically on the screen.
@param container The container to survey.
@return An array with the container index values by their y position on the screen. | [
"Get",
"the",
"component",
"order",
"by",
"how",
"they",
"are",
"ordered",
"vertically",
"on",
"the",
"screen",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java#L155-L183 |
153,851 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java | ComponentPrint.resetAll | public void resetAll()
{
currentLocationOnPage = 0;
componentIndex = 0;
currentComponent = this.getComponent(componentIndex);
componentStartYLocation = 0;
componentPageHeight = 0;
currentPageIndex = 0;
remainingComponentHeight = 0;
if (currentCompon... | java | public void resetAll()
{
currentLocationOnPage = 0;
componentIndex = 0;
currentComponent = this.getComponent(componentIndex);
componentStartYLocation = 0;
componentPageHeight = 0;
currentPageIndex = 0;
remainingComponentHeight = 0;
if (currentCompon... | [
"public",
"void",
"resetAll",
"(",
")",
"{",
"currentLocationOnPage",
"=",
"0",
";",
"componentIndex",
"=",
"0",
";",
"currentComponent",
"=",
"this",
".",
"getComponent",
"(",
"componentIndex",
")",
";",
"componentStartYLocation",
"=",
"0",
";",
"componentPageH... | Reset to the first page. | [
"Reset",
"to",
"the",
"first",
"page",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java#L187-L202 |
153,852 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java | ComponentPrint.setCurrentYLocation | public boolean setCurrentYLocation(int targetPageIndex, int targetLocationOnPage)
{
//? if ((targetPageIndex != currentPageIndex) || (targetLocationOnPage != currentLocationOnPage))
this.resetAll(); // If I'm not using the cached values, reset to start
boolean pageDone = false;
... | java | public boolean setCurrentYLocation(int targetPageIndex, int targetLocationOnPage)
{
//? if ((targetPageIndex != currentPageIndex) || (targetLocationOnPage != currentLocationOnPage))
this.resetAll(); // If I'm not using the cached values, reset to start
boolean pageDone = false;
... | [
"public",
"boolean",
"setCurrentYLocation",
"(",
"int",
"targetPageIndex",
",",
"int",
"targetLocationOnPage",
")",
"{",
"//? if ((targetPageIndex != currentPageIndex) || (targetLocationOnPage != currentLocationOnPage))",
"this",
".",
"resetAll",
"(",
")",
";",
"// If I'm ... | Set the current Y location and change the current component information to match.
@param targetPageIndex The page to position to.
@param targetLocationOnPage The location in the current page to position in.
@return True if this is the last component and it is finished on this page. | [
"Set",
"the",
"current",
"Y",
"location",
"and",
"change",
"the",
"current",
"component",
"information",
"to",
"match",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java#L218-L264 |
153,853 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java | ComponentPrint.getMaxComponentWidth | public int getMaxComponentWidth()
{
int maxWidth = 0;
for (int index = 0; ; index++)
{
Component component = this.getComponent(index);
if (component == null)
break;
if (component instanceof JTableHeader)
continue; // Don't... | java | public int getMaxComponentWidth()
{
int maxWidth = 0;
for (int index = 0; ; index++)
{
Component component = this.getComponent(index);
if (component == null)
break;
if (component instanceof JTableHeader)
continue; // Don't... | [
"public",
"int",
"getMaxComponentWidth",
"(",
")",
"{",
"int",
"maxWidth",
"=",
"0",
";",
"for",
"(",
"int",
"index",
"=",
"0",
";",
";",
"index",
"++",
")",
"{",
"Component",
"component",
"=",
"this",
".",
"getComponent",
"(",
"index",
")",
";",
"if... | Get the widest component.
To calculate the scale.
@return The width of the widest component. | [
"Get",
"the",
"widest",
"component",
".",
"To",
"calculate",
"the",
"scale",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java#L287-L310 |
153,854 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java | ComponentPrint.getComponent | public Component getComponent(int componentIndex)
{
if (componentList != null)
if (componentIndex < componentList.length)
return componentList[componentIndex];
return null;
} | java | public Component getComponent(int componentIndex)
{
if (componentList != null)
if (componentIndex < componentList.length)
return componentList[componentIndex];
return null;
} | [
"public",
"Component",
"getComponent",
"(",
"int",
"componentIndex",
")",
"{",
"if",
"(",
"componentList",
"!=",
"null",
")",
"if",
"(",
"componentIndex",
"<",
"componentList",
".",
"length",
")",
"return",
"componentList",
"[",
"componentIndex",
"]",
";",
"re... | Get the component at this index.
@param componentIndex Component index.
@return The component at this index. | [
"Get",
"the",
"component",
"at",
"this",
"index",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java#L316-L322 |
153,855 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java | ComponentPrint.checkComponentHeight | public int checkComponentHeight()
{
int maxHeightToCheck = componentStartYLocation - currentLocationOnPage + pageHeight;
if (currentComponent == null)
return 0;
if (currentComponent instanceof JTable)
{ // todo(don) There has to be a better way of doing this JTable code... | java | public int checkComponentHeight()
{
int maxHeightToCheck = componentStartYLocation - currentLocationOnPage + pageHeight;
if (currentComponent == null)
return 0;
if (currentComponent instanceof JTable)
{ // todo(don) There has to be a better way of doing this JTable code... | [
"public",
"int",
"checkComponentHeight",
"(",
")",
"{",
"int",
"maxHeightToCheck",
"=",
"componentStartYLocation",
"-",
"currentLocationOnPage",
"+",
"pageHeight",
";",
"if",
"(",
"currentComponent",
"==",
"null",
")",
"return",
"0",
";",
"if",
"(",
"currentCompon... | Get the height of this component.
Typically, this is just the height of the component.
Except for JTables, where I need to query to this target height to make sure the
component is at least this correct height.
@param component The component to get the height of.
@return the component's height. | [
"Get",
"the",
"height",
"of",
"this",
"component",
".",
"Typically",
"this",
"is",
"just",
"the",
"height",
"of",
"the",
"component",
".",
"Except",
"for",
"JTables",
"where",
"I",
"need",
"to",
"query",
"to",
"this",
"target",
"height",
"to",
"make",
"s... | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java#L339-L361 |
153,856 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java | ComponentPrint.calcComponentPageHeight | public int calcComponentPageHeight()
{
remainingComponentHeight = remainingComponentHeight + this.checkComponentHeight();
if (remainingComponentHeight <= remainingPageHeight)
return remainingComponentHeight;
if (currentComponent == null)
return 0; // Never
i... | java | public int calcComponentPageHeight()
{
remainingComponentHeight = remainingComponentHeight + this.checkComponentHeight();
if (remainingComponentHeight <= remainingPageHeight)
return remainingComponentHeight;
if (currentComponent == null)
return 0; // Never
i... | [
"public",
"int",
"calcComponentPageHeight",
"(",
")",
"{",
"remainingComponentHeight",
"=",
"remainingComponentHeight",
"+",
"this",
".",
"checkComponentHeight",
"(",
")",
";",
"if",
"(",
"remainingComponentHeight",
"<=",
"remainingPageHeight",
")",
"return",
"remaining... | Calculate the remaining height of this component on this page.
This is used to calculate a smart page break that does not split a control
between pages.
@return The remaining height of this component on this page. | [
"Calculate",
"the",
"remaining",
"height",
"of",
"this",
"component",
"on",
"this",
"page",
".",
"This",
"is",
"used",
"to",
"calculate",
"a",
"smart",
"page",
"break",
"that",
"does",
"not",
"split",
"a",
"control",
"between",
"pages",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ComponentPrint.java#L368-L414 |
153,857 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/engine/SingleProjectQueryEngine.java | SingleProjectQueryEngine.executeWorkFlow | @Override
protected final QueryResult executeWorkFlow(LogicalWorkflow workflow) throws ConnectorException {
checkIsSupported(workflow);
ClusterName clusterName = ((Project) workflow.getInitialSteps().get(0)).getClusterName();
return execute((Project) workflow.getInitialSteps().get(0),
... | java | @Override
protected final QueryResult executeWorkFlow(LogicalWorkflow workflow) throws ConnectorException {
checkIsSupported(workflow);
ClusterName clusterName = ((Project) workflow.getInitialSteps().get(0)).getClusterName();
return execute((Project) workflow.getInitialSteps().get(0),
... | [
"@",
"Override",
"protected",
"final",
"QueryResult",
"executeWorkFlow",
"(",
"LogicalWorkflow",
"workflow",
")",
"throws",
"ConnectorException",
"{",
"checkIsSupported",
"(",
"workflow",
")",
";",
"ClusterName",
"clusterName",
"=",
"(",
"(",
"Project",
")",
"workfl... | This method execute a query with only a project.
@param workflow the workflow to be executed.
@return the query result.
@throws ConnectorException if an error happens. | [
"This",
"method",
"execute",
"a",
"query",
"with",
"only",
"a",
"project",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/engine/SingleProjectQueryEngine.java#L54-L62 |
153,858 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/engine/SingleProjectQueryEngine.java | SingleProjectQueryEngine.asyncExecuteWorkFlow | protected final void asyncExecuteWorkFlow(String queryId, LogicalWorkflow workflow, IResultHandler
resultHandler) throws ConnectorException {
checkIsSupported(workflow);
ClusterName clusterName = ((Project) workflow.getInitialSteps().get(0)).getClusterName();
asyncExecute(queryId, (P... | java | protected final void asyncExecuteWorkFlow(String queryId, LogicalWorkflow workflow, IResultHandler
resultHandler) throws ConnectorException {
checkIsSupported(workflow);
ClusterName clusterName = ((Project) workflow.getInitialSteps().get(0)).getClusterName();
asyncExecute(queryId, (P... | [
"protected",
"final",
"void",
"asyncExecuteWorkFlow",
"(",
"String",
"queryId",
",",
"LogicalWorkflow",
"workflow",
",",
"IResultHandler",
"resultHandler",
")",
"throws",
"ConnectorException",
"{",
"checkIsSupported",
"(",
"workflow",
")",
";",
"ClusterName",
"clusterNa... | Abstract method which must be implemented by the concrete database metadataEngine to execute a async workflow.
@param queryId the queryId.
@param workflow the workflow.
@param resultHandler the result handler.
@throws ConnectorException if an error happens. | [
"Abstract",
"method",
"which",
"must",
"be",
"implemented",
"by",
"the",
"concrete",
"database",
"metadataEngine",
"to",
"execute",
"a",
"async",
"workflow",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/engine/SingleProjectQueryEngine.java#L72-L78 |
153,859 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/engine/SingleProjectQueryEngine.java | SingleProjectQueryEngine.pagedExecuteWorkFlow | protected final void pagedExecuteWorkFlow(String queryId, LogicalWorkflow workflow, IResultHandler resultHandler,
int pageSize) throws ConnectorException {
checkIsSupported(workflow);
ClusterName clusterName = ((Project) workflow.getInitialSteps().get(0)).g... | java | protected final void pagedExecuteWorkFlow(String queryId, LogicalWorkflow workflow, IResultHandler resultHandler,
int pageSize) throws ConnectorException {
checkIsSupported(workflow);
ClusterName clusterName = ((Project) workflow.getInitialSteps().get(0)).g... | [
"protected",
"final",
"void",
"pagedExecuteWorkFlow",
"(",
"String",
"queryId",
",",
"LogicalWorkflow",
"workflow",
",",
"IResultHandler",
"resultHandler",
",",
"int",
"pageSize",
")",
"throws",
"ConnectorException",
"{",
"checkIsSupported",
"(",
"workflow",
")",
";",... | Abstract method which must be implemented by the concrete database metadataEngine to execute a async and paged
workflow.
@param queryId the queryId.
@param workflow the workflow.
@param resultHandler the result handler.
@param pageSize
@throws ConnectorException if an error happens. | [
"Abstract",
"method",
"which",
"must",
"be",
"implemented",
"by",
"the",
"concrete",
"database",
"metadataEngine",
"to",
"execute",
"a",
"async",
"and",
"paged",
"workflow",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/engine/SingleProjectQueryEngine.java#L91-L98 |
153,860 | jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/util/ArrayCache.java | ArrayCache.set | public Object set(int index, Object element)
{
if ((index < m_iStartIndex) || (index >= m_iStartIndex + m_iMaxSize))
{ // Out of bounds, re-adjust bounds
int iNewStart = index - m_iMaxSize / 2; // index should be right in the middle
if (iNewStart < 0)
iNewSt... | java | public Object set(int index, Object element)
{
if ((index < m_iStartIndex) || (index >= m_iStartIndex + m_iMaxSize))
{ // Out of bounds, re-adjust bounds
int iNewStart = index - m_iMaxSize / 2; // index should be right in the middle
if (iNewStart < 0)
iNewSt... | [
"public",
"Object",
"set",
"(",
"int",
"index",
",",
"Object",
"element",
")",
"{",
"if",
"(",
"(",
"index",
"<",
"m_iStartIndex",
")",
"||",
"(",
"index",
">=",
"m_iStartIndex",
"+",
"m_iMaxSize",
")",
")",
"{",
"// Out of bounds, re-adjust bounds",
"int",
... | Set this element to this object.
If this index is not in the current array, shift the array and add it.
@see java.util.ArrayList
@param index The index to set the value.
@param element The object to add.
@return The selelement previously at this location. | [
"Set",
"this",
"element",
"to",
"this",
"object",
".",
"If",
"this",
"index",
"is",
"not",
"in",
"the",
"current",
"array",
"shift",
"the",
"array",
"and",
"add",
"it",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/util/ArrayCache.java#L55-L89 |
153,861 | tvesalainen/util | util/src/main/java/org/vesalainen/util/AbstractStateMachine.java | AbstractStateMachine.addState | public void addState(String name, Runnable enter)
{
addState(name, (S) new AdhocState(name, enter, null, null));
} | java | public void addState(String name, Runnable enter)
{
addState(name, (S) new AdhocState(name, enter, null, null));
} | [
"public",
"void",
"addState",
"(",
"String",
"name",
",",
"Runnable",
"enter",
")",
"{",
"addState",
"(",
"name",
",",
"(",
"S",
")",
"new",
"AdhocState",
"(",
"name",
",",
"enter",
",",
"null",
",",
"null",
")",
")",
";",
"}"
] | Creates named state with functional interface.
@param name
@param enter Called when state is entered. | [
"Creates",
"named",
"state",
"with",
"functional",
"interface",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/AbstractStateMachine.java#L69-L72 |
153,862 | tvesalainen/util | util/src/main/java/org/vesalainen/util/AbstractStateMachine.java | AbstractStateMachine.addState | public void addState(String name, S state)
{
AbstractState old = states.put(name, new StateWrapper(name, state));
if (old != null)
{
throw new IllegalArgumentException("state "+name+" exists already");
}
} | java | public void addState(String name, S state)
{
AbstractState old = states.put(name, new StateWrapper(name, state));
if (old != null)
{
throw new IllegalArgumentException("state "+name+" exists already");
}
} | [
"public",
"void",
"addState",
"(",
"String",
"name",
",",
"S",
"state",
")",
"{",
"AbstractState",
"old",
"=",
"states",
".",
"put",
"(",
"name",
",",
"new",
"StateWrapper",
"(",
"name",
",",
"state",
")",
")",
";",
"if",
"(",
"old",
"!=",
"null",
... | Creates named state
@param name
@param state | [
"Creates",
"named",
"state"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/AbstractStateMachine.java#L99-L106 |
153,863 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/script/process/PurgeRecordsProcess.java | PurgeRecordsProcess.initSharedRecord | public void initSharedRecord(Record record)
{
FieldListener listener = null;
try {
BaseField field = record.getSharedRecordTypeKey();
field.addListener(listener = new InitOnceFieldHandler(null));
field.setData(new Integer(0), true, DBConstants.INIT_MOVE);
... | java | public void initSharedRecord(Record record)
{
FieldListener listener = null;
try {
BaseField field = record.getSharedRecordTypeKey();
field.addListener(listener = new InitOnceFieldHandler(null));
field.setData(new Integer(0), true, DBConstants.INIT_MOVE);
... | [
"public",
"void",
"initSharedRecord",
"(",
"Record",
"record",
")",
"{",
"FieldListener",
"listener",
"=",
"null",
";",
"try",
"{",
"BaseField",
"field",
"=",
"record",
".",
"getSharedRecordTypeKey",
"(",
")",
";",
"field",
".",
"addListener",
"(",
"listener",... | InitSharedRecord Method. | [
"InitSharedRecord",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/process/PurgeRecordsProcess.java#L79-L111 |
153,864 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.validateContentSpec | public boolean validateContentSpec(final ContentSpec contentSpec, final String username) {
boolean valid = preValidateContentSpec(contentSpec);
if (!postValidateContentSpec(contentSpec, username)) {
valid = false;
}
return valid;
} | java | public boolean validateContentSpec(final ContentSpec contentSpec, final String username) {
boolean valid = preValidateContentSpec(contentSpec);
if (!postValidateContentSpec(contentSpec, username)) {
valid = false;
}
return valid;
} | [
"public",
"boolean",
"validateContentSpec",
"(",
"final",
"ContentSpec",
"contentSpec",
",",
"final",
"String",
"username",
")",
"{",
"boolean",
"valid",
"=",
"preValidateContentSpec",
"(",
"contentSpec",
")",
";",
"if",
"(",
"!",
"postValidateContentSpec",
"(",
"... | Validates that a Content Specification is valid by checking the META data,
child levels and topics. This method is a
wrapper to first call PreValidate and then PostValidate.
@param contentSpec The content specification to be validated.
@param username The user who requested the content spec validation.
@return True... | [
"Validates",
"that",
"a",
"Content",
"Specification",
"is",
"valid",
"by",
"checking",
"the",
"META",
"data",
"child",
"levels",
"and",
"topics",
".",
"This",
"method",
"is",
"a",
"wrapper",
"to",
"first",
"call",
"PreValidate",
"and",
"then",
"PostValidate",
... | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L179-L187 |
153,865 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.preValidateXML | private boolean preValidateXML(final KeyValueNode<String> keyValueNode, final String wrappedValue, final String format) {
Document doc = null;
String errorMsg = null;
try {
String fixedXML = DocBookUtilities.escapeForXML(wrappedValue);
if (CommonConstants.DOCBOOK_50_TITL... | java | private boolean preValidateXML(final KeyValueNode<String> keyValueNode, final String wrappedValue, final String format) {
Document doc = null;
String errorMsg = null;
try {
String fixedXML = DocBookUtilities.escapeForXML(wrappedValue);
if (CommonConstants.DOCBOOK_50_TITL... | [
"private",
"boolean",
"preValidateXML",
"(",
"final",
"KeyValueNode",
"<",
"String",
">",
"keyValueNode",
",",
"final",
"String",
"wrappedValue",
",",
"final",
"String",
"format",
")",
"{",
"Document",
"doc",
"=",
"null",
";",
"String",
"errorMsg",
"=",
"null"... | Performs the pre validation on keyvalue nodes that may be used as XML to ensure it is at least valid XML.
@param keyValueNode The key value node being validated.
@param wrappedValue The wrapped value, as it would appear in a build.
@param format
@return True if the content is valid otherwise false. | [
"Performs",
"the",
"pre",
"validation",
"on",
"keyvalue",
"nodes",
"that",
"may",
"be",
"used",
"as",
"XML",
"to",
"ensure",
"it",
"is",
"at",
"least",
"valid",
"XML",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L430-L457 |
153,866 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.doesPublicanCfgsContainValue | private boolean doesPublicanCfgsContainValue(final ContentSpec contentSpec, final String value) {
final Pattern pattern = Pattern.compile("^(.*\\n)?( |\\t)*" + value + ":.*", java.util.regex.Pattern.DOTALL);
if (!isNullOrEmpty(contentSpec.getPublicanCfg()) && pattern.matcher(contentSpec.getPublicanCfg()... | java | private boolean doesPublicanCfgsContainValue(final ContentSpec contentSpec, final String value) {
final Pattern pattern = Pattern.compile("^(.*\\n)?( |\\t)*" + value + ":.*", java.util.regex.Pattern.DOTALL);
if (!isNullOrEmpty(contentSpec.getPublicanCfg()) && pattern.matcher(contentSpec.getPublicanCfg()... | [
"private",
"boolean",
"doesPublicanCfgsContainValue",
"(",
"final",
"ContentSpec",
"contentSpec",
",",
"final",
"String",
"value",
")",
"{",
"final",
"Pattern",
"pattern",
"=",
"Pattern",
".",
"compile",
"(",
"\"^(.*\\\\n)?( |\\\\t)*\"",
"+",
"value",
"+",
"\":.*\""... | Check if the default or additional publican cfg files have a specified value
@param contentSpec The content spec to check from.
@param value The value to check for. eg: mainfile
@return True if the value exists in any publican.cfg | [
"Check",
"if",
"the",
"default",
"or",
"additional",
"publican",
"cfg",
"files",
"have",
"a",
"specified",
"value"
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L466-L479 |
153,867 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.checkForConflictingCondition | protected void checkForConflictingCondition(final IOptionsNode node, final ContentSpec contentSpec) {
if (!isNullOrEmpty(node.getConditionStatement())) {
final String publicanCfg;
if (!contentSpec.getDefaultPublicanCfg().equals(CommonConstants.CS_PUBLICAN_CFG_TITLE)) {
fi... | java | protected void checkForConflictingCondition(final IOptionsNode node, final ContentSpec contentSpec) {
if (!isNullOrEmpty(node.getConditionStatement())) {
final String publicanCfg;
if (!contentSpec.getDefaultPublicanCfg().equals(CommonConstants.CS_PUBLICAN_CFG_TITLE)) {
fi... | [
"protected",
"void",
"checkForConflictingCondition",
"(",
"final",
"IOptionsNode",
"node",
",",
"final",
"ContentSpec",
"contentSpec",
")",
"{",
"if",
"(",
"!",
"isNullOrEmpty",
"(",
"node",
".",
"getConditionStatement",
"(",
")",
")",
")",
"{",
"final",
"String... | Check if the condition on a node will conflict with a condition in the defined publican.cfg file.
@param node The node to be checked.
@param contentSpec The content spec the node belongs to. | [
"Check",
"if",
"the",
"condition",
"on",
"a",
"node",
"will",
"conflict",
"with",
"a",
"condition",
"in",
"the",
"defined",
"publican",
".",
"cfg",
"file",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L487-L506 |
153,868 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.validateEntities | protected boolean validateEntities(final ContentSpec contentSpec) {
final String entities = contentSpec.getEntities();
if (isNullOrEmpty(entities)) return true;
boolean valid = true;
// Make sure the input is valid XML.
final String wrappedEntities = "<!DOCTYPE section [" + ent... | java | protected boolean validateEntities(final ContentSpec contentSpec) {
final String entities = contentSpec.getEntities();
if (isNullOrEmpty(entities)) return true;
boolean valid = true;
// Make sure the input is valid XML.
final String wrappedEntities = "<!DOCTYPE section [" + ent... | [
"protected",
"boolean",
"validateEntities",
"(",
"final",
"ContentSpec",
"contentSpec",
")",
"{",
"final",
"String",
"entities",
"=",
"contentSpec",
".",
"getEntities",
"(",
")",
";",
"if",
"(",
"isNullOrEmpty",
"(",
"entities",
")",
")",
"return",
"true",
";"... | Validates the custom entities to ensure that only the defaults are overridden and that the content is valid XML.
@param contentSpec The content spec that contains the custom entities to be validated.
@return True if the custom entities are valid and don't contain additional custom values, otherwise false. | [
"Validates",
"the",
"custom",
"entities",
"to",
"ensure",
"that",
"only",
"the",
"defaults",
"are",
"overridden",
"and",
"that",
"the",
"content",
"is",
"valid",
"XML",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L514-L566 |
153,869 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.postValidateXML | protected boolean postValidateXML(final ContentSpec contentSpec, final KeyValueNode<String> keyValueNode,
final String wrappedElement, String parentElement) {
String fixedWrappedElement = DocBookUtilities.escapeForXML(wrappedElement);
// Get the docbook DTD
final String docbookFileN... | java | protected boolean postValidateXML(final ContentSpec contentSpec, final KeyValueNode<String> keyValueNode,
final String wrappedElement, String parentElement) {
String fixedWrappedElement = DocBookUtilities.escapeForXML(wrappedElement);
// Get the docbook DTD
final String docbookFileN... | [
"protected",
"boolean",
"postValidateXML",
"(",
"final",
"ContentSpec",
"contentSpec",
",",
"final",
"KeyValueNode",
"<",
"String",
">",
"keyValueNode",
",",
"final",
"String",
"wrappedElement",
",",
"String",
"parentElement",
")",
"{",
"String",
"fixedWrappedElement"... | Checks that the XML for a keyvalue node is valid DocBook XML.
@param contentSpec
@param keyValueNode
@param wrappedElement
@param parentElement
@return | [
"Checks",
"that",
"the",
"XML",
"for",
"a",
"keyvalue",
"node",
"is",
"valid",
"DocBook",
"XML",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L831-L876 |
153,870 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.validateFiles | protected boolean validateFiles(final ContentSpec contentSpec) {
final FileList fileList = contentSpec.getFileList();
boolean valid = true;
if (fileList != null && !fileList.getValue().isEmpty()) {
for (final File file : fileList.getValue()) {
FileWrapper fileWrapper... | java | protected boolean validateFiles(final ContentSpec contentSpec) {
final FileList fileList = contentSpec.getFileList();
boolean valid = true;
if (fileList != null && !fileList.getValue().isEmpty()) {
for (final File file : fileList.getValue()) {
FileWrapper fileWrapper... | [
"protected",
"boolean",
"validateFiles",
"(",
"final",
"ContentSpec",
"contentSpec",
")",
"{",
"final",
"FileList",
"fileList",
"=",
"contentSpec",
".",
"getFileList",
"(",
")",
";",
"boolean",
"valid",
"=",
"true",
";",
"if",
"(",
"fileList",
"!=",
"null",
... | Checks to make sure that the files specified in a content spec are valid and exist.
@param contentSpec The content spec to check.
@return True if all the files are valid, otherwise false. | [
"Checks",
"to",
"make",
"sure",
"that",
"the",
"files",
"specified",
"in",
"a",
"content",
"spec",
"are",
"valid",
"and",
"exist",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L884-L921 |
153,871 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.preValidateRelationships | public boolean preValidateRelationships(final ContentSpec contentSpec) {
boolean error = false;
// Create the map of unique ids to spec topics
final Map<String, List<ITopicNode>> specTopicMap = ContentSpecUtilities.getIdTopicNodeMap(contentSpec);
final Map<SpecNodeWithRelationships, Li... | java | public boolean preValidateRelationships(final ContentSpec contentSpec) {
boolean error = false;
// Create the map of unique ids to spec topics
final Map<String, List<ITopicNode>> specTopicMap = ContentSpecUtilities.getIdTopicNodeMap(contentSpec);
final Map<SpecNodeWithRelationships, Li... | [
"public",
"boolean",
"preValidateRelationships",
"(",
"final",
"ContentSpec",
"contentSpec",
")",
"{",
"boolean",
"error",
"=",
"false",
";",
"// Create the map of unique ids to spec topics",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"ITopicNode",
">",
">",
"... | Validate a set of relationships created when parsing.
@param contentSpec The content spec to be validated.
@return True if the relationships are valid, otherwise false. | [
"Validate",
"a",
"set",
"of",
"relationships",
"created",
"when",
"parsing",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L929-L976 |
153,872 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.validateFixedUrl | protected boolean validateFixedUrl(final SpecNode specNode, final Set<String> processedFixedUrls) {
boolean valid = true;
if (!ProcessorConstants.VALID_FIXED_URL_PATTERN.matcher(specNode.getFixedUrl()).matches()) {
log.error(format(ProcessorConstants.ERROR_FIXED_URL_NOT_VALID, specNode.getL... | java | protected boolean validateFixedUrl(final SpecNode specNode, final Set<String> processedFixedUrls) {
boolean valid = true;
if (!ProcessorConstants.VALID_FIXED_URL_PATTERN.matcher(specNode.getFixedUrl()).matches()) {
log.error(format(ProcessorConstants.ERROR_FIXED_URL_NOT_VALID, specNode.getL... | [
"protected",
"boolean",
"validateFixedUrl",
"(",
"final",
"SpecNode",
"specNode",
",",
"final",
"Set",
"<",
"String",
">",
"processedFixedUrls",
")",
"{",
"boolean",
"valid",
"=",
"true",
";",
"if",
"(",
"!",
"ProcessorConstants",
".",
"VALID_FIXED_URL_PATTERN",
... | Checks to make sure that a user defined fixed url is valid
@param specNode
@param processedFixedUrls
@return | [
"Checks",
"to",
"make",
"sure",
"that",
"a",
"user",
"defined",
"fixed",
"url",
"is",
"valid"
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L1585-L1598 |
153,873 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.preValidateCommonContent | protected boolean preValidateCommonContent(final CommonContent commonContent, final BookType bookType) {
boolean valid = true;
// Check if the app should be shutdown
if (isShuttingDown.get()) {
shutdown.set(true);
return false;
}
// Check that the title ... | java | protected boolean preValidateCommonContent(final CommonContent commonContent, final BookType bookType) {
boolean valid = true;
// Check if the app should be shutdown
if (isShuttingDown.get()) {
shutdown.set(true);
return false;
}
// Check that the title ... | [
"protected",
"boolean",
"preValidateCommonContent",
"(",
"final",
"CommonContent",
"commonContent",
",",
"final",
"BookType",
"bookType",
")",
"{",
"boolean",
"valid",
"=",
"true",
";",
"// Check if the app should be shutdown",
"if",
"(",
"isShuttingDown",
".",
"get",
... | Validates a Common Content node for formatting issues.
@param commonContent The common content to be validated.
@param bookType The type of book the common content is to be validated against.
@return True if the common content is valid otherwise false. | [
"Validates",
"a",
"Common",
"Content",
"node",
"for",
"formatting",
"issues",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L1725-L1779 |
153,874 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.validateExistingTopicTags | private boolean validateExistingTopicTags(final ITopicNode topicNode, final BaseTopicWrapper<?> topic) {
// Ignore validating revision topics
if (topicNode.getRevision() != null) {
return true;
}
boolean valid = true;
final List<String> tagNames = topicNode.getTags(t... | java | private boolean validateExistingTopicTags(final ITopicNode topicNode, final BaseTopicWrapper<?> topic) {
// Ignore validating revision topics
if (topicNode.getRevision() != null) {
return true;
}
boolean valid = true;
final List<String> tagNames = topicNode.getTags(t... | [
"private",
"boolean",
"validateExistingTopicTags",
"(",
"final",
"ITopicNode",
"topicNode",
",",
"final",
"BaseTopicWrapper",
"<",
"?",
">",
"topic",
")",
"{",
"// Ignore validating revision topics",
"if",
"(",
"topicNode",
".",
"getRevision",
"(",
")",
"!=",
"null"... | Checks that adding tags to existing topic won't cause problems
@param topicNode The topic the tags below to.
@return True if the tags are valid otherwise false. | [
"Checks",
"that",
"adding",
"tags",
"to",
"existing",
"topic",
"won",
"t",
"cause",
"problems"
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L2278-L2334 |
153,875 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.preValidateBugLinks | public boolean preValidateBugLinks(final ContentSpec contentSpec) {
// If Bug Links are turned off then there isn't any need to validate them.
if (!contentSpec.isInjectBugLinks()) {
return true;
}
final BugLinkOptions bugOptions;
final BugLinkType type;
if (c... | java | public boolean preValidateBugLinks(final ContentSpec contentSpec) {
// If Bug Links are turned off then there isn't any need to validate them.
if (!contentSpec.isInjectBugLinks()) {
return true;
}
final BugLinkOptions bugOptions;
final BugLinkType type;
if (c... | [
"public",
"boolean",
"preValidateBugLinks",
"(",
"final",
"ContentSpec",
"contentSpec",
")",
"{",
"// If Bug Links are turned off then there isn't any need to validate them.",
"if",
"(",
"!",
"contentSpec",
".",
"isInjectBugLinks",
"(",
")",
")",
"{",
"return",
"true",
";... | Validate the Bug Links MetaData for a Content Specification without doing any external calls.
@param contentSpec The Content Spec to validate.
@return True if the links values are valid, otherwise false. | [
"Validate",
"the",
"Bug",
"Links",
"MetaData",
"for",
"a",
"Content",
"Specification",
"without",
"doing",
"any",
"external",
"calls",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L2342-L2369 |
153,876 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java | ContentSpecValidator.postValidateBugLinks | public boolean postValidateBugLinks(final ContentSpec contentSpec, boolean strict) {
// If Bug Links are turned off then there isn't any need to validate them.
if (!contentSpec.isInjectBugLinks()) {
return true;
}
try {
final BugLinkOptions bugOptions;
... | java | public boolean postValidateBugLinks(final ContentSpec contentSpec, boolean strict) {
// If Bug Links are turned off then there isn't any need to validate them.
if (!contentSpec.isInjectBugLinks()) {
return true;
}
try {
final BugLinkOptions bugOptions;
... | [
"public",
"boolean",
"postValidateBugLinks",
"(",
"final",
"ContentSpec",
"contentSpec",
",",
"boolean",
"strict",
")",
"{",
"// If Bug Links are turned off then there isn't any need to validate them.",
"if",
"(",
"!",
"contentSpec",
".",
"isInjectBugLinks",
"(",
")",
")",
... | Validate the Bug Links MetaData for a Content Specification.
@param contentSpec The Content Spec to validate.
@param strict If strict validation should be performed (invalid matches throws an error instead of a warning)
@return True if the links are valid, otherwise false. | [
"Validate",
"the",
"Bug",
"Links",
"MetaData",
"for",
"a",
"Content",
"Specification",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L2378-L2445 |
153,877 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/BlockParser.java | BlockParser.removeEmptyBlocks | public static List<Block> removeEmptyBlocks(final Collection<Block> blocks) {
List<Block> cleanBlocks = Lists.newArrayListWithExpectedSize(blocks.size());
for(Block block : blocks) {
if(block.content.isEmpty()) {
continue;
}
if(isWhitespace(block.content)) {
... | java | public static List<Block> removeEmptyBlocks(final Collection<Block> blocks) {
List<Block> cleanBlocks = Lists.newArrayListWithExpectedSize(blocks.size());
for(Block block : blocks) {
if(block.content.isEmpty()) {
continue;
}
if(isWhitespace(block.content)) {
... | [
"public",
"static",
"List",
"<",
"Block",
">",
"removeEmptyBlocks",
"(",
"final",
"Collection",
"<",
"Block",
">",
"blocks",
")",
"{",
"List",
"<",
"Block",
">",
"cleanBlocks",
"=",
"Lists",
".",
"newArrayListWithExpectedSize",
"(",
"blocks",
".",
"size",
"(... | Removes empty blocks from a collection of blocks.
@param blocks The collection of blocks.
@return A list of blocks with empty blocks removed. | [
"Removes",
"empty",
"blocks",
"from",
"a",
"collection",
"of",
"blocks",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/BlockParser.java#L133-L147 |
153,878 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/BlockParser.java | BlockParser.block | private static Block block(final String comment, final int nameStart) {
int attrIndex = comment.indexOf('{');
if(attrIndex != -1) {
return new Block(comment.substring(nameStart, attrIndex).trim(),
comment.substring(attrIndex).trim());
} else {
return new Block(commen... | java | private static Block block(final String comment, final int nameStart) {
int attrIndex = comment.indexOf('{');
if(attrIndex != -1) {
return new Block(comment.substring(nameStart, attrIndex).trim(),
comment.substring(attrIndex).trim());
} else {
return new Block(commen... | [
"private",
"static",
"Block",
"block",
"(",
"final",
"String",
"comment",
",",
"final",
"int",
"nameStart",
")",
"{",
"int",
"attrIndex",
"=",
"comment",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"attrIndex",
"!=",
"-",
"1",
")",
"{",
"retu... | Creates an empty block from a comment string.
@param comment The comment string.
@param nameStart The start index for the name.
@return The block. | [
"Creates",
"an",
"empty",
"block",
"from",
"a",
"comment",
"string",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/BlockParser.java#L183-L191 |
153,879 | jeroenvanmaanen/bridge-pattern | src/main/java/org/leialearns/bridge/Static.java | Static.getFarObject | public static <FT extends FarObject<NT>, NT> FT getFarObject(NT nearObject, Class<FT> farType) {
return nearObject == null ? null : farType.cast(getFarObject(nearObject));
} | java | public static <FT extends FarObject<NT>, NT> FT getFarObject(NT nearObject, Class<FT> farType) {
return nearObject == null ? null : farType.cast(getFarObject(nearObject));
} | [
"public",
"static",
"<",
"FT",
"extends",
"FarObject",
"<",
"NT",
">",
",",
"NT",
">",
"FT",
"getFarObject",
"(",
"NT",
"nearObject",
",",
"Class",
"<",
"FT",
">",
"farType",
")",
"{",
"return",
"nearObject",
"==",
"null",
"?",
"null",
":",
"farType",
... | Returns the far object that corresponds to the given near object in a type safe way.
@param nearObject The near object
@param farType The class that represents the type of the far object
@param <FT> The type of the far object
@param <NT> The type of the near object
@return The far object that corresponds to the given n... | [
"Returns",
"the",
"far",
"object",
"that",
"corresponds",
"to",
"the",
"given",
"near",
"object",
"in",
"a",
"type",
"safe",
"way",
"."
] | 55bd2de8cff800a1a97e26e97d3600e6dfb00b59 | https://github.com/jeroenvanmaanen/bridge-pattern/blob/55bd2de8cff800a1a97e26e97d3600e6dfb00b59/src/main/java/org/leialearns/bridge/Static.java#L30-L32 |
153,880 | jeroenvanmaanen/bridge-pattern | src/main/java/org/leialearns/bridge/Static.java | Static.getFarObject | public static FarObject<?> getFarObject(Object nearObject) {
return nearObject == null ? null : getFacets(nearObject).getFarObject();
} | java | public static FarObject<?> getFarObject(Object nearObject) {
return nearObject == null ? null : getFacets(nearObject).getFarObject();
} | [
"public",
"static",
"FarObject",
"<",
"?",
">",
"getFarObject",
"(",
"Object",
"nearObject",
")",
"{",
"return",
"nearObject",
"==",
"null",
"?",
"null",
":",
"getFacets",
"(",
"nearObject",
")",
".",
"getFarObject",
"(",
")",
";",
"}"
] | Returns the far object that corresponds to the given near object.
@param nearObject The near object
@return The far object that corresponds to the given near object
@see BridgeFacets#getFarObject() | [
"Returns",
"the",
"far",
"object",
"that",
"corresponds",
"to",
"the",
"given",
"near",
"object",
"."
] | 55bd2de8cff800a1a97e26e97d3600e6dfb00b59 | https://github.com/jeroenvanmaanen/bridge-pattern/blob/55bd2de8cff800a1a97e26e97d3600e6dfb00b59/src/main/java/org/leialearns/bridge/Static.java#L40-L42 |
153,881 | opendatatrentino/smatch-webapi-client | src/main/java/it/unitn/disi/smatch/webapi/client/WebApiClient.java | WebApiClient.getInstance | public static WebApiClient getInstance(Locale locale) {
if (null == webApiClient) {
webApiClient = new WebApiClient(locale);
}
return webApiClient;
} | java | public static WebApiClient getInstance(Locale locale) {
if (null == webApiClient) {
webApiClient = new WebApiClient(locale);
}
return webApiClient;
} | [
"public",
"static",
"WebApiClient",
"getInstance",
"(",
"Locale",
"locale",
")",
"{",
"if",
"(",
"null",
"==",
"webApiClient",
")",
"{",
"webApiClient",
"=",
"new",
"WebApiClient",
"(",
"locale",
")",
";",
"}",
"return",
"webApiClient",
";",
"}"
] | Returns instance of web API client for given locale. This method use
default connection parameters from property configuration file.
@param locale language.
@return instance of web API client for given locale. | [
"Returns",
"instance",
"of",
"web",
"API",
"client",
"for",
"given",
"locale",
".",
"This",
"method",
"use",
"default",
"connection",
"parameters",
"from",
"property",
"configuration",
"file",
"."
] | d74fc41ab5bdc29afafd11c9001ac25dff20f965 | https://github.com/opendatatrentino/smatch-webapi-client/blob/d74fc41ab5bdc29afafd11c9001ac25dff20f965/src/main/java/it/unitn/disi/smatch/webapi/client/WebApiClient.java#L110-L115 |
153,882 | opendatatrentino/smatch-webapi-client | src/main/java/it/unitn/disi/smatch/webapi/client/WebApiClient.java | WebApiClient.getInstance | public static WebApiClient getInstance(Locale locale, String host, int port) {
if (null == webApiClient) {
webApiClient = new WebApiClient(locale, host, "" + port);
}
return webApiClient;
} | java | public static WebApiClient getInstance(Locale locale, String host, int port) {
if (null == webApiClient) {
webApiClient = new WebApiClient(locale, host, "" + port);
}
return webApiClient;
} | [
"public",
"static",
"WebApiClient",
"getInstance",
"(",
"Locale",
"locale",
",",
"String",
"host",
",",
"int",
"port",
")",
"{",
"if",
"(",
"null",
"==",
"webApiClient",
")",
"{",
"webApiClient",
"=",
"new",
"WebApiClient",
"(",
"locale",
",",
"host",
",",... | Returns instance of web API client for given locale and connection
properties.
@param locale language.
@param host Sweb web API server host.
@param port Sweb web API server port.
@return instance of web API client for given locale and connection
properties. | [
"Returns",
"instance",
"of",
"web",
"API",
"client",
"for",
"given",
"locale",
"and",
"connection",
"properties",
"."
] | d74fc41ab5bdc29afafd11c9001ac25dff20f965 | https://github.com/opendatatrentino/smatch-webapi-client/blob/d74fc41ab5bdc29afafd11c9001ac25dff20f965/src/main/java/it/unitn/disi/smatch/webapi/client/WebApiClient.java#L127-L132 |
153,883 | opendatatrentino/smatch-webapi-client | src/main/java/it/unitn/disi/smatch/webapi/client/WebApiClient.java | WebApiClient.match | @Override
public Correspondence match(String sourceName, List<String> sourceNodes,
String targetName, List<String> targetNodes) {
MatchMethods method = new MatchMethods(httpClient, locale, serverPath);
Correspondence correspondace = null;
try {
correspondace = metho... | java | @Override
public Correspondence match(String sourceName, List<String> sourceNodes,
String targetName, List<String> targetNodes) {
MatchMethods method = new MatchMethods(httpClient, locale, serverPath);
Correspondence correspondace = null;
try {
correspondace = metho... | [
"@",
"Override",
"public",
"Correspondence",
"match",
"(",
"String",
"sourceName",
",",
"List",
"<",
"String",
">",
"sourceNodes",
",",
"String",
"targetName",
",",
"List",
"<",
"String",
">",
"targetNodes",
")",
"{",
"MatchMethods",
"method",
"=",
"new",
"M... | Returns the correspondence between the source and the target contexts
@param sourceName - The name of the root node in the source tree
@param sourceNodes - Names of the source nodes under the source root node
@param targetName - The name of the root node in the target tree
@param targetNodes -Names of the target nodes... | [
"Returns",
"the",
"correspondence",
"between",
"the",
"source",
"and",
"the",
"target",
"contexts"
] | d74fc41ab5bdc29afafd11c9001ac25dff20f965 | https://github.com/opendatatrentino/smatch-webapi-client/blob/d74fc41ab5bdc29afafd11c9001ac25dff20f965/src/main/java/it/unitn/disi/smatch/webapi/client/WebApiClient.java#L173-L187 |
153,884 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/ShortcodeParser.java | ShortcodeParser.parseAttributes | private static Map<String, String> parseAttributes(String attrString) throws ParseException {
AttributeString str = new AttributeString(attrString);
Map<String, String> attributes = Maps.newLinkedHashMapWithExpectedSize(4); //Preserve order...
AttrState state = AttrState.NAME;
String currName =... | java | private static Map<String, String> parseAttributes(String attrString) throws ParseException {
AttributeString str = new AttributeString(attrString);
Map<String, String> attributes = Maps.newLinkedHashMapWithExpectedSize(4); //Preserve order...
AttrState state = AttrState.NAME;
String currName =... | [
"private",
"static",
"Map",
"<",
"String",
",",
"String",
">",
"parseAttributes",
"(",
"String",
"attrString",
")",
"throws",
"ParseException",
"{",
"AttributeString",
"str",
"=",
"new",
"AttributeString",
"(",
"attrString",
")",
";",
"Map",
"<",
"String",
","... | Parse attributes in a shortcode.
@param attrString The attribute string.
@return The map of attributes. Keys are <em>lower-case</em>.
@throws ParseException on invalid shortcode. | [
"Parse",
"attributes",
"in",
"a",
"shortcode",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/ShortcodeParser.java#L258-L283 |
153,885 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/ShortcodeParser.java | ShortcodeParser.scanForName | private static String scanForName(int pos, final char[] chars) {
StringBuilder buf = new StringBuilder();
while(pos < chars.length) {
char ch = chars[pos++];
switch(ch) {
case ' ':
case ']':
return buf.toString();
case '[':
cas... | java | private static String scanForName(int pos, final char[] chars) {
StringBuilder buf = new StringBuilder();
while(pos < chars.length) {
char ch = chars[pos++];
switch(ch) {
case ' ':
case ']':
return buf.toString();
case '[':
cas... | [
"private",
"static",
"String",
"scanForName",
"(",
"int",
"pos",
",",
"final",
"char",
"[",
"]",
"chars",
")",
"{",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"while",
"(",
"pos",
"<",
"chars",
".",
"length",
")",
"{",
"char",
... | Scans for a valid shortcode name.
@param pos The starting position.
@param chars The character array to scan.
@return The shortcode name or an empty string if none found or invalid character is encountered. | [
"Scans",
"for",
"a",
"valid",
"shortcode",
"name",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/ShortcodeParser.java#L318-L341 |
153,886 | jbundle/jbundle | thin/base/util/util/src/main/java/org/jbundle/thin/base/util/ThinUtil.java | ThinUtil.fixDisplayURL | public static String fixDisplayURL(String strURL, boolean bHelp, boolean bNoNav, boolean bLanguage, PropertyOwner propertyOwner)
{
if ((strURL == null) || (strURL.length() == 0))
return strURL;
Map<String,Object> properties = UrlUtil.parseArgs(null, strURL);
if (bHelp)
properties... | java | public static String fixDisplayURL(String strURL, boolean bHelp, boolean bNoNav, boolean bLanguage, PropertyOwner propertyOwner)
{
if ((strURL == null) || (strURL.length() == 0))
return strURL;
Map<String,Object> properties = UrlUtil.parseArgs(null, strURL);
if (bHelp)
properties... | [
"public",
"static",
"String",
"fixDisplayURL",
"(",
"String",
"strURL",
",",
"boolean",
"bHelp",
",",
"boolean",
"bNoNav",
",",
"boolean",
"bLanguage",
",",
"PropertyOwner",
"propertyOwner",
")",
"{",
"if",
"(",
"(",
"strURL",
"==",
"null",
")",
"||",
"(",
... | Get this URL minus the nav bars
@param strURL
@param bHelp Add help param
@param bNoNav Add no nav bars params
@param bLanguage Add language param
@return | [
"Get",
"this",
"URL",
"minus",
"the",
"nav",
"bars"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/util/util/src/main/java/org/jbundle/thin/base/util/ThinUtil.java#L30-L56 |
153,887 | carewebframework/carewebframework-vista | org.carewebframework.vista.api-parent/org.carewebframework.vista.api.esig/src/main/java/org/carewebframework/vista/esig/ESigFilter.java | ESigFilter.matches | public boolean matches(ESigItem item) {
if (selected != null && item.isSelected() != selected) {
return false;
}
if (eSigType != null && !item.getESigType().equals(eSigType)) {
return false;
}
if (session != null && !item.getSession().equ... | java | public boolean matches(ESigItem item) {
if (selected != null && item.isSelected() != selected) {
return false;
}
if (eSigType != null && !item.getESigType().equals(eSigType)) {
return false;
}
if (session != null && !item.getSession().equ... | [
"public",
"boolean",
"matches",
"(",
"ESigItem",
"item",
")",
"{",
"if",
"(",
"selected",
"!=",
"null",
"&&",
"item",
".",
"isSelected",
"(",
")",
"!=",
"selected",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"eSigType",
"!=",
"null",
"&&",
"!"... | Returns true if the item matches the selection filter.
@param item The esignature item.
@return True if the item matches the selection filter. | [
"Returns",
"true",
"if",
"the",
"item",
"matches",
"the",
"selection",
"filter",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.esig/src/main/java/org/carewebframework/vista/esig/ESigFilter.java#L64-L82 |
153,888 | jbundle/jbundle | base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XPopupBox.java | XPopupBox.scanTableItems | public void scanTableItems()
{
m_vDisplays = new Vector<String>();
m_vValues = new Vector<String>();
String strField = null;
Convert converter = this.getScreenField().getConverter();
Object data = converter.getData();
BaseField field = (BaseField)converter.getField()... | java | public void scanTableItems()
{
m_vDisplays = new Vector<String>();
m_vValues = new Vector<String>();
String strField = null;
Convert converter = this.getScreenField().getConverter();
Object data = converter.getData();
BaseField field = (BaseField)converter.getField()... | [
"public",
"void",
"scanTableItems",
"(",
")",
"{",
"m_vDisplays",
"=",
"new",
"Vector",
"<",
"String",
">",
"(",
")",
";",
"m_vValues",
"=",
"new",
"Vector",
"<",
"String",
">",
"(",
")",
";",
"String",
"strField",
"=",
"null",
";",
"Convert",
"convert... | Scan through the items and cache the values and display strings. | [
"Scan",
"through",
"the",
"items",
"and",
"cache",
"the",
"values",
"and",
"display",
"strings",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XPopupBox.java#L75-L116 |
153,889 | jbundle/jbundle | base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XPopupBox.java | XPopupBox.getSFieldProperty | public String getSFieldProperty(String strFieldName)
{
String strValue = super.getSFieldProperty(strFieldName);
// Hack - For some weird reason DOJO returns the display value instead of the 'option' value. Need to look up the field value.
Convert converter = this.getScreenField().getConverte... | java | public String getSFieldProperty(String strFieldName)
{
String strValue = super.getSFieldProperty(strFieldName);
// Hack - For some weird reason DOJO returns the display value instead of the 'option' value. Need to look up the field value.
Convert converter = this.getScreenField().getConverte... | [
"public",
"String",
"getSFieldProperty",
"(",
"String",
"strFieldName",
")",
"{",
"String",
"strValue",
"=",
"super",
".",
"getSFieldProperty",
"(",
"strFieldName",
")",
";",
"// Hack - For some weird reason DOJO returns the display value instead of the 'option' value. Need to lo... | Get this control's value as it was submitted by the HTML post operation.
@return The value the field was set to. | [
"Get",
"this",
"control",
"s",
"value",
"as",
"it",
"was",
"submitted",
"by",
"the",
"HTML",
"post",
"operation",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XPopupBox.java#L212-L238 |
153,890 | yestech/yesepisodic | src/main/java/org/yestech/episodic/util/EpisodicUtil.java | EpisodicUtil.unmarshall | public static Object unmarshall(HttpResponse response) throws JAXBException, IOException {
String xml = EntityUtils.toString(response.getEntity());
Unmarshaller unmarshaller = ctx.createUnmarshaller();
return unmarshaller.unmarshal(new StringReader(xml));
} | java | public static Object unmarshall(HttpResponse response) throws JAXBException, IOException {
String xml = EntityUtils.toString(response.getEntity());
Unmarshaller unmarshaller = ctx.createUnmarshaller();
return unmarshaller.unmarshal(new StringReader(xml));
} | [
"public",
"static",
"Object",
"unmarshall",
"(",
"HttpResponse",
"response",
")",
"throws",
"JAXBException",
",",
"IOException",
"{",
"String",
"xml",
"=",
"EntityUtils",
".",
"toString",
"(",
"response",
".",
"getEntity",
"(",
")",
")",
";",
"Unmarshaller",
"... | Unmarshalls the input stream into an object from org.yestech.episodic.objectmodel.
@param response the response
@return The unmarshalled object.
@throws javax.xml.bind.JAXBException Thrown if there are issues with the xml stream passed in. | [
"Unmarshalls",
"the",
"input",
"stream",
"into",
"an",
"object",
"from",
"org",
".",
"yestech",
".",
"episodic",
".",
"objectmodel",
"."
] | ed9699443871a44d51e149f32769b4d84cded63d | https://github.com/yestech/yesepisodic/blob/ed9699443871a44d51e149f32769b4d84cded63d/src/main/java/org/yestech/episodic/util/EpisodicUtil.java#L56-L60 |
153,891 | yestech/yesepisodic | src/main/java/org/yestech/episodic/util/EpisodicUtil.java | EpisodicUtil.join | public static String join(String[] strings) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < strings.length; i++) {
builder.append(strings[i]);
if (i + 1 < strings.length) builder.append(",");
}
return builder.toString();
} | java | public static String join(String[] strings) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < strings.length; i++) {
builder.append(strings[i]);
if (i + 1 < strings.length) builder.append(",");
}
return builder.toString();
} | [
"public",
"static",
"String",
"join",
"(",
"String",
"[",
"]",
"strings",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"strings",
".",
"length",
";",
"i",
"++",
"... | A simple method for joining an array of strings to a comma seperated string.
@param strings An array of strings.
@return The array as single string joined by commas | [
"A",
"simple",
"method",
"for",
"joining",
"an",
"array",
"of",
"strings",
"to",
"a",
"comma",
"seperated",
"string",
"."
] | ed9699443871a44d51e149f32769b4d84cded63d | https://github.com/yestech/yesepisodic/blob/ed9699443871a44d51e149f32769b4d84cded63d/src/main/java/org/yestech/episodic/util/EpisodicUtil.java#L68-L75 |
153,892 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/event/RemoveFromQueryRecordOnCloseHandler.java | RemoveFromQueryRecordOnCloseHandler.removeIt | public void removeIt()
{
if (m_queryRecord != null)
if (this.getOwner() != null)
m_queryRecord.removeRecord(this.getOwner());
m_queryRecord = null;
} | java | public void removeIt()
{
if (m_queryRecord != null)
if (this.getOwner() != null)
m_queryRecord.removeRecord(this.getOwner());
m_queryRecord = null;
} | [
"public",
"void",
"removeIt",
"(",
")",
"{",
"if",
"(",
"m_queryRecord",
"!=",
"null",
")",
"if",
"(",
"this",
".",
"getOwner",
"(",
")",
"!=",
"null",
")",
"m_queryRecord",
".",
"removeRecord",
"(",
"this",
".",
"getOwner",
"(",
")",
")",
";",
"m_qu... | Remove this record from the query record. | [
"Remove",
"this",
"record",
"from",
"the",
"query",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/RemoveFromQueryRecordOnCloseHandler.java#L79-L85 |
153,893 | lshift/jamume | src/main/java/net/lshift/java/dispatch/ImplementsOnlyDirectSuperclasses.java | ImplementsOnlyDirectSuperclasses.directSuperclasses | public List<Class<?>> directSuperclasses(Class<?> c)
{
if(c.isPrimitive()) {
return primitiveSuperclasses(c);
}
else if(c.isArray()) {
return arrayDirectSuperclasses(0, c);
}
else {
Class<?> [] interfaces = c.getInterfaces();
Cl... | java | public List<Class<?>> directSuperclasses(Class<?> c)
{
if(c.isPrimitive()) {
return primitiveSuperclasses(c);
}
else if(c.isArray()) {
return arrayDirectSuperclasses(0, c);
}
else {
Class<?> [] interfaces = c.getInterfaces();
Cl... | [
"public",
"List",
"<",
"Class",
"<",
"?",
">",
">",
"directSuperclasses",
"(",
"Class",
"<",
"?",
">",
"c",
")",
"{",
"if",
"(",
"c",
".",
"isPrimitive",
"(",
")",
")",
"{",
"return",
"primitiveSuperclasses",
"(",
"c",
")",
";",
"}",
"else",
"if",
... | Get the direct superclasses of a class.
Interfaces, followed by the superclasses. Interfaces with
no super interfaces extend Object. | [
"Get",
"the",
"direct",
"superclasses",
"of",
"a",
"class",
".",
"Interfaces",
"followed",
"by",
"the",
"superclasses",
".",
"Interfaces",
"with",
"no",
"super",
"interfaces",
"extend",
"Object",
"."
] | 754d9ab29311601328a2f39928775e4e010305b7 | https://github.com/lshift/jamume/blob/754d9ab29311601328a2f39928775e4e010305b7/src/main/java/net/lshift/java/dispatch/ImplementsOnlyDirectSuperclasses.java#L23-L48 |
153,894 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CmdArgs.java | CmdArgs.getValue | @Override
public Object getValue(String name)
{
if (arguments == null)
{
throw new IllegalStateException("setArgs not called");
}
Object ob = options.get(name);
if (ob != null)
{
return ob;
}
return arguments.get... | java | @Override
public Object getValue(String name)
{
if (arguments == null)
{
throw new IllegalStateException("setArgs not called");
}
Object ob = options.get(name);
if (ob != null)
{
return ob;
}
return arguments.get... | [
"@",
"Override",
"public",
"Object",
"getValue",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"arguments",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"setArgs not called\"",
")",
";",
"}",
"Object",
"ob",
"=",
"options",
".",
"g... | Returns named option or argument value
@param name
@return | [
"Returns",
"named",
"option",
"or",
"argument",
"value"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CmdArgs.java#L77-L90 |
153,895 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CmdArgs.java | CmdArgs.command | public void command(String... args)
{
try
{
setArgs(args);
}
catch (CmdArgsException ex)
{
ex.printStackTrace();
Logger logger = Logger.getLogger(CmdArgs.class.getName());
logger.log(Level.SEVERE, Arrays.toString(args)... | java | public void command(String... args)
{
try
{
setArgs(args);
}
catch (CmdArgsException ex)
{
ex.printStackTrace();
Logger logger = Logger.getLogger(CmdArgs.class.getName());
logger.log(Level.SEVERE, Arrays.toString(args)... | [
"public",
"void",
"command",
"(",
"String",
"...",
"args",
")",
"{",
"try",
"{",
"setArgs",
"(",
"args",
")",
";",
"}",
"catch",
"(",
"CmdArgsException",
"ex",
")",
"{",
"ex",
".",
"printStackTrace",
"(",
")",
";",
"Logger",
"logger",
"=",
"Logger",
... | Initializes options and arguments. Reports error and exits on error.
Called usually from main method.
@param args | [
"Initializes",
"options",
"and",
"arguments",
".",
"Reports",
"error",
"and",
"exits",
"on",
"error",
".",
"Called",
"usually",
"from",
"main",
"method",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CmdArgs.java#L96-L111 |
153,896 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CmdArgs.java | CmdArgs.getArgument | public final <T> T getArgument(String name)
{
if (arguments == null)
{
throw new IllegalStateException("setArgs not called");
}
return (T) arguments.get(name);
} | java | public final <T> T getArgument(String name)
{
if (arguments == null)
{
throw new IllegalStateException("setArgs not called");
}
return (T) arguments.get(name);
} | [
"public",
"final",
"<",
"T",
">",
"T",
"getArgument",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"arguments",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"setArgs not called\"",
")",
";",
"}",
"return",
"(",
"T",
")",
"argume... | Returns named argument value
@param <T>
@param name
@return | [
"Returns",
"named",
"argument",
"value"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CmdArgs.java#L243-L250 |
153,897 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CmdArgs.java | CmdArgs.getOption | public final <T> T getOption(String name)
{
if (arguments == null)
{
throw new IllegalStateException("setArgs not called");
}
Object value = options.get(name);
if (value == null)
{
Option opt = map.get(name);
if (opt == nu... | java | public final <T> T getOption(String name)
{
if (arguments == null)
{
throw new IllegalStateException("setArgs not called");
}
Object value = options.get(name);
if (value == null)
{
Option opt = map.get(name);
if (opt == nu... | [
"public",
"final",
"<",
"T",
">",
"T",
"getOption",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"arguments",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"setArgs not called\"",
")",
";",
"}",
"Object",
"value",
"=",
"options",
... | Return named option value.
@param <T>
@param name
@return | [
"Return",
"named",
"option",
"value",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CmdArgs.java#L257-L282 |
153,898 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CmdArgs.java | CmdArgs.addArgument | public final <T> void addArgument(Class<T> cls, String name)
{
if (map.containsKey(name))
{
throw new IllegalArgumentException(name+" is already added as option");
}
if (hasArrayArgument)
{
throw new IllegalArgumentException("no argument allowe... | java | public final <T> void addArgument(Class<T> cls, String name)
{
if (map.containsKey(name))
{
throw new IllegalArgumentException(name+" is already added as option");
}
if (hasArrayArgument)
{
throw new IllegalArgumentException("no argument allowe... | [
"public",
"final",
"<",
"T",
">",
"void",
"addArgument",
"(",
"Class",
"<",
"T",
">",
"cls",
",",
"String",
"name",
")",
"{",
"if",
"(",
"map",
".",
"containsKey",
"(",
"name",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"name",
"... | Add typed argument
@param <T>
@param cls
@param name | [
"Add",
"typed",
"argument"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CmdArgs.java#L297-L313 |
153,899 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CmdArgs.java | CmdArgs.addOption | public final <T> void addOption(String name, String description)
{
addOption(String.class, name, description, null);
} | java | public final <T> void addOption(String name, String description)
{
addOption(String.class, name, description, null);
} | [
"public",
"final",
"<",
"T",
">",
"void",
"addOption",
"(",
"String",
"name",
",",
"String",
"description",
")",
"{",
"addOption",
"(",
"String",
".",
"class",
",",
"name",
",",
"description",
",",
"null",
")",
";",
"}"
] | Add a mandatory string option
@param <T> Type of option
@param name Option name Option name without
@param description Option description | [
"Add",
"a",
"mandatory",
"string",
"option"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CmdArgs.java#L320-L323 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.