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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
7,500 | pebble/pebble-android-sdk | PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java | PebbleDictionary.getUnsignedIntegerAsLong | public Long getUnsignedIntegerAsLong (int key) {
PebbleTuple tuple = getTuple(key, PebbleTuple.TupleType.UINT);
if (tuple == null) {
return null;
}
return (Long) tuple.value;
} | java | public Long getUnsignedIntegerAsLong (int key) {
PebbleTuple tuple = getTuple(key, PebbleTuple.TupleType.UINT);
if (tuple == null) {
return null;
}
return (Long) tuple.value;
} | [
"public",
"Long",
"getUnsignedIntegerAsLong",
"(",
"int",
"key",
")",
"{",
"PebbleTuple",
"tuple",
"=",
"getTuple",
"(",
"key",
",",
"PebbleTuple",
".",
"TupleType",
".",
"UINT",
")",
";",
"if",
"(",
"tuple",
"==",
"null",
")",
"{",
"return",
"null",
";"... | Returns the unsigned integer as a long to which the specified key is mapped, or null if the key does not exist in this
dictionary. We are using the Long type here so that we can remove the guava dependency. This is done so that we dont
have incompatibility issues with the UnsignedInteger class from the Holo application... | [
"Returns",
"the",
"unsigned",
"integer",
"as",
"a",
"long",
"to",
"which",
"the",
"specified",
"key",
"is",
"mapped",
"or",
"null",
"if",
"the",
"key",
"does",
"not",
"exist",
"in",
"this",
"dictionary",
".",
"We",
"are",
"using",
"the",
"Long",
"type",
... | ddfc53ecf3950deebb62a1f205aa21fbe9bce45d | https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java#L221-L227 |
7,501 | pebble/pebble-android-sdk | PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java | PebbleDictionary.getBytes | public byte[] getBytes(int key) {
PebbleTuple tuple = getTuple(key, PebbleTuple.TupleType.BYTES);
if (tuple == null) {
return null;
}
return (byte[]) tuple.value;
} | java | public byte[] getBytes(int key) {
PebbleTuple tuple = getTuple(key, PebbleTuple.TupleType.BYTES);
if (tuple == null) {
return null;
}
return (byte[]) tuple.value;
} | [
"public",
"byte",
"[",
"]",
"getBytes",
"(",
"int",
"key",
")",
"{",
"PebbleTuple",
"tuple",
"=",
"getTuple",
"(",
"key",
",",
"PebbleTuple",
".",
"TupleType",
".",
"BYTES",
")",
";",
"if",
"(",
"tuple",
"==",
"null",
")",
"{",
"return",
"null",
";",... | Returns the byte array to which the specified key is mapped, or null if the key does not exist in this
dictionary.
@param key
key whose associated value is to be returned
@return value to which the specified key is mapped | [
"Returns",
"the",
"byte",
"array",
"to",
"which",
"the",
"specified",
"key",
"is",
"mapped",
"or",
"null",
"if",
"the",
"key",
"does",
"not",
"exist",
"in",
"this",
"dictionary",
"."
] | ddfc53ecf3950deebb62a1f205aa21fbe9bce45d | https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java#L238-L244 |
7,502 | pebble/pebble-android-sdk | PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java | PebbleDictionary.getString | public String getString(int key) {
PebbleTuple tuple = getTuple(key, PebbleTuple.TupleType.STRING);
if (tuple == null) {
return null;
}
return (String) tuple.value;
} | java | public String getString(int key) {
PebbleTuple tuple = getTuple(key, PebbleTuple.TupleType.STRING);
if (tuple == null) {
return null;
}
return (String) tuple.value;
} | [
"public",
"String",
"getString",
"(",
"int",
"key",
")",
"{",
"PebbleTuple",
"tuple",
"=",
"getTuple",
"(",
"key",
",",
"PebbleTuple",
".",
"TupleType",
".",
"STRING",
")",
";",
"if",
"(",
"tuple",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
... | Returns the string to which the specified key is mapped, or null if the key does not exist in this dictionary.
@param key
key whose associated value is to be returned
@return value to which the specified key is mapped | [
"Returns",
"the",
"string",
"to",
"which",
"the",
"specified",
"key",
"is",
"mapped",
"or",
"null",
"if",
"the",
"key",
"does",
"not",
"exist",
"in",
"this",
"dictionary",
"."
] | ddfc53ecf3950deebb62a1f205aa21fbe9bce45d | https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java#L254-L260 |
7,503 | pebble/pebble-android-sdk | PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java | PebbleDictionary.toJsonString | public String toJsonString() {
try {
JSONArray array = new JSONArray();
for (PebbleTuple t : tuples.values()) {
array.put(serializeTuple(t));
}
return array.toString();
} catch (JSONException je) {
je.printStackTrace();
... | java | public String toJsonString() {
try {
JSONArray array = new JSONArray();
for (PebbleTuple t : tuples.values()) {
array.put(serializeTuple(t));
}
return array.toString();
} catch (JSONException je) {
je.printStackTrace();
... | [
"public",
"String",
"toJsonString",
"(",
")",
"{",
"try",
"{",
"JSONArray",
"array",
"=",
"new",
"JSONArray",
"(",
")",
";",
"for",
"(",
"PebbleTuple",
"t",
":",
"tuples",
".",
"values",
"(",
")",
")",
"{",
"array",
".",
"put",
"(",
"serializeTuple",
... | Returns a JSON representation of this dictionary.
@return a JSON representation of this dictionary | [
"Returns",
"a",
"JSON",
"representation",
"of",
"this",
"dictionary",
"."
] | ddfc53ecf3950deebb62a1f205aa21fbe9bce45d | https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java#L288-L299 |
7,504 | pebble/pebble-android-sdk | PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java | PebbleDictionary.fromJson | public static PebbleDictionary fromJson(String jsonString) throws JSONException {
PebbleDictionary d = new PebbleDictionary();
JSONArray elements = new JSONArray(jsonString);
for (int idx = 0; idx < elements.length(); ++idx) {
JSONObject o = elements.getJSONObject(idx);
... | java | public static PebbleDictionary fromJson(String jsonString) throws JSONException {
PebbleDictionary d = new PebbleDictionary();
JSONArray elements = new JSONArray(jsonString);
for (int idx = 0; idx < elements.length(); ++idx) {
JSONObject o = elements.getJSONObject(idx);
... | [
"public",
"static",
"PebbleDictionary",
"fromJson",
"(",
"String",
"jsonString",
")",
"throws",
"JSONException",
"{",
"PebbleDictionary",
"d",
"=",
"new",
"PebbleDictionary",
"(",
")",
";",
"JSONArray",
"elements",
"=",
"new",
"JSONArray",
"(",
"jsonString",
")",
... | Deserializes a JSON representation of a PebbleDictionary.
@param jsonString
the JSON representation to be deserialized
@throws JSONException
thrown if the specified JSON representation cannot be parsed | [
"Deserializes",
"a",
"JSON",
"representation",
"of",
"a",
"PebbleDictionary",
"."
] | ddfc53ecf3950deebb62a1f205aa21fbe9bce45d | https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java#L310-L350 |
7,505 | Minecrell/TerminalConsoleAppender | src/main/java/net/minecrell/terminalconsole/SimpleTerminalConsole.java | SimpleTerminalConsole.processInput | protected void processInput(String input) {
String command = input.trim();
if (!command.isEmpty()) {
runCommand(command);
}
} | java | protected void processInput(String input) {
String command = input.trim();
if (!command.isEmpty()) {
runCommand(command);
}
} | [
"protected",
"void",
"processInput",
"(",
"String",
"input",
")",
"{",
"String",
"command",
"=",
"input",
".",
"trim",
"(",
")",
";",
"if",
"(",
"!",
"command",
".",
"isEmpty",
"(",
")",
")",
"{",
"runCommand",
"(",
"command",
")",
";",
"}",
"}"
] | Process an input line entered through the console.
<p>The default implementation trims leading and trailing whitespace
from the input and skips execution if the command is empty.</p>
@param input The input line | [
"Process",
"an",
"input",
"line",
"entered",
"through",
"the",
"console",
"."
] | a540454b397ee488993019fbcacc49b2d88f1752 | https://github.com/Minecrell/TerminalConsoleAppender/blob/a540454b397ee488993019fbcacc49b2d88f1752/src/main/java/net/minecrell/terminalconsole/SimpleTerminalConsole.java#L83-L88 |
7,506 | Minecrell/TerminalConsoleAppender | src/main/java/net/minecrell/terminalconsole/SimpleTerminalConsole.java | SimpleTerminalConsole.start | public void start() {
try {
final Terminal terminal = TerminalConsoleAppender.getTerminal();
if (terminal != null) {
readCommands(terminal);
} else {
readCommands(System.in);
}
} catch (IOException e) {
LogManage... | java | public void start() {
try {
final Terminal terminal = TerminalConsoleAppender.getTerminal();
if (terminal != null) {
readCommands(terminal);
} else {
readCommands(System.in);
}
} catch (IOException e) {
LogManage... | [
"public",
"void",
"start",
"(",
")",
"{",
"try",
"{",
"final",
"Terminal",
"terminal",
"=",
"TerminalConsoleAppender",
".",
"getTerminal",
"(",
")",
";",
"if",
"(",
"terminal",
"!=",
"null",
")",
"{",
"readCommands",
"(",
"terminal",
")",
";",
"}",
"else... | Start reading commands from the console.
<p>Note that this method won't return until one of the following
conditions are met:</p>
<ul>
<li>{@link #isRunning()} returns {@code false}, indicating that the
application is shutting down.</li>
<li>{@link #shutdown()} is triggered by the user (e.g. due to
pressing CTRL+C)</... | [
"Start",
"reading",
"commands",
"from",
"the",
"console",
"."
] | a540454b397ee488993019fbcacc49b2d88f1752 | https://github.com/Minecrell/TerminalConsoleAppender/blob/a540454b397ee488993019fbcacc49b2d88f1752/src/main/java/net/minecrell/terminalconsole/SimpleTerminalConsole.java#L136-L147 |
7,507 | pebble/pebble-android-sdk | PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/SportsState.java | SportsState.setPaceInSec | public void setPaceInSec(int paceInSec) {
this.speed = null;
this.paceInSec = Math.max(0, Math.min(paceInSec, 3599));
} | java | public void setPaceInSec(int paceInSec) {
this.speed = null;
this.paceInSec = Math.max(0, Math.min(paceInSec, 3599));
} | [
"public",
"void",
"setPaceInSec",
"(",
"int",
"paceInSec",
")",
"{",
"this",
".",
"speed",
"=",
"null",
";",
"this",
".",
"paceInSec",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"Math",
".",
"min",
"(",
"paceInSec",
",",
"3599",
")",
")",
";",
"}"
] | Set the current pace in seconds per kilometer or seconds per mile.
The possible range is currently limited from 0 to 3599,
inclusive (59min 59sec). Values larger or smaller than the limits will be
transformed into the maximum or minimum, respectively.
It will be presented as a duration string in the UI. Minutes and s... | [
"Set",
"the",
"current",
"pace",
"in",
"seconds",
"per",
"kilometer",
"or",
"seconds",
"per",
"mile",
"."
] | ddfc53ecf3950deebb62a1f205aa21fbe9bce45d | https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/SportsState.java#L110-L113 |
7,508 | pebble/pebble-android-sdk | PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/SportsState.java | SportsState.setSpeed | public void setSpeed(float speed) {
this.paceInSec = null;
this.speed = Math.max(0, Math.min(speed, 99.9));
} | java | public void setSpeed(float speed) {
this.paceInSec = null;
this.speed = Math.max(0, Math.min(speed, 99.9));
} | [
"public",
"void",
"setSpeed",
"(",
"float",
"speed",
")",
"{",
"this",
".",
"paceInSec",
"=",
"null",
";",
"this",
".",
"speed",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"Math",
".",
"min",
"(",
"speed",
",",
"99.9",
")",
")",
";",
"}"
] | Set the current speed in kilometers per hour or miles per hour.
The possible range is currently limited from 0 to 99.9, inclusive. Values
larger or smaller than the limits will be transformed into the maximum or
minimum, respectively.
It will be presented as a decimal number in the UI. The decimal part will be
rounde... | [
"Set",
"the",
"current",
"speed",
"in",
"kilometers",
"per",
"hour",
"or",
"miles",
"per",
"hour",
"."
] | ddfc53ecf3950deebb62a1f205aa21fbe9bce45d | https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/SportsState.java#L143-L146 |
7,509 | pebble/pebble-android-sdk | PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/SportsState.java | SportsState.synchronize | public void synchronize(final Context context) {
SportsState previousState = this.previousState;
boolean firstMessage = false;
if (previousState == null) {
previousState = this.previousState = new SportsState();
firstMessage = true;
}
PebbleDictionary mes... | java | public void synchronize(final Context context) {
SportsState previousState = this.previousState;
boolean firstMessage = false;
if (previousState == null) {
previousState = this.previousState = new SportsState();
firstMessage = true;
}
PebbleDictionary mes... | [
"public",
"void",
"synchronize",
"(",
"final",
"Context",
"context",
")",
"{",
"SportsState",
"previousState",
"=",
"this",
".",
"previousState",
";",
"boolean",
"firstMessage",
"=",
"false",
";",
"if",
"(",
"previousState",
"==",
"null",
")",
"{",
"previousSt... | Synchronizes the current state of the Sports App to the connected watch.
The method tries to send the minimal set of changes since the last time the
method was used, to try to minimize communication with the watch.
@param context
The context used to send the broadcast. | [
"Synchronizes",
"the",
"current",
"state",
"of",
"the",
"Sports",
"App",
"to",
"the",
"connected",
"watch",
"."
] | ddfc53ecf3950deebb62a1f205aa21fbe9bce45d | https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/SportsState.java#L240-L289 |
7,510 | vinaysshenoy/mugen | library/src/main/java/com/mugen/attachers/BaseAttacher.java | BaseAttacher.start | public BaseAttacher start() {
if(mAdapterView == null) {
throw new IllegalStateException("Adapter View cannot be null");
}
if(mMugenCallbacks == null) {
throw new IllegalStateException("MugenCallbacks cannot be null");
}
if(mLoadMoreOffset <= 0) {
... | java | public BaseAttacher start() {
if(mAdapterView == null) {
throw new IllegalStateException("Adapter View cannot be null");
}
if(mMugenCallbacks == null) {
throw new IllegalStateException("MugenCallbacks cannot be null");
}
if(mLoadMoreOffset <= 0) {
... | [
"public",
"BaseAttacher",
"start",
"(",
")",
"{",
"if",
"(",
"mAdapterView",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Adapter View cannot be null\"",
")",
";",
"}",
"if",
"(",
"mMugenCallbacks",
"==",
"null",
")",
"{",
"throw",
... | Begin load more on the attached Adapter View
@throws java.lang.IllegalStateException If any configuration is incorrect | [
"Begin",
"load",
"more",
"on",
"the",
"attached",
"Adapter",
"View"
] | 2ace4312c940fed6b82d221a6a7fbd8681e91e9e | https://github.com/vinaysshenoy/mugen/blob/2ace4312c940fed6b82d221a6a7fbd8681e91e9e/library/src/main/java/com/mugen/attachers/BaseAttacher.java#L126-L142 |
7,511 | yandex-qatools/matchers-java | matcher-decorators/src/main/java/ru/yandex/qatools/matchers/decorators/MatcherDecorators.java | MatcherDecorators.should | public static <T> MatcherDecoratorsBuilder<T> should(final Matcher<? super T> matcher) {
return MatcherDecoratorsBuilder.should(matcher);
} | java | public static <T> MatcherDecoratorsBuilder<T> should(final Matcher<? super T> matcher) {
return MatcherDecoratorsBuilder.should(matcher);
} | [
"public",
"static",
"<",
"T",
">",
"MatcherDecoratorsBuilder",
"<",
"T",
">",
"should",
"(",
"final",
"Matcher",
"<",
"?",
"super",
"T",
">",
"matcher",
")",
"{",
"return",
"MatcherDecoratorsBuilder",
".",
"should",
"(",
"matcher",
")",
";",
"}"
] | Factory method for decorating matcher with action, condition or waiter.
@param matcher Matcher to be decorated. | [
"Factory",
"method",
"for",
"decorating",
"matcher",
"with",
"action",
"condition",
"or",
"waiter",
"."
] | 559fcc03fa568d4d293c9d82797df0c183edb55e | https://github.com/yandex-qatools/matchers-java/blob/559fcc03fa568d4d293c9d82797df0c183edb55e/matcher-decorators/src/main/java/ru/yandex/qatools/matchers/decorators/MatcherDecorators.java#L22-L24 |
7,512 | thulab/iotdb-jdbc | src/main/java/cn/edu/tsinghua/iotdb/jdbc/TsfileQueryResultSet.java | TsfileQueryResultSet.nextWithoutLimit | private boolean nextWithoutLimit() throws SQLException {
if (maxRows > 0 && rowsFetched >= maxRows) {
System.out.println("Reach max rows " + maxRows);
return false;
}
if ((recordItr == null || !recordItr.hasNext()) && !emptyResultSet) {
TSFetchResultsReq req = new TSFetchResultsReq(sql, fetchSize);
... | java | private boolean nextWithoutLimit() throws SQLException {
if (maxRows > 0 && rowsFetched >= maxRows) {
System.out.println("Reach max rows " + maxRows);
return false;
}
if ((recordItr == null || !recordItr.hasNext()) && !emptyResultSet) {
TSFetchResultsReq req = new TSFetchResultsReq(sql, fetchSize);
... | [
"private",
"boolean",
"nextWithoutLimit",
"(",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"maxRows",
">",
"0",
"&&",
"rowsFetched",
">=",
"maxRows",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"Reach max rows \"",
"+",
"maxRows",
")",
";",
"... | the next record rule without considering the LIMIT&SLIMIT constraints | [
"the",
"next",
"record",
"rule",
"without",
"considering",
"the",
"LIMIT&SLIMIT",
"constraints"
] | badd5b304fd628da9d69e621477769eeefe0870d | https://github.com/thulab/iotdb-jdbc/blob/badd5b304fd628da9d69e621477769eeefe0870d/src/main/java/cn/edu/tsinghua/iotdb/jdbc/TsfileQueryResultSet.java#L674-L715 |
7,513 | protegeproject/sparql-dl-api | src/main/java/de/derivo/sparqldlapi/impl/QueryAtomGroupImpl.java | QueryAtomGroupImpl.pop | public QueryAtomGroupImpl pop() {
QueryAtomGroupImpl group = new QueryAtomGroupImpl();
boolean first = true;
for (QueryAtom atom : atoms) {
if (first) {
first = false;
}
else {
group.addAtom(atom);
}
}
... | java | public QueryAtomGroupImpl pop() {
QueryAtomGroupImpl group = new QueryAtomGroupImpl();
boolean first = true;
for (QueryAtom atom : atoms) {
if (first) {
first = false;
}
else {
group.addAtom(atom);
}
}
... | [
"public",
"QueryAtomGroupImpl",
"pop",
"(",
")",
"{",
"QueryAtomGroupImpl",
"group",
"=",
"new",
"QueryAtomGroupImpl",
"(",
")",
";",
"boolean",
"first",
"=",
"true",
";",
"for",
"(",
"QueryAtom",
"atom",
":",
"atoms",
")",
"{",
"if",
"(",
"first",
")",
... | A convenience method to clone the atom group instance and pop the first atom.
Only the instance itself will be cloned not the atoms.
@return A new query instance with the first atom removed. | [
"A",
"convenience",
"method",
"to",
"clone",
"the",
"atom",
"group",
"instance",
"and",
"pop",
"the",
"first",
"atom",
".",
"Only",
"the",
"instance",
"itself",
"will",
"be",
"cloned",
"not",
"the",
"atoms",
"."
] | 80d430d439e17a691d0111819af2d3613e28d625 | https://github.com/protegeproject/sparql-dl-api/blob/80d430d439e17a691d0111819af2d3613e28d625/src/main/java/de/derivo/sparqldlapi/impl/QueryAtomGroupImpl.java#L74-L86 |
7,514 | protegeproject/sparql-dl-api | src/main/java/de/derivo/sparqldlapi/impl/QueryAtomGroupImpl.java | QueryAtomGroupImpl.bind | public QueryAtomGroupImpl bind(QueryBinding binding) {
QueryAtomGroupImpl group = new QueryAtomGroupImpl();
for (QueryAtom atom : atoms) {
group.addAtom(atom.bind(binding));
}
return group;
} | java | public QueryAtomGroupImpl bind(QueryBinding binding) {
QueryAtomGroupImpl group = new QueryAtomGroupImpl();
for (QueryAtom atom : atoms) {
group.addAtom(atom.bind(binding));
}
return group;
} | [
"public",
"QueryAtomGroupImpl",
"bind",
"(",
"QueryBinding",
"binding",
")",
"{",
"QueryAtomGroupImpl",
"group",
"=",
"new",
"QueryAtomGroupImpl",
"(",
")",
";",
"for",
"(",
"QueryAtom",
"atom",
":",
"atoms",
")",
"{",
"group",
".",
"addAtom",
"(",
"atom",
"... | A convenience method to clone the atom group instance while inserting a new binding
to all atoms of the group.
The instance and the atoms will be cloned. | [
"A",
"convenience",
"method",
"to",
"clone",
"the",
"atom",
"group",
"instance",
"while",
"inserting",
"a",
"new",
"binding",
"to",
"all",
"atoms",
"of",
"the",
"group",
".",
"The",
"instance",
"and",
"the",
"atoms",
"will",
"be",
"cloned",
"."
] | 80d430d439e17a691d0111819af2d3613e28d625 | https://github.com/protegeproject/sparql-dl-api/blob/80d430d439e17a691d0111819af2d3613e28d625/src/main/java/de/derivo/sparqldlapi/impl/QueryAtomGroupImpl.java#L93-L99 |
7,515 | protegeproject/sparql-dl-api | src/main/java/de/derivo/sparqldlapi/impl/QueryImpl.java | QueryImpl.addResultVar | public void addResultVar(QueryArgument arg)
{
if(arg.getType() == QueryArgumentType.VAR) {
resultVars.add(arg);
}
} | java | public void addResultVar(QueryArgument arg)
{
if(arg.getType() == QueryArgumentType.VAR) {
resultVars.add(arg);
}
} | [
"public",
"void",
"addResultVar",
"(",
"QueryArgument",
"arg",
")",
"{",
"if",
"(",
"arg",
".",
"getType",
"(",
")",
"==",
"QueryArgumentType",
".",
"VAR",
")",
"{",
"resultVars",
".",
"add",
"(",
"arg",
")",
";",
"}",
"}"
] | Add a result variable to the query.
@param arg QueryArgument has to be a variable. | [
"Add",
"a",
"result",
"variable",
"to",
"the",
"query",
"."
] | 80d430d439e17a691d0111819af2d3613e28d625 | https://github.com/protegeproject/sparql-dl-api/blob/80d430d439e17a691d0111819af2d3613e28d625/src/main/java/de/derivo/sparqldlapi/impl/QueryImpl.java#L52-L57 |
7,516 | rhiot/rhiot | lib/utils/src/main/java/io/rhiot/utils/install/DefaultInstaller.java | DefaultInstaller.isCommandInstalled | public boolean isCommandInstalled(String command, String failureMessage){
List<String> output = getProcessManager().executeAndJoinOutput(command);
return output.size() > 0 && !output.get(0).contains(failureMessage);
} | java | public boolean isCommandInstalled(String command, String failureMessage){
List<String> output = getProcessManager().executeAndJoinOutput(command);
return output.size() > 0 && !output.get(0).contains(failureMessage);
} | [
"public",
"boolean",
"isCommandInstalled",
"(",
"String",
"command",
",",
"String",
"failureMessage",
")",
"{",
"List",
"<",
"String",
">",
"output",
"=",
"getProcessManager",
"(",
")",
".",
"executeAndJoinOutput",
"(",
"command",
")",
";",
"return",
"output",
... | True if the given command is installed in the shell, false otherwise.
@param command eg brew, aptitude, sudo etc
@param failureMessage the message expected upon failure.
@return <tt>true</tt> if the given command is installed in the shell, false otherwise. | [
"True",
"if",
"the",
"given",
"command",
"is",
"installed",
"in",
"the",
"shell",
"false",
"otherwise",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/lib/utils/src/main/java/io/rhiot/utils/install/DefaultInstaller.java#L82-L85 |
7,517 | rhiot/rhiot | lib/utils/src/main/java/io/rhiot/utils/install/DefaultInstaller.java | DefaultInstaller.confirmInstalled | public boolean confirmInstalled(String packageName, List<String> output){
if (output != null) {
return output.stream().anyMatch(s -> s != null && s.contains(getInstallSuccess()));
} else {
return true; //may be successful
}
} | java | public boolean confirmInstalled(String packageName, List<String> output){
if (output != null) {
return output.stream().anyMatch(s -> s != null && s.contains(getInstallSuccess()));
} else {
return true; //may be successful
}
} | [
"public",
"boolean",
"confirmInstalled",
"(",
"String",
"packageName",
",",
"List",
"<",
"String",
">",
"output",
")",
"{",
"if",
"(",
"output",
"!=",
"null",
")",
"{",
"return",
"output",
".",
"stream",
"(",
")",
".",
"anyMatch",
"(",
"s",
"->",
"s",
... | Checks the output to confirm the package is installed.
@param packageName package name, eg gpsd
@param output result of the installation process
@return returns true if the package is installed, false otherwise. | [
"Checks",
"the",
"output",
"to",
"confirm",
"the",
"package",
"is",
"installed",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/lib/utils/src/main/java/io/rhiot/utils/install/DefaultInstaller.java#L125-L131 |
7,518 | rhiot/rhiot | lib/utils/src/main/java/io/rhiot/utils/install/DefaultInstaller.java | DefaultInstaller.isPermissionDenied | protected boolean isPermissionDenied(List<String> output){
return output.stream().anyMatch(s -> s != null && s.contains(PERMISSION_DENIED_MESSAGE));
} | java | protected boolean isPermissionDenied(List<String> output){
return output.stream().anyMatch(s -> s != null && s.contains(PERMISSION_DENIED_MESSAGE));
} | [
"protected",
"boolean",
"isPermissionDenied",
"(",
"List",
"<",
"String",
">",
"output",
")",
"{",
"return",
"output",
".",
"stream",
"(",
")",
".",
"anyMatch",
"(",
"s",
"->",
"s",
"!=",
"null",
"&&",
"s",
".",
"contains",
"(",
"PERMISSION_DENIED_MESSAGE"... | Returns true if permission was denied.
@param output Output from the install/uninstall process.
@return true if permission was denied. | [
"Returns",
"true",
"if",
"permission",
"was",
"denied",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/lib/utils/src/main/java/io/rhiot/utils/install/DefaultInstaller.java#L183-L185 |
7,519 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/main/SahaginPreMain.java | SahaginPreMain.premain | public static void premain(String agentArgs, Instrumentation inst)
throws YamlConvertException, IllegalTestScriptException,
IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {
String configFilePath;
String propValue = System.getProperty("sahagin.... | java | public static void premain(String agentArgs, Instrumentation inst)
throws YamlConvertException, IllegalTestScriptException,
IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {
String configFilePath;
String propValue = System.getProperty("sahagin.... | [
"public",
"static",
"void",
"premain",
"(",
"String",
"agentArgs",
",",
"Instrumentation",
"inst",
")",
"throws",
"YamlConvertException",
",",
"IllegalTestScriptException",
",",
"IOException",
",",
"ClassNotFoundException",
",",
"InstantiationException",
",",
"IllegalAcce... | agentArgs is configuration YAML file path | [
"agentArgs",
"is",
"configuration",
"YAML",
"file",
"path"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/main/SahaginPreMain.java#L43-L99 |
7,520 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/LittleEndian.java | LittleEndian.getUInt16 | public static int getUInt16(byte[] src, int offset) {
final int v0 = src[offset + 0] & 0xFF;
final int v1 = src[offset + 1] & 0xFF;
return ((v1 << 8) | v0);
} | java | public static int getUInt16(byte[] src, int offset) {
final int v0 = src[offset + 0] & 0xFF;
final int v1 = src[offset + 1] & 0xFF;
return ((v1 << 8) | v0);
} | [
"public",
"static",
"int",
"getUInt16",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"offset",
")",
"{",
"final",
"int",
"v0",
"=",
"src",
"[",
"offset",
"+",
"0",
"]",
"&",
"0xFF",
";",
"final",
"int",
"v1",
"=",
"src",
"[",
"offset",
"+",
"1",
"... | Gets a 16-bit unsigned integer from the given byte array at the given offset.
@param src
@param offset | [
"Gets",
"a",
"16",
"-",
"bit",
"unsigned",
"integer",
"from",
"the",
"given",
"byte",
"array",
"at",
"the",
"given",
"offset",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/LittleEndian.java#L50-L54 |
7,521 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/LittleEndian.java | LittleEndian.setInt16 | public static void setInt16(byte[] dst, int offset, int value) {
assert (value & 0xffff) == value : "value out of range";
dst[offset + 0] = (byte) (value & 0xFF);
dst[offset + 1] = (byte) ((value >>> 8) & 0xFF);
} | java | public static void setInt16(byte[] dst, int offset, int value) {
assert (value & 0xffff) == value : "value out of range";
dst[offset + 0] = (byte) (value & 0xFF);
dst[offset + 1] = (byte) ((value >>> 8) & 0xFF);
} | [
"public",
"static",
"void",
"setInt16",
"(",
"byte",
"[",
"]",
"dst",
",",
"int",
"offset",
",",
"int",
"value",
")",
"{",
"assert",
"(",
"value",
"&",
"0xffff",
")",
"==",
"value",
":",
"\"value out of range\"",
";",
"dst",
"[",
"offset",
"+",
"0",
... | Sets a 16-bit integer in the given byte array at the given offset. | [
"Sets",
"a",
"16",
"-",
"bit",
"integer",
"in",
"the",
"given",
"byte",
"array",
"at",
"the",
"given",
"offset",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/LittleEndian.java#L82-L87 |
7,522 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/LittleEndian.java | LittleEndian.setInt32 | public static void setInt32(byte[] dst, int offset, long value)
throws IllegalArgumentException {
assert value <= Integer.MAX_VALUE : "value out of range";
dst[offset + 0] = (byte) (value & 0xFF);
dst[offset + 1] = (byte) ((value >>> 8) & 0xFF);
dst[offset +... | java | public static void setInt32(byte[] dst, int offset, long value)
throws IllegalArgumentException {
assert value <= Integer.MAX_VALUE : "value out of range";
dst[offset + 0] = (byte) (value & 0xFF);
dst[offset + 1] = (byte) ((value >>> 8) & 0xFF);
dst[offset +... | [
"public",
"static",
"void",
"setInt32",
"(",
"byte",
"[",
"]",
"dst",
",",
"int",
"offset",
",",
"long",
"value",
")",
"throws",
"IllegalArgumentException",
"{",
"assert",
"value",
"<=",
"Integer",
".",
"MAX_VALUE",
":",
"\"value out of range\"",
";",
"dst",
... | Sets a 32-bit integer in the given byte array at the given offset. | [
"Sets",
"a",
"32",
"-",
"bit",
"integer",
"in",
"the",
"given",
"byte",
"array",
"at",
"the",
"given",
"offset",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/LittleEndian.java#L92-L101 |
7,523 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/SuperFloppyFormatter.java | SuperFloppyFormatter.format | public FatFileSystem format() throws IOException {
final int sectorSize = device.getSectorSize();
final int totalSectors = (int)(device.getSize() / sectorSize);
final FsInfoSector fsi;
final BootSector bs;
if (sectorsPerCluster == 0) throw new AssertionError();
... | java | public FatFileSystem format() throws IOException {
final int sectorSize = device.getSectorSize();
final int totalSectors = (int)(device.getSize() / sectorSize);
final FsInfoSector fsi;
final BootSector bs;
if (sectorsPerCluster == 0) throw new AssertionError();
... | [
"public",
"FatFileSystem",
"format",
"(",
")",
"throws",
"IOException",
"{",
"final",
"int",
"sectorSize",
"=",
"device",
".",
"getSectorSize",
"(",
")",
";",
"final",
"int",
"totalSectors",
"=",
"(",
"int",
")",
"(",
"device",
".",
"getSize",
"(",
")",
... | Initializes the boot sector and file system for the device. The file
system created by this method will always be in read-write mode.
@return the file system that was created
@throws IOException on write error | [
"Initializes",
"the",
"boot",
"sector",
"and",
"file",
"system",
"for",
"the",
"device",
".",
"The",
"file",
"system",
"created",
"by",
"this",
"method",
"will",
"always",
"be",
"in",
"read",
"-",
"write",
"mode",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/SuperFloppyFormatter.java#L185-L261 |
7,524 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/share/runresults/LineScreenCapture.java | LineScreenCapture.matchesStackLines | public boolean matchesStackLines(List<StackLine> targetStackLines) {
if (targetStackLines.size() != getStackLines().size()) {
return false;
}
for (int i = 0; i < targetStackLines.size(); i++) {
StackLine targetLine = targetStackLines.get(i);
StackLine line = g... | java | public boolean matchesStackLines(List<StackLine> targetStackLines) {
if (targetStackLines.size() != getStackLines().size()) {
return false;
}
for (int i = 0; i < targetStackLines.size(); i++) {
StackLine targetLine = targetStackLines.get(i);
StackLine line = g... | [
"public",
"boolean",
"matchesStackLines",
"(",
"List",
"<",
"StackLine",
">",
"targetStackLines",
")",
"{",
"if",
"(",
"targetStackLines",
".",
"size",
"(",
")",
"!=",
"getStackLines",
"(",
")",
".",
"size",
"(",
")",
")",
"{",
"return",
"false",
";",
"}... | check if stack line for this instance matches targetStackLines | [
"check",
"if",
"stack",
"line",
"for",
"this",
"instance",
"matches",
"targetStackLines"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/share/runresults/LineScreenCapture.java#L51-L66 |
7,525 | rhiot/rhiot | gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamComponent.java | WebcamComponent.getWebcam | public Webcam getWebcam(String name, Dimension dimension) {
if (name == null) {
return getWebcam(dimension);
}
Webcam webcam = webcams.get(name);
openWebcam(webcam, dimension);
return webcam;
} | java | public Webcam getWebcam(String name, Dimension dimension) {
if (name == null) {
return getWebcam(dimension);
}
Webcam webcam = webcams.get(name);
openWebcam(webcam, dimension);
return webcam;
} | [
"public",
"Webcam",
"getWebcam",
"(",
"String",
"name",
",",
"Dimension",
"dimension",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"getWebcam",
"(",
"dimension",
")",
";",
"}",
"Webcam",
"webcam",
"=",
"webcams",
".",
"get",
"(",
"na... | Returns the webcam by name, null if not found.
@param name webcam name
@return webcam instance | [
"Returns",
"the",
"webcam",
"by",
"name",
"null",
"if",
"not",
"found",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamComponent.java#L234-L242 |
7,526 | rhiot/rhiot | gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamComponent.java | WebcamComponent.getWebcam | public Webcam getWebcam(Dimension dimension) {
if (webcams.size() == 0) {
throw new IllegalStateException("No webcams found");
}
Webcam webcam = webcams.values().iterator().next();
openWebcam(webcam, dimension);
return webcam;
} | java | public Webcam getWebcam(Dimension dimension) {
if (webcams.size() == 0) {
throw new IllegalStateException("No webcams found");
}
Webcam webcam = webcams.values().iterator().next();
openWebcam(webcam, dimension);
return webcam;
} | [
"public",
"Webcam",
"getWebcam",
"(",
"Dimension",
"dimension",
")",
"{",
"if",
"(",
"webcams",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"No webcams found\"",
")",
";",
"}",
"Webcam",
"webcam",
"=",
"webca... | Returns the first webcam. | [
"Returns",
"the",
"first",
"webcam",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamComponent.java#L247-L256 |
7,527 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java | HookMethodManager.beforeMethodHook | public void beforeMethodHook(String hookedClassQualifiedName,
String hookedMethodSimpleName, String actualHookedMethodSimpleName) {
if (currentRunResult != null) {
return; // maybe called inside of the root method
}
List<TestMethod> rootMethods = srcTree.getRootMethodTab... | java | public void beforeMethodHook(String hookedClassQualifiedName,
String hookedMethodSimpleName, String actualHookedMethodSimpleName) {
if (currentRunResult != null) {
return; // maybe called inside of the root method
}
List<TestMethod> rootMethods = srcTree.getRootMethodTab... | [
"public",
"void",
"beforeMethodHook",
"(",
"String",
"hookedClassQualifiedName",
",",
"String",
"hookedMethodSimpleName",
",",
"String",
"actualHookedMethodSimpleName",
")",
"{",
"if",
"(",
"currentRunResult",
"!=",
"null",
")",
"{",
"return",
";",
"// maybe called insi... | initialize runResult information if the method for the arguments is root method | [
"initialize",
"runResult",
"information",
"if",
"the",
"method",
"for",
"the",
"arguments",
"is",
"root",
"method"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java#L62-L86 |
7,528 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java | HookMethodManager.methodErrorHook | public void methodErrorHook(String hookedClassQualifiedName,
String hookedMethodSimpleName, Throwable e) {
if (currentRunResult == null) {
return; // maybe called outside of the root method
}
TestMethod rootMethod = currentRunResult.getRootMethod();
if (!rootMetho... | java | public void methodErrorHook(String hookedClassQualifiedName,
String hookedMethodSimpleName, Throwable e) {
if (currentRunResult == null) {
return; // maybe called outside of the root method
}
TestMethod rootMethod = currentRunResult.getRootMethod();
if (!rootMetho... | [
"public",
"void",
"methodErrorHook",
"(",
"String",
"hookedClassQualifiedName",
",",
"String",
"hookedMethodSimpleName",
",",
"Throwable",
"e",
")",
"{",
"if",
"(",
"currentRunResult",
"==",
"null",
")",
"{",
"return",
";",
"// maybe called outside of the root method",
... | This method must be called before afterMethodHook is called | [
"This",
"method",
"must",
"be",
"called",
"before",
"afterMethodHook",
"is",
"called"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java#L90-L121 |
7,529 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java | HookMethodManager.afterMethodHook | public void afterMethodHook(String hookedClassQualifiedName, String hookedMethodSimpleName) {
if (currentRunResult == null) {
return; // maybe called outside of the root method
}
TestMethod rootMethod = currentRunResult.getRootMethod();
if (!rootMethod.getTestClassKey().equal... | java | public void afterMethodHook(String hookedClassQualifiedName, String hookedMethodSimpleName) {
if (currentRunResult == null) {
return; // maybe called outside of the root method
}
TestMethod rootMethod = currentRunResult.getRootMethod();
if (!rootMethod.getTestClassKey().equal... | [
"public",
"void",
"afterMethodHook",
"(",
"String",
"hookedClassQualifiedName",
",",
"String",
"hookedMethodSimpleName",
")",
"{",
"if",
"(",
"currentRunResult",
"==",
"null",
")",
"{",
"return",
";",
"// maybe called outside of the root method",
"}",
"TestMethod",
"roo... | write runResult to YAML file if the method for the arguments is root method | [
"write",
"runResult",
"to",
"YAML",
"file",
"if",
"the",
"method",
"for",
"the",
"arguments",
"is",
"root",
"method"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java#L124-L154 |
7,530 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java | HookMethodManager.getCodeLineHookedStackLines | private List<StackLine> getCodeLineHookedStackLines(
final String hookedMethodSimpleName, final String actualHookedMethodSimpleName,
final int hookedLine, final int actualHookedLine) {
// this replacer replaces method name and line to the actual hooked method name and line
LineRe... | java | private List<StackLine> getCodeLineHookedStackLines(
final String hookedMethodSimpleName, final String actualHookedMethodSimpleName,
final int hookedLine, final int actualHookedLine) {
// this replacer replaces method name and line to the actual hooked method name and line
LineRe... | [
"private",
"List",
"<",
"StackLine",
">",
"getCodeLineHookedStackLines",
"(",
"final",
"String",
"hookedMethodSimpleName",
",",
"final",
"String",
"actualHookedMethodSimpleName",
",",
"final",
"int",
"hookedLine",
",",
"final",
"int",
"actualHookedLine",
")",
"{",
"//... | get the stackLines for the hook method code line. | [
"get",
"the",
"stackLines",
"for",
"the",
"hook",
"method",
"code",
"line",
"."
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java#L215-L241 |
7,531 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java | HookMethodManager.getCodeLineKey | private String getCodeLineKey(final String hookedClassQualifiedName,
final String hookedMethodSimpleName,
String hookedArgClassesStr, final int hookedLine) {
return String.format("%s_%s_%s_%d_%d",
hookedClassQualifiedName,
... | java | private String getCodeLineKey(final String hookedClassQualifiedName,
final String hookedMethodSimpleName,
String hookedArgClassesStr, final int hookedLine) {
return String.format("%s_%s_%s_%d_%d",
hookedClassQualifiedName,
... | [
"private",
"String",
"getCodeLineKey",
"(",
"final",
"String",
"hookedClassQualifiedName",
",",
"final",
"String",
"hookedMethodSimpleName",
",",
"String",
"hookedArgClassesStr",
",",
"final",
"int",
"hookedLine",
")",
"{",
"return",
"String",
".",
"format",
"(",
"\... | Calculate unique key for each code line hook | [
"Calculate",
"unique",
"key",
"for",
"each",
"code",
"line",
"hook"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java#L399-L408 |
7,532 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java | HookMethodManager.captureScreen | private File captureScreen(TestMethod rootMethod) {
byte[] screenData = AdapterContainer.globalInstance().captureScreen();
if (screenData == null) {
return null;
}
// use encoded name to avoid various possible file name encoding problem
// and to escape invalid file ... | java | private File captureScreen(TestMethod rootMethod) {
byte[] screenData = AdapterContainer.globalInstance().captureScreen();
if (screenData == null) {
return null;
}
// use encoded name to avoid various possible file name encoding problem
// and to escape invalid file ... | [
"private",
"File",
"captureScreen",
"(",
"TestMethod",
"rootMethod",
")",
"{",
"byte",
"[",
"]",
"screenData",
"=",
"AdapterContainer",
".",
"globalInstance",
"(",
")",
".",
"captureScreen",
"(",
")",
";",
"if",
"(",
"screenData",
"==",
"null",
")",
"{",
"... | returns null if not executed | [
"returns",
"null",
"if",
"not",
"executed"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java#L411-L439 |
7,533 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java | HookMethodManager.captureScreenForStackLines | private File captureScreenForStackLines(
TestMethod rootMethod, List<List<StackLine>> stackLinesList, List<Integer> executionTimes) {
if (stackLinesList == null) {
throw new NullPointerException();
}
if (stackLinesList.size() == 0) {
throw new IllegalArgumentE... | java | private File captureScreenForStackLines(
TestMethod rootMethod, List<List<StackLine>> stackLinesList, List<Integer> executionTimes) {
if (stackLinesList == null) {
throw new NullPointerException();
}
if (stackLinesList.size() == 0) {
throw new IllegalArgumentE... | [
"private",
"File",
"captureScreenForStackLines",
"(",
"TestMethod",
"rootMethod",
",",
"List",
"<",
"List",
"<",
"StackLine",
">",
">",
"stackLinesList",
",",
"List",
"<",
"Integer",
">",
"executionTimes",
")",
"{",
"if",
"(",
"stackLinesList",
"==",
"null",
"... | - returns null if fails to capture | [
"-",
"returns",
"null",
"if",
"fails",
"to",
"capture"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java#L445-L468 |
7,534 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java | HookMethodManager.canStepInCaptureTo | private boolean canStepInCaptureTo(List<StackLine> stackLines) {
// stack bottom line ( = root line) is always regarded as stepIn true line
for (int i = 0; i < stackLines.size() - 1; i++) {
StackLine stackLine = stackLines.get(i);
CaptureStyle style = stackLine.getMethod().getCap... | java | private boolean canStepInCaptureTo(List<StackLine> stackLines) {
// stack bottom line ( = root line) is always regarded as stepIn true line
for (int i = 0; i < stackLines.size() - 1; i++) {
StackLine stackLine = stackLines.get(i);
CaptureStyle style = stackLine.getMethod().getCap... | [
"private",
"boolean",
"canStepInCaptureTo",
"(",
"List",
"<",
"StackLine",
">",
"stackLines",
")",
"{",
"// stack bottom line ( = root line) is always regarded as stepIn true line",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"stackLines",
".",
"size",
"(",
")"... | if method is called from not stepInCapture line, then returns false. | [
"if",
"method",
"is",
"called",
"from",
"not",
"stepInCapture",
"line",
"then",
"returns",
"false",
"."
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/HookMethodManager.java#L471-L481 |
7,535 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/services/APIAccessService.java | APIAccessService.getAPIAccessMode | public String getAPIAccessMode() {
String apiAccessMode = (String) getScenarioGlobals().getAttribute(API_ACCESS_MODE_KEY);
return apiAccessMode == null ? HTTP_API_ACCESS_MODE : apiAccessMode;
} | java | public String getAPIAccessMode() {
String apiAccessMode = (String) getScenarioGlobals().getAttribute(API_ACCESS_MODE_KEY);
return apiAccessMode == null ? HTTP_API_ACCESS_MODE : apiAccessMode;
} | [
"public",
"String",
"getAPIAccessMode",
"(",
")",
"{",
"String",
"apiAccessMode",
"=",
"(",
"String",
")",
"getScenarioGlobals",
"(",
")",
".",
"getAttribute",
"(",
"API_ACCESS_MODE_KEY",
")",
";",
"return",
"apiAccessMode",
"==",
"null",
"?",
"HTTP_API_ACCESS_MOD... | When the api is accessed though the browser selenium is used, though straight HTTP calls we can choose to POST or GET the api
@return the api access mode being either {@link APIAccessService#HTTP_API_ACCESS_MODE} (default) or {@link APIAccessService#BROWSER_API_ACCESS_MODE} | [
"When",
"the",
"api",
"is",
"accessed",
"though",
"the",
"browser",
"selenium",
"is",
"used",
"though",
"straight",
"HTTP",
"calls",
"we",
"can",
"choose",
"to",
"POST",
"or",
"GET",
"the",
"api"
] | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/APIAccessService.java#L81-L84 |
7,536 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/services/APIAccessService.java | APIAccessService.setRequestHeaders | private void setRequestHeaders(HttpURLConnection ucon,
GenericUser authenticationUser,
String[] requestHedaers) {
if(authenticationUser != null) {
String authenticationString = authenticationUser.getUserName() + ":" + authenticationUser.getPassword();
byte[] encodedAuthentication = Base64.encodeBase64(a... | java | private void setRequestHeaders(HttpURLConnection ucon,
GenericUser authenticationUser,
String[] requestHedaers) {
if(authenticationUser != null) {
String authenticationString = authenticationUser.getUserName() + ":" + authenticationUser.getPassword();
byte[] encodedAuthentication = Base64.encodeBase64(a... | [
"private",
"void",
"setRequestHeaders",
"(",
"HttpURLConnection",
"ucon",
",",
"GenericUser",
"authenticationUser",
",",
"String",
"[",
"]",
"requestHedaers",
")",
"{",
"if",
"(",
"authenticationUser",
"!=",
"null",
")",
"{",
"String",
"authenticationString",
"=",
... | Add the request headers to the request
@param ucon the connection to append the http headers to
@param authenticationUser The username:password combination to pass along as basic http authentication
@param requestHedaers the https header name:value pairs. This means the headers should always come in an even number (na... | [
"Add",
"the",
"request",
"headers",
"to",
"the",
"request"
] | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/APIAccessService.java#L322-L335 |
7,537 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/srctreegen/ASTUtils.java | ASTUtils.getAllPageDocs | private static Map<Locale, String> getAllPageDocs(IAnnotationBinding[] annotations) {
// all @PageDoc or @Page annotations including annotations contained in @PageDocs or @Page
List<IAnnotationBinding> allPageAnnotations = new ArrayList<>(2);
List<Class<?>> singlePageAnnotationClasses = new Arr... | java | private static Map<Locale, String> getAllPageDocs(IAnnotationBinding[] annotations) {
// all @PageDoc or @Page annotations including annotations contained in @PageDocs or @Page
List<IAnnotationBinding> allPageAnnotations = new ArrayList<>(2);
List<Class<?>> singlePageAnnotationClasses = new Arr... | [
"private",
"static",
"Map",
"<",
"Locale",
",",
"String",
">",
"getAllPageDocs",
"(",
"IAnnotationBinding",
"[",
"]",
"annotations",
")",
"{",
"// all @PageDoc or @Page annotations including annotations contained in @PageDocs or @Page",
"List",
"<",
"IAnnotationBinding",
">",... | return empty list if no Page is found | [
"return",
"empty",
"list",
"if",
"no",
"Page",
"is",
"found"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/srctreegen/ASTUtils.java#L172-L220 |
7,538 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/srctreegen/ASTUtils.java | ASTUtils.getPageDoc | private static String getPageDoc(
IAnnotationBinding[] annotations, AcceptableLocales locales) {
Map<Locale, String> allPages = getAllPageDocs(annotations);
if (allPages.isEmpty()) {
return null; // no @Page found
}
for (Locale locale : locales.getLocales()) {
... | java | private static String getPageDoc(
IAnnotationBinding[] annotations, AcceptableLocales locales) {
Map<Locale, String> allPages = getAllPageDocs(annotations);
if (allPages.isEmpty()) {
return null; // no @Page found
}
for (Locale locale : locales.getLocales()) {
... | [
"private",
"static",
"String",
"getPageDoc",
"(",
"IAnnotationBinding",
"[",
"]",
"annotations",
",",
"AcceptableLocales",
"locales",
")",
"{",
"Map",
"<",
"Locale",
",",
"String",
">",
"allPages",
"=",
"getAllPageDocs",
"(",
"annotations",
")",
";",
"if",
"("... | return null if no Page found | [
"return",
"null",
"if",
"no",
"Page",
"found"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/srctreegen/ASTUtils.java#L250-L265 |
7,539 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/Fat.java | Fat.read | private void read() throws IOException {
final byte[] data = new byte[sectorCount * sectorSize];
device.read(offset, ByteBuffer.wrap(data));
for (int i = 0; i < entries.length; i++)
entries[i] = fatType.readEntry(data, i);
} | java | private void read() throws IOException {
final byte[] data = new byte[sectorCount * sectorSize];
device.read(offset, ByteBuffer.wrap(data));
for (int i = 0; i < entries.length; i++)
entries[i] = fatType.readEntry(data, i);
} | [
"private",
"void",
"read",
"(",
")",
"throws",
"IOException",
"{",
"final",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"sectorCount",
"*",
"sectorSize",
"]",
";",
"device",
".",
"read",
"(",
"offset",
",",
"ByteBuffer",
".",
"wrap",
"(",
"data"... | Read the contents of this FAT from the given device at the given offset.
@param offset the byte offset where to read the FAT from the device
@throws IOException on read error | [
"Read",
"the",
"contents",
"of",
"this",
"FAT",
"from",
"the",
"given",
"device",
"at",
"the",
"given",
"offset",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/Fat.java#L177-L183 |
7,540 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/Fat.java | Fat.writeCopy | public void writeCopy(long offset) throws IOException {
final byte[] data = new byte[sectorCount * sectorSize];
for (int index = 0; index < entries.length; index++) {
fatType.writeEntry(data, index, entries[index]);
}
device.write(offset, ByteBuffer.wrap(dat... | java | public void writeCopy(long offset) throws IOException {
final byte[] data = new byte[sectorCount * sectorSize];
for (int index = 0; index < entries.length; index++) {
fatType.writeEntry(data, index, entries[index]);
}
device.write(offset, ByteBuffer.wrap(dat... | [
"public",
"void",
"writeCopy",
"(",
"long",
"offset",
")",
"throws",
"IOException",
"{",
"final",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"sectorCount",
"*",
"sectorSize",
"]",
";",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
... | Write the contents of this FAT to the given device at the given offset.
@param offset the device offset where to write the FAT copy
@throws IOException on write error | [
"Write",
"the",
"contents",
"of",
"this",
"FAT",
"to",
"the",
"given",
"device",
"at",
"the",
"given",
"offset",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/Fat.java#L195-L203 |
7,541 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/Fat.java | Fat.getNextCluster | public long getNextCluster(long cluster) {
testCluster(cluster);
long entry = entries[(int) cluster];
if (isEofCluster(entry)) {
return -1;
} else {
return entry;
}
} | java | public long getNextCluster(long cluster) {
testCluster(cluster);
long entry = entries[(int) cluster];
if (isEofCluster(entry)) {
return -1;
} else {
return entry;
}
} | [
"public",
"long",
"getNextCluster",
"(",
"long",
"cluster",
")",
"{",
"testCluster",
"(",
"cluster",
")",
";",
"long",
"entry",
"=",
"entries",
"[",
"(",
"int",
")",
"cluster",
"]",
";",
"if",
"(",
"isEofCluster",
"(",
"entry",
")",
")",
"{",
"return",... | Gets the cluster after the given cluster
@param cluster
@return long The next cluster number or -1 which means eof. | [
"Gets",
"the",
"cluster",
"after",
"the",
"given",
"cluster"
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/Fat.java#L260-L268 |
7,542 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/Fat.java | Fat.allocNew | public long allocNew() throws IOException {
int i;
int entryIndex = -1;
for (i = lastAllocatedCluster; i < lastClusterIndex; i++) {
if (isFreeCluster(i)) {
entryIndex = i;
break;
}
}
if (entryIndex < 0) {
... | java | public long allocNew() throws IOException {
int i;
int entryIndex = -1;
for (i = lastAllocatedCluster; i < lastClusterIndex; i++) {
if (isFreeCluster(i)) {
entryIndex = i;
break;
}
}
if (entryIndex < 0) {
... | [
"public",
"long",
"allocNew",
"(",
")",
"throws",
"IOException",
"{",
"int",
"i",
";",
"int",
"entryIndex",
"=",
"-",
"1",
";",
"for",
"(",
"i",
"=",
"lastAllocatedCluster",
";",
"i",
"<",
"lastClusterIndex",
";",
"i",
"++",
")",
"{",
"if",
"(",
"isF... | Allocate a cluster for a new file
@return long the number of the newly allocated cluster
@throws IOException if there are no free clusters | [
"Allocate",
"a",
"cluster",
"for",
"a",
"new",
"file"
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/Fat.java#L276-L309 |
7,543 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/Fat.java | Fat.allocNew | public long[] allocNew(int nrClusters) throws IOException {
final long rc[] = new long[nrClusters];
rc[0] = allocNew();
for (int i = 1; i < nrClusters; i++) {
rc[i] = allocAppend(rc[i - 1]);
}
return rc;
} | java | public long[] allocNew(int nrClusters) throws IOException {
final long rc[] = new long[nrClusters];
rc[0] = allocNew();
for (int i = 1; i < nrClusters; i++) {
rc[i] = allocAppend(rc[i - 1]);
}
return rc;
} | [
"public",
"long",
"[",
"]",
"allocNew",
"(",
"int",
"nrClusters",
")",
"throws",
"IOException",
"{",
"final",
"long",
"rc",
"[",
"]",
"=",
"new",
"long",
"[",
"nrClusters",
"]",
";",
"rc",
"[",
"0",
"]",
"=",
"allocNew",
"(",
")",
";",
"for",
"(",
... | Allocate a series of clusters for a new file.
@param nrClusters when number of clusters to allocate
@return long
@throws IOException if there are no free clusters | [
"Allocate",
"a",
"series",
"of",
"clusters",
"for",
"a",
"new",
"file",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/Fat.java#L348-L357 |
7,544 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/Fat.java | Fat.allocAppend | public long allocAppend(long cluster)
throws IOException {
testCluster(cluster);
while (!isEofCluster(entries[(int) cluster])) {
cluster = entries[(int) cluster];
}
long newCluster = allocNew();
entries[(int) cluster] = newCluste... | java | public long allocAppend(long cluster)
throws IOException {
testCluster(cluster);
while (!isEofCluster(entries[(int) cluster])) {
cluster = entries[(int) cluster];
}
long newCluster = allocNew();
entries[(int) cluster] = newCluste... | [
"public",
"long",
"allocAppend",
"(",
"long",
"cluster",
")",
"throws",
"IOException",
"{",
"testCluster",
"(",
"cluster",
")",
";",
"while",
"(",
"!",
"isEofCluster",
"(",
"entries",
"[",
"(",
"int",
")",
"cluster",
"]",
")",
")",
"{",
"cluster",
"=",
... | Allocate a cluster to append to a new file
@param cluster a cluster from a chain where the new cluster should be
appended
@return long the newly allocated and appended cluster number
@throws IOException if there are no free clusters | [
"Allocate",
"a",
"cluster",
"to",
"append",
"to",
"a",
"new",
"file"
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/Fat.java#L367-L380 |
7,545 | rhiot/rhiot | gateway/components/camel-gpsd/src/main/java/io/rhiot/component/gpsd/GpsdHelper.java | GpsdHelper.consumeTPVObject | public static void consumeTPVObject(TPVObject tpv, Processor processor, GpsdEndpoint endpoint, ExceptionHandler exceptionHandler) {
// Simplify logging when https://github.com/taimos/GPSd4Java/pull/19 is merged into upstream.
LOG.debug("About to consume TPV object {},{} from {}", tpv.getLatitude(), tpv.... | java | public static void consumeTPVObject(TPVObject tpv, Processor processor, GpsdEndpoint endpoint, ExceptionHandler exceptionHandler) {
// Simplify logging when https://github.com/taimos/GPSd4Java/pull/19 is merged into upstream.
LOG.debug("About to consume TPV object {},{} from {}", tpv.getLatitude(), tpv.... | [
"public",
"static",
"void",
"consumeTPVObject",
"(",
"TPVObject",
"tpv",
",",
"Processor",
"processor",
",",
"GpsdEndpoint",
"endpoint",
",",
"ExceptionHandler",
"exceptionHandler",
")",
"{",
"// Simplify logging when https://github.com/taimos/GPSd4Java/pull/19 is merged into ups... | Process the TPVObject, all params required.
@param tpv The time-position-velocity object to process
@param processor Processor that handles the exchange.
@param endpoint GpsdEndpoint receiving the exchange. | [
"Process",
"the",
"TPVObject",
"all",
"params",
"required",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/gateway/components/camel-gpsd/src/main/java/io/rhiot/component/gpsd/GpsdHelper.java#L49-L66 |
7,546 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/data/SenBotReferenceService.java | SenBotReferenceService.namespaceString | public String namespaceString(String plainString) throws RuntimeException {
if(plainString.startsWith(NAME_SPACE_PREFIX)) {
return (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get()));
}
if(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {
if(cucumberManager.getCurr... | java | public String namespaceString(String plainString) throws RuntimeException {
if(plainString.startsWith(NAME_SPACE_PREFIX)) {
return (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get()));
}
if(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {
if(cucumberManager.getCurr... | [
"public",
"String",
"namespaceString",
"(",
"String",
"plainString",
")",
"throws",
"RuntimeException",
"{",
"if",
"(",
"plainString",
".",
"startsWith",
"(",
"NAME_SPACE_PREFIX",
")",
")",
"{",
"return",
"(",
"plainString",
".",
"replace",
"(",
"NAME_SPACE_PREFIX... | Extends the name space prefix with the actual name space
All tests that need to ensure privacy, i.e. no other test shall mess up their data, shall
use name spacing.
Data that can be messed up by other tests and there fore needs to be unique shall contain the name space prefix
that will be replaced at run time.
@param ... | [
"Extends",
"the",
"name",
"space",
"prefix",
"with",
"the",
"actual",
"name",
"space",
"All",
"tests",
"that",
"need",
"to",
"ensure",
"privacy",
"i",
".",
"e",
".",
"no",
"other",
"test",
"shall",
"mess",
"up",
"their",
"data",
"shall",
"use",
"name",
... | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/data/SenBotReferenceService.java#L243-L256 |
7,547 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java | ElementService.findExpectedElement | public WebElement findExpectedElement(By by, boolean includeHiddenElements) {
log.debug("findExpectedElement() called with: " + by);
waitForLoaders();
try {
WebElement foundElement = new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout())
.until(ExpectedConditions.presenceOfElementLocated(... | java | public WebElement findExpectedElement(By by, boolean includeHiddenElements) {
log.debug("findExpectedElement() called with: " + by);
waitForLoaders();
try {
WebElement foundElement = new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout())
.until(ExpectedConditions.presenceOfElementLocated(... | [
"public",
"WebElement",
"findExpectedElement",
"(",
"By",
"by",
",",
"boolean",
"includeHiddenElements",
")",
"{",
"log",
".",
"debug",
"(",
"\"findExpectedElement() called with: \"",
"+",
"by",
")",
";",
"waitForLoaders",
"(",
")",
";",
"try",
"{",
"WebElement",
... | Find an element that is expected to be on the page
@param by
- the {@link By} to find
@param includeHiddenElements
- should hidden elements on the page be included or not
@return the matched {@link WebElement}
@throws AssertionError
if no {@link WebElement} is found or the search times out | [
"Find",
"an",
"element",
"that",
"is",
"expected",
"to",
"be",
"on",
"the",
"page"
] | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java#L110-L136 |
7,548 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java | ElementService.findExpectedElements | public List<WebElement> findExpectedElements(By by) {
waitForLoaders();
try {
return new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout())
.until(ExpectedConditions.presenceOfAllElementsLocatedBy(by));
} catch (WebDriverException wde) {
log.error("Expected elements not found: ", wde);
... | java | public List<WebElement> findExpectedElements(By by) {
waitForLoaders();
try {
return new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout())
.until(ExpectedConditions.presenceOfAllElementsLocatedBy(by));
} catch (WebDriverException wde) {
log.error("Expected elements not found: ", wde);
... | [
"public",
"List",
"<",
"WebElement",
">",
"findExpectedElements",
"(",
"By",
"by",
")",
"{",
"waitForLoaders",
"(",
")",
";",
"try",
"{",
"return",
"new",
"WebDriverWait",
"(",
"getWebDriver",
"(",
")",
",",
"getSeleniumManager",
"(",
")",
".",
"getTimeout",... | Find all elements expected on the page
@param by
- the {@link By} to find
@return A list of the matched elements {List<@link WebElement>}
@throws AssertionError
if no {@link WebElement} is found or the search times out | [
"Find",
"all",
"elements",
"expected",
"on",
"the",
"page"
] | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java#L147-L158 |
7,549 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java | ElementService.getElementExists | public boolean getElementExists(By locator) {
waitForLoaders();
List<WebElement> foundElements = getWebDriver().findElements(locator);
return (foundElements.size() > 0);
} | java | public boolean getElementExists(By locator) {
waitForLoaders();
List<WebElement> foundElements = getWebDriver().findElements(locator);
return (foundElements.size() > 0);
} | [
"public",
"boolean",
"getElementExists",
"(",
"By",
"locator",
")",
"{",
"waitForLoaders",
"(",
")",
";",
"List",
"<",
"WebElement",
">",
"foundElements",
"=",
"getWebDriver",
"(",
")",
".",
"findElements",
"(",
"locator",
")",
";",
"return",
"(",
"foundElem... | Tells whether the passed element exists
@param locator {@link By} to be matched
@return true if the element exists | [
"Tells",
"whether",
"the",
"passed",
"element",
"exists"
] | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java#L261-L265 |
7,550 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java | ElementService.viewShouldNotShowElement | public void viewShouldNotShowElement(String viewName, String elementName) throws IllegalAccessException,
InterruptedException {
boolean pass = false;
long startOfLookup = System.currentTimeMillis();
int timeoutInMillies = getSeleniumManager().getTimeout() * 1000;
while (!pass) {
WebElement found = get... | java | public void viewShouldNotShowElement(String viewName, String elementName) throws IllegalAccessException,
InterruptedException {
boolean pass = false;
long startOfLookup = System.currentTimeMillis();
int timeoutInMillies = getSeleniumManager().getTimeout() * 1000;
while (!pass) {
WebElement found = get... | [
"public",
"void",
"viewShouldNotShowElement",
"(",
"String",
"viewName",
",",
"String",
"elementName",
")",
"throws",
"IllegalAccessException",
",",
"InterruptedException",
"{",
"boolean",
"pass",
"=",
"false",
";",
"long",
"startOfLookup",
"=",
"System",
".",
"curr... | The referenced view should not show the element identified by elementName
@param viewName
@param elementName
@throws IllegalAccessException
@throws InterruptedException | [
"The",
"referenced",
"view",
"should",
"not",
"show",
"the",
"element",
"identified",
"by",
"elementName"
] | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java#L488-L514 |
7,551 | rhiot/rhiot | lib/utils/src/main/java/io/rhiot/utils/geo/Geos.java | Geos.convertDdmCoordinatesToDecimal | public static double convertDdmCoordinatesToDecimal(String ddmCoordinate) {
checkArgument(isNotBlank(ddmCoordinate), "Coordinate to convert can't be null nor blank.");
int dotIndex = ddmCoordinate.indexOf('.');
double degrees = parseDouble(ddmCoordinate.substring(0, dotIndex - 2));
doub... | java | public static double convertDdmCoordinatesToDecimal(String ddmCoordinate) {
checkArgument(isNotBlank(ddmCoordinate), "Coordinate to convert can't be null nor blank.");
int dotIndex = ddmCoordinate.indexOf('.');
double degrees = parseDouble(ddmCoordinate.substring(0, dotIndex - 2));
doub... | [
"public",
"static",
"double",
"convertDdmCoordinatesToDecimal",
"(",
"String",
"ddmCoordinate",
")",
"{",
"checkArgument",
"(",
"isNotBlank",
"(",
"ddmCoordinate",
")",
",",
"\"Coordinate to convert can't be null nor blank.\"",
")",
";",
"int",
"dotIndex",
"=",
"ddmCoordi... | Converts Degrees Decimal Minutes GPS coordinate string into the decimal value.
@param ddmCoordinate Degrees Decimal Minutes GPS coordinate to convert. Can't be null nor blank.
@return GPS coordinates in decimal format | [
"Converts",
"Degrees",
"Decimal",
"Minutes",
"GPS",
"coordinate",
"string",
"into",
"the",
"decimal",
"value",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/lib/utils/src/main/java/io/rhiot/utils/geo/Geos.java#L39-L48 |
7,552 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/share/yaml/YamlUtils.java | YamlUtils.getYamlObjectValue | public static Map<String, Object> getYamlObjectValue(Map<String, Object> yamlObject,
String key, boolean allowsEmpty) throws YamlConvertException {
Object obj = getObjectValue(yamlObject, key, allowsEmpty);
@SuppressWarnings("unchecked")
Map<String, Object> result = (Map<String, Obje... | java | public static Map<String, Object> getYamlObjectValue(Map<String, Object> yamlObject,
String key, boolean allowsEmpty) throws YamlConvertException {
Object obj = getObjectValue(yamlObject, key, allowsEmpty);
@SuppressWarnings("unchecked")
Map<String, Object> result = (Map<String, Obje... | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"getYamlObjectValue",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"yamlObject",
",",
"String",
"key",
",",
"boolean",
"allowsEmpty",
")",
"throws",
"YamlConvertException",
"{",
"Object",
"obj",
... | returns null for empty | [
"returns",
"null",
"for",
"empty"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/share/yaml/YamlUtils.java#L187-L193 |
7,553 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/share/yaml/YamlUtils.java | YamlUtils.getYamlObjectValue | public static Map<String, Object> getYamlObjectValue(Map<String, Object> yamlObject,
String key) throws YamlConvertException {
return getYamlObjectValue(yamlObject, key, false);
} | java | public static Map<String, Object> getYamlObjectValue(Map<String, Object> yamlObject,
String key) throws YamlConvertException {
return getYamlObjectValue(yamlObject, key, false);
} | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"getYamlObjectValue",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"yamlObject",
",",
"String",
"key",
")",
"throws",
"YamlConvertException",
"{",
"return",
"getYamlObjectValue",
"(",
"yamlObject",
... | for null or not found, returns null | [
"for",
"null",
"or",
"not",
"found",
"returns",
"null"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/share/yaml/YamlUtils.java#L196-L199 |
7,554 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/share/yaml/YamlUtils.java | YamlUtils.getStrListValue | public static List<String> getStrListValue(Map<String, Object> yamlObject, String key,
boolean allowsEmpty) throws YamlConvertException {
Object obj = getObjectValue(yamlObject, key, allowsEmpty);
@SuppressWarnings("unchecked")
List<String> result = (List<String>) obj;
if (re... | java | public static List<String> getStrListValue(Map<String, Object> yamlObject, String key,
boolean allowsEmpty) throws YamlConvertException {
Object obj = getObjectValue(yamlObject, key, allowsEmpty);
@SuppressWarnings("unchecked")
List<String> result = (List<String>) obj;
if (re... | [
"public",
"static",
"List",
"<",
"String",
">",
"getStrListValue",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"yamlObject",
",",
"String",
"key",
",",
"boolean",
"allowsEmpty",
")",
"throws",
"YamlConvertException",
"{",
"Object",
"obj",
"=",
"getObjectVal... | for null or not found key, returns empty list | [
"for",
"null",
"or",
"not",
"found",
"key",
"returns",
"empty",
"list"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/share/yaml/YamlUtils.java#L202-L214 |
7,555 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/share/yaml/YamlUtils.java | YamlUtils.load | public static Map<String, Object> load(InputStream input) {
Yaml yaml = new Yaml();
Object rawYamlObj = yaml.load(input);
@SuppressWarnings("unchecked")
Map<String, Object> yamlObj = (Map<String, Object>) rawYamlObj;
return yamlObj;
} | java | public static Map<String, Object> load(InputStream input) {
Yaml yaml = new Yaml();
Object rawYamlObj = yaml.load(input);
@SuppressWarnings("unchecked")
Map<String, Object> yamlObj = (Map<String, Object>) rawYamlObj;
return yamlObj;
} | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"load",
"(",
"InputStream",
"input",
")",
"{",
"Yaml",
"yaml",
"=",
"new",
"Yaml",
"(",
")",
";",
"Object",
"rawYamlObj",
"=",
"yaml",
".",
"load",
"(",
"input",
")",
";",
"@",
"SuppressWa... | this method does not close the stream | [
"this",
"method",
"does",
"not",
"close",
"the",
"stream"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/share/yaml/YamlUtils.java#L279-L285 |
7,556 | protegeproject/sparql-dl-api | src/main/java/de/derivo/sparqldlapi/Query.java | Query.create | public static Query create(String query)
throws QueryParserException
{
QueryTokenizer tokenizer = new QueryTokenizerImpl();
QueryParser parser = new QueryParserImpl();
return parser.parse(tokenizer.tokenize(query));
} | java | public static Query create(String query)
throws QueryParserException
{
QueryTokenizer tokenizer = new QueryTokenizerImpl();
QueryParser parser = new QueryParserImpl();
return parser.parse(tokenizer.tokenize(query));
} | [
"public",
"static",
"Query",
"create",
"(",
"String",
"query",
")",
"throws",
"QueryParserException",
"{",
"QueryTokenizer",
"tokenizer",
"=",
"new",
"QueryTokenizerImpl",
"(",
")",
";",
"QueryParser",
"parser",
"=",
"new",
"QueryParserImpl",
"(",
")",
";",
"ret... | A factory method to create a query from string.
@param query
@return
@throws QueryParserException | [
"A",
"factory",
"method",
"to",
"create",
"a",
"query",
"from",
"string",
"."
] | 80d430d439e17a691d0111819af2d3613e28d625 | https://github.com/protegeproject/sparql-dl-api/blob/80d430d439e17a691d0111819af2d3613e28d625/src/main/java/de/derivo/sparqldlapi/Query.java#L100-L107 |
7,557 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/Fat16BootSector.java | Fat16BootSector.getVolumeLabel | public String getVolumeLabel() {
final StringBuilder sb = new StringBuilder();
for (int i=0; i < MAX_VOLUME_LABEL_LENGTH; i++) {
final char c = (char) get8(VOLUME_LABEL_OFFSET + i);
if (c != 0) {
sb.append(c);
} else {
break;
... | java | public String getVolumeLabel() {
final StringBuilder sb = new StringBuilder();
for (int i=0; i < MAX_VOLUME_LABEL_LENGTH; i++) {
final char c = (char) get8(VOLUME_LABEL_OFFSET + i);
if (c != 0) {
sb.append(c);
} else {
break;
... | [
"public",
"String",
"getVolumeLabel",
"(",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"MAX_VOLUME_LABEL_LENGTH",
";",
"i",
"++",
")",
"{",
"final",
"char",
"c",... | Returns the volume label that is stored in this boot sector.
@return the volume label | [
"Returns",
"the",
"volume",
"label",
"that",
"is",
"stored",
"in",
"this",
"boot",
"sector",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/Fat16BootSector.java#L102-L116 |
7,558 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/Fat16BootSector.java | Fat16BootSector.setVolumeLabel | public void setVolumeLabel(String label) throws IllegalArgumentException {
if (label.length() > MAX_VOLUME_LABEL_LENGTH)
throw new IllegalArgumentException("volume label too long");
for (int i = 0; i < MAX_VOLUME_LABEL_LENGTH; i++) {
set8(VOLUME_LABEL_OFFSET + i,
... | java | public void setVolumeLabel(String label) throws IllegalArgumentException {
if (label.length() > MAX_VOLUME_LABEL_LENGTH)
throw new IllegalArgumentException("volume label too long");
for (int i = 0; i < MAX_VOLUME_LABEL_LENGTH; i++) {
set8(VOLUME_LABEL_OFFSET + i,
... | [
"public",
"void",
"setVolumeLabel",
"(",
"String",
"label",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"label",
".",
"length",
"(",
")",
">",
"MAX_VOLUME_LABEL_LENGTH",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"volume label too long\"",
... | Sets the volume label that is stored in this boot sector.
@param label the new volume label
@throws IllegalArgumentException if the specified label is longer
than {@link #MAX_VOLUME_LABEL_LENGTH} | [
"Sets",
"the",
"volume",
"label",
"that",
"is",
"stored",
"in",
"this",
"boot",
"sector",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/Fat16BootSector.java#L125-L133 |
7,559 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/Fat16BootSector.java | Fat16BootSector.setRootDirEntryCount | public void setRootDirEntryCount(int v) throws IllegalArgumentException {
if (v < 0) throw new IllegalArgumentException();
if (v == getRootDirEntryCount()) return;
set16(ROOT_DIR_ENTRIES_OFFSET, v);
} | java | public void setRootDirEntryCount(int v) throws IllegalArgumentException {
if (v < 0) throw new IllegalArgumentException();
if (v == getRootDirEntryCount()) return;
set16(ROOT_DIR_ENTRIES_OFFSET, v);
} | [
"public",
"void",
"setRootDirEntryCount",
"(",
"int",
"v",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"v",
"<",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"if",
"(",
"v",
"==",
"getRootDirEntryCount",
"(",
")",
")",
... | Sets the number of entries in the root directory
@param v the new number of entries in the root directory
@throws IllegalArgumentException for negative values | [
"Sets",
"the",
"number",
"of",
"entries",
"in",
"the",
"root",
"directory"
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/Fat16BootSector.java#L208-L213 |
7,560 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/AbstractDirectory.java | AbstractDirectory.setEntries | public void setEntries(List<FatDirectoryEntry> newEntries) {
if (newEntries.size() > capacity)
throw new IllegalArgumentException("too many entries");
this.entries.clear();
this.entries.addAll(newEntries);
} | java | public void setEntries(List<FatDirectoryEntry> newEntries) {
if (newEntries.size() > capacity)
throw new IllegalArgumentException("too many entries");
this.entries.clear();
this.entries.addAll(newEntries);
} | [
"public",
"void",
"setEntries",
"(",
"List",
"<",
"FatDirectoryEntry",
">",
"newEntries",
")",
"{",
"if",
"(",
"newEntries",
".",
"size",
"(",
")",
">",
"capacity",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"too many entries\"",
")",
";",
"this",... | Replaces all entries in this directory.
@param newEntries the new directory entries | [
"Replaces",
"all",
"entries",
"in",
"this",
"directory",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/AbstractDirectory.java#L118-L124 |
7,561 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/AbstractDirectory.java | AbstractDirectory.flush | public void flush() throws IOException {
final ByteBuffer data = ByteBuffer.allocate(
getCapacity() * FatDirectoryEntry.SIZE + (volumeLabel != null ? FatDirectoryEntry.SIZE : 0));
for (FatDirectoryEntry entry : this.entries) {
if (entry != null) {
... | java | public void flush() throws IOException {
final ByteBuffer data = ByteBuffer.allocate(
getCapacity() * FatDirectoryEntry.SIZE + (volumeLabel != null ? FatDirectoryEntry.SIZE : 0));
for (FatDirectoryEntry entry : this.entries) {
if (entry != null) {
... | [
"public",
"void",
"flush",
"(",
")",
"throws",
"IOException",
"{",
"final",
"ByteBuffer",
"data",
"=",
"ByteBuffer",
".",
"allocate",
"(",
"getCapacity",
"(",
")",
"*",
"FatDirectoryEntry",
".",
"SIZE",
"+",
"(",
"volumeLabel",
"!=",
"null",
"?",
"FatDirecto... | Flush the contents of this directory to the persistent storage | [
"Flush",
"the",
"contents",
"of",
"this",
"directory",
"to",
"the",
"persistent",
"storage"
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/AbstractDirectory.java#L214-L242 |
7,562 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/AbstractDirectory.java | AbstractDirectory.setLabel | public void setLabel(String label) throws IllegalArgumentException,
UnsupportedOperationException, IOException {
checkRoot();
if (label != null && label.length() > MAX_LABEL_LENGTH) throw new
IllegalArgumentException("label too long");
if (this.volumeLabel != null)... | java | public void setLabel(String label) throws IllegalArgumentException,
UnsupportedOperationException, IOException {
checkRoot();
if (label != null && label.length() > MAX_LABEL_LENGTH) throw new
IllegalArgumentException("label too long");
if (this.volumeLabel != null)... | [
"public",
"void",
"setLabel",
"(",
"String",
"label",
")",
"throws",
"IllegalArgumentException",
",",
"UnsupportedOperationException",
",",
"IOException",
"{",
"checkRoot",
"(",
")",
";",
"if",
"(",
"label",
"!=",
"null",
"&&",
"label",
".",
"length",
"(",
")"... | Sets the volume label that is stored in this directory. Setting the
volume label is supported on the root directory only.
@param label the new volume label
@throws IllegalArgumentException if the label is too long
@throws UnsupportedOperationException if this is not a root directory
@see #isRoot() | [
"Sets",
"the",
"volume",
"label",
"that",
"is",
"stored",
"in",
"this",
"directory",
".",
"Setting",
"the",
"volume",
"label",
"is",
"supported",
"on",
"the",
"root",
"directory",
"only",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/AbstractDirectory.java#L357-L382 |
7,563 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/BootSector.java | BootSector.getFileSystemTypeLabel | public String getFileSystemTypeLabel() {
final StringBuilder sb = new StringBuilder(FILE_SYSTEM_TYPE_LENGTH);
for (int i=0; i < FILE_SYSTEM_TYPE_LENGTH; i++) {
sb.append ((char) get8(getFileSystemTypeLabelOffset() + i));
}
return sb.toString();
} | java | public String getFileSystemTypeLabel() {
final StringBuilder sb = new StringBuilder(FILE_SYSTEM_TYPE_LENGTH);
for (int i=0; i < FILE_SYSTEM_TYPE_LENGTH; i++) {
sb.append ((char) get8(getFileSystemTypeLabelOffset() + i));
}
return sb.toString();
} | [
"public",
"String",
"getFileSystemTypeLabel",
"(",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"FILE_SYSTEM_TYPE_LENGTH",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"FILE_SYSTEM_TYPE_LENGTH",
";",
"i",
"++",
")... | Returns the file system type label string.
@return the file system type string
@see #setFileSystemTypeLabel(java.lang.String)
@see #getFileSystemTypeLabelOffset()
@see #FILE_SYSTEM_TYPE_LENGTH | [
"Returns",
"the",
"file",
"system",
"type",
"label",
"string",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/BootSector.java#L234-L242 |
7,564 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/BootSector.java | BootSector.getOemName | public String getOemName() {
StringBuilder b = new StringBuilder(8);
for (int i = 0; i < 8; i++) {
int v = get8(0x3 + i);
if (v == 0) break;
b.append((char) v);
}
return b.toString();
} | java | public String getOemName() {
StringBuilder b = new StringBuilder(8);
for (int i = 0; i < 8; i++) {
int v = get8(0x3 + i);
if (v == 0) break;
b.append((char) v);
}
return b.toString();
} | [
"public",
"String",
"getOemName",
"(",
")",
"{",
"StringBuilder",
"b",
"=",
"new",
"StringBuilder",
"(",
"8",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"8",
";",
"i",
"++",
")",
"{",
"int",
"v",
"=",
"get8",
"(",
"0x3",
"+",
... | Gets the OEM name
@return String | [
"Gets",
"the",
"OEM",
"name"
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/BootSector.java#L289-L299 |
7,565 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/BootSector.java | BootSector.setOemName | public void setOemName(String name) {
if (name.length() > 8) throw new IllegalArgumentException(
"only 8 characters are allowed");
for (int i = 0; i < 8; i++) {
char ch;
if (i < name.length()) {
ch = name.charAt(i);
} else {
... | java | public void setOemName(String name) {
if (name.length() > 8) throw new IllegalArgumentException(
"only 8 characters are allowed");
for (int i = 0; i < 8; i++) {
char ch;
if (i < name.length()) {
ch = name.charAt(i);
} else {
... | [
"public",
"void",
"setOemName",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"name",
".",
"length",
"(",
")",
">",
"8",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"only 8 characters are allowed\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
... | Sets the OEM name, must be at most 8 characters long.
@param name the new OEM name | [
"Sets",
"the",
"OEM",
"name",
"must",
"be",
"at",
"most",
"8",
"characters",
"long",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/BootSector.java#L307-L321 |
7,566 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/share/CommonUtils.java | CommonUtils.compare | public static int compare(String left, String right) {
if (left == null) {
if (right == null) {
return 0;
} else {
return 1; // nulls last
}
} else if (right == null) {
return -1; // nulls last
}
return left.... | java | public static int compare(String left, String right) {
if (left == null) {
if (right == null) {
return 0;
} else {
return 1; // nulls last
}
} else if (right == null) {
return -1; // nulls last
}
return left.... | [
"public",
"static",
"int",
"compare",
"(",
"String",
"left",
",",
"String",
"right",
")",
"{",
"if",
"(",
"left",
"==",
"null",
")",
"{",
"if",
"(",
"right",
"==",
"null",
")",
"{",
"return",
"0",
";",
"}",
"else",
"{",
"return",
"1",
";",
"// nu... | 0 if equals | [
"0",
"if",
"equals"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/share/CommonUtils.java#L32-L43 |
7,567 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/share/CommonUtils.java | CommonUtils.encodeToSafeAsciiFileNameString | public static String encodeToSafeAsciiFileNameString(String str, Charset strCharset) {
if (str == null) {
return str;
}
if (!SAFE_ASCII_PATTERN.matcher(str).matches()) {
return calcSHA1Digest(str, strCharset);
}
// encode again since if str is SHA1 digest
... | java | public static String encodeToSafeAsciiFileNameString(String str, Charset strCharset) {
if (str == null) {
return str;
}
if (!SAFE_ASCII_PATTERN.matcher(str).matches()) {
return calcSHA1Digest(str, strCharset);
}
// encode again since if str is SHA1 digest
... | [
"public",
"static",
"String",
"encodeToSafeAsciiFileNameString",
"(",
"String",
"str",
",",
"Charset",
"strCharset",
")",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"{",
"return",
"str",
";",
"}",
"if",
"(",
"!",
"SAFE_ASCII_PATTERN",
".",
"matcher",
"(",
"... | - character which will be encoded by URL encoding | [
"-",
"character",
"which",
"will",
"be",
"encoded",
"by",
"URL",
"encoding"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/share/CommonUtils.java#L139-L152 |
7,568 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/share/CommonUtils.java | CommonUtils.readManifestFromExternalJar | public static Manifest readManifestFromExternalJar(File jarFile) {
if (!jarFile.getName().endsWith(".jar")) {
throw new IllegalArgumentException("not jar file : " + jarFile);
}
InputStream in = null;
String urlStr = "jar:file:" + jarFile.getAbsolutePath() + "!/META-INF/MANIFE... | java | public static Manifest readManifestFromExternalJar(File jarFile) {
if (!jarFile.getName().endsWith(".jar")) {
throw new IllegalArgumentException("not jar file : " + jarFile);
}
InputStream in = null;
String urlStr = "jar:file:" + jarFile.getAbsolutePath() + "!/META-INF/MANIFE... | [
"public",
"static",
"Manifest",
"readManifestFromExternalJar",
"(",
"File",
"jarFile",
")",
"{",
"if",
"(",
"!",
"jarFile",
".",
"getName",
"(",
")",
".",
"endsWith",
"(",
"\".jar\"",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"not jar f... | returns null if no manifest found | [
"returns",
"null",
"if",
"no",
"manifest",
"found"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/share/CommonUtils.java#L155-L173 |
7,569 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/CucumberReportingExtension.java | CucumberReportingExtension.afterScenario | @After
public void afterScenario(Scenario scenario) throws InterruptedException {
log.debug("Scenarion finished");
ScenarioGlobals scenarioGlobals = getCucumberManager().getCurrentScenarioGlobals();
TestEnvironment testNev = getSeleniumManager().getAssociatedTestEnvironment();
if (testNev ... | java | @After
public void afterScenario(Scenario scenario) throws InterruptedException {
log.debug("Scenarion finished");
ScenarioGlobals scenarioGlobals = getCucumberManager().getCurrentScenarioGlobals();
TestEnvironment testNev = getSeleniumManager().getAssociatedTestEnvironment();
if (testNev ... | [
"@",
"After",
"public",
"void",
"afterScenario",
"(",
"Scenario",
"scenario",
")",
"throws",
"InterruptedException",
"{",
"log",
".",
"debug",
"(",
"\"Scenarion finished\"",
")",
";",
"ScenarioGlobals",
"scenarioGlobals",
"=",
"getCucumberManager",
"(",
")",
".",
... | Capture a selenium screenshot when a test fails and add it to the Cucumber generated report
if the scenario has accessed selenium in its lifetime
@throws InterruptedException | [
"Capture",
"a",
"selenium",
"screenshot",
"when",
"a",
"test",
"fails",
"and",
"add",
"it",
"to",
"the",
"Cucumber",
"generated",
"report",
"if",
"the",
"scenario",
"has",
"accessed",
"selenium",
"in",
"its",
"lifetime"
] | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/CucumberReportingExtension.java#L40-L57 |
7,570 | rhiot/rhiot | gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamEndpoint.java | WebcamEndpoint.getDefaultResolution | private Dimension getDefaultResolution() {
if (getResolution() != null) {
WebcamResolution res = WebcamResolution.valueOf(getResolution());
return res.getSize();
} else {
return new Dimension(getWidth(), getHeight());
}
} | java | private Dimension getDefaultResolution() {
if (getResolution() != null) {
WebcamResolution res = WebcamResolution.valueOf(getResolution());
return res.getSize();
} else {
return new Dimension(getWidth(), getHeight());
}
} | [
"private",
"Dimension",
"getDefaultResolution",
"(",
")",
"{",
"if",
"(",
"getResolution",
"(",
")",
"!=",
"null",
")",
"{",
"WebcamResolution",
"res",
"=",
"WebcamResolution",
".",
"valueOf",
"(",
"getResolution",
"(",
")",
")",
";",
"return",
"res",
".",
... | Returns the default resolution by name if provided, eg HD720, otherwise the width and height. | [
"Returns",
"the",
"default",
"resolution",
"by",
"name",
"if",
"provided",
"eg",
"HD720",
"otherwise",
"the",
"width",
"and",
"height",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamEndpoint.java#L100-L107 |
7,571 | rhiot/rhiot | gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamHelper.java | WebcamHelper.createOutOnlyExchangeWithBodyAndHeaders | static Exchange createOutOnlyExchangeWithBodyAndHeaders(WebcamEndpoint endpoint, BufferedImage image) throws IOException {
Exchange exchange = endpoint.createExchange(ExchangePattern.OutOnly);
Message message = exchange.getIn();
try (ByteArrayOutputStream output = new ByteArrayOutputStream()) {
... | java | static Exchange createOutOnlyExchangeWithBodyAndHeaders(WebcamEndpoint endpoint, BufferedImage image) throws IOException {
Exchange exchange = endpoint.createExchange(ExchangePattern.OutOnly);
Message message = exchange.getIn();
try (ByteArrayOutputStream output = new ByteArrayOutputStream()) {
... | [
"static",
"Exchange",
"createOutOnlyExchangeWithBodyAndHeaders",
"(",
"WebcamEndpoint",
"endpoint",
",",
"BufferedImage",
"image",
")",
"throws",
"IOException",
"{",
"Exchange",
"exchange",
"=",
"endpoint",
".",
"createExchange",
"(",
"ExchangePattern",
".",
"OutOnly",
... | Creates an OutOnly exchange with the BufferedImage. | [
"Creates",
"an",
"OutOnly",
"exchange",
"with",
"the",
"BufferedImage",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamHelper.java#L47-L57 |
7,572 | rhiot/rhiot | gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamHelper.java | WebcamHelper.consumeBufferedImage | public static void consumeBufferedImage(BufferedImage image, Processor processor, WebcamEndpoint endpoint, ExceptionHandler exceptionHandler) {
Validate.notNull(image);
Validate.notNull(processor);
Validate.notNull(endpoint);
try {
Exchange exchange = createOutOnlyEx... | java | public static void consumeBufferedImage(BufferedImage image, Processor processor, WebcamEndpoint endpoint, ExceptionHandler exceptionHandler) {
Validate.notNull(image);
Validate.notNull(processor);
Validate.notNull(endpoint);
try {
Exchange exchange = createOutOnlyEx... | [
"public",
"static",
"void",
"consumeBufferedImage",
"(",
"BufferedImage",
"image",
",",
"Processor",
"processor",
",",
"WebcamEndpoint",
"endpoint",
",",
"ExceptionHandler",
"exceptionHandler",
")",
"{",
"Validate",
".",
"notNull",
"(",
"image",
")",
";",
"Validate"... | Consume the java.awt.BufferedImage from the webcam, all params required.
@param image The image to process.
@param processor Processor that handles the exchange.
@param endpoint WebcamEndpoint receiving the exchange. | [
"Consume",
"the",
"java",
".",
"awt",
".",
"BufferedImage",
"from",
"the",
"webcam",
"all",
"params",
"required",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamHelper.java#L66-L77 |
7,573 | rhiot/rhiot | gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamHelper.java | WebcamHelper.consumeWebcamMotionEvent | public static void consumeWebcamMotionEvent(WebcamMotionEvent motionEvent, Processor processor, WebcamEndpoint endpoint, ExceptionHandler exceptionHandler){
Validate.notNull(motionEvent);
Validate.notNull(processor);
Validate.notNull(endpoint);
try {
Exchange exchange = crea... | java | public static void consumeWebcamMotionEvent(WebcamMotionEvent motionEvent, Processor processor, WebcamEndpoint endpoint, ExceptionHandler exceptionHandler){
Validate.notNull(motionEvent);
Validate.notNull(processor);
Validate.notNull(endpoint);
try {
Exchange exchange = crea... | [
"public",
"static",
"void",
"consumeWebcamMotionEvent",
"(",
"WebcamMotionEvent",
"motionEvent",
",",
"Processor",
"processor",
",",
"WebcamEndpoint",
"endpoint",
",",
"ExceptionHandler",
"exceptionHandler",
")",
"{",
"Validate",
".",
"notNull",
"(",
"motionEvent",
")",... | Consume the motion event from the webcam, all params required.
The event is stored in the header while the latest image is available as the body.
@param motionEvent The motion event that triggered.
@param processor Processor that handles the exchange.
@param endpoint WebcamEndpoint receiving the exchange. | [
"Consume",
"the",
"motion",
"event",
"from",
"the",
"webcam",
"all",
"params",
"required",
".",
"The",
"event",
"is",
"stored",
"in",
"the",
"header",
"while",
"the",
"latest",
"image",
"is",
"available",
"as",
"the",
"body",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamHelper.java#L87-L99 |
7,574 | rhiot/rhiot | gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamHelper.java | WebcamHelper.isWebcamPresent | public static boolean isWebcamPresent(){
try {
Webcam.getDefault(WebcamConstants.DEFAULT_WEBCAM_LOOKUP_TIMEOUT);
return true;
} catch (Throwable exception) {
LOG.debug("Problem occurred when detecting the webcam. Returning false.", exception);
return false... | java | public static boolean isWebcamPresent(){
try {
Webcam.getDefault(WebcamConstants.DEFAULT_WEBCAM_LOOKUP_TIMEOUT);
return true;
} catch (Throwable exception) {
LOG.debug("Problem occurred when detecting the webcam. Returning false.", exception);
return false... | [
"public",
"static",
"boolean",
"isWebcamPresent",
"(",
")",
"{",
"try",
"{",
"Webcam",
".",
"getDefault",
"(",
"WebcamConstants",
".",
"DEFAULT_WEBCAM_LOOKUP_TIMEOUT",
")",
";",
"return",
"true",
";",
"}",
"catch",
"(",
"Throwable",
"exception",
")",
"{",
"LOG... | Returns true if there's a webcam available, false otherwise. | [
"Returns",
"true",
"if",
"there",
"s",
"a",
"webcam",
"available",
"false",
"otherwise",
"."
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/gateway/components/camel-webcam/src/main/java/io/rhiot/gateway/camel/webcam/WebcamHelper.java#L104-L112 |
7,575 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/ShortNameGenerator.java | ShortNameGenerator.generateShortName | public ShortName generateShortName(String longFullName)
throws IllegalStateException {
longFullName =
stripLeadingPeriods(longFullName).toUpperCase(Locale.ROOT);
final String longName;
final String longExt;
final int dotIdx = longFullName.las... | java | public ShortName generateShortName(String longFullName)
throws IllegalStateException {
longFullName =
stripLeadingPeriods(longFullName).toUpperCase(Locale.ROOT);
final String longName;
final String longExt;
final int dotIdx = longFullName.las... | [
"public",
"ShortName",
"generateShortName",
"(",
"String",
"longFullName",
")",
"throws",
"IllegalStateException",
"{",
"longFullName",
"=",
"stripLeadingPeriods",
"(",
"longFullName",
")",
".",
"toUpperCase",
"(",
"Locale",
".",
"ROOT",
")",
";",
"final",
"String",... | Generates a new unique 8.3 file name that is not already contained in
the set specified to the constructor.
@param longFullName the long file name to generate the short name for
@return the generated 8.3 file name
@throws IllegalStateException if no unused short name could be found | [
"Generates",
"a",
"new",
"unique",
"8",
".",
"3",
"file",
"name",
"that",
"is",
"not",
"already",
"contained",
"in",
"the",
"set",
"specified",
"to",
"the",
"constructor",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/ShortNameGenerator.java#L116-L171 |
7,576 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/context/CucumberManager.java | CucumberManager.stopNewScenario | public ScenarioGlobals stopNewScenario() {
if(scenarioCreationHook != null) {
scenarioCreationHook.scenarionShutdown(getCurrentScenarioGlobals());
}
return scenarioGlobalsMap.remove(Thread.currentThread());
} | java | public ScenarioGlobals stopNewScenario() {
if(scenarioCreationHook != null) {
scenarioCreationHook.scenarionShutdown(getCurrentScenarioGlobals());
}
return scenarioGlobalsMap.remove(Thread.currentThread());
} | [
"public",
"ScenarioGlobals",
"stopNewScenario",
"(",
")",
"{",
"if",
"(",
"scenarioCreationHook",
"!=",
"null",
")",
"{",
"scenarioCreationHook",
".",
"scenarionShutdown",
"(",
"getCurrentScenarioGlobals",
"(",
")",
")",
";",
"}",
"return",
"scenarioGlobalsMap",
"."... | Called at the end of an scenario?
@return {@link ScenarioGlobals} | [
"Called",
"at",
"the",
"end",
"of",
"an",
"scenario?"
] | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/context/CucumberManager.java#L123-L128 |
7,577 | protegeproject/sparql-dl-api | src/main/java/de/derivo/sparqldlapi/impl/QueryResultImpl.java | QueryResultImpl.iterator | public Iterator<QueryBinding> iterator()
{
List<QueryBinding> iBindings = new ArrayList<QueryBinding>();
for(QueryBindingImpl b : bindings) {
iBindings.add(b);
}
return iBindings.iterator();
} | java | public Iterator<QueryBinding> iterator()
{
List<QueryBinding> iBindings = new ArrayList<QueryBinding>();
for(QueryBindingImpl b : bindings) {
iBindings.add(b);
}
return iBindings.iterator();
} | [
"public",
"Iterator",
"<",
"QueryBinding",
">",
"iterator",
"(",
")",
"{",
"List",
"<",
"QueryBinding",
">",
"iBindings",
"=",
"new",
"ArrayList",
"<",
"QueryBinding",
">",
"(",
")",
";",
"for",
"(",
"QueryBindingImpl",
"b",
":",
"bindings",
")",
"{",
"i... | An iterator over the result set.
@return | [
"An",
"iterator",
"over",
"the",
"result",
"set",
"."
] | 80d430d439e17a691d0111819af2d3613e28d625 | https://github.com/protegeproject/sparql-dl-api/blob/80d430d439e17a691d0111819af2d3613e28d625/src/main/java/de/derivo/sparqldlapi/impl/QueryResultImpl.java#L87-L94 |
7,578 | protegeproject/sparql-dl-api | src/main/java/de/derivo/sparqldlapi/QueryEngine.java | QueryEngine.create | public static QueryEngine create(OWLOntologyManager manager, OWLReasoner reasoner, boolean strict)
{
return new QueryEngineImpl(manager, reasoner, strict);
} | java | public static QueryEngine create(OWLOntologyManager manager, OWLReasoner reasoner, boolean strict)
{
return new QueryEngineImpl(manager, reasoner, strict);
} | [
"public",
"static",
"QueryEngine",
"create",
"(",
"OWLOntologyManager",
"manager",
",",
"OWLReasoner",
"reasoner",
",",
"boolean",
"strict",
")",
"{",
"return",
"new",
"QueryEngineImpl",
"(",
"manager",
",",
"reasoner",
",",
"strict",
")",
";",
"}"
] | Factory method to create a QueryEngine instance.
@param manager An OWLOntologyManager instance of OWLAPI v3
@param reasoner An OWLReasoner instance.
@param strictMode If strict mode is enabled the query engine will throw a QueryEngineException if data types withing the query are not correct (e.g. Class(URI_OF_AN_INDIV... | [
"Factory",
"method",
"to",
"create",
"a",
"QueryEngine",
"instance",
"."
] | 80d430d439e17a691d0111819af2d3613e28d625 | https://github.com/protegeproject/sparql-dl-api/blob/80d430d439e17a691d0111819af2d3613e28d625/src/main/java/de/derivo/sparqldlapi/QueryEngine.java#L40-L43 |
7,579 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/HookMethodDef.java | HookMethodDef.initialize | public static void initialize(String configFilePath) {
if (manager != null) {
return;
}
logger.info("initialize");
final Config config;
try {
config = JavaConfig.generateFromYamlConfig(new File(configFilePath));
} catch (YamlConvertException e) {... | java | public static void initialize(String configFilePath) {
if (manager != null) {
return;
}
logger.info("initialize");
final Config config;
try {
config = JavaConfig.generateFromYamlConfig(new File(configFilePath));
} catch (YamlConvertException e) {... | [
"public",
"static",
"void",
"initialize",
"(",
"String",
"configFilePath",
")",
"{",
"if",
"(",
"manager",
"!=",
"null",
")",
"{",
"return",
";",
"}",
"logger",
".",
"info",
"(",
"\"initialize\"",
")",
";",
"final",
"Config",
"config",
";",
"try",
"{",
... | if called multiple times, just ignored | [
"if",
"called",
"multiple",
"times",
"just",
"ignored"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/HookMethodDef.java#L24-L69 |
7,580 | rhiot/rhiot | cloudplatform/service/device-api/src/main/java/io/rhiot/cloudplatform/service/device/api/DeviceConstants.java | DeviceConstants.readDeviceMetric | public static String readDeviceMetric(String deviceId, String metric) {
return format("%s.%s.%s", CHANNEL_DEVICE_METRICS_READ, deviceId, metric);
} | java | public static String readDeviceMetric(String deviceId, String metric) {
return format("%s.%s.%s", CHANNEL_DEVICE_METRICS_READ, deviceId, metric);
} | [
"public",
"static",
"String",
"readDeviceMetric",
"(",
"String",
"deviceId",
",",
"String",
"metric",
")",
"{",
"return",
"format",
"(",
"\"%s.%s.%s\"",
",",
"CHANNEL_DEVICE_METRICS_READ",
",",
"deviceId",
",",
"metric",
")",
";",
"}"
] | Device metrics channel helpers | [
"Device",
"metrics",
"channel",
"helpers"
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/cloudplatform/service/device-api/src/main/java/io/rhiot/cloudplatform/service/device/api/DeviceConstants.java#L93-L95 |
7,581 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/NavigationService.java | NavigationService.clickElementWithAttributeValue | public void clickElementWithAttributeValue(String attributeName, String attributeValue) {
By xpath = By.xpath("//*[@" + attributeName + "='" + attributeValue + "']");
WebElement element = seleniumElementService.findExpectedElement(xpath);
assertTrue("The element you are trying to click (" + xpat... | java | public void clickElementWithAttributeValue(String attributeName, String attributeValue) {
By xpath = By.xpath("//*[@" + attributeName + "='" + attributeValue + "']");
WebElement element = seleniumElementService.findExpectedElement(xpath);
assertTrue("The element you are trying to click (" + xpat... | [
"public",
"void",
"clickElementWithAttributeValue",
"(",
"String",
"attributeName",
",",
"String",
"attributeValue",
")",
"{",
"By",
"xpath",
"=",
"By",
".",
"xpath",
"(",
"\"//*[@\"",
"+",
"attributeName",
"+",
"\"='\"",
"+",
"attributeValue",
"+",
"\"']\"",
")... | Find a Element that has a attribute with a certain value and click it
@param attributeName
@param attributeValue | [
"Find",
"a",
"Element",
"that",
"has",
"a",
"attribute",
"with",
"a",
"certain",
"value",
"and",
"click",
"it"
] | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/NavigationService.java#L90-L95 |
7,582 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/NavigationService.java | NavigationService.isInitialPageRequested | public boolean isInitialPageRequested() {
String currentUrl = getWebDriver().getCurrentUrl();
if (StringUtils.isBlank(currentUrl) ||
(
!currentUrl.toLowerCase().startsWith("http") &&
!currentUrl.toLowerCase().startsWith("file")
)
) {
retur... | java | public boolean isInitialPageRequested() {
String currentUrl = getWebDriver().getCurrentUrl();
if (StringUtils.isBlank(currentUrl) ||
(
!currentUrl.toLowerCase().startsWith("http") &&
!currentUrl.toLowerCase().startsWith("file")
)
) {
retur... | [
"public",
"boolean",
"isInitialPageRequested",
"(",
")",
"{",
"String",
"currentUrl",
"=",
"getWebDriver",
"(",
")",
".",
"getCurrentUrl",
"(",
")",
";",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"currentUrl",
")",
"||",
"(",
"!",
"currentUrl",
".",
"... | Has a page been requested for this selenium session. This method is available to prevent scripts for waiting for a cetrain condition
if no url has been requested yet. If true you know you can just proceed and not check for any state as none exists
@return {@link Boolean} | [
"Has",
"a",
"page",
"been",
"requested",
"for",
"this",
"selenium",
"session",
".",
"This",
"method",
"is",
"available",
"to",
"prevent",
"scripts",
"for",
"waiting",
"for",
"a",
"cetrain",
"condition",
"if",
"no",
"url",
"has",
"been",
"requested",
"yet",
... | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/NavigationService.java#L123-L135 |
7,583 | gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/NavigationService.java | NavigationService.mouseHoverOverElement | public void mouseHoverOverElement(By locator) {
SynchronisationService synchronisationService = new SynchronisationService();
synchronisationService.waitAndAssertForExpectedCondition(ExpectedConditions.visibilityOfElementLocated(locator));
WebElement element = getWebDriver().findElement(locato... | java | public void mouseHoverOverElement(By locator) {
SynchronisationService synchronisationService = new SynchronisationService();
synchronisationService.waitAndAssertForExpectedCondition(ExpectedConditions.visibilityOfElementLocated(locator));
WebElement element = getWebDriver().findElement(locato... | [
"public",
"void",
"mouseHoverOverElement",
"(",
"By",
"locator",
")",
"{",
"SynchronisationService",
"synchronisationService",
"=",
"new",
"SynchronisationService",
"(",
")",
";",
"synchronisationService",
".",
"waitAndAssertForExpectedCondition",
"(",
"ExpectedConditions",
... | Hovers the mouse over the given element
@param locator The element locator | [
"Hovers",
"the",
"mouse",
"over",
"the",
"given",
"element"
] | e9a152aa67be48b1bb13a4691655caf6d873b553 | https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/NavigationService.java#L141-L150 |
7,584 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/share/srctree/SrcTree.java | SrcTree.resolveKeyReference | public void resolveKeyReference() throws IllegalDataStructureException {
for (TestClass testClass : rootClassTable.getTestClasses()) {
resolveTestMethod(testClass);
resolveTestField(testClass);
resolveDelegateToTestClass(testClass);
}
for (TestClass testClass ... | java | public void resolveKeyReference() throws IllegalDataStructureException {
for (TestClass testClass : rootClassTable.getTestClasses()) {
resolveTestMethod(testClass);
resolveTestField(testClass);
resolveDelegateToTestClass(testClass);
}
for (TestClass testClass ... | [
"public",
"void",
"resolveKeyReference",
"(",
")",
"throws",
"IllegalDataStructureException",
"{",
"for",
"(",
"TestClass",
"testClass",
":",
"rootClassTable",
".",
"getTestClasses",
"(",
")",
")",
"{",
"resolveTestMethod",
"(",
"testClass",
")",
";",
"resolveTestFi... | assume all keys have been set | [
"assume",
"all",
"keys",
"have",
"been",
"set"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/share/srctree/SrcTree.java#L289-L315 |
7,585 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/report/HtmlReport.java | HtmlReport.addLineScreenCaptureForErrorEachStackLine | private void addLineScreenCaptureForErrorEachStackLine(
List<LineScreenCapture> lineScreenCaptures, RunFailure runFailure) {
if (runFailure == null) {
return; // do nothing
}
List<StackLine> failureLines = runFailure.getStackLines();
int failureCaptureIndex = matc... | java | private void addLineScreenCaptureForErrorEachStackLine(
List<LineScreenCapture> lineScreenCaptures, RunFailure runFailure) {
if (runFailure == null) {
return; // do nothing
}
List<StackLine> failureLines = runFailure.getStackLines();
int failureCaptureIndex = matc... | [
"private",
"void",
"addLineScreenCaptureForErrorEachStackLine",
"(",
"List",
"<",
"LineScreenCapture",
">",
"lineScreenCaptures",
",",
"RunFailure",
"runFailure",
")",
"{",
"if",
"(",
"runFailure",
"==",
"null",
")",
"{",
"return",
";",
"// do nothing",
"}",
"List",... | The same capture is used for the all StackLines. | [
"The",
"same",
"capture",
"is",
"used",
"for",
"the",
"all",
"StackLines",
"."
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/report/HtmlReport.java#L83-L114 |
7,586 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/report/HtmlReport.java | HtmlReport.generateReportScreenCaptures | private List<ReportScreenCapture> generateReportScreenCaptures(
List<LineScreenCapture> lineScreenCaptures,
File inputCaptureRootDir, File reportOutputDir, File methodReportParentDir) {
List<ReportScreenCapture> reportCaptures = new ArrayList<>(lineScreenCaptures.size());
// add... | java | private List<ReportScreenCapture> generateReportScreenCaptures(
List<LineScreenCapture> lineScreenCaptures,
File inputCaptureRootDir, File reportOutputDir, File methodReportParentDir) {
List<ReportScreenCapture> reportCaptures = new ArrayList<>(lineScreenCaptures.size());
// add... | [
"private",
"List",
"<",
"ReportScreenCapture",
">",
"generateReportScreenCaptures",
"(",
"List",
"<",
"LineScreenCapture",
">",
"lineScreenCaptures",
",",
"File",
"inputCaptureRootDir",
",",
"File",
"reportOutputDir",
",",
"File",
"methodReportParentDir",
")",
"{",
"Lis... | generate ResportScreenCapture list from lineScreenCaptures and | [
"generate",
"ResportScreenCapture",
"list",
"from",
"lineScreenCaptures",
"and"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/report/HtmlReport.java#L117-L154 |
7,587 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/report/HtmlReport.java | HtmlReport.getRunFailure | private RunFailure getRunFailure(RootMethodRunResult runResult) {
if (runResult == null || runResult.getRunFailures().size() == 0) {
return null; // no failure
}
// multiple run failures in one test method are not supported yet
return runResult.getRunFailures().get(0);
} | java | private RunFailure getRunFailure(RootMethodRunResult runResult) {
if (runResult == null || runResult.getRunFailures().size() == 0) {
return null; // no failure
}
// multiple run failures in one test method are not supported yet
return runResult.getRunFailures().get(0);
} | [
"private",
"RunFailure",
"getRunFailure",
"(",
"RootMethodRunResult",
"runResult",
")",
"{",
"if",
"(",
"runResult",
"==",
"null",
"||",
"runResult",
".",
"getRunFailures",
"(",
")",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
"null",
";",
"// no... | returns null if no failure | [
"returns",
"null",
"if",
"no",
"failure"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/report/HtmlReport.java#L157-L164 |
7,588 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/report/HtmlReport.java | HtmlReport.generateRunResultList | private List<RunResults> generateRunResultList(List<File> reportInputDataDirs, SrcTree srcTree)
throws IllegalDataStructureException {
List<RunResults> resultsList = new ArrayList<>(reportInputDataDirs.size());
for (File reportInputDataDir : reportInputDataDirs) {
RunResults resu... | java | private List<RunResults> generateRunResultList(List<File> reportInputDataDirs, SrcTree srcTree)
throws IllegalDataStructureException {
List<RunResults> resultsList = new ArrayList<>(reportInputDataDirs.size());
for (File reportInputDataDir : reportInputDataDirs) {
RunResults resu... | [
"private",
"List",
"<",
"RunResults",
">",
"generateRunResultList",
"(",
"List",
"<",
"File",
">",
"reportInputDataDirs",
",",
"SrcTree",
"srcTree",
")",
"throws",
"IllegalDataStructureException",
"{",
"List",
"<",
"RunResults",
">",
"resultsList",
"=",
"new",
"Ar... | returns RunResults list for reportInputDataDirs | [
"returns",
"RunResults",
"list",
"for",
"reportInputDataDirs"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/report/HtmlReport.java#L391-L417 |
7,589 | rhiot/rhiot | camel/vertx-proton/src/main/java/io/rhiot/camel/vertxproton/VertxProtonEndpoint.java | VertxProtonEndpoint.getVertx | public Vertx getVertx() {
if(vertx != null) {
return vertx;
}
if(getComponent().getVertx() != null) {
vertx = getComponent().getVertx();
} else {
vertx = Vertx.vertx();
}
return vertx;
} | java | public Vertx getVertx() {
if(vertx != null) {
return vertx;
}
if(getComponent().getVertx() != null) {
vertx = getComponent().getVertx();
} else {
vertx = Vertx.vertx();
}
return vertx;
} | [
"public",
"Vertx",
"getVertx",
"(",
")",
"{",
"if",
"(",
"vertx",
"!=",
"null",
")",
"{",
"return",
"vertx",
";",
"}",
"if",
"(",
"getComponent",
"(",
")",
".",
"getVertx",
"(",
")",
"!=",
"null",
")",
"{",
"vertx",
"=",
"getComponent",
"(",
")",
... | Getters & setters | [
"Getters",
"&",
"setters"
] | 82eac10e365f72bab9248b8c3bd0ec9a2fc0a721 | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/camel/vertx-proton/src/main/java/io/rhiot/camel/vertxproton/VertxProtonEndpoint.java#L108-L119 |
7,590 | jeslopalo/flash-messages | flash-messages-spring/src/main/java/es/sandbox/ui/messages/spring/config/annotation/FlashMessagesConfigurationSupport.java | FlashMessagesConfigurationSupport.configureMessagesExceptionArgumentResolvers | @PostConstruct
private void configureMessagesExceptionArgumentResolvers() {
this.handlerExceptionResolver = this.applicationContext.getBean("handlerExceptionResolver", HandlerExceptionResolver.class);
for (final HandlerExceptionResolver resolver : ((HandlerExceptionResolverComposite) this.handlerEx... | java | @PostConstruct
private void configureMessagesExceptionArgumentResolvers() {
this.handlerExceptionResolver = this.applicationContext.getBean("handlerExceptionResolver", HandlerExceptionResolver.class);
for (final HandlerExceptionResolver resolver : ((HandlerExceptionResolverComposite) this.handlerEx... | [
"@",
"PostConstruct",
"private",
"void",
"configureMessagesExceptionArgumentResolvers",
"(",
")",
"{",
"this",
".",
"handlerExceptionResolver",
"=",
"this",
".",
"applicationContext",
".",
"getBean",
"(",
"\"handlerExceptionResolver\"",
",",
"HandlerExceptionResolver",
".",... | adds a FlashMessagesMethodArgumentResolver to handlerExceptionResolver's argument resolvers | [
"adds",
"a",
"FlashMessagesMethodArgumentResolver",
"to",
"handlerExceptionResolver",
"s",
"argument",
"resolvers"
] | 2faf23b09a8f72803fb295f0e0fe1d57282224cf | https://github.com/jeslopalo/flash-messages/blob/2faf23b09a8f72803fb295f0e0fe1d57282224cf/flash-messages-spring/src/main/java/es/sandbox/ui/messages/spring/config/annotation/FlashMessagesConfigurationSupport.java#L59-L68 |
7,591 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/Fat32BootSector.java | Fat32BootSector.setVolumeLabel | public void setVolumeLabel(String label) {
for (int i=0; i < 11; i++) {
final byte c =
(label == null) ? 0 :
(label.length() > i) ? (byte) label.charAt(i) : 0x20;
set8(0x47 + i, c);
}
} | java | public void setVolumeLabel(String label) {
for (int i=0; i < 11; i++) {
final byte c =
(label == null) ? 0 :
(label.length() > i) ? (byte) label.charAt(i) : 0x20;
set8(0x47 + i, c);
}
} | [
"public",
"void",
"setVolumeLabel",
"(",
"String",
"label",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"11",
";",
"i",
"++",
")",
"{",
"final",
"byte",
"c",
"=",
"(",
"label",
"==",
"null",
")",
"?",
"0",
":",
"(",
"label",
".... | Sets the 11-byte volume label stored at offset 0x47.
@param label the new volume label, may be {@code null} | [
"Sets",
"the",
"11",
"-",
"byte",
"volume",
"label",
"stored",
"at",
"offset",
"0x47",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/Fat32BootSector.java#L118-L126 |
7,592 | waldheinz/fat32-lib | src/main/java/de/waldheinz/fs/fat/Fat32BootSector.java | Fat32BootSector.writeCopy | public void writeCopy(BlockDevice device) throws IOException {
if (getBootSectorCopySector() > 0) {
final long offset = (long)getBootSectorCopySector() * SIZE;
buffer.rewind();
buffer.limit(buffer.capacity());
device.write(offset, buffer);
}
} | java | public void writeCopy(BlockDevice device) throws IOException {
if (getBootSectorCopySector() > 0) {
final long offset = (long)getBootSectorCopySector() * SIZE;
buffer.rewind();
buffer.limit(buffer.capacity());
device.write(offset, buffer);
}
} | [
"public",
"void",
"writeCopy",
"(",
"BlockDevice",
"device",
")",
"throws",
"IOException",
"{",
"if",
"(",
"getBootSectorCopySector",
"(",
")",
">",
"0",
")",
"{",
"final",
"long",
"offset",
"=",
"(",
"long",
")",
"getBootSectorCopySector",
"(",
")",
"*",
... | Writes a copy of this boot sector to the specified device, if a copy
is requested.
@param device the device to write the boot sector copy to
@throws IOException on write error
@see #getBootSectorCopySector() | [
"Writes",
"a",
"copy",
"of",
"this",
"boot",
"sector",
"to",
"the",
"specified",
"device",
"if",
"a",
"copy",
"is",
"requested",
"."
] | 3d8f1a986339573576e02eb0b6ea49bfdc9cce26 | https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/Fat32BootSector.java#L191-L198 |
7,593 | protegeproject/sparql-dl-api | src/main/java/de/derivo/sparqldlapi/impl/QueryBindingImpl.java | QueryBindingImpl.cloneAndFilter | public QueryBindingImpl cloneAndFilter(Set<QueryArgument> args)
{
QueryBindingImpl binding = new QueryBindingImpl();
for(QueryArgument arg : getBoundArgs()) {
if(args.contains(arg)) {
binding.set(arg, bindingMap.get(arg));
}
}
return binding;
} | java | public QueryBindingImpl cloneAndFilter(Set<QueryArgument> args)
{
QueryBindingImpl binding = new QueryBindingImpl();
for(QueryArgument arg : getBoundArgs()) {
if(args.contains(arg)) {
binding.set(arg, bindingMap.get(arg));
}
}
return binding;
} | [
"public",
"QueryBindingImpl",
"cloneAndFilter",
"(",
"Set",
"<",
"QueryArgument",
">",
"args",
")",
"{",
"QueryBindingImpl",
"binding",
"=",
"new",
"QueryBindingImpl",
"(",
")",
";",
"for",
"(",
"QueryArgument",
"arg",
":",
"getBoundArgs",
"(",
")",
")",
"{",
... | Clone this instance of QueryBinding and filter the binding map given by args.
Only query arguments within the set of args will be available in the result.
Only the QueryBinding class itself will be cloned,
but not the query arguments.
@return | [
"Clone",
"this",
"instance",
"of",
"QueryBinding",
"and",
"filter",
"the",
"binding",
"map",
"given",
"by",
"args",
".",
"Only",
"query",
"arguments",
"within",
"the",
"set",
"of",
"args",
"will",
"be",
"available",
"in",
"the",
"result",
".",
"Only",
"the... | 80d430d439e17a691d0111819af2d3613e28d625 | https://github.com/protegeproject/sparql-dl-api/blob/80d430d439e17a691d0111819af2d3613e28d625/src/main/java/de/derivo/sparqldlapi/impl/QueryBindingImpl.java#L136-L145 |
7,594 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java | RunResultsGenerateHookSetter.isLineLastStament | private boolean isLineLastStament(TestMethod method, int codeLineIndex) {
CodeLine codeLine = method.getCodeBody().get(codeLineIndex);
if (codeLineIndex == method.getCodeBody().size() - 1) {
return true;
}
CodeLine nextCodeLine = method.getCodeBody().get(codeLineIndex + 1);
... | java | private boolean isLineLastStament(TestMethod method, int codeLineIndex) {
CodeLine codeLine = method.getCodeBody().get(codeLineIndex);
if (codeLineIndex == method.getCodeBody().size() - 1) {
return true;
}
CodeLine nextCodeLine = method.getCodeBody().get(codeLineIndex + 1);
... | [
"private",
"boolean",
"isLineLastStament",
"(",
"TestMethod",
"method",
",",
"int",
"codeLineIndex",
")",
"{",
"CodeLine",
"codeLine",
"=",
"method",
".",
"getCodeBody",
"(",
")",
".",
"get",
"(",
"codeLineIndex",
")",
";",
"if",
"(",
"codeLineIndex",
"==",
... | This may return false since multiple statement can be found in a line. | [
"This",
"may",
"return",
"false",
"since",
"multiple",
"statement",
"can",
"be",
"found",
"in",
"a",
"line",
"."
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java#L110-L124 |
7,595 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java | RunResultsGenerateHookSetter.beforeHookInsertLine | private int beforeHookInsertLine(TestMethod method, int codeLineIndex) {
if (!isLineLastStament(method, codeLineIndex)) {
// don't insert the beforeHook since afterHook does not inserted to this line
return -1;
}
// so that not to insert the hook to the middle of the lin... | java | private int beforeHookInsertLine(TestMethod method, int codeLineIndex) {
if (!isLineLastStament(method, codeLineIndex)) {
// don't insert the beforeHook since afterHook does not inserted to this line
return -1;
}
// so that not to insert the hook to the middle of the lin... | [
"private",
"int",
"beforeHookInsertLine",
"(",
"TestMethod",
"method",
",",
"int",
"codeLineIndex",
")",
"{",
"if",
"(",
"!",
"isLineLastStament",
"(",
"method",
",",
"codeLineIndex",
")",
")",
"{",
"// don't insert the beforeHook since afterHook does not inserted to this... | Returns -1 if beforeHook for the codeLineIndex should not be inserted | [
"Returns",
"-",
"1",
"if",
"beforeHook",
"for",
"the",
"codeLineIndex",
"should",
"not",
"be",
"inserted"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java#L128-L145 |
7,596 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java | RunResultsGenerateHookSetter.afterHookInsertLine | private int afterHookInsertLine(TestMethod method, int codeLineIndex) {
// if multiple statements exist in one line, afterHook is inserted only after the last statement,
// since when multi-line statements are like:
// method(1);method(
// 2);
// insertion to the middle o... | java | private int afterHookInsertLine(TestMethod method, int codeLineIndex) {
// if multiple statements exist in one line, afterHook is inserted only after the last statement,
// since when multi-line statements are like:
// method(1);method(
// 2);
// insertion to the middle o... | [
"private",
"int",
"afterHookInsertLine",
"(",
"TestMethod",
"method",
",",
"int",
"codeLineIndex",
")",
"{",
"// if multiple statements exist in one line, afterHook is inserted only after the last statement,",
"// since when multi-line statements are like:",
"// method(1);method(",
"// ... | Returns -1 if afterHook for the codeLineIndex should not be inserted | [
"Returns",
"-",
"1",
"if",
"afterHook",
"for",
"the",
"codeLineIndex",
"should",
"not",
"be",
"inserted"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java#L149-L162 |
7,597 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java | RunResultsGenerateHookSetter.insertCodeBodyHook | private boolean insertCodeBodyHook(TestMethod method, CtMethod ctMethod,
String classQualifiedName, String methodSimpleName, String methodArgClassesStr) throws CannotCompileException {
String hookClassName = HookMethodDef.class.getCanonicalName();
String initializeSrc = hookInitializeSrc();
... | java | private boolean insertCodeBodyHook(TestMethod method, CtMethod ctMethod,
String classQualifiedName, String methodSimpleName, String methodArgClassesStr) throws CannotCompileException {
String hookClassName = HookMethodDef.class.getCanonicalName();
String initializeSrc = hookInitializeSrc();
... | [
"private",
"boolean",
"insertCodeBodyHook",
"(",
"TestMethod",
"method",
",",
"CtMethod",
"ctMethod",
",",
"String",
"classQualifiedName",
",",
"String",
"methodSimpleName",
",",
"String",
"methodArgClassesStr",
")",
"throws",
"CannotCompileException",
"{",
"String",
"h... | - returns true this method actually transform ctMethod body | [
"-",
"returns",
"true",
"this",
"method",
"actually",
"transform",
"ctMethod",
"body"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java#L166-L206 |
7,598 | SahaginOrg/sahagin-java | src/main/java/org/sahagin/runlib/srctreegen/SrcTreeGenerator.java | SrcTreeGenerator.generate | public SrcTree generate(String[] srcFiles, Charset srcCharset, String[] classPathEntries) {
// collect root class and method table without code body
CollectRootRequestor rootRequestor = new CollectRootRequestor();
parseAST(srcFiles, srcCharset, classPathEntries, rootRequestor);
// colle... | java | public SrcTree generate(String[] srcFiles, Charset srcCharset, String[] classPathEntries) {
// collect root class and method table without code body
CollectRootRequestor rootRequestor = new CollectRootRequestor();
parseAST(srcFiles, srcCharset, classPathEntries, rootRequestor);
// colle... | [
"public",
"SrcTree",
"generate",
"(",
"String",
"[",
"]",
"srcFiles",
",",
"Charset",
"srcCharset",
",",
"String",
"[",
"]",
"classPathEntries",
")",
"{",
"// collect root class and method table without code body",
"CollectRootRequestor",
"rootRequestor",
"=",
"new",
"C... | all class containing sub directories even if the class is in a named package | [
"all",
"class",
"containing",
"sub",
"directories",
"even",
"if",
"the",
"class",
"is",
"in",
"a",
"named",
"package"
] | 7ace428adebe3466ceb5826bc9681f8e3d52be68 | https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/srctreegen/SrcTreeGenerator.java#L871-L899 |
7,599 | protegeproject/sparql-dl-api | src/main/java/de/derivo/sparqldlapi/QueryAtom.java | QueryAtom.bind | public QueryAtom bind(QueryBinding binding)
{
List<QueryArgument> args = new ArrayList<QueryArgument>();
for(QueryArgument arg : this.args) {
if(binding.isBound(arg)) {
args.add(binding.get(arg));
}
else {
args.add(arg);
}
}
return new QueryAtom(type, args);
} | java | public QueryAtom bind(QueryBinding binding)
{
List<QueryArgument> args = new ArrayList<QueryArgument>();
for(QueryArgument arg : this.args) {
if(binding.isBound(arg)) {
args.add(binding.get(arg));
}
else {
args.add(arg);
}
}
return new QueryAtom(type, args);
} | [
"public",
"QueryAtom",
"bind",
"(",
"QueryBinding",
"binding",
")",
"{",
"List",
"<",
"QueryArgument",
">",
"args",
"=",
"new",
"ArrayList",
"<",
"QueryArgument",
">",
"(",
")",
";",
"for",
"(",
"QueryArgument",
"arg",
":",
"this",
".",
"args",
")",
"{",... | A convenience method to clone the QueryAtom instance while
inserting a new binding.
@param binding
@return | [
"A",
"convenience",
"method",
"to",
"clone",
"the",
"QueryAtom",
"instance",
"while",
"inserting",
"a",
"new",
"binding",
"."
] | 80d430d439e17a691d0111819af2d3613e28d625 | https://github.com/protegeproject/sparql-dl-api/blob/80d430d439e17a691d0111819af2d3613e28d625/src/main/java/de/derivo/sparqldlapi/QueryAtom.java#L92-L105 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.