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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
154,100 | watchrabbit/rabbit-commons | src/main/java/com/watchrabbit/commons/clock/Stopwatch.java | Stopwatch.createStarted | public static Stopwatch createStarted(VoidCallable callable) {
Stopwatch stopwatch = new Stopwatch();
stopwatch.callable = callable;
stopwatch.start();
return stopwatch;
} | java | public static Stopwatch createStarted(VoidCallable callable) {
Stopwatch stopwatch = new Stopwatch();
stopwatch.callable = callable;
stopwatch.start();
return stopwatch;
} | [
"public",
"static",
"Stopwatch",
"createStarted",
"(",
"VoidCallable",
"callable",
")",
"{",
"Stopwatch",
"stopwatch",
"=",
"new",
"Stopwatch",
"(",
")",
";",
"stopwatch",
".",
"callable",
"=",
"callable",
";",
"stopwatch",
".",
"start",
"(",
")",
";",
"retu... | Creates Stopwatch around passed callable and invokes callable.
@param callable with invocation time would be measured
@return | [
"Creates",
"Stopwatch",
"around",
"passed",
"callable",
"and",
"invokes",
"callable",
"."
] | b11c9f804b5ab70b9264635c34a02f5029bd2a5d | https://github.com/watchrabbit/rabbit-commons/blob/b11c9f804b5ab70b9264635c34a02f5029bd2a5d/src/main/java/com/watchrabbit/commons/clock/Stopwatch.java#L54-L59 |
154,101 | watchrabbit/rabbit-commons | src/main/java/com/watchrabbit/commons/clock/Stopwatch.java | Stopwatch.start | public Stopwatch start() {
nanosStart = System.nanoTime();
callable.call();
ended = true;
nanosEnd = System.nanoTime();
return this;
} | java | public Stopwatch start() {
nanosStart = System.nanoTime();
callable.call();
ended = true;
nanosEnd = System.nanoTime();
return this;
} | [
"public",
"Stopwatch",
"start",
"(",
")",
"{",
"nanosStart",
"=",
"System",
".",
"nanoTime",
"(",
")",
";",
"callable",
".",
"call",
"(",
")",
";",
"ended",
"=",
"true",
";",
"nanosEnd",
"=",
"System",
".",
"nanoTime",
"(",
")",
";",
"return",
"this"... | Invokes passed callable and measures time.
@return | [
"Invokes",
"passed",
"callable",
"and",
"measures",
"time",
"."
] | b11c9f804b5ab70b9264635c34a02f5029bd2a5d | https://github.com/watchrabbit/rabbit-commons/blob/b11c9f804b5ab70b9264635c34a02f5029bd2a5d/src/main/java/com/watchrabbit/commons/clock/Stopwatch.java#L66-L72 |
154,102 | StefanLiebenberg/kute | kute-core/src/main/java/slieb/kute/Kute.java | Kute.renameResource | public static RenamedPathResource renameResource(String path,
Resource.Readable resource) {
return new RenamedPathResource(path, resource);
} | java | public static RenamedPathResource renameResource(String path,
Resource.Readable resource) {
return new RenamedPathResource(path, resource);
} | [
"public",
"static",
"RenamedPathResource",
"renameResource",
"(",
"String",
"path",
",",
"Resource",
".",
"Readable",
"resource",
")",
"{",
"return",
"new",
"RenamedPathResource",
"(",
"path",
",",
"resource",
")",
";",
"}"
] | Create a resource with alternate name
@param resource Any resource.
@param path The new path location for this resource.
@return A resource of type A extends Resource that is a copy of the old resource, but with a new name. | [
"Create",
"a",
"resource",
"with",
"alternate",
"name"
] | 1db0e8d2c76459d22c7d4b0ba99c18f74748f6fd | https://github.com/StefanLiebenberg/kute/blob/1db0e8d2c76459d22c7d4b0ba99c18f74748f6fd/kute-core/src/main/java/slieb/kute/Kute.java#L176-L179 |
154,103 | StefanLiebenberg/kute | kute-core/src/main/java/slieb/kute/Kute.java | Kute.findResource | public static <R extends Resource> Optional<R> findResource(Stream<R> stream,
String path) {
return findFirstResource(stream.filter(r -> r.getPath().equals(path)));
} | java | public static <R extends Resource> Optional<R> findResource(Stream<R> stream,
String path) {
return findFirstResource(stream.filter(r -> r.getPath().equals(path)));
} | [
"public",
"static",
"<",
"R",
"extends",
"Resource",
">",
"Optional",
"<",
"R",
">",
"findResource",
"(",
"Stream",
"<",
"R",
">",
"stream",
",",
"String",
"path",
")",
"{",
"return",
"findFirstResource",
"(",
"stream",
".",
"filter",
"(",
"r",
"->",
"... | Finds the first resource in stream that matches given path.
@param stream A stream of resources.
@param path The path to search for.
@param <R> The resource implementation.
@return A matching resource, if found. | [
"Finds",
"the",
"first",
"resource",
"in",
"stream",
"that",
"matches",
"given",
"path",
"."
] | 1db0e8d2c76459d22c7d4b0ba99c18f74748f6fd | https://github.com/StefanLiebenberg/kute/blob/1db0e8d2c76459d22c7d4b0ba99c18f74748f6fd/kute-core/src/main/java/slieb/kute/Kute.java#L274-L277 |
154,104 | tvesalainen/util | util/src/main/java/org/vesalainen/util/concurrent/WaiterList.java | WaiterList.wait | public Reason wait(T waiter)
{
return wait(waiter, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
} | java | public Reason wait(T waiter)
{
return wait(waiter, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
} | [
"public",
"Reason",
"wait",
"(",
"T",
"waiter",
")",
"{",
"return",
"wait",
"(",
"waiter",
",",
"Long",
".",
"MAX_VALUE",
",",
"TimeUnit",
".",
"MILLISECONDS",
")",
";",
"}"
] | Adds waiter to queue and waits until releaseAll method call or thread is
interrupted.
@param waiter
@return | [
"Adds",
"waiter",
"to",
"queue",
"and",
"waits",
"until",
"releaseAll",
"method",
"call",
"or",
"thread",
"is",
"interrupted",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/concurrent/WaiterList.java#L49-L52 |
154,105 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/script/scan/BaseScanListener.java | BaseScanListener.moveThisFile | public void moveThisFile(LineNumberReader reader, File fileDestDir, String strDestName)
{
try {
File fileDest = new File(fileDestDir, strDestName);
fileDest.createNewFile();
FileOutputStream fileOut = new FileOutputStream(fileDest);
m_writer = new PrintWriter(... | java | public void moveThisFile(LineNumberReader reader, File fileDestDir, String strDestName)
{
try {
File fileDest = new File(fileDestDir, strDestName);
fileDest.createNewFile();
FileOutputStream fileOut = new FileOutputStream(fileDest);
m_writer = new PrintWriter(... | [
"public",
"void",
"moveThisFile",
"(",
"LineNumberReader",
"reader",
",",
"File",
"fileDestDir",
",",
"String",
"strDestName",
")",
"{",
"try",
"{",
"File",
"fileDest",
"=",
"new",
"File",
"(",
"fileDestDir",
",",
"strDestName",
")",
";",
"fileDest",
".",
"c... | MoveThisFile Method. | [
"MoveThisFile",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/scan/BaseScanListener.java#L150-L168 |
154,106 | jbundle/jbundle | base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java | SOAPMessageTransport.free | public void free()
{
super.free();
try {
if (m_con != null)
m_con.close();
} catch (SOAPException ex) {
ex.printStackTrace();
}
} | java | public void free()
{
super.free();
try {
if (m_con != null)
m_con.close();
} catch (SOAPException ex) {
ex.printStackTrace();
}
} | [
"public",
"void",
"free",
"(",
")",
"{",
"super",
".",
"free",
"(",
")",
";",
"try",
"{",
"if",
"(",
"m_con",
"!=",
"null",
")",
"m_con",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"SOAPException",
"ex",
")",
"{",
"ex",
".",
"printStackTrace... | Free all the resources belonging to this class. | [
"Free",
"all",
"the",
"resources",
"belonging",
"to",
"this",
"class",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java#L107-L116 |
154,107 | jbundle/jbundle | base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java | SOAPMessageTransport.setSOAPBody | public SOAPMessage setSOAPBody(SOAPMessage msg, BaseMessage message)
{
try {
if (msg == null)
msg = fac.createMessage();
// Message creation takes care of creating the SOAPPart - a
// required part of the message as per the SOAP 1.1
// specific... | java | public SOAPMessage setSOAPBody(SOAPMessage msg, BaseMessage message)
{
try {
if (msg == null)
msg = fac.createMessage();
// Message creation takes care of creating the SOAPPart - a
// required part of the message as per the SOAP 1.1
// specific... | [
"public",
"SOAPMessage",
"setSOAPBody",
"(",
"SOAPMessage",
"msg",
",",
"BaseMessage",
"message",
")",
"{",
"try",
"{",
"if",
"(",
"msg",
"==",
"null",
")",
"msg",
"=",
"fac",
".",
"createMessage",
"(",
")",
";",
"// Message creation takes care of creating the S... | This utility method sticks this message into this soap message's body.
@param msg The source message. | [
"This",
"utility",
"method",
"sticks",
"this",
"message",
"into",
"this",
"soap",
"message",
"s",
"body",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java#L222-L255 |
154,108 | jbundle/jbundle | base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java | SOAPMessageTransport.getElement | public SOAPElement getElement(SOAPElement element, String strElementName)
{
Iterator<?> iterator = element.getChildElements();
while (iterator.hasNext())
{
javax.xml.soap.Node elMessageType = (javax.xml.soap.Node)iterator.next();
if (elMessageType instanceof SOAPEleme... | java | public SOAPElement getElement(SOAPElement element, String strElementName)
{
Iterator<?> iterator = element.getChildElements();
while (iterator.hasNext())
{
javax.xml.soap.Node elMessageType = (javax.xml.soap.Node)iterator.next();
if (elMessageType instanceof SOAPEleme... | [
"public",
"SOAPElement",
"getElement",
"(",
"SOAPElement",
"element",
",",
"String",
"strElementName",
")",
"{",
"Iterator",
"<",
"?",
">",
"iterator",
"=",
"element",
".",
"getChildElements",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")"... | Get the element.
@param strElementName The element to return (if null, return the first element). | [
"Get",
"the",
"element",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java#L339-L354 |
154,109 | jbundle/jbundle | base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java | SOAPMessageTransport.messageToString | public static String messageToString(SOAPMessage soapMessage)
{
String strTextMessage = null;
if (soapMessage != null)
{
try {
ByteArrayOutputStream ba = new ByteArrayOutputStream();
PrintStream os = new PrintStream(ba);
soapMessa... | java | public static String messageToString(SOAPMessage soapMessage)
{
String strTextMessage = null;
if (soapMessage != null)
{
try {
ByteArrayOutputStream ba = new ByteArrayOutputStream();
PrintStream os = new PrintStream(ba);
soapMessa... | [
"public",
"static",
"String",
"messageToString",
"(",
"SOAPMessage",
"soapMessage",
")",
"{",
"String",
"strTextMessage",
"=",
"null",
";",
"if",
"(",
"soapMessage",
"!=",
"null",
")",
"{",
"try",
"{",
"ByteArrayOutputStream",
"ba",
"=",
"new",
"ByteArrayOutputS... | Convert this SOAP message to a text string. | [
"Convert",
"this",
"SOAP",
"message",
"to",
"a",
"text",
"string",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java#L358-L389 |
154,110 | jbundle/jbundle | base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java | SOAPMessageTransport.printSource | public void printSource(Source src, PrintStream out)
{
TransformerFactory tFact = TransformerFactory.newInstance();
try {
Transformer transformer = tFact.newTransformer();
Result result = new StreamResult( out );
transformer.transform(src, result);
} catc... | java | public void printSource(Source src, PrintStream out)
{
TransformerFactory tFact = TransformerFactory.newInstance();
try {
Transformer transformer = tFact.newTransformer();
Result result = new StreamResult( out );
transformer.transform(src, result);
} catc... | [
"public",
"void",
"printSource",
"(",
"Source",
"src",
",",
"PrintStream",
"out",
")",
"{",
"TransformerFactory",
"tFact",
"=",
"TransformerFactory",
".",
"newInstance",
"(",
")",
";",
"try",
"{",
"Transformer",
"transformer",
"=",
"tFact",
".",
"newTransformer"... | A utility method to print this source tree to the given stream. | [
"A",
"utility",
"method",
"to",
"print",
"this",
"source",
"tree",
"to",
"the",
"given",
"stream",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java#L393-L406 |
154,111 | williamwebb/alogger | Utilities/src/main/java/com/jug6ernaut/android/utilites/FileDownloader.java | FileDownloader.downloadFileNew | @Deprecated
public File downloadFileNew(File inputUrl, File outputFile){
OutputStream out = null;
InputStream fis = null;
HttpParams httpParameters = new BasicHttpParams();
int timeoutConnection = 2500;
HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);
int timeoutSocket = 250... | java | @Deprecated
public File downloadFileNew(File inputUrl, File outputFile){
OutputStream out = null;
InputStream fis = null;
HttpParams httpParameters = new BasicHttpParams();
int timeoutConnection = 2500;
HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);
int timeoutSocket = 250... | [
"@",
"Deprecated",
"public",
"File",
"downloadFileNew",
"(",
"File",
"inputUrl",
",",
"File",
"outputFile",
")",
"{",
"OutputStream",
"out",
"=",
"null",
";",
"InputStream",
"fis",
"=",
"null",
";",
"HttpParams",
"httpParameters",
"=",
"new",
"BasicHttpParams",
... | still has issues...
@param inputUrl
@param outputFile
@return | [
"still",
"has",
"issues",
"..."
] | 61fca49e0b8d9c3a76c40da8883ac354b240351e | https://github.com/williamwebb/alogger/blob/61fca49e0b8d9c3a76c40da8883ac354b240351e/Utilities/src/main/java/com/jug6ernaut/android/utilites/FileDownloader.java#L84-L156 |
154,112 | avaje-common/avaje-resteasy-guice | src/main/java/org/avaje/resteasy/Bootstrap.java | Bootstrap.contextInitialized | @Override
public void contextInitialized(ServletContextEvent event) {
this.event = event;
this.serverContainer = getServerContainer(event);
super.contextInitialized(event);
} | java | @Override
public void contextInitialized(ServletContextEvent event) {
this.event = event;
this.serverContainer = getServerContainer(event);
super.contextInitialized(event);
} | [
"@",
"Override",
"public",
"void",
"contextInitialized",
"(",
"ServletContextEvent",
"event",
")",
"{",
"this",
".",
"event",
"=",
"event",
";",
"this",
".",
"serverContainer",
"=",
"getServerContainer",
"(",
"event",
")",
";",
"super",
".",
"contextInitialized"... | On contextInitialized additional obtain the WebSocket ServerContainer. | [
"On",
"contextInitialized",
"additional",
"obtain",
"the",
"WebSocket",
"ServerContainer",
"."
] | a585d8c6b0a6d4fb5ffb679d8950e41a03795929 | https://github.com/avaje-common/avaje-resteasy-guice/blob/a585d8c6b0a6d4fb5ffb679d8950e41a03795929/src/main/java/org/avaje/resteasy/Bootstrap.java#L35-L40 |
154,113 | avaje-common/avaje-resteasy-guice | src/main/java/org/avaje/resteasy/Bootstrap.java | Bootstrap.getServerContainer | protected ServerContainer getServerContainer(ServletContextEvent servletContextEvent) {
ServletContext context = servletContextEvent.getServletContext();
return (ServerContainer) context.getAttribute("javax.websocket.server.ServerContainer");
} | java | protected ServerContainer getServerContainer(ServletContextEvent servletContextEvent) {
ServletContext context = servletContextEvent.getServletContext();
return (ServerContainer) context.getAttribute("javax.websocket.server.ServerContainer");
} | [
"protected",
"ServerContainer",
"getServerContainer",
"(",
"ServletContextEvent",
"servletContextEvent",
")",
"{",
"ServletContext",
"context",
"=",
"servletContextEvent",
".",
"getServletContext",
"(",
")",
";",
"return",
"(",
"ServerContainer",
")",
"context",
".",
"g... | Return the WebSocket ServerContainer from the servletContext. | [
"Return",
"the",
"WebSocket",
"ServerContainer",
"from",
"the",
"servletContext",
"."
] | a585d8c6b0a6d4fb5ffb679d8950e41a03795929 | https://github.com/avaje-common/avaje-resteasy-guice/blob/a585d8c6b0a6d4fb5ffb679d8950e41a03795929/src/main/java/org/avaje/resteasy/Bootstrap.java#L45-L49 |
154,114 | avaje-common/avaje-resteasy-guice | src/main/java/org/avaje/resteasy/Bootstrap.java | Bootstrap.registerWebSockets | private void registerWebSockets(Injector injector) {
Map<Key<?>, Binding<?>> allBindings = injector.getAllBindings();
// loop all the Guice bindings looking for @ServerEndpoint singletons
for (Map.Entry<Key<?>, Binding<?>> entry : allBindings.entrySet()) {
final Binding<?> binding = entry.getValue(... | java | private void registerWebSockets(Injector injector) {
Map<Key<?>, Binding<?>> allBindings = injector.getAllBindings();
// loop all the Guice bindings looking for @ServerEndpoint singletons
for (Map.Entry<Key<?>, Binding<?>> entry : allBindings.entrySet()) {
final Binding<?> binding = entry.getValue(... | [
"private",
"void",
"registerWebSockets",
"(",
"Injector",
"injector",
")",
"{",
"Map",
"<",
"Key",
"<",
"?",
">",
",",
"Binding",
"<",
"?",
">",
">",
"allBindings",
"=",
"injector",
".",
"getAllBindings",
"(",
")",
";",
"// loop all the Guice bindings looking ... | Find any Guice eager singletons that are WebSocket endpoints
and register them with the servlet container. | [
"Find",
"any",
"Guice",
"eager",
"singletons",
"that",
"are",
"WebSocket",
"endpoints",
"and",
"register",
"them",
"with",
"the",
"servlet",
"container",
"."
] | a585d8c6b0a6d4fb5ffb679d8950e41a03795929 | https://github.com/avaje-common/avaje-resteasy-guice/blob/a585d8c6b0a6d4fb5ffb679d8950e41a03795929/src/main/java/org/avaje/resteasy/Bootstrap.java#L67-L85 |
154,115 | avaje-common/avaje-resteasy-guice | src/main/java/org/avaje/resteasy/Bootstrap.java | Bootstrap.registerWebSocketEndpoint | protected void registerWebSocketEndpoint(Binding<?> binding) {//}, ServerEndpoint serverEndpoint) {
Object instance = binding.getProvider().get();
Class<?> instanceClass = instance.getClass();
ServerEndpoint serverEndpoint = instanceClass.getAnnotation(ServerEndpoint.class);
if (serverEndpoint != null)... | java | protected void registerWebSocketEndpoint(Binding<?> binding) {//}, ServerEndpoint serverEndpoint) {
Object instance = binding.getProvider().get();
Class<?> instanceClass = instance.getClass();
ServerEndpoint serverEndpoint = instanceClass.getAnnotation(ServerEndpoint.class);
if (serverEndpoint != null)... | [
"protected",
"void",
"registerWebSocketEndpoint",
"(",
"Binding",
"<",
"?",
">",
"binding",
")",
"{",
"//}, ServerEndpoint serverEndpoint) {",
"Object",
"instance",
"=",
"binding",
".",
"getProvider",
"(",
")",
".",
"get",
"(",
")",
";",
"Class",
"<",
"?",
">"... | Check if the binding is a WebSocket endpoint. If it is then register the webSocket
server endpoint with the servlet container. | [
"Check",
"if",
"the",
"binding",
"is",
"a",
"WebSocket",
"endpoint",
".",
"If",
"it",
"is",
"then",
"register",
"the",
"webSocket",
"server",
"endpoint",
"with",
"the",
"servlet",
"container",
"."
] | a585d8c6b0a6d4fb5ffb679d8950e41a03795929 | https://github.com/avaje-common/avaje-resteasy-guice/blob/a585d8c6b0a6d4fb5ffb679d8950e41a03795929/src/main/java/org/avaje/resteasy/Bootstrap.java#L91-L108 |
154,116 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/util/BaseThickActivator.java | BaseThickActivator.addConfigProperty | public Map<String,Object> addConfigProperty(Map<String,Object> properties, String key, String defaultValue)
{
if (this.getProperty(key) != null)
properties.put(key, this.getProperty(key));
else if (defaultValue != null)
properties.put(key, defaultValue);
return properties;
} | java | public Map<String,Object> addConfigProperty(Map<String,Object> properties, String key, String defaultValue)
{
if (this.getProperty(key) != null)
properties.put(key, this.getProperty(key));
else if (defaultValue != null)
properties.put(key, defaultValue);
return properties;
} | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"addConfigProperty",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
",",
"String",
"key",
",",
"String",
"defaultValue",
")",
"{",
"if",
"(",
"this",
".",
"getProperty",
"(",
"key",
")",
... | Add this property if it exists in the OSGi config file.
@param properties
@param key
@param defaultValue
@return | [
"Add",
"this",
"property",
"if",
"it",
"exists",
"in",
"the",
"OSGi",
"config",
"file",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/BaseThickActivator.java#L57-L64 |
154,117 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/Process.java | Process.getTopicIds | protected List<String> getTopicIds() {
LinkedList<String> topicIds = new LinkedList<String>();
for (final Entry<String, SpecTopic> specTopicEntry : topics.entrySet()) {
topicIds.add(specTopicEntry.getKey());
}
return topicIds;
} | java | protected List<String> getTopicIds() {
LinkedList<String> topicIds = new LinkedList<String>();
for (final Entry<String, SpecTopic> specTopicEntry : topics.entrySet()) {
topicIds.add(specTopicEntry.getKey());
}
return topicIds;
} | [
"protected",
"List",
"<",
"String",
">",
"getTopicIds",
"(",
")",
"{",
"LinkedList",
"<",
"String",
">",
"topicIds",
"=",
"new",
"LinkedList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"final",
"Entry",
"<",
"String",
",",
"SpecTopic",
">",
"specT... | Gets all of the Content Specification Unique Topic ID's that are used in the process.
@return A List of Unique Topic ID's. | [
"Gets",
"all",
"of",
"the",
"Content",
"Specification",
"Unique",
"Topic",
"ID",
"s",
"that",
"are",
"used",
"in",
"the",
"process",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/Process.java#L98-L104 |
154,118 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java | Level.appendSpecTopic | public void appendSpecTopic(final SpecTopic specTopic) {
topics.add(specTopic);
nodes.add(specTopic);
if (specTopic.getParent() != null && specTopic.getParent() instanceof Level) {
((Level) specTopic.getParent()).removeSpecTopic(specTopic);
}
specTopic.setParent(this)... | java | public void appendSpecTopic(final SpecTopic specTopic) {
topics.add(specTopic);
nodes.add(specTopic);
if (specTopic.getParent() != null && specTopic.getParent() instanceof Level) {
((Level) specTopic.getParent()).removeSpecTopic(specTopic);
}
specTopic.setParent(this)... | [
"public",
"void",
"appendSpecTopic",
"(",
"final",
"SpecTopic",
"specTopic",
")",
"{",
"topics",
".",
"add",
"(",
"specTopic",
")",
";",
"nodes",
".",
"add",
"(",
"specTopic",
")",
";",
"if",
"(",
"specTopic",
".",
"getParent",
"(",
")",
"!=",
"null",
... | Adds a Content Specification Topic to the Level. If the Topic already has a parent, then it is removed from that parent
and added to this level.
@param specTopic The Content Specification Topic to be added to the level. | [
"Adds",
"a",
"Content",
"Specification",
"Topic",
"to",
"the",
"Level",
".",
"If",
"the",
"Topic",
"already",
"has",
"a",
"parent",
"then",
"it",
"is",
"removed",
"from",
"that",
"parent",
"and",
"added",
"to",
"this",
"level",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java#L148-L155 |
154,119 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java | Level.appendChild | public void appendChild(final Node child) {
if (child instanceof Level) {
// Append the level
levels.add((Level) child);
nodes.add(child);
if (child.getParent() != null) {
child.removeParent();
}
child.setParent(this);
... | java | public void appendChild(final Node child) {
if (child instanceof Level) {
// Append the level
levels.add((Level) child);
nodes.add(child);
if (child.getParent() != null) {
child.removeParent();
}
child.setParent(this);
... | [
"public",
"void",
"appendChild",
"(",
"final",
"Node",
"child",
")",
"{",
"if",
"(",
"child",
"instanceof",
"Level",
")",
"{",
"// Append the level",
"levels",
".",
"add",
"(",
"(",
"Level",
")",
"child",
")",
";",
"nodes",
".",
"add",
"(",
"child",
")... | Adds a Child Element to the Level. If the Child Element already has a parent, then it is removed from that parent and
added to this level.
@param child A Child element to be added to the Level. | [
"Adds",
"a",
"Child",
"Element",
"to",
"the",
"Level",
".",
"If",
"the",
"Child",
"Element",
"already",
"has",
"a",
"parent",
"then",
"it",
"is",
"removed",
"from",
"that",
"parent",
"and",
"added",
"to",
"this",
"level",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java#L185-L211 |
154,120 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java | Level.removeChild | public void removeChild(final Node child) {
if (child instanceof Level) {
levels.remove(child);
nodes.remove(child);
child.setParent(null);
} else if (child instanceof SpecTopic) {
removeSpecTopic((SpecTopic) child);
} else if (child instanceof Com... | java | public void removeChild(final Node child) {
if (child instanceof Level) {
levels.remove(child);
nodes.remove(child);
child.setParent(null);
} else if (child instanceof SpecTopic) {
removeSpecTopic((SpecTopic) child);
} else if (child instanceof Com... | [
"public",
"void",
"removeChild",
"(",
"final",
"Node",
"child",
")",
"{",
"if",
"(",
"child",
"instanceof",
"Level",
")",
"{",
"levels",
".",
"remove",
"(",
"child",
")",
";",
"nodes",
".",
"remove",
"(",
"child",
")",
";",
"child",
".",
"setParent",
... | Removes a Child element from the level and removes the level as the Child's parent.
@param child The Child element to be removed from the level. | [
"Removes",
"a",
"Child",
"element",
"from",
"the",
"level",
"and",
"removes",
"the",
"level",
"as",
"the",
"Child",
"s",
"parent",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java#L218-L233 |
154,121 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java | Level.insertBefore | public boolean insertBefore(final Node newNode, final Node oldNode) {
if (oldNode == null || newNode == null) {
return false;
}
int index = nodes.indexOf(oldNode);
if (index != -1) {
// Remove the parent from the new node if one exists
if (newNode.get... | java | public boolean insertBefore(final Node newNode, final Node oldNode) {
if (oldNode == null || newNode == null) {
return false;
}
int index = nodes.indexOf(oldNode);
if (index != -1) {
// Remove the parent from the new node if one exists
if (newNode.get... | [
"public",
"boolean",
"insertBefore",
"(",
"final",
"Node",
"newNode",
",",
"final",
"Node",
"oldNode",
")",
"{",
"if",
"(",
"oldNode",
"==",
"null",
"||",
"newNode",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"int",
"index",
"=",
"nodes",
"."... | Inserts a node before the another node in the level.
@param newNode The node to be inserted.
@param oldNode The node that the new node should be inserted in front of.
@return True if the node was inserted correctly otherwise false. | [
"Inserts",
"a",
"node",
"before",
"the",
"another",
"node",
"in",
"the",
"level",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java#L269-L297 |
154,122 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java | Level.getTotalNumberOfChildren | protected Integer getTotalNumberOfChildren() {
Integer numChildrenNodes = 0;
for (Level childLevel : levels) {
numChildrenNodes += childLevel.getTotalNumberOfChildren();
}
return nodes.size() + numChildrenNodes;
} | java | protected Integer getTotalNumberOfChildren() {
Integer numChildrenNodes = 0;
for (Level childLevel : levels) {
numChildrenNodes += childLevel.getTotalNumberOfChildren();
}
return nodes.size() + numChildrenNodes;
} | [
"protected",
"Integer",
"getTotalNumberOfChildren",
"(",
")",
"{",
"Integer",
"numChildrenNodes",
"=",
"0",
";",
"for",
"(",
"Level",
"childLevel",
":",
"levels",
")",
"{",
"numChildrenNodes",
"+=",
"childLevel",
".",
"getTotalNumberOfChildren",
"(",
")",
";",
"... | Gets the total number of Children nodes for the level and its child levels.
@return The total number of child nodes for the level and child levels. | [
"Gets",
"the",
"total",
"number",
"of",
"Children",
"nodes",
"for",
"the",
"level",
"and",
"its",
"child",
"levels",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java#L392-L398 |
154,123 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java | Level.hasSpecTopics | public boolean hasSpecTopics() {
if (getSpecTopics().size() > 0) {
return true;
}
for (final Level childLevel : levels) {
if (childLevel.hasSpecTopics()) {
return true;
}
}
return false;
} | java | public boolean hasSpecTopics() {
if (getSpecTopics().size() > 0) {
return true;
}
for (final Level childLevel : levels) {
if (childLevel.hasSpecTopics()) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"hasSpecTopics",
"(",
")",
"{",
"if",
"(",
"getSpecTopics",
"(",
")",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"return",
"true",
";",
"}",
"for",
"(",
"final",
"Level",
"childLevel",
":",
"levels",
")",
"{",
"if",
"(",
"child... | Checks to see if this level or any of its children contain SpecTopics.
@return True if the level or the levels children contain at least one SpecTopic. | [
"Checks",
"to",
"see",
"if",
"this",
"level",
"or",
"any",
"of",
"its",
"children",
"contain",
"SpecTopics",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java#L405-L417 |
154,124 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java | Level.hasCommonContents | public boolean hasCommonContents() {
if (getNumberOfCommonContents() > 0) {
return true;
}
for (final Level childLevel : levels) {
if (childLevel.hasCommonContents()) {
return true;
}
}
return false;
} | java | public boolean hasCommonContents() {
if (getNumberOfCommonContents() > 0) {
return true;
}
for (final Level childLevel : levels) {
if (childLevel.hasCommonContents()) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"hasCommonContents",
"(",
")",
"{",
"if",
"(",
"getNumberOfCommonContents",
"(",
")",
">",
"0",
")",
"{",
"return",
"true",
";",
"}",
"for",
"(",
"final",
"Level",
"childLevel",
":",
"levels",
")",
"{",
"if",
"(",
"childLevel",
".",
... | Checks to see if this level or any of its children contain CommonContent.
@return True if the level or the levels children contain at least one CommonContent. | [
"Checks",
"to",
"see",
"if",
"this",
"level",
"or",
"any",
"of",
"its",
"children",
"contain",
"CommonContent",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java#L424-L436 |
154,125 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java | Level.hasRevisionSpecTopics | public boolean hasRevisionSpecTopics() {
for (final SpecTopic specTopic : getSpecTopics()) {
if (specTopic.getRevision() != null) {
return true;
}
}
for (final Level childLevel : getChildLevels()) {
if (childLevel.hasRevisionSpecTopics()) {
... | java | public boolean hasRevisionSpecTopics() {
for (final SpecTopic specTopic : getSpecTopics()) {
if (specTopic.getRevision() != null) {
return true;
}
}
for (final Level childLevel : getChildLevels()) {
if (childLevel.hasRevisionSpecTopics()) {
... | [
"public",
"boolean",
"hasRevisionSpecTopics",
"(",
")",
"{",
"for",
"(",
"final",
"SpecTopic",
"specTopic",
":",
"getSpecTopics",
"(",
")",
")",
"{",
"if",
"(",
"specTopic",
".",
"getRevision",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"true",
";",
"}"... | Checks to see if this level or any of its children contain SpecTopics that represent a revision.
@return True if the level or the levels children contain at least one SpecTopic that is a revision. | [
"Checks",
"to",
"see",
"if",
"this",
"level",
"or",
"any",
"of",
"its",
"children",
"contain",
"SpecTopics",
"that",
"represent",
"a",
"revision",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java#L443-L457 |
154,126 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java | Level.isSpecNodeInLevelByTargetID | public boolean isSpecNodeInLevelByTargetID(final String targetId) {
final SpecNode foundTopic = getClosestSpecNodeByTargetId(targetId, false);
return foundTopic != null;
} | java | public boolean isSpecNodeInLevelByTargetID(final String targetId) {
final SpecNode foundTopic = getClosestSpecNodeByTargetId(targetId, false);
return foundTopic != null;
} | [
"public",
"boolean",
"isSpecNodeInLevelByTargetID",
"(",
"final",
"String",
"targetId",
")",
"{",
"final",
"SpecNode",
"foundTopic",
"=",
"getClosestSpecNodeByTargetId",
"(",
"targetId",
",",
"false",
")",
";",
"return",
"foundTopic",
"!=",
"null",
";",
"}"
] | Checks to see if a SpecNode exists within this level or its children.
@param targetId The Target ID of the level/topic to see if it exists.
@return True if the level/topic exists within this level or its children otherwise false. | [
"Checks",
"to",
"see",
"if",
"a",
"SpecNode",
"exists",
"within",
"this",
"level",
"or",
"its",
"children",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/Level.java#L754-L757 |
154,127 | kirgor/enklib | common/src/main/java/com/kirgor/enklib/common/ConfigUtils.java | ConfigUtils.loadFromXMLFile | public static <T> T loadFromXMLFile(Class<T> configClass, File file) throws Exception {
Persister persister = new Persister();
return persister.read(configClass, file);
} | java | public static <T> T loadFromXMLFile(Class<T> configClass, File file) throws Exception {
Persister persister = new Persister();
return persister.read(configClass, file);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"loadFromXMLFile",
"(",
"Class",
"<",
"T",
">",
"configClass",
",",
"File",
"file",
")",
"throws",
"Exception",
"{",
"Persister",
"persister",
"=",
"new",
"Persister",
"(",
")",
";",
"return",
"persister",
".",
"re... | Loads config values from XML file, maps them to configuration class fields and returns the result instance.
@param configClass Class, which fields will be mapped to config values.
@param file Where to load the config from.
@param <T> Generic type of configClass
@return Instance of configClass with field... | [
"Loads",
"config",
"values",
"from",
"XML",
"file",
"maps",
"them",
"to",
"configuration",
"class",
"fields",
"and",
"returns",
"the",
"result",
"instance",
"."
] | 8a24db296dc43db5d8fe509cf64ace0a0c7be8f2 | https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/common/src/main/java/com/kirgor/enklib/common/ConfigUtils.java#L71-L74 |
154,128 | drewwills/cernunnos | cernunnos-core/src/main/java/org/danann/cernunnos/DynamicCacheHelper.java | DynamicCacheHelper.compareKeys | protected final boolean compareKeys(K k1, K k2) {
return k1 == k2 || (k1 != null && k1.equals(k2));
} | java | protected final boolean compareKeys(K k1, K k2) {
return k1 == k2 || (k1 != null && k1.equals(k2));
} | [
"protected",
"final",
"boolean",
"compareKeys",
"(",
"K",
"k1",
",",
"K",
"k2",
")",
"{",
"return",
"k1",
"==",
"k2",
"||",
"(",
"k1",
"!=",
"null",
"&&",
"k1",
".",
"equals",
"(",
"k2",
")",
")",
";",
"}"
] | Basic logic to compare two keys for equality | [
"Basic",
"logic",
"to",
"compare",
"two",
"keys",
"for",
"equality"
] | dc6848e0253775e22b6c869fd06506d4ddb6d728 | https://github.com/drewwills/cernunnos/blob/dc6848e0253775e22b6c869fd06506d4ddb6d728/cernunnos-core/src/main/java/org/danann/cernunnos/DynamicCacheHelper.java#L185-L187 |
154,129 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/GetWSDL20.java | GetWSDL20.processInterfaceType | public String processInterfaceType(DescriptionType descriptionType, InterfaceType interfaceType, boolean addAddress)
{
String interfaceName = interfaceType.getName();
String allAddress = DBConstants.BLANK;
for (Object nextElement : interfaceType.getOperationOrFaultOrFeature())
... | java | public String processInterfaceType(DescriptionType descriptionType, InterfaceType interfaceType, boolean addAddress)
{
String interfaceName = interfaceType.getName();
String allAddress = DBConstants.BLANK;
for (Object nextElement : interfaceType.getOperationOrFaultOrFeature())
... | [
"public",
"String",
"processInterfaceType",
"(",
"DescriptionType",
"descriptionType",
",",
"InterfaceType",
"interfaceType",
",",
"boolean",
"addAddress",
")",
"{",
"String",
"interfaceName",
"=",
"interfaceType",
".",
"getName",
"(",
")",
";",
"String",
"allAddress"... | ProcessInterfaceType Method. | [
"ProcessInterfaceType",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/GetWSDL20.java#L106-L130 |
154,130 | jbundle/jbundle | thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/TaskProxy.java | TaskProxy.createRemoteReceiveQueue | public RemoteReceiveQueue createRemoteReceiveQueue(String strQueueName, String strQueueType) throws RemoteException
{
BaseTransport transport = this.createProxyTransport(CREATE_REMOTE_RECEIVE_QUEUE);
transport.addParam(MessageConstants.QUEUE_NAME, strQueueName);
transport.addParam(MessageCon... | java | public RemoteReceiveQueue createRemoteReceiveQueue(String strQueueName, String strQueueType) throws RemoteException
{
BaseTransport transport = this.createProxyTransport(CREATE_REMOTE_RECEIVE_QUEUE);
transport.addParam(MessageConstants.QUEUE_NAME, strQueueName);
transport.addParam(MessageCon... | [
"public",
"RemoteReceiveQueue",
"createRemoteReceiveQueue",
"(",
"String",
"strQueueName",
",",
"String",
"strQueueType",
")",
"throws",
"RemoteException",
"{",
"BaseTransport",
"transport",
"=",
"this",
".",
"createProxyTransport",
"(",
"CREATE_REMOTE_RECEIVE_QUEUE",
")",
... | Create a new remote receive queue.
@param strQueueName The queue name.
@param strQueueType The queue type (see MessageConstants). | [
"Create",
"a",
"new",
"remote",
"receive",
"queue",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/TaskProxy.java#L129-L136 |
154,131 | jbundle/jbundle | thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/TaskProxy.java | TaskProxy.createRemoteSendQueue | public RemoteSendQueue createRemoteSendQueue(String strQueueName, String strQueueType) throws RemoteException
{
BaseTransport transport = this.createProxyTransport(CREATE_REMOTE_SEND_QUEUE);
transport.addParam(MessageConstants.QUEUE_NAME, strQueueName);
transport.addParam(MessageConstants.QU... | java | public RemoteSendQueue createRemoteSendQueue(String strQueueName, String strQueueType) throws RemoteException
{
BaseTransport transport = this.createProxyTransport(CREATE_REMOTE_SEND_QUEUE);
transport.addParam(MessageConstants.QUEUE_NAME, strQueueName);
transport.addParam(MessageConstants.QU... | [
"public",
"RemoteSendQueue",
"createRemoteSendQueue",
"(",
"String",
"strQueueName",
",",
"String",
"strQueueType",
")",
"throws",
"RemoteException",
"{",
"BaseTransport",
"transport",
"=",
"this",
".",
"createProxyTransport",
"(",
"CREATE_REMOTE_SEND_QUEUE",
")",
";",
... | Create a new remote send queue.
@param strQueueName The queue name.
@param strQueueType The queue type (see MessageConstants). | [
"Create",
"a",
"new",
"remote",
"send",
"queue",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/TaskProxy.java#L142-L149 |
154,132 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageFieldDesc.java | MessageFieldDesc.put | public void put(Object objValue)
{
Class<?> classData = this.getNativeClassType();
try {
objValue = DataConverters.convertObjectToDatatype(objValue, classData, null); // I do this just to be careful.
} catch (Exception ex) {
objValue = null;
}
if (thi... | java | public void put(Object objValue)
{
Class<?> classData = this.getNativeClassType();
try {
objValue = DataConverters.convertObjectToDatatype(objValue, classData, null); // I do this just to be careful.
} catch (Exception ex) {
objValue = null;
}
if (thi... | [
"public",
"void",
"put",
"(",
"Object",
"objValue",
")",
"{",
"Class",
"<",
"?",
">",
"classData",
"=",
"this",
".",
"getNativeClassType",
"(",
")",
";",
"try",
"{",
"objValue",
"=",
"DataConverters",
".",
"convertObjectToDatatype",
"(",
"objValue",
",",
"... | Put the value for this param in the map.
If it is not the correct object type, convert it first. | [
"Put",
"the",
"value",
"for",
"this",
"param",
"in",
"the",
"map",
".",
"If",
"it",
"is",
"not",
"the",
"correct",
"object",
"type",
"convert",
"it",
"first",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageFieldDesc.java#L217-L227 |
154,133 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageFieldDesc.java | MessageFieldDesc.putString | public void putString(String strValue)
{
Class<?> classData = this.getNativeClassType();
Object objValue = null;
try {
objValue = DataConverters.convertObjectToDatatype(strValue, classData, null);
} catch (Exception ex) {
objValue = null;
}
if ... | java | public void putString(String strValue)
{
Class<?> classData = this.getNativeClassType();
Object objValue = null;
try {
objValue = DataConverters.convertObjectToDatatype(strValue, classData, null);
} catch (Exception ex) {
objValue = null;
}
if ... | [
"public",
"void",
"putString",
"(",
"String",
"strValue",
")",
"{",
"Class",
"<",
"?",
">",
"classData",
"=",
"this",
".",
"getNativeClassType",
"(",
")",
";",
"Object",
"objValue",
"=",
"null",
";",
"try",
"{",
"objValue",
"=",
"DataConverters",
".",
"c... | Convert this external data format to the raw object and put it in the map.
Typically this method is overridden to handle specific params. | [
"Convert",
"this",
"external",
"data",
"format",
"to",
"the",
"raw",
"object",
"and",
"put",
"it",
"in",
"the",
"map",
".",
"Typically",
"this",
"method",
"is",
"overridden",
"to",
"handle",
"specific",
"params",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageFieldDesc.java#L232-L243 |
154,134 | arxanchain/java-common | src/main/java/com/arxanfintech/common/crypto/CertTool.java | CertTool.getCertfromPEM | public static X509Certificate getCertfromPEM(String certFile)
throws IOException, CertificateException, NoSuchProviderException {
InputStream inStrm = new FileInputStream(certFile);
X509Certificate cert = getCertfromPEM(inStrm);
return cert;
} | java | public static X509Certificate getCertfromPEM(String certFile)
throws IOException, CertificateException, NoSuchProviderException {
InputStream inStrm = new FileInputStream(certFile);
X509Certificate cert = getCertfromPEM(inStrm);
return cert;
} | [
"public",
"static",
"X509Certificate",
"getCertfromPEM",
"(",
"String",
"certFile",
")",
"throws",
"IOException",
",",
"CertificateException",
",",
"NoSuchProviderException",
"{",
"InputStream",
"inStrm",
"=",
"new",
"FileInputStream",
"(",
"certFile",
")",
";",
"X509... | Reads a certificate in PEM-format from a file. The file may contain other
things, the first certificate in the file is read.
@param certFile
the file containing the certificate in PEM-format
@return X509Certificate
@exception IOException
if the filen cannot be read.
@exception CertificateException
if the filen does no... | [
"Reads",
"a",
"certificate",
"in",
"PEM",
"-",
"format",
"from",
"a",
"file",
".",
"The",
"file",
"may",
"contain",
"other",
"things",
"the",
"first",
"certificate",
"in",
"the",
"file",
"is",
"read",
"."
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/CertTool.java#L50-L55 |
154,135 | arxanchain/java-common | src/main/java/com/arxanfintech/common/crypto/CertTool.java | CertTool.getCertfromPEM | public static X509Certificate getCertfromPEM(byte[] pemBytes)
throws IOException, CertificateException, NoSuchProviderException {
InputStream inStrm = new java.io.ByteArrayInputStream(pemBytes);
X509Certificate cert = getCertfromPEM(inStrm);
return cert;
} | java | public static X509Certificate getCertfromPEM(byte[] pemBytes)
throws IOException, CertificateException, NoSuchProviderException {
InputStream inStrm = new java.io.ByteArrayInputStream(pemBytes);
X509Certificate cert = getCertfromPEM(inStrm);
return cert;
} | [
"public",
"static",
"X509Certificate",
"getCertfromPEM",
"(",
"byte",
"[",
"]",
"pemBytes",
")",
"throws",
"IOException",
",",
"CertificateException",
",",
"NoSuchProviderException",
"{",
"InputStream",
"inStrm",
"=",
"new",
"java",
".",
"io",
".",
"ByteArrayInputSt... | Reads a certificate in PEM-format from a byte array. The array may contain
other things, the first certificate in the array is read.
@param pemBytes
the byte array containing the certificate in PEM-format
@return X509Certificate
@exception IOException
if the array cannot be read.
@exception CertificateException
if the... | [
"Reads",
"a",
"certificate",
"in",
"PEM",
"-",
"format",
"from",
"a",
"byte",
"array",
".",
"The",
"array",
"may",
"contain",
"other",
"things",
"the",
"first",
"certificate",
"in",
"the",
"array",
"is",
"read",
"."
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/CertTool.java#L71-L76 |
154,136 | arxanchain/java-common | src/main/java/com/arxanfintech/common/crypto/CertTool.java | CertTool.getCertfromPEM | public static X509Certificate getCertfromPEM(InputStream certStream)
throws IOException, CertificateException, NoSuchProviderException {
String beginKey = "-----BEGIN CERTIFICATE-----";
String endKey = "-----END CERTIFICATE-----";
BufferedReader bufRdr = new BufferedReader(new Input... | java | public static X509Certificate getCertfromPEM(InputStream certStream)
throws IOException, CertificateException, NoSuchProviderException {
String beginKey = "-----BEGIN CERTIFICATE-----";
String endKey = "-----END CERTIFICATE-----";
BufferedReader bufRdr = new BufferedReader(new Input... | [
"public",
"static",
"X509Certificate",
"getCertfromPEM",
"(",
"InputStream",
"certStream",
")",
"throws",
"IOException",
",",
"CertificateException",
",",
"NoSuchProviderException",
"{",
"String",
"beginKey",
"=",
"\"-----BEGIN CERTIFICATE-----\"",
";",
"String",
"endKey",
... | Reads a certificate in PEM-format from an InputStream. The stream may contain
other things, the first certificate in the stream is read.
@param certStream
the input stream containing the certificate in PEM-format
@return X509Certificate
@exception IOException
if the stream cannot be read.
@exception CertificateExcepti... | [
"Reads",
"a",
"certificate",
"in",
"PEM",
"-",
"format",
"from",
"an",
"InputStream",
".",
"The",
"stream",
"may",
"contain",
"other",
"things",
"the",
"first",
"certificate",
"in",
"the",
"stream",
"is",
"read",
"."
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/CertTool.java#L92-L117 |
154,137 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/listeners/HandoffResultsListener.java | HandoffResultsListener.iRequestedHandoff | private boolean iRequestedHandoff(String workUnit)
{
String destinationNode = cluster.getHandoffResult(workUnit);
return (destinationNode != null)
&& cluster.myWorkUnits.contains(workUnit)
&& !destinationNode.equals("")
&& !cluster.isMe(destinationNode... | java | private boolean iRequestedHandoff(String workUnit)
{
String destinationNode = cluster.getHandoffResult(workUnit);
return (destinationNode != null)
&& cluster.myWorkUnits.contains(workUnit)
&& !destinationNode.equals("")
&& !cluster.isMe(destinationNode... | [
"private",
"boolean",
"iRequestedHandoff",
"(",
"String",
"workUnit",
")",
"{",
"String",
"destinationNode",
"=",
"cluster",
".",
"getHandoffResult",
"(",
"workUnit",
")",
";",
"return",
"(",
"destinationNode",
"!=",
"null",
")",
"&&",
"cluster",
".",
"myWorkUni... | Determines if this node requested handoff of a work unit to someone else.
I have requested handoff of a work unit if it's currently a member of my active set
and its destination node is another node in the cluster. | [
"Determines",
"if",
"this",
"node",
"requested",
"handoff",
"of",
"a",
"work",
"unit",
"to",
"someone",
"else",
".",
"I",
"have",
"requested",
"handoff",
"of",
"a",
"work",
"unit",
"if",
"it",
"s",
"currently",
"a",
"member",
"of",
"my",
"active",
"set",... | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/listeners/HandoffResultsListener.java#L64-L71 |
154,138 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/listeners/HandoffResultsListener.java | HandoffResultsListener.shutdownAfterHandoff | private Runnable shutdownAfterHandoff(final String workUnit)
{
final Cluster cluster = this.cluster;
final Logger log = LOG;
return new Runnable() {
@Override
public void run() {
String str = cluster.getHandoffResult(workUnit);
log.info... | java | private Runnable shutdownAfterHandoff(final String workUnit)
{
final Cluster cluster = this.cluster;
final Logger log = LOG;
return new Runnable() {
@Override
public void run() {
String str = cluster.getHandoffResult(workUnit);
log.info... | [
"private",
"Runnable",
"shutdownAfterHandoff",
"(",
"final",
"String",
"workUnit",
")",
"{",
"final",
"Cluster",
"cluster",
"=",
"this",
".",
"cluster",
";",
"final",
"Logger",
"log",
"=",
"LOG",
";",
"return",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Overr... | Builds a runnable to shut down a work unit after a configurable delay once handoff
has completed. If the cluster has been instructed to shut down and the last work unit
has been handed off, this task also directs this Ordasity instance to shut down. | [
"Builds",
"a",
"runnable",
"to",
"shut",
"down",
"a",
"work",
"unit",
"after",
"a",
"configurable",
"delay",
"once",
"handoff",
"has",
"completed",
".",
"If",
"the",
"cluster",
"has",
"been",
"instructed",
"to",
"shut",
"down",
"and",
"the",
"last",
"work"... | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/listeners/HandoffResultsListener.java#L78-L95 |
154,139 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/listeners/HandoffResultsListener.java | HandoffResultsListener.finishHandoff | public void finishHandoff(final String workUnit) throws InterruptedException
{
String unitId = cluster.workUnitMap.get(workUnit);
LOG.info("Handoff of {} to me acknowledged. Deleting claim ZNode for {} and waiting for {} to shutdown work.",
workUnit, workUnit,
((unitI... | java | public void finishHandoff(final String workUnit) throws InterruptedException
{
String unitId = cluster.workUnitMap.get(workUnit);
LOG.info("Handoff of {} to me acknowledged. Deleting claim ZNode for {} and waiting for {} to shutdown work.",
workUnit, workUnit,
((unitI... | [
"public",
"void",
"finishHandoff",
"(",
"final",
"String",
"workUnit",
")",
"throws",
"InterruptedException",
"{",
"String",
"unitId",
"=",
"cluster",
".",
"workUnitMap",
".",
"get",
"(",
"workUnit",
")",
";",
"LOG",
".",
"info",
"(",
"\"Handoff of {} to me ackn... | Completes the process of handing off a work unit from one node to the current one.
Attempts to establish a final claim to the node handed off to me in ZooKeeper, and
repeats execution of the task every two seconds until it is complete. | [
"Completes",
"the",
"process",
"of",
"handing",
"off",
"a",
"work",
"unit",
"from",
"one",
"node",
"to",
"the",
"current",
"one",
".",
"Attempts",
"to",
"establish",
"a",
"final",
"claim",
"to",
"the",
"node",
"handed",
"off",
"to",
"me",
"in",
"ZooKeepe... | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/listeners/HandoffResultsListener.java#L102-L123 |
154,140 | tvesalainen/util | security/src/main/java/org/vesalainen/net/ssl/SSLServerSocketChannel.java | SSLServerSocketChannel.open | public static SSLServerSocketChannel open(SocketAddress address) throws IOException
{
try
{
return open(address, SSLContext.getDefault());
}
catch (NoSuchAlgorithmException ex)
{
throw new IOException(ex);
}
} | java | public static SSLServerSocketChannel open(SocketAddress address) throws IOException
{
try
{
return open(address, SSLContext.getDefault());
}
catch (NoSuchAlgorithmException ex)
{
throw new IOException(ex);
}
} | [
"public",
"static",
"SSLServerSocketChannel",
"open",
"(",
"SocketAddress",
"address",
")",
"throws",
"IOException",
"{",
"try",
"{",
"return",
"open",
"(",
"address",
",",
"SSLContext",
".",
"getDefault",
"(",
")",
")",
";",
"}",
"catch",
"(",
"NoSuchAlgorith... | Creates and binds SSLServerSocketChannel using default SSLContext.
@param address
@return
@throws IOException | [
"Creates",
"and",
"binds",
"SSLServerSocketChannel",
"using",
"default",
"SSLContext",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/security/src/main/java/org/vesalainen/net/ssl/SSLServerSocketChannel.java#L76-L86 |
154,141 | arxanchain/java-common | src/main/java/com/arxanfintech/common/crypto/Hash.java | Hash.merge | public static Hash merge(Hash a, Hash b) {
try {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
digest.update(a.bytes);
return Hash.createFromSafeArray(digest.digest(digest.digest(b.bytes)));
} catch (NoSuchAlgorithmException e) {
throw new R... | java | public static Hash merge(Hash a, Hash b) {
try {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
digest.update(a.bytes);
return Hash.createFromSafeArray(digest.digest(digest.digest(b.bytes)));
} catch (NoSuchAlgorithmException e) {
throw new R... | [
"public",
"static",
"Hash",
"merge",
"(",
"Hash",
"a",
",",
"Hash",
"b",
")",
"{",
"try",
"{",
"MessageDigest",
"digest",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"SHA-256\"",
")",
";",
"digest",
".",
"update",
"(",
"a",
".",
"bytes",
")",
";",... | Merge two Hashes into one for Merkle Tree calculation
@param a - a Hash
@param b - another Hash
@return SHA256(SHA256(a||b)) | [
"Merge",
"two",
"Hashes",
"into",
"one",
"for",
"Merkle",
"Tree",
"calculation"
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/Hash.java#L114-L122 |
154,142 | arxanchain/java-common | src/main/java/com/arxanfintech/common/crypto/Hash.java | Hash.hash | public static byte[] hash(byte[] data, int offset, int len) {
try {
MessageDigest a = MessageDigest.getInstance("SHA-256");
a.update(data, offset, len);
return a.digest();
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
}
... | java | public static byte[] hash(byte[] data, int offset, int len) {
try {
MessageDigest a = MessageDigest.getInstance("SHA-256");
a.update(data, offset, len);
return a.digest();
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
}
... | [
"public",
"static",
"byte",
"[",
"]",
"hash",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"offset",
",",
"int",
"len",
")",
"{",
"try",
"{",
"MessageDigest",
"a",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"SHA-256\"",
")",
";",
"a",
".",
"updat... | SHA256 hash of arbitrary data
@param data arbitary data
@param offset start hashing at this offset (0 starts)
@param len hash len number of bytes
@return SHA256(data) | [
"SHA256",
"hash",
"of",
"arbitrary",
"data"
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/Hash.java#L132-L140 |
154,143 | arxanchain/java-common | src/main/java/com/arxanfintech/common/crypto/Hash.java | Hash.toUuidString | public String toUuidString() {
String[] items = new String[] {contentAsHex(0, 4), contentAsHex(4, 6),
contentAsHex(6, 8), contentAsHex(8, 10),
contentAsHex(10, 16)};
String result = StringUtils.join(items, "-");
return result.toLo... | java | public String toUuidString() {
String[] items = new String[] {contentAsHex(0, 4), contentAsHex(4, 6),
contentAsHex(6, 8), contentAsHex(8, 10),
contentAsHex(10, 16)};
String result = StringUtils.join(items, "-");
return result.toLo... | [
"public",
"String",
"toUuidString",
"(",
")",
"{",
"String",
"[",
"]",
"items",
"=",
"new",
"String",
"[",
"]",
"{",
"contentAsHex",
"(",
"0",
",",
"4",
")",
",",
"contentAsHex",
"(",
"4",
",",
"6",
")",
",",
"contentAsHex",
"(",
"6",
",",
"8",
"... | UUID created from the first 128 bits of SHA256
@return String | [
"UUID",
"created",
"from",
"the",
"first",
"128",
"bits",
"of",
"SHA256"
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/Hash.java#L167-L173 |
154,144 | glookast/commons-timecode | src/main/java/com/glookast/commons/timecode/MutableTimecode.java | MutableTimecode.valueOf | public static MutableTimecode valueOf(String timecode) throws IllegalArgumentException
{
MutableTimecode tc = new MutableTimecode();
return (MutableTimecode) tc.parse(timecode);
} | java | public static MutableTimecode valueOf(String timecode) throws IllegalArgumentException
{
MutableTimecode tc = new MutableTimecode();
return (MutableTimecode) tc.parse(timecode);
} | [
"public",
"static",
"MutableTimecode",
"valueOf",
"(",
"String",
"timecode",
")",
"throws",
"IllegalArgumentException",
"{",
"MutableTimecode",
"tc",
"=",
"new",
"MutableTimecode",
"(",
")",
";",
"return",
"(",
"MutableTimecode",
")",
"tc",
".",
"parse",
"(",
"t... | Returns a MutableTimecode instance for given Timecode storage string. Will return an invalid timecode in case the storage string represents an invalid Timecode
@param timecode
@return the timecode
@throws IllegalArgumentException | [
"Returns",
"a",
"MutableTimecode",
"instance",
"for",
"given",
"Timecode",
"storage",
"string",
".",
"Will",
"return",
"an",
"invalid",
"timecode",
"in",
"case",
"the",
"storage",
"string",
"represents",
"an",
"invalid",
"Timecode"
] | ec2f682a51d1cc435d0b42d80de48ff15adb4ee8 | https://github.com/glookast/commons-timecode/blob/ec2f682a51d1cc435d0b42d80de48ff15adb4ee8/src/main/java/com/glookast/commons/timecode/MutableTimecode.java#L58-L62 |
154,145 | tvesalainen/util | util/src/main/java/org/vesalainen/math/AbstractCubicSpline.java | AbstractCubicSpline.getMatrix | protected DoubleMatrix getMatrix(int n)
{
Map<Integer, DoubleMatrix> degreeMap = matrixCache.get(this.getClass());
if (degreeMap == null)
{
degreeMap = new HashMap<>();
matrixCache.put(this.getClass(), degreeMap);
}
DoubleMatrix m = degreeMap.get(n);
... | java | protected DoubleMatrix getMatrix(int n)
{
Map<Integer, DoubleMatrix> degreeMap = matrixCache.get(this.getClass());
if (degreeMap == null)
{
degreeMap = new HashMap<>();
matrixCache.put(this.getClass(), degreeMap);
}
DoubleMatrix m = degreeMap.get(n);
... | [
"protected",
"DoubleMatrix",
"getMatrix",
"(",
"int",
"n",
")",
"{",
"Map",
"<",
"Integer",
",",
"DoubleMatrix",
">",
"degreeMap",
"=",
"matrixCache",
".",
"get",
"(",
"this",
".",
"getClass",
"(",
")",
")",
";",
"if",
"(",
"degreeMap",
"==",
"null",
"... | Returns class cached DoubleMatrix with decompose already called.
@param n
@return | [
"Returns",
"class",
"cached",
"DoubleMatrix",
"with",
"decompose",
"already",
"called",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/AbstractCubicSpline.java#L155-L171 |
154,146 | pressgang-ccms/PressGangCCMSRESTv1Common | src/main/java/org/jboss/pressgang/ccms/rest/v1/collections/contentspec/join/RESTCSRelatedNodeCollectionV1.java | RESTCSRelatedNodeCollectionV1.ignoreDuplicatedChangeItemRequests | @Override
protected void ignoreDuplicatedChangeItemRequests() {
if (getItems() != null) {
final List<RESTCSRelatedNodeCollectionItemV1> items = new ArrayList<RESTCSRelatedNodeCollectionItemV1>(getItems());
/* on the second loop, remove any items that are marked for both add ... | java | @Override
protected void ignoreDuplicatedChangeItemRequests() {
if (getItems() != null) {
final List<RESTCSRelatedNodeCollectionItemV1> items = new ArrayList<RESTCSRelatedNodeCollectionItemV1>(getItems());
/* on the second loop, remove any items that are marked for both add ... | [
"@",
"Override",
"protected",
"void",
"ignoreDuplicatedChangeItemRequests",
"(",
")",
"{",
"if",
"(",
"getItems",
"(",
")",
"!=",
"null",
")",
"{",
"final",
"List",
"<",
"RESTCSRelatedNodeCollectionItemV1",
">",
"items",
"=",
"new",
"ArrayList",
"<",
"RESTCSRela... | This method will clear out any child items that are marked for both add and remove, or duplicated add and remove requests.
Override this method to deal with collections where the children are not uniquely identified by only their id. | [
"This",
"method",
"will",
"clear",
"out",
"any",
"child",
"items",
"that",
"are",
"marked",
"for",
"both",
"add",
"and",
"remove",
"or",
"duplicated",
"add",
"and",
"remove",
"requests",
".",
"Override",
"this",
"method",
"to",
"deal",
"with",
"collections",... | 0641d21b127297b47035f3b8e55fba81251b419c | https://github.com/pressgang-ccms/PressGangCCMSRESTv1Common/blob/0641d21b127297b47035f3b8e55fba81251b419c/src/main/java/org/jboss/pressgang/ccms/rest/v1/collections/contentspec/join/RESTCSRelatedNodeCollectionV1.java#L60-L125 |
154,147 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/convert/RecipFieldConverter.java | RecipFieldConverter.setString | public int setString( String strField, boolean bDisplayOption, int iMoveMode)
{
NumberField numberField = (NumberField)this.getNextConverter();
int iErrorCode = super.setString(strField, DBConstants.DONT_DISPLAY, iMoveMode);
if (strField.length() == 0)
numberField.displayField();... | java | public int setString( String strField, boolean bDisplayOption, int iMoveMode)
{
NumberField numberField = (NumberField)this.getNextConverter();
int iErrorCode = super.setString(strField, DBConstants.DONT_DISPLAY, iMoveMode);
if (strField.length() == 0)
numberField.displayField();... | [
"public",
"int",
"setString",
"(",
"String",
"strField",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"NumberField",
"numberField",
"=",
"(",
"NumberField",
")",
"this",
".",
"getNextConverter",
"(",
")",
";",
"int",
"iErrorCode",
"=",
... | Convert and move string to this field.
Get the recriprical of this string and set the string.
@param bState the state to set the data to.
@param bDisplayOption Display the data on the screen if true.
@param iMoveMode INIT, SCREEN, or READ move mode.
@return The error code (or NORMAL_RETURN). | [
"Convert",
"and",
"move",
"string",
"to",
"this",
"field",
".",
"Get",
"the",
"recriprical",
"of",
"this",
"string",
"and",
"set",
"the",
"string",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/RecipFieldConverter.java#L77-L90 |
154,148 | FrodeRanders/java-vopn | src/main/java/org/gautelis/vopn/queue/WorkerQueueFactory.java | WorkerQueueFactory.getWorkQueue | public static WorkQueue getWorkQueue(Type type, int nThreads) {
switch(type) {
case Simple:
return new SimpleWorkQueue(nThreads);
case Multi:
return new MultiWorkQueue(nThreads);
//case WorkStealing:
default:
return new MultiWorkQueue(nThreads);
}
} | java | public static WorkQueue getWorkQueue(Type type, int nThreads) {
switch(type) {
case Simple:
return new SimpleWorkQueue(nThreads);
case Multi:
return new MultiWorkQueue(nThreads);
//case WorkStealing:
default:
return new MultiWorkQueue(nThreads);
}
} | [
"public",
"static",
"WorkQueue",
"getWorkQueue",
"(",
"Type",
"type",
",",
"int",
"nThreads",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"Simple",
":",
"return",
"new",
"SimpleWorkQueue",
"(",
"nThreads",
")",
";",
"case",
"Multi",
":",
"return",
... | Returns a thread-backed queue.
@param type {@link Type} of queue
@param nThreads number of threads tending to the queue
@return a worker queue | [
"Returns",
"a",
"thread",
"-",
"backed",
"queue",
"."
] | 4c7b2f90201327af4eaa3cd46b3fee68f864e5cc | https://github.com/FrodeRanders/java-vopn/blob/4c7b2f90201327af4eaa3cd46b3fee68f864e5cc/src/main/java/org/gautelis/vopn/queue/WorkerQueueFactory.java#L46-L58 |
154,149 | nwillc/almost-functional | src/main/java/almost/functional/reactive/Promise.java | Promise.run | @Override
public void run() {
if (!state.compareAndSet(State.CREATED, State.PENDING)) {
throw new IllegalStateException("Can only run a promise in the CREATED state");
}
T result;
try {
result = supplier.get();
state.set(State.COMPLETED);
... | java | @Override
public void run() {
if (!state.compareAndSet(State.CREATED, State.PENDING)) {
throw new IllegalStateException("Can only run a promise in the CREATED state");
}
T result;
try {
result = supplier.get();
state.set(State.COMPLETED);
... | [
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"if",
"(",
"!",
"state",
".",
"compareAndSet",
"(",
"State",
".",
"CREATED",
",",
"State",
".",
"PENDING",
")",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Can only run a promise in the ... | This method calls the supplier and on successful completion informs the fulfilled consumers of the
return value. If the supplier throws an exception the rejected consumers are informed. In either case
when the call to the supplier completes the settled consumers are informed with an Optional containing the
supplied val... | [
"This",
"method",
"calls",
"the",
"supplier",
"and",
"on",
"successful",
"completion",
"informs",
"the",
"fulfilled",
"consumers",
"of",
"the",
"return",
"value",
".",
"If",
"the",
"supplier",
"throws",
"an",
"exception",
"the",
"rejected",
"consumers",
"are",
... | a6cc7c73b2be475ed1bce5128c24b2eb9c27d666 | https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/reactive/Promise.java#L78-L95 |
154,150 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/menu/JRemoteMenuScreen.java | JRemoteMenuScreen.init | public void init(Object parent, Object record)
{
if (parent instanceof BaseApplet)
m_strInitParam = ((BaseApplet)parent).getProperty(Params.MENU);
super.init(parent, record);
} | java | public void init(Object parent, Object record)
{
if (parent instanceof BaseApplet)
m_strInitParam = ((BaseApplet)parent).getProperty(Params.MENU);
super.init(parent, record);
} | [
"public",
"void",
"init",
"(",
"Object",
"parent",
",",
"Object",
"record",
")",
"{",
"if",
"(",
"parent",
"instanceof",
"BaseApplet",
")",
"m_strInitParam",
"=",
"(",
"(",
"BaseApplet",
")",
"parent",
")",
".",
"getProperty",
"(",
"Params",
".",
"MENU",
... | Initialize this class.
If there is a top-level "menu=" property, save it for later.
@param parent Typically, you pass the BaseApplet as the parent.
@param record and the record or GridTableModel as the parent. | [
"Initialize",
"this",
"class",
".",
"If",
"there",
"is",
"a",
"top",
"-",
"level",
"menu",
"=",
"property",
"save",
"it",
"for",
"later",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/menu/JRemoteMenuScreen.java#L64-L69 |
154,151 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/menu/JRemoteMenuScreen.java | JRemoteMenuScreen.buildFieldList | public FieldList buildFieldList()
{
FieldList record = (FieldList)ClassServiceUtility.getClassService().makeObjectFromClassName(Constants.ROOT_PACKAGE + "thin.main.db.Menus");
if (record != null)
record.init(this);
else
return null;
record.setOpenMode(Constants.O... | java | public FieldList buildFieldList()
{
FieldList record = (FieldList)ClassServiceUtility.getClassService().makeObjectFromClassName(Constants.ROOT_PACKAGE + "thin.main.db.Menus");
if (record != null)
record.init(this);
else
return null;
record.setOpenMode(Constants.O... | [
"public",
"FieldList",
"buildFieldList",
"(",
")",
"{",
"FieldList",
"record",
"=",
"(",
"FieldList",
")",
"ClassServiceUtility",
".",
"getClassService",
"(",
")",
".",
"makeObjectFromClassName",
"(",
"Constants",
".",
"ROOT_PACKAGE",
"+",
"\"thin.main.db.Menus\"",
... | Build the list of fields that make up the screen.
This method creates a new Menus record and links it to the remote MenusSession.
@return the field. | [
"Build",
"the",
"list",
"of",
"fields",
"that",
"make",
"up",
"the",
"screen",
".",
"This",
"method",
"creates",
"a",
"new",
"Menus",
"record",
"and",
"links",
"it",
"to",
"the",
"remote",
"MenusSession",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/menu/JRemoteMenuScreen.java#L123-L144 |
154,152 | tvesalainen/util | util/src/main/java/org/vesalainen/ui/AbstractView.java | AbstractView.setMargin | public void setMargin(Rectangle2D bounds, Direction... dirs)
{
for (Direction dir : dirs)
{
switch (dir)
{
case BOTTOM:
combinedTransform.transform(userBounds.getCenterX(), userBounds.getMinY(), (x,y)->
{
... | java | public void setMargin(Rectangle2D bounds, Direction... dirs)
{
for (Direction dir : dirs)
{
switch (dir)
{
case BOTTOM:
combinedTransform.transform(userBounds.getCenterX(), userBounds.getMinY(), (x,y)->
{
... | [
"public",
"void",
"setMargin",
"(",
"Rectangle2D",
"bounds",
",",
"Direction",
"...",
"dirs",
")",
"{",
"for",
"(",
"Direction",
"dir",
":",
"dirs",
")",
"{",
"switch",
"(",
"dir",
")",
"{",
"case",
"BOTTOM",
":",
"combinedTransform",
".",
"transform",
"... | Enlarges margin in screen coordinates to given directions
@param bounds
@param dirs | [
"Enlarges",
"margin",
"in",
"screen",
"coordinates",
"to",
"given",
"directions"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/AbstractView.java#L109-L141 |
154,153 | tvesalainen/util | util/src/main/java/org/vesalainen/ui/AbstractView.java | AbstractView.toScreenX | public double toScreenX(double x)
{
Point2D src = srcPnt.get();
Point2D dst = dstPnt.get();
src.setLocation(x, 0);
combinedTransform.transform(src, dst);
return dst.getX();
//return scaleX * x + xOff;
} | java | public double toScreenX(double x)
{
Point2D src = srcPnt.get();
Point2D dst = dstPnt.get();
src.setLocation(x, 0);
combinedTransform.transform(src, dst);
return dst.getX();
//return scaleX * x + xOff;
} | [
"public",
"double",
"toScreenX",
"(",
"double",
"x",
")",
"{",
"Point2D",
"src",
"=",
"srcPnt",
".",
"get",
"(",
")",
";",
"Point2D",
"dst",
"=",
"dstPnt",
".",
"get",
"(",
")",
";",
"src",
".",
"setLocation",
"(",
"x",
",",
"0",
")",
";",
"combi... | Translates cartesian x-coordinate to screen coordinate.
@param x
@return | [
"Translates",
"cartesian",
"x",
"-",
"coordinate",
"to",
"screen",
"coordinate",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/AbstractView.java#L182-L190 |
154,154 | tvesalainen/util | util/src/main/java/org/vesalainen/ui/AbstractView.java | AbstractView.toScreenY | public double toScreenY(double y)
{
Point2D src = srcPnt.get();
Point2D dst = dstPnt.get();
src.setLocation(0, y);
combinedTransform.transform(src, dst);
return dst.getY();
} | java | public double toScreenY(double y)
{
Point2D src = srcPnt.get();
Point2D dst = dstPnt.get();
src.setLocation(0, y);
combinedTransform.transform(src, dst);
return dst.getY();
} | [
"public",
"double",
"toScreenY",
"(",
"double",
"y",
")",
"{",
"Point2D",
"src",
"=",
"srcPnt",
".",
"get",
"(",
")",
";",
"Point2D",
"dst",
"=",
"dstPnt",
".",
"get",
"(",
")",
";",
"src",
".",
"setLocation",
"(",
"0",
",",
"y",
")",
";",
"combi... | Translates cartesian y-coordinate to screen coordinate.
@param y
@return | [
"Translates",
"cartesian",
"y",
"-",
"coordinate",
"to",
"screen",
"coordinate",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/AbstractView.java#L196-L203 |
154,155 | tvesalainen/util | util/src/main/java/org/vesalainen/ui/AbstractView.java | AbstractView.fromScreenX | public double fromScreenX(double x)
{
Point2D src = srcPnt.get();
Point2D dst = dstPnt.get();
src.setLocation(x, 0);
inverse.transform(src, dst);
return dst.getX();
} | java | public double fromScreenX(double x)
{
Point2D src = srcPnt.get();
Point2D dst = dstPnt.get();
src.setLocation(x, 0);
inverse.transform(src, dst);
return dst.getX();
} | [
"public",
"double",
"fromScreenX",
"(",
"double",
"x",
")",
"{",
"Point2D",
"src",
"=",
"srcPnt",
".",
"get",
"(",
")",
";",
"Point2D",
"dst",
"=",
"dstPnt",
".",
"get",
"(",
")",
";",
"src",
".",
"setLocation",
"(",
"x",
",",
"0",
")",
";",
"inv... | Translates screen x-coordinate to cartesian coordinate.
@param x
@return | [
"Translates",
"screen",
"x",
"-",
"coordinate",
"to",
"cartesian",
"coordinate",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/AbstractView.java#L209-L216 |
154,156 | tvesalainen/util | util/src/main/java/org/vesalainen/ui/AbstractView.java | AbstractView.fromScreenY | public double fromScreenY(double y)
{
Point2D src = srcPnt.get();
Point2D dst = dstPnt.get();
src.setLocation(0, y);
inverse.transform(src, dst);
return dst.getY();
} | java | public double fromScreenY(double y)
{
Point2D src = srcPnt.get();
Point2D dst = dstPnt.get();
src.setLocation(0, y);
inverse.transform(src, dst);
return dst.getY();
} | [
"public",
"double",
"fromScreenY",
"(",
"double",
"y",
")",
"{",
"Point2D",
"src",
"=",
"srcPnt",
".",
"get",
"(",
")",
";",
"Point2D",
"dst",
"=",
"dstPnt",
".",
"get",
"(",
")",
";",
"src",
".",
"setLocation",
"(",
"0",
",",
"y",
")",
";",
"inv... | Translates screen y-coordinate to cartesian coordinate.
@param y
@return | [
"Translates",
"screen",
"y",
"-",
"coordinate",
"to",
"cartesian",
"coordinate",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/AbstractView.java#L222-L229 |
154,157 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.znodeIsMe | public boolean znodeIsMe(String path) {
String value = ZKUtils.get(zk, path);
return (value != null && value == myNodeID);
} | java | public boolean znodeIsMe(String path) {
String value = ZKUtils.get(zk, path);
return (value != null && value == myNodeID);
} | [
"public",
"boolean",
"znodeIsMe",
"(",
"String",
"path",
")",
"{",
"String",
"value",
"=",
"ZKUtils",
".",
"get",
"(",
"zk",
",",
"path",
")",
";",
"return",
"(",
"value",
"!=",
"null",
"&&",
"value",
"==",
"myNodeID",
")",
";",
"}"
] | Given a path, determines whether or not the value of a ZNode is my node ID. | [
"Given",
"a",
"path",
"determines",
"whether",
"or",
"not",
"the",
"value",
"of",
"a",
"ZNode",
"is",
"my",
"node",
"ID",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L236-L239 |
154,158 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.join | public NodeState join(ZooKeeperClient injectedClient) throws InterruptedException
{
switch (state.get()) {
case Fresh:
connect(injectedClient);
break;
case Shutdown:
connect(injectedClient);
break;
case Draining:
LOG.warn("'... | java | public NodeState join(ZooKeeperClient injectedClient) throws InterruptedException
{
switch (state.get()) {
case Fresh:
connect(injectedClient);
break;
case Shutdown:
connect(injectedClient);
break;
case Draining:
LOG.warn("'... | [
"public",
"NodeState",
"join",
"(",
"ZooKeeperClient",
"injectedClient",
")",
"throws",
"InterruptedException",
"{",
"switch",
"(",
"state",
".",
"get",
"(",
")",
")",
"{",
"case",
"Fresh",
":",
"connect",
"(",
"injectedClient",
")",
";",
"break",
";",
"case... | Joins the cluster using a custom zk client, claims work, and begins operation. | [
"Joins",
"the",
"cluster",
"using",
"a",
"custom",
"zk",
"client",
"claims",
"work",
"and",
"begins",
"operation",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L329-L347 |
154,159 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.connect | private void connect(ZooKeeperClient injectedClient) throws InterruptedException {
if (!initialized.get()) {
if (injectedClient == null) {
List<InetSocketAddress> hosts = new ArrayList<InetSocketAddress>();
for (String host : config.hosts.split(",")) {
... | java | private void connect(ZooKeeperClient injectedClient) throws InterruptedException {
if (!initialized.get()) {
if (injectedClient == null) {
List<InetSocketAddress> hosts = new ArrayList<InetSocketAddress>();
for (String host : config.hosts.split(",")) {
... | [
"private",
"void",
"connect",
"(",
"ZooKeeperClient",
"injectedClient",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"!",
"initialized",
".",
"get",
"(",
")",
")",
"{",
"if",
"(",
"injectedClient",
"==",
"null",
")",
"{",
"List",
"<",
"InetSocketAd... | Directs the ZooKeeperClient to connect to the ZooKeeper ensemble and wait for
the connection to be established before continuing. | [
"Directs",
"the",
"ZooKeeperClient",
"to",
"connect",
"to",
"the",
"ZooKeeper",
"ensemble",
"and",
"wait",
"for",
"the",
"connection",
"to",
"be",
"established",
"before",
"continuing",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L387-L415 |
154,160 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.stopAndWait | public void stopAndWait(final long waitTime, final AtomicBoolean stopFlag) {
if (!waitInProgress.getAndSet(true)) {
stopFlag.set(true);
rejoinExecutor.submit(new Runnable() {
@Override
public void run() {
balancingPolicy.drainToCount(0,... | java | public void stopAndWait(final long waitTime, final AtomicBoolean stopFlag) {
if (!waitInProgress.getAndSet(true)) {
stopFlag.set(true);
rejoinExecutor.submit(new Runnable() {
@Override
public void run() {
balancingPolicy.drainToCount(0,... | [
"public",
"void",
"stopAndWait",
"(",
"final",
"long",
"waitTime",
",",
"final",
"AtomicBoolean",
"stopFlag",
")",
"{",
"if",
"(",
"!",
"waitInProgress",
".",
"getAndSet",
"(",
"true",
")",
")",
"{",
"stopFlag",
".",
"set",
"(",
"true",
")",
";",
"rejoin... | For handling problematic nodes - drains workers and does not claim work for waitTime seconds | [
"For",
"handling",
"problematic",
"nodes",
"-",
"drains",
"workers",
"and",
"does",
"not",
"claim",
"work",
"for",
"waitTime",
"seconds"
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L421-L439 |
154,161 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.completeShutdown | public void completeShutdown() {
setState(NodeState.Shutdown);
shutdownAllWorkUnits();
deleteFromZk();
if (claimer != null) {
claimer.interrupt();
try {
claimer.join();
} catch (InterruptedException e) {
... | java | public void completeShutdown() {
setState(NodeState.Shutdown);
shutdownAllWorkUnits();
deleteFromZk();
if (claimer != null) {
claimer.interrupt();
try {
claimer.join();
} catch (InterruptedException e) {
... | [
"public",
"void",
"completeShutdown",
"(",
")",
"{",
"setState",
"(",
"NodeState",
".",
"Shutdown",
")",
";",
"shutdownAllWorkUnits",
"(",
")",
";",
"deleteFromZk",
"(",
")",
";",
"if",
"(",
"claimer",
"!=",
"null",
")",
"{",
"claimer",
".",
"interrupt",
... | Finalizes the shutdown sequence. Called once the drain operation completes. | [
"Finalizes",
"the",
"shutdown",
"sequence",
".",
"Called",
"once",
"the",
"drain",
"operation",
"completes",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L472-L494 |
154,162 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.onConnect | void onConnect() throws InterruptedException, IOException
{
if (state.get() != NodeState.Fresh) {
if (previousZKSessionStillActive()) {
LOG.info("ZooKeeper session re-established before timeout.");
return;
}
LOG.warn("Rejoined after session... | java | void onConnect() throws InterruptedException, IOException
{
if (state.get() != NodeState.Fresh) {
if (previousZKSessionStillActive()) {
LOG.info("ZooKeeper session re-established before timeout.");
return;
}
LOG.warn("Rejoined after session... | [
"void",
"onConnect",
"(",
")",
"throws",
"InterruptedException",
",",
"IOException",
"{",
"if",
"(",
"state",
".",
"get",
"(",
")",
"!=",
"NodeState",
".",
"Fresh",
")",
"{",
"if",
"(",
"previousZKSessionStillActive",
"(",
")",
")",
"{",
"LOG",
".",
"inf... | Primary callback which is triggered upon successful Zookeeper connection. | [
"Primary",
"callback",
"which",
"is",
"triggered",
"upon",
"successful",
"Zookeeper",
"connection",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L506-L534 |
154,163 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.ensureCleanStartup | private void ensureCleanStartup() {
forceShutdown();
ScheduledThreadPoolExecutor oldPool = pool.getAndSet(createScheduledThreadExecutor());
oldPool.shutdownNow();
claimedForHandoff.clear();
workUnitsPeggedToMe.clear();
state.set(NodeState.Fresh);
} | java | private void ensureCleanStartup() {
forceShutdown();
ScheduledThreadPoolExecutor oldPool = pool.getAndSet(createScheduledThreadExecutor());
oldPool.shutdownNow();
claimedForHandoff.clear();
workUnitsPeggedToMe.clear();
state.set(NodeState.Fresh);
} | [
"private",
"void",
"ensureCleanStartup",
"(",
")",
"{",
"forceShutdown",
"(",
")",
";",
"ScheduledThreadPoolExecutor",
"oldPool",
"=",
"pool",
".",
"getAndSet",
"(",
"createScheduledThreadExecutor",
"(",
")",
")",
";",
"oldPool",
".",
"shutdownNow",
"(",
")",
";... | In the event that the node has been evicted and is reconnecting, this method
clears out all existing state before relaunching to ensure a clean launch. | [
"In",
"the",
"event",
"that",
"the",
"node",
"has",
"been",
"evicted",
"and",
"is",
"reconnecting",
"this",
"method",
"clears",
"out",
"all",
"existing",
"state",
"before",
"relaunching",
"to",
"ensure",
"a",
"clean",
"launch",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L540-L547 |
154,164 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.scheduleRebalancing | private void scheduleRebalancing() {
int interval = config.autoRebalanceInterval;
Runnable runRebalance = new Runnable() {
@Override
public void run() {
try {
rebalance();
} catch (Exception e) {
LOG.error("Error running aut... | java | private void scheduleRebalancing() {
int interval = config.autoRebalanceInterval;
Runnable runRebalance = new Runnable() {
@Override
public void run() {
try {
rebalance();
} catch (Exception e) {
LOG.error("Error running aut... | [
"private",
"void",
"scheduleRebalancing",
"(",
")",
"{",
"int",
"interval",
"=",
"config",
".",
"autoRebalanceInterval",
";",
"Runnable",
"runRebalance",
"=",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"try",
... | Schedules auto-rebalancing if auto-rebalancing is enabled. The task is
scheduled to run every 60 seconds by default, or according to the config. | [
"Schedules",
"auto",
"-",
"rebalancing",
"if",
"auto",
"-",
"rebalancing",
"is",
"enabled",
".",
"The",
"task",
"is",
"scheduled",
"to",
"run",
"every",
"60",
"seconds",
"by",
"default",
"or",
"according",
"to",
"the",
"config",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L553-L567 |
154,165 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.joinCluster | private void joinCluster() throws InterruptedException, IOException {
while (true) {
NodeInfo myInfo;
try {
myInfo = new NodeInfo(NodeState.Fresh.toString(), zk.get().getSessionId());
} catch (ZooKeeperConnectionException e) {
throw ZKException... | java | private void joinCluster() throws InterruptedException, IOException {
while (true) {
NodeInfo myInfo;
try {
myInfo = new NodeInfo(NodeState.Fresh.toString(), zk.get().getSessionId());
} catch (ZooKeeperConnectionException e) {
throw ZKException... | [
"private",
"void",
"joinCluster",
"(",
")",
"throws",
"InterruptedException",
",",
"IOException",
"{",
"while",
"(",
"true",
")",
"{",
"NodeInfo",
"myInfo",
";",
"try",
"{",
"myInfo",
"=",
"new",
"NodeInfo",
"(",
"NodeState",
".",
"Fresh",
".",
"toString",
... | Registers this node with Zookeeper on startup, retrying until it succeeds.
This retry logic is important in that a node which restarts before Zookeeper
detects the previous disconnect could prohibit the node from properly launching. | [
"Registers",
"this",
"node",
"with",
"Zookeeper",
"on",
"startup",
"retrying",
"until",
"it",
"succeeds",
".",
"This",
"retry",
"logic",
"is",
"important",
"in",
"that",
"a",
"node",
"which",
"restarts",
"before",
"Zookeeper",
"detects",
"the",
"previous",
"di... | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L574-L604 |
154,166 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.claimWork | public void claimWork() throws InterruptedException {
if (state.get() == NodeState.Started && !waitInProgress.get() && connected.get()) {
balancingPolicy.claimWork();
}
} | java | public void claimWork() throws InterruptedException {
if (state.get() == NodeState.Started && !waitInProgress.get() && connected.get()) {
balancingPolicy.claimWork();
}
} | [
"public",
"void",
"claimWork",
"(",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"state",
".",
"get",
"(",
")",
"==",
"NodeState",
".",
"Started",
"&&",
"!",
"waitInProgress",
".",
"get",
"(",
")",
"&&",
"connected",
".",
"get",
"(",
")",
")"... | Triggers a work-claiming cycle. If smart balancing is enabled, claim work based
on node and cluster load. If simple balancing is in effect, claim by count. | [
"Triggers",
"a",
"work",
"-",
"claiming",
"cycle",
".",
"If",
"smart",
"balancing",
"is",
"enabled",
"claim",
"work",
"based",
"on",
"node",
"and",
"cluster",
"load",
".",
"If",
"simple",
"balancing",
"is",
"in",
"effect",
"claim",
"by",
"count",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L657-L661 |
154,167 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.requestHandoff | public void requestHandoff(String workUnit) throws InterruptedException {
LOG.info("Requesting handoff for {}.", workUnit);
ZKUtils.createEphemeral(zk, "/" + name + "/handoff-requests/" + workUnit);
} | java | public void requestHandoff(String workUnit) throws InterruptedException {
LOG.info("Requesting handoff for {}.", workUnit);
ZKUtils.createEphemeral(zk, "/" + name + "/handoff-requests/" + workUnit);
} | [
"public",
"void",
"requestHandoff",
"(",
"String",
"workUnit",
")",
"throws",
"InterruptedException",
"{",
"LOG",
".",
"info",
"(",
"\"Requesting handoff for {}.\"",
",",
"workUnit",
")",
";",
"ZKUtils",
".",
"createEphemeral",
"(",
"zk",
",",
"\"/\"",
"+",
"nam... | Requests that another node take over for a work unit by creating a ZNode
at handoff-requests. This will trigger a claim cycle and adoption. | [
"Requests",
"that",
"another",
"node",
"take",
"over",
"for",
"a",
"work",
"unit",
"by",
"creating",
"a",
"ZNode",
"at",
"handoff",
"-",
"requests",
".",
"This",
"will",
"trigger",
"a",
"claim",
"cycle",
"and",
"adoption",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L674-L677 |
154,168 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.verifyIntegrity | public void verifyIntegrity()
{
LinkedHashSet<String> noLongerActive = new LinkedHashSet<String>(myWorkUnits);
noLongerActive.removeAll(allWorkUnits.keySet());
for (String workUnit : noLongerActive) {
shutdownWork(workUnit, true);
}
// Check the status of pegged... | java | public void verifyIntegrity()
{
LinkedHashSet<String> noLongerActive = new LinkedHashSet<String>(myWorkUnits);
noLongerActive.removeAll(allWorkUnits.keySet());
for (String workUnit : noLongerActive) {
shutdownWork(workUnit, true);
}
// Check the status of pegged... | [
"public",
"void",
"verifyIntegrity",
"(",
")",
"{",
"LinkedHashSet",
"<",
"String",
">",
"noLongerActive",
"=",
"new",
"LinkedHashSet",
"<",
"String",
">",
"(",
"myWorkUnits",
")",
";",
"noLongerActive",
".",
"removeAll",
"(",
"allWorkUnits",
".",
"keySet",
"(... | Verifies that all nodes are hooked up properly. Shuts down any work units
which have been removed from the cluster or have been assigned to another node. | [
"Verifies",
"that",
"all",
"nodes",
"are",
"hooked",
"up",
"properly",
".",
"Shuts",
"down",
"any",
"work",
"units",
"which",
"have",
"been",
"removed",
"from",
"the",
"cluster",
"or",
"have",
"been",
"assigned",
"to",
"another",
"node",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L683-L708 |
154,169 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.shutdownWork | public void shutdownWork(String workUnit, boolean doLog /*true*/ ) {
if (doLog) {
LOG.info("Shutting down {}: {}...", config.workUnitName, workUnit);
}
myWorkUnits.remove(workUnit);
claimedForHandoff.remove(workUnit);
balancingPolicy.onShutdownWork(workUnit);
... | java | public void shutdownWork(String workUnit, boolean doLog /*true*/ ) {
if (doLog) {
LOG.info("Shutting down {}: {}...", config.workUnitName, workUnit);
}
myWorkUnits.remove(workUnit);
claimedForHandoff.remove(workUnit);
balancingPolicy.onShutdownWork(workUnit);
... | [
"public",
"void",
"shutdownWork",
"(",
"String",
"workUnit",
",",
"boolean",
"doLog",
"/*true*/",
")",
"{",
"if",
"(",
"doLog",
")",
"{",
"LOG",
".",
"info",
"(",
"\"Shutting down {}: {}...\"",
",",
"config",
".",
"workUnitName",
",",
"workUnit",
")",
";",
... | Shuts down a work unit by removing the claim in ZK and calling the listener. | [
"Shuts",
"down",
"a",
"work",
"unit",
"by",
"removing",
"the",
"claim",
"in",
"ZK",
"and",
"calling",
"the",
"listener",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L742-L754 |
154,170 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.setState | private boolean setState(NodeState to)
{
try {
NodeInfo myInfo = new NodeInfo(to.toString(), zk.get().getSessionId());
byte[] encoded = JsonUtil.asJSONBytes(myInfo);
ZKUtils.set(zk, "/" + name + "/nodes/" + myNodeID, encoded);
state.set(to);
return... | java | private boolean setState(NodeState to)
{
try {
NodeInfo myInfo = new NodeInfo(to.toString(), zk.get().getSessionId());
byte[] encoded = JsonUtil.asJSONBytes(myInfo);
ZKUtils.set(zk, "/" + name + "/nodes/" + myNodeID, encoded);
state.set(to);
return... | [
"private",
"boolean",
"setState",
"(",
"NodeState",
"to",
")",
"{",
"try",
"{",
"NodeInfo",
"myInfo",
"=",
"new",
"NodeInfo",
"(",
"to",
".",
"toString",
"(",
")",
",",
"zk",
".",
"get",
"(",
")",
".",
"getSessionId",
"(",
")",
")",
";",
"byte",
"[... | Sets the state of the current Ordasity node and notifies others via ZooKeeper. | [
"Sets",
"the",
"state",
"of",
"the",
"current",
"Ordasity",
"node",
"and",
"notifies",
"others",
"via",
"ZooKeeper",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L772-L784 |
154,171 | Multifarious/MacroManager | src/main/java/com/fasterxml/mama/Cluster.java | Cluster.previousZKSessionStillActive | private boolean previousZKSessionStillActive()
{
try {
byte[] json = zk.get().getData(String.format("/%s/nodes/%s", name, myNodeID), false, null);
NodeInfo nodeInfo = JsonUtil.fromJSON(json, NodeInfo.class);
return (nodeInfo.connectionID == zk.get().getSessionId());
... | java | private boolean previousZKSessionStillActive()
{
try {
byte[] json = zk.get().getData(String.format("/%s/nodes/%s", name, myNodeID), false, null);
NodeInfo nodeInfo = JsonUtil.fromJSON(json, NodeInfo.class);
return (nodeInfo.connectionID == zk.get().getSessionId());
... | [
"private",
"boolean",
"previousZKSessionStillActive",
"(",
")",
"{",
"try",
"{",
"byte",
"[",
"]",
"json",
"=",
"zk",
".",
"get",
"(",
")",
".",
"getData",
"(",
"String",
".",
"format",
"(",
"\"/%s/nodes/%s\"",
",",
"name",
",",
"myNodeID",
")",
",",
"... | Determines if another ZooKeeper session is currently active for the current node
by comparing the ZooKeeper session ID of the connection stored in NodeState. | [
"Determines",
"if",
"another",
"ZooKeeper",
"session",
"is",
"currently",
"active",
"for",
"the",
"current",
"node",
"by",
"comparing",
"the",
"ZooKeeper",
"session",
"ID",
"of",
"the",
"connection",
"stored",
"in",
"NodeState",
"."
] | 559785839981f460aaeba3c3fddff7fb667d9581 | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L790-L802 |
154,172 | carewebframework/carewebframework-vista | org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/encounter/EncounterUtil.java | EncounterUtil.updateParticipants | public static void updateParticipants(Encounter encounter) {
if (encounter == null || encounter.getParticipant().isEmpty()) {
return;
}
RPCParameter params = new RPCParameter();
for (EncounterParticipantComponent participant : encounter.getParticipant()) {
Strin... | java | public static void updateParticipants(Encounter encounter) {
if (encounter == null || encounter.getParticipant().isEmpty()) {
return;
}
RPCParameter params = new RPCParameter();
for (EncounterParticipantComponent participant : encounter.getParticipant()) {
Strin... | [
"public",
"static",
"void",
"updateParticipants",
"(",
"Encounter",
"encounter",
")",
"{",
"if",
"(",
"encounter",
"==",
"null",
"||",
"encounter",
".",
"getParticipant",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"RPCParameter",
"pa... | Updates the participants associated with an encounter.
@param encounter The encounter. | [
"Updates",
"the",
"participants",
"associated",
"with",
"an",
"encounter",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/encounter/EncounterUtil.java#L89-L103 |
154,173 | carewebframework/carewebframework-vista | org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/encounter/EncounterUtil.java | EncounterUtil.decode | public static Encounter decode(String vstr) {
String[] pcs = StrUtil.split(vstr, VSTR_DELIM, 4);
long encIEN = NumberUtils.toLong(pcs[3]);
if (encIEN > 0) {
return DomainFactoryRegistry.fetchObject(Encounter.class, pcs[3]);
}
long locIEN = NumberUtils.toLong(pcs[0])... | java | public static Encounter decode(String vstr) {
String[] pcs = StrUtil.split(vstr, VSTR_DELIM, 4);
long encIEN = NumberUtils.toLong(pcs[3]);
if (encIEN > 0) {
return DomainFactoryRegistry.fetchObject(Encounter.class, pcs[3]);
}
long locIEN = NumberUtils.toLong(pcs[0])... | [
"public",
"static",
"Encounter",
"decode",
"(",
"String",
"vstr",
")",
"{",
"String",
"[",
"]",
"pcs",
"=",
"StrUtil",
".",
"split",
"(",
"vstr",
",",
"VSTR_DELIM",
",",
"4",
")",
";",
"long",
"encIEN",
"=",
"NumberUtils",
".",
"toLong",
"(",
"pcs",
... | Decode encounter from visit string.
@param vstr Format is:
<p>
location ien^visit date^category^visit ien
@return The decoded encounter. | [
"Decode",
"encounter",
"from",
"visit",
"string",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/encounter/EncounterUtil.java#L113-L125 |
154,174 | carewebframework/carewebframework-vista | org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/encounter/EncounterUtil.java | EncounterUtil.encode | public static String encode(Encounter encounter) {
Location location = ClientUtil.getResource(encounter.getLocationFirstRep().getLocation(), Location.class);
String locIEN = location.isEmpty() ? "" : location.getIdElement().getIdPart();
Date date = encounter.getPeriod().getStart();
Strin... | java | public static String encode(Encounter encounter) {
Location location = ClientUtil.getResource(encounter.getLocationFirstRep().getLocation(), Location.class);
String locIEN = location.isEmpty() ? "" : location.getIdElement().getIdPart();
Date date = encounter.getPeriod().getStart();
Strin... | [
"public",
"static",
"String",
"encode",
"(",
"Encounter",
"encounter",
")",
"{",
"Location",
"location",
"=",
"ClientUtil",
".",
"getResource",
"(",
"encounter",
".",
"getLocationFirstRep",
"(",
")",
".",
"getLocation",
"(",
")",
",",
"Location",
".",
"class",... | Encode an encounter to a visit string.
@param encounter The encounter.
@return The encoded encounter (visit string). | [
"Encode",
"an",
"encounter",
"to",
"a",
"visit",
"string",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/encounter/EncounterUtil.java#L133-L140 |
154,175 | tvesalainen/util | util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java | SimpleMutableDateTime.plusMonths | public void plusMonths(int delta)
{
if (delta != 0)
{
int result = getMonth() -1 + delta;
setMonth(Math.floorMod(result, 12) + 1);
plusYears(Math.floorDiv(result, 12));
}
} | java | public void plusMonths(int delta)
{
if (delta != 0)
{
int result = getMonth() -1 + delta;
setMonth(Math.floorMod(result, 12) + 1);
plusYears(Math.floorDiv(result, 12));
}
} | [
"public",
"void",
"plusMonths",
"(",
"int",
"delta",
")",
"{",
"if",
"(",
"delta",
"!=",
"0",
")",
"{",
"int",
"result",
"=",
"getMonth",
"(",
")",
"-",
"1",
"+",
"delta",
";",
"setMonth",
"(",
"Math",
".",
"floorMod",
"(",
"result",
",",
"12",
"... | Adds delta months. Delta can be negative. Month and year fields are
affected.
@param delta | [
"Adds",
"delta",
"months",
".",
"Delta",
"can",
"be",
"negative",
".",
"Month",
"and",
"year",
"fields",
"are",
"affected",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java#L210-L218 |
154,176 | tvesalainen/util | util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java | SimpleMutableDateTime.plusDays | public void plusDays(long delta)
{
if (delta != 0)
{
long result = getDay() + delta;
if (result >= 1 && result <= 28)
{
setDay((int) result);
}
else
{
ZonedDateTime zonedDateTime = Zone... | java | public void plusDays(long delta)
{
if (delta != 0)
{
long result = getDay() + delta;
if (result >= 1 && result <= 28)
{
setDay((int) result);
}
else
{
ZonedDateTime zonedDateTime = Zone... | [
"public",
"void",
"plusDays",
"(",
"long",
"delta",
")",
"{",
"if",
"(",
"delta",
"!=",
"0",
")",
"{",
"long",
"result",
"=",
"getDay",
"(",
")",
"+",
"delta",
";",
"if",
"(",
"result",
">=",
"1",
"&&",
"result",
"<=",
"28",
")",
"{",
"setDay",
... | Adds delta days. Delta can be negative. Month, year and day fields are
affected.
@param delta | [
"Adds",
"delta",
"days",
".",
"Delta",
"can",
"be",
"negative",
".",
"Month",
"year",
"and",
"day",
"fields",
"are",
"affected",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java#L224-L240 |
154,177 | tvesalainen/util | util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java | SimpleMutableDateTime.plusHours | public void plusHours(long delta)
{
if (delta != 0)
{
long result = getHour() + delta;
setHour((int) Math.floorMod(result, 24));
plusDays(Math.floorDiv(result, 24));
}
} | java | public void plusHours(long delta)
{
if (delta != 0)
{
long result = getHour() + delta;
setHour((int) Math.floorMod(result, 24));
plusDays(Math.floorDiv(result, 24));
}
} | [
"public",
"void",
"plusHours",
"(",
"long",
"delta",
")",
"{",
"if",
"(",
"delta",
"!=",
"0",
")",
"{",
"long",
"result",
"=",
"getHour",
"(",
")",
"+",
"delta",
";",
"setHour",
"(",
"(",
"int",
")",
"Math",
".",
"floorMod",
"(",
"result",
",",
"... | Adds delta hours. Delta can be negative. Month, year, day and hour fields
are affected.
@param delta | [
"Adds",
"delta",
"hours",
".",
"Delta",
"can",
"be",
"negative",
".",
"Month",
"year",
"day",
"and",
"hour",
"fields",
"are",
"affected",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java#L246-L254 |
154,178 | tvesalainen/util | util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java | SimpleMutableDateTime.plusMinutes | public void plusMinutes(long delta)
{
if (delta != 0)
{
long result = getMinute() + delta;
setMinute((int) Math.floorMod(result, 60));
plusHours(Math.floorDiv(result, 60));
}
} | java | public void plusMinutes(long delta)
{
if (delta != 0)
{
long result = getMinute() + delta;
setMinute((int) Math.floorMod(result, 60));
plusHours(Math.floorDiv(result, 60));
}
} | [
"public",
"void",
"plusMinutes",
"(",
"long",
"delta",
")",
"{",
"if",
"(",
"delta",
"!=",
"0",
")",
"{",
"long",
"result",
"=",
"getMinute",
"(",
")",
"+",
"delta",
";",
"setMinute",
"(",
"(",
"int",
")",
"Math",
".",
"floorMod",
"(",
"result",
",... | Adds delta minutes. Delta can be negative. Month, year, day, hour and
minute fields are affected.
@param delta | [
"Adds",
"delta",
"minutes",
".",
"Delta",
"can",
"be",
"negative",
".",
"Month",
"year",
"day",
"hour",
"and",
"minute",
"fields",
"are",
"affected",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java#L260-L268 |
154,179 | tvesalainen/util | util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java | SimpleMutableDateTime.plusSeconds | public void plusSeconds(long delta)
{
if (delta != 0)
{
long result = getSecond() + delta;
setSecond((int) Math.floorMod(result, 60));
plusMinutes(Math.floorDiv(result, 60));
}
} | java | public void plusSeconds(long delta)
{
if (delta != 0)
{
long result = getSecond() + delta;
setSecond((int) Math.floorMod(result, 60));
plusMinutes(Math.floorDiv(result, 60));
}
} | [
"public",
"void",
"plusSeconds",
"(",
"long",
"delta",
")",
"{",
"if",
"(",
"delta",
"!=",
"0",
")",
"{",
"long",
"result",
"=",
"getSecond",
"(",
")",
"+",
"delta",
";",
"setSecond",
"(",
"(",
"int",
")",
"Math",
".",
"floorMod",
"(",
"result",
",... | Adds delta seconds. Delta can be negative. Month, year, day, hour,
minute and seconds fields are affected.
@param delta | [
"Adds",
"delta",
"seconds",
".",
"Delta",
"can",
"be",
"negative",
".",
"Month",
"year",
"day",
"hour",
"minute",
"and",
"seconds",
"fields",
"are",
"affected",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java#L274-L282 |
154,180 | tvesalainen/util | util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java | SimpleMutableDateTime.plusMilliSeconds | public void plusMilliSeconds(long delta)
{
plusNanoSeconds(Math.floorMod(delta, 1000)*1000000);
plusSeconds(Math.floorDiv(delta, 1000));
} | java | public void plusMilliSeconds(long delta)
{
plusNanoSeconds(Math.floorMod(delta, 1000)*1000000);
plusSeconds(Math.floorDiv(delta, 1000));
} | [
"public",
"void",
"plusMilliSeconds",
"(",
"long",
"delta",
")",
"{",
"plusNanoSeconds",
"(",
"Math",
".",
"floorMod",
"(",
"delta",
",",
"1000",
")",
"*",
"1000000",
")",
";",
"plusSeconds",
"(",
"Math",
".",
"floorDiv",
"(",
"delta",
",",
"1000",
")",
... | Adds delta milliseconds. Delta can be negative. Month, year, day, hour,
minute, seconds and nanoSecond fields are affected.
@param delta | [
"Adds",
"delta",
"milliseconds",
".",
"Delta",
"can",
"be",
"negative",
".",
"Month",
"year",
"day",
"hour",
"minute",
"seconds",
"and",
"nanoSecond",
"fields",
"are",
"affected",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java#L288-L292 |
154,181 | tvesalainen/util | util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java | SimpleMutableDateTime.plusNanoSeconds | public void plusNanoSeconds(long delta)
{
if (delta != 0)
{
long result = getNanoSecond() + delta;
setNanoSecond((int) Math.floorMod(result, 1000000000));
plusSeconds(Math.floorDiv(result, 1000000000));
}
} | java | public void plusNanoSeconds(long delta)
{
if (delta != 0)
{
long result = getNanoSecond() + delta;
setNanoSecond((int) Math.floorMod(result, 1000000000));
plusSeconds(Math.floorDiv(result, 1000000000));
}
} | [
"public",
"void",
"plusNanoSeconds",
"(",
"long",
"delta",
")",
"{",
"if",
"(",
"delta",
"!=",
"0",
")",
"{",
"long",
"result",
"=",
"getNanoSecond",
"(",
")",
"+",
"delta",
";",
"setNanoSecond",
"(",
"(",
"int",
")",
"Math",
".",
"floorMod",
"(",
"r... | Adds delta nanoseconds. Delta can be negative. Month, year, day, hour,
minute, seconds and nanoSecond fields are affected.
@param delta | [
"Adds",
"delta",
"nanoseconds",
".",
"Delta",
"can",
"be",
"negative",
".",
"Month",
"year",
"day",
"hour",
"minute",
"seconds",
"and",
"nanoSecond",
"fields",
"are",
"affected",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java#L303-L311 |
154,182 | tvesalainen/util | util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java | SimpleMutableDateTime.now | public static final SimpleMutableDateTime now(Clock clock)
{
ZonedDateTime zdt = ZonedDateTime.now(clock);
SimpleMutableDateTime smt = SimpleMutableDateTime.from(zdt);
return smt;
} | java | public static final SimpleMutableDateTime now(Clock clock)
{
ZonedDateTime zdt = ZonedDateTime.now(clock);
SimpleMutableDateTime smt = SimpleMutableDateTime.from(zdt);
return smt;
} | [
"public",
"static",
"final",
"SimpleMutableDateTime",
"now",
"(",
"Clock",
"clock",
")",
"{",
"ZonedDateTime",
"zdt",
"=",
"ZonedDateTime",
".",
"now",
"(",
"clock",
")",
";",
"SimpleMutableDateTime",
"smt",
"=",
"SimpleMutableDateTime",
".",
"from",
"(",
"zdt",... | Creates SimpleMutableDateTime and initializes it using given clock.
@param clock
@return | [
"Creates",
"SimpleMutableDateTime",
"and",
"initializes",
"it",
"using",
"given",
"clock",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java#L352-L357 |
154,183 | tvesalainen/util | util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java | SimpleMutableDateTime.ofEpochMilli | public static final SimpleMutableDateTime ofEpochMilli(long millis)
{
ZonedDateTime zdt = ZonedDateTime.ofInstant(Instant.ofEpochMilli(millis), ZoneOffset.UTC);
SimpleMutableDateTime smt = SimpleMutableDateTime.from(zdt);
return smt;
} | java | public static final SimpleMutableDateTime ofEpochMilli(long millis)
{
ZonedDateTime zdt = ZonedDateTime.ofInstant(Instant.ofEpochMilli(millis), ZoneOffset.UTC);
SimpleMutableDateTime smt = SimpleMutableDateTime.from(zdt);
return smt;
} | [
"public",
"static",
"final",
"SimpleMutableDateTime",
"ofEpochMilli",
"(",
"long",
"millis",
")",
"{",
"ZonedDateTime",
"zdt",
"=",
"ZonedDateTime",
".",
"ofInstant",
"(",
"Instant",
".",
"ofEpochMilli",
"(",
"millis",
")",
",",
"ZoneOffset",
".",
"UTC",
")",
... | Creates SimpleMutableDateTime and initializes it using milliseconds from
epoch.
@param millis
@return | [
"Creates",
"SimpleMutableDateTime",
"and",
"initializes",
"it",
"using",
"milliseconds",
"from",
"epoch",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java#L364-L369 |
154,184 | tvesalainen/util | util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java | SimpleMutableDateTime.now | public static final SimpleMutableDateTime now(ZoneId zoneId)
{
ZonedDateTime zdt = ZonedDateTime.now(zoneId);
SimpleMutableDateTime smt = SimpleMutableDateTime.from(zdt);
return smt;
} | java | public static final SimpleMutableDateTime now(ZoneId zoneId)
{
ZonedDateTime zdt = ZonedDateTime.now(zoneId);
SimpleMutableDateTime smt = SimpleMutableDateTime.from(zdt);
return smt;
} | [
"public",
"static",
"final",
"SimpleMutableDateTime",
"now",
"(",
"ZoneId",
"zoneId",
")",
"{",
"ZonedDateTime",
"zdt",
"=",
"ZonedDateTime",
".",
"now",
"(",
"zoneId",
")",
";",
"SimpleMutableDateTime",
"smt",
"=",
"SimpleMutableDateTime",
".",
"from",
"(",
"zd... | Creates SimpleMutableDateTime and initializes it to given ZoneId.
@param zoneId
@return | [
"Creates",
"SimpleMutableDateTime",
"and",
"initializes",
"it",
"to",
"given",
"ZoneId",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/SimpleMutableDateTime.java#L379-L384 |
154,185 | avaje-common/avaje-jetty-runner | src/main/java/org/avaje/jettyrunner/RunWar.java | RunWar.setupForWar | protected void setupForWar() {
// Identify the war file that contains this class
ProtectionDomain protectionDomain = RunWar.class.getProtectionDomain();
URL location = protectionDomain.getCodeSource().getLocation();
String warFilePath = trimToFile(location.toExternalForm());
File warFile = new File... | java | protected void setupForWar() {
// Identify the war file that contains this class
ProtectionDomain protectionDomain = RunWar.class.getProtectionDomain();
URL location = protectionDomain.getCodeSource().getLocation();
String warFilePath = trimToFile(location.toExternalForm());
File warFile = new File... | [
"protected",
"void",
"setupForWar",
"(",
")",
"{",
"// Identify the war file that contains this class",
"ProtectionDomain",
"protectionDomain",
"=",
"RunWar",
".",
"class",
".",
"getProtectionDomain",
"(",
")",
";",
"URL",
"location",
"=",
"protectionDomain",
".",
"getC... | Setup the webapp pointing to the war file that contains this class. | [
"Setup",
"the",
"webapp",
"pointing",
"to",
"the",
"war",
"file",
"that",
"contains",
"this",
"class",
"."
] | acddc23754facc339233fa0b9736e94abc8ae842 | https://github.com/avaje-common/avaje-jetty-runner/blob/acddc23754facc339233fa0b9736e94abc8ae842/src/main/java/org/avaje/jettyrunner/RunWar.java#L47-L78 |
154,186 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/ConnectionParams.java | ConnectionParams.addPiece | private void addPiece(String pc, String prefix, StringBuilder sb) {
if (!pc.isEmpty()) {
if (sb.length() > 0) {
sb.append(prefix);
}
sb.append(pc);
}
} | java | private void addPiece(String pc, String prefix, StringBuilder sb) {
if (!pc.isEmpty()) {
if (sb.length() > 0) {
sb.append(prefix);
}
sb.append(pc);
}
} | [
"private",
"void",
"addPiece",
"(",
"String",
"pc",
",",
"String",
"prefix",
",",
"StringBuilder",
"sb",
")",
"{",
"if",
"(",
"!",
"pc",
".",
"isEmpty",
"(",
")",
")",
"{",
"if",
"(",
"sb",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"sb",
"."... | Used to build a connection string for display.
@param pc A connection string field.
@param prefix The prefix to include if the field is not empty.
@param sb String builder instance. | [
"Used",
"to",
"build",
"a",
"connection",
"string",
"for",
"display",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/ConnectionParams.java#L153-L161 |
154,187 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/FieldIterator.java | FieldIterator.inBaseField | private boolean inBaseField(String strFieldFileName, String[] rgstrClassNames)
{
for (int i = 0; i < rgstrClassNames.length - 1; i++)
{ // In my base (but not in this (top) class).
if (strFieldFileName.equals(rgstrClassNames[i]))
return true;
}
retur... | java | private boolean inBaseField(String strFieldFileName, String[] rgstrClassNames)
{
for (int i = 0; i < rgstrClassNames.length - 1; i++)
{ // In my base (but not in this (top) class).
if (strFieldFileName.equals(rgstrClassNames[i]))
return true;
}
retur... | [
"private",
"boolean",
"inBaseField",
"(",
"String",
"strFieldFileName",
",",
"String",
"[",
"]",
"rgstrClassNames",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"rgstrClassNames",
".",
"length",
"-",
"1",
";",
"i",
"++",
")",
"{",
"// In ... | Is this field in my field list already? | [
"Is",
"this",
"field",
"in",
"my",
"field",
"list",
"already?"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/FieldIterator.java#L184-L192 |
154,188 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/FieldIterator.java | FieldIterator.scanSharedFields | private void scanSharedFields()
{
if (!m_bFirstTime)
return;
m_bFirstTime = false;
m_vFieldList = new Vector<FieldSummary>();
m_iCurrentIndex = 0;
String strClassName = m_recClassInfo.getField(ClassInfo.CLASS_NAME).toString();
// Step one - Get a list of... | java | private void scanSharedFields()
{
if (!m_bFirstTime)
return;
m_bFirstTime = false;
m_vFieldList = new Vector<FieldSummary>();
m_iCurrentIndex = 0;
String strClassName = m_recClassInfo.getField(ClassInfo.CLASS_NAME).toString();
// Step one - Get a list of... | [
"private",
"void",
"scanSharedFields",
"(",
")",
"{",
"if",
"(",
"!",
"m_bFirstTime",
")",
"return",
";",
"m_bFirstTime",
"=",
"false",
";",
"m_vFieldList",
"=",
"new",
"Vector",
"<",
"FieldSummary",
">",
"(",
")",
";",
"m_iCurrentIndex",
"=",
"0",
";",
... | Build the field list from the concrete and base record classes. | [
"Build",
"the",
"field",
"list",
"from",
"the",
"concrete",
"and",
"base",
"record",
"classes",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/FieldIterator.java#L197-L251 |
154,189 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/FieldIterator.java | FieldIterator.getBaseRecordClasses | private String[] getBaseRecordClasses(String strClassName)
{
ClassInfo recClassInfo = new ClassInfo(Record.findRecordOwner(m_recClassInfo));
String[] rgstrClasses = new String[0];
// rgstrClasses[0] = strClassName;
Record recFileHdr = new FileHdr(Record.findRecordOwner(m_recFileHdr));... | java | private String[] getBaseRecordClasses(String strClassName)
{
ClassInfo recClassInfo = new ClassInfo(Record.findRecordOwner(m_recClassInfo));
String[] rgstrClasses = new String[0];
// rgstrClasses[0] = strClassName;
Record recFileHdr = new FileHdr(Record.findRecordOwner(m_recFileHdr));... | [
"private",
"String",
"[",
"]",
"getBaseRecordClasses",
"(",
"String",
"strClassName",
")",
"{",
"ClassInfo",
"recClassInfo",
"=",
"new",
"ClassInfo",
"(",
"Record",
".",
"findRecordOwner",
"(",
"m_recClassInfo",
")",
")",
";",
"String",
"[",
"]",
"rgstrClasses",... | Get the hierarchy of classes starting with this class name.
@param strClassName The class to start with.
@param recClassInfo The class record I can use to look through the classes.
@param excludeSharedFields Only return the shared class hierarchy (otherwise the entire hierarchy is returned).
@return The class name hier... | [
"Get",
"the",
"hierarchy",
"of",
"classes",
"starting",
"with",
"this",
"class",
"name",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/FieldIterator.java#L259-L303 |
154,190 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/FieldIterator.java | FieldIterator.isInRecord | private boolean isInRecord(String[] strClassNames, int iClassIndex, String strRecordClass)
{
boolean bIsInRecord = false;
for (int i = 0; i <= iClassIndex; i++)
{
if (strClassNames[i].equalsIgnoreCase(strRecordClass))
bIsInRecord = true; // True, it IS in the re... | java | private boolean isInRecord(String[] strClassNames, int iClassIndex, String strRecordClass)
{
boolean bIsInRecord = false;
for (int i = 0; i <= iClassIndex; i++)
{
if (strClassNames[i].equalsIgnoreCase(strRecordClass))
bIsInRecord = true; // True, it IS in the re... | [
"private",
"boolean",
"isInRecord",
"(",
"String",
"[",
"]",
"strClassNames",
",",
"int",
"iClassIndex",
",",
"String",
"strRecordClass",
")",
"{",
"boolean",
"bIsInRecord",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"iClassIndex"... | Is this class one of the base class names for this record? | [
"Is",
"this",
"class",
"one",
"of",
"the",
"base",
"class",
"names",
"for",
"this",
"record?"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/FieldIterator.java#L415-L424 |
154,191 | microfocus-idol/java-parametric-databases | hod/src/main/java/com/hp/autonomy/hod/databases/AbstractResourceMapper.java | AbstractResourceMapper.databaseForResource | protected Database databaseForResource(final TokenProxy<?, TokenType.Simple> tokenProxy, final Resource resource, final String domain) throws HodErrorException {
final ResourceIdentifier resourceIdentifier = new ResourceIdentifier(domain, resource.getResource());
final Set<String> parametricFields;
... | java | protected Database databaseForResource(final TokenProxy<?, TokenType.Simple> tokenProxy, final Resource resource, final String domain) throws HodErrorException {
final ResourceIdentifier resourceIdentifier = new ResourceIdentifier(domain, resource.getResource());
final Set<String> parametricFields;
... | [
"protected",
"Database",
"databaseForResource",
"(",
"final",
"TokenProxy",
"<",
"?",
",",
"TokenType",
".",
"Simple",
">",
"tokenProxy",
",",
"final",
"Resource",
"resource",
",",
"final",
"String",
"domain",
")",
"throws",
"HodErrorException",
"{",
"final",
"R... | Converts the given resource name to a database
@param tokenProxy The token proxy to use to retrieve parametric fields
@param resource The resource
@param domain The domain of the resource
@return A database representation of the resource
@throws HodErrorException | [
"Converts",
"the",
"given",
"resource",
"name",
"to",
"a",
"database"
] | 378a246a1857f911587106241712d16c2e118af2 | https://github.com/microfocus-idol/java-parametric-databases/blob/378a246a1857f911587106241712d16c2e118af2/hod/src/main/java/com/hp/autonomy/hod/databases/AbstractResourceMapper.java#L36-L54 |
154,192 | jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/MemoryFieldTable.java | MemoryFieldTable.setPTableRef | public void setPTableRef(PTable pTable, PhysicalDatabaseParent dbOwner)
{
m_pTable = pTable;
if (pTable == null)
if (dbOwner != null)
{
FieldList record = this.getRecord();
if (record != null)
{
PDatabase pDatabase = dbOwner.get... | java | public void setPTableRef(PTable pTable, PhysicalDatabaseParent dbOwner)
{
m_pTable = pTable;
if (pTable == null)
if (dbOwner != null)
{
FieldList record = this.getRecord();
if (record != null)
{
PDatabase pDatabase = dbOwner.get... | [
"public",
"void",
"setPTableRef",
"(",
"PTable",
"pTable",
",",
"PhysicalDatabaseParent",
"dbOwner",
")",
"{",
"m_pTable",
"=",
"pTable",
";",
"if",
"(",
"pTable",
"==",
"null",
")",
"if",
"(",
"dbOwner",
"!=",
"null",
")",
"{",
"FieldList",
"record",
"=",... | Set the raw data table reference.
@param pTable The raw data table.
@param dbOwner If you want this method to lookup/build the remote table, pass this. | [
"Set",
"the",
"raw",
"data",
"table",
"reference",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/MemoryFieldTable.java#L230-L247 |
154,193 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/client/WorldState.java | WorldState.addState | public void addState(final String id, final Collection<Attribute> attributes) {
this.stateMap.put(id, attributes);
} | java | public void addState(final String id, final Collection<Attribute> attributes) {
this.stateMap.put(id, attributes);
} | [
"public",
"void",
"addState",
"(",
"final",
"String",
"id",
",",
"final",
"Collection",
"<",
"Attribute",
">",
"attributes",
")",
"{",
"this",
".",
"stateMap",
".",
"put",
"(",
"id",
",",
"attributes",
")",
";",
"}"
] | Binds a set of Attribute values to an identifier.
@param id
the identifier
@param attributes
the set of attributes. | [
"Binds",
"a",
"set",
"of",
"Attribute",
"values",
"to",
"an",
"identifier",
"."
] | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/client/WorldState.java#L50-L52 |
154,194 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/client/WorldState.java | WorldState.getIdentifiers | public Collection<String> getIdentifiers() {
List<String> keys = new LinkedList<String>();
keys.addAll(this.stateMap.keySet());
return keys;
} | java | public Collection<String> getIdentifiers() {
List<String> keys = new LinkedList<String>();
keys.addAll(this.stateMap.keySet());
return keys;
} | [
"public",
"Collection",
"<",
"String",
">",
"getIdentifiers",
"(",
")",
"{",
"List",
"<",
"String",
">",
"keys",
"=",
"new",
"LinkedList",
"<",
"String",
">",
"(",
")",
";",
"keys",
".",
"addAll",
"(",
"this",
".",
"stateMap",
".",
"keySet",
"(",
")"... | Returns a collection containing the same Identifier Strings as this WorldState
object. Modifications to the returned Collection do not impact this
WorldState.
@return a collection containing the same Identifier Strings as this WorldState. | [
"Returns",
"a",
"collection",
"containing",
"the",
"same",
"Identifier",
"Strings",
"as",
"this",
"WorldState",
"object",
".",
"Modifications",
"to",
"the",
"returned",
"Collection",
"do",
"not",
"impact",
"this",
"WorldState",
"."
] | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/client/WorldState.java#L73-L77 |
154,195 | lightblueseas/vintage-time | src/main/java/de/alpharogroup/date/IntervalExtensions.java | IntervalExtensions.isBetween | public static boolean isBetween(final Interval timeRange, final Interval timeRangeToCheck)
{
return ((timeRange.getStart() != null
&& timeRange.getStart().isBefore(timeRangeToCheck.getStart()))
&& (timeRange.getEnd() != null
&& timeRange.getEnd().isAfter(timeRangeToCheck.getEnd())));
} | java | public static boolean isBetween(final Interval timeRange, final Interval timeRangeToCheck)
{
return ((timeRange.getStart() != null
&& timeRange.getStart().isBefore(timeRangeToCheck.getStart()))
&& (timeRange.getEnd() != null
&& timeRange.getEnd().isAfter(timeRangeToCheck.getEnd())));
} | [
"public",
"static",
"boolean",
"isBetween",
"(",
"final",
"Interval",
"timeRange",
",",
"final",
"Interval",
"timeRangeToCheck",
")",
"{",
"return",
"(",
"(",
"timeRange",
".",
"getStart",
"(",
")",
"!=",
"null",
"&&",
"timeRange",
".",
"getStart",
"(",
")",... | Checks if the given time range is between the given time range to check
@param timeRange
the time range
@param timeRangeToCheck
the time range to check
@return true, if the given time range is between the given time range to check otherwise
false | [
"Checks",
"if",
"the",
"given",
"time",
"range",
"is",
"between",
"the",
"given",
"time",
"range",
"to",
"check"
] | fbf201e679d9f9b92e7b5771f3eea1413cc2e113 | https://github.com/lightblueseas/vintage-time/blob/fbf201e679d9f9b92e7b5771f3eea1413cc2e113/src/main/java/de/alpharogroup/date/IntervalExtensions.java#L54-L60 |
154,196 | lightblueseas/vintage-time | src/main/java/de/alpharogroup/date/IntervalExtensions.java | IntervalExtensions.isOverlappingBefore | public static boolean isOverlappingBefore(final Interval timeRange,
final Interval timeRangeToCheck)
{
return ((timeRange.getStart() != null
&& timeRange.getStart().isAfter(timeRangeToCheck.getStart()))
&& (timeRange.getEnd() != null
&& timeRange.getEnd().isAfter(timeRangeToCheck.getEnd())));
} | java | public static boolean isOverlappingBefore(final Interval timeRange,
final Interval timeRangeToCheck)
{
return ((timeRange.getStart() != null
&& timeRange.getStart().isAfter(timeRangeToCheck.getStart()))
&& (timeRange.getEnd() != null
&& timeRange.getEnd().isAfter(timeRangeToCheck.getEnd())));
} | [
"public",
"static",
"boolean",
"isOverlappingBefore",
"(",
"final",
"Interval",
"timeRange",
",",
"final",
"Interval",
"timeRangeToCheck",
")",
"{",
"return",
"(",
"(",
"timeRange",
".",
"getStart",
"(",
")",
"!=",
"null",
"&&",
"timeRange",
".",
"getStart",
"... | Checks if the given time range is overlapping before the given time range to check.
@param timeRange
the time range
@param timeRangeToCheck
the time range to check
@return true, if the given time range is overlapping before the given time range to check
otherwise false | [
"Checks",
"if",
"the",
"given",
"time",
"range",
"is",
"overlapping",
"before",
"the",
"given",
"time",
"range",
"to",
"check",
"."
] | fbf201e679d9f9b92e7b5771f3eea1413cc2e113 | https://github.com/lightblueseas/vintage-time/blob/fbf201e679d9f9b92e7b5771f3eea1413cc2e113/src/main/java/de/alpharogroup/date/IntervalExtensions.java#L72-L79 |
154,197 | lightblueseas/vintage-time | src/main/java/de/alpharogroup/date/IntervalExtensions.java | IntervalExtensions.isOverlappingAfter | public static boolean isOverlappingAfter(final Interval timeRange,
final Interval timeRangeToCheck)
{
return ((timeRange.getStart() != null
&& timeRange.getStart().isBefore(timeRangeToCheck.getStart()))
&& (timeRange.getEnd() != null
&& timeRange.getEnd().isBefore(timeRangeToCheck.getEnd())));
} | java | public static boolean isOverlappingAfter(final Interval timeRange,
final Interval timeRangeToCheck)
{
return ((timeRange.getStart() != null
&& timeRange.getStart().isBefore(timeRangeToCheck.getStart()))
&& (timeRange.getEnd() != null
&& timeRange.getEnd().isBefore(timeRangeToCheck.getEnd())));
} | [
"public",
"static",
"boolean",
"isOverlappingAfter",
"(",
"final",
"Interval",
"timeRange",
",",
"final",
"Interval",
"timeRangeToCheck",
")",
"{",
"return",
"(",
"(",
"timeRange",
".",
"getStart",
"(",
")",
"!=",
"null",
"&&",
"timeRange",
".",
"getStart",
"(... | Checks if the given time range is overlapping after the given time range to check.
@param timeRange
the time range
@param timeRangeToCheck
the time range to check
@return true, if the given time range is overlapping after the given time range to check
otherwise false | [
"Checks",
"if",
"the",
"given",
"time",
"range",
"is",
"overlapping",
"after",
"the",
"given",
"time",
"range",
"to",
"check",
"."
] | fbf201e679d9f9b92e7b5771f3eea1413cc2e113 | https://github.com/lightblueseas/vintage-time/blob/fbf201e679d9f9b92e7b5771f3eea1413cc2e113/src/main/java/de/alpharogroup/date/IntervalExtensions.java#L91-L98 |
154,198 | pressgang-ccms/PressGangCCMSQuery | src/main/java/org/jboss/pressgang/ccms/filter/base/BaseTopicFilterQueryBuilder.java | BaseTopicFilterQueryBuilder.getOpenBugzillaSubquery | private Subquery<TopicToBugzillaBug> getOpenBugzillaSubquery() {
final CriteriaBuilder criteriaBuilder = getCriteriaBuilder();
final Subquery<TopicToBugzillaBug> subQuery = getCriteriaQuery().subquery(TopicToBugzillaBug.class);
final Root<TopicToBugzillaBug> root = subQuery.from(TopicToBugzillaB... | java | private Subquery<TopicToBugzillaBug> getOpenBugzillaSubquery() {
final CriteriaBuilder criteriaBuilder = getCriteriaBuilder();
final Subquery<TopicToBugzillaBug> subQuery = getCriteriaQuery().subquery(TopicToBugzillaBug.class);
final Root<TopicToBugzillaBug> root = subQuery.from(TopicToBugzillaB... | [
"private",
"Subquery",
"<",
"TopicToBugzillaBug",
">",
"getOpenBugzillaSubquery",
"(",
")",
"{",
"final",
"CriteriaBuilder",
"criteriaBuilder",
"=",
"getCriteriaBuilder",
"(",
")",
";",
"final",
"Subquery",
"<",
"TopicToBugzillaBug",
">",
"subQuery",
"=",
"getCriteria... | Create a Subquery to check if a topic has open bugs.
@return A subquery that can be used in an exists statement to see if a topic has open bugs. | [
"Create",
"a",
"Subquery",
"to",
"check",
"if",
"a",
"topic",
"has",
"open",
"bugs",
"."
] | 2bb23430adab956737d0301cd2ea933f986dd85b | https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseTopicFilterQueryBuilder.java#L311-L323 |
154,199 | jmeetsma/Iglu-Util | src/main/java/org/ijsberg/iglu/util/collection/CollectionSupport.java | CollectionSupport.print | public static void print(Collection coll, PrintStream out, String separator) {
out.print(format(coll, separator));
} | java | public static void print(Collection coll, PrintStream out, String separator) {
out.print(format(coll, separator));
} | [
"public",
"static",
"void",
"print",
"(",
"Collection",
"coll",
",",
"PrintStream",
"out",
",",
"String",
"separator",
")",
"{",
"out",
".",
"print",
"(",
"format",
"(",
"coll",
",",
"separator",
")",
")",
";",
"}"
] | Prints a collection to the given output stream.
@param coll
@param out stream to print to
@param separator item separator | [
"Prints",
"a",
"collection",
"to",
"the",
"given",
"output",
"stream",
"."
] | 971eb022115247b1e34dc26dd02e7e621e29e910 | https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/collection/CollectionSupport.java#L61-L63 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.