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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
145,500 | geomajas/geomajas-project-hammer-gwt | hammer-gwt/src/main/java/org/geomajas/hammergwt/client/HammerGwt.java | HammerGwt.off | public static void off(HammerTime hammerTime, EventType eventType, NativeHammmerHandler callback) {
off(hammerTime, callback, eventType.getText());
} | java | public static void off(HammerTime hammerTime, EventType eventType, NativeHammmerHandler callback) {
off(hammerTime, callback, eventType.getText());
} | [
"public",
"static",
"void",
"off",
"(",
"HammerTime",
"hammerTime",
",",
"EventType",
"eventType",
",",
"NativeHammmerHandler",
"callback",
")",
"{",
"off",
"(",
"hammerTime",
",",
"callback",
",",
"eventType",
".",
"getText",
"(",
")",
")",
";",
"}"
] | Unregister hammer event.
@param hammerTime {@link HammerTime} hammer gwt instance.
@param eventType {@link org.geomajas.hammergwt.client.event.EventType}
@param callback {@link org.geomajas.hammergwt.client.handler.NativeHammmerHandler} of the event that needs
to be unregistered. | [
"Unregister",
"hammer",
"event",
"."
] | bc764171bed55e5a9eced72f0078ec22b8105b62 | https://github.com/geomajas/geomajas-project-hammer-gwt/blob/bc764171bed55e5a9eced72f0078ec22b8105b62/hammer-gwt/src/main/java/org/geomajas/hammergwt/client/HammerGwt.java#L58-L60 |
145,501 | jbundle/webapp | proxy/src/main/java/org/jbundle/util/webapp/proxy/ProxyServlet.java | ProxyServlet.getProxyURLString | public String getProxyURLString(HttpServletRequest req) throws MalformedURLException
{
String proxyUrlString = proxyURLPrefix;
if (req.getPathInfo() != null)
if (req.getPathInfo().length() > 0)
proxyUrlString += req.getPathInfo();
if (req.getQueryString() != null)
if (req.getQueryS... | java | public String getProxyURLString(HttpServletRequest req) throws MalformedURLException
{
String proxyUrlString = proxyURLPrefix;
if (req.getPathInfo() != null)
if (req.getPathInfo().length() > 0)
proxyUrlString += req.getPathInfo();
if (req.getQueryString() != null)
if (req.getQueryS... | [
"public",
"String",
"getProxyURLString",
"(",
"HttpServletRequest",
"req",
")",
"throws",
"MalformedURLException",
"{",
"String",
"proxyUrlString",
"=",
"proxyURLPrefix",
";",
"if",
"(",
"req",
".",
"getPathInfo",
"(",
")",
"!=",
"null",
")",
"if",
"(",
"req",
... | Create the url string for the proxy server.
@param req
@return
@throws MalformedURLException | [
"Create",
"the",
"url",
"string",
"for",
"the",
"proxy",
"server",
"."
] | af2cf32bd92254073052f1f9b4bcd47c2f76ba7d | https://github.com/jbundle/webapp/blob/af2cf32bd92254073052f1f9b4bcd47c2f76ba7d/proxy/src/main/java/org/jbundle/util/webapp/proxy/ProxyServlet.java#L102-L113 |
145,502 | jbundle/webapp | proxy/src/main/java/org/jbundle/util/webapp/proxy/ProxyServlet.java | ProxyServlet.getHttpRequest | public HttpRequestBase getHttpRequest(HttpServletRequest req, String urlString)
{ // Prepare a request object
HttpRequestBase httpget = null;
String method = req.getMethod();
if (GET.equalsIgnoreCase(method))
httpget = new HttpGet(urlString);
else if (POST.equalsIgnoreCase(method))
httpget = new HttpPos... | java | public HttpRequestBase getHttpRequest(HttpServletRequest req, String urlString)
{ // Prepare a request object
HttpRequestBase httpget = null;
String method = req.getMethod();
if (GET.equalsIgnoreCase(method))
httpget = new HttpGet(urlString);
else if (POST.equalsIgnoreCase(method))
httpget = new HttpPos... | [
"public",
"HttpRequestBase",
"getHttpRequest",
"(",
"HttpServletRequest",
"req",
",",
"String",
"urlString",
")",
"{",
"// Prepare a request object",
"HttpRequestBase",
"httpget",
"=",
"null",
";",
"String",
"method",
"=",
"req",
".",
"getMethod",
"(",
")",
";",
"... | Get the correct client type for this request.
@param req
@param urlString
@return | [
"Get",
"the",
"correct",
"client",
"type",
"for",
"this",
"request",
"."
] | af2cf32bd92254073052f1f9b4bcd47c2f76ba7d | https://github.com/jbundle/webapp/blob/af2cf32bd92254073052f1f9b4bcd47c2f76ba7d/proxy/src/main/java/org/jbundle/util/webapp/proxy/ProxyServlet.java#L120-L139 |
145,503 | jbundle/webapp | proxy/src/main/java/org/jbundle/util/webapp/proxy/ProxyServlet.java | ProxyServlet.addHeaders | public void addHeaders(HttpServletRequest reqSource, HttpRequestBase httpTarget)
{
Enumeration<?> headerNames = reqSource.getHeaderNames();
while (headerNames.hasMoreElements())
{
String key = headerNames.nextElement().toString();
if (CONTENT_LENGTH.equalsIgnoreCase(key))
continue;... | java | public void addHeaders(HttpServletRequest reqSource, HttpRequestBase httpTarget)
{
Enumeration<?> headerNames = reqSource.getHeaderNames();
while (headerNames.hasMoreElements())
{
String key = headerNames.nextElement().toString();
if (CONTENT_LENGTH.equalsIgnoreCase(key))
continue;... | [
"public",
"void",
"addHeaders",
"(",
"HttpServletRequest",
"reqSource",
",",
"HttpRequestBase",
"httpTarget",
")",
"{",
"Enumeration",
"<",
"?",
">",
"headerNames",
"=",
"reqSource",
".",
"getHeaderNames",
"(",
")",
";",
"while",
"(",
"headerNames",
".",
"hasMor... | Move the header info to the proxy request.
@param reqSource
@param httpTarget | [
"Move",
"the",
"header",
"info",
"to",
"the",
"proxy",
"request",
"."
] | af2cf32bd92254073052f1f9b4bcd47c2f76ba7d | https://github.com/jbundle/webapp/blob/af2cf32bd92254073052f1f9b4bcd47c2f76ba7d/proxy/src/main/java/org/jbundle/util/webapp/proxy/ProxyServlet.java#L145-L174 |
145,504 | jbundle/webapp | proxy/src/main/java/org/jbundle/util/webapp/proxy/ProxyServlet.java | ProxyServlet.getDataFromClient | public void getDataFromClient(HttpRequestBase httpget, OutputStream streamOut) throws ClientProtocolException, IOException
{
HttpClient httpclient = new DefaultHttpClient();
// Execute the request
HttpResponse response = httpclient.execute(httpget);
// Get the response ent... | java | public void getDataFromClient(HttpRequestBase httpget, OutputStream streamOut) throws ClientProtocolException, IOException
{
HttpClient httpclient = new DefaultHttpClient();
// Execute the request
HttpResponse response = httpclient.execute(httpget);
// Get the response ent... | [
"public",
"void",
"getDataFromClient",
"(",
"HttpRequestBase",
"httpget",
",",
"OutputStream",
"streamOut",
")",
"throws",
"ClientProtocolException",
",",
"IOException",
"{",
"HttpClient",
"httpclient",
"=",
"new",
"DefaultHttpClient",
"(",
")",
";",
"// Execute the req... | Get the data from the proxy and send it to the client.
@param httpget
@param streamOut
@throws IOException
@throws ClientProtocolException | [
"Get",
"the",
"data",
"from",
"the",
"proxy",
"and",
"send",
"it",
"to",
"the",
"client",
"."
] | af2cf32bd92254073052f1f9b4bcd47c2f76ba7d | https://github.com/jbundle/webapp/blob/af2cf32bd92254073052f1f9b4bcd47c2f76ba7d/proxy/src/main/java/org/jbundle/util/webapp/proxy/ProxyServlet.java#L194-L216 |
145,505 | jbundle/webapp | proxy/src/main/java/org/jbundle/util/webapp/proxy/ProxyServlet.java | ProxyServlet.transferURLStream | public static void transferURLStream(InputStream streamIn, OutputStream streamOut)
{
try {
byte[] cbuf = new byte[1000];
int iLen = 0;
while ((iLen = streamIn.read(cbuf, 0, cbuf.length)) > 0)
{ // Write the entire file to the output buffer
streamOu... | java | public static void transferURLStream(InputStream streamIn, OutputStream streamOut)
{
try {
byte[] cbuf = new byte[1000];
int iLen = 0;
while ((iLen = streamIn.read(cbuf, 0, cbuf.length)) > 0)
{ // Write the entire file to the output buffer
streamOu... | [
"public",
"static",
"void",
"transferURLStream",
"(",
"InputStream",
"streamIn",
",",
"OutputStream",
"streamOut",
")",
"{",
"try",
"{",
"byte",
"[",
"]",
"cbuf",
"=",
"new",
"byte",
"[",
"1000",
"]",
";",
"int",
"iLen",
"=",
"0",
";",
"while",
"(",
"(... | Transfer the data stream from this URL to another stream.
@param strURL The URL to read.
@param strFilename If non-null, create this file and send the URL data here.
@param strFilename If null, return the stream as a string.
@param in If this is non-null, read from this input source.
@return The stream as a string if f... | [
"Transfer",
"the",
"data",
"stream",
"from",
"this",
"URL",
"to",
"another",
"stream",
"."
] | af2cf32bd92254073052f1f9b4bcd47c2f76ba7d | https://github.com/jbundle/webapp/blob/af2cf32bd92254073052f1f9b4bcd47c2f76ba7d/proxy/src/main/java/org/jbundle/util/webapp/proxy/ProxyServlet.java#L225-L242 |
145,506 | akberc/ceylon-maven-plugin | src/main/java/com/dgwave/car/maven/CeylonSdkCheck.java | CeylonSdkCheck.findSdkHome | File findSdkHome(final String path) {
File dotCeylon = new File(path); // or some other directory
File[] homes = null;
if (!dotCeylon.exists()) {
return null;
} else {
homes = dotCeylon.listFiles(new FilenameFilter() {
@O... | java | File findSdkHome(final String path) {
File dotCeylon = new File(path); // or some other directory
File[] homes = null;
if (!dotCeylon.exists()) {
return null;
} else {
homes = dotCeylon.listFiles(new FilenameFilter() {
@O... | [
"File",
"findSdkHome",
"(",
"final",
"String",
"path",
")",
"{",
"File",
"dotCeylon",
"=",
"new",
"File",
"(",
"path",
")",
";",
"// or some other directory\r",
"File",
"[",
"]",
"homes",
"=",
"null",
";",
"if",
"(",
"!",
"dotCeylon",
".",
"exists",
"(",... | Find Ceylon SDK home in a folder, in the form of 'ceylon-1.x.x'.
@param path Folder path to search in
@return File folder whose name is alphabetically highest, or null if not found. | [
"Find",
"Ceylon",
"SDK",
"home",
"in",
"a",
"folder",
"in",
"the",
"form",
"of",
"ceylon",
"-",
"1",
".",
"x",
".",
"x",
"."
] | b7f6c4a2b24f2fa237350c9e715f4193e83415ef | https://github.com/akberc/ceylon-maven-plugin/blob/b7f6c4a2b24f2fa237350c9e715f4193e83415ef/src/main/java/com/dgwave/car/maven/CeylonSdkCheck.java#L93-L124 |
145,507 | dbracewell/mango | src/main/java/com/davidbracewell/reflection/BeanMap.java | BeanMap.getType | public Class<?> getType(String key) {
if (beanDescriptor.hasReadMethod(key)) {
return beanDescriptor.getReadMethod(key).getReturnType();
} else if (beanDescriptor.hasWriteMethod(key)) {
Class<?>[] paramTypes = beanDescriptor.getWriteMethod(key).getParameterTypes();
if (paramTypes.... | java | public Class<?> getType(String key) {
if (beanDescriptor.hasReadMethod(key)) {
return beanDescriptor.getReadMethod(key).getReturnType();
} else if (beanDescriptor.hasWriteMethod(key)) {
Class<?>[] paramTypes = beanDescriptor.getWriteMethod(key).getParameterTypes();
if (paramTypes.... | [
"public",
"Class",
"<",
"?",
">",
"getType",
"(",
"String",
"key",
")",
"{",
"if",
"(",
"beanDescriptor",
".",
"hasReadMethod",
"(",
"key",
")",
")",
"{",
"return",
"beanDescriptor",
".",
"getReadMethod",
"(",
"key",
")",
".",
"getReturnType",
"(",
")",
... | Gets the type of the parameter on the setter method.
@param key The setter method
@return A <code>Class</code> representing the parameter type of the setter method | [
"Gets",
"the",
"type",
"of",
"the",
"parameter",
"on",
"the",
"setter",
"method",
"."
] | 2cec08826f1fccd658694dd03abce10fc97618ec | https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/reflection/BeanMap.java#L115-L125 |
145,508 | sangupta/jerry-services | src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java | MongoDBBasicOperations.get | @Override
public T get(X primaryID) {
if(primaryID == null) {
return null;
}
T dbObject = this.mongoTemplate.findById(primaryID, this.entityClass);
return dbObject;
} | java | @Override
public T get(X primaryID) {
if(primaryID == null) {
return null;
}
T dbObject = this.mongoTemplate.findById(primaryID, this.entityClass);
return dbObject;
} | [
"@",
"Override",
"public",
"T",
"get",
"(",
"X",
"primaryID",
")",
"{",
"if",
"(",
"primaryID",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"T",
"dbObject",
"=",
"this",
".",
"mongoTemplate",
".",
"findById",
"(",
"primaryID",
",",
"this",
".... | Return the object as defined by this primary key.
@param primaryID
the primary key for record
@return the record if available, <code>null</code> otherwise | [
"Return",
"the",
"object",
"as",
"defined",
"by",
"this",
"primary",
"key",
"."
] | 25ff6577445850916425c72068d654c08eba9bcc | https://github.com/sangupta/jerry-services/blob/25ff6577445850916425c72068d654c08eba9bcc/src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java#L103-L111 |
145,509 | sangupta/jerry-services | src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java | MongoDBBasicOperations.insert | @Override
public boolean insert(T entity) {
if(entity == null) {
return false;
}
X primaryID = getPrimaryID(entity);
if(primaryID != null) {
if(!allowEmptyOrZeroID() && AssertUtils.isEmpty(primaryID)) {
return false;
}
}
try {
this.mongoTemplate.insert(entity);
} catch(RuntimeExcep... | java | @Override
public boolean insert(T entity) {
if(entity == null) {
return false;
}
X primaryID = getPrimaryID(entity);
if(primaryID != null) {
if(!allowEmptyOrZeroID() && AssertUtils.isEmpty(primaryID)) {
return false;
}
}
try {
this.mongoTemplate.insert(entity);
} catch(RuntimeExcep... | [
"@",
"Override",
"public",
"boolean",
"insert",
"(",
"T",
"entity",
")",
"{",
"if",
"(",
"entity",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"X",
"primaryID",
"=",
"getPrimaryID",
"(",
"entity",
")",
";",
"if",
"(",
"primaryID",
"!=",
"nul... | Insert the object into the data store.
@param entity
the entity to insert
@return <code>true</code> if inserted, <code>false</code> otherwise | [
"Insert",
"the",
"object",
"into",
"the",
"data",
"store",
"."
] | 25ff6577445850916425c72068d654c08eba9bcc | https://github.com/sangupta/jerry-services/blob/25ff6577445850916425c72068d654c08eba9bcc/src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java#L172-L193 |
145,510 | sangupta/jerry-services | src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java | MongoDBBasicOperations.update | @Override
public boolean update(T entity) {
if(entity == null) {
return false;
}
X primaryID = getPrimaryID(entity);
if(primaryID == null) {
return false;
}
if(!allowEmptyOrZeroID() && AssertUtils.isEmpty(primaryID)) {
return false;
}
this.mongoTemplate.save(entity);
return true;
} | java | @Override
public boolean update(T entity) {
if(entity == null) {
return false;
}
X primaryID = getPrimaryID(entity);
if(primaryID == null) {
return false;
}
if(!allowEmptyOrZeroID() && AssertUtils.isEmpty(primaryID)) {
return false;
}
this.mongoTemplate.save(entity);
return true;
} | [
"@",
"Override",
"public",
"boolean",
"update",
"(",
"T",
"entity",
")",
"{",
"if",
"(",
"entity",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"X",
"primaryID",
"=",
"getPrimaryID",
"(",
"entity",
")",
";",
"if",
"(",
"primaryID",
"==",
"nul... | Update the entity in the data store.
@param entity
the entity to update
@return <code>true</code> if updated, <code>false</code> otherwise | [
"Update",
"the",
"entity",
"in",
"the",
"data",
"store",
"."
] | 25ff6577445850916425c72068d654c08eba9bcc | https://github.com/sangupta/jerry-services/blob/25ff6577445850916425c72068d654c08eba9bcc/src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java#L203-L220 |
145,511 | sangupta/jerry-services | src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java | MongoDBBasicOperations.addOrUpdate | @Override
public boolean addOrUpdate(T object) {
if(object == null) {
return false;
}
X primaryID = getPrimaryID(object);
if(primaryID == null) {
this.mongoTemplate.save(object);
return true;
}
if(!allowEmptyOrZeroID() && AssertUtils.isEmpty(primaryID)) {
return false;
}
this.mongo... | java | @Override
public boolean addOrUpdate(T object) {
if(object == null) {
return false;
}
X primaryID = getPrimaryID(object);
if(primaryID == null) {
this.mongoTemplate.save(object);
return true;
}
if(!allowEmptyOrZeroID() && AssertUtils.isEmpty(primaryID)) {
return false;
}
this.mongo... | [
"@",
"Override",
"public",
"boolean",
"addOrUpdate",
"(",
"T",
"object",
")",
"{",
"if",
"(",
"object",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"X",
"primaryID",
"=",
"getPrimaryID",
"(",
"object",
")",
";",
"if",
"(",
"primaryID",
"==",
... | Add or update an existing object in the data store.
@param object
the object to save
@return <code>true</code> if saved, <code>false</code> otherwise | [
"Add",
"or",
"update",
"an",
"existing",
"object",
"in",
"the",
"data",
"store",
"."
] | 25ff6577445850916425c72068d654c08eba9bcc | https://github.com/sangupta/jerry-services/blob/25ff6577445850916425c72068d654c08eba9bcc/src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java#L230-L248 |
145,512 | sangupta/jerry-services | src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java | MongoDBBasicOperations.delete | @Override
public T delete(X primaryID) {
if(primaryID == null) {
return null;
}
T entity = get(primaryID);
if(entity == null) {
return null;
}
this.mongoTemplate.remove(entity);
return entity;
} | java | @Override
public T delete(X primaryID) {
if(primaryID == null) {
return null;
}
T entity = get(primaryID);
if(entity == null) {
return null;
}
this.mongoTemplate.remove(entity);
return entity;
} | [
"@",
"Override",
"public",
"T",
"delete",
"(",
"X",
"primaryID",
")",
"{",
"if",
"(",
"primaryID",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"T",
"entity",
"=",
"get",
"(",
"primaryID",
")",
";",
"if",
"(",
"entity",
"==",
"null",
")",
... | Delete the object against the given primary key.
@param primaryID
the primary key
@return the record that was removed | [
"Delete",
"the",
"object",
"against",
"the",
"given",
"primary",
"key",
"."
] | 25ff6577445850916425c72068d654c08eba9bcc | https://github.com/sangupta/jerry-services/blob/25ff6577445850916425c72068d654c08eba9bcc/src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java#L258-L271 |
145,513 | sangupta/jerry-services | src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java | MongoDBBasicOperations.getPrimaryID | public X getPrimaryID(T entity) {
if(mappingContext == null || conversionService == null) {
fetchMappingContextAndConversionService();
}
MongoPersistentEntity<?> persistentEntity = mappingContext.getPersistentEntity(entity.getClass());
MongoPersistentProperty idProperty = persistentEntity.getIdProperty();
... | java | public X getPrimaryID(T entity) {
if(mappingContext == null || conversionService == null) {
fetchMappingContextAndConversionService();
}
MongoPersistentEntity<?> persistentEntity = mappingContext.getPersistentEntity(entity.getClass());
MongoPersistentProperty idProperty = persistentEntity.getIdProperty();
... | [
"public",
"X",
"getPrimaryID",
"(",
"T",
"entity",
")",
"{",
"if",
"(",
"mappingContext",
"==",
"null",
"||",
"conversionService",
"==",
"null",
")",
"{",
"fetchMappingContextAndConversionService",
"(",
")",
";",
"}",
"MongoPersistentEntity",
"<",
"?",
">",
"p... | Extract the value of the primary ID of the entity object
@param entity
the entity to get primary key value of
@return the primary key value | [
"Extract",
"the",
"value",
"of",
"the",
"primary",
"ID",
"of",
"the",
"entity",
"object"
] | 25ff6577445850916425c72068d654c08eba9bcc | https://github.com/sangupta/jerry-services/blob/25ff6577445850916425c72068d654c08eba9bcc/src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java#L311-L325 |
145,514 | sangupta/jerry-services | src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java | MongoDBBasicOperations.fetchMappingContextAndConversionService | private synchronized void fetchMappingContextAndConversionService() {
if(mappingContext == null) {
MongoConverter mongoConverter = this.mongoTemplate.getConverter();
mappingContext = mongoConverter.getMappingContext();
conversionService = mongoConverter.getConversionService();
MongoPersistentEntity<?> pe... | java | private synchronized void fetchMappingContextAndConversionService() {
if(mappingContext == null) {
MongoConverter mongoConverter = this.mongoTemplate.getConverter();
mappingContext = mongoConverter.getMappingContext();
conversionService = mongoConverter.getConversionService();
MongoPersistentEntity<?> pe... | [
"private",
"synchronized",
"void",
"fetchMappingContextAndConversionService",
"(",
")",
"{",
"if",
"(",
"mappingContext",
"==",
"null",
")",
"{",
"MongoConverter",
"mongoConverter",
"=",
"this",
".",
"mongoTemplate",
".",
"getConverter",
"(",
")",
";",
"mappingConte... | Get the basic services from mongo template | [
"Get",
"the",
"basic",
"services",
"from",
"mongo",
"template"
] | 25ff6577445850916425c72068d654c08eba9bcc | https://github.com/sangupta/jerry-services/blob/25ff6577445850916425c72068d654c08eba9bcc/src/main/java/com/sangupta/jerry/db/service/impl/MongoDBBasicOperations.java#L330-L340 |
145,515 | chr78rm/tracelogger | src/main/java/de/christofreichardt/diagnosis/TracerFactory.java | TracerFactory.readConfiguration | public void readConfiguration(File configFile) throws TracerFactory.Exception, FileNotFoundException {
if (!configFile.exists())
throw new FileNotFoundException(configFile + "doesn't exist.");
try (FileInputStream fileInputStream = new FileInputStream(configFile)) {
readConfiguration(fileInputSt... | java | public void readConfiguration(File configFile) throws TracerFactory.Exception, FileNotFoundException {
if (!configFile.exists())
throw new FileNotFoundException(configFile + "doesn't exist.");
try (FileInputStream fileInputStream = new FileInputStream(configFile)) {
readConfiguration(fileInputSt... | [
"public",
"void",
"readConfiguration",
"(",
"File",
"configFile",
")",
"throws",
"TracerFactory",
".",
"Exception",
",",
"FileNotFoundException",
"{",
"if",
"(",
"!",
"configFile",
".",
"exists",
"(",
")",
")",
"throw",
"new",
"FileNotFoundException",
"(",
"conf... | Reads the given configuration file, validates it against a XML-Schema and creates the tracer pool, its mappings and the queue accordingly.
This method should normally be invoked once at program start. Multiple calls with the same configuration file leads to instantiations of new tracer objects
and mappings which will r... | [
"Reads",
"the",
"given",
"configuration",
"file",
"validates",
"it",
"against",
"a",
"XML",
"-",
"Schema",
"and",
"creates",
"the",
"tracer",
"pool",
"its",
"mappings",
"and",
"the",
"queue",
"accordingly",
".",
"This",
"method",
"should",
"normally",
"be",
... | ad22452b20f8111ad4d367302c2b26a100a20200 | https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/TracerFactory.java#L353-L362 |
145,516 | chr78rm/tracelogger | src/main/java/de/christofreichardt/diagnosis/TracerFactory.java | TracerFactory.getTracer | public AbstractTracer getTracer(String name) throws TracerFactory.Exception {
this.poolReadLock.lock();
try {
return getTracerByName(name);
}
finally {
this.poolReadLock.unlock();
}
} | java | public AbstractTracer getTracer(String name) throws TracerFactory.Exception {
this.poolReadLock.lock();
try {
return getTracerByName(name);
}
finally {
this.poolReadLock.unlock();
}
} | [
"public",
"AbstractTracer",
"getTracer",
"(",
"String",
"name",
")",
"throws",
"TracerFactory",
".",
"Exception",
"{",
"this",
".",
"poolReadLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"return",
"getTracerByName",
"(",
"name",
")",
";",
"}",
"finally",
... | Returns the pooled tracer with the given name.
@param name the name of the desired tracer
@return the pooled tracer
@throws TracerFactory.Exception if no tracer exists with the given name | [
"Returns",
"the",
"pooled",
"tracer",
"with",
"the",
"given",
"name",
"."
] | ad22452b20f8111ad4d367302c2b26a100a20200 | https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/TracerFactory.java#L499-L507 |
145,517 | chr78rm/tracelogger | src/main/java/de/christofreichardt/diagnosis/TracerFactory.java | TracerFactory.reset | public void reset() {
this.poolWriteLock.lock();
try {
this.defaultTracer = TracerFactory.NULLTRACER;
this.threadName2Element.clear();
this.threadNames.clear();
this.tracerMap.clear();
this.tracerPool.clear();
}
finally {
this.poolWriteLock.unlock();
}
... | java | public void reset() {
this.poolWriteLock.lock();
try {
this.defaultTracer = TracerFactory.NULLTRACER;
this.threadName2Element.clear();
this.threadNames.clear();
this.tracerMap.clear();
this.tracerPool.clear();
}
finally {
this.poolWriteLock.unlock();
}
... | [
"public",
"void",
"reset",
"(",
")",
"{",
"this",
".",
"poolWriteLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"this",
".",
"defaultTracer",
"=",
"TracerFactory",
".",
"NULLTRACER",
";",
"this",
".",
"threadName2Element",
".",
"clear",
"(",
")",
";",
... | Clears the pool, the mappings and the queue. | [
"Clears",
"the",
"pool",
"the",
"mappings",
"and",
"the",
"queue",
"."
] | ad22452b20f8111ad4d367302c2b26a100a20200 | https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/TracerFactory.java#L566-L586 |
145,518 | chr78rm/tracelogger | src/main/java/de/christofreichardt/diagnosis/TracerFactory.java | TracerFactory.openPoolTracer | public void openPoolTracer() {
this.poolWriteLock.lock();
try {
for (AbstractTracer tracer : this.tracerPool.values()) {
tracer.open();
}
}
finally {
this.poolWriteLock.unlock();
}
} | java | public void openPoolTracer() {
this.poolWriteLock.lock();
try {
for (AbstractTracer tracer : this.tracerPool.values()) {
tracer.open();
}
}
finally {
this.poolWriteLock.unlock();
}
} | [
"public",
"void",
"openPoolTracer",
"(",
")",
"{",
"this",
".",
"poolWriteLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"for",
"(",
"AbstractTracer",
"tracer",
":",
"this",
".",
"tracerPool",
".",
"values",
"(",
")",
")",
"{",
"tracer",
".",
"open",
... | Opens all pooled tracers. | [
"Opens",
"all",
"pooled",
"tracers",
"."
] | ad22452b20f8111ad4d367302c2b26a100a20200 | https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/TracerFactory.java#L591-L601 |
145,519 | chr78rm/tracelogger | src/main/java/de/christofreichardt/diagnosis/TracerFactory.java | TracerFactory.closePoolTracer | public void closePoolTracer() {
this.poolWriteLock.lock();
try {
for (AbstractTracer tracer : this.tracerPool.values()) {
tracer.close();
}
}
finally {
this.poolWriteLock.unlock();
}
} | java | public void closePoolTracer() {
this.poolWriteLock.lock();
try {
for (AbstractTracer tracer : this.tracerPool.values()) {
tracer.close();
}
}
finally {
this.poolWriteLock.unlock();
}
} | [
"public",
"void",
"closePoolTracer",
"(",
")",
"{",
"this",
".",
"poolWriteLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"for",
"(",
"AbstractTracer",
"tracer",
":",
"this",
".",
"tracerPool",
".",
"values",
"(",
")",
")",
"{",
"tracer",
".",
"close",... | Closes all pooled tracers. | [
"Closes",
"all",
"pooled",
"tracers",
"."
] | ad22452b20f8111ad4d367302c2b26a100a20200 | https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/TracerFactory.java#L606-L616 |
145,520 | chr78rm/tracelogger | src/main/java/de/christofreichardt/diagnosis/TracerFactory.java | TracerFactory.openQueueTracer | public boolean openQueueTracer() {
final int TRIALS = 5;
int tracerCounter = 0, trialCounter = 0;
boolean success = false;
do {
this.queueWriteLock.lock();
try {
if (this.queueConfig.enabled) {
for (QueueTracer<?> queueTracer : this.queueConfig.blockingTracerD... | java | public boolean openQueueTracer() {
final int TRIALS = 5;
int tracerCounter = 0, trialCounter = 0;
boolean success = false;
do {
this.queueWriteLock.lock();
try {
if (this.queueConfig.enabled) {
for (QueueTracer<?> queueTracer : this.queueConfig.blockingTracerD... | [
"public",
"boolean",
"openQueueTracer",
"(",
")",
"{",
"final",
"int",
"TRIALS",
"=",
"5",
";",
"int",
"tracerCounter",
"=",
"0",
",",
"trialCounter",
"=",
"0",
";",
"boolean",
"success",
"=",
"false",
";",
"do",
"{",
"this",
".",
"queueWriteLock",
".",
... | Tries to open all enqueued QueueTracer.
@return true if all configured tracers has been opened, false otherwise | [
"Tries",
"to",
"open",
"all",
"enqueued",
"QueueTracer",
"."
] | ad22452b20f8111ad4d367302c2b26a100a20200 | https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/TracerFactory.java#L691-L717 |
145,521 | chr78rm/tracelogger | src/main/java/de/christofreichardt/diagnosis/TracerFactory.java | TracerFactory.getCurrentQueueTracer | public QueueTracer<?> getCurrentQueueTracer() {
this.queueReadLock.lock();
try {
QueueTracer<?> tracer;
if (this.queueConfig.enabled) {
// tracer = this.queueConfig.tracerMap.get(Thread.currentThread());
tracer = this.queueConfig.currentTracer.get();
if (tracer == null)... | java | public QueueTracer<?> getCurrentQueueTracer() {
this.queueReadLock.lock();
try {
QueueTracer<?> tracer;
if (this.queueConfig.enabled) {
// tracer = this.queueConfig.tracerMap.get(Thread.currentThread());
tracer = this.queueConfig.currentTracer.get();
if (tracer == null)... | [
"public",
"QueueTracer",
"<",
"?",
">",
"getCurrentQueueTracer",
"(",
")",
"{",
"this",
".",
"queueReadLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"QueueTracer",
"<",
"?",
">",
"tracer",
";",
"if",
"(",
"this",
".",
"queueConfig",
".",
"enabled",
")... | Returns the QueueTracer for the current thread. If no one was found a QueueNullTracer will be returned.
@return the QueueTracer for the current thread | [
"Returns",
"the",
"QueueTracer",
"for",
"the",
"current",
"thread",
".",
"If",
"no",
"one",
"was",
"found",
"a",
"QueueNullTracer",
"will",
"be",
"returned",
"."
] | ad22452b20f8111ad4d367302c2b26a100a20200 | https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/TracerFactory.java#L756-L776 |
145,522 | dbracewell/mango | src/main/java/com/davidbracewell/cli/NamedOption.java | NamedOption.setValue | void setValue(String optionValue) {
if (StringUtils.isNullOrBlank(optionValue) && isBoolean()) {
this.value = true;
} else if (!StringUtils.isNullOrBlank(optionValue)) {
if (Collection.class.isAssignableFrom(type)) {
Class<?> genericType = field == null
... | java | void setValue(String optionValue) {
if (StringUtils.isNullOrBlank(optionValue) && isBoolean()) {
this.value = true;
} else if (!StringUtils.isNullOrBlank(optionValue)) {
if (Collection.class.isAssignableFrom(type)) {
Class<?> genericType = field == null
... | [
"void",
"setValue",
"(",
"String",
"optionValue",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isNullOrBlank",
"(",
"optionValue",
")",
"&&",
"isBoolean",
"(",
")",
")",
"{",
"this",
".",
"value",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"!",
"StringUtil... | Sets the value of the option.
@param optionValue the option value | [
"Sets",
"the",
"value",
"of",
"the",
"option",
"."
] | 2cec08826f1fccd658694dd03abce10fc97618ec | https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/cli/NamedOption.java#L188-L221 |
145,523 | flex-oss/flex-fruit | fruit-core/src/main/java/org/cdlflex/fruit/Range.java | Range.includes | public boolean includes(T value, boolean inclusive) {
if (inclusive) {
return value.compareTo(getStart()) >= 0 && value.compareTo(getEnd()) <= 0;
} else {
return value.compareTo(getStart()) > 0 && value.compareTo(getEnd()) < 0;
}
} | java | public boolean includes(T value, boolean inclusive) {
if (inclusive) {
return value.compareTo(getStart()) >= 0 && value.compareTo(getEnd()) <= 0;
} else {
return value.compareTo(getStart()) > 0 && value.compareTo(getEnd()) < 0;
}
} | [
"public",
"boolean",
"includes",
"(",
"T",
"value",
",",
"boolean",
"inclusive",
")",
"{",
"if",
"(",
"inclusive",
")",
"{",
"return",
"value",
".",
"compareTo",
"(",
"getStart",
"(",
")",
")",
">=",
"0",
"&&",
"value",
".",
"compareTo",
"(",
"getEnd",... | Checks whether the given value is included in this range. If inclusive is set to true, checking for 1 in the
range of 1,10 will return true.
@param value the value to check
@param inclusive whether or not the range is open (the value is included)
@return true if the value is inside this range, false otherwise | [
"Checks",
"whether",
"the",
"given",
"value",
"is",
"included",
"in",
"this",
"range",
".",
"If",
"inclusive",
"is",
"set",
"to",
"true",
"checking",
"for",
"1",
"in",
"the",
"range",
"of",
"1",
"10",
"will",
"return",
"true",
"."
] | 30d7eca5ee796b829f96c9932a95b259ca9738d9 | https://github.com/flex-oss/flex-fruit/blob/30d7eca5ee796b829f96c9932a95b259ca9738d9/fruit-core/src/main/java/org/cdlflex/fruit/Range.java#L73-L80 |
145,524 | fuinorg/utils4j | src/main/java/org/fuin/utils4j/fileprocessor/FileProcessor.java | FileProcessor.process | public final void process(final File file) {
if (file == null) {
throw new IllegalArgumentException("Argument 'file' cannot be NULL");
}
if (file.isFile()) {
handler.handleFile(file);
} else {
processDir(file);
}
} | java | public final void process(final File file) {
if (file == null) {
throw new IllegalArgumentException("Argument 'file' cannot be NULL");
}
if (file.isFile()) {
handler.handleFile(file);
} else {
processDir(file);
}
} | [
"public",
"final",
"void",
"process",
"(",
"final",
"File",
"file",
")",
"{",
"if",
"(",
"file",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Argument 'file' cannot be NULL\"",
")",
";",
"}",
"if",
"(",
"file",
".",
"isFile",
... | Processes a file or directory.
@param file
File - Cannot be NULL. | [
"Processes",
"a",
"file",
"or",
"directory",
"."
] | 71cf88e0a8d8ed67bbac513bf3cab165cd7e3280 | https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/fileprocessor/FileProcessor.java#L88-L97 |
145,525 | fuinorg/utils4j | src/main/java/org/fuin/utils4j/filter/PropertyFilter.java | PropertyFilter.getProperty | protected final Object getProperty(final Object obj, final String property) {
if ((obj == null) || (property == null) || (property.trim().length() == 0)) {
return null;
}
final String[] getterNames = createGetterNames(property);
for (int i = 0; i < getterNames.length; i+... | java | protected final Object getProperty(final Object obj, final String property) {
if ((obj == null) || (property == null) || (property.trim().length() == 0)) {
return null;
}
final String[] getterNames = createGetterNames(property);
for (int i = 0; i < getterNames.length; i+... | [
"protected",
"final",
"Object",
"getProperty",
"(",
"final",
"Object",
"obj",
",",
"final",
"String",
"property",
")",
"{",
"if",
"(",
"(",
"obj",
"==",
"null",
")",
"||",
"(",
"property",
"==",
"null",
")",
"||",
"(",
"property",
".",
"trim",
"(",
"... | Return the value of a property via reflection.
@param obj
Object to retrieve a value from.
@param property
Name of the property.
@return Value returned via the getter of the property. | [
"Return",
"the",
"value",
"of",
"a",
"property",
"via",
"reflection",
"."
] | 71cf88e0a8d8ed67bbac513bf3cab165cd7e3280 | https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/filter/PropertyFilter.java#L71-L96 |
145,526 | astrapi69/runtime-compiler | src/main/java/de/alpharogroup/runtime/compiler/CompilerExtensions.java | CompilerExtensions.generateCompilationStacktrace | public static String generateCompilationStacktrace(
final DiagnosticCollector<JavaFileObject> diagnosticCollectors)
{
final StringBuilder sb = new StringBuilder();
for (final Diagnostic<? extends JavaFileObject> diagnostic : diagnosticCollectors
.getDiagnostics())
{
sb.append(diagnostic.getMessage... | java | public static String generateCompilationStacktrace(
final DiagnosticCollector<JavaFileObject> diagnosticCollectors)
{
final StringBuilder sb = new StringBuilder();
for (final Diagnostic<? extends JavaFileObject> diagnostic : diagnosticCollectors
.getDiagnostics())
{
sb.append(diagnostic.getMessage... | [
"public",
"static",
"String",
"generateCompilationStacktrace",
"(",
"final",
"DiagnosticCollector",
"<",
"JavaFileObject",
">",
"diagnosticCollectors",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"final",
"Diagno... | Generate a compilation stacktrace from the given parameter.
@param diagnosticCollectors
the diagnostic collectors
@return the generated stacktrace string. | [
"Generate",
"a",
"compilation",
"stacktrace",
"from",
"the",
"given",
"parameter",
"."
] | 9aed71f2940ddf30e6930de6cbf509206f3bd7de | https://github.com/astrapi69/runtime-compiler/blob/9aed71f2940ddf30e6930de6cbf509206f3bd7de/src/main/java/de/alpharogroup/runtime/compiler/CompilerExtensions.java#L50-L61 |
145,527 | astrapi69/runtime-compiler | src/main/java/de/alpharogroup/runtime/compiler/CompilerExtensions.java | CompilerExtensions.getClassNameWithExtension | public static String getClassNameWithExtension(final String className)
{
return new StringBuilder().append(className).append(Kind.SOURCE.extension).toString();
} | java | public static String getClassNameWithExtension(final String className)
{
return new StringBuilder().append(className).append(Kind.SOURCE.extension).toString();
} | [
"public",
"static",
"String",
"getClassNameWithExtension",
"(",
"final",
"String",
"className",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"className",
")",
".",
"append",
"(",
"Kind",
".",
"SOURCE",
".",
"extension",
")",
".",... | Gets the class name with java file extension.
@param className
the class name
@return the class name with extension | [
"Gets",
"the",
"class",
"name",
"with",
"java",
"file",
"extension",
"."
] | 9aed71f2940ddf30e6930de6cbf509206f3bd7de | https://github.com/astrapi69/runtime-compiler/blob/9aed71f2940ddf30e6930de6cbf509206f3bd7de/src/main/java/de/alpharogroup/runtime/compiler/CompilerExtensions.java#L70-L73 |
145,528 | astrapi69/runtime-compiler | src/main/java/de/alpharogroup/runtime/compiler/CompilerExtensions.java | CompilerExtensions.newQualifiedClassName | public static String newQualifiedClassName(final String packageName, final String className)
{
if (StringUtils.isBlank(packageName))
{
return className;
}
return new StringBuilder().append(packageName).append(SeparatorConstants.DOT)
.append(className).toString();
} | java | public static String newQualifiedClassName(final String packageName, final String className)
{
if (StringUtils.isBlank(packageName))
{
return className;
}
return new StringBuilder().append(packageName).append(SeparatorConstants.DOT)
.append(className).toString();
} | [
"public",
"static",
"String",
"newQualifiedClassName",
"(",
"final",
"String",
"packageName",
",",
"final",
"String",
"className",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"packageName",
")",
")",
"{",
"return",
"className",
";",
"}",
"return",... | Factory method for create a qualified class name from the given arguments.
@param packageName
the package name
@param className
the class name
@return the created qualified class name | [
"Factory",
"method",
"for",
"create",
"a",
"qualified",
"class",
"name",
"from",
"the",
"given",
"arguments",
"."
] | 9aed71f2940ddf30e6930de6cbf509206f3bd7de | https://github.com/astrapi69/runtime-compiler/blob/9aed71f2940ddf30e6930de6cbf509206f3bd7de/src/main/java/de/alpharogroup/runtime/compiler/CompilerExtensions.java#L84-L92 |
145,529 | fuinorg/utils4j | src/main/java/org/fuin/utils4j/WaitHelper.java | WaitHelper.waitUntilNoMoreException | public void waitUntilNoMoreException(final Runnable runnable, final List<Class<? extends Exception>> expectedExceptions) {
final List<RuntimeException> actualExceptions = new ArrayList<>();
int tries = 0;
while (tries < maxTries) {
try {
runnable.run();
... | java | public void waitUntilNoMoreException(final Runnable runnable, final List<Class<? extends Exception>> expectedExceptions) {
final List<RuntimeException> actualExceptions = new ArrayList<>();
int tries = 0;
while (tries < maxTries) {
try {
runnable.run();
... | [
"public",
"void",
"waitUntilNoMoreException",
"(",
"final",
"Runnable",
"runnable",
",",
"final",
"List",
"<",
"Class",
"<",
"?",
"extends",
"Exception",
">",
">",
"expectedExceptions",
")",
"{",
"final",
"List",
"<",
"RuntimeException",
">",
"actualExceptions",
... | Wait until no more expected exception is thrown or the number of wait cycles has been exceeded.
@param runnable
Code to run.
@param expectedExceptions
List of expected exceptions. | [
"Wait",
"until",
"no",
"more",
"expected",
"exception",
"is",
"thrown",
"or",
"the",
"number",
"of",
"wait",
"cycles",
"has",
"been",
"exceeded",
"."
] | 71cf88e0a8d8ed67bbac513bf3cab165cd7e3280 | https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/WaitHelper.java#L55-L75 |
145,530 | dbracewell/mango | src/main/java/com/davidbracewell/EnhancedDoubleStatistics.java | EnhancedDoubleStatistics.clear | public void clear() {
this.min = Double.POSITIVE_INFINITY;
this.max = Double.NEGATIVE_INFINITY;
this.sum = 0;
this.sumOfSq = 0;
this.count = 0;
} | java | public void clear() {
this.min = Double.POSITIVE_INFINITY;
this.max = Double.NEGATIVE_INFINITY;
this.sum = 0;
this.sumOfSq = 0;
this.count = 0;
} | [
"public",
"void",
"clear",
"(",
")",
"{",
"this",
".",
"min",
"=",
"Double",
".",
"POSITIVE_INFINITY",
";",
"this",
".",
"max",
"=",
"Double",
".",
"NEGATIVE_INFINITY",
";",
"this",
".",
"sum",
"=",
"0",
";",
"this",
".",
"sumOfSq",
"=",
"0",
";",
... | Clears the accumulated values. | [
"Clears",
"the",
"accumulated",
"values",
"."
] | 2cec08826f1fccd658694dd03abce10fc97618ec | https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/EnhancedDoubleStatistics.java#L55-L61 |
145,531 | dbracewell/mango | src/main/java/com/davidbracewell/EnhancedDoubleStatistics.java | EnhancedDoubleStatistics.getPopulationVariance | public double getPopulationVariance() {
if (getCount() <= 0) {
return Double.NaN;
} else if (getCount() == 1) {
return 0d;
}
return Math.abs(getSumOfSquares() - getAverage() * getSum()) / getCount();
} | java | public double getPopulationVariance() {
if (getCount() <= 0) {
return Double.NaN;
} else if (getCount() == 1) {
return 0d;
}
return Math.abs(getSumOfSquares() - getAverage() * getSum()) / getCount();
} | [
"public",
"double",
"getPopulationVariance",
"(",
")",
"{",
"if",
"(",
"getCount",
"(",
")",
"<=",
"0",
")",
"{",
"return",
"Double",
".",
"NaN",
";",
"}",
"else",
"if",
"(",
"getCount",
"(",
")",
"==",
"1",
")",
"{",
"return",
"0d",
";",
"}",
"r... | Gets the population variance.
@return the population variance | [
"Gets",
"the",
"population",
"variance",
"."
] | 2cec08826f1fccd658694dd03abce10fc97618ec | https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/EnhancedDoubleStatistics.java#L178-L185 |
145,532 | febit/wit | wit-core/src/main/java/org/febit/wit/Engine.java | Engine.getTemplate | public Template getTemplate(final String parentName, final String name) throws ResourceNotFoundException {
return getTemplate(this.loader.concat(parentName, name));
} | java | public Template getTemplate(final String parentName, final String name) throws ResourceNotFoundException {
return getTemplate(this.loader.concat(parentName, name));
} | [
"public",
"Template",
"getTemplate",
"(",
"final",
"String",
"parentName",
",",
"final",
"String",
"name",
")",
"throws",
"ResourceNotFoundException",
"{",
"return",
"getTemplate",
"(",
"this",
".",
"loader",
".",
"concat",
"(",
"parentName",
",",
"name",
")",
... | get template by parent template's name and it's relative name.
@param parentName parent template's name
@param name template's relative name
@return Template
@throws ResourceNotFoundException if resource not found | [
"get",
"template",
"by",
"parent",
"template",
"s",
"name",
"and",
"it",
"s",
"relative",
"name",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/Engine.java#L66-L68 |
145,533 | febit/wit | wit-core/src/main/java/org/febit/wit/Engine.java | Engine.getTemplate | public Template getTemplate(final String name) throws ResourceNotFoundException {
final Template template = this.cachedTemplates.get(name);
if (template != null) {
return template;
}
return createTemplateIfAbsent(name);
} | java | public Template getTemplate(final String name) throws ResourceNotFoundException {
final Template template = this.cachedTemplates.get(name);
if (template != null) {
return template;
}
return createTemplateIfAbsent(name);
} | [
"public",
"Template",
"getTemplate",
"(",
"final",
"String",
"name",
")",
"throws",
"ResourceNotFoundException",
"{",
"final",
"Template",
"template",
"=",
"this",
".",
"cachedTemplates",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"template",
"!=",
"null",
... | get template by name.
@param name template's name
@return Template
@throws ResourceNotFoundException if resource not found | [
"get",
"template",
"by",
"name",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/Engine.java#L77-L83 |
145,534 | febit/wit | wit-core/src/main/java/org/febit/wit/Engine.java | Engine.exists | public boolean exists(final String resourceName) {
final Loader myLoader = this.loader;
final String normalizedName = myLoader.normalize(resourceName);
if (normalizedName == null) {
return false;
}
return myLoader.get(normalizedName).exists();
} | java | public boolean exists(final String resourceName) {
final Loader myLoader = this.loader;
final String normalizedName = myLoader.normalize(resourceName);
if (normalizedName == null) {
return false;
}
return myLoader.get(normalizedName).exists();
} | [
"public",
"boolean",
"exists",
"(",
"final",
"String",
"resourceName",
")",
"{",
"final",
"Loader",
"myLoader",
"=",
"this",
".",
"loader",
";",
"final",
"String",
"normalizedName",
"=",
"myLoader",
".",
"normalize",
"(",
"resourceName",
")",
";",
"if",
"(",... | if exists this resource.
@param resourceName resource name
@return if exists
@since 1.4.1 | [
"if",
"exists",
"this",
"resource",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/Engine.java#L92-L99 |
145,535 | febit/wit | wit-core/src/main/java/org/febit/wit/Engine.java | Engine.create | public static Engine create(final String configPath, final Map<String, Object> parameters) {
return create(createConfigProps(configPath), parameters);
} | java | public static Engine create(final String configPath, final Map<String, Object> parameters) {
return create(createConfigProps(configPath), parameters);
} | [
"public",
"static",
"Engine",
"create",
"(",
"final",
"String",
"configPath",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
")",
"{",
"return",
"create",
"(",
"createConfigProps",
"(",
"configPath",
")",
",",
"parameters",
")",
";",
... | Create a Engine with given configPath and extra-parameters.
@param configPath config path
@param parameters parameters map
@return Engine
@since 1.5.0 | [
"Create",
"a",
"Engine",
"with",
"given",
"configPath",
"and",
"extra",
"-",
"parameters",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/Engine.java#L237-L239 |
145,536 | febit/wit | wit-core/src/main/java/org/febit/wit/Engine.java | Engine.create | public static Engine create(final Props props, final Map<String, Object> parameters) {
final Petite petite = new Petite();
petite.config(props, parameters);
petite.initComponents();
final Engine engine = petite.get(Engine.class);
engine.getLogger().info("Loaded props: {}", props... | java | public static Engine create(final Props props, final Map<String, Object> parameters) {
final Petite petite = new Petite();
petite.config(props, parameters);
petite.initComponents();
final Engine engine = petite.get(Engine.class);
engine.getLogger().info("Loaded props: {}", props... | [
"public",
"static",
"Engine",
"create",
"(",
"final",
"Props",
"props",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
")",
"{",
"final",
"Petite",
"petite",
"=",
"new",
"Petite",
"(",
")",
";",
"petite",
".",
"config",
"(",
"pro... | Create a Engine with given baseProps and extra-parameters.
@param props props
@param parameters parameters map
@return Engine
@since 1.5.0 | [
"Create",
"a",
"Engine",
"with",
"given",
"baseProps",
"and",
"extra",
"-",
"parameters",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/Engine.java#L249-L262 |
145,537 | InferlyticsOSS/druidlet | src/main/java/com/inferlytics/druidlet/core/QueryExecutor.java | QueryExecutor.run | @SuppressWarnings("unchecked")
public static Sequence run(Query query, QueryableIndex index) {
return findFactory(query).createRunner(new QueryableIndexSegment("", index)).run(query, null);
} | java | @SuppressWarnings("unchecked")
public static Sequence run(Query query, QueryableIndex index) {
return findFactory(query).createRunner(new QueryableIndexSegment("", index)).run(query, null);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"Sequence",
"run",
"(",
"Query",
"query",
",",
"QueryableIndex",
"index",
")",
"{",
"return",
"findFactory",
"(",
"query",
")",
".",
"createRunner",
"(",
"new",
"QueryableIndexSegment",
"(",... | Executes a Query by identifying the appropriate QueryRunner
@param query Query to execute
@param index Index to execute query on
@return Result of the query | [
"Executes",
"a",
"Query",
"by",
"identifying",
"the",
"appropriate",
"QueryRunner"
] | 984beb6519ae9f04df44961553ca2b195521c87d | https://github.com/InferlyticsOSS/druidlet/blob/984beb6519ae9f04df44961553ca2b195521c87d/src/main/java/com/inferlytics/druidlet/core/QueryExecutor.java#L186-L189 |
145,538 | politie/cinch | src/main/java/eu/icolumbo/cinch/streaming/StreamingCinchContext.java | StreamingCinchContext.executeJob | public void executeJob() {
AbstractApplicationContext springContext = SpringContext.getContext(getSpringConfigurationClass());
StreamingCinchJob cinchJob = springContext.getBean(StreamingCinchJob.class);
cinchJob.execute(this);
} | java | public void executeJob() {
AbstractApplicationContext springContext = SpringContext.getContext(getSpringConfigurationClass());
StreamingCinchJob cinchJob = springContext.getBean(StreamingCinchJob.class);
cinchJob.execute(this);
} | [
"public",
"void",
"executeJob",
"(",
")",
"{",
"AbstractApplicationContext",
"springContext",
"=",
"SpringContext",
".",
"getContext",
"(",
"getSpringConfigurationClass",
"(",
")",
")",
";",
"StreamingCinchJob",
"cinchJob",
"=",
"springContext",
".",
"getBean",
"(",
... | Executes your streaming job from the spring context. | [
"Executes",
"your",
"streaming",
"job",
"from",
"the",
"spring",
"context",
"."
] | 1986b16d397be343a4e1a3f372f14981f70d5de3 | https://github.com/politie/cinch/blob/1986b16d397be343a4e1a3f372f14981f70d5de3/src/main/java/eu/icolumbo/cinch/streaming/StreamingCinchContext.java#L27-L32 |
145,539 | politie/cinch | src/main/java/eu/icolumbo/cinch/streaming/StreamingCinchContext.java | StreamingCinchContext.foreachRddFunction | public <T> ForeachRddFunction<T> foreachRddFunction(Class<? extends VoidFunction<T>> springBeanClass) {
return new ForeachRddFunction<>(voidFunction(springBeanClass));
} | java | public <T> ForeachRddFunction<T> foreachRddFunction(Class<? extends VoidFunction<T>> springBeanClass) {
return new ForeachRddFunction<>(voidFunction(springBeanClass));
} | [
"public",
"<",
"T",
">",
"ForeachRddFunction",
"<",
"T",
">",
"foreachRddFunction",
"(",
"Class",
"<",
"?",
"extends",
"VoidFunction",
"<",
"T",
">",
">",
"springBeanClass",
")",
"{",
"return",
"new",
"ForeachRddFunction",
"<>",
"(",
"voidFunction",
"(",
"sp... | Create a new ForeachRddFunction, which implements Spark's VoidFunction interface. | [
"Create",
"a",
"new",
"ForeachRddFunction",
"which",
"implements",
"Spark",
"s",
"VoidFunction",
"interface",
"."
] | 1986b16d397be343a4e1a3f372f14981f70d5de3 | https://github.com/politie/cinch/blob/1986b16d397be343a4e1a3f372f14981f70d5de3/src/main/java/eu/icolumbo/cinch/streaming/StreamingCinchContext.java#L37-L39 |
145,540 | febit/wit | wit-core/src/main/java/org/febit/wit_shaded/asm/MethodWriter.java | MethodWriter.renderTo | final void renderTo(final ByteBuffer out) {
final ByteBuffer code = this.code;
out.putShort(access).putShort(name).putShort(desc);
int attributeCount = 0;
if (code.length > 0) {
++attributeCount;
}
int exceptionCount = exceptions.length;
if (exceptionC... | java | final void renderTo(final ByteBuffer out) {
final ByteBuffer code = this.code;
out.putShort(access).putShort(name).putShort(desc);
int attributeCount = 0;
if (code.length > 0) {
++attributeCount;
}
int exceptionCount = exceptions.length;
if (exceptionC... | [
"final",
"void",
"renderTo",
"(",
"final",
"ByteBuffer",
"out",
")",
"{",
"final",
"ByteBuffer",
"code",
"=",
"this",
".",
"code",
";",
"out",
".",
"putShort",
"(",
"access",
")",
".",
"putShort",
"(",
"name",
")",
".",
"putShort",
"(",
"desc",
")",
... | Puts the bytecode of this method in the given byte vector.
@param out the byte vector into which the bytecode of this method must be copied. | [
"Puts",
"the",
"bytecode",
"of",
"this",
"method",
"in",
"the",
"given",
"byte",
"vector",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit_shaded/asm/MethodWriter.java#L1023-L1077 |
145,541 | javabits/pojo-mbean | pojo-mbean-impl/src/main/java/org/softee/util/Preconditions.java | Preconditions.notNull | public static <E> E notNull(E obj, String msg) {
if (obj == null) {
throw (msg == null) ? new NullPointerException() : new NullPointerException(msg);
}
return obj;
} | java | public static <E> E notNull(E obj, String msg) {
if (obj == null) {
throw (msg == null) ? new NullPointerException() : new NullPointerException(msg);
}
return obj;
} | [
"public",
"static",
"<",
"E",
">",
"E",
"notNull",
"(",
"E",
"obj",
",",
"String",
"msg",
")",
"{",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"throw",
"(",
"msg",
"==",
"null",
")",
"?",
"new",
"NullPointerException",
"(",
")",
":",
"new",
"NullP... | An assertion method that makes null validation more fluent
@param <E> The type of elements
@param obj an Object
@param msg a message that is reported in the exception
@return {@code obj}
@throws NullPointerException if {@code obj} is null | [
"An",
"assertion",
"method",
"that",
"makes",
"null",
"validation",
"more",
"fluent"
] | 9aa7fb065e560ec1e3e63373b28cd95ad438b26a | https://github.com/javabits/pojo-mbean/blob/9aa7fb065e560ec1e3e63373b28cd95ad438b26a/pojo-mbean-impl/src/main/java/org/softee/util/Preconditions.java#L27-L32 |
145,542 | InferlyticsOSS/druidlet | src/main/java/com/inferlytics/druidlet/loader/Loader.java | Loader.csv | public static Loader csv(Reader reader, List<String> columns, List<String> dimensions, String timestampDimension) {
return new CSVLoader(reader, columns, dimensions, timestampDimension);
} | java | public static Loader csv(Reader reader, List<String> columns, List<String> dimensions, String timestampDimension) {
return new CSVLoader(reader, columns, dimensions, timestampDimension);
} | [
"public",
"static",
"Loader",
"csv",
"(",
"Reader",
"reader",
",",
"List",
"<",
"String",
">",
"columns",
",",
"List",
"<",
"String",
">",
"dimensions",
",",
"String",
"timestampDimension",
")",
"{",
"return",
"new",
"CSVLoader",
"(",
"reader",
",",
"colum... | CSVLoader implementation of the Loader
@param reader A Reader opened to the CSV file
@param columns List of columns in the CSV
@param dimensions List of dimensions to index
@param timestampDimension Timestamp dimension
@return A new CSVLoader to the CSV file specified by the reader | [
"CSVLoader",
"implementation",
"of",
"the",
"Loader"
] | 984beb6519ae9f04df44961553ca2b195521c87d | https://github.com/InferlyticsOSS/druidlet/blob/984beb6519ae9f04df44961553ca2b195521c87d/src/main/java/com/inferlytics/druidlet/loader/Loader.java#L38-L40 |
145,543 | febit/wit | wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java | ClassWriter.newInteger | private Item newInteger(final int value) {
Item result = get(key.set(INT, value));
if (result == null) {
pool.putByte(INT).putInt(value);
result = new Item(poolIndex++, key);
put(result);
}
return result;
} | java | private Item newInteger(final int value) {
Item result = get(key.set(INT, value));
if (result == null) {
pool.putByte(INT).putInt(value);
result = new Item(poolIndex++, key);
put(result);
}
return result;
} | [
"private",
"Item",
"newInteger",
"(",
"final",
"int",
"value",
")",
"{",
"Item",
"result",
"=",
"get",
"(",
"key",
".",
"set",
"(",
"INT",
",",
"value",
")",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"pool",
".",
"putByte",
"(",
"INT... | Adds an integer to the constant pool of the class being build. Does nothing if the constant pool already contains
a similar item.
@param value the int value.
@return a new or already existing int item. | [
"Adds",
"an",
"integer",
"to",
"the",
"constant",
"pool",
"of",
"the",
"class",
"being",
"build",
".",
"Does",
"nothing",
"if",
"the",
"constant",
"pool",
"already",
"contains",
"a",
"similar",
"item",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java#L614-L622 |
145,544 | febit/wit | wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java | ClassWriter.newFloat | private Item newFloat(final float value) {
Item result = get(key.set(FLOAT, value));
if (result == null) {
pool.putByte(FLOAT).putInt(Float.floatToIntBits(value));
result = new Item(poolIndex++, key);
put(result);
}
return result;
} | java | private Item newFloat(final float value) {
Item result = get(key.set(FLOAT, value));
if (result == null) {
pool.putByte(FLOAT).putInt(Float.floatToIntBits(value));
result = new Item(poolIndex++, key);
put(result);
}
return result;
} | [
"private",
"Item",
"newFloat",
"(",
"final",
"float",
"value",
")",
"{",
"Item",
"result",
"=",
"get",
"(",
"key",
".",
"set",
"(",
"FLOAT",
",",
"value",
")",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"pool",
".",
"putByte",
"(",
"F... | Adds a float to the constant pool of the class being build. Does nothing if the constant pool already contains a
similar item.
@param value the float value.
@return a new or already existing float item. | [
"Adds",
"a",
"float",
"to",
"the",
"constant",
"pool",
"of",
"the",
"class",
"being",
"build",
".",
"Does",
"nothing",
"if",
"the",
"constant",
"pool",
"already",
"contains",
"a",
"similar",
"item",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java#L631-L639 |
145,545 | febit/wit | wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java | ClassWriter.newLong | private Item newLong(final long value) {
Item result = get(key.set(LONG, value));
if (result == null) {
pool.putByte(LONG).putLong(value);
result = new Item(poolIndex, key);
put(result);
poolIndex += 2;
}
return result;
} | java | private Item newLong(final long value) {
Item result = get(key.set(LONG, value));
if (result == null) {
pool.putByte(LONG).putLong(value);
result = new Item(poolIndex, key);
put(result);
poolIndex += 2;
}
return result;
} | [
"private",
"Item",
"newLong",
"(",
"final",
"long",
"value",
")",
"{",
"Item",
"result",
"=",
"get",
"(",
"key",
".",
"set",
"(",
"LONG",
",",
"value",
")",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"pool",
".",
"putByte",
"(",
"LONG... | Adds a long to the constant pool of the class being build. Does nothing if the constant pool already contains a
similar item.
@param value the long value.
@return a new or already existing long item. | [
"Adds",
"a",
"long",
"to",
"the",
"constant",
"pool",
"of",
"the",
"class",
"being",
"build",
".",
"Does",
"nothing",
"if",
"the",
"constant",
"pool",
"already",
"contains",
"a",
"similar",
"item",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java#L648-L657 |
145,546 | febit/wit | wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java | ClassWriter.newString | private Item newString(final String value) {
Item result = get(key2.set(STR, value, null, null));
if (result == null) {
pool.putBS(STR, newUTF8(value));
result = new Item(poolIndex++, key2);
put(result);
}
return result;
} | java | private Item newString(final String value) {
Item result = get(key2.set(STR, value, null, null));
if (result == null) {
pool.putBS(STR, newUTF8(value));
result = new Item(poolIndex++, key2);
put(result);
}
return result;
} | [
"private",
"Item",
"newString",
"(",
"final",
"String",
"value",
")",
"{",
"Item",
"result",
"=",
"get",
"(",
"key2",
".",
"set",
"(",
"STR",
",",
"value",
",",
"null",
",",
"null",
")",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"poo... | Adds a string to the constant pool of the class being build. Does nothing if the constant pool already contains a
similar item.
@param value the String value.
@return a new or already existing string item. | [
"Adds",
"a",
"string",
"to",
"the",
"constant",
"pool",
"of",
"the",
"class",
"being",
"build",
".",
"Does",
"nothing",
"if",
"the",
"constant",
"pool",
"already",
"contains",
"a",
"similar",
"item",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java#L684-L692 |
145,547 | febit/wit | wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java | ClassWriter.put122 | private void put122(final int b, final int s1, final int s2) {
pool.putBS(b, s1).putShort(s2);
} | java | private void put122(final int b, final int s1, final int s2) {
pool.putBS(b, s1).putShort(s2);
} | [
"private",
"void",
"put122",
"(",
"final",
"int",
"b",
",",
"final",
"int",
"s1",
",",
"final",
"int",
"s2",
")",
"{",
"pool",
".",
"putBS",
"(",
"b",
",",
"s1",
")",
".",
"putShort",
"(",
"s2",
")",
";",
"}"
] | Puts one byte and two shorts into the constant pool.
@param b a byte.
@param s1 a short.
@param s2 another short. | [
"Puts",
"one",
"byte",
"and",
"two",
"shorts",
"into",
"the",
"constant",
"pool",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java#L741-L743 |
145,548 | InferlyticsOSS/druidlet | src/main/java/com/inferlytics/druidlet/util/Utils.java | Utils.readFile | public static ByteBuffer readFile(File inFile) throws IOException {
ByteBuffer mBuf;
try (FileInputStream fIn = new FileInputStream(inFile);
FileChannel fChan = fIn.getChannel()) {
long fSize = fChan.size();
mBuf = ByteBuffer.allocate((int) fSize);
fChan.... | java | public static ByteBuffer readFile(File inFile) throws IOException {
ByteBuffer mBuf;
try (FileInputStream fIn = new FileInputStream(inFile);
FileChannel fChan = fIn.getChannel()) {
long fSize = fChan.size();
mBuf = ByteBuffer.allocate((int) fSize);
fChan.... | [
"public",
"static",
"ByteBuffer",
"readFile",
"(",
"File",
"inFile",
")",
"throws",
"IOException",
"{",
"ByteBuffer",
"mBuf",
";",
"try",
"(",
"FileInputStream",
"fIn",
"=",
"new",
"FileInputStream",
"(",
"inFile",
")",
";",
"FileChannel",
"fChan",
"=",
"fIn",... | Helper method to read a file into a ByteBuffer
@param inFile File to read from
@return ByteBuffer containing the contents of the file
@throws IOException Thrown if there was a problem reading the file | [
"Helper",
"method",
"to",
"read",
"a",
"file",
"into",
"a",
"ByteBuffer"
] | 984beb6519ae9f04df44961553ca2b195521c87d | https://github.com/InferlyticsOSS/druidlet/blob/984beb6519ae9f04df44961553ca2b195521c87d/src/main/java/com/inferlytics/druidlet/util/Utils.java#L69-L79 |
145,549 | OSSIndex/java-api | src/main/java/net/ossindex/common/filter/VulnerabilityFilterFactory.java | VulnerabilityFilterFactory.shouldFilter | public static boolean shouldFilter(final IVulnerabilityFilter filter,
final List<PackageCoordinate> path,
final String vid) {
return ((VulnerabilityFilterImpl)filter).shouldFilter(path, vid);
} | java | public static boolean shouldFilter(final IVulnerabilityFilter filter,
final List<PackageCoordinate> path,
final String vid) {
return ((VulnerabilityFilterImpl)filter).shouldFilter(path, vid);
} | [
"public",
"static",
"boolean",
"shouldFilter",
"(",
"final",
"IVulnerabilityFilter",
"filter",
",",
"final",
"List",
"<",
"PackageCoordinate",
">",
"path",
",",
"final",
"String",
"vid",
")",
"{",
"return",
"(",
"(",
"VulnerabilityFilterImpl",
")",
"filter",
")"... | Kind of filthy this being here. It is in lieu of making a separate utility class for now. It allows us to run
the filter without exposing private functionality to the users. | [
"Kind",
"of",
"filthy",
"this",
"being",
"here",
".",
"It",
"is",
"in",
"lieu",
"of",
"making",
"a",
"separate",
"utility",
"class",
"for",
"now",
".",
"It",
"allows",
"us",
"to",
"run",
"the",
"filter",
"without",
"exposing",
"private",
"functionality",
... | 9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f | https://github.com/OSSIndex/java-api/blob/9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f/src/main/java/net/ossindex/common/filter/VulnerabilityFilterFactory.java#L29-L33 |
145,550 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java | Respoke.postTaskSuccess | public static void postTaskSuccess(final TaskCompletionListener completionListener) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
completionListener.onSuccess();
... | java | public static void postTaskSuccess(final TaskCompletionListener completionListener) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
completionListener.onSuccess();
... | [
"public",
"static",
"void",
"postTaskSuccess",
"(",
"final",
"TaskCompletionListener",
"completionListener",
")",
"{",
"new",
"Handler",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
")",
".",
"post",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
... | A helper function to post success to a TaskCompletionListener on the UI thread
@param completionListener The TaskCompletionListener to notify | [
"A",
"helper",
"function",
"to",
"post",
"success",
"to",
"a",
"TaskCompletionListener",
"on",
"the",
"UI",
"thread"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java#L63-L72 |
145,551 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java | Respoke.postTaskError | public static void postTaskError(final TaskCompletionListener completionListener, final String errorMessage) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
completionListener.... | java | public static void postTaskError(final TaskCompletionListener completionListener, final String errorMessage) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
completionListener.... | [
"public",
"static",
"void",
"postTaskError",
"(",
"final",
"TaskCompletionListener",
"completionListener",
",",
"final",
"String",
"errorMessage",
")",
"{",
"new",
"Handler",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
")",
".",
"post",
"(",
"new",
"Runnable"... | A helper function to post an error message to a TaskCompletionListener on the UI thread
@param completionListener The TaskCompletionListener to notify
@param errorMessage The error message to post | [
"A",
"helper",
"function",
"to",
"post",
"an",
"error",
"message",
"to",
"a",
"TaskCompletionListener",
"on",
"the",
"UI",
"thread"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java#L81-L90 |
145,552 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java | Respoke.makeGUID | public static String makeGUID() {
String uuid = "";
String chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
int rnd = 0;
int r;
for (int i = 0; i < GUID_STRING_LENGTH; i += 1) {
if (i == 8 || i == 13 || i == 18 || i == 23) {
... | java | public static String makeGUID() {
String uuid = "";
String chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
int rnd = 0;
int r;
for (int i = 0; i < GUID_STRING_LENGTH; i += 1) {
if (i == 8 || i == 13 || i == 18 || i == 23) {
... | [
"public",
"static",
"String",
"makeGUID",
"(",
")",
"{",
"String",
"uuid",
"=",
"\"\"",
";",
"String",
"chars",
"=",
"\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\"",
";",
"int",
"rnd",
"=",
"0",
";",
"int",
"r",
";",
"for",
"(",
"int",
"i"... | Create a globally unique identifier for naming instances
@return New globally unique identifier | [
"Create",
"a",
"globally",
"unique",
"identifier",
"for",
"naming",
"instances"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java#L153-L179 |
145,553 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java | Respoke.unregisterPushServices | public void unregisterPushServices(TaskCompletionListener completionListener) {
RespokeClient activeInstance = null;
// If there are already client instances running, check if any of them have already connected
for (RespokeClient eachInstance : instances) {
if (eachInstance.isConnec... | java | public void unregisterPushServices(TaskCompletionListener completionListener) {
RespokeClient activeInstance = null;
// If there are already client instances running, check if any of them have already connected
for (RespokeClient eachInstance : instances) {
if (eachInstance.isConnec... | [
"public",
"void",
"unregisterPushServices",
"(",
"TaskCompletionListener",
"completionListener",
")",
"{",
"RespokeClient",
"activeInstance",
"=",
"null",
";",
"// If there are already client instances running, check if any of them have already connected",
"for",
"(",
"RespokeClient"... | Unregister this device from the Respoke push notification service and stop any future notifications until it is re-registered
@param completionListener A listener to be notified of the success of the asynchronous unregistration operation | [
"Unregister",
"this",
"device",
"from",
"the",
"Respoke",
"push",
"notification",
"service",
"and",
"stop",
"any",
"future",
"notifications",
"until",
"it",
"is",
"re",
"-",
"registered"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java#L201-L218 |
145,554 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java | Respoke.clientConnected | public void clientConnected(RespokeClient client) {
if (null != pushToken) {
registerPushServices();
}
if (!factoryStaticInitialized) {
// Perform a one-time WebRTC global initialization
PeerConnectionFactory.initializeAndroidGlobals(context, true, true, true... | java | public void clientConnected(RespokeClient client) {
if (null != pushToken) {
registerPushServices();
}
if (!factoryStaticInitialized) {
// Perform a one-time WebRTC global initialization
PeerConnectionFactory.initializeAndroidGlobals(context, true, true, true... | [
"public",
"void",
"clientConnected",
"(",
"RespokeClient",
"client",
")",
"{",
"if",
"(",
"null",
"!=",
"pushToken",
")",
"{",
"registerPushServices",
"(",
")",
";",
"}",
"if",
"(",
"!",
"factoryStaticInitialized",
")",
"{",
"// Perform a one-time WebRTC global in... | Notify the shared SDK instance that the specified client has connected. This is for internal use only, and should never be called by your client application.
@param client The client that just connected | [
"Notify",
"the",
"shared",
"SDK",
"instance",
"that",
"the",
"specified",
"client",
"has",
"connected",
".",
"This",
"is",
"for",
"internal",
"use",
"only",
"and",
"should",
"never",
"be",
"called",
"by",
"your",
"client",
"application",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java#L226-L236 |
145,555 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java | Respoke.registerPushServices | private void registerPushServices() {
RespokeClient activeInstance = null;
// If there are already client instances running, check if any of them have already connected
for (RespokeClient eachInstance : instances) {
if (eachInstance.isConnected()) {
// The push servi... | java | private void registerPushServices() {
RespokeClient activeInstance = null;
// If there are already client instances running, check if any of them have already connected
for (RespokeClient eachInstance : instances) {
if (eachInstance.isConnected()) {
// The push servi... | [
"private",
"void",
"registerPushServices",
"(",
")",
"{",
"RespokeClient",
"activeInstance",
"=",
"null",
";",
"// If there are already client instances running, check if any of them have already connected",
"for",
"(",
"RespokeClient",
"eachInstance",
":",
"instances",
")",
"{... | Attempt to register push services for this device | [
"Attempt",
"to",
"register",
"push",
"services",
"for",
"this",
"device"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java#L245-L260 |
145,556 | jenkinsci/lib-jira-api | src/main/java/org/jenkinsci/jira/JIRA.java | JIRA.connect | public static JiraRestClient connect(URL jiraUrl, String username, String password) throws IOException {
return new AsynchronousJiraRestClientFactory()
.createWithBasicHttpAuthentication(URI.create(jiraUrl.toExternalForm()), username, password);
} | java | public static JiraRestClient connect(URL jiraUrl, String username, String password) throws IOException {
return new AsynchronousJiraRestClientFactory()
.createWithBasicHttpAuthentication(URI.create(jiraUrl.toExternalForm()), username, password);
} | [
"public",
"static",
"JiraRestClient",
"connect",
"(",
"URL",
"jiraUrl",
",",
"String",
"username",
",",
"String",
"password",
")",
"throws",
"IOException",
"{",
"return",
"new",
"AsynchronousJiraRestClientFactory",
"(",
")",
".",
"createWithBasicHttpAuthentication",
"... | Connects to the JIRA server. | [
"Connects",
"to",
"the",
"JIRA",
"server",
"."
] | a52ce9138ed16ba162513762dcfd3da5d543cd7f | https://github.com/jenkinsci/lib-jira-api/blob/a52ce9138ed16ba162513762dcfd3da5d543cd7f/src/main/java/org/jenkinsci/jira/JIRA.java#L19-L22 |
145,557 | flow/commons | src/main/java/com/flowpowered/commons/datatable/delta/DeltaMap.java | DeltaMap.get | @Override
public <T extends Serializable> T get(Object key, T defaultValue) {
throw new UnsupportedOperationException("DeltaMap must only be read in bulk.");
} | java | @Override
public <T extends Serializable> T get(Object key, T defaultValue) {
throw new UnsupportedOperationException("DeltaMap must only be read in bulk.");
} | [
"@",
"Override",
"public",
"<",
"T",
"extends",
"Serializable",
">",
"T",
"get",
"(",
"Object",
"key",
",",
"T",
"defaultValue",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"DeltaMap must only be read in bulk.\"",
")",
";",
"}"
] | - If we clear this map, the type changes to REPLACE and all elements are cleared | [
"-",
"If",
"we",
"clear",
"this",
"map",
"the",
"type",
"changes",
"to",
"REPLACE",
"and",
"all",
"elements",
"are",
"cleared"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/datatable/delta/DeltaMap.java#L96-L99 |
145,558 | flow/commons | src/main/java/com/flowpowered/commons/TPSMonitor.java | TPSMonitor.update | public void update() {
final long time = System.currentTimeMillis();
elapsedTime += time - lastUpdateTime;
lastUpdateTime = time;
frameCount++;
if (elapsedTime >= 1000) {
tps = frameCount;
frameCount = 0;
elapsedTime = 0;
}
} | java | public void update() {
final long time = System.currentTimeMillis();
elapsedTime += time - lastUpdateTime;
lastUpdateTime = time;
frameCount++;
if (elapsedTime >= 1000) {
tps = frameCount;
frameCount = 0;
elapsedTime = 0;
}
} | [
"public",
"void",
"update",
"(",
")",
"{",
"final",
"long",
"time",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"elapsedTime",
"+=",
"time",
"-",
"lastUpdateTime",
";",
"lastUpdateTime",
"=",
"time",
";",
"frameCount",
"++",
";",
"if",
"(",
"... | Updates the TPS. | [
"Updates",
"the",
"TPS",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/TPSMonitor.java#L45-L55 |
145,559 | febit/wit | wit-core/src/main/java/org/febit/wit/InternalContext.java | InternalContext.createSubContext | public InternalContext createSubContext(VariantIndexer[] indexers, InternalContext localContext, int varSize) {
Object[][] myParentScopes = this.parentScopes;
//cal the new-context's parent-scopes
Object[][] scopes;
if (myParentScopes == null) {
scopes = new Object[][]{this.v... | java | public InternalContext createSubContext(VariantIndexer[] indexers, InternalContext localContext, int varSize) {
Object[][] myParentScopes = this.parentScopes;
//cal the new-context's parent-scopes
Object[][] scopes;
if (myParentScopes == null) {
scopes = new Object[][]{this.v... | [
"public",
"InternalContext",
"createSubContext",
"(",
"VariantIndexer",
"[",
"]",
"indexers",
",",
"InternalContext",
"localContext",
",",
"int",
"varSize",
")",
"{",
"Object",
"[",
"]",
"[",
"]",
"myParentScopes",
"=",
"this",
".",
"parentScopes",
";",
"//cal t... | Create a sub context.
@param indexers indexers
@param localContext local context
@param varSize var size
@return a new sub context | [
"Create",
"a",
"sub",
"context",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/InternalContext.java#L129-L145 |
145,560 | febit/wit | wit-core/src/main/java/org/febit/wit/InternalContext.java | InternalContext.resetReturnLoop | public Object resetReturnLoop() {
Object result = this.loopType == LoopInfo.RETURN
? this.returned : VOID;
resetLoop();
return result;
} | java | public Object resetReturnLoop() {
Object result = this.loopType == LoopInfo.RETURN
? this.returned : VOID;
resetLoop();
return result;
} | [
"public",
"Object",
"resetReturnLoop",
"(",
")",
"{",
"Object",
"result",
"=",
"this",
".",
"loopType",
"==",
"LoopInfo",
".",
"RETURN",
"?",
"this",
".",
"returned",
":",
"VOID",
";",
"resetLoop",
"(",
")",
";",
"return",
"result",
";",
"}"
] | Unmark loops, at the end of functions.
@return the returned | [
"Unmark",
"loops",
"at",
"the",
"end",
"of",
"functions",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/InternalContext.java#L232-L237 |
145,561 | febit/wit | wit-core/src/main/java/org/febit/wit/InternalContext.java | InternalContext.getBeanProperty | public <T> Object getBeanProperty(final T bean, final Object property) {
if (bean != null) {
@SuppressWarnings("unchecked")
GetResolver<T> resolver = this.getters.unsafeGet(bean.getClass());
if (resolver != null) {
return resolver.get(bean, property);
... | java | public <T> Object getBeanProperty(final T bean, final Object property) {
if (bean != null) {
@SuppressWarnings("unchecked")
GetResolver<T> resolver = this.getters.unsafeGet(bean.getClass());
if (resolver != null) {
return resolver.get(bean, property);
... | [
"public",
"<",
"T",
">",
"Object",
"getBeanProperty",
"(",
"final",
"T",
"bean",
",",
"final",
"Object",
"property",
")",
"{",
"if",
"(",
"bean",
"!=",
"null",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"GetResolver",
"<",
"T",
">",
... | Get a bean's property.
@param <T> bean type
@param bean bean
@param property property
@return value | [
"Get",
"a",
"bean",
"s",
"property",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/InternalContext.java#L255-L264 |
145,562 | febit/wit | wit-core/src/main/java/org/febit/wit/InternalContext.java | InternalContext.setBeanProperty | public <T> void setBeanProperty(final T bean, final Object property, final Object value) {
if (bean != null) {
@SuppressWarnings("unchecked")
SetResolver<T> resolver = this.setters.unsafeGet(bean.getClass());
if (resolver != null) {
resolver.set(bean, property... | java | public <T> void setBeanProperty(final T bean, final Object property, final Object value) {
if (bean != null) {
@SuppressWarnings("unchecked")
SetResolver<T> resolver = this.setters.unsafeGet(bean.getClass());
if (resolver != null) {
resolver.set(bean, property... | [
"public",
"<",
"T",
">",
"void",
"setBeanProperty",
"(",
"final",
"T",
"bean",
",",
"final",
"Object",
"property",
",",
"final",
"Object",
"value",
")",
"{",
"if",
"(",
"bean",
"!=",
"null",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
... | Set a bean's property.
@param bean bean
@param property property
@param value value | [
"Set",
"a",
"bean",
"s",
"property",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/InternalContext.java#L273-L283 |
145,563 | politie/cinch | src/main/java/eu/icolumbo/cinch/CinchJob.java | CinchJob.execute | @Override
public void execute(CinchContext cinchContext, SparkConf sparkConf) {
JavaSparkContext sparkContext = new JavaSparkContext(sparkConf);
execute(sparkContext, cinchContext);
} | java | @Override
public void execute(CinchContext cinchContext, SparkConf sparkConf) {
JavaSparkContext sparkContext = new JavaSparkContext(sparkConf);
execute(sparkContext, cinchContext);
} | [
"@",
"Override",
"public",
"void",
"execute",
"(",
"CinchContext",
"cinchContext",
",",
"SparkConf",
"sparkConf",
")",
"{",
"JavaSparkContext",
"sparkContext",
"=",
"new",
"JavaSparkContext",
"(",
"sparkConf",
")",
";",
"execute",
"(",
"sparkContext",
",",
"cinchC... | Execute cinch job with context. | [
"Execute",
"cinch",
"job",
"with",
"context",
"."
] | 1986b16d397be343a4e1a3f372f14981f70d5de3 | https://github.com/politie/cinch/blob/1986b16d397be343a4e1a3f372f14981f70d5de3/src/main/java/eu/icolumbo/cinch/CinchJob.java#L14-L19 |
145,564 | febit/wit | wit-core/src/main/java/org/febit/wit/util/Props.java | Props.put | private void put(String section, String key, String value, boolean append) {
// ignore lines without =
if (key == null) {
return;
}
if (section == null) {
put(key, value, append);
return;
}
put(key.isEmpty()
? se... | java | private void put(String section, String key, String value, boolean append) {
// ignore lines without =
if (key == null) {
return;
}
if (section == null) {
put(key, value, append);
return;
}
put(key.isEmpty()
? se... | [
"private",
"void",
"put",
"(",
"String",
"section",
",",
"String",
"key",
",",
"String",
"value",
",",
"boolean",
"append",
")",
"{",
"// ignore lines without =",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"return",
";",
"}",
"if",
"(",
"section",
"==",
... | Adds accumulated value to key and current section. | [
"Adds",
"accumulated",
"value",
"to",
"key",
"and",
"current",
"section",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/util/Props.java#L146-L159 |
145,565 | febit/wit | wit-core/src/main/java/org/febit/wit/global/GlobalManager.java | GlobalManager.forEachConst | public void forEachConst(BiConsumer<String, Object> action) {
Objects.requireNonNull(action);
this.constVars.forEach(action);
} | java | public void forEachConst(BiConsumer<String, Object> action) {
Objects.requireNonNull(action);
this.constVars.forEach(action);
} | [
"public",
"void",
"forEachConst",
"(",
"BiConsumer",
"<",
"String",
",",
"Object",
">",
"action",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"action",
")",
";",
"this",
".",
"constVars",
".",
"forEach",
"(",
"action",
")",
";",
"}"
] | Performs the given action for each const vars until all have been processed or the action throws an exception.
@param action
@since 2.5.0 | [
"Performs",
"the",
"given",
"action",
"for",
"each",
"const",
"vars",
"until",
"all",
"have",
"been",
"processed",
"or",
"the",
"action",
"throws",
"an",
"exception",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/global/GlobalManager.java#L50-L53 |
145,566 | febit/wit | wit-core/src/main/java/org/febit/wit/global/GlobalManager.java | GlobalManager.forEachGlobal | public void forEachGlobal(BiConsumer<String, Object> action) {
Objects.requireNonNull(action);
this.globalVars.forEach(action);
} | java | public void forEachGlobal(BiConsumer<String, Object> action) {
Objects.requireNonNull(action);
this.globalVars.forEach(action);
} | [
"public",
"void",
"forEachGlobal",
"(",
"BiConsumer",
"<",
"String",
",",
"Object",
">",
"action",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"action",
")",
";",
"this",
".",
"globalVars",
".",
"forEach",
"(",
"action",
")",
";",
"}"
] | Performs the given action for each global vars until all have been processed or the action throws an exception.
@param action
@since 2.5.0 | [
"Performs",
"the",
"given",
"action",
"for",
"each",
"global",
"vars",
"until",
"all",
"have",
"been",
"processed",
"or",
"the",
"action",
"throws",
"an",
"exception",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/global/GlobalManager.java#L61-L64 |
145,567 | ISOBlue/isoblue-android | libISOBlue-example/src/org/isoblue/ISOBlueDemo/ISOBlueDemo.java | ISOBlueDemo.sendMessage | private void sendMessage(org.isoblue.isobus.Message message) {
// Check that we're actually connected before trying anything
if (mChatService.getState() != BluetoothService.STATE_CONNECTED) {
Toast.makeText(this, R.string.not_connected, Toast.LENGTH_SHORT)
.show();
... | java | private void sendMessage(org.isoblue.isobus.Message message) {
// Check that we're actually connected before trying anything
if (mChatService.getState() != BluetoothService.STATE_CONNECTED) {
Toast.makeText(this, R.string.not_connected, Toast.LENGTH_SHORT)
.show();
... | [
"private",
"void",
"sendMessage",
"(",
"org",
".",
"isoblue",
".",
"isobus",
".",
"Message",
"message",
")",
"{",
"// Check that we're actually connected before trying anything",
"if",
"(",
"mChatService",
".",
"getState",
"(",
")",
"!=",
"BluetoothService",
".",
"S... | Sends a message.
@param message
A string of text to send. | [
"Sends",
"a",
"message",
"."
] | 7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb | https://github.com/ISOBlue/isoblue-android/blob/7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb/libISOBlue-example/src/org/isoblue/ISOBlueDemo/ISOBlueDemo.java#L216-L229 |
145,568 | OSSIndex/java-api | src/main/java/net/ossindex/common/request/OssIndexHttpClient.java | OssIndexHttpClient.setHost | static void setHost(String scheme, String host, int port) {
BASE_URL = scheme + "://" + host + ":" + port + "/" + VERSION + "/";
} | java | static void setHost(String scheme, String host, int port) {
BASE_URL = scheme + "://" + host + ":" + port + "/" + VERSION + "/";
} | [
"static",
"void",
"setHost",
"(",
"String",
"scheme",
",",
"String",
"host",
",",
"int",
"port",
")",
"{",
"BASE_URL",
"=",
"scheme",
"+",
"\"://\"",
"+",
"host",
"+",
"\":\"",
"+",
"port",
"+",
"\"/\"",
"+",
"VERSION",
"+",
"\"/\"",
";",
"}"
] | Override the server location. | [
"Override",
"the",
"server",
"location",
"."
] | 9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f | https://github.com/OSSIndex/java-api/blob/9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f/src/main/java/net/ossindex/common/request/OssIndexHttpClient.java#L92-L94 |
145,569 | OSSIndex/java-api | src/main/java/net/ossindex/common/request/OssIndexHttpClient.java | OssIndexHttpClient.performPostRequest | public String performPostRequest(String requestString, String data) throws IOException {
HttpPost request = new HttpPost(getBaseUrl() + requestString);
String json = null;
CloseableHttpClient httpClient = HttpClients.createDefault();
if (proxies.size() > 0) {
// We only check the first proxy for ... | java | public String performPostRequest(String requestString, String data) throws IOException {
HttpPost request = new HttpPost(getBaseUrl() + requestString);
String json = null;
CloseableHttpClient httpClient = HttpClients.createDefault();
if (proxies.size() > 0) {
// We only check the first proxy for ... | [
"public",
"String",
"performPostRequest",
"(",
"String",
"requestString",
",",
"String",
"data",
")",
"throws",
"IOException",
"{",
"HttpPost",
"request",
"=",
"new",
"HttpPost",
"(",
"getBaseUrl",
"(",
")",
"+",
"requestString",
")",
";",
"String",
"json",
"=... | Perform the request with the given URL and JSON data.
@param requestString Server request relative URL
@param data JSON data for the request
@return JSON results of the request
@throws IOException On query problems | [
"Perform",
"the",
"request",
"with",
"the",
"given",
"URL",
"and",
"JSON",
"data",
"."
] | 9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f | https://github.com/OSSIndex/java-api/blob/9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f/src/main/java/net/ossindex/common/request/OssIndexHttpClient.java#L103-L140 |
145,570 | OSSIndex/java-api | src/main/java/net/ossindex/common/request/OssIndexHttpClient.java | OssIndexHttpClient.performGetRequest | protected String performGetRequest(String requestString) throws IOException {
HttpGet request = new HttpGet(getBaseUrl() + requestString);
if (USER != null && !USER.isEmpty()) {
request.setHeader("Authorization", USER + ":" + TOKEN);
}
String json = null;
CloseableHttpClient httpClient = Http... | java | protected String performGetRequest(String requestString) throws IOException {
HttpGet request = new HttpGet(getBaseUrl() + requestString);
if (USER != null && !USER.isEmpty()) {
request.setHeader("Authorization", USER + ":" + TOKEN);
}
String json = null;
CloseableHttpClient httpClient = Http... | [
"protected",
"String",
"performGetRequest",
"(",
"String",
"requestString",
")",
"throws",
"IOException",
"{",
"HttpGet",
"request",
"=",
"new",
"HttpGet",
"(",
"getBaseUrl",
"(",
")",
"+",
"requestString",
")",
";",
"if",
"(",
"USER",
"!=",
"null",
"&&",
"!... | Perform a get request
@param requestString
@return
@throws IOException | [
"Perform",
"a",
"get",
"request"
] | 9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f | https://github.com/OSSIndex/java-api/blob/9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f/src/main/java/net/ossindex/common/request/OssIndexHttpClient.java#L148-L173 |
145,571 | febit/wit | wit-core/src/main/java/org/febit/wit/loaders/AbstractLoader.java | AbstractLoader.concat | @Override
public String concat(final String parent, final String name) {
return parent != null
? FileNameUtil.concat(FileNameUtil.getPath(parent), name)
: name;
} | java | @Override
public String concat(final String parent, final String name) {
return parent != null
? FileNameUtil.concat(FileNameUtil.getPath(parent), name)
: name;
} | [
"@",
"Override",
"public",
"String",
"concat",
"(",
"final",
"String",
"parent",
",",
"final",
"String",
"name",
")",
"{",
"return",
"parent",
"!=",
"null",
"?",
"FileNameUtil",
".",
"concat",
"(",
"FileNameUtil",
".",
"getPath",
"(",
"parent",
")",
",",
... | get child template name by parent template name and relative name.
<pre>
example:
/path/to/tmpl1.wit , tmpl2.wit => /path/to/tmpl2.wit
/path/to/tmpl1.wit , /tmpl2.wit => /tmpl2.wit
/path/to/tmpl1.wit , ./tmpl2.wit => /path/to/tmpl2.wit
/path/to/tmpl1.wit , ../tmpl2.wit => /path/tmpl2.wit
</pre>
@param par... | [
"get",
"child",
"template",
"name",
"by",
"parent",
"template",
"name",
"and",
"relative",
"name",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/loaders/AbstractLoader.java#L43-L48 |
145,572 | febit/wit | wit-core/src/main/java/org/febit/wit/loaders/AbstractLoader.java | AbstractLoader.getRealPath | protected String getRealPath(final String name) {
return this.root != null
? this.root.concat(name)
: name.substring(1);
} | java | protected String getRealPath(final String name) {
return this.root != null
? this.root.concat(name)
: name.substring(1);
} | [
"protected",
"String",
"getRealPath",
"(",
"final",
"String",
"name",
")",
"{",
"return",
"this",
".",
"root",
"!=",
"null",
"?",
"this",
".",
"root",
".",
"concat",
"(",
"name",
")",
":",
"name",
".",
"substring",
"(",
"1",
")",
";",
"}"
] | get real path from name.
@param name
@return | [
"get",
"real",
"path",
"from",
"name",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/loaders/AbstractLoader.java#L56-L60 |
145,573 | febit/wit | wit-core/src/main/java/org/febit/wit/loaders/AbstractLoader.java | AbstractLoader.normalize | @Override
public String normalize(String name) {
if (name == null) {
return null;
}
if (name.isEmpty()) {
return "/";
}
if (name.charAt(0) != '/' && name.charAt(0) != '\\') {
name = "/".concat(name);
}
name = FileNameUtil.no... | java | @Override
public String normalize(String name) {
if (name == null) {
return null;
}
if (name.isEmpty()) {
return "/";
}
if (name.charAt(0) != '/' && name.charAt(0) != '\\') {
name = "/".concat(name);
}
name = FileNameUtil.no... | [
"@",
"Override",
"public",
"String",
"normalize",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"name",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"\"/\"",
";",
"}",
"if",
"(... | normalize a template's name.
<pre>
example:
path/to/tmpl.wit /path/to/tmpl.wit
/path/to/./tmpl.wit /path/to/tmpl.wit
/path/to/../tmpl.wit /path/tmpl.wit
\path\to\..\tmpl.wit /path/tmpl.wit
\path\to\..\..\tmpl.wit /tmpl.wit
\path\to\..\..\..\tmpl.wit null
</pre>
@param name template's name
@return normalized nam... | [
"normalize",
"a",
"template",
"s",
"name",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/loaders/AbstractLoader.java#L78-L105 |
145,574 | flow/commons | src/main/java/com/flowpowered/commons/store/block/impl/AtomicVariableWidthArray.java | AtomicVariableWidthArray.get | public final int get(int i) {
if (fullWidth) {
return array.get(i);
}
return unPack(array.get(getIndex(i)), getSubIndex(i));
} | java | public final int get(int i) {
if (fullWidth) {
return array.get(i);
}
return unPack(array.get(getIndex(i)), getSubIndex(i));
} | [
"public",
"final",
"int",
"get",
"(",
"int",
"i",
")",
"{",
"if",
"(",
"fullWidth",
")",
"{",
"return",
"array",
".",
"get",
"(",
"i",
")",
";",
"}",
"return",
"unPack",
"(",
"array",
".",
"get",
"(",
"getIndex",
"(",
"i",
")",
")",
",",
"getSu... | Gets an element from the array at a given index
@param i the index
@return the element | [
"Gets",
"an",
"element",
"from",
"the",
"array",
"at",
"a",
"given",
"index"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/store/block/impl/AtomicVariableWidthArray.java#L131-L137 |
145,575 | flow/commons | src/main/java/com/flowpowered/commons/store/block/impl/AtomicVariableWidthArray.java | AtomicVariableWidthArray.getPacked | public int[] getPacked() {
int length = this.array.length();
int[] packed = new int[length];
for (int i = 0; i < length; i++) {
packed[i] = this.array.get(i);
}
return packed;
} | java | public int[] getPacked() {
int length = this.array.length();
int[] packed = new int[length];
for (int i = 0; i < length; i++) {
packed[i] = this.array.get(i);
}
return packed;
} | [
"public",
"int",
"[",
"]",
"getPacked",
"(",
")",
"{",
"int",
"length",
"=",
"this",
".",
"array",
".",
"length",
"(",
")",
";",
"int",
"[",
"]",
"packed",
"=",
"new",
"int",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i"... | Gets a packed version of this array. Tearing may occur if the array is updated during this method call. | [
"Gets",
"a",
"packed",
"version",
"of",
"this",
"array",
".",
"Tearing",
"may",
"occur",
"if",
"the",
"array",
"is",
"updated",
"during",
"this",
"method",
"call",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/store/block/impl/AtomicVariableWidthArray.java#L278-L285 |
145,576 | febit/wit | wit-core/src/main/java/org/febit/wit/util/Petite.java | Petite.get | @SuppressWarnings("unchecked")
public <T> T get(final Class<T> type) {
T bean = (T) components.get(type);
if (bean != null) {
return bean;
}
return (T) get(type.getName());
} | java | @SuppressWarnings("unchecked")
public <T> T get(final Class<T> type) {
T bean = (T) components.get(type);
if (bean != null) {
return bean;
}
return (T) get(type.getName());
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
">",
"T",
"get",
"(",
"final",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"T",
"bean",
"=",
"(",
"T",
")",
"components",
".",
"get",
"(",
"type",
")",
";",
"if",
"(",
"bean",
... | Get component or bean by type.
@param <T>
@param type
@return Component | [
"Get",
"component",
"or",
"bean",
"by",
"type",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/util/Petite.java#L36-L43 |
145,577 | febit/wit | wit-core/src/main/java/org/febit/wit/util/Petite.java | Petite.get | public Object get(final String name) {
Object bean = this.beans.get(name);
if (bean != null) {
return bean;
}
return resolveBeanIfAbsent(name);
} | java | public Object get(final String name) {
Object bean = this.beans.get(name);
if (bean != null) {
return bean;
}
return resolveBeanIfAbsent(name);
} | [
"public",
"Object",
"get",
"(",
"final",
"String",
"name",
")",
"{",
"Object",
"bean",
"=",
"this",
".",
"beans",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"bean",
"!=",
"null",
")",
"{",
"return",
"bean",
";",
"}",
"return",
"resolveBeanIfAbsent... | Get bean by name.
@param name
@return bean | [
"Get",
"bean",
"by",
"name",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/util/Petite.java#L51-L57 |
145,578 | ISOBlue/isoblue-android | libISOBlue-example/src/org/isoblue/ISOBlueDemo/BluetoothService.java | BluetoothService.setState | private synchronized void setState(int state) {
mState = state;
// Give the new state to the Handler so the UI Activity can update
mHandler.obtainMessage(ISOBlueDemo.MESSAGE_STATE_CHANGE, state, -1)
.sendToTarget();
} | java | private synchronized void setState(int state) {
mState = state;
// Give the new state to the Handler so the UI Activity can update
mHandler.obtainMessage(ISOBlueDemo.MESSAGE_STATE_CHANGE, state, -1)
.sendToTarget();
} | [
"private",
"synchronized",
"void",
"setState",
"(",
"int",
"state",
")",
"{",
"mState",
"=",
"state",
";",
"// Give the new state to the Handler so the UI Activity can update",
"mHandler",
".",
"obtainMessage",
"(",
"ISOBlueDemo",
".",
"MESSAGE_STATE_CHANGE",
",",
"state"... | Set the current state of the chat connection
@param state
An integer defining the current connection state | [
"Set",
"the",
"current",
"state",
"of",
"the",
"chat",
"connection"
] | 7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb | https://github.com/ISOBlue/isoblue-android/blob/7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb/libISOBlue-example/src/org/isoblue/ISOBlueDemo/BluetoothService.java#L83-L89 |
145,579 | ISOBlue/isoblue-android | libISOBlue-example/src/org/isoblue/ISOBlueDemo/BluetoothService.java | BluetoothService.connect | public synchronized void connect(BluetoothDevice device, boolean past)
throws IOException, InterruptedException {
// Cancel any thread attempting to make a connection
if (mState == STATE_CONNECTING) {
if (mConnectThread != null) {
mConnectThread.cancel();
... | java | public synchronized void connect(BluetoothDevice device, boolean past)
throws IOException, InterruptedException {
// Cancel any thread attempting to make a connection
if (mState == STATE_CONNECTING) {
if (mConnectThread != null) {
mConnectThread.cancel();
... | [
"public",
"synchronized",
"void",
"connect",
"(",
"BluetoothDevice",
"device",
",",
"boolean",
"past",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"// Cancel any thread attempting to make a connection",
"if",
"(",
"mState",
"==",
"STATE_CONNECTING",
")... | Start the ConnectThread to initiate a connection to a remote device.
@param device
The BluetoothDevice to connect
@param past
@param secure
Socket Security type - Secure (true) , Insecure (false)
@throws InterruptedException
@throws IOException | [
"Start",
"the",
"ConnectThread",
"to",
"initiate",
"a",
"connection",
"to",
"a",
"remote",
"device",
"."
] | 7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb | https://github.com/ISOBlue/isoblue-android/blob/7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb/libISOBlue-example/src/org/isoblue/ISOBlueDemo/BluetoothService.java#L133-L165 |
145,580 | ISOBlue/isoblue-android | libISOBlue-example/src/org/isoblue/ISOBlueDemo/BluetoothService.java | BluetoothService.write | public void write(org.isoblue.isobus.Message out) {
// Create temporary object
ConnectedThread r;
// Synchronize a copy of the ConnectedThread
synchronized (this) {
if (mState != STATE_CONNECTED)
return;
r = mEngConnectedThread;
}
/... | java | public void write(org.isoblue.isobus.Message out) {
// Create temporary object
ConnectedThread r;
// Synchronize a copy of the ConnectedThread
synchronized (this) {
if (mState != STATE_CONNECTED)
return;
r = mEngConnectedThread;
}
/... | [
"public",
"void",
"write",
"(",
"org",
".",
"isoblue",
".",
"isobus",
".",
"Message",
"out",
")",
"{",
"// Create temporary object",
"ConnectedThread",
"r",
";",
"// Synchronize a copy of the ConnectedThread",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"mSt... | Write to the ConnectedThread in an unsynchronized manner
@param out
The bytes to write
@see ConnectedThread#write(byte[]) | [
"Write",
"to",
"the",
"ConnectedThread",
"in",
"an",
"unsynchronized",
"manner"
] | 7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb | https://github.com/ISOBlue/isoblue-android/blob/7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb/libISOBlue-example/src/org/isoblue/ISOBlueDemo/BluetoothService.java#L245-L256 |
145,581 | ISOBlue/isoblue-android | libISOBlue-example/src/org/isoblue/ISOBlueDemo/BluetoothService.java | BluetoothService.connectionFailed | private void connectionFailed() {
// Send a failure message back to the Activity
Message msg = mHandler.obtainMessage(ISOBlueDemo.MESSAGE_TOAST);
Bundle bundle = new Bundle();
bundle.putString(ISOBlueDemo.TOAST, "Unable to connect device");
msg.setData(bundle);
mHandler.s... | java | private void connectionFailed() {
// Send a failure message back to the Activity
Message msg = mHandler.obtainMessage(ISOBlueDemo.MESSAGE_TOAST);
Bundle bundle = new Bundle();
bundle.putString(ISOBlueDemo.TOAST, "Unable to connect device");
msg.setData(bundle);
mHandler.s... | [
"private",
"void",
"connectionFailed",
"(",
")",
"{",
"// Send a failure message back to the Activity",
"Message",
"msg",
"=",
"mHandler",
".",
"obtainMessage",
"(",
"ISOBlueDemo",
".",
"MESSAGE_TOAST",
")",
";",
"Bundle",
"bundle",
"=",
"new",
"Bundle",
"(",
")",
... | Indicate that the connection attempt failed and notify the UI Activity. | [
"Indicate",
"that",
"the",
"connection",
"attempt",
"failed",
"and",
"notify",
"the",
"UI",
"Activity",
"."
] | 7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb | https://github.com/ISOBlue/isoblue-android/blob/7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb/libISOBlue-example/src/org/isoblue/ISOBlueDemo/BluetoothService.java#L261-L271 |
145,582 | ISOBlue/isoblue-android | libISOBlue-example/src/com/authorwjf/AboutDialog.java | AboutDialog.onCreate | @Override
public void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.about);
TextView tv = (TextView) findViewById(R.id.legal_text);
tv.setText(readRawTextFile(R.raw.legal));
tv = (TextView) findViewById(R.id.info_text);
tv.setText(Html.fromHtml(readRawTextFile... | java | @Override
public void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.about);
TextView tv = (TextView) findViewById(R.id.legal_text);
tv.setText(readRawTextFile(R.raw.legal));
tv = (TextView) findViewById(R.id.info_text);
tv.setText(Html.fromHtml(readRawTextFile... | [
"@",
"Override",
"public",
"void",
"onCreate",
"(",
"Bundle",
"savedInstanceState",
")",
"{",
"setContentView",
"(",
"R",
".",
"layout",
".",
"about",
")",
";",
"TextView",
"tv",
"=",
"(",
"TextView",
")",
"findViewById",
"(",
"R",
".",
"id",
".",
"legal... | This is the standard Android on create method that gets called when the
activity initialized. | [
"This",
"is",
"the",
"standard",
"Android",
"on",
"create",
"method",
"that",
"gets",
"called",
"when",
"the",
"activity",
"initialized",
"."
] | 7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb | https://github.com/ISOBlue/isoblue-android/blob/7eab6447f1ffb4d2ad4b7b0b60373d02f9646fcb/libISOBlue-example/src/com/authorwjf/AboutDialog.java#L36-L45 |
145,583 | flow/commons | src/main/java/com/flowpowered/commons/LogicUtil.java | LogicUtil.equalsAny | public static <A, B> boolean equalsAny(A object, B... objects) {
for (B o : objects) {
if (bothNullOrEqual(o, object)) {
return true;
}
}
return false;
} | java | public static <A, B> boolean equalsAny(A object, B... objects) {
for (B o : objects) {
if (bothNullOrEqual(o, object)) {
return true;
}
}
return false;
} | [
"public",
"static",
"<",
"A",
",",
"B",
">",
"boolean",
"equalsAny",
"(",
"A",
"object",
",",
"B",
"...",
"objects",
")",
"{",
"for",
"(",
"B",
"o",
":",
"objects",
")",
"{",
"if",
"(",
"bothNullOrEqual",
"(",
"o",
",",
"object",
")",
")",
"{",
... | Checks if the object equals one of the other objects given
@param object to check
@param objects to use equals against
@return True if one of the objects equal the object | [
"Checks",
"if",
"the",
"object",
"equals",
"one",
"of",
"the",
"other",
"objects",
"given"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/LogicUtil.java#L58-L65 |
145,584 | flow/commons | src/main/java/com/flowpowered/commons/LogicUtil.java | LogicUtil.bothNullOrEqual | public static boolean bothNullOrEqual(Object a, Object b) {
return (a == null || b == null) ? (a == b) : a.equals(b);
} | java | public static boolean bothNullOrEqual(Object a, Object b) {
return (a == null || b == null) ? (a == b) : a.equals(b);
} | [
"public",
"static",
"boolean",
"bothNullOrEqual",
"(",
"Object",
"a",
",",
"Object",
"b",
")",
"{",
"return",
"(",
"a",
"==",
"null",
"||",
"b",
"==",
"null",
")",
"?",
"(",
"a",
"==",
"b",
")",
":",
"a",
".",
"equals",
"(",
"b",
")",
";",
"}"
... | Checks if object a and b are both null or are equal
@return if both null or equal | [
"Checks",
"if",
"object",
"a",
"and",
"b",
"are",
"both",
"null",
"or",
"are",
"equal"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/LogicUtil.java#L72-L74 |
145,585 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/SignSupportServiceImpl.java | SignSupportServiceImpl.verifySadRequest | protected void verifySadRequest(SignatureActivationDataContext sadRequest, ProfileRequestContext<?, ?> context)
throws ExternalAutenticationErrorCodeException {
final AuthnRequest authnRequest = this.getAuthnRequest(context);
if (authnRequest == null) {
log.error("No AuthnRequest available [{}]", t... | java | protected void verifySadRequest(SignatureActivationDataContext sadRequest, ProfileRequestContext<?, ?> context)
throws ExternalAutenticationErrorCodeException {
final AuthnRequest authnRequest = this.getAuthnRequest(context);
if (authnRequest == null) {
log.error("No AuthnRequest available [{}]", t... | [
"protected",
"void",
"verifySadRequest",
"(",
"SignatureActivationDataContext",
"sadRequest",
",",
"ProfileRequestContext",
"<",
"?",
",",
"?",
">",
"context",
")",
"throws",
"ExternalAutenticationErrorCodeException",
"{",
"final",
"AuthnRequest",
"authnRequest",
"=",
"th... | Verifies a received SAD request.
@param sadRequest
the request to verify
@param context
the context
@throws ExternalAutenticationErrorCodeException
for errors | [
"Verifies",
"a",
"received",
"SAD",
"request",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/SignSupportServiceImpl.java#L330-L386 |
145,586 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/SignSupportServiceImpl.java | SignSupportServiceImpl.isSignMessageURI | protected boolean isSignMessageURI(String uri) {
LoaEnum loa = LoaEnum.parse(uri);
return (loa != null && loa.isSignatureMessageUri());
} | java | protected boolean isSignMessageURI(String uri) {
LoaEnum loa = LoaEnum.parse(uri);
return (loa != null && loa.isSignatureMessageUri());
} | [
"protected",
"boolean",
"isSignMessageURI",
"(",
"String",
"uri",
")",
"{",
"LoaEnum",
"loa",
"=",
"LoaEnum",
".",
"parse",
"(",
"uri",
")",
";",
"return",
"(",
"loa",
"!=",
"null",
"&&",
"loa",
".",
"isSignatureMessageUri",
"(",
")",
")",
";",
"}"
] | Predicate that tells if the supplied URI is a URI indicating sign message display.
@param uri
the URI to test
@return {@code true} if the supplied URI is for sign message, and {@code false} otherwise | [
"Predicate",
"that",
"tells",
"if",
"the",
"supplied",
"URI",
"is",
"a",
"URI",
"indicating",
"sign",
"message",
"display",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/SignSupportServiceImpl.java#L511-L514 |
145,587 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.connect | public void connect(String endpointID, String appID, boolean shouldReconnect, final Object initialPresence, Context context, final ConnectCompletionListener completionListener) {
if ((endpointID != null) && (appID != null) && (endpointID.length() > 0) && (appID.length() > 0)) {
connectionInProgress ... | java | public void connect(String endpointID, String appID, boolean shouldReconnect, final Object initialPresence, Context context, final ConnectCompletionListener completionListener) {
if ((endpointID != null) && (appID != null) && (endpointID.length() > 0) && (appID.length() > 0)) {
connectionInProgress ... | [
"public",
"void",
"connect",
"(",
"String",
"endpointID",
",",
"String",
"appID",
",",
"boolean",
"shouldReconnect",
",",
"final",
"Object",
"initialPresence",
",",
"Context",
"context",
",",
"final",
"ConnectCompletionListener",
"completionListener",
")",
"{",
"if"... | Connect to the Respoke infrastructure and authenticate in development mode using the specified endpoint ID and app ID.
Attempt to obtain an authentication token automatically from the Respoke infrastructure.
@param endpointID The endpoint ID to use when connecting
@param appID Your Application I... | [
"Connect",
"to",
"the",
"Respoke",
"infrastructure",
"and",
"authenticate",
"in",
"development",
"mode",
"using",
"the",
"specified",
"endpoint",
"ID",
"and",
"app",
"ID",
".",
"Attempt",
"to",
"obtain",
"an",
"authentication",
"token",
"automatically",
"from",
... | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L297-L332 |
145,588 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.connect | public void connect(String tokenID, final Object initialPresence, Context context, final ConnectCompletionListener completionListener) {
if ((tokenID != null) && (tokenID.length() > 0)) {
connectionInProgress = true;
appContext = context;
APIDoOpen request = new APIDoOpen(co... | java | public void connect(String tokenID, final Object initialPresence, Context context, final ConnectCompletionListener completionListener) {
if ((tokenID != null) && (tokenID.length() > 0)) {
connectionInProgress = true;
appContext = context;
APIDoOpen request = new APIDoOpen(co... | [
"public",
"void",
"connect",
"(",
"String",
"tokenID",
",",
"final",
"Object",
"initialPresence",
",",
"Context",
"context",
",",
"final",
"ConnectCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"(",
"tokenID",
"!=",
"null",
")",
"&&",
"(",
"to... | Connect to the Respoke infrastructure and authenticate with the specified brokered auth token ID.
@param tokenID The token ID to use when connecting
@param initialPresence The optional initial presence value to set for this client
@param context An application context with which to access s... | [
"Connect",
"to",
"the",
"Respoke",
"infrastructure",
"and",
"authenticate",
"with",
"the",
"specified",
"brokered",
"auth",
"token",
"ID",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L342-L371 |
145,589 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.joinGroups | public void joinGroups(final ArrayList<String> groupIDList, final JoinGroupCompletionListener completionListener) {
if (isConnected()) {
if ((groupIDList != null) && (groupIDList.size() > 0)) {
String urlEndpoint = "/v1/groups";
JSONArray groupList = new JSONArray(gr... | java | public void joinGroups(final ArrayList<String> groupIDList, final JoinGroupCompletionListener completionListener) {
if (isConnected()) {
if ((groupIDList != null) && (groupIDList.size() > 0)) {
String urlEndpoint = "/v1/groups";
JSONArray groupList = new JSONArray(gr... | [
"public",
"void",
"joinGroups",
"(",
"final",
"ArrayList",
"<",
"String",
">",
"groupIDList",
",",
"final",
"JoinGroupCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"isConnected",
"(",
")",
")",
"{",
"if",
"(",
"(",
"groupIDList",
"!=",
"null"... | Join a list of Groups and begin keeping track of them.
@param groupIDList An array of IDs of the groups to join
@param completionListener A listener to receive a notification of the success or failure of the asynchronous operation | [
"Join",
"a",
"list",
"of",
"Groups",
"and",
"begin",
"keeping",
"track",
"of",
"them",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L399-L443 |
145,590 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.getConnection | public RespokeConnection getConnection(String connectionID, String endpointID, boolean skipCreate) {
RespokeConnection connection = null;
if (null != connectionID) {
RespokeEndpoint endpoint = getEndpoint(endpointID, skipCreate);
if (null != endpoint) {
for (Res... | java | public RespokeConnection getConnection(String connectionID, String endpointID, boolean skipCreate) {
RespokeConnection connection = null;
if (null != connectionID) {
RespokeEndpoint endpoint = getEndpoint(endpointID, skipCreate);
if (null != endpoint) {
for (Res... | [
"public",
"RespokeConnection",
"getConnection",
"(",
"String",
"connectionID",
",",
"String",
"endpointID",
",",
"boolean",
"skipCreate",
")",
"{",
"RespokeConnection",
"connection",
"=",
"null",
";",
"if",
"(",
"null",
"!=",
"connectionID",
")",
"{",
"RespokeEndp... | Find a Connection by id and return it. In most cases, if we don't find it we will create it. This is useful
in the case of dynamic endpoints where groups are not in use. Set skipCreate=true to return null
if the Connection is not already known.
@param connectionID The ID of the connection to return
@param endpointID ... | [
"Find",
"a",
"Connection",
"by",
"id",
"and",
"return",
"it",
".",
"In",
"most",
"cases",
"if",
"we",
"don",
"t",
"find",
"it",
"we",
"will",
"create",
"it",
".",
"This",
"is",
"useful",
"in",
"the",
"case",
"of",
"dynamic",
"endpoints",
"where",
"gr... | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L456-L478 |
145,591 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.joinConference | public RespokeCall joinConference(RespokeCall.Listener callListener, Context context, String conferenceID) {
RespokeCall call = null;
if ((null != signalingChannel) && (signalingChannel.connected)) {
call = new RespokeCall(signalingChannel, conferenceID, "conference");
call.setL... | java | public RespokeCall joinConference(RespokeCall.Listener callListener, Context context, String conferenceID) {
RespokeCall call = null;
if ((null != signalingChannel) && (signalingChannel.connected)) {
call = new RespokeCall(signalingChannel, conferenceID, "conference");
call.setL... | [
"public",
"RespokeCall",
"joinConference",
"(",
"RespokeCall",
".",
"Listener",
"callListener",
",",
"Context",
"context",
",",
"String",
"conferenceID",
")",
"{",
"RespokeCall",
"call",
"=",
"null",
";",
"if",
"(",
"(",
"null",
"!=",
"signalingChannel",
")",
... | Initiate a call to a conference.
@param callListener A listener to receive notifications about the new call
@param context An application context with which to access system resources
@param conferenceID The ID of the conference to call
@return A reference to the new RespokeCall object representing this call | [
"Initiate",
"a",
"call",
"to",
"a",
"conference",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L489-L500 |
145,592 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.getEndpoint | public RespokeEndpoint getEndpoint(String endpointIDToFind, boolean skipCreate) {
RespokeEndpoint endpoint = null;
if (null != endpointIDToFind) {
for (RespokeEndpoint eachEndpoint : knownEndpoints) {
if (eachEndpoint.getEndpointID().equals(endpointIDToFind)) {
... | java | public RespokeEndpoint getEndpoint(String endpointIDToFind, boolean skipCreate) {
RespokeEndpoint endpoint = null;
if (null != endpointIDToFind) {
for (RespokeEndpoint eachEndpoint : knownEndpoints) {
if (eachEndpoint.getEndpointID().equals(endpointIDToFind)) {
... | [
"public",
"RespokeEndpoint",
"getEndpoint",
"(",
"String",
"endpointIDToFind",
",",
"boolean",
"skipCreate",
")",
"{",
"RespokeEndpoint",
"endpoint",
"=",
"null",
";",
"if",
"(",
"null",
"!=",
"endpointIDToFind",
")",
"{",
"for",
"(",
"RespokeEndpoint",
"eachEndpo... | Find an endpoint by id and return it. In most cases, if we don't find it we will create it. This is useful
in the case of dynamic endpoints where groups are not in use. Set skipCreate=true to return null
if the Endpoint is not already known.
@param endpointIDToFind The ID of the endpoint to return
@param skipCreate ... | [
"Find",
"an",
"endpoint",
"by",
"id",
"and",
"return",
"it",
".",
"In",
"most",
"cases",
"if",
"we",
"don",
"t",
"find",
"it",
"we",
"will",
"create",
"it",
".",
"This",
"is",
"useful",
"in",
"the",
"case",
"of",
"dynamic",
"endpoints",
"where",
"gro... | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L512-L534 |
145,593 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.getGroup | public RespokeGroup getGroup(String groupIDToFind) {
RespokeGroup group = null;
if (null != groupIDToFind) {
group = groups.get(groupIDToFind);
}
return group;
} | java | public RespokeGroup getGroup(String groupIDToFind) {
RespokeGroup group = null;
if (null != groupIDToFind) {
group = groups.get(groupIDToFind);
}
return group;
} | [
"public",
"RespokeGroup",
"getGroup",
"(",
"String",
"groupIDToFind",
")",
"{",
"RespokeGroup",
"group",
"=",
"null",
";",
"if",
"(",
"null",
"!=",
"groupIDToFind",
")",
"{",
"group",
"=",
"groups",
".",
"get",
"(",
"groupIDToFind",
")",
";",
"}",
"return"... | Returns the group with the specified ID
@param groupIDToFind The ID of the group to find
@return The group with specified ID, or null if it was not found | [
"Returns",
"the",
"group",
"with",
"the",
"specified",
"ID"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L543-L551 |
145,594 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.getGroupHistories | public void getGroupHistories(final List<String> groupIds, final Integer maxMessages,
final GroupHistoriesCompletionListener completionListener) {
if (!isConnected()) {
getGroupHistoriesError(completionListener, "Can't complete request when not connected, " +
... | java | public void getGroupHistories(final List<String> groupIds, final Integer maxMessages,
final GroupHistoriesCompletionListener completionListener) {
if (!isConnected()) {
getGroupHistoriesError(completionListener, "Can't complete request when not connected, " +
... | [
"public",
"void",
"getGroupHistories",
"(",
"final",
"List",
"<",
"String",
">",
"groupIds",
",",
"final",
"Integer",
"maxMessages",
",",
"final",
"GroupHistoriesCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"!",
"isConnected",
"(",
")",
")",
"... | Retrieve the history of messages that have been persisted for 1 or more groups. Only those
messages that have been marked to be persisted when sent will show up in the history.
Note: This operation returns history for a set of specified groups. If you simply want the
set of conversations that the connected endpoint ha... | [
"Retrieve",
"the",
"history",
"of",
"messages",
"that",
"have",
"been",
"persisted",
"for",
"1",
"or",
"more",
"groups",
".",
"Only",
"those",
"messages",
"that",
"have",
"been",
"marked",
"to",
"be",
"persisted",
"when",
"sent",
"will",
"show",
"up",
"in"... | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L579-L659 |
145,595 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.setConversationsRead | public void setConversationsRead(final List<RespokeConversationReadStatus> updates, final Respoke.TaskCompletionListener completionListener) {
if (!isConnected()) {
Respoke.postTaskError(completionListener, "Can't complete request when not connected, " +
"Please reconnect!");
... | java | public void setConversationsRead(final List<RespokeConversationReadStatus> updates, final Respoke.TaskCompletionListener completionListener) {
if (!isConnected()) {
Respoke.postTaskError(completionListener, "Can't complete request when not connected, " +
"Please reconnect!");
... | [
"public",
"void",
"setConversationsRead",
"(",
"final",
"List",
"<",
"RespokeConversationReadStatus",
">",
"updates",
",",
"final",
"Respoke",
".",
"TaskCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"!",
"isConnected",
"(",
")",
")",
"{",
"Respok... | Mark messages in a conversation as having been read, up to the given timestamp
@param updates An array of records, each of which indicates a groupId and timestamp of the
the most recent message the client has "read".
@param completionListener The callback called when this async operation has completed. | [
"Mark",
"messages",
"in",
"a",
"conversation",
"as",
"having",
"been",
"read",
"up",
"to",
"the",
"given",
"timestamp"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L735-L787 |
145,596 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.getGroupHistory | public void getGroupHistory(final String groupId, final Integer maxMessages,
final GroupHistoryCompletionListener completionListener) {
getGroupHistory(groupId, maxMessages, null, completionListener);
} | java | public void getGroupHistory(final String groupId, final Integer maxMessages,
final GroupHistoryCompletionListener completionListener) {
getGroupHistory(groupId, maxMessages, null, completionListener);
} | [
"public",
"void",
"getGroupHistory",
"(",
"final",
"String",
"groupId",
",",
"final",
"Integer",
"maxMessages",
",",
"final",
"GroupHistoryCompletionListener",
"completionListener",
")",
"{",
"getGroupHistory",
"(",
"groupId",
",",
"maxMessages",
",",
"null",
",",
"... | Retrieve the history of messages that have been persisted for a specific group. Only those
messages that have been marked to be persisted when sent will show up in the history. To
retrieve messages further back in the history than right now, use the other method signature
that allows `before` to be specified.
@param g... | [
"Retrieve",
"the",
"history",
"of",
"messages",
"that",
"have",
"been",
"persisted",
"for",
"a",
"specific",
"group",
".",
"Only",
"those",
"messages",
"that",
"have",
"been",
"marked",
"to",
"be",
"persisted",
"when",
"sent",
"will",
"show",
"up",
"in",
"... | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L815-L818 |
145,597 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.getGroupHistory | public void getGroupHistory(final String groupId, final Integer maxMessages, final Date before,
final GroupHistoryCompletionListener completionListener) {
if (!isConnected()) {
getGroupHistoryError(completionListener, "Can't complete request when not connected, " +
... | java | public void getGroupHistory(final String groupId, final Integer maxMessages, final Date before,
final GroupHistoryCompletionListener completionListener) {
if (!isConnected()) {
getGroupHistoryError(completionListener, "Can't complete request when not connected, " +
... | [
"public",
"void",
"getGroupHistory",
"(",
"final",
"String",
"groupId",
",",
"final",
"Integer",
"maxMessages",
",",
"final",
"Date",
"before",
",",
"final",
"GroupHistoryCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"!",
"isConnected",
"(",
")",... | Retrieve the history of messages that have been persisted for a specific group. Only those
messages that have been marked to be persisted when sent will show up in the history.
@param groupId The groups to pull history for
@param maxMessages The maximum number of messages per group to pull. Must be >= 1
@param befo... | [
"Retrieve",
"the",
"history",
"of",
"messages",
"that",
"have",
"been",
"persisted",
"for",
"a",
"specific",
"group",
".",
"Only",
"those",
"messages",
"that",
"have",
"been",
"marked",
"to",
"be",
"persisted",
"when",
"sent",
"will",
"show",
"up",
"in",
"... | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L829-L893 |
145,598 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.setPresence | public void setPresence(Object newPresence, final Respoke.TaskCompletionListener completionListener) {
if (isConnected()) {
Object presenceToSet = newPresence;
if (null == presenceToSet) {
presenceToSet = "available";
}
JSONObject typeData = new ... | java | public void setPresence(Object newPresence, final Respoke.TaskCompletionListener completionListener) {
if (isConnected()) {
Object presenceToSet = newPresence;
if (null == presenceToSet) {
presenceToSet = "available";
}
JSONObject typeData = new ... | [
"public",
"void",
"setPresence",
"(",
"Object",
"newPresence",
",",
"final",
"Respoke",
".",
"TaskCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"isConnected",
"(",
")",
")",
"{",
"Object",
"presenceToSet",
"=",
"newPresence",
";",
"if",
"(",
... | Set the presence on the client session
@param newPresence The new presence to use
@param completionListener A listener to receive the notification on the success or failure of the asynchronous operation | [
"Set",
"the",
"presence",
"on",
"the",
"client",
"session"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L910-L946 |
145,599 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.registerPushServicesWithToken | public void registerPushServicesWithToken(final String token) {
String httpURI;
String httpMethod;
JSONObject data = new JSONObject();
try {
data.put("token", token);
data.put("service", "google");
SharedPreferences prefs = appContext.getSharedPrefer... | java | public void registerPushServicesWithToken(final String token) {
String httpURI;
String httpMethod;
JSONObject data = new JSONObject();
try {
data.put("token", token);
data.put("service", "google");
SharedPreferences prefs = appContext.getSharedPrefer... | [
"public",
"void",
"registerPushServicesWithToken",
"(",
"final",
"String",
"token",
")",
"{",
"String",
"httpURI",
";",
"String",
"httpMethod",
";",
"JSONObject",
"data",
"=",
"new",
"JSONObject",
"(",
")",
";",
"try",
"{",
"data",
".",
"put",
"(",
"\"token\... | Register the client to receive push notifications when the socket is not active
@param token The GCMS token to register | [
"Register",
"the",
"client",
"to",
"receive",
"push",
"notifications",
"when",
"the",
"socket",
"is",
"not",
"active"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L962-L990 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.