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
148,700
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Project.java
Project.getTotalDone
public Double getTotalDone(WorkitemFilter filter, boolean includeChildProjects) { filter = (filter != null) ? filter : new WorkitemFilter(); return getRollup("Workitems", "Actuals.Value", filter, includeChildProjects); }
java
public Double getTotalDone(WorkitemFilter filter, boolean includeChildProjects) { filter = (filter != null) ? filter : new WorkitemFilter(); return getRollup("Workitems", "Actuals.Value", filter, includeChildProjects); }
[ "public", "Double", "getTotalDone", "(", "WorkitemFilter", "filter", ",", "boolean", "includeChildProjects", ")", "{", "filter", "=", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "WorkitemFilter", "(", ")", ";", "return", "getRollup", "(", "\...
Retrieves the total done for all workitems in this project optionally filtered. @param filter Criteria to filter workitems on. @param includeChildProjects If true, include open sub projects, otherwise only include this project. @return total done for selected workitems.
[ "Retrieves", "the", "total", "done", "for", "all", "workitems", "in", "this", "project", "optionally", "filtered", "." ]
59d35b67c849299631bca45ee94143237eb2ae1a
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Project.java#L1155-L1160
148,701
agmip/ace-core
src/main/java/org/agmip/ace/AceComponent.java
AceComponent.keySet
public Set<String> keySet() throws IOException { Set<String> ret = new HashSet<>(); JsonParser p = this.getParser(); JsonToken t; t = p.nextToken(); while (t != null) { if (t == JsonToken.FIELD_NAME) { ret.add(p.getCurrentName()); } t = p.nextToken(); } p.close();...
java
public Set<String> keySet() throws IOException { Set<String> ret = new HashSet<>(); JsonParser p = this.getParser(); JsonToken t; t = p.nextToken(); while (t != null) { if (t == JsonToken.FIELD_NAME) { ret.add(p.getCurrentName()); } t = p.nextToken(); } p.close();...
[ "public", "Set", "<", "String", ">", "keySet", "(", ")", "throws", "IOException", "{", "Set", "<", "String", ">", "ret", "=", "new", "HashSet", "<>", "(", ")", ";", "JsonParser", "p", "=", "this", ".", "getParser", "(", ")", ";", "JsonToken", "t", ...
Return a set of all key names in the component @return the set of key names @throws IOException if there is an I/O error
[ "Return", "a", "set", "of", "all", "key", "names", "in", "the", "component" ]
51957e79b4567d0083c52d0720f4a268c3a02f44
https://github.com/agmip/ace-core/blob/51957e79b4567d0083c52d0720f4a268c3a02f44/src/main/java/org/agmip/ace/AceComponent.java#L175-L190
148,702
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/FileKeyValStore.java
FileKeyValStore.getValue
public String getValue(String name) { Properties properties = loadProperties(); return (String) properties.getProperty(name); }
java
public String getValue(String name) { Properties properties = loadProperties(); return (String) properties.getProperty(name); }
[ "public", "String", "getValue", "(", "String", "name", ")", "{", "Properties", "properties", "=", "loadProperties", "(", ")", ";", "return", "(", "String", ")", "properties", ".", "getProperty", "(", "name", ")", ";", "}" ]
Get the value associated with name. @param name @return value associated with the name
[ "Get", "the", "value", "associated", "with", "name", "." ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/FileKeyValStore.java#L46-L49
148,703
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/FileKeyValStore.java
FileKeyValStore.setValue
public void setValue(String name, String value) { Properties properties = loadProperties(); try ( OutputStream output = new FileOutputStream(file); ) { properties.setProperty(name, value); properties.store(output, ""); output.close(); } catch(IOExcept...
java
public void setValue(String name, String value) { Properties properties = loadProperties(); try ( OutputStream output = new FileOutputStream(file); ) { properties.setProperty(name, value); properties.store(output, ""); output.close(); } catch(IOExcept...
[ "public", "void", "setValue", "(", "String", "name", ",", "String", "value", ")", "{", "Properties", "properties", "=", "loadProperties", "(", ")", ";", "try", "(", "OutputStream", "output", "=", "new", "FileOutputStream", "(", "file", ")", ";", ")", "{", ...
Set the value associated with name. @param name @param value
[ "Set", "the", "value", "associated", "with", "name", "." ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/FileKeyValStore.java#L71-L83
148,704
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java
Handler.markIsTransaction
public synchronized boolean markIsTransaction(String uuid, boolean isTransaction) { if (this.isTransaction == null) { return false; } this.isTransaction.put(uuid, isTransaction); return true; }
java
public synchronized boolean markIsTransaction(String uuid, boolean isTransaction) { if (this.isTransaction == null) { return false; } this.isTransaction.put(uuid, isTransaction); return true; }
[ "public", "synchronized", "boolean", "markIsTransaction", "(", "String", "uuid", ",", "boolean", "isTransaction", ")", "{", "if", "(", "this", ".", "isTransaction", "==", "null", ")", "{", "return", "false", ";", "}", "this", ".", "isTransaction", ".", "put"...
Marks a UUID as either a transaction or a query @param uuid ID to be marked @param isTransaction true for transaction, false for query @return whether or not the UUID was successfully marked
[ "Marks", "a", "UUID", "as", "either", "a", "transaction", "or", "a", "query" ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java#L168-L175
148,705
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java
Handler.enterInitState
public void enterInitState(Event event) { logger.debug(String.format("Entered state %s", fsm.current())); ChaincodeMessage message = messageHelper(event); logger.debug(String.format("[%s]Received %s, initializing chaincode", shortID(message), message.getType().toString())); if (message.getType() == INIT) { ...
java
public void enterInitState(Event event) { logger.debug(String.format("Entered state %s", fsm.current())); ChaincodeMessage message = messageHelper(event); logger.debug(String.format("[%s]Received %s, initializing chaincode", shortID(message), message.getType().toString())); if (message.getType() == INIT) { ...
[ "public", "void", "enterInitState", "(", "Event", "event", ")", "{", "logger", ".", "debug", "(", "String", ".", "format", "(", "\"Entered state %s\"", ",", "fsm", ".", "current", "(", ")", ")", ")", ";", "ChaincodeMessage", "message", "=", "messageHelper", ...
enterInitState will initialize the chaincode if entering init from established.
[ "enterInitState", "will", "initialize", "the", "chaincode", "if", "entering", "init", "from", "established", "." ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java#L267-L280
148,706
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java
Handler.handleTransaction
public void handleTransaction(ChaincodeMessage message) { // The defer followed by triggering a go routine dance is needed to ensure that the previous state transition // is completed before the next one is triggered. The previous state transition is deemed complete only when // the beforeInit function is exited....
java
public void handleTransaction(ChaincodeMessage message) { // The defer followed by triggering a go routine dance is needed to ensure that the previous state transition // is completed before the next one is triggered. The previous state transition is deemed complete only when // the beforeInit function is exited....
[ "public", "void", "handleTransaction", "(", "ChaincodeMessage", "message", ")", "{", "// The defer followed by triggering a go routine dance is needed to ensure that the previous state transition", "// is completed before the next one is triggered. The previous state transition is deemed complete ...
handleTransaction Handles request to execute a transaction.
[ "handleTransaction", "Handles", "request", "to", "execute", "a", "transaction", "." ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java#L284-L351
148,707
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java
Handler.handleQuery
public void handleQuery(ChaincodeMessage message) { // Query does not transition state. It can happen anytime after Ready Runnable task = () -> { ChaincodeMessage serialSendMessage = null; try { // Get the function and args from Payload ChaincodeInput input; try { input = ChaincodeInput.parse...
java
public void handleQuery(ChaincodeMessage message) { // Query does not transition state. It can happen anytime after Ready Runnable task = () -> { ChaincodeMessage serialSendMessage = null; try { // Get the function and args from Payload ChaincodeInput input; try { input = ChaincodeInput.parse...
[ "public", "void", "handleQuery", "(", "ChaincodeMessage", "message", ")", "{", "// Query does not transition state. It can happen anytime after Ready", "Runnable", "task", "=", "(", ")", "->", "{", "ChaincodeMessage", "serialSendMessage", "=", "null", ";", "try", "{", "...
handleQuery handles request to execute a query.
[ "handleQuery", "handles", "request", "to", "execute", "a", "query", "." ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java#L354-L411
148,708
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java
Handler.enterTransactionState
public void enterTransactionState(Event event) { ChaincodeMessage message = messageHelper(event); logger.debug(String.format("[%s]Received %s, invoking transaction on chaincode(src:%s, dst:%s)", shortID(message), message.getType().toString(), event.src, event.dst)); if (message.getType() == TRANSACTION) { ...
java
public void enterTransactionState(Event event) { ChaincodeMessage message = messageHelper(event); logger.debug(String.format("[%s]Received %s, invoking transaction on chaincode(src:%s, dst:%s)", shortID(message), message.getType().toString(), event.src, event.dst)); if (message.getType() == TRANSACTION) { ...
[ "public", "void", "enterTransactionState", "(", "Event", "event", ")", "{", "ChaincodeMessage", "message", "=", "messageHelper", "(", "event", ")", ";", "logger", ".", "debug", "(", "String", ".", "format", "(", "\"[%s]Received %s, invoking transaction on chaincode(sr...
enterTransactionState will execute chaincode's Run if coming from a TRANSACTION event.
[ "enterTransactionState", "will", "execute", "chaincode", "s", "Run", "if", "coming", "from", "a", "TRANSACTION", "event", "." ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java#L414-L422
148,709
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java
Handler.afterCompleted
public void afterCompleted(Event event) { ChaincodeMessage message = messageHelper(event); logger.debug(String.format("[%s]sending COMPLETED to validator for tid", shortID(message))); try { serialSend(message); } catch (Exception e) { event.cancel(new Exception("send COMPLETED failed %s", e)); } }
java
public void afterCompleted(Event event) { ChaincodeMessage message = messageHelper(event); logger.debug(String.format("[%s]sending COMPLETED to validator for tid", shortID(message))); try { serialSend(message); } catch (Exception e) { event.cancel(new Exception("send COMPLETED failed %s", e)); } }
[ "public", "void", "afterCompleted", "(", "Event", "event", ")", "{", "ChaincodeMessage", "message", "=", "messageHelper", "(", "event", ")", ";", "logger", ".", "debug", "(", "String", ".", "format", "(", "\"[%s]sending COMPLETED to validator for tid\"", ",", "sho...
afterCompleted will need to handle COMPLETED event by sending message to the peer
[ "afterCompleted", "will", "need", "to", "handle", "COMPLETED", "event", "by", "sending", "message", "to", "the", "peer" ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java#L425-L433
148,710
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java
Handler.afterResponse
public void afterResponse(Event event) { ChaincodeMessage message = messageHelper(event); try { sendChannel(message); logger.debug(String.format("[%s]Received %s, communicated (state:%s)", shortID(message), message.getType(), fsm.current())); } catch (Exception e) { logger.error(String.format("[%s]e...
java
public void afterResponse(Event event) { ChaincodeMessage message = messageHelper(event); try { sendChannel(message); logger.debug(String.format("[%s]Received %s, communicated (state:%s)", shortID(message), message.getType(), fsm.current())); } catch (Exception e) { logger.error(String.format("[%s]e...
[ "public", "void", "afterResponse", "(", "Event", "event", ")", "{", "ChaincodeMessage", "message", "=", "messageHelper", "(", "event", ")", ";", "try", "{", "sendChannel", "(", "message", ")", ";", "logger", ".", "debug", "(", "String", ".", "format", "(",...
afterResponse is called to deliver a response or error to the chaincode stub.
[ "afterResponse", "is", "called", "to", "deliver", "a", "response", "or", "error", "to", "the", "chaincode", "stub", "." ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/shim/Handler.java#L442-L452
148,711
iipc/openwayback-access-control
access-control/src/main/java/org/archive/accesscontrol/robotstxt/CachingRobotClient.java
CachingRobotClient.prepare
public void prepare(Collection<String> urls, String userAgent) { List<String> safeUrls = new ArrayList<String>(urls); FetchThread threads[] = new FetchThread[PREPARE_THREAD_COUNT ]; for (int i = 0; i < PREPARE_THREAD_COUNT ; i++) { threads[i] = new FetchThread(safeUrls, userAgent); ...
java
public void prepare(Collection<String> urls, String userAgent) { List<String> safeUrls = new ArrayList<String>(urls); FetchThread threads[] = new FetchThread[PREPARE_THREAD_COUNT ]; for (int i = 0; i < PREPARE_THREAD_COUNT ; i++) { threads[i] = new FetchThread(safeUrls, userAgent); ...
[ "public", "void", "prepare", "(", "Collection", "<", "String", ">", "urls", ",", "String", "userAgent", ")", "{", "List", "<", "String", ">", "safeUrls", "=", "new", "ArrayList", "<", "String", ">", "(", "urls", ")", ";", "FetchThread", "threads", "[", ...
Prepare the cache to lookup info for a given set of urls. The fetches happen in parallel so this also makes a good option for speeding up bulk lookups.
[ "Prepare", "the", "cache", "to", "lookup", "info", "for", "a", "given", "set", "of", "urls", ".", "The", "fetches", "happen", "in", "parallel", "so", "this", "also", "makes", "a", "good", "option", "for", "speeding", "up", "bulk", "lookups", "." ]
4a0f70f200fd8d7b6e313624b7628656d834bf31
https://github.com/iipc/openwayback-access-control/blob/4a0f70f200fd8d7b6e313624b7628656d834bf31/access-control/src/main/java/org/archive/accesscontrol/robotstxt/CachingRobotClient.java#L97-L110
148,712
diirt/util
src/main/java/org/epics/util/stats/StatisticsUtil.java
StatisticsUtil.statisticsOf
public static Statistics statisticsOf(CollectionNumber data) { IteratorNumber iterator = data.iterator(); if (!iterator.hasNext()) { return null; } int count = 0; double min = iterator.nextDouble(); while (Double.isNaN(min)) { if (!iterator.hasNext...
java
public static Statistics statisticsOf(CollectionNumber data) { IteratorNumber iterator = data.iterator(); if (!iterator.hasNext()) { return null; } int count = 0; double min = iterator.nextDouble(); while (Double.isNaN(min)) { if (!iterator.hasNext...
[ "public", "static", "Statistics", "statisticsOf", "(", "CollectionNumber", "data", ")", "{", "IteratorNumber", "iterator", "=", "data", ".", "iterator", "(", ")", ";", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "return", "null", ";", ...
Calculates data statistics, excluding NaN values. @param data the data @return the calculated statistics
[ "Calculates", "data", "statistics", "excluding", "NaN", "values", "." ]
24aca0a173a635aaf0b78d213a3fee8d4f91c077
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/StatisticsUtil.java#L68-L104
148,713
diirt/util
src/main/java/org/epics/util/stats/StatisticsUtil.java
StatisticsUtil.statisticsOf
public static Statistics statisticsOf(List<Statistics> data) { if (data.isEmpty()) return null; Iterator<Statistics> iterator = data.iterator(); if (!iterator.hasNext()) { return null; } Statistics first = null; while (first == null && ite...
java
public static Statistics statisticsOf(List<Statistics> data) { if (data.isEmpty()) return null; Iterator<Statistics> iterator = data.iterator(); if (!iterator.hasNext()) { return null; } Statistics first = null; while (first == null && ite...
[ "public", "static", "Statistics", "statisticsOf", "(", "List", "<", "Statistics", ">", "data", ")", "{", "if", "(", "data", ".", "isEmpty", "(", ")", ")", "return", "null", ";", "Iterator", "<", "Statistics", ">", "iterator", "=", "data", ".", "iterator"...
Aggregates statistical information. @param data a list of statistical information @return the aggregate of all
[ "Aggregates", "statistical", "information", "." ]
24aca0a173a635aaf0b78d213a3fee8d4f91c077
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/StatisticsUtil.java#L112-L148
148,714
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/shim/ChaincodeBase.java
ChaincodeBase.start
public void start(String[] args) { Options options = new Options(); options.addOption("a", "peerAddress", true, "Address of peer to connect to"); options.addOption("s", "securityEnabled", false, "Present if security is enabled"); options.addOption("i", "id", true, "Identity of chaincode"); options.addOption("...
java
public void start(String[] args) { Options options = new Options(); options.addOption("a", "peerAddress", true, "Address of peer to connect to"); options.addOption("s", "securityEnabled", false, "Present if security is enabled"); options.addOption("i", "id", true, "Identity of chaincode"); options.addOption("...
[ "public", "void", "start", "(", "String", "[", "]", "args", ")", "{", "Options", "options", "=", "new", "Options", "(", ")", ";", "options", ".", "addOption", "(", "\"a\"", ",", "\"peerAddress\"", ",", "true", ",", "\"Address of peer to connect to\"", ")", ...
Start entry point for chaincodes bootstrap.
[ "Start", "entry", "point", "for", "chaincodes", "bootstrap", "." ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/shim/ChaincodeBase.java#L62-L99
148,715
diirt/util
src/main/java/org/epics/util/stats/Ranges.java
Ranges.range
public static Range range(final double minValue, final double maxValue) { if (minValue > maxValue) { throw new IllegalArgumentException("minValue should be less then or equal to maxValue (" + minValue+ ", " + maxValue + ")"); } return new Range() { @Override ...
java
public static Range range(final double minValue, final double maxValue) { if (minValue > maxValue) { throw new IllegalArgumentException("minValue should be less then or equal to maxValue (" + minValue+ ", " + maxValue + ")"); } return new Range() { @Override ...
[ "public", "static", "Range", "range", "(", "final", "double", "minValue", ",", "final", "double", "maxValue", ")", "{", "if", "(", "minValue", ">", "maxValue", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"minValue should be less then or equal to max...
Range from given min and max. @param minValue minimum value @param maxValue maximum value @return the range
[ "Range", "from", "given", "min", "and", "max", "." ]
24aca0a173a635aaf0b78d213a3fee8d4f91c077
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/Ranges.java#L39-L61
148,716
diirt/util
src/main/java/org/epics/util/stats/Ranges.java
Ranges.contains
public static boolean contains(Range range, Range subrange) { return range.getMinimum().doubleValue() <= subrange.getMinimum().doubleValue() && range.getMaximum().doubleValue() >= subrange.getMaximum().doubleValue(); }
java
public static boolean contains(Range range, Range subrange) { return range.getMinimum().doubleValue() <= subrange.getMinimum().doubleValue() && range.getMaximum().doubleValue() >= subrange.getMaximum().doubleValue(); }
[ "public", "static", "boolean", "contains", "(", "Range", "range", ",", "Range", "subrange", ")", "{", "return", "range", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", "<=", "subrange", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")...
Determines whether the subrange is contained in the range or not. @param range a range @param subrange a possible subrange @return true if subrange is contained in range
[ "Determines", "whether", "the", "subrange", "is", "contained", "in", "the", "range", "or", "not", "." ]
24aca0a173a635aaf0b78d213a3fee8d4f91c077
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/Ranges.java#L70-L74
148,717
diirt/util
src/main/java/org/epics/util/stats/Ranges.java
Ranges.sum
public static Range sum(Range range1, Range range2) { if (range1.getMinimum().doubleValue() <= range2.getMinimum().doubleValue()) { if (range1.getMaximum().doubleValue() >= range2.getMaximum().doubleValue()) { return range1; } else { return range(range1.ge...
java
public static Range sum(Range range1, Range range2) { if (range1.getMinimum().doubleValue() <= range2.getMinimum().doubleValue()) { if (range1.getMaximum().doubleValue() >= range2.getMaximum().doubleValue()) { return range1; } else { return range(range1.ge...
[ "public", "static", "Range", "sum", "(", "Range", "range1", ",", "Range", "range2", ")", "{", "if", "(", "range1", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", "<=", "range2", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", "...
Determines the range that can contain both ranges. If one of the ranges in contained in the other, the bigger range is returned. @param range1 a range @param range2 another range @return the bigger range
[ "Determines", "the", "range", "that", "can", "contain", "both", "ranges", ".", "If", "one", "of", "the", "ranges", "in", "contained", "in", "the", "other", "the", "bigger", "range", "is", "returned", "." ]
24aca0a173a635aaf0b78d213a3fee8d4f91c077
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/Ranges.java#L84-L99
148,718
diirt/util
src/main/java/org/epics/util/stats/Ranges.java
Ranges.normalize
public static double normalize(Range range, double value) { return normalize(value, range.getMinimum().doubleValue(), range.getMaximum().doubleValue()); }
java
public static double normalize(Range range, double value) { return normalize(value, range.getMinimum().doubleValue(), range.getMaximum().doubleValue()); }
[ "public", "static", "double", "normalize", "(", "Range", "range", ",", "double", "value", ")", "{", "return", "normalize", "(", "value", ",", "range", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", ",", "range", ".", "getMaximum", "(", ")", ...
Returns the value normalized within the range. It performs a linear transformation where the minimum value of the range becomes 0 while the maximum becomes 1. @param range a range @param value a value @return the value transformed based on the range
[ "Returns", "the", "value", "normalized", "within", "the", "range", ".", "It", "performs", "a", "linear", "transformation", "where", "the", "minimum", "value", "of", "the", "range", "becomes", "0", "while", "the", "maximum", "becomes", "1", "." ]
24aca0a173a635aaf0b78d213a3fee8d4f91c077
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/Ranges.java#L120-L122
148,719
diirt/util
src/main/java/org/epics/util/stats/Ranges.java
Ranges.contains
public static boolean contains(Range range, double value) { return value >= range.getMinimum().doubleValue() && value <= range.getMaximum().doubleValue(); }
java
public static boolean contains(Range range, double value) { return value >= range.getMinimum().doubleValue() && value <= range.getMaximum().doubleValue(); }
[ "public", "static", "boolean", "contains", "(", "Range", "range", ",", "double", "value", ")", "{", "return", "value", ">=", "range", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", "&&", "value", "<=", "range", ".", "getMaximum", "(", ")", ...
Determines whether the value is contained by the range or not. @param range a range @param value a value @return true if the value is within the range
[ "Determines", "whether", "the", "value", "is", "contained", "by", "the", "range", "or", "not", "." ]
24aca0a173a635aaf0b78d213a3fee8d4f91c077
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/Ranges.java#L135-L137
148,720
diirt/util
src/main/java/org/epics/util/stats/Ranges.java
Ranges.overlap
public static double overlap(Range range, Range otherRange) { double minOverlap = Math.max(range.getMinimum().doubleValue(), otherRange.getMinimum().doubleValue()); double maxOverlap = Math.min(range.getMaximum().doubleValue(), otherRange.getMaximum().doubleValue()); double overlapWidth = maxOve...
java
public static double overlap(Range range, Range otherRange) { double minOverlap = Math.max(range.getMinimum().doubleValue(), otherRange.getMinimum().doubleValue()); double maxOverlap = Math.min(range.getMaximum().doubleValue(), otherRange.getMaximum().doubleValue()); double overlapWidth = maxOve...
[ "public", "static", "double", "overlap", "(", "Range", "range", ",", "Range", "otherRange", ")", "{", "double", "minOverlap", "=", "Math", ".", "max", "(", "range", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", ",", "otherRange", ".", "getMi...
Percentage, from 0 to 1, of the first range that is contained by the second range. @param range the range to be contained by the second @param otherRange the range that has to contain the first @return from 0 (if there is no intersection) to 1 (if the ranges are the same)
[ "Percentage", "from", "0", "to", "1", "of", "the", "first", "range", "that", "is", "contained", "by", "the", "second", "range", "." ]
24aca0a173a635aaf0b78d213a3fee8d4f91c077
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/Ranges.java#L166-L173
148,721
diirt/util
src/main/java/org/epics/util/stats/Ranges.java
Ranges.isValid
public static boolean isValid(Range range) { if (range == null) { return false; } double min = range.getMinimum().doubleValue(); double max = range.getMaximum().doubleValue(); return min != max && !Double.isNaN(min) && !Double.isInfinite(min) && ...
java
public static boolean isValid(Range range) { if (range == null) { return false; } double min = range.getMinimum().doubleValue(); double max = range.getMaximum().doubleValue(); return min != max && !Double.isNaN(min) && !Double.isInfinite(min) && ...
[ "public", "static", "boolean", "isValid", "(", "Range", "range", ")", "{", "if", "(", "range", "==", "null", ")", "{", "return", "false", ";", "}", "double", "min", "=", "range", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", ";", "double...
Checks whether the range is of non-zero size and the boundaries are neither NaN or Infinity. @param range the range @return true if range is of finite, non-zero size
[ "Checks", "whether", "the", "range", "is", "of", "non", "-", "zero", "size", "and", "the", "boundaries", "are", "neither", "NaN", "or", "Infinity", "." ]
24aca0a173a635aaf0b78d213a3fee8d4f91c077
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/Ranges.java#L182-L192
148,722
eurekaclinical/cas
src/main/java/edu/emory/cci/aiw/cvrg/eureka/cas/AbstractProperties.java
AbstractProperties.loadDefaultConfig
private void loadDefaultConfig() { this.configDir = System.getProperty(CONFIG_DIR_SYS_PROP); if (this.configDir == null) { this.configDir = getDefaultConfigDir(); } if (this.configDir == null) { throw new AssertionError("eureka.config.dir not specified in " + FALLBACK_CONFIG_FILE); } File configFile =...
java
private void loadDefaultConfig() { this.configDir = System.getProperty(CONFIG_DIR_SYS_PROP); if (this.configDir == null) { this.configDir = getDefaultConfigDir(); } if (this.configDir == null) { throw new AssertionError("eureka.config.dir not specified in " + FALLBACK_CONFIG_FILE); } File configFile =...
[ "private", "void", "loadDefaultConfig", "(", ")", "{", "this", ".", "configDir", "=", "System", ".", "getProperty", "(", "CONFIG_DIR_SYS_PROP", ")", ";", "if", "(", "this", ".", "configDir", "==", "null", ")", "{", "this", ".", "configDir", "=", "getDefaul...
Loads the application configuration. There are two potential sources of application configuration. The fallback configuration should always be there. The default configuration directory, <code>/etc/ec-cas-server</code>, may optionally have an application.properties file within it that overrides the fallback configurat...
[ "Loads", "the", "application", "configuration", "." ]
c3138c42285773523df8b4428d623ce6785ac6a8
https://github.com/eurekaclinical/cas/blob/c3138c42285773523df8b4428d623ce6785ac6a8/src/main/java/edu/emory/cci/aiw/cvrg/eureka/cas/AbstractProperties.java#L86-L123
148,723
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Retrospective.java
Retrospective.getIdentifiedStories
public Collection<Story> getIdentifiedStories(StoryFilter filter) { filter = (filter != null) ? filter : new StoryFilter(); filter.identifiedIn.clear(); filter.identifiedIn.add(this); return getInstance().get().story(filter); }
java
public Collection<Story> getIdentifiedStories(StoryFilter filter) { filter = (filter != null) ? filter : new StoryFilter(); filter.identifiedIn.clear(); filter.identifiedIn.add(this); return getInstance().get().story(filter); }
[ "public", "Collection", "<", "Story", ">", "getIdentifiedStories", "(", "StoryFilter", "filter", ")", "{", "filter", "=", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "StoryFilter", "(", ")", ";", "filter", ".", "identifiedIn", ".", "clear"...
A read-only collection of Stories Identified in the Retrospective. @param filter filter for getting list of stories. @return collection of Stories Identified in the Retrospective.
[ "A", "read", "-", "only", "collection", "of", "Stories", "Identified", "in", "the", "Retrospective", "." ]
59d35b67c849299631bca45ee94143237eb2ae1a
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Retrospective.java#L56-L62
148,724
sinetja/sinetja
src/main/java/sinetja/Response.java
Response.respondEventSource
public ChannelFuture respondEventSource(Object data, String event) throws Exception { if (!nonChunkedResponseOrFirstChunkSent) { HttpUtil.setTransferEncodingChunked(response, true); response.headers().set(CONTENT_TYPE, "text/event-stream; charset=UTF-8"); return respondText("...
java
public ChannelFuture respondEventSource(Object data, String event) throws Exception { if (!nonChunkedResponseOrFirstChunkSent) { HttpUtil.setTransferEncodingChunked(response, true); response.headers().set(CONTENT_TYPE, "text/event-stream; charset=UTF-8"); return respondText("...
[ "public", "ChannelFuture", "respondEventSource", "(", "Object", "data", ",", "String", "event", ")", "throws", "Exception", "{", "if", "(", "!", "nonChunkedResponseOrFirstChunkSent", ")", "{", "HttpUtil", ".", "setTransferEncodingChunked", "(", "response", ",", "tru...
To respond event source, call this method as many time as you want. <p>Event Source response is a special kind of chunked response, data must be UTF-8. See: - http://sockjs.github.com/sockjs-protocol/sockjs-protocol-0.3.3.html#section-94 - http://dev.w3.org/html5/eventsource/ <p>No need to call setChunked() before ca...
[ "To", "respond", "event", "source", "call", "this", "method", "as", "many", "time", "as", "you", "want", "." ]
eec94dba55ec28263e3503fcdb33532282134775
https://github.com/sinetja/sinetja/blob/eec94dba55ec28263e3503fcdb33532282134775/src/main/java/sinetja/Response.java#L336-L343
148,725
socialsensor/socialsensor-framework-common
src/main/java/eu/socialsensor/framework/common/repositories/InfluentialContributorSet.java
InfluentialContributorSet.isTwitterJsonStringRelatedTo
public boolean isTwitterJsonStringRelatedTo(String tweet, boolean sender,boolean userMentions, boolean retweetOrigin) { StatusRepresentation s = new StatusRepresentation(); s.init(null, tweet); boolean matches = s.isRelatedTo(this, true, true, true); return matches; }
java
public boolean isTwitterJsonStringRelatedTo(String tweet, boolean sender,boolean userMentions, boolean retweetOrigin) { StatusRepresentation s = new StatusRepresentation(); s.init(null, tweet); boolean matches = s.isRelatedTo(this, true, true, true); return matches; }
[ "public", "boolean", "isTwitterJsonStringRelatedTo", "(", "String", "tweet", ",", "boolean", "sender", ",", "boolean", "userMentions", ",", "boolean", "retweetOrigin", ")", "{", "StatusRepresentation", "s", "=", "new", "StatusRepresentation", "(", ")", ";", "s", "...
Determines whether the Twitter status is related to one of the users in the set of influential contributors. @param sender if the person who created the status is in the ids set, return true @param userMentions if the status contains a user mention that is contained in the ids set, return true @param retweetOrigin if ...
[ "Determines", "whether", "the", "Twitter", "status", "is", "related", "to", "one", "of", "the", "users", "in", "the", "set", "of", "influential", "contributors", "." ]
b69e7c47f3e0a9062c373aaec7cb2ba1e19c6ce0
https://github.com/socialsensor/socialsensor-framework-common/blob/b69e7c47f3e0a9062c373aaec7cb2ba1e19c6ce0/src/main/java/eu/socialsensor/framework/common/repositories/InfluentialContributorSet.java#L89-L94
148,726
groundupworks/wings
wings/src/main/java/com/groundupworks/wings/core/WingsDbHelper.java
WingsDbHelper.purge
public synchronized int purge() { int recordsRemaining = -1; SQLiteDatabase db = null; Cursor cursor = null; try { db = getWritableDatabase(); // Purge records. long earliestValidTime = System.currentTimeMillis() - RECORD_EXPIRY_TIME; int ...
java
public synchronized int purge() { int recordsRemaining = -1; SQLiteDatabase db = null; Cursor cursor = null; try { db = getWritableDatabase(); // Purge records. long earliestValidTime = System.currentTimeMillis() - RECORD_EXPIRY_TIME; int ...
[ "public", "synchronized", "int", "purge", "(", ")", "{", "int", "recordsRemaining", "=", "-", "1", ";", "SQLiteDatabase", "db", "=", "null", ";", "Cursor", "cursor", "=", "null", ";", "try", "{", "db", "=", "getWritableDatabase", "(", ")", ";", "// Purge...
Purges the database based on the purge policy. @return the number of records remaining after the purge; or -1 if an error occurred.
[ "Purges", "the", "database", "based", "on", "the", "purge", "policy", "." ]
03d2827c30ef55f2db4e23f7500e016c7771fa39
https://github.com/groundupworks/wings/blob/03d2827c30ef55f2db4e23f7500e016c7771fa39/wings/src/main/java/com/groundupworks/wings/core/WingsDbHelper.java#L343-L376
148,727
groundupworks/wings
wings/src/main/java/com/groundupworks/wings/core/WingsDbHelper.java
WingsDbHelper.resetProcessingShareRequests
public synchronized void resetProcessingShareRequests() { SQLiteDatabase db = null; try { db = getWritableDatabase(); // Update state back to pending. ContentValues values = new ContentValues(); values.put(ShareRequestTable.COLUMN_STATE, ShareRequest.STAT...
java
public synchronized void resetProcessingShareRequests() { SQLiteDatabase db = null; try { db = getWritableDatabase(); // Update state back to pending. ContentValues values = new ContentValues(); values.put(ShareRequestTable.COLUMN_STATE, ShareRequest.STAT...
[ "public", "synchronized", "void", "resetProcessingShareRequests", "(", ")", "{", "SQLiteDatabase", "db", "=", "null", ";", "try", "{", "db", "=", "getWritableDatabase", "(", ")", ";", "// Update state back to pending.", "ContentValues", "values", "=", "new", "Conten...
Reset all records that somehow got stuck in a processing state.
[ "Reset", "all", "records", "that", "somehow", "got", "stuck", "in", "a", "processing", "state", "." ]
03d2827c30ef55f2db4e23f7500e016c7771fa39
https://github.com/groundupworks/wings/blob/03d2827c30ef55f2db4e23f7500e016c7771fa39/wings/src/main/java/com/groundupworks/wings/core/WingsDbHelper.java#L381-L399
148,728
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/transaction/TransactionContext.java
TransactionContext.deploy
public ChainCodeResponse deploy(DeployRequest deployRequest) throws ChainCodeException, NoAvailableTCertException, CryptoException, IOException { logger.debug(String.format("Received deploy request: %s", deployRequest)); if (null == getMyTCert() && getChain().isSecurityEnabled()) { logger.d...
java
public ChainCodeResponse deploy(DeployRequest deployRequest) throws ChainCodeException, NoAvailableTCertException, CryptoException, IOException { logger.debug(String.format("Received deploy request: %s", deployRequest)); if (null == getMyTCert() && getChain().isSecurityEnabled()) { logger.d...
[ "public", "ChainCodeResponse", "deploy", "(", "DeployRequest", "deployRequest", ")", "throws", "ChainCodeException", ",", "NoAvailableTCertException", ",", "CryptoException", ",", "IOException", "{", "logger", ".", "debug", "(", "String", ".", "format", "(", "\"Receiv...
Issue a deploy transaction @param deployRequest {@link DeployRequest} A deploy request @return {@link ChainCodeResponse} response of deploy transaction
[ "Issue", "a", "deploy", "transaction" ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/transaction/TransactionContext.java#L138-L159
148,729
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/transaction/TransactionContext.java
TransactionContext.invoke
public ChainCodeResponse invoke(InvokeRequest invokeRequest) throws ChainCodeException, NoAvailableTCertException, CryptoException, IOException { logger.debug(String.format("Received invoke request: %s", invokeRequest)); // Get a TCert to use in the invoke transaction setAttrs(invokeRequest.get...
java
public ChainCodeResponse invoke(InvokeRequest invokeRequest) throws ChainCodeException, NoAvailableTCertException, CryptoException, IOException { logger.debug(String.format("Received invoke request: %s", invokeRequest)); // Get a TCert to use in the invoke transaction setAttrs(invokeRequest.get...
[ "public", "ChainCodeResponse", "invoke", "(", "InvokeRequest", "invokeRequest", ")", "throws", "ChainCodeException", ",", "NoAvailableTCertException", ",", "CryptoException", ",", "IOException", "{", "logger", ".", "debug", "(", "String", ".", "format", "(", "\"Receiv...
Issue an invoke on chaincode @param invokeRequest {@link InvokeRequest} An invoke request @throws ChainCodeException
[ "Issue", "an", "invoke", "on", "chaincode" ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/transaction/TransactionContext.java#L166-L191
148,730
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/transaction/TransactionContext.java
TransactionContext.execute
private Fabric.Response execute(Transaction tx) throws CryptoException, IOException { logger.debug(String.format("Executing transaction [%s]", tx)); // Set nonce tx.getTxBuilder().setNonce(ByteString.copyFrom(this.nonce)); // Process confidentiality logger.debug("Process Confid...
java
private Fabric.Response execute(Transaction tx) throws CryptoException, IOException { logger.debug(String.format("Executing transaction [%s]", tx)); // Set nonce tx.getTxBuilder().setNonce(ByteString.copyFrom(this.nonce)); // Process confidentiality logger.debug("Process Confid...
[ "private", "Fabric", ".", "Response", "execute", "(", "Transaction", "tx", ")", "throws", "CryptoException", ",", "IOException", "{", "logger", ".", "debug", "(", "String", ".", "format", "(", "\"Executing transaction [%s]\"", ",", "tx", ")", ")", ";", "// Set...
Execute a transaction @param tx {Transaction} The transaction.
[ "Execute", "a", "transaction" ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/transaction/TransactionContext.java#L242-L285
148,731
diirt/util
src/main/java/org/epics/util/array/CollectionNumbers.java
CollectionNumbers.wrappedArray
public static Object wrappedArray(CollectionNumber coll) { Object data = wrappedFloatArray(coll); if (data != null) { return data; } data = wrappedDoubleArray(coll); if (data != null) { return data; } data = wrappedByteArray(coll);...
java
public static Object wrappedArray(CollectionNumber coll) { Object data = wrappedFloatArray(coll); if (data != null) { return data; } data = wrappedDoubleArray(coll); if (data != null) { return data; } data = wrappedByteArray(coll);...
[ "public", "static", "Object", "wrappedArray", "(", "CollectionNumber", "coll", ")", "{", "Object", "data", "=", "wrappedFloatArray", "(", "coll", ")", ";", "if", "(", "data", "!=", "null", ")", "{", "return", "data", ";", "}", "data", "=", "wrappedDoubleAr...
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION. This is provided in case an external routine for computation requires you to use array, and you want to avoid the copy for performance reason. @param coll the collection @return the array or ...
[ "If", "available", "return", "the", "array", "wrapped", "by", "the", "collection", "-", "USE", "WITH", "CAUTION", "AS", "IT", "EXPOSES", "THE", "INTERNAL", "STATE", "OF", "THE", "COLLECTION", ".", "This", "is", "provided", "in", "case", "an", "external", "...
24aca0a173a635aaf0b78d213a3fee8d4f91c077
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/array/CollectionNumbers.java#L28-L54
148,732
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/helper/SDKUtil.java
SDKUtil.generateParameterHash
public static String generateParameterHash(String path, String func, List<String> args) { logger.debug(String.format("GenerateParameterHash : path=%s, func=%s, args=%s", path, func, args)); // Append the arguments StringBuilder param = new StringBuilder(path); param.append(func); args.forEach(param::append);...
java
public static String generateParameterHash(String path, String func, List<String> args) { logger.debug(String.format("GenerateParameterHash : path=%s, func=%s, args=%s", path, func, args)); // Append the arguments StringBuilder param = new StringBuilder(path); param.append(func); args.forEach(param::append);...
[ "public", "static", "String", "generateParameterHash", "(", "String", "path", ",", "String", "func", ",", "List", "<", "String", ">", "args", ")", "{", "logger", ".", "debug", "(", "String", ".", "format", "(", "\"GenerateParameterHash : path=%s, func=%s, args=%s\...
Generate parameter hash for the given chain code path,func and args @param path Chain code path @param func Chain code function name @param args List of arguments @return hash of path, func and args
[ "Generate", "parameter", "hash", "for", "the", "given", "chain", "code", "path", "func", "and", "args" ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/helper/SDKUtil.java#L59-L71
148,733
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/helper/SDKUtil.java
SDKUtil.generateTarGz
public static void generateTarGz(String src, String target) throws IOException { File sourceDirectory = new File(src); File destinationArchive = new File(target); String sourcePath = sourceDirectory.getAbsolutePath(); FileOutputStream destinationOutputStream = new FileOutputStream(destinationArchive); TarAr...
java
public static void generateTarGz(String src, String target) throws IOException { File sourceDirectory = new File(src); File destinationArchive = new File(target); String sourcePath = sourceDirectory.getAbsolutePath(); FileOutputStream destinationOutputStream = new FileOutputStream(destinationArchive); TarAr...
[ "public", "static", "void", "generateTarGz", "(", "String", "src", ",", "String", "target", ")", "throws", "IOException", "{", "File", "sourceDirectory", "=", "new", "File", "(", "src", ")", ";", "File", "destinationArchive", "=", "new", "File", "(", "target...
Compress the given directory src to target tar.gz file @param src The source directory @param target The target tar.gz file @throws IOException
[ "Compress", "the", "given", "directory", "src", "to", "target", "tar", ".", "gz", "file" ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/helper/SDKUtil.java#L124-L159
148,734
iipc/openwayback-access-control
oracle/src/main/java/org/archive/accesscontrol/oracle/AutoFormatView.java
AutoFormatView.viewByContentType
public View viewByContentType(String contentType) { for (View view: views.values()) { if (view.getContentType().equals(contentType)) { return view; } } return null; }
java
public View viewByContentType(String contentType) { for (View view: views.values()) { if (view.getContentType().equals(contentType)) { return view; } } return null; }
[ "public", "View", "viewByContentType", "(", "String", "contentType", ")", "{", "for", "(", "View", "view", ":", "views", ".", "values", "(", ")", ")", "{", "if", "(", "view", ".", "getContentType", "(", ")", ".", "equals", "(", "contentType", ")", ")",...
Return the first view with the given content type. @param contentType @return
[ "Return", "the", "first", "view", "with", "the", "given", "content", "type", "." ]
4a0f70f200fd8d7b6e313624b7628656d834bf31
https://github.com/iipc/openwayback-access-control/blob/4a0f70f200fd8d7b6e313624b7628656d834bf31/oracle/src/main/java/org/archive/accesscontrol/oracle/AutoFormatView.java#L82-L89
148,735
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/MemberServicesImpl.java
MemberServicesImpl.register
public String register(RegistrationRequest req, Member registrar) throws RegistrationException { if (StringUtil.isNullOrEmpty(req.getEnrollmentID())) { throw new IllegalArgumentException("EntrollmentID cannot be null or empty"); } if (registrar == null) { throw new IllegalArgumentException("...
java
public String register(RegistrationRequest req, Member registrar) throws RegistrationException { if (StringUtil.isNullOrEmpty(req.getEnrollmentID())) { throw new IllegalArgumentException("EntrollmentID cannot be null or empty"); } if (registrar == null) { throw new IllegalArgumentException("...
[ "public", "String", "register", "(", "RegistrationRequest", "req", ",", "Member", "registrar", ")", "throws", "RegistrationException", "{", "if", "(", "StringUtil", ".", "isNullOrEmpty", "(", "req", ".", "getEnrollmentID", "(", ")", ")", ")", "{", "throw", "ne...
Register the member and return an enrollment secret. @param req Registration request with the following fields: name, role @param registrar The identity of the registrar (i.e. who is performing the registration)
[ "Register", "the", "member", "and", "return", "an", "enrollment", "secret", "." ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/MemberServicesImpl.java#L130-L174
148,736
zamrokk/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/MemberServicesImpl.java
MemberServicesImpl.processTCertBatch
private List<TCert> processTCertBatch(GetTCertBatchRequest req, TCertCreateSetResp resp) throws NoSuchPaddingException, InvalidKeyException, NoSuchAlgorithmException, IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException, CryptoException, IOException { String...
java
private List<TCert> processTCertBatch(GetTCertBatchRequest req, TCertCreateSetResp resp) throws NoSuchPaddingException, InvalidKeyException, NoSuchAlgorithmException, IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException, CryptoException, IOException { String...
[ "private", "List", "<", "TCert", ">", "processTCertBatch", "(", "GetTCertBatchRequest", "req", ",", "TCertCreateSetResp", "resp", ")", "throws", "NoSuchPaddingException", ",", "InvalidKeyException", ",", "NoSuchAlgorithmException", ",", "IllegalBlockSizeException", ",", "...
Process a batch of tcerts after having retrieved them from the TCA.
[ "Process", "a", "batch", "of", "tcerts", "after", "having", "retrieved", "them", "from", "the", "TCA", "." ]
d4993ca602f72d412cd682e1b92e805e48b27afa
https://github.com/zamrokk/fabric-sdk-java/blob/d4993ca602f72d412cd682e1b92e805e48b27afa/src/main/java/org/hyperledger/fabric/sdk/MemberServicesImpl.java#L281-L333
148,737
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/proposition/stats/RegressionLine.java
RegressionLine.getRMSError
public double getRMSError() { double r = covarCalc.getSumSquaredDeviations() / Math.sqrt(varCalcX.getSumSquaredDeviations() * varCalcY.getSumSquaredDeviations()); return Math.sqrt(1 - r) * varCalcX.getStdDev(); }
java
public double getRMSError() { double r = covarCalc.getSumSquaredDeviations() / Math.sqrt(varCalcX.getSumSquaredDeviations() * varCalcY.getSumSquaredDeviations()); return Math.sqrt(1 - r) * varCalcX.getStdDev(); }
[ "public", "double", "getRMSError", "(", ")", "{", "double", "r", "=", "covarCalc", ".", "getSumSquaredDeviations", "(", ")", "/", "Math", ".", "sqrt", "(", "varCalcX", ".", "getSumSquaredDeviations", "(", ")", "*", "varCalcY", ".", "getSumSquaredDeviations", "...
Returns the r.m.s. error of this regression line. @return the r.m.s. error of this regression line.
[ "Returns", "the", "r", ".", "m", ".", "s", ".", "error", "of", "this", "regression", "line", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/stats/RegressionLine.java#L105-L110
148,738
vtatai/srec
core/src/main/java/com/github/srec/command/ExecutionContext.java
ExecutionContext.isSymbolNull
public boolean isSymbolNull(String name) { CommandSymbol s = findSymbol(name); if (s == null) return true; if (s instanceof VarCommand) { VarCommand var = (VarCommand) s; Value v = var.getValue(this); if (v == null || v.get() == null || v instanceof NilValue) ...
java
public boolean isSymbolNull(String name) { CommandSymbol s = findSymbol(name); if (s == null) return true; if (s instanceof VarCommand) { VarCommand var = (VarCommand) s; Value v = var.getValue(this); if (v == null || v.get() == null || v instanceof NilValue) ...
[ "public", "boolean", "isSymbolNull", "(", "String", "name", ")", "{", "CommandSymbol", "s", "=", "findSymbol", "(", "name", ")", ";", "if", "(", "s", "==", "null", ")", "return", "true", ";", "if", "(", "s", "instanceof", "VarCommand", ")", "{", "VarCo...
Returns true if the symbol is null or has not been defined. @param name The symbol's name @return true if null
[ "Returns", "true", "if", "the", "symbol", "is", "null", "or", "has", "not", "been", "defined", "." ]
87fa6754a6a5f8569ef628db4d149eea04062568
https://github.com/vtatai/srec/blob/87fa6754a6a5f8569ef628db4d149eea04062568/core/src/main/java/com/github/srec/command/ExecutionContext.java#L92-L101
148,739
jboss/jboss-common-beans
src/main/java/org/jboss/common/beans/property/token/ArrayTokenizer.java
ArrayTokenizer.tokenize
public final String[] tokenize(String value) { StringTokenizer stringTokenizer = new StringTokenizer(value, getDelimiters()); String[] broken = new String[stringTokenizer.countTokens()]; for(int index = 0; index< broken.length;index++){ broken[index] = stringTokenizer.nextToken(); ...
java
public final String[] tokenize(String value) { StringTokenizer stringTokenizer = new StringTokenizer(value, getDelimiters()); String[] broken = new String[stringTokenizer.countTokens()]; for(int index = 0; index< broken.length;index++){ broken[index] = stringTokenizer.nextToken(); ...
[ "public", "final", "String", "[", "]", "tokenize", "(", "String", "value", ")", "{", "StringTokenizer", "stringTokenizer", "=", "new", "StringTokenizer", "(", "value", ",", "getDelimiters", "(", ")", ")", ";", "String", "[", "]", "broken", "=", "new", "Str...
Implementation of this method breaks down passed string into tokens. @param value @return
[ "Implementation", "of", "this", "method", "breaks", "down", "passed", "string", "into", "tokens", "." ]
ffb48b1719762534bf92d762eadf91d1815f6748
https://github.com/jboss/jboss-common-beans/blob/ffb48b1719762534bf92d762eadf91d1815f6748/src/main/java/org/jboss/common/beans/property/token/ArrayTokenizer.java#L42-L49
148,740
neilboyd/SendLog
sendlog-library/src/main/java/org/l6n/sendlog/library/SendLogActivityBase.java
SendLogActivityBase.getLogFormat
protected String getLogFormat() { final String[] formats = getResources().getStringArray(R.array.format_list); if (mFormat >= 0 && mFormat < formats.length) { return formats[mFormat]; } return formats[FORMAT_DEFAULT]; }
java
protected String getLogFormat() { final String[] formats = getResources().getStringArray(R.array.format_list); if (mFormat >= 0 && mFormat < formats.length) { return formats[mFormat]; } return formats[FORMAT_DEFAULT]; }
[ "protected", "String", "getLogFormat", "(", ")", "{", "final", "String", "[", "]", "formats", "=", "getResources", "(", ")", ".", "getStringArray", "(", "R", ".", "array", ".", "format_list", ")", ";", "if", "(", "mFormat", ">=", "0", "&&", "mFormat", ...
The log format to use. Default is "time". Override to use a different format. Return null to prompt for format.
[ "The", "log", "format", "to", "use", ".", "Default", "is", "time", ".", "Override", "to", "use", "a", "different", "format", ".", "Return", "null", "to", "prompt", "for", "format", "." ]
5be734165e48047c53c40149554e52eb88b9598c
https://github.com/neilboyd/SendLog/blob/5be734165e48047c53c40149554e52eb88b9598c/sendlog-library/src/main/java/org/l6n/sendlog/library/SendLogActivityBase.java#L71-L77
148,741
neilboyd/SendLog
sendlog-library/src/main/java/org/l6n/sendlog/library/SendLogActivityBase.java
SendLogActivityBase.getMessageText
protected String getMessageText(final File pZipFile, final PackageManager pPackageManager) { String version = ""; try { final PackageInfo pi = pPackageManager.getPackageInfo(getPackageName(), 0); version = " " + pi.versionName; } catch (final PackageManager.NameNotFoundEx...
java
protected String getMessageText(final File pZipFile, final PackageManager pPackageManager) { String version = ""; try { final PackageInfo pi = pPackageManager.getPackageInfo(getPackageName(), 0); version = " " + pi.versionName; } catch (final PackageManager.NameNotFoundEx...
[ "protected", "String", "getMessageText", "(", "final", "File", "pZipFile", ",", "final", "PackageManager", "pPackageManager", ")", "{", "String", "version", "=", "\"\"", ";", "try", "{", "final", "PackageInfo", "pi", "=", "pPackageManager", ".", "getPackageInfo", ...
The text of the email. Override to use different text. @param pZipFile the file containing the zipped log @param pPackageManager the package manager @return the message text
[ "The", "text", "of", "the", "email", ".", "Override", "to", "use", "different", "text", "." ]
5be734165e48047c53c40149554e52eb88b9598c
https://github.com/neilboyd/SendLog/blob/5be734165e48047c53c40149554e52eb88b9598c/sendlog-library/src/main/java/org/l6n/sendlog/library/SendLogActivityBase.java#L89-L100
148,742
openbase/jul
extension/type/util/src/main/java/org/openbase/jul/extension/type/util/TransactionSynchronizationFuture.java
TransactionSynchronizationFuture.beforeWaitForSynchronization
@Override protected void beforeWaitForSynchronization(final T message) throws CouldNotPerformException { transactionIdField = ProtoBufFieldProcessor.getFieldDescriptor(message, TransactionIdProvider.TRANSACTION_ID_FIELD_NAME); if (transactionIdField == null) { throw new NotAvailableExcep...
java
@Override protected void beforeWaitForSynchronization(final T message) throws CouldNotPerformException { transactionIdField = ProtoBufFieldProcessor.getFieldDescriptor(message, TransactionIdProvider.TRANSACTION_ID_FIELD_NAME); if (transactionIdField == null) { throw new NotAvailableExcep...
[ "@", "Override", "protected", "void", "beforeWaitForSynchronization", "(", "final", "T", "message", ")", "throws", "CouldNotPerformException", "{", "transactionIdField", "=", "ProtoBufFieldProcessor", ".", "getFieldDescriptor", "(", "message", ",", "TransactionIdProvider", ...
Verify that the internal future has a transaction id field and that this field is of type long. @param message the returned message from the internal future @throws CouldNotPerformException if the message does not have a transaction id field
[ "Verify", "that", "the", "internal", "future", "has", "a", "transaction", "id", "field", "and", "that", "this", "field", "is", "of", "type", "long", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/util/src/main/java/org/openbase/jul/extension/type/util/TransactionSynchronizationFuture.java#L67-L77
148,743
openbase/jul
extension/type/util/src/main/java/org/openbase/jul/extension/type/util/TransactionSynchronizationFuture.java
TransactionSynchronizationFuture.check
@Override protected boolean check(T message) throws CouldNotPerformException { // get transaction id from message final long transactionId = (long) message.getField(transactionIdField); // to work with older versions where no transaction id has been accept empty ids and print a warning ...
java
@Override protected boolean check(T message) throws CouldNotPerformException { // get transaction id from message final long transactionId = (long) message.getField(transactionIdField); // to work with older versions where no transaction id has been accept empty ids and print a warning ...
[ "@", "Override", "protected", "boolean", "check", "(", "T", "message", ")", "throws", "CouldNotPerformException", "{", "// get transaction id from message", "final", "long", "transactionId", "=", "(", "long", ")", "message", ".", "getField", "(", "transactionIdField",...
Verify that the transaction id of the data provider is greater or equal to the transaction id in the given message. @param message the return value of the internal future @return true if the transaction id of the data provider is greater or equal than the one in the internal message @throws CouldNotPerformException ...
[ "Verify", "that", "the", "transaction", "id", "of", "the", "data", "provider", "is", "greater", "or", "equal", "to", "the", "transaction", "id", "in", "the", "given", "message", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/util/src/main/java/org/openbase/jul/extension/type/util/TransactionSynchronizationFuture.java#L89-L103
148,744
openbase/jul
visual/javafx/src/main/java/org/openbase/jul/visual/javafx/animation/Animations.java
Animations.createFadeTransition
public static FadeTransition createFadeTransition(final Node node, final double fromValue, final double toValue, final int cycleCount, final double duration) { assert node != null; final FadeTransition fadeTransition = new FadeTransition(Duration.millis(duration), node); fadeTransition....
java
public static FadeTransition createFadeTransition(final Node node, final double fromValue, final double toValue, final int cycleCount, final double duration) { assert node != null; final FadeTransition fadeTransition = new FadeTransition(Duration.millis(duration), node); fadeTransition....
[ "public", "static", "FadeTransition", "createFadeTransition", "(", "final", "Node", "node", ",", "final", "double", "fromValue", ",", "final", "double", "toValue", ",", "final", "int", "cycleCount", ",", "final", "double", "duration", ")", "{", "assert", "node",...
Method to create a FadeTransition with several parameters. @param node the node to which the transition should be applied @param fromValue the opacity value from which the transition should start @param toValue the opacity value where the transition should end @param cycleCount the number of times the animation should...
[ "Method", "to", "create", "a", "FadeTransition", "with", "several", "parameters", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/visual/javafx/src/main/java/org/openbase/jul/visual/javafx/animation/Animations.java#L65-L74
148,745
openbase/jul
visual/javafx/src/main/java/org/openbase/jul/visual/javafx/animation/Animations.java
Animations.createRotateTransition
public static RotateTransition createRotateTransition(final Node node, final double fromAngle, final double toAngle, final int cycleCount, final double duration, final Interpolator interpolator, final boolean autoReverse) { assert node != null; final RotateTransition rotateTransition = new Rota...
java
public static RotateTransition createRotateTransition(final Node node, final double fromAngle, final double toAngle, final int cycleCount, final double duration, final Interpolator interpolator, final boolean autoReverse) { assert node != null; final RotateTransition rotateTransition = new Rota...
[ "public", "static", "RotateTransition", "createRotateTransition", "(", "final", "Node", "node", ",", "final", "double", "fromAngle", ",", "final", "double", "toAngle", ",", "final", "int", "cycleCount", ",", "final", "double", "duration", ",", "final", "Interpolat...
Method to create a RotateTransition with several parameters. @param node the node to which the transition should be applied. @param fromAngle the rotation angle where the transition should start. @param toAngle the rotation angle where the transition should end. @param cycleCount the number of times the animation shou...
[ "Method", "to", "create", "a", "RotateTransition", "with", "several", "parameters", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/visual/javafx/src/main/java/org/openbase/jul/visual/javafx/animation/Animations.java#L89-L99
148,746
f2prateek/ln
ln/src/main/java/com/f2prateek/ln/DebugLn.java
DebugLn.println
protected void println(int priority, String msg) { Log.println(priority, processTag(packageName), processMessage(msg)); }
java
protected void println(int priority, String msg) { Log.println(priority, processTag(packageName), processMessage(msg)); }
[ "protected", "void", "println", "(", "int", "priority", ",", "String", "msg", ")", "{", "Log", ".", "println", "(", "priority", ",", "processTag", "(", "packageName", ")", ",", "processMessage", "(", "msg", ")", ")", ";", "}" ]
Print the message. This method simply prints to {@link android.util.Log}. Override this to use the log level feature and post to your endpoint. @param priority The message priority to print. @param msg The message to print.
[ "Print", "the", "message", "." ]
a84d1a7a4d8fc3c46f6917b0e19862282b878378
https://github.com/f2prateek/ln/blob/a84d1a7a4d8fc3c46f6917b0e19862282b878378/ln/src/main/java/com/f2prateek/ln/DebugLn.java#L220-L222
148,747
f2prateek/ln
ln/src/main/java/com/f2prateek/ln/DebugLn.java
DebugLn.processMessage
protected String processMessage(String msg) { return String.format(MSG_FORMAT, Thread.currentThread().getName(), msg); }
java
protected String processMessage(String msg) { return String.format(MSG_FORMAT, Thread.currentThread().getName(), msg); }
[ "protected", "String", "processMessage", "(", "String", "msg", ")", "{", "return", "String", ".", "format", "(", "MSG_FORMAT", ",", "Thread", ".", "currentThread", "(", ")", ".", "getName", "(", ")", ",", "msg", ")", ";", "}" ]
Provide a message for logging. This prepends the current thread to the message. Override this if you want to filter sensitive information, or add extra information to each message before dispatching. @param msg The message evaluated from the format, arguments and exceptions. @return The message that is logged
[ "Provide", "a", "message", "for", "logging", ".", "This", "prepends", "the", "current", "thread", "to", "the", "message", ".", "Override", "this", "if", "you", "want", "to", "filter", "sensitive", "information", "or", "add", "extra", "information", "to", "ea...
a84d1a7a4d8fc3c46f6917b0e19862282b878378
https://github.com/f2prateek/ln/blob/a84d1a7a4d8fc3c46f6917b0e19862282b878378/ln/src/main/java/com/f2prateek/ln/DebugLn.java#L232-L234
148,748
f2prateek/ln
ln/src/main/java/com/f2prateek/ln/DebugLn.java
DebugLn.processTag
protected String processTag(String packageName) { final int skipDepth = 6; // skip 6 stackframes to find the location where this was called final Thread thread = Thread.currentThread(); final StackTraceElement trace = thread.getStackTrace()[skipDepth]; return String.format(TAG_FORMAT, packageName, trace...
java
protected String processTag(String packageName) { final int skipDepth = 6; // skip 6 stackframes to find the location where this was called final Thread thread = Thread.currentThread(); final StackTraceElement trace = thread.getStackTrace()[skipDepth]; return String.format(TAG_FORMAT, packageName, trace...
[ "protected", "String", "processTag", "(", "String", "packageName", ")", "{", "final", "int", "skipDepth", "=", "6", ";", "// skip 6 stackframes to find the location where this was called", "final", "Thread", "thread", "=", "Thread", ".", "currentThread", "(", ")", ";"...
Provide a tag for logging. By default this returns a tag with the package name, file name, and line number of the calling function. Override this to show different information in the tag. @param packageName the packageName of the app @return the tag to log with
[ "Provide", "a", "tag", "for", "logging", ".", "By", "default", "this", "returns", "a", "tag", "with", "the", "package", "name", "file", "name", "and", "line", "number", "of", "the", "calling", "function", ".", "Override", "this", "to", "show", "different",...
a84d1a7a4d8fc3c46f6917b0e19862282b878378
https://github.com/f2prateek/ln/blob/a84d1a7a4d8fc3c46f6917b0e19862282b878378/ln/src/main/java/com/f2prateek/ln/DebugLn.java#L244-L249
148,749
openbase/jul
storage/src/main/java/org/openbase/jul/storage/registry/RemoteRegistry.java
RemoteRegistry.waitForData
public void waitForData() throws InterruptedException { try { if (registryRemote == null) { waitForValue(); return; } getRegistryRemote().waitForData(); } catch (CouldNotPerformException ex) { ExceptionPrinter.printHistory("...
java
public void waitForData() throws InterruptedException { try { if (registryRemote == null) { waitForValue(); return; } getRegistryRemote().waitForData(); } catch (CouldNotPerformException ex) { ExceptionPrinter.printHistory("...
[ "public", "void", "waitForData", "(", ")", "throws", "InterruptedException", "{", "try", "{", "if", "(", "registryRemote", "==", "null", ")", "{", "waitForValue", "(", ")", ";", "return", ";", "}", "getRegistryRemote", "(", ")", ".", "waitForData", "(", ")...
Method blocks until the remote registry is synchronized. @throws InterruptedException is thrown in case the thread is externally interrupted.
[ "Method", "blocks", "until", "the", "remote", "registry", "is", "synchronized", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/storage/src/main/java/org/openbase/jul/storage/registry/RemoteRegistry.java#L270-L280
148,750
foundation-runtime/configuration
configuration-api/src/main/java/com/cisco/oss/foundation/configuration/validation/BaseConfiguration.java
BaseConfiguration.configurationChanged
@Override public void configurationChanged() { HashSet<Param> changedParams = new HashSet(); // read dynamic parameters for (Param param : parameters) { if (! param.isStatic()) { // preserve current value Object oldValue = param.getValue(); ...
java
@Override public void configurationChanged() { HashSet<Param> changedParams = new HashSet(); // read dynamic parameters for (Param param : parameters) { if (! param.isStatic()) { // preserve current value Object oldValue = param.getValue(); ...
[ "@", "Override", "public", "void", "configurationChanged", "(", ")", "{", "HashSet", "<", "Param", ">", "changedParams", "=", "new", "HashSet", "(", ")", ";", "// read dynamic parameters", "for", "(", "Param", "param", ":", "parameters", ")", "{", "if", "(",...
notified on reload configuration event
[ "notified", "on", "reload", "configuration", "event" ]
c5bd171a2cca0dc1c8d568f987843ca47c6d1eed
https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/validation/BaseConfiguration.java#L115-L148
148,751
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/system/NativeLibraryLoader.java
NativeLibraryLoader.loadLib
private Throwable loadLib(String _lib) { try { System.load(_lib); return null; } catch (Throwable _ex) { return _ex; } }
java
private Throwable loadLib(String _lib) { try { System.load(_lib); return null; } catch (Throwable _ex) { return _ex; } }
[ "private", "Throwable", "loadLib", "(", "String", "_lib", ")", "{", "try", "{", "System", ".", "load", "(", "_lib", ")", ";", "return", "null", ";", "}", "catch", "(", "Throwable", "_ex", ")", "{", "return", "_ex", ";", "}", "}" ]
Tries to load a library from the given path. Will catches exceptions and return them to the caller. Will return null if no exception has been thrown. @param _lib library @return null on success, {@link Throwable} otherwise
[ "Tries", "to", "load", "a", "library", "from", "the", "given", "path", ".", "Will", "catches", "exceptions", "and", "return", "them", "to", "the", "caller", ".", "Will", "return", "null", "if", "no", "exception", "has", "been", "thrown", "." ]
407c32d6b485596d4d2b644f5f7fc7a02d0169c6
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/system/NativeLibraryLoader.java#L179-L186
148,752
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/system/NativeLibraryLoader.java
NativeLibraryLoader.extractToTemp
private File extractToTemp(InputStream _fileToExtract, String _tmpName, String _fileSuffix) throws IOException { if (_fileToExtract == null) { throw new IOException("Null stream"); } File tempFile = File.createTempFile(_tmpName, _fileSuffix); tempFile.deleteOnExit(); ...
java
private File extractToTemp(InputStream _fileToExtract, String _tmpName, String _fileSuffix) throws IOException { if (_fileToExtract == null) { throw new IOException("Null stream"); } File tempFile = File.createTempFile(_tmpName, _fileSuffix); tempFile.deleteOnExit(); ...
[ "private", "File", "extractToTemp", "(", "InputStream", "_fileToExtract", ",", "String", "_tmpName", ",", "String", "_fileSuffix", ")", "throws", "IOException", "{", "if", "(", "_fileToExtract", "==", "null", ")", "{", "throw", "new", "IOException", "(", "\"Null...
Extract the file behind InputStream _fileToExtract to the tmp-folder. @param _fileToExtract InputStream with file to extract @param _tmpName temp file name @param _fileSuffix temp file suffix @return temp file object @throws IOException on any error
[ "Extract", "the", "file", "behind", "InputStream", "_fileToExtract", "to", "the", "tmp", "-", "folder", "." ]
407c32d6b485596d4d2b644f5f7fc7a02d0169c6
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/system/NativeLibraryLoader.java#L235-L259
148,753
kevoree/kevoree-library
toys/src/main/java/com/rendion/jchrome/JChromeTabbedPane.java
JChromeTabbedPane.mouseReleased
public void mouseReleased(MouseEvent e) { if (!hasFocus) { return; } boolean repaint = tabRowPainter.mouseReleased(e); if (!repaint) { repaint = toolbarPainter.mouseReleased(e); } }
java
public void mouseReleased(MouseEvent e) { if (!hasFocus) { return; } boolean repaint = tabRowPainter.mouseReleased(e); if (!repaint) { repaint = toolbarPainter.mouseReleased(e); } }
[ "public", "void", "mouseReleased", "(", "MouseEvent", "e", ")", "{", "if", "(", "!", "hasFocus", ")", "{", "return", ";", "}", "boolean", "repaint", "=", "tabRowPainter", ".", "mouseReleased", "(", "e", ")", ";", "if", "(", "!", "repaint", ")", "{", ...
the event was consumed - DO NOT PAINT
[ "the", "event", "was", "consumed", "-", "DO", "NOT", "PAINT" ]
617460e6c5881902ebc488a31ecdea179024d8f1
https://github.com/kevoree/kevoree-library/blob/617460e6c5881902ebc488a31ecdea179024d8f1/toys/src/main/java/com/rendion/jchrome/JChromeTabbedPane.java#L270-L281
148,754
ops4j/org.ops4j.pax.wicket
service/src/main/java/org/ops4j/pax/wicket/internal/servlet/ServletCallInterceptor.java
ServletCallInterceptor.isProxied
private boolean isProxied(HttpServletRequest httpServletRequest) { if (Proxy.isProxyClass(httpServletRequest.getClass())) { InvocationHandler handler = Proxy.getInvocationHandler(httpServletRequest); return handler instanceof ServletRequestInvocationHandler; } return fals...
java
private boolean isProxied(HttpServletRequest httpServletRequest) { if (Proxy.isProxyClass(httpServletRequest.getClass())) { InvocationHandler handler = Proxy.getInvocationHandler(httpServletRequest); return handler instanceof ServletRequestInvocationHandler; } return fals...
[ "private", "boolean", "isProxied", "(", "HttpServletRequest", "httpServletRequest", ")", "{", "if", "(", "Proxy", ".", "isProxyClass", "(", "httpServletRequest", ".", "getClass", "(", ")", ")", ")", "{", "InvocationHandler", "handler", "=", "Proxy", ".", "getInv...
Check if this request is already proxied by pax wicket @param httpServletRequest @return true if the instance is a proxy and invocationhandler is a {@link ServletRequestInvocationHandler}
[ "Check", "if", "this", "request", "is", "already", "proxied", "by", "pax", "wicket" ]
ef7cb4bdf918e9e61ec69789b9c690567616faa9
https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/internal/servlet/ServletCallInterceptor.java#L194-L200
148,755
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/proposition/interval/Relation.java
Relation.hasRelation
public boolean hasRelation(Interval interval1, Interval interval2) { if (interval1 == null || interval2 == null) { return false; } Long minStart1 = interval1.getMinimumStart(); Long maxStart1 = interval1.getMaximumStart(); Long minFinish1 = interval1.getMinimumFinish(...
java
public boolean hasRelation(Interval interval1, Interval interval2) { if (interval1 == null || interval2 == null) { return false; } Long minStart1 = interval1.getMinimumStart(); Long maxStart1 = interval1.getMaximumStart(); Long minFinish1 = interval1.getMinimumFinish(...
[ "public", "boolean", "hasRelation", "(", "Interval", "interval1", ",", "Interval", "interval2", ")", "{", "if", "(", "interval1", "==", "null", "||", "interval2", "==", "null", ")", "{", "return", "false", ";", "}", "Long", "minStart1", "=", "interval1", "...
Determines whether the given intervals have this relation. @param interval1 the left-hand-side {@link Interval}. @param interval2 the right-hand-side {@link Interval}. @return <code>true</code> if the intervals have this relation, <code>false</code> otherwise. Returns <code>false</code> if any <code>null</code> argume...
[ "Determines", "whether", "the", "given", "intervals", "have", "this", "relation", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/Relation.java#L288-L308
148,756
ebean-orm/querybean-agent-now-merged-into-ebean-agent-
src/main/java/io/ebean/typequery/agent/offline/InputStreamTransform.java
InputStreamTransform.transform
public byte[] transform(String className, File file) throws IOException, IllegalClassFormatException { try { return transform(className, new FileInputStream(file)); } catch (FileNotFoundException e){ throw new RuntimeException(e); } }
java
public byte[] transform(String className, File file) throws IOException, IllegalClassFormatException { try { return transform(className, new FileInputStream(file)); } catch (FileNotFoundException e){ throw new RuntimeException(e); } }
[ "public", "byte", "[", "]", "transform", "(", "String", "className", ",", "File", "file", ")", "throws", "IOException", ",", "IllegalClassFormatException", "{", "try", "{", "return", "transform", "(", "className", ",", "new", "FileInputStream", "(", "file", ")...
Transform a file.
[ "Transform", "a", "file", "." ]
a063554fabdbed15ff5e10ad0a0b53b67e039006
https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/offline/InputStreamTransform.java#L39-L46
148,757
ebean-orm/querybean-agent-now-merged-into-ebean-agent-
src/main/java/io/ebean/typequery/agent/offline/InputStreamTransform.java
InputStreamTransform.transform
public byte[] transform(String className, InputStream is) throws IOException, IllegalClassFormatException { try { byte[] classBytes = readBytes(is); return transformer.transform(classLoader, className, null, null, classBytes); } finally { if (is != null){ is.close(); } } }
java
public byte[] transform(String className, InputStream is) throws IOException, IllegalClassFormatException { try { byte[] classBytes = readBytes(is); return transformer.transform(classLoader, className, null, null, classBytes); } finally { if (is != null){ is.close(); } } }
[ "public", "byte", "[", "]", "transform", "(", "String", "className", ",", "InputStream", "is", ")", "throws", "IOException", ",", "IllegalClassFormatException", "{", "try", "{", "byte", "[", "]", "classBytes", "=", "readBytes", "(", "is", ")", ";", "return",...
Transform a input stream.
[ "Transform", "a", "input", "stream", "." ]
a063554fabdbed15ff5e10ad0a0b53b67e039006
https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/offline/InputStreamTransform.java#L51-L64
148,758
ebean-orm/querybean-agent-now-merged-into-ebean-agent-
src/main/java/io/ebean/typequery/agent/offline/InputStreamTransform.java
InputStreamTransform.writeBytes
public static void writeBytes(byte[] bytes, OutputStream os) throws IOException { BufferedOutputStream bos = new BufferedOutputStream(os); ByteArrayInputStream bis = new ByteArrayInputStream(bytes); byte[] buf = new byte[1028]; int len; while ((len = bis.read(buf, 0, buf.length)) > -1){ bos.wri...
java
public static void writeBytes(byte[] bytes, OutputStream os) throws IOException { BufferedOutputStream bos = new BufferedOutputStream(os); ByteArrayInputStream bis = new ByteArrayInputStream(bytes); byte[] buf = new byte[1028]; int len; while ((len = bis.read(buf, 0, buf.length)) > -1){ bos.wri...
[ "public", "static", "void", "writeBytes", "(", "byte", "[", "]", "bytes", ",", "OutputStream", "os", ")", "throws", "IOException", "{", "BufferedOutputStream", "bos", "=", "new", "BufferedOutputStream", "(", "os", ")", ";", "ByteArrayInputStream", "bis", "=", ...
Helper method to write bytes to a OutputStream.
[ "Helper", "method", "to", "write", "bytes", "to", "a", "OutputStream", "." ]
a063554fabdbed15ff5e10ad0a0b53b67e039006
https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/offline/InputStreamTransform.java#L76-L93
148,759
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java
AbstractRemoteClient.init
@Override public void init(final String scope) throws InitializationException, InterruptedException { try { init(ScopeProcessor.generateScope(scope)); } catch (CouldNotPerformException | NullPointerException ex) { throw new InitializationException(this, ex); } }
java
@Override public void init(final String scope) throws InitializationException, InterruptedException { try { init(ScopeProcessor.generateScope(scope)); } catch (CouldNotPerformException | NullPointerException ex) { throw new InitializationException(this, ex); } }
[ "@", "Override", "public", "void", "init", "(", "final", "String", "scope", ")", "throws", "InitializationException", ",", "InterruptedException", "{", "try", "{", "init", "(", "ScopeProcessor", ".", "generateScope", "(", "scope", ")", ")", ";", "}", "catch", ...
Initialize the remote on a scope. @param scope the scope where the remote communicates @throws InitializationException if the initialization fails @throws InterruptedException if the initialization is interrupted
[ "Initialize", "the", "remote", "on", "a", "scope", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java#L167-L174
148,760
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java
AbstractRemoteClient.unlock
@Override public void unlock(final Object maintainer) throws CouldNotPerformException { synchronized (maintainerLock) { if (this.maintainer != null && this.maintainer != maintainer) { throw new CouldNotPerformException("Could not unlock remote because it is locked by another inst...
java
@Override public void unlock(final Object maintainer) throws CouldNotPerformException { synchronized (maintainerLock) { if (this.maintainer != null && this.maintainer != maintainer) { throw new CouldNotPerformException("Could not unlock remote because it is locked by another inst...
[ "@", "Override", "public", "void", "unlock", "(", "final", "Object", "maintainer", ")", "throws", "CouldNotPerformException", "{", "synchronized", "(", "maintainerLock", ")", "{", "if", "(", "this", ".", "maintainer", "!=", "null", "&&", "this", ".", "maintain...
Method unlocks this instance. @param maintainer the instance which currently holds the lock. @throws CouldNotPerformException is thrown if the instance could not be unlocked.
[ "Method", "unlocks", "this", "instance", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java#L329-L337
148,761
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java
AbstractRemoteClient.addHandler
public void addHandler(final Handler handler, final boolean wait) throws InterruptedException, CouldNotPerformException { try { listener.addHandler(handler, wait); } catch (CouldNotPerformException ex) { throw new CouldNotPerformException("Could not register Handler!", ex); ...
java
public void addHandler(final Handler handler, final boolean wait) throws InterruptedException, CouldNotPerformException { try { listener.addHandler(handler, wait); } catch (CouldNotPerformException ex) { throw new CouldNotPerformException("Could not register Handler!", ex); ...
[ "public", "void", "addHandler", "(", "final", "Handler", "handler", ",", "final", "boolean", "wait", ")", "throws", "InterruptedException", ",", "CouldNotPerformException", "{", "try", "{", "listener", ".", "addHandler", "(", "handler", ",", "wait", ")", ";", ...
Method adds an handler to the internal rsb listener. @param handler @param wait @throws InterruptedException @throws CouldNotPerformException
[ "Method", "adds", "an", "handler", "to", "the", "internal", "rsb", "listener", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java#L358-L364
148,762
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java
AbstractRemoteClient.deactivate
public void deactivate(final Object maintainer) throws InterruptedException, CouldNotPerformException, VerificationFailedException { if (this.maintainer.equals(maintainer)) { synchronized (maintainerLock) { unlock(maintainer); deactivate(); lock(mainta...
java
public void deactivate(final Object maintainer) throws InterruptedException, CouldNotPerformException, VerificationFailedException { if (this.maintainer.equals(maintainer)) { synchronized (maintainerLock) { unlock(maintainer); deactivate(); lock(mainta...
[ "public", "void", "deactivate", "(", "final", "Object", "maintainer", ")", "throws", "InterruptedException", ",", "CouldNotPerformException", ",", "VerificationFailedException", "{", "if", "(", "this", ".", "maintainer", ".", "equals", "(", "maintainer", ")", ")", ...
Atomic deactivate which makes sure that the maintainer stays the same. @param maintainer the current maintainer of this remote @throws InterruptedException if deactivation is interrupted @throws CouldNotPerformException if deactivation fails @throws VerificationFailedException is thrown if the given maintai...
[ "Atomic", "deactivate", "which", "makes", "sure", "that", "the", "maintainer", "stays", "the", "same", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java#L441-L451
148,763
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java
AbstractRemoteClient.sync
private Future<M> sync() { logger.debug("Synchronization of Remote[" + this + "] triggered..."); try { validateInitialization(); try { SyncTaskCallable syncCallable = new SyncTaskCallable(); final Future<M> currentSyncTask = GlobalCachedExecutorSe...
java
private Future<M> sync() { logger.debug("Synchronization of Remote[" + this + "] triggered..."); try { validateInitialization(); try { SyncTaskCallable syncCallable = new SyncTaskCallable(); final Future<M> currentSyncTask = GlobalCachedExecutorSe...
[ "private", "Future", "<", "M", ">", "sync", "(", ")", "{", "logger", ".", "debug", "(", "\"Synchronization of Remote[\"", "+", "this", "+", "\"] triggered...\"", ")", ";", "try", "{", "validateInitialization", "(", ")", ";", "try", "{", "SyncTaskCallable", "...
Method forces a server - remote data sync and returns the new acquired data. Can be useful for initial data sync or data sync after reconnection. @return fresh synchronized data object.
[ "Method", "forces", "a", "server", "-", "remote", "data", "sync", "and", "returns", "the", "new", "acquired", "data", ".", "Can", "be", "useful", "for", "initial", "data", "sync", "or", "data", "sync", "after", "reconnection", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java#L983-L999
148,764
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java
AbstractRemoteClient.shutdown
@Override public void shutdown() { try { verifyMaintainability(); } catch (VerificationFailedException ex) { throw new RuntimeException("Can not shutdown " + this + "!", ex); } this.shutdownInitiated = true; try { dataObservable.shutdown()...
java
@Override public void shutdown() { try { verifyMaintainability(); } catch (VerificationFailedException ex) { throw new RuntimeException("Can not shutdown " + this + "!", ex); } this.shutdownInitiated = true; try { dataObservable.shutdown()...
[ "@", "Override", "public", "void", "shutdown", "(", ")", "{", "try", "{", "verifyMaintainability", "(", ")", ";", "}", "catch", "(", "VerificationFailedException", "ex", ")", "{", "throw", "new", "RuntimeException", "(", "\"Can not shutdown \"", "+", "this", "...
This method deactivates the remote and cleans all resources.
[ "This", "method", "deactivates", "the", "remote", "and", "cleans", "all", "resources", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java#L1079-L1097
148,765
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java
AbstractRemoteClient.notifyPrioritizedObservers
private void notifyPrioritizedObservers(final M data) throws CouldNotPerformException { try { internalPrioritizedDataObservable.notifyObservers(data); } catch (CouldNotPerformException ex) { throw ex; } finally { long newTransactionId = (Long) getDataField(Tra...
java
private void notifyPrioritizedObservers(final M data) throws CouldNotPerformException { try { internalPrioritizedDataObservable.notifyObservers(data); } catch (CouldNotPerformException ex) { throw ex; } finally { long newTransactionId = (Long) getDataField(Tra...
[ "private", "void", "notifyPrioritizedObservers", "(", "final", "M", "data", ")", "throws", "CouldNotPerformException", "{", "try", "{", "internalPrioritizedDataObservable", ".", "notifyObservers", "(", "data", ")", ";", "}", "catch", "(", "CouldNotPerformException", "...
Notify all observers registered on the prioritized observable and retrieve the new transaction id. The transaction id is updated here to guarantee that the prioritized observables have been notified before transaction sync futures return. @param data the data type notified. @throws CouldNotPerformException if notific...
[ "Notify", "all", "observers", "registered", "on", "the", "prioritized", "observable", "and", "retrieve", "the", "new", "transaction", "id", ".", "The", "transaction", "id", "is", "updated", "here", "to", "guarantee", "that", "the", "prioritized", "observables", ...
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java#L1140-L1154
148,766
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java
AbstractRemoteClient.waitForConnectionState
@Override public void waitForConnectionState(final ConnectionState.State connectionState, long timeout) throws InterruptedException, TimeoutException, CouldNotPerformException { synchronized (connectionMonitor) { boolean delayDetected = false; while (!Thread.currentThread().isInterru...
java
@Override public void waitForConnectionState(final ConnectionState.State connectionState, long timeout) throws InterruptedException, TimeoutException, CouldNotPerformException { synchronized (connectionMonitor) { boolean delayDetected = false; while (!Thread.currentThread().isInterru...
[ "@", "Override", "public", "void", "waitForConnectionState", "(", "final", "ConnectionState", ".", "State", "connectionState", ",", "long", "timeout", ")", "throws", "InterruptedException", ",", "TimeoutException", ",", "CouldNotPerformException", "{", "synchronized", "...
Method blocks until the remote reaches the desired connection state. In case the timeout is expired an TimeoutException will be thrown. @param connectionState the desired connection state @param timeout the timeout in milliseconds until the method throw a TimeoutException in case the connection state was not r...
[ "Method", "blocks", "until", "the", "remote", "reaches", "the", "desired", "connection", "state", ".", "In", "case", "the", "timeout", "is", "expired", "an", "TimeoutException", "will", "be", "thrown", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java#L1321-L1356
148,767
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java
AbstractRemoteClient.waitForConnectionState
public void waitForConnectionState(final ConnectionState.State connectionState) throws InterruptedException, CouldNotPerformException { try { waitForConnectionState(connectionState, 0); } catch (TimeoutException ex) { assert false; } }
java
public void waitForConnectionState(final ConnectionState.State connectionState) throws InterruptedException, CouldNotPerformException { try { waitForConnectionState(connectionState, 0); } catch (TimeoutException ex) { assert false; } }
[ "public", "void", "waitForConnectionState", "(", "final", "ConnectionState", ".", "State", "connectionState", ")", "throws", "InterruptedException", ",", "CouldNotPerformException", "{", "try", "{", "waitForConnectionState", "(", "connectionState", ",", "0", ")", ";", ...
Method blocks until the remote reaches the desired connection state. @param connectionState the desired connection state @throws InterruptedException is thrown in case the thread is externally interrupted. @throws org.openbase.jul.exception.CouldNotPerformException is thrown in case the...
[ "Method", "blocks", "until", "the", "remote", "reaches", "the", "desired", "connection", "state", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java#L1382-L1388
148,768
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java
AbstractRemoteClient.applyDataUpdate
private void applyDataUpdate(final M data) { this.data = data; CompletableFutureLite<M> currentSyncFuture = null; Future<M> currentSyncTask = null; // Check if sync is in process. synchronized (syncMonitor) { if (syncFuture != null) { currentSyncFutur...
java
private void applyDataUpdate(final M data) { this.data = data; CompletableFutureLite<M> currentSyncFuture = null; Future<M> currentSyncTask = null; // Check if sync is in process. synchronized (syncMonitor) { if (syncFuture != null) { currentSyncFutur...
[ "private", "void", "applyDataUpdate", "(", "final", "M", "data", ")", "{", "this", ".", "data", "=", "data", ";", "CompletableFutureLite", "<", "M", ">", "currentSyncFuture", "=", "null", ";", "Future", "<", "M", ">", "currentSyncTask", "=", "null", ";", ...
Method is used to internally update the data object. @param data
[ "Method", "is", "used", "to", "internally", "update", "the", "data", "object", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java#L1410-L1447
148,769
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/valueset/ValueSet.java
ValueSet.isInValueSet
public boolean isInValueSet(Value value) { if (value == null) { throw new IllegalArgumentException("value cannot be null"); } boolean result = true; if (!this.valuesKeySet.isEmpty()) { result = this.valuesKeySet.contains(value); } else if (this.lowerBound...
java
public boolean isInValueSet(Value value) { if (value == null) { throw new IllegalArgumentException("value cannot be null"); } boolean result = true; if (!this.valuesKeySet.isEmpty()) { result = this.valuesKeySet.contains(value); } else if (this.lowerBound...
[ "public", "boolean", "isInValueSet", "(", "Value", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"value cannot be null\"", ")", ";", "}", "boolean", "result", "=", "true", ";", "if", "(", ...
Returns whether the specified value is in the value set. @param value a {@link Value}. Cannot be <code>null</code>. @return <code>true</code> or <code>false</code>.
[ "Returns", "whether", "the", "specified", "value", "is", "in", "the", "value", "set", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/valueset/ValueSet.java#L187-L208
148,770
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/valueset/ValueSet.java
ValueSet.displayName
public String displayName(Value value) { if (value == null) { throw new IllegalArgumentException("value cannot be null"); } ValueSetElement vse = this.values.get(value); if (vse != null) { return vse.getDisplayName(); } else { return ""; ...
java
public String displayName(Value value) { if (value == null) { throw new IllegalArgumentException("value cannot be null"); } ValueSetElement vse = this.values.get(value); if (vse != null) { return vse.getDisplayName(); } else { return ""; ...
[ "public", "String", "displayName", "(", "Value", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"value cannot be null\"", ")", ";", "}", "ValueSetElement", "vse", "=", "this", ".", "values", ...
Returns a display name for the specified value, if one is defined. @param value a {@link Value}. Cannot be <code>null</code>. @return a {@link String}.
[ "Returns", "a", "display", "name", "for", "the", "specified", "value", "if", "one", "is", "defined", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/valueset/ValueSet.java#L216-L227
148,771
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/valueset/ValueSet.java
ValueSet.abbrevDisplayName
public String abbrevDisplayName(Value value) { if (value == null) { throw new IllegalArgumentException("value cannot be null"); } ValueSetElement vse = this.values.get(value); if (vse != null) { return vse.getAbbrevDisplayName(); } else { retu...
java
public String abbrevDisplayName(Value value) { if (value == null) { throw new IllegalArgumentException("value cannot be null"); } ValueSetElement vse = this.values.get(value); if (vse != null) { return vse.getAbbrevDisplayName(); } else { retu...
[ "public", "String", "abbrevDisplayName", "(", "Value", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"value cannot be null\"", ")", ";", "}", "ValueSetElement", "vse", "=", "this", ".", "value...
Returns an abbreviated display name for the specified value, if one is defined. @param value a {@link Value}. Cannot be <code>null</code>. @return a {@link String}.
[ "Returns", "an", "abbreviated", "display", "name", "for", "the", "specified", "value", "if", "one", "is", "defined", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/valueset/ValueSet.java#L236-L247
148,772
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/CompareUtil.java
CompareUtil.isAnyNull
public static boolean isAnyNull(Object... _objects) { if (_objects == null) { return true; } for (Object obj : _objects) { if (obj == null) { return true; } } return false; }
java
public static boolean isAnyNull(Object... _objects) { if (_objects == null) { return true; } for (Object obj : _objects) { if (obj == null) { return true; } } return false; }
[ "public", "static", "boolean", "isAnyNull", "(", "Object", "...", "_objects", ")", "{", "if", "(", "_objects", "==", "null", ")", "{", "return", "true", ";", "}", "for", "(", "Object", "obj", ":", "_objects", ")", "{", "if", "(", "obj", "==", "null",...
Checks if any of the passed in objects is null. @param _objects array of objects, may be null @return true if null found, false otherwise
[ "Checks", "if", "any", "of", "the", "passed", "in", "objects", "is", "null", "." ]
407c32d6b485596d4d2b644f5f7fc7a02d0169c6
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/CompareUtil.java#L21-L31
148,773
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/CompareUtil.java
CompareUtil.isAnyFileMissing
public static String isAnyFileMissing(File... _files) { if (_files == null) { return "null"; } for (File obj : _files) { if (obj != null && !obj.exists()) { return obj.toString(); } else if (obj == null) { return null; ...
java
public static String isAnyFileMissing(File... _files) { if (_files == null) { return "null"; } for (File obj : _files) { if (obj != null && !obj.exists()) { return obj.toString(); } else if (obj == null) { return null; ...
[ "public", "static", "String", "isAnyFileMissing", "(", "File", "...", "_files", ")", "{", "if", "(", "_files", "==", "null", ")", "{", "return", "\"null\"", ";", "}", "for", "(", "File", "obj", ":", "_files", ")", "{", "if", "(", "obj", "!=", "null",...
Checks if any of the passed in files are non-existing. @param _files array of files @return the filename of the missing file, otherwise returns null.
[ "Checks", "if", "any", "of", "the", "passed", "in", "files", "are", "non", "-", "existing", "." ]
407c32d6b485596d4d2b644f5f7fc7a02d0169c6
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/CompareUtil.java#L50-L62
148,774
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/CompareUtil.java
CompareUtil.equalsOne
public static boolean equalsOne(Object _obj, Object... _arrObj) { if (_obj == null || _arrObj == null) { return false; } for (Object o : _arrObj) { if (o != null && _obj.equals(o)) { return true; } } return false; }
java
public static boolean equalsOne(Object _obj, Object... _arrObj) { if (_obj == null || _arrObj == null) { return false; } for (Object o : _arrObj) { if (o != null && _obj.equals(o)) { return true; } } return false; }
[ "public", "static", "boolean", "equalsOne", "(", "Object", "_obj", ",", "Object", "...", "_arrObj", ")", "{", "if", "(", "_obj", "==", "null", "||", "_arrObj", "==", "null", ")", "{", "return", "false", ";", "}", "for", "(", "Object", "o", ":", "_arr...
Returns true if the specified object equals at least one of the specified other objects. @param _obj object @param _arrObj array of objects to compare to @return true if equal, false otherwise or if either parameter is null
[ "Returns", "true", "if", "the", "specified", "object", "equals", "at", "least", "one", "of", "the", "specified", "other", "objects", "." ]
407c32d6b485596d4d2b644f5f7fc7a02d0169c6
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/CompareUtil.java#L96-L106
148,775
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/CompareUtil.java
CompareUtil.mapContainsKeys
public static boolean mapContainsKeys(Map<?, ?> _map, Object... _keys) { if (_map == null) { return false; } else if (_keys == null) { return true; } for (Object key : _keys) { if (key != null && !_map.containsKey(key)) { return false; ...
java
public static boolean mapContainsKeys(Map<?, ?> _map, Object... _keys) { if (_map == null) { return false; } else if (_keys == null) { return true; } for (Object key : _keys) { if (key != null && !_map.containsKey(key)) { return false; ...
[ "public", "static", "boolean", "mapContainsKeys", "(", "Map", "<", "?", ",", "?", ">", "_map", ",", "Object", "...", "_keys", ")", "{", "if", "(", "_map", "==", "null", ")", "{", "return", "false", ";", "}", "else", "if", "(", "_keys", "==", "null"...
Checks whether a map contains all of the specified keys. @param _map map @param _keys one or more keys @return true if all keys found in map, false otherwise
[ "Checks", "whether", "a", "map", "contains", "all", "of", "the", "specified", "keys", "." ]
407c32d6b485596d4d2b644f5f7fc7a02d0169c6
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/CompareUtil.java#L114-L126
148,776
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/CompareUtil.java
CompareUtil.startsWithAny
public static boolean startsWithAny(String _str, String... _startStrings) { if (_str == null || _startStrings == null || _startStrings.length == 0) { return false; } for (String start : _startStrings) { if (_str.startsWith(start)) { return true; ...
java
public static boolean startsWithAny(String _str, String... _startStrings) { if (_str == null || _startStrings == null || _startStrings.length == 0) { return false; } for (String start : _startStrings) { if (_str.startsWith(start)) { return true; ...
[ "public", "static", "boolean", "startsWithAny", "(", "String", "_str", ",", "String", "...", "_startStrings", ")", "{", "if", "(", "_str", "==", "null", "||", "_startStrings", "==", "null", "||", "_startStrings", ".", "length", "==", "0", ")", "{", "return...
Checks if given String starts with any of the other given parameters. @param _str string to check @param _startStrings start strings to compare @return true if any match, false otherwise
[ "Checks", "if", "given", "String", "starts", "with", "any", "of", "the", "other", "given", "parameters", "." ]
407c32d6b485596d4d2b644f5f7fc7a02d0169c6
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/CompareUtil.java#L135-L147
148,777
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/AbstractPropositionDefinition.java
AbstractPropositionDefinition.setInverseIsA
public void setInverseIsA(String... inverseIsA) { ProtempaUtil.checkArrayForNullElement(inverseIsA, "inverseIsA"); ProtempaUtil.checkArrayForDuplicates(inverseIsA, "inverseIsA"); this.inverseIsA = inverseIsA.clone(); recalculateChildren(); }
java
public void setInverseIsA(String... inverseIsA) { ProtempaUtil.checkArrayForNullElement(inverseIsA, "inverseIsA"); ProtempaUtil.checkArrayForDuplicates(inverseIsA, "inverseIsA"); this.inverseIsA = inverseIsA.clone(); recalculateChildren(); }
[ "public", "void", "setInverseIsA", "(", "String", "...", "inverseIsA", ")", "{", "ProtempaUtil", ".", "checkArrayForNullElement", "(", "inverseIsA", ",", "\"inverseIsA\"", ")", ";", "ProtempaUtil", ".", "checkArrayForDuplicates", "(", "inverseIsA", ",", "\"inverseIsA\...
Sets the children of this proposition definition. @param inverseIsA a {@link String[]} of proposition definition ids. No <code>null</code> or duplicate elements allowed.
[ "Sets", "the", "children", "of", "this", "proposition", "definition", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/AbstractPropositionDefinition.java#L188-L193
148,778
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/AbstractPropositionDefinition.java
AbstractPropositionDefinition.reset
public void reset() { setDisplayName(null); setAbbreviatedDisplayName(null); setDescription(null); setInverseIsA(ArrayUtils.EMPTY_STRING_ARRAY); setTermIds(ArrayUtils.EMPTY_STRING_ARRAY); setPropertyDefinitions(new PropertyDefinition[]{}); setReferenceDefinitions(...
java
public void reset() { setDisplayName(null); setAbbreviatedDisplayName(null); setDescription(null); setInverseIsA(ArrayUtils.EMPTY_STRING_ARRAY); setTermIds(ArrayUtils.EMPTY_STRING_ARRAY); setPropertyDefinitions(new PropertyDefinition[]{}); setReferenceDefinitions(...
[ "public", "void", "reset", "(", ")", "{", "setDisplayName", "(", "null", ")", ";", "setAbbreviatedDisplayName", "(", "null", ")", ";", "setDescription", "(", "null", ")", ";", "setInverseIsA", "(", "ArrayUtils", ".", "EMPTY_STRING_ARRAY", ")", ";", "setTermIds...
Resets this proposition definition to default values.
[ "Resets", "this", "proposition", "definition", "to", "default", "values", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/AbstractPropositionDefinition.java#L361-L373
148,779
udoprog/tiny-serializer-java
tiny-serializer-processor/src/main/java/eu/toolchain/serializer/processor/ClassProcessor.java
ClassProcessor.getKinds
Set<ElementKind> getKinds(Element element) { final ImmutableSet.Builder<ElementKind> kinds = ImmutableSet.builder(); if (element.getKind() == ElementKind.INTERFACE) { kinds.add(ElementKind.METHOD); } if (element.getKind() == ElementKind.CLASS) { kinds.add(ElementKind.FIELD); if (ele...
java
Set<ElementKind> getKinds(Element element) { final ImmutableSet.Builder<ElementKind> kinds = ImmutableSet.builder(); if (element.getKind() == ElementKind.INTERFACE) { kinds.add(ElementKind.METHOD); } if (element.getKind() == ElementKind.CLASS) { kinds.add(ElementKind.FIELD); if (ele...
[ "Set", "<", "ElementKind", ">", "getKinds", "(", "Element", "element", ")", "{", "final", "ImmutableSet", ".", "Builder", "<", "ElementKind", ">", "kinds", "=", "ImmutableSet", ".", "builder", "(", ")", ";", "if", "(", "element", ".", "getKind", "(", ")"...
Get the set of supported element kinds that make up the total set of fields for this type. @param element @return
[ "Get", "the", "set", "of", "supported", "element", "kinds", "that", "make", "up", "the", "total", "set", "of", "fields", "for", "this", "type", "." ]
e2a7d9e7eb9125a51a17ba3abad0b291a97f9c6f
https://github.com/udoprog/tiny-serializer-java/blob/e2a7d9e7eb9125a51a17ba3abad0b291a97f9c6f/tiny-serializer-processor/src/main/java/eu/toolchain/serializer/processor/ClassProcessor.java#L109-L125
148,780
eurekaclinical/protempa
protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/oracle/OjdbcOracleInClause.java
Ojdbc6OracleInClause.generateClause
@Override public String generateClause() { StringBuilder wherePart = new StringBuilder(); wherePart.append(referenceIndices.generateColumnReference(columnSpec)); if (not) { wherePart.append(" NOT"); } wherePart.append(" IN ("); for (int k = 0; k < elements...
java
@Override public String generateClause() { StringBuilder wherePart = new StringBuilder(); wherePart.append(referenceIndices.generateColumnReference(columnSpec)); if (not) { wherePart.append(" NOT"); } wherePart.append(" IN ("); for (int k = 0; k < elements...
[ "@", "Override", "public", "String", "generateClause", "(", ")", "{", "StringBuilder", "wherePart", "=", "new", "StringBuilder", "(", ")", ";", "wherePart", ".", "append", "(", "referenceIndices", ".", "generateColumnReference", "(", "columnSpec", ")", ")", ";",...
Oracle doesn't allow more than 1000 elements in an IN clause, so if we want more than 1000 we create multiple IN clauses chained together by OR.
[ "Oracle", "doesn", "t", "allow", "more", "than", "1000", "elements", "in", "an", "IN", "clause", "so", "if", "we", "want", "more", "than", "1000", "we", "create", "multiple", "IN", "clauses", "chained", "together", "by", "OR", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/oracle/OjdbcOracleInClause.java#L49-L73
148,781
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/backend/dsb/filter/AbstractFilter.java
AbstractFilter.filterChainToArray
@Override public Filter[] filterChainToArray() { int length = chainLength(); Filter[] array = new Filter[length]; Filter thisFilter = this; for (int i = 0; i < length; i++) { array[i] = thisFilter; thisFilter = thisFilter.getAnd(); } return arr...
java
@Override public Filter[] filterChainToArray() { int length = chainLength(); Filter[] array = new Filter[length]; Filter thisFilter = this; for (int i = 0; i < length; i++) { array[i] = thisFilter; thisFilter = thisFilter.getAnd(); } return arr...
[ "@", "Override", "public", "Filter", "[", "]", "filterChainToArray", "(", ")", "{", "int", "length", "=", "chainLength", "(", ")", ";", "Filter", "[", "]", "array", "=", "new", "Filter", "[", "length", "]", ";", "Filter", "thisFilter", "=", "this", ";"...
Return an array that contains all of the filters in the chain.
[ "Return", "an", "array", "that", "contains", "all", "of", "the", "filters", "in", "the", "chain", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/backend/dsb/filter/AbstractFilter.java#L143-L153
148,782
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/dest/proplist/PropositionListQueryResultsHandler.java
PropositionListQueryResultsHandler.handleQueryResult
@Override public void handleQueryResult(String key, List<Proposition> propositions, Map<Proposition, Set<Proposition>> forwardDerivations, Map<Proposition, Set<Proposition>> backwardDerivations, Map<UniqueId, Proposition> references) throws QueryResultsHandlerProcessingExceptio...
java
@Override public void handleQueryResult(String key, List<Proposition> propositions, Map<Proposition, Set<Proposition>> forwardDerivations, Map<Proposition, Set<Proposition>> backwardDerivations, Map<UniqueId, Proposition> references) throws QueryResultsHandlerProcessingExceptio...
[ "@", "Override", "public", "void", "handleQueryResult", "(", "String", "key", ",", "List", "<", "Proposition", ">", "propositions", ",", "Map", "<", "Proposition", ",", "Set", "<", "Proposition", ">", ">", "forwardDerivations", ",", "Map", "<", "Proposition", ...
Writes a keys worth of data in tab delimited format optionally sorted. @param key a key id {@link String}. @param propositions a {@link List<Proposition>}. @throws QueryResultsHandlerProcessingException if an error occurred writing to the specified file, output stream or writer.
[ "Writes", "a", "keys", "worth", "of", "data", "in", "tab", "delimited", "format", "optionally", "sorted", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/dest/proplist/PropositionListQueryResultsHandler.java#L110-L129
148,783
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/LowLevelAbstractionDefinition.java
LowLevelAbstractionDefinition.addPrimitiveParameterId
public boolean addPrimitiveParameterId(String paramId) { boolean result = this.paramIds.add(paramId); if (result) { recalculateChildren(); } return result; }
java
public boolean addPrimitiveParameterId(String paramId) { boolean result = this.paramIds.add(paramId); if (result) { recalculateChildren(); } return result; }
[ "public", "boolean", "addPrimitiveParameterId", "(", "String", "paramId", ")", "{", "boolean", "result", "=", "this", ".", "paramIds", ".", "add", "(", "paramId", ")", ";", "if", "(", "result", ")", "{", "recalculateChildren", "(", ")", ";", "}", "return",...
Adds a primitive parameter from which this abstraction is inferred. @param paramId a primitive parameter id <code>String</code>. @return <code>true</code> if adding the parameter id was successful, <code>false</code> otherwise (e.g., <code>paramId</code> was <code>null</code>).
[ "Adds", "a", "primitive", "parameter", "from", "which", "this", "abstraction", "is", "inferred", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/LowLevelAbstractionDefinition.java#L386-L392
148,784
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/LowLevelAbstractionDefinition.java
LowLevelAbstractionDefinition.removePrimitiveParameterId
public boolean removePrimitiveParameterId(String paramId) { boolean result = this.paramIds.remove(paramId); if (result) { recalculateChildren(); } return result; }
java
public boolean removePrimitiveParameterId(String paramId) { boolean result = this.paramIds.remove(paramId); if (result) { recalculateChildren(); } return result; }
[ "public", "boolean", "removePrimitiveParameterId", "(", "String", "paramId", ")", "{", "boolean", "result", "=", "this", ".", "paramIds", ".", "remove", "(", "paramId", ")", ";", "if", "(", "result", ")", "{", "recalculateChildren", "(", ")", ";", "}", "re...
Removes a primitive parameter from which this abstraction is inferred. @param paramId a primitive parameter id <code>String</code>. @return <code>true</code> if removingg the parameter id was successful, <code>false</code> otherwise (e.g., <code>paramId</code> was <code>null</code> or not previously added to this abst...
[ "Removes", "a", "primitive", "parameter", "from", "which", "this", "abstraction", "is", "inferred", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/LowLevelAbstractionDefinition.java#L404-L410
148,785
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/AlgorithmSourceImpl.java
AlgorithmSourceImpl.readAlgorithm
@Override public Algorithm readAlgorithm(String id) throws AlgorithmSourceReadException { Algorithm result = null; if (id != null) { if (algorithms != null) { result = algorithms.getAlgorithm(id); } if (result == null) { initializeI...
java
@Override public Algorithm readAlgorithm(String id) throws AlgorithmSourceReadException { Algorithm result = null; if (id != null) { if (algorithms != null) { result = algorithms.getAlgorithm(id); } if (result == null) { initializeI...
[ "@", "Override", "public", "Algorithm", "readAlgorithm", "(", "String", "id", ")", "throws", "AlgorithmSourceReadException", "{", "Algorithm", "result", "=", "null", ";", "if", "(", "id", "!=", "null", ")", "{", "if", "(", "algorithms", "!=", "null", ")", ...
Read an algorithm with the given id. @param id an algorithm id {@link String}. @return an {@link Algorithm} object, or <code>null</code> if no algorithm with the specified id exists. If a <code>null</code> id is * specified, <code>null</code> is returned. @throws AlgorithmSourceReadException when an error occurs...
[ "Read", "an", "algorithm", "with", "the", "given", "id", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/AlgorithmSourceImpl.java#L73-L92
148,786
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/AlgorithmSourceImpl.java
AlgorithmSourceImpl.readAlgorithms
@Override public Set<Algorithm> readAlgorithms() throws AlgorithmSourceReadException { initializeIfNeeded(); if (algorithms != null) { if (!readAlgorithmsCalled && getBackends() != null) { for (AlgorithmSourceBackend backend : getBackends()) { backend....
java
@Override public Set<Algorithm> readAlgorithms() throws AlgorithmSourceReadException { initializeIfNeeded(); if (algorithms != null) { if (!readAlgorithmsCalled && getBackends() != null) { for (AlgorithmSourceBackend backend : getBackends()) { backend....
[ "@", "Override", "public", "Set", "<", "Algorithm", ">", "readAlgorithms", "(", ")", "throws", "AlgorithmSourceReadException", "{", "initializeIfNeeded", "(", ")", ";", "if", "(", "algorithms", "!=", "null", ")", "{", "if", "(", "!", "readAlgorithmsCalled", "&...
Reads all algorithms in this algorithm source. @return an unmodifiable <code>Set</code> of <code>Algorithm</code> objects. Guaranteed not to return <code>null</code>. @throws AlgorithmSourceReadException when an error occurs in a backend reading an algorithm.
[ "Reads", "all", "algorithms", "in", "this", "algorithm", "source", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/AlgorithmSourceImpl.java#L103-L116
148,787
foundation-runtime/configuration
configuration-api/src/main/java/com/cisco/oss/foundation/configuration/ConfigUtil.java
ConfigUtil.getHierarchicalConfiguration
public static HierarchicalConfiguration getHierarchicalConfiguration(final Configuration configuration) { if (configuration instanceof CompositeConfiguration) { final CompositeConfiguration compositeConfig = (CompositeConfiguration) configuration; for (int i = 0; i < compositeConfig.getN...
java
public static HierarchicalConfiguration getHierarchicalConfiguration(final Configuration configuration) { if (configuration instanceof CompositeConfiguration) { final CompositeConfiguration compositeConfig = (CompositeConfiguration) configuration; for (int i = 0; i < compositeConfig.getN...
[ "public", "static", "HierarchicalConfiguration", "getHierarchicalConfiguration", "(", "final", "Configuration", "configuration", ")", "{", "if", "(", "configuration", "instanceof", "CompositeConfiguration", ")", "{", "final", "CompositeConfiguration", "compositeConfig", "=", ...
returns the hierarchical part of a configuration @param configuration the given configuration @return the hierarchical configuration or null if not found in the given configuration object.
[ "returns", "the", "hierarchical", "part", "of", "a", "configuration" ]
c5bd171a2cca0dc1c8d568f987843ca47c6d1eed
https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/ConfigUtil.java#L60-L73
148,788
foundation-runtime/configuration
configuration-api/src/main/java/com/cisco/oss/foundation/configuration/ConfigUtil.java
ConfigUtil.createCompositeConfiguration
public static Configuration createCompositeConfiguration(final Class<?> clazz, final Configuration configuration) { final CompositeConfiguration compositeConfiguration = new CompositeConfiguration(); final Configuration defaultConfiguration = ConfigurationFactory.getDefaultConfiguration(); if (c...
java
public static Configuration createCompositeConfiguration(final Class<?> clazz, final Configuration configuration) { final CompositeConfiguration compositeConfiguration = new CompositeConfiguration(); final Configuration defaultConfiguration = ConfigurationFactory.getDefaultConfiguration(); if (c...
[ "public", "static", "Configuration", "createCompositeConfiguration", "(", "final", "Class", "<", "?", ">", "clazz", ",", "final", "Configuration", "configuration", ")", "{", "final", "CompositeConfiguration", "compositeConfiguration", "=", "new", "CompositeConfiguration",...
create a composite configuration that wraps the configuration sent by the user. this util will also load the "defaultConfig.properties" file loaded relative to the given "clazz" parameter @param clazz - the class that acts as referenced location of "defaultConfig.properties". @param configuration - the configuration s...
[ "create", "a", "composite", "configuration", "that", "wraps", "the", "configuration", "sent", "by", "the", "user", ".", "this", "util", "will", "also", "load", "the", "defaultConfig", ".", "properties", "file", "loaded", "relative", "to", "the", "given", "claz...
c5bd171a2cca0dc1c8d568f987843ca47c6d1eed
https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/ConfigUtil.java#L88-L96
148,789
foundation-runtime/configuration
configuration-api/src/main/java/com/cisco/oss/foundation/configuration/ConfigUtil.java
ConfigUtil.getInnerMapKey
private static String getInnerMapKey(final String key) { final int index = key.indexOf("."); return key.substring(index + 1); }
java
private static String getInnerMapKey(final String key) { final int index = key.indexOf("."); return key.substring(index + 1); }
[ "private", "static", "String", "getInnerMapKey", "(", "final", "String", "key", ")", "{", "final", "int", "index", "=", "key", ".", "indexOf", "(", "\".\"", ")", ";", "return", "key", ".", "substring", "(", "index", "+", "1", ")", ";", "}" ]
create inner key map by taking what ever is after the first dot. @param key @return
[ "create", "inner", "key", "map", "by", "taking", "what", "ever", "is", "after", "the", "first", "dot", "." ]
c5bd171a2cca0dc1c8d568f987843ca47c6d1eed
https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/ConfigUtil.java#L226-L229
148,790
foundation-runtime/configuration
configuration-api/src/main/java/com/cisco/oss/foundation/configuration/ConfigUtil.java
ConfigUtil.stripKey
private static String stripKey(final String key) { int index = key.indexOf("."); if (index > 0) { return key.substring(0, index); } return null; }
java
private static String stripKey(final String key) { int index = key.indexOf("."); if (index > 0) { return key.substring(0, index); } return null; }
[ "private", "static", "String", "stripKey", "(", "final", "String", "key", ")", "{", "int", "index", "=", "key", ".", "indexOf", "(", "\".\"", ")", ";", "if", "(", "index", ">", "0", ")", "{", "return", "key", ".", "substring", "(", "0", ",", "index...
strip the original key by taking every thing from the start of the original key to the first dot. @param key @return
[ "strip", "the", "original", "key", "by", "taking", "every", "thing", "from", "the", "start", "of", "the", "original", "key", "to", "the", "first", "dot", "." ]
c5bd171a2cca0dc1c8d568f987843ca47c6d1eed
https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/ConfigUtil.java#L238-L244
148,791
foundation-runtime/configuration
configuration-api/src/main/java/com/cisco/oss/foundation/configuration/ConfigUtil.java
ConfigUtil.isHexadecimal
public static boolean isHexadecimal(String value) { if (value == null || value.length() == 0) { return false; } // validate string is hexadecimal value if (! HEX_REGEX_PATTERN.matcher(value).matches()) { return false; } return true; }
java
public static boolean isHexadecimal(String value) { if (value == null || value.length() == 0) { return false; } // validate string is hexadecimal value if (! HEX_REGEX_PATTERN.matcher(value).matches()) { return false; } return true; }
[ "public", "static", "boolean", "isHexadecimal", "(", "String", "value", ")", "{", "if", "(", "value", "==", "null", "||", "value", ".", "length", "(", ")", "==", "0", ")", "{", "return", "false", ";", "}", "// validate string is hexadecimal value", "if", "...
return if the given string is a valid hexadecimal string
[ "return", "if", "the", "given", "string", "is", "a", "valid", "hexadecimal", "string" ]
c5bd171a2cca0dc1c8d568f987843ca47c6d1eed
https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/ConfigUtil.java#L323-L335
148,792
vtatai/srec
core/src/main/java/com/github/srec/command/base/IfCommand.java
IfCommand.evaluateCondition
public boolean evaluateCondition(ExecutionContext context) { Value v = condition.getValue(context); return !(v instanceof NilValue || (v instanceof BooleanValue && !((BooleanValue) v).get())); }
java
public boolean evaluateCondition(ExecutionContext context) { Value v = condition.getValue(context); return !(v instanceof NilValue || (v instanceof BooleanValue && !((BooleanValue) v).get())); }
[ "public", "boolean", "evaluateCondition", "(", "ExecutionContext", "context", ")", "{", "Value", "v", "=", "condition", ".", "getValue", "(", "context", ")", ";", "return", "!", "(", "v", "instanceof", "NilValue", "||", "(", "v", "instanceof", "BooleanValue", ...
Evaluates the elsif condition. @param context The EC @return true if this block should run, false otherwise
[ "Evaluates", "the", "elsif", "condition", "." ]
87fa6754a6a5f8569ef628db4d149eea04062568
https://github.com/vtatai/srec/blob/87fa6754a6a5f8569ef628db4d149eea04062568/core/src/main/java/com/github/srec/command/base/IfCommand.java#L81-L84
148,793
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/PropositionCopier.java
PropositionCopier.grab
void grab(KnowledgeHelper kh) { assert kh != null : "kh cannot be null"; assert this.kh == null : "The previous user of this copier forgot to call release!"; if (this.kh != null) { LOGGER.log(Level.WARNING, "The previous user of this copier forgot to call release...
java
void grab(KnowledgeHelper kh) { assert kh != null : "kh cannot be null"; assert this.kh == null : "The previous user of this copier forgot to call release!"; if (this.kh != null) { LOGGER.log(Level.WARNING, "The previous user of this copier forgot to call release...
[ "void", "grab", "(", "KnowledgeHelper", "kh", ")", "{", "assert", "kh", "!=", "null", ":", "\"kh cannot be null\"", ";", "assert", "this", ".", "kh", "==", "null", ":", "\"The previous user of this copier forgot to call release!\"", ";", "if", "(", "this", ".", ...
Grabs this copier for use by a Drools consequence. @param workingMemory the consequence's {@link WorkingMemory}. Cannot be <code>null</code>.
[ "Grabs", "this", "copier", "for", "use", "by", "a", "Drools", "consequence", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/PropositionCopier.java#L88-L99
148,794
ebean-orm/querybean-agent-now-merged-into-ebean-agent-
src/main/java/io/ebean/typequery/agent/Distill.java
Distill.parsePackages
static String[] parsePackages(String packages) { if (packages == null || packages.trim().length() == 0) { return new String[0]; } String[] commaSplit = packages.split(","); String[] processPackages = new String[commaSplit.length]; for (int i = 0; i < commaSplit.length; i++) { processPac...
java
static String[] parsePackages(String packages) { if (packages == null || packages.trim().length() == 0) { return new String[0]; } String[] commaSplit = packages.split(","); String[] processPackages = new String[commaSplit.length]; for (int i = 0; i < commaSplit.length; i++) { processPac...
[ "static", "String", "[", "]", "parsePackages", "(", "String", "packages", ")", "{", "if", "(", "packages", "==", "null", "||", "packages", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{", "return", "new", "String", "[", "0", "]"...
Split using delimiter and convert to slash notation.
[ "Split", "using", "delimiter", "and", "convert", "to", "slash", "notation", "." ]
a063554fabdbed15ff5e10ad0a0b53b67e039006
https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/Distill.java#L13-L24
148,795
ebean-orm/querybean-agent-now-merged-into-ebean-agent-
src/main/java/io/ebean/typequery/agent/Distill.java
Distill.convert
static DetectQueryBean convert(Collection<String> packages) { String[] asArray = packages.toArray(new String[packages.size()]); for (int i = 0; i < asArray.length; i++) { asArray[i] = convert(asArray[i]); } return new DetectQueryBean(asArray); }
java
static DetectQueryBean convert(Collection<String> packages) { String[] asArray = packages.toArray(new String[packages.size()]); for (int i = 0; i < asArray.length; i++) { asArray[i] = convert(asArray[i]); } return new DetectQueryBean(asArray); }
[ "static", "DetectQueryBean", "convert", "(", "Collection", "<", "String", ">", "packages", ")", "{", "String", "[", "]", "asArray", "=", "packages", ".", "toArray", "(", "new", "String", "[", "packages", ".", "size", "(", ")", "]", ")", ";", "for", "("...
Convert the dot notation entity bean packages to slash notation. @param packages entity bean packages
[ "Convert", "the", "dot", "notation", "entity", "bean", "packages", "to", "slash", "notation", "." ]
a063554fabdbed15ff5e10ad0a0b53b67e039006
https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/Distill.java#L41-L48
148,796
ebean-orm/querybean-agent-now-merged-into-ebean-agent-
src/main/java/io/ebean/typequery/agent/Distill.java
Distill.convert
private static String convert(String pkg) { pkg = pkg.trim(); if (pkg.endsWith("*")) { pkg = pkg.substring(0, pkg.length() - 1); } if (pkg.endsWith(".query")) { // always work with entity bean packages so trim pkg = pkg.substring(0, pkg.length() - 6); } pkg = pkg.replace('.', ...
java
private static String convert(String pkg) { pkg = pkg.trim(); if (pkg.endsWith("*")) { pkg = pkg.substring(0, pkg.length() - 1); } if (pkg.endsWith(".query")) { // always work with entity bean packages so trim pkg = pkg.substring(0, pkg.length() - 6); } pkg = pkg.replace('.', ...
[ "private", "static", "String", "convert", "(", "String", "pkg", ")", "{", "pkg", "=", "pkg", ".", "trim", "(", ")", ";", "if", "(", "pkg", ".", "endsWith", "(", "\"*\"", ")", ")", "{", "pkg", "=", "pkg", ".", "substring", "(", "0", ",", "pkg", ...
Concert package to slash notation taking into account trailing wildcard.
[ "Concert", "package", "to", "slash", "notation", "taking", "into", "account", "trailing", "wildcard", "." ]
a063554fabdbed15ff5e10ad0a0b53b67e039006
https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/Distill.java#L53-L65
148,797
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractControllerServer.java
AbstractControllerServer.getManageLock
protected CloseableLockProvider getManageLock() { return new CloseableLockProvider() { @Override public CloseableReadLockWrapper getCloseableReadLock(final Object consumer) { return getManageReadLock(consumer); } @Override public Clos...
java
protected CloseableLockProvider getManageLock() { return new CloseableLockProvider() { @Override public CloseableReadLockWrapper getCloseableReadLock(final Object consumer) { return getManageReadLock(consumer); } @Override public Clos...
[ "protected", "CloseableLockProvider", "getManageLock", "(", ")", "{", "return", "new", "CloseableLockProvider", "(", ")", "{", "@", "Override", "public", "CloseableReadLockWrapper", "getCloseableReadLock", "(", "final", "Object", "consumer", ")", "{", "return", "getMa...
This method generates a closable lock provider. Be informed that the controller and all its services are directly locked and internal builder operations are queued. Therefore please release the locks after usage, otherwise the overall processing pipeline is delayed. Note: Be aware that your access is time limited an t...
[ "This", "method", "generates", "a", "closable", "lock", "provider", ".", "Be", "informed", "that", "the", "controller", "and", "all", "its", "services", "are", "directly", "locked", "and", "internal", "builder", "operations", "are", "queued", ".", "Therefore", ...
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractControllerServer.java#L618-L631
148,798
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractControllerServer.java
AbstractControllerServer.notifyChange
@Override public void notifyChange() throws CouldNotPerformException, InterruptedException { logger.debug("Notify data change of " + this); // synchronized by manageable lock to prevent reinit between validateInitialization and publish M newData; manageLock.lockWrite(this); t...
java
@Override public void notifyChange() throws CouldNotPerformException, InterruptedException { logger.debug("Notify data change of " + this); // synchronized by manageable lock to prevent reinit between validateInitialization and publish M newData; manageLock.lockWrite(this); t...
[ "@", "Override", "public", "void", "notifyChange", "(", ")", "throws", "CouldNotPerformException", ",", "InterruptedException", "{", "logger", ".", "debug", "(", "\"Notify data change of \"", "+", "this", ")", ";", "// synchronized by manageable lock to prevent reinit betwe...
Synchronize all registered remote instances about a data change. @throws CouldNotPerformException @throws java.lang.InterruptedException
[ "Synchronize", "all", "registered", "remote", "instances", "about", "a", "data", "change", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractControllerServer.java#L654-L698
148,799
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractControllerServer.java
AbstractControllerServer.isReady
@Override public Boolean isReady() { try { validateInitialization(); validateActivation(); validateMiddleware(); return true; } catch (InvalidStateException e) { return false; } }
java
@Override public Boolean isReady() { try { validateInitialization(); validateActivation(); validateMiddleware(); return true; } catch (InvalidStateException e) { return false; } }
[ "@", "Override", "public", "Boolean", "isReady", "(", ")", "{", "try", "{", "validateInitialization", "(", ")", ";", "validateActivation", "(", ")", ";", "validateMiddleware", "(", ")", ";", "return", "true", ";", "}", "catch", "(", "InvalidStateException", ...
Method returns true if this instance was initialized, activated and is successfully connected to the middleware. @return returns true if this instance is ready otherwise false.
[ "Method", "returns", "true", "if", "this", "instance", "was", "initialized", "activated", "and", "is", "successfully", "connected", "to", "the", "middleware", "." ]
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractControllerServer.java#L970-L980