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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
151,600 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/Navis.java | Navis.deltaLongitude | public static final double deltaLongitude(double latitude, double distance, double bearing)
{
double departure = departure(latitude);
double sin = Math.sin(Math.toRadians(bearing));
return (sin*distance)/(60*departure);
} | java | public static final double deltaLongitude(double latitude, double distance, double bearing)
{
double departure = departure(latitude);
double sin = Math.sin(Math.toRadians(bearing));
return (sin*distance)/(60*departure);
} | [
"public",
"static",
"final",
"double",
"deltaLongitude",
"(",
"double",
"latitude",
",",
"double",
"distance",
",",
"double",
"bearing",
")",
"{",
"double",
"departure",
"=",
"departure",
"(",
"latitude",
")",
";",
"double",
"sin",
"=",
"Math",
".",
"sin",
... | Return longitude change after moving distance at bearing
@param latitude
@param distance
@param bearing
@return | [
"Return",
"longitude",
"change",
"after",
"moving",
"distance",
"at",
"bearing"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/Navis.java#L55-L60 |
151,601 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/Navis.java | Navis.departure | public static final double departure(WayPoint loc1, WayPoint loc2)
{
return departure(loc2.getLatitude(), loc1.getLatitude());
} | java | public static final double departure(WayPoint loc1, WayPoint loc2)
{
return departure(loc2.getLatitude(), loc1.getLatitude());
} | [
"public",
"static",
"final",
"double",
"departure",
"(",
"WayPoint",
"loc1",
",",
"WayPoint",
"loc2",
")",
"{",
"return",
"departure",
"(",
"loc2",
".",
"getLatitude",
"(",
")",
",",
"loc1",
".",
"getLatitude",
"(",
")",
")",
";",
"}"
] | Return average departure of two waypoints
@param loc1
@param loc2
@return | [
"Return",
"average",
"departure",
"of",
"two",
"waypoints"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/Navis.java#L67-L70 |
151,602 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/Navis.java | Navis.departure | public static final double departure(double latitude1, double latitude2)
{
checkLatitude(latitude1);
checkLatitude(latitude2);
return departure((latitude1+latitude2)/2);
} | java | public static final double departure(double latitude1, double latitude2)
{
checkLatitude(latitude1);
checkLatitude(latitude2);
return departure((latitude1+latitude2)/2);
} | [
"public",
"static",
"final",
"double",
"departure",
"(",
"double",
"latitude1",
",",
"double",
"latitude2",
")",
"{",
"checkLatitude",
"(",
"latitude1",
")",
";",
"checkLatitude",
"(",
"latitude2",
")",
";",
"return",
"departure",
"(",
"(",
"latitude1",
"+",
... | Returns departure of average latitude
@param latitude1
@param latitude2
@return | [
"Returns",
"departure",
"of",
"average",
"latitude"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/Navis.java#L77-L82 |
151,603 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/Navis.java | Navis.bearing | public static final double bearing(WayPoint wp1, WayPoint wp2)
{
double lat1 = wp1.getLatitude();
double lat2 = wp2.getLatitude();
double lon1 = wp1.getLongitude();
double lon2 = wp2.getLongitude();
return bearing(lat1, lon1, lat2, lon2);
} | java | public static final double bearing(WayPoint wp1, WayPoint wp2)
{
double lat1 = wp1.getLatitude();
double lat2 = wp2.getLatitude();
double lon1 = wp1.getLongitude();
double lon2 = wp2.getLongitude();
return bearing(lat1, lon1, lat2, lon2);
} | [
"public",
"static",
"final",
"double",
"bearing",
"(",
"WayPoint",
"wp1",
",",
"WayPoint",
"wp2",
")",
"{",
"double",
"lat1",
"=",
"wp1",
".",
"getLatitude",
"(",
")",
";",
"double",
"lat2",
"=",
"wp2",
".",
"getLatitude",
"(",
")",
";",
"double",
"lon... | Return bearing from wp1 to wp2 in degrees
@param wp1
@param wp2
@return Degrees | [
"Return",
"bearing",
"from",
"wp1",
"to",
"wp2",
"in",
"degrees"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/Navis.java#L103-L110 |
151,604 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/Navis.java | Navis.speed | public static final double speed(WayPoint wp1, WayPoint wp2)
{
double lat1 = wp1.getLatitude();
double lat2 = wp2.getLatitude();
double lon1 = wp1.getLongitude();
double lon2 = wp2.getLongitude();
long time1 = wp1.getTime();
long time2 = wp2.getTime();
... | java | public static final double speed(WayPoint wp1, WayPoint wp2)
{
double lat1 = wp1.getLatitude();
double lat2 = wp2.getLatitude();
double lon1 = wp1.getLongitude();
double lon2 = wp2.getLongitude();
long time1 = wp1.getTime();
long time2 = wp2.getTime();
... | [
"public",
"static",
"final",
"double",
"speed",
"(",
"WayPoint",
"wp1",
",",
"WayPoint",
"wp2",
")",
"{",
"double",
"lat1",
"=",
"wp1",
".",
"getLatitude",
"(",
")",
";",
"double",
"lat2",
"=",
"wp2",
".",
"getLatitude",
"(",
")",
";",
"double",
"lon1"... | Returns the speed needed to move from wp1 to wp2
@param wp1
@param wp2
@return Kts | [
"Returns",
"the",
"speed",
"needed",
"to",
"move",
"from",
"wp1",
"to",
"wp2"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/Navis.java#L194-L203 |
151,605 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/Navis.java | Navis.addLongitude | public static final double addLongitude(double longitude, double delta)
{
double gha = longitudeToGHA(longitude);
gha -= delta;
return ghaToLongitude(normalizeAngle(gha));
} | java | public static final double addLongitude(double longitude, double delta)
{
double gha = longitudeToGHA(longitude);
gha -= delta;
return ghaToLongitude(normalizeAngle(gha));
} | [
"public",
"static",
"final",
"double",
"addLongitude",
"(",
"double",
"longitude",
",",
"double",
"delta",
")",
"{",
"double",
"gha",
"=",
"longitudeToGHA",
"(",
"longitude",
")",
";",
"gha",
"-=",
"delta",
";",
"return",
"ghaToLongitude",
"(",
"normalizeAngle... | Adds delta to longitude. Positive delta is to east
@param longitude
@param delta
@return | [
"Adds",
"delta",
"to",
"longitude",
".",
"Positive",
"delta",
"is",
"to",
"east"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/Navis.java#L232-L237 |
151,606 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Version.java | Version.setVersion | public void setVersion(String value) {
clear();
if (value == null || value.length() == 0) {
return;
}
String pcs[] = value.split("\\.", 4);
int len = Math.min(pcs.length, 4);
for (int i = 0; i < len; i++) {
ver[i] = Long.... | java | public void setVersion(String value) {
clear();
if (value == null || value.length() == 0) {
return;
}
String pcs[] = value.split("\\.", 4);
int len = Math.min(pcs.length, 4);
for (int i = 0; i < len; i++) {
ver[i] = Long.... | [
"public",
"void",
"setVersion",
"(",
"String",
"value",
")",
"{",
"clear",
"(",
")",
";",
"if",
"(",
"value",
"==",
"null",
"||",
"value",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
";",
"}",
"String",
"pcs",
"[",
"]",
"=",
"value",
... | Set version components from input value.
@param value Input value. | [
"Set",
"version",
"components",
"from",
"input",
"value",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Version.java#L59-L72 |
151,607 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Version.java | Version.appendVersion | private void appendVersion(StringBuilder sb, long ver) {
if (sb.length() > 0) {
sb.append(".");
}
sb.append(ver);
} | java | private void appendVersion(StringBuilder sb, long ver) {
if (sb.length() > 0) {
sb.append(".");
}
sb.append(ver);
} | [
"private",
"void",
"appendVersion",
"(",
"StringBuilder",
"sb",
",",
"long",
"ver",
")",
"{",
"if",
"(",
"sb",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"sb",
".",
"append",
"(",
"\".\"",
")",
";",
"}",
"sb",
".",
"append",
"(",
"ver",
")",
... | Append version component.
@param sb String builder.
@param ver Version component value. | [
"Append",
"version",
"component",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Version.java#L109-L115 |
151,608 | the-fascinator/plugin-authentication-internal | src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java | InternalAuthentication.init | @Override
public void init(String jsonString) throws AuthenticationException {
try {
setConfig(new JsonSimpleConfig(jsonString));
} catch (UnsupportedEncodingException e) {
throw new AuthenticationException(e);
} catch (IOException e) {
throw new Authentic... | java | @Override
public void init(String jsonString) throws AuthenticationException {
try {
setConfig(new JsonSimpleConfig(jsonString));
} catch (UnsupportedEncodingException e) {
throw new AuthenticationException(e);
} catch (IOException e) {
throw new Authentic... | [
"@",
"Override",
"public",
"void",
"init",
"(",
"String",
"jsonString",
")",
"throws",
"AuthenticationException",
"{",
"try",
"{",
"setConfig",
"(",
"new",
"JsonSimpleConfig",
"(",
"jsonString",
")",
")",
";",
"}",
"catch",
"(",
"UnsupportedEncodingException",
"... | Initialisation of Internal Authentication plugin
@throws AuthenticationException if fails to initialise | [
"Initialisation",
"of",
"Internal",
"Authentication",
"plugin"
] | a2b9a0eda9b43bf20583036a406c83c938be3042 | https://github.com/the-fascinator/plugin-authentication-internal/blob/a2b9a0eda9b43bf20583036a406c83c938be3042/src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java#L139-L148 |
151,609 | the-fascinator/plugin-authentication-internal | src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java | InternalAuthentication.setConfig | private void setConfig(JsonSimpleConfig config) throws IOException {
// Get the basics
user_object = new InternalUser();
file_path = config.getString(null, "authentication", "internal",
"path");
loadUsers();
} | java | private void setConfig(JsonSimpleConfig config) throws IOException {
// Get the basics
user_object = new InternalUser();
file_path = config.getString(null, "authentication", "internal",
"path");
loadUsers();
} | [
"private",
"void",
"setConfig",
"(",
"JsonSimpleConfig",
"config",
")",
"throws",
"IOException",
"{",
"// Get the basics",
"user_object",
"=",
"new",
"InternalUser",
"(",
")",
";",
"file_path",
"=",
"config",
".",
"getString",
"(",
"null",
",",
"\"authentication\"... | Set default configuration
@param config JSON configuration
@throws IOException if fails to initialise | [
"Set",
"default",
"configuration"
] | a2b9a0eda9b43bf20583036a406c83c938be3042 | https://github.com/the-fascinator/plugin-authentication-internal/blob/a2b9a0eda9b43bf20583036a406c83c938be3042/src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java#L165-L171 |
151,610 | the-fascinator/plugin-authentication-internal | src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java | InternalAuthentication.loadUsers | private void loadUsers() throws IOException {
file_store = new Properties();
// Load our userbase from disk
try {
File user_file = new File(file_path);
if (!user_file.exists()) {
user_file.getParentFile().mkdirs();
OutputStream out = new F... | java | private void loadUsers() throws IOException {
file_store = new Properties();
// Load our userbase from disk
try {
File user_file = new File(file_path);
if (!user_file.exists()) {
user_file.getParentFile().mkdirs();
OutputStream out = new F... | [
"private",
"void",
"loadUsers",
"(",
")",
"throws",
"IOException",
"{",
"file_store",
"=",
"new",
"Properties",
"(",
")",
";",
"// Load our userbase from disk",
"try",
"{",
"File",
"user_file",
"=",
"new",
"File",
"(",
"file_path",
")",
";",
"if",
"(",
"!",
... | Load users from the file
@throws IOException if fail to load from file | [
"Load",
"users",
"from",
"the",
"file"
] | a2b9a0eda9b43bf20583036a406c83c938be3042 | https://github.com/the-fascinator/plugin-authentication-internal/blob/a2b9a0eda9b43bf20583036a406c83c938be3042/src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java#L178-L197 |
151,611 | the-fascinator/plugin-authentication-internal | src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java | InternalAuthentication.saveUsers | private void saveUsers() throws IOException {
if (file_store != null) {
try {
file_store.store(new FileOutputStream(file_path), "");
} catch (Exception e) {
throw new IOException(e);
}
}
} | java | private void saveUsers() throws IOException {
if (file_store != null) {
try {
file_store.store(new FileOutputStream(file_path), "");
} catch (Exception e) {
throw new IOException(e);
}
}
} | [
"private",
"void",
"saveUsers",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"file_store",
"!=",
"null",
")",
"{",
"try",
"{",
"file_store",
".",
"store",
"(",
"new",
"FileOutputStream",
"(",
"file_path",
")",
",",
"\"\"",
")",
";",
"}",
"catch",
... | Save user lists to the file on the disk
@throws IOException if fail to save to file | [
"Save",
"user",
"lists",
"to",
"the",
"file",
"on",
"the",
"disk"
] | a2b9a0eda9b43bf20583036a406c83c938be3042 | https://github.com/the-fascinator/plugin-authentication-internal/blob/a2b9a0eda9b43bf20583036a406c83c938be3042/src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java#L204-L212 |
151,612 | the-fascinator/plugin-authentication-internal | src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java | InternalAuthentication.encryptPassword | private String encryptPassword(String password)
throws AuthenticationException {
byte[] passwordBytes = password.getBytes();
try {
MessageDigest algorithm = MessageDigest.getInstance("MD5");
algorithm.reset();
algorithm.update(passwordBytes);
... | java | private String encryptPassword(String password)
throws AuthenticationException {
byte[] passwordBytes = password.getBytes();
try {
MessageDigest algorithm = MessageDigest.getInstance("MD5");
algorithm.reset();
algorithm.update(passwordBytes);
... | [
"private",
"String",
"encryptPassword",
"(",
"String",
"password",
")",
"throws",
"AuthenticationException",
"{",
"byte",
"[",
"]",
"passwordBytes",
"=",
"password",
".",
"getBytes",
"(",
")",
";",
"try",
"{",
"MessageDigest",
"algorithm",
"=",
"MessageDigest",
... | Password encryption method
@param password Password to be encrypted
@return encrypted password
@throws AuthenticationException if fail to encrypt | [
"Password",
"encryption",
"method"
] | a2b9a0eda9b43bf20583036a406c83c938be3042 | https://github.com/the-fascinator/plugin-authentication-internal/blob/a2b9a0eda9b43bf20583036a406c83c938be3042/src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java#L221-L242 |
151,613 | the-fascinator/plugin-authentication-internal | src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java | InternalAuthentication.createUser | @Override
public User createUser(String username, String password)
throws AuthenticationException {
String user = file_store.getProperty(username);
if (user != null) {
throw new AuthenticationException("User '" + username
+ "' already exists.");
}
... | java | @Override
public User createUser(String username, String password)
throws AuthenticationException {
String user = file_store.getProperty(username);
if (user != null) {
throw new AuthenticationException("User '" + username
+ "' already exists.");
}
... | [
"@",
"Override",
"public",
"User",
"createUser",
"(",
"String",
"username",
",",
"String",
"password",
")",
"throws",
"AuthenticationException",
"{",
"String",
"user",
"=",
"file_store",
".",
"getProperty",
"(",
"username",
")",
";",
"if",
"(",
"user",
"!=",
... | Create a user.
@param username The username of the new user.
@param password The password of the new user.
@return A user object for the newly created in user.
@throws AuthenticationException if there was an error creating the user. | [
"Create",
"a",
"user",
"."
] | a2b9a0eda9b43bf20583036a406c83c938be3042 | https://github.com/the-fascinator/plugin-authentication-internal/blob/a2b9a0eda9b43bf20583036a406c83c938be3042/src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java#L319-L337 |
151,614 | the-fascinator/plugin-authentication-internal | src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java | InternalAuthentication.changePassword | @Override
public void changePassword(String username, String password)
throws AuthenticationException {
String user = file_store.getProperty(username);
if (user == null) {
throw new AuthenticationException("User '" + username
+ "' not found.");
}
... | java | @Override
public void changePassword(String username, String password)
throws AuthenticationException {
String user = file_store.getProperty(username);
if (user == null) {
throw new AuthenticationException("User '" + username
+ "' not found.");
}
... | [
"@",
"Override",
"public",
"void",
"changePassword",
"(",
"String",
"username",
",",
"String",
"password",
")",
"throws",
"AuthenticationException",
"{",
"String",
"user",
"=",
"file_store",
".",
"getProperty",
"(",
"username",
")",
";",
"if",
"(",
"user",
"==... | Change a user's password.
@param username The user changing their password.
@param password The new password for the user.
@throws AuthenticationException if there was an error changing the
password. | [
"Change",
"a",
"user",
"s",
"password",
"."
] | a2b9a0eda9b43bf20583036a406c83c938be3042 | https://github.com/the-fascinator/plugin-authentication-internal/blob/a2b9a0eda9b43bf20583036a406c83c938be3042/src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java#L368-L384 |
151,615 | the-fascinator/plugin-authentication-internal | src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java | InternalAuthentication.getUser | @Override
public User getUser(String username) throws AuthenticationException {
// Find our user
String user = file_store.getProperty(username);
if (user == null) {
throw new AuthenticationException("User '" + username
+ "' not found.");
}
// P... | java | @Override
public User getUser(String username) throws AuthenticationException {
// Find our user
String user = file_store.getProperty(username);
if (user == null) {
throw new AuthenticationException("User '" + username
+ "' not found.");
}
// P... | [
"@",
"Override",
"public",
"User",
"getUser",
"(",
"String",
"username",
")",
"throws",
"AuthenticationException",
"{",
"// Find our user",
"String",
"user",
"=",
"file_store",
".",
"getProperty",
"(",
"username",
")",
";",
"if",
"(",
"user",
"==",
"null",
")"... | Returns a User object if the implementing class supports user queries
without authentication.
@param username The username of the user required.
@return An user object of the requested user.
@throws AuthenticationException if there was an error retrieving the
object. | [
"Returns",
"a",
"User",
"object",
"if",
"the",
"implementing",
"class",
"supports",
"user",
"queries",
"without",
"authentication",
"."
] | a2b9a0eda9b43bf20583036a406c83c938be3042 | https://github.com/the-fascinator/plugin-authentication-internal/blob/a2b9a0eda9b43bf20583036a406c83c938be3042/src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java#L427-L440 |
151,616 | the-fascinator/plugin-authentication-internal | src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java | InternalAuthentication.searchUsers | @Override
public List<User> searchUsers(String search) throws AuthenticationException {
// Complete list of users
String[] users = file_store.keySet().toArray(
new String[file_store.size()]);
List<User> found = new ArrayList<User>();
// Look through the list for anyo... | java | @Override
public List<User> searchUsers(String search) throws AuthenticationException {
// Complete list of users
String[] users = file_store.keySet().toArray(
new String[file_store.size()]);
List<User> found = new ArrayList<User>();
// Look through the list for anyo... | [
"@",
"Override",
"public",
"List",
"<",
"User",
">",
"searchUsers",
"(",
"String",
"search",
")",
"throws",
"AuthenticationException",
"{",
"// Complete list of users",
"String",
"[",
"]",
"users",
"=",
"file_store",
".",
"keySet",
"(",
")",
".",
"toArray",
"(... | Returns a list of users matching the search.
@param search The search string to execute.
@return A list of usernames (String) that match the search.
@throws AuthenticationException if there was an error searching. | [
"Returns",
"a",
"list",
"of",
"users",
"matching",
"the",
"search",
"."
] | a2b9a0eda9b43bf20583036a406c83c938be3042 | https://github.com/the-fascinator/plugin-authentication-internal/blob/a2b9a0eda9b43bf20583036a406c83c938be3042/src/main/java/com/googlecode/fascinator/authentication/internal/InternalAuthentication.java#L449-L465 |
151,617 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/util/BaseApplication.java | BaseApplication.getServerProperties | public Map<String,Object> getServerProperties()
{
Map<String,Object> properties = super.getServerProperties();
return BaseDatabase.addDBProperties(properties, this, null);
} | java | public Map<String,Object> getServerProperties()
{
Map<String,Object> properties = super.getServerProperties();
return BaseDatabase.addDBProperties(properties, this, null);
} | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"getServerProperties",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
"=",
"super",
".",
"getServerProperties",
"(",
")",
";",
"return",
"BaseDatabase",
".",
"addDBProperties",
"(",
... | Get the base properties to pass to the server.
@return The base server properties | [
"Get",
"the",
"base",
"properties",
"to",
"pass",
"to",
"the",
"server",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/BaseApplication.java#L108-L112 |
151,618 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/util/BaseApplication.java | BaseApplication.getResourceClassName | public String getResourceClassName(String strBasePackage, String resourceName)
{
if (resourceName == null)
resourceName = strBasePackage.substring(strBasePackage.lastIndexOf('.') + 1);
strBasePackage = strBasePackage.substring(0, strBasePackage.lastIndexOf('.') + 1);
resourceName = Uti... | java | public String getResourceClassName(String strBasePackage, String resourceName)
{
if (resourceName == null)
resourceName = strBasePackage.substring(strBasePackage.lastIndexOf('.') + 1);
strBasePackage = strBasePackage.substring(0, strBasePackage.lastIndexOf('.') + 1);
resourceName = Uti... | [
"public",
"String",
"getResourceClassName",
"(",
"String",
"strBasePackage",
",",
"String",
"resourceName",
")",
"{",
"if",
"(",
"resourceName",
"==",
"null",
")",
"resourceName",
"=",
"strBasePackage",
".",
"substring",
"(",
"strBasePackage",
".",
"lastIndexOf",
... | Given a class name in the program package, get this resource's class name in the res package.
@param strBasePackage A class name in the same program directory as the res class.
@param resourceName The base resource class name.
@return The full resource class name. | [
"Given",
"a",
"class",
"name",
"in",
"the",
"program",
"package",
"get",
"this",
"resource",
"s",
"class",
"name",
"in",
"the",
"res",
"package",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/BaseApplication.java#L153-L161 |
151,619 | jmeetsma/Iglu-Util | src/main/java/org/ijsberg/iglu/util/time/SchedulingSupport.java | SchedulingSupport.calculateOffsetInMs | public static long calculateOffsetInMs(int intervalInMinutes, int offsetInMinutes) {
while (offsetInMinutes < 0) {
offsetInMinutes = intervalInMinutes + offsetInMinutes;
}
while (offsetInMinutes > intervalInMinutes) {
offsetInMinutes -= intervalInMinutes;
}
return offsetInMinutes * MINUTE_IN_MS;
} | java | public static long calculateOffsetInMs(int intervalInMinutes, int offsetInMinutes) {
while (offsetInMinutes < 0) {
offsetInMinutes = intervalInMinutes + offsetInMinutes;
}
while (offsetInMinutes > intervalInMinutes) {
offsetInMinutes -= intervalInMinutes;
}
return offsetInMinutes * MINUTE_IN_MS;
} | [
"public",
"static",
"long",
"calculateOffsetInMs",
"(",
"int",
"intervalInMinutes",
",",
"int",
"offsetInMinutes",
")",
"{",
"while",
"(",
"offsetInMinutes",
"<",
"0",
")",
"{",
"offsetInMinutes",
"=",
"intervalInMinutes",
"+",
"offsetInMinutes",
";",
"}",
"while"... | Reformulates negative offsets or offsets larger than interval.
@param intervalInMinutes
@param offsetInMinutes
@return offset in milliseconds | [
"Reformulates",
"negative",
"offsets",
"or",
"offsets",
"larger",
"than",
"interval",
"."
] | 971eb022115247b1e34dc26dd02e7e621e29e910 | https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/time/SchedulingSupport.java#L68-L76 |
151,620 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java | ScreenUtil.updateLookAndFeel | public static void updateLookAndFeel(Container container, PropertyOwner propertyOwner, Map<String,Object> properties)
{
String lookAndFeelClassName = ScreenUtil.getPropery(ScreenUtil.LOOK_AND_FEEL, propertyOwner, properties, null);
if (lookAndFeelClassName == null)
lookAndFeelClassName =... | java | public static void updateLookAndFeel(Container container, PropertyOwner propertyOwner, Map<String,Object> properties)
{
String lookAndFeelClassName = ScreenUtil.getPropery(ScreenUtil.LOOK_AND_FEEL, propertyOwner, properties, null);
if (lookAndFeelClassName == null)
lookAndFeelClassName =... | [
"public",
"static",
"void",
"updateLookAndFeel",
"(",
"Container",
"container",
",",
"PropertyOwner",
"propertyOwner",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"{",
"String",
"lookAndFeelClassName",
"=",
"ScreenUtil",
".",
"getPropery",
"(... | Set the look and feel. | [
"Set",
"the",
"look",
"and",
"feel",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java#L70-L133 |
151,621 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java | ScreenUtil.getPropery | public static String getPropery(String key, PropertyOwner propertyOwner, Map<String,Object> properties, String defaultValue)
{
String returnValue = null;
if (propertyOwner != null)
returnValue = propertyOwner.getProperty(key);
if (properties != null) if (returnValue == null)
... | java | public static String getPropery(String key, PropertyOwner propertyOwner, Map<String,Object> properties, String defaultValue)
{
String returnValue = null;
if (propertyOwner != null)
returnValue = propertyOwner.getProperty(key);
if (properties != null) if (returnValue == null)
... | [
"public",
"static",
"String",
"getPropery",
"(",
"String",
"key",
",",
"PropertyOwner",
"propertyOwner",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
",",
"String",
"defaultValue",
")",
"{",
"String",
"returnValue",
"=",
"null",
";",
"if",
"(... | A utility to get the property from the propertyowner or the property. | [
"A",
"utility",
"to",
"get",
"the",
"property",
"from",
"the",
"propertyowner",
"or",
"the",
"property",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java#L210-L220 |
151,622 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java | ScreenUtil.setProperty | public static void setProperty(String key, String value, PropertyOwner propertyOwner, Map<String,Object> properties)
{
if (propertyOwner != null)
{
propertyOwner.setProperty(key, value);
}
if (properties != null)
{
if (value != null)
pr... | java | public static void setProperty(String key, String value, PropertyOwner propertyOwner, Map<String,Object> properties)
{
if (propertyOwner != null)
{
propertyOwner.setProperty(key, value);
}
if (properties != null)
{
if (value != null)
pr... | [
"public",
"static",
"void",
"setProperty",
"(",
"String",
"key",
",",
"String",
"value",
",",
"PropertyOwner",
"propertyOwner",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"{",
"if",
"(",
"propertyOwner",
"!=",
"null",
")",
"{",
"prop... | A utility to set the property from the propertyowner or the property. | [
"A",
"utility",
"to",
"set",
"the",
"property",
"from",
"the",
"propertyowner",
"or",
"the",
"property",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java#L224-L237 |
151,623 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java | ScreenUtil.getFrame | public static Frame getFrame(Component component)
{
while (component != null)
{
if (component instanceof Frame)
return (Frame)component;
component = component.getParent();
}
return null;
} | java | public static Frame getFrame(Component component)
{
while (component != null)
{
if (component instanceof Frame)
return (Frame)component;
component = component.getParent();
}
return null;
} | [
"public",
"static",
"Frame",
"getFrame",
"(",
"Component",
"component",
")",
"{",
"while",
"(",
"component",
"!=",
"null",
")",
"{",
"if",
"(",
"component",
"instanceof",
"Frame",
")",
"return",
"(",
"Frame",
")",
"component",
";",
"component",
"=",
"compo... | Get the frame for this component.
@param component The component to get the frame for.
@return The frame (or null). | [
"Get",
"the",
"frame",
"for",
"this",
"component",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java#L250-L259 |
151,624 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java | ScreenUtil.setEnabled | public static void setEnabled(Component component, boolean bEnabled)
{
if (component instanceof JPanel)
{
for (int i = 0; i < ((JPanel)component).getComponentCount(); i++)
{
JComponent componentSub = (JComponent)((JPanel)component).getComponent(i);
... | java | public static void setEnabled(Component component, boolean bEnabled)
{
if (component instanceof JPanel)
{
for (int i = 0; i < ((JPanel)component).getComponentCount(); i++)
{
JComponent componentSub = (JComponent)((JPanel)component).getComponent(i);
... | [
"public",
"static",
"void",
"setEnabled",
"(",
"Component",
"component",
",",
"boolean",
"bEnabled",
")",
"{",
"if",
"(",
"component",
"instanceof",
"JPanel",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"(",
"(",
"JPanel",
")",
"componen... | Fake disable a control. | [
"Fake",
"disable",
"a",
"control",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java#L263-L280 |
151,625 | microfocus-idol/java-configuration-impl | src/main/java/com/hp/autonomy/frontend/configuration/BaseConfigFileService.java | BaseConfigFileService.init | @SuppressWarnings("ProhibitedExceptionDeclared")
@PostConstruct
public void init() throws Exception {
final String configFileLocation = getConfigFileLocation();
T fileConfig = getEmptyConfig();
boolean fileExists = false;
log.info("Using {} as config file location", configFileL... | java | @SuppressWarnings("ProhibitedExceptionDeclared")
@PostConstruct
public void init() throws Exception {
final String configFileLocation = getConfigFileLocation();
T fileConfig = getEmptyConfig();
boolean fileExists = false;
log.info("Using {} as config file location", configFileL... | [
"@",
"SuppressWarnings",
"(",
"\"ProhibitedExceptionDeclared\"",
")",
"@",
"PostConstruct",
"public",
"void",
"init",
"(",
")",
"throws",
"Exception",
"{",
"final",
"String",
"configFileLocation",
"=",
"getConfigFileLocation",
"(",
")",
";",
"T",
"fileConfig",
"=",
... | Exception thrown by method in library | [
"Exception",
"thrown",
"by",
"method",
"in",
"library"
] | cd9d744cacfaaae3c76cacc211e65742bbc7b00a | https://github.com/microfocus-idol/java-configuration-impl/blob/cd9d744cacfaaae3c76cacc211e65742bbc7b00a/src/main/java/com/hp/autonomy/frontend/configuration/BaseConfigFileService.java#L78-L138 |
151,626 | microfocus-idol/java-configuration-impl | src/main/java/com/hp/autonomy/frontend/configuration/BaseConfigFileService.java | BaseConfigFileService.getConfigResponse | @Override
public ConfigResponse<T> getConfigResponse() {
T config = this.config.get();
config = withoutDefaultLogin(config);
if (config instanceof PasswordsConfig<?>) {
config = ((PasswordsConfig<T>) config).withoutPasswords();
}
return new ConfigResponse<>(con... | java | @Override
public ConfigResponse<T> getConfigResponse() {
T config = this.config.get();
config = withoutDefaultLogin(config);
if (config instanceof PasswordsConfig<?>) {
config = ((PasswordsConfig<T>) config).withoutPasswords();
}
return new ConfigResponse<>(con... | [
"@",
"Override",
"public",
"ConfigResponse",
"<",
"T",
">",
"getConfigResponse",
"(",
")",
"{",
"T",
"config",
"=",
"this",
".",
"config",
".",
"get",
"(",
")",
";",
"config",
"=",
"withoutDefaultLogin",
"(",
"config",
")",
";",
"if",
"(",
"config",
"i... | Returns the Config in a format suitable for revealing to users.
@return A ConfigResponse of the current config. Passwords will be encrypted and the default login wil be removed. | [
"Returns",
"the",
"Config",
"in",
"a",
"format",
"suitable",
"for",
"revealing",
"to",
"users",
"."
] | cd9d744cacfaaae3c76cacc211e65742bbc7b00a | https://github.com/microfocus-idol/java-configuration-impl/blob/cd9d744cacfaaae3c76cacc211e65742bbc7b00a/src/main/java/com/hp/autonomy/frontend/configuration/BaseConfigFileService.java#L185-L196 |
151,627 | jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/VectorBuffer.java | VectorBuffer.clearBuffer | public void clearBuffer()
{
super.clearBuffer();
if (m_vector == null)
m_vector = new Vector<Object>();
else
m_vector.removeAllElements();
m_iCurrentIndex = 0;
} | java | public void clearBuffer()
{
super.clearBuffer();
if (m_vector == null)
m_vector = new Vector<Object>();
else
m_vector.removeAllElements();
m_iCurrentIndex = 0;
} | [
"public",
"void",
"clearBuffer",
"(",
")",
"{",
"super",
".",
"clearBuffer",
"(",
")",
";",
"if",
"(",
"m_vector",
"==",
"null",
")",
"m_vector",
"=",
"new",
"Vector",
"<",
"Object",
">",
"(",
")",
";",
"else",
"m_vector",
".",
"removeAllElements",
"("... | Initialize the physical data buffer. | [
"Initialize",
"the",
"physical",
"data",
"buffer",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/VectorBuffer.java#L103-L111 |
151,628 | kirgor/enklib | sql/src/main/java/com/kirgor/enklib/sql/Cursor.java | Cursor.fetchList | public List<T> fetchList(int limit) throws SQLException, InstantiationException, IllegalAccessException {
ArrayList<T> result = new ArrayList<T>();
if (primitive) {
for (int i = 0; i < limit; i++) {
if (!finished) {
result.add(fetchSingleInternal());
... | java | public List<T> fetchList(int limit) throws SQLException, InstantiationException, IllegalAccessException {
ArrayList<T> result = new ArrayList<T>();
if (primitive) {
for (int i = 0; i < limit; i++) {
if (!finished) {
result.add(fetchSingleInternal());
... | [
"public",
"List",
"<",
"T",
">",
"fetchList",
"(",
"int",
"limit",
")",
"throws",
"SQLException",
",",
"InstantiationException",
",",
"IllegalAccessException",
"{",
"ArrayList",
"<",
"T",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"T",
">",
"(",
")",
";"... | Fetches limited list of entities.
@param limit Maximum amount of entities to fetch.
@return List of fetched entities.
@throws SQLException
@throws InstantiationException
@throws IllegalAccessException | [
"Fetches",
"limited",
"list",
"of",
"entities",
"."
] | 8a24db296dc43db5d8fe509cf64ace0a0c7be8f2 | https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/sql/src/main/java/com/kirgor/enklib/sql/Cursor.java#L78-L101 |
151,629 | kirgor/enklib | sql/src/main/java/com/kirgor/enklib/sql/Cursor.java | Cursor.fetchList | public List<T> fetchList() throws SQLException, InstantiationException, IllegalAccessException {
ArrayList<T> result = new ArrayList<T>();
if (primitive) {
while (!finished) {
result.add(fetchSinglePrimitiveInternal());
next();
}
} else {
... | java | public List<T> fetchList() throws SQLException, InstantiationException, IllegalAccessException {
ArrayList<T> result = new ArrayList<T>();
if (primitive) {
while (!finished) {
result.add(fetchSinglePrimitiveInternal());
next();
}
} else {
... | [
"public",
"List",
"<",
"T",
">",
"fetchList",
"(",
")",
"throws",
"SQLException",
",",
"InstantiationException",
",",
"IllegalAccessException",
"{",
"ArrayList",
"<",
"T",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"T",
">",
"(",
")",
";",
"if",
"(",
"... | Fetches the whole list of entities. It will not stop until entire result set will end.
@return List of fetched entities.
@throws SQLException
@throws InstantiationException
@throws IllegalAccessException | [
"Fetches",
"the",
"whole",
"list",
"of",
"entities",
".",
"It",
"will",
"not",
"stop",
"until",
"entire",
"result",
"set",
"will",
"end",
"."
] | 8a24db296dc43db5d8fe509cf64ace0a0c7be8f2 | https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/sql/src/main/java/com/kirgor/enklib/sql/Cursor.java#L111-L126 |
151,630 | kirgor/enklib | sql/src/main/java/com/kirgor/enklib/sql/Cursor.java | Cursor.fetchSingle | public T fetchSingle() throws InstantiationException, IllegalAccessException, SQLException {
if (!finished) {
T result = primitive ? fetchSinglePrimitiveInternal() : fetchSingleInternal();
next();
return result;
} else {
throw new SQLException("Result set ... | java | public T fetchSingle() throws InstantiationException, IllegalAccessException, SQLException {
if (!finished) {
T result = primitive ? fetchSinglePrimitiveInternal() : fetchSingleInternal();
next();
return result;
} else {
throw new SQLException("Result set ... | [
"public",
"T",
"fetchSingle",
"(",
")",
"throws",
"InstantiationException",
",",
"IllegalAccessException",
",",
"SQLException",
"{",
"if",
"(",
"!",
"finished",
")",
"{",
"T",
"result",
"=",
"primitive",
"?",
"fetchSinglePrimitiveInternal",
"(",
")",
":",
"fetch... | Fetches single entity, being sure that it exists. Throws exception if there is no entity.
@return Single entity.
@throws InstantiationException
@throws IllegalAccessException
@throws SQLException | [
"Fetches",
"single",
"entity",
"being",
"sure",
"that",
"it",
"exists",
".",
"Throws",
"exception",
"if",
"there",
"is",
"no",
"entity",
"."
] | 8a24db296dc43db5d8fe509cf64ace0a0c7be8f2 | https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/sql/src/main/java/com/kirgor/enklib/sql/Cursor.java#L136-L144 |
151,631 | kirgor/enklib | sql/src/main/java/com/kirgor/enklib/sql/Cursor.java | Cursor.fetchSingleOrNull | public T fetchSingleOrNull() throws InstantiationException, IllegalAccessException, SQLException {
if (!finished) {
T result = primitive ? fetchSinglePrimitiveInternal() : fetchSingleInternal();
next();
return result;
} else {
return null;
}
} | java | public T fetchSingleOrNull() throws InstantiationException, IllegalAccessException, SQLException {
if (!finished) {
T result = primitive ? fetchSinglePrimitiveInternal() : fetchSingleInternal();
next();
return result;
} else {
return null;
}
} | [
"public",
"T",
"fetchSingleOrNull",
"(",
")",
"throws",
"InstantiationException",
",",
"IllegalAccessException",
",",
"SQLException",
"{",
"if",
"(",
"!",
"finished",
")",
"{",
"T",
"result",
"=",
"primitive",
"?",
"fetchSinglePrimitiveInternal",
"(",
")",
":",
... | Fetches single entity or null.
@return Single entity if result set have one more, otherwise null.
@throws InstantiationException
@throws IllegalAccessException
@throws SQLException | [
"Fetches",
"single",
"entity",
"or",
"null",
"."
] | 8a24db296dc43db5d8fe509cf64ace0a0c7be8f2 | https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/sql/src/main/java/com/kirgor/enklib/sql/Cursor.java#L154-L162 |
151,632 | kirgor/enklib | sql/src/main/java/com/kirgor/enklib/sql/Cursor.java | Cursor.close | public void close(boolean closeConnection) throws SQLException {
if (closeConnection) {
resultSet.getStatement().getConnection().close();
} else {
resultSet.close();
}
finished = true;
} | java | public void close(boolean closeConnection) throws SQLException {
if (closeConnection) {
resultSet.getStatement().getConnection().close();
} else {
resultSet.close();
}
finished = true;
} | [
"public",
"void",
"close",
"(",
"boolean",
"closeConnection",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"closeConnection",
")",
"{",
"resultSet",
".",
"getStatement",
"(",
")",
".",
"getConnection",
"(",
")",
".",
"close",
"(",
")",
";",
"}",
"else",
... | Closes underlying result set and, optionally, the whole connection.
@param closeConnection Close underlying connection also. Be aware of this if
connection is used somewhere else.
@throws SQLException | [
"Closes",
"underlying",
"result",
"set",
"and",
"optionally",
"the",
"whole",
"connection",
"."
] | 8a24db296dc43db5d8fe509cf64ace0a0c7be8f2 | https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/sql/src/main/java/com/kirgor/enklib/sql/Cursor.java#L171-L179 |
151,633 | jbundle/jbundle | base/db/client/src/main/java/org/jbundle/base/db/client/ClientDatabase.java | ClientDatabase.close | public void close()
{
super.close(); // Do any inherited
try {
if (m_remoteDatabase != null)
{
synchronized (this.getSyncObject(m_remoteDatabase))
{ // In case this is called from another task
m_remoteDatabase.close();
... | java | public void close()
{
super.close(); // Do any inherited
try {
if (m_remoteDatabase != null)
{
synchronized (this.getSyncObject(m_remoteDatabase))
{ // In case this is called from another task
m_remoteDatabase.close();
... | [
"public",
"void",
"close",
"(",
")",
"{",
"super",
".",
"close",
"(",
")",
";",
"// Do any inherited",
"try",
"{",
"if",
"(",
"m_remoteDatabase",
"!=",
"null",
")",
"{",
"synchronized",
"(",
"this",
".",
"getSyncObject",
"(",
"m_remoteDatabase",
")",
")",
... | Close the remote databases. | [
"Close",
"the",
"remote",
"databases",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/client/src/main/java/org/jbundle/base/db/client/ClientDatabase.java#L125-L140 |
151,634 | jbundle/jbundle | base/db/client/src/main/java/org/jbundle/base/db/client/ClientDatabase.java | ClientDatabase.getRemoteDatabase | public RemoteDatabase getRemoteDatabase()
throws RemoteException
{
if (m_remoteDatabase != null)
return m_remoteDatabase;
try {
if (this.getTableCount() == 0)
return null; // Never
ClientTable table = (ClientTable)m_vTableList.get(0);
... | java | public RemoteDatabase getRemoteDatabase()
throws RemoteException
{
if (m_remoteDatabase != null)
return m_remoteDatabase;
try {
if (this.getTableCount() == 0)
return null; // Never
ClientTable table = (ClientTable)m_vTableList.get(0);
... | [
"public",
"RemoteDatabase",
"getRemoteDatabase",
"(",
")",
"throws",
"RemoteException",
"{",
"if",
"(",
"m_remoteDatabase",
"!=",
"null",
")",
"return",
"m_remoteDatabase",
";",
"try",
"{",
"if",
"(",
"this",
".",
"getTableCount",
"(",
")",
"==",
"0",
")",
"... | Open the remote database.
@param environment The remote server object.
@param The user id/name (recommended on the initial server open).
@return The RemoteDatabase. | [
"Open",
"the",
"remote",
"database",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/client/src/main/java/org/jbundle/base/db/client/ClientDatabase.java#L197-L232 |
151,635 | jbundle/jbundle | base/db/client/src/main/java/org/jbundle/base/db/client/ClientDatabase.java | ClientDatabase.getRemoteProperty | public String getRemoteProperty(String strProperty, boolean readIfNotCached)
{
if (m_remoteProperties == null)
if (readIfNotCached)
{
try {
this.getRemoteDatabase();
} catch (RemoteException e) {
e.printStackTrace();
... | java | public String getRemoteProperty(String strProperty, boolean readIfNotCached)
{
if (m_remoteProperties == null)
if (readIfNotCached)
{
try {
this.getRemoteDatabase();
} catch (RemoteException e) {
e.printStackTrace();
... | [
"public",
"String",
"getRemoteProperty",
"(",
"String",
"strProperty",
",",
"boolean",
"readIfNotCached",
")",
"{",
"if",
"(",
"m_remoteProperties",
"==",
"null",
")",
"if",
"(",
"readIfNotCached",
")",
"{",
"try",
"{",
"this",
".",
"getRemoteDatabase",
"(",
"... | Get this property from the remote database.
This does not make a remote call, it just return the property cached on remote db open.
@param strProperty The key to the remote property.
@return The value. | [
"Get",
"this",
"property",
"from",
"the",
"remote",
"database",
".",
"This",
"does",
"not",
"make",
"a",
"remote",
"call",
"it",
"just",
"return",
"the",
"property",
"cached",
"on",
"remote",
"db",
"open",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/client/src/main/java/org/jbundle/base/db/client/ClientDatabase.java#L239-L253 |
151,636 | jbundle/jbundle | base/db/client/src/main/java/org/jbundle/base/db/client/ClientDatabase.java | ClientDatabase.getFakeRemoteProperty | public String getFakeRemoteProperty(String strProperty)
{
if (SQLParams.EDIT_DB_PROPERTY.equalsIgnoreCase(strProperty))
return SQLParams.DB_EDIT_NOT_SUPPORTED; // By default, remote locks are not supported natively by the database
return null;
} | java | public String getFakeRemoteProperty(String strProperty)
{
if (SQLParams.EDIT_DB_PROPERTY.equalsIgnoreCase(strProperty))
return SQLParams.DB_EDIT_NOT_SUPPORTED; // By default, remote locks are not supported natively by the database
return null;
} | [
"public",
"String",
"getFakeRemoteProperty",
"(",
"String",
"strProperty",
")",
"{",
"if",
"(",
"SQLParams",
".",
"EDIT_DB_PROPERTY",
".",
"equalsIgnoreCase",
"(",
"strProperty",
")",
")",
"return",
"SQLParams",
".",
"DB_EDIT_NOT_SUPPORTED",
";",
"// By default, remot... | To keep from having to contact the remote database, remote a property that will not effect the logic.
@param properties The properties object to add these properties to. | [
"To",
"keep",
"from",
"having",
"to",
"contact",
"the",
"remote",
"database",
"remote",
"a",
"property",
"that",
"will",
"not",
"effect",
"the",
"logic",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/client/src/main/java/org/jbundle/base/db/client/ClientDatabase.java#L258-L263 |
151,637 | jbundle/jbundle | base/db/client/src/main/java/org/jbundle/base/db/client/ClientDatabase.java | ClientDatabase.commit | public void commit() throws DBException
{
super.commit(); // Will throw an error if something is not set up right.
try {
if (this.getRemoteDatabase() != null)
{
synchronized (this.getSyncObject(this.getRemoteDatabase()))
{
... | java | public void commit() throws DBException
{
super.commit(); // Will throw an error if something is not set up right.
try {
if (this.getRemoteDatabase() != null)
{
synchronized (this.getSyncObject(this.getRemoteDatabase()))
{
... | [
"public",
"void",
"commit",
"(",
")",
"throws",
"DBException",
"{",
"super",
".",
"commit",
"(",
")",
";",
"// Will throw an error if something is not set up right.",
"try",
"{",
"if",
"(",
"this",
".",
"getRemoteDatabase",
"(",
")",
"!=",
"null",
")",
"{",
"s... | Commit the transactions since the last commit.
@exception DBException An exception. | [
"Commit",
"the",
"transactions",
"since",
"the",
"last",
"commit",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/client/src/main/java/org/jbundle/base/db/client/ClientDatabase.java#L268-L285 |
151,638 | jbundle/jbundle | base/message/trx/src/main/java/org/jbundle/base/message/trx/processor/BaseMessageReplyInProcessor.java | BaseMessageReplyInProcessor.processMessage | public BaseMessage processMessage(BaseMessage message)
{
if (message == null)
return null;
this.updateLogFiles(message, true); // Need to change log status to SENTOK (also associate return message log trx ID) (todo)
String strReturnQueueName = null;
if (message.getMessag... | java | public BaseMessage processMessage(BaseMessage message)
{
if (message == null)
return null;
this.updateLogFiles(message, true); // Need to change log status to SENTOK (also associate return message log trx ID) (todo)
String strReturnQueueName = null;
if (message.getMessag... | [
"public",
"BaseMessage",
"processMessage",
"(",
"BaseMessage",
"message",
")",
"{",
"if",
"(",
"message",
"==",
"null",
")",
"return",
"null",
";",
"this",
".",
"updateLogFiles",
"(",
"message",
",",
"true",
")",
";",
"// Need to change log status to SENTOK (also ... | Given the converted message for return, do any further processing before returning the message.
@param internalMessage The internal return message just as it was converted from the source. | [
"Given",
"the",
"converted",
"message",
"for",
"return",
"do",
"any",
"further",
"processing",
"before",
"returning",
"the",
"message",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/processor/BaseMessageReplyInProcessor.java#L65-L97 |
151,639 | krotscheck/knet-utils | src/main/java/net/krotscheck/util/ResourceUtil.java | ResourceUtil.getPathForResource | public static String getPathForResource(final String resourcePath) {
URL path = ResourceUtil.class.getResource(resourcePath);
if (path == null) {
path = ResourceUtil.class.getResource("/");
File tmpFile = new File(path.getPath(), resourcePath);
return tmpFile.getPath(... | java | public static String getPathForResource(final String resourcePath) {
URL path = ResourceUtil.class.getResource(resourcePath);
if (path == null) {
path = ResourceUtil.class.getResource("/");
File tmpFile = new File(path.getPath(), resourcePath);
return tmpFile.getPath(... | [
"public",
"static",
"String",
"getPathForResource",
"(",
"final",
"String",
"resourcePath",
")",
"{",
"URL",
"path",
"=",
"ResourceUtil",
".",
"class",
".",
"getResource",
"(",
"resourcePath",
")",
";",
"if",
"(",
"path",
"==",
"null",
")",
"{",
"path",
"=... | Convert a resource path to an absolute file path.
@param resourcePath The resource-relative path to resolve.
@return The absolute path to this resource. | [
"Convert",
"a",
"resource",
"path",
"to",
"an",
"absolute",
"file",
"path",
"."
] | 36474b012149f4a308f23480cab62e338847a0a6 | https://github.com/krotscheck/knet-utils/blob/36474b012149f4a308f23480cab62e338847a0a6/src/main/java/net/krotscheck/util/ResourceUtil.java#L56-L65 |
151,640 | krotscheck/knet-utils | src/main/java/net/krotscheck/util/ResourceUtil.java | ResourceUtil.getFileForResource | public static File getFileForResource(final String resourcePath) {
URL path = ResourceUtil.class.getResource(resourcePath);
if (path == null) {
path = ResourceUtil.class.getResource("/");
return new File(new File(path.getPath()), resourcePath);
}
return new File(... | java | public static File getFileForResource(final String resourcePath) {
URL path = ResourceUtil.class.getResource(resourcePath);
if (path == null) {
path = ResourceUtil.class.getResource("/");
return new File(new File(path.getPath()), resourcePath);
}
return new File(... | [
"public",
"static",
"File",
"getFileForResource",
"(",
"final",
"String",
"resourcePath",
")",
"{",
"URL",
"path",
"=",
"ResourceUtil",
".",
"class",
".",
"getResource",
"(",
"resourcePath",
")",
";",
"if",
"(",
"path",
"==",
"null",
")",
"{",
"path",
"=",... | Convert a resource path to a File object.
@param resourcePath The resource-relative path to resolve.
@return A file instance representing the resource in question. | [
"Convert",
"a",
"resource",
"path",
"to",
"a",
"File",
"object",
"."
] | 36474b012149f4a308f23480cab62e338847a0a6 | https://github.com/krotscheck/knet-utils/blob/36474b012149f4a308f23480cab62e338847a0a6/src/main/java/net/krotscheck/util/ResourceUtil.java#L73-L81 |
151,641 | krotscheck/knet-utils | src/main/java/net/krotscheck/util/ResourceUtil.java | ResourceUtil.getResourceAsString | public static String getResourceAsString(final String resourcePath) {
File resource = getFileForResource(resourcePath);
if (!resource.exists() || resource.isDirectory()) {
logger.error("Cannot read resource, does not exist"
+ " (or is a directory).");
return ... | java | public static String getResourceAsString(final String resourcePath) {
File resource = getFileForResource(resourcePath);
if (!resource.exists() || resource.isDirectory()) {
logger.error("Cannot read resource, does not exist"
+ " (or is a directory).");
return ... | [
"public",
"static",
"String",
"getResourceAsString",
"(",
"final",
"String",
"resourcePath",
")",
"{",
"File",
"resource",
"=",
"getFileForResource",
"(",
"resourcePath",
")",
";",
"if",
"(",
"!",
"resource",
".",
"exists",
"(",
")",
"||",
"resource",
".",
"... | Read the resource found at a specific path into a string.
@param resourcePath The path to the resource.
@return The resource as a string, or an empty string if the resource was
not found. | [
"Read",
"the",
"resource",
"found",
"at",
"a",
"specific",
"path",
"into",
"a",
"string",
"."
] | 36474b012149f4a308f23480cab62e338847a0a6 | https://github.com/krotscheck/knet-utils/blob/36474b012149f4a308f23480cab62e338847a0a6/src/main/java/net/krotscheck/util/ResourceUtil.java#L90-L105 |
151,642 | krotscheck/knet-utils | src/main/java/net/krotscheck/util/ResourceUtil.java | ResourceUtil.getResourceAsStream | public static InputStream getResourceAsStream(final String resourcePath) {
File resource = getFileForResource(resourcePath);
if (!resource.exists() || resource.isDirectory()) {
logger.error("Cannot read resource, does not exist"
+ " (or is a directory).");
re... | java | public static InputStream getResourceAsStream(final String resourcePath) {
File resource = getFileForResource(resourcePath);
if (!resource.exists() || resource.isDirectory()) {
logger.error("Cannot read resource, does not exist"
+ " (or is a directory).");
re... | [
"public",
"static",
"InputStream",
"getResourceAsStream",
"(",
"final",
"String",
"resourcePath",
")",
"{",
"File",
"resource",
"=",
"getFileForResource",
"(",
"resourcePath",
")",
";",
"if",
"(",
"!",
"resource",
".",
"exists",
"(",
")",
"||",
"resource",
"."... | Read the resource found at the given path into a stream.
@param resourcePath The path to the resource.
@return The resource as an input stream. If the resource was not found,
this will be the NullInputStream. | [
"Read",
"the",
"resource",
"found",
"at",
"the",
"given",
"path",
"into",
"a",
"stream",
"."
] | 36474b012149f4a308f23480cab62e338847a0a6 | https://github.com/krotscheck/knet-utils/blob/36474b012149f4a308f23480cab62e338847a0a6/src/main/java/net/krotscheck/util/ResourceUtil.java#L114-L129 |
151,643 | wigforss/Ka-Commons-Collection | src/main/java/org/kasource/commons/collection/builder/SetBuilder.java | SetBuilder.add | public SetBuilder<T> add(T... items) {
set.addAll(Arrays.asList(items));
return this;
} | java | public SetBuilder<T> add(T... items) {
set.addAll(Arrays.asList(items));
return this;
} | [
"public",
"SetBuilder",
"<",
"T",
">",
"add",
"(",
"T",
"...",
"items",
")",
"{",
"set",
".",
"addAll",
"(",
"Arrays",
".",
"asList",
"(",
"items",
")",
")",
";",
"return",
"this",
";",
"}"
] | Adds items to the set.
@param items vargs of items to add.
@return This builder | [
"Adds",
"items",
"to",
"the",
"set",
"."
] | bee25f16ec4a65af0005bf0a9151a891cfe23e8e | https://github.com/wigforss/Ka-Commons-Collection/blob/bee25f16ec4a65af0005bf0a9151a891cfe23e8e/src/main/java/org/kasource/commons/collection/builder/SetBuilder.java#L57-L60 |
151,644 | jbundle/jbundle | base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBaseGridScreen.java | HBaseGridScreen.getPrintOptions | public int getPrintOptions()
throws DBException
{
int iHtmlOptions = HtmlConstants.HTML_DISPLAY;
if (((BaseGridScreen)this.getScreenField()).getEditing())
iHtmlOptions |= HtmlConstants.HTML_INPUT;
String strParamForm = this.getProperty(HtmlConstants.FORMS); // Disp... | java | public int getPrintOptions()
throws DBException
{
int iHtmlOptions = HtmlConstants.HTML_DISPLAY;
if (((BaseGridScreen)this.getScreenField()).getEditing())
iHtmlOptions |= HtmlConstants.HTML_INPUT;
String strParamForm = this.getProperty(HtmlConstants.FORMS); // Disp... | [
"public",
"int",
"getPrintOptions",
"(",
")",
"throws",
"DBException",
"{",
"int",
"iHtmlOptions",
"=",
"HtmlConstants",
".",
"HTML_DISPLAY",
";",
"if",
"(",
"(",
"(",
"BaseGridScreen",
")",
"this",
".",
"getScreenField",
"(",
")",
")",
".",
"getEditing",
"(... | display this screen in html input format.
@return The HTML options.
@exception DBException File exception. | [
"display",
"this",
"screen",
"in",
"html",
"input",
"format",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBaseGridScreen.java#L73-L127 |
151,645 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.readFileData | protected void readFileData(final ParserData parserData, final BufferedReader br) throws IOException {
// Read in the entire file so we can peek ahead later on
String line;
while ((line = br.readLine()) != null) {
parserData.addLine(line);
}
} | java | protected void readFileData(final ParserData parserData, final BufferedReader br) throws IOException {
// Read in the entire file so we can peek ahead later on
String line;
while ((line = br.readLine()) != null) {
parserData.addLine(line);
}
} | [
"protected",
"void",
"readFileData",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"BufferedReader",
"br",
")",
"throws",
"IOException",
"{",
"// Read in the entire file so we can peek ahead later on",
"String",
"line",
";",
"while",
"(",
"(",
"line",
"=",
"... | Reads the data from a file that is passed into a BufferedReader and processes it accordingly.
@param parserData
@param br A BufferedReader object that has been initialised with a file's data.
@throws IOException Thrown if an IO Error occurs while reading from the BufferedReader. | [
"Reads",
"the",
"data",
"from",
"a",
"file",
"that",
"is",
"passed",
"into",
"a",
"BufferedReader",
"and",
"processes",
"it",
"accordingly",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L198-L204 |
151,646 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.processSpec | protected ParserResults processSpec(final ParserData parserData, final ParsingMode mode, final boolean processProcesses) {
// Find the first line that isn't a blank line or a comment
while (parserData.getLines().peek() != null) {
final String input = parserData.getLines().peek();
... | java | protected ParserResults processSpec(final ParserData parserData, final ParsingMode mode, final boolean processProcesses) {
// Find the first line that isn't a blank line or a comment
while (parserData.getLines().peek() != null) {
final String input = parserData.getLines().peek();
... | [
"protected",
"ParserResults",
"processSpec",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"ParsingMode",
"mode",
",",
"final",
"boolean",
"processProcesses",
")",
"{",
"// Find the first line that isn't a blank line or a comment",
"while",
"(",
"parserData",
".",... | Starting method to process a Content Specification string into a ContentSpec object.
@param parserData
@param mode The mode to parse the string as.
@param processProcesses Whether or not processes should call the data provider to be processed.
@return True if the content spec was processed successfully oth... | [
"Starting",
"method",
"to",
"process",
"a",
"Content",
"Specification",
"string",
"into",
"a",
"ContentSpec",
"object",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L214-L243 |
151,647 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.processNewSpec | protected ParserResults processNewSpec(final ParserData parserData, final boolean processProcesses) {
final String input = parserData.getLines().poll();
parserData.setLineCount(parserData.getLineCount() + 1);
try {
final Pair<String, String> keyValuePair = ProcessorUtilities.getAndV... | java | protected ParserResults processNewSpec(final ParserData parserData, final boolean processProcesses) {
final String input = parserData.getLines().poll();
parserData.setLineCount(parserData.getLineCount() + 1);
try {
final Pair<String, String> keyValuePair = ProcessorUtilities.getAndV... | [
"protected",
"ParserResults",
"processNewSpec",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"boolean",
"processProcesses",
")",
"{",
"final",
"String",
"input",
"=",
"parserData",
".",
"getLines",
"(",
")",
".",
"poll",
"(",
")",
";",
"parserData",
... | Process a New Content Specification. That is that it should start with a Title, instead of a CHECKSUM and ID.
@param parserData
@param processProcesses If processes should be processed to populate the relationships.
@return True if the content spec was processed successfully otherwise false. | [
"Process",
"a",
"New",
"Content",
"Specification",
".",
"That",
"is",
"that",
"it",
"should",
"start",
"with",
"a",
"Title",
"instead",
"of",
"a",
"CHECKSUM",
"and",
"ID",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L252-L277 |
151,648 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.processEditedSpec | protected ParserResults processEditedSpec(final ParserData parserData, final boolean processProcesses) {
final String input = parserData.getLines().poll();
parserData.setLineCount(parserData.getLineCount() + 1);
try {
final Pair<String, String> keyValuePair = ProcessorUtilities.getA... | java | protected ParserResults processEditedSpec(final ParserData parserData, final boolean processProcesses) {
final String input = parserData.getLines().poll();
parserData.setLineCount(parserData.getLineCount() + 1);
try {
final Pair<String, String> keyValuePair = ProcessorUtilities.getA... | [
"protected",
"ParserResults",
"processEditedSpec",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"boolean",
"processProcesses",
")",
"{",
"final",
"String",
"input",
"=",
"parserData",
".",
"getLines",
"(",
")",
".",
"poll",
"(",
")",
";",
"parserData"... | Process an Edited Content Specification. That is that it should start with a CHECKSUM and ID, instead of a Title.
@param parserData
@param processProcesses If processes should be processed to populate the relationships.
@return True if the content spec was processed successfully otherwise false. | [
"Process",
"an",
"Edited",
"Content",
"Specification",
".",
"That",
"is",
"that",
"it",
"should",
"start",
"with",
"a",
"CHECKSUM",
"and",
"ID",
"instead",
"of",
"a",
"Title",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L286-L343 |
151,649 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.processEitherSpec | protected ParserResults processEitherSpec(final ParserData parserData, final boolean processProcesses) {
try {
final Pair<String, String> keyValuePair = ProcessorUtilities.getAndValidateKeyValuePair(parserData.getLines().peek());
final String key = keyValuePair.getFirst();
i... | java | protected ParserResults processEitherSpec(final ParserData parserData, final boolean processProcesses) {
try {
final Pair<String, String> keyValuePair = ProcessorUtilities.getAndValidateKeyValuePair(parserData.getLines().peek());
final String key = keyValuePair.getFirst();
i... | [
"protected",
"ParserResults",
"processEitherSpec",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"boolean",
"processProcesses",
")",
"{",
"try",
"{",
"final",
"Pair",
"<",
"String",
",",
"String",
">",
"keyValuePair",
"=",
"ProcessorUtilities",
".",
"get... | Process Content Specification that is either NEW or EDITED. That is that it should start with a CHECKSUM and ID or a Title.
@param parserData
@param processProcesses If processes should be processed to populate the relationships.
@return True if the content spec was processed successfully otherwise false. | [
"Process",
"Content",
"Specification",
"that",
"is",
"either",
"NEW",
"or",
"EDITED",
".",
"That",
"is",
"that",
"it",
"should",
"start",
"with",
"a",
"CHECKSUM",
"and",
"ID",
"or",
"a",
"Title",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L352-L366 |
151,650 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.processSpecContents | protected ParserResults processSpecContents(ParserData parserData, final boolean processProcesses) {
parserData.setCurrentLevel(parserData.getContentSpec().getBaseLevel());
boolean error = false;
while (parserData.getLines().peek() != null) {
parserData.setLineCount(parserData.getLin... | java | protected ParserResults processSpecContents(ParserData parserData, final boolean processProcesses) {
parserData.setCurrentLevel(parserData.getContentSpec().getBaseLevel());
boolean error = false;
while (parserData.getLines().peek() != null) {
parserData.setLineCount(parserData.getLin... | [
"protected",
"ParserResults",
"processSpecContents",
"(",
"ParserData",
"parserData",
",",
"final",
"boolean",
"processProcesses",
")",
"{",
"parserData",
".",
"setCurrentLevel",
"(",
"parserData",
".",
"getContentSpec",
"(",
")",
".",
"getBaseLevel",
"(",
")",
")",... | Process the contents of a content specification and parse it into a ContentSpec object.
@param parserData
@param processProcesses If processes should be processed to populate the relationships.
@return True if the contents were processed successfully otherwise false. | [
"Process",
"the",
"contents",
"of",
"a",
"content",
"specification",
"and",
"parse",
"it",
"into",
"a",
"ContentSpec",
"object",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L375-L403 |
151,651 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.parseLine | protected boolean parseLine(final ParserData parserData, final String line, int lineNumber) throws IndentationException {
assert line != null;
// Trim the whitespace
final String trimmedLine = line.trim();
// If the line is a blank or a comment, then nothing needs processing. So add th... | java | protected boolean parseLine(final ParserData parserData, final String line, int lineNumber) throws IndentationException {
assert line != null;
// Trim the whitespace
final String trimmedLine = line.trim();
// If the line is a blank or a comment, then nothing needs processing. So add th... | [
"protected",
"boolean",
"parseLine",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"String",
"line",
",",
"int",
"lineNumber",
")",
"throws",
"IndentationException",
"{",
"assert",
"line",
"!=",
"null",
";",
"// Trim the whitespace",
"final",
"String",
"... | Processes a line of the content specification and stores it in objects
@param parserData
@param line A line of input from the content specification
@return True if the line of input was processed successfully otherwise false.
@throws IndentationException Thrown if any invalid indentation occurs. | [
"Processes",
"a",
"line",
"of",
"the",
"content",
"specification",
"and",
"stores",
"it",
"in",
"objects"
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L413-L480 |
151,652 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.calculateLineIndentationLevel | protected int calculateLineIndentationLevel(final ParserData parserData, final String line,
int lineNumber) throws IndentationException {
char[] lineCharArray = line.toCharArray();
int indentationCount = 0;
// Count the amount of whitespace characters before any text to determine the... | java | protected int calculateLineIndentationLevel(final ParserData parserData, final String line,
int lineNumber) throws IndentationException {
char[] lineCharArray = line.toCharArray();
int indentationCount = 0;
// Count the amount of whitespace characters before any text to determine the... | [
"protected",
"int",
"calculateLineIndentationLevel",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"String",
"line",
",",
"int",
"lineNumber",
")",
"throws",
"IndentationException",
"{",
"char",
"[",
"]",
"lineCharArray",
"=",
"line",
".",
"toCharArray",
... | Calculates the indentation level of a line using the amount of whitespace and the parsers indentation size setting.
@param parserData
@param line The line to calculate the indentation for.
@return The lines indentation level.
@throws IndentationException Thrown if the indentation for the line isn't valid. | [
"Calculates",
"the",
"indentation",
"level",
"of",
"a",
"line",
"using",
"the",
"amount",
"of",
"whitespace",
"and",
"the",
"parsers",
"indentation",
"size",
"setting",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L490-L509 |
151,653 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.isMetaDataLine | protected boolean isMetaDataLine(ParserData parserData, String line) {
return parserData.getCurrentLevel().getLevelType() == LevelType.BASE && line.trim().matches("^\\w[\\w\\.\\s-]+=.*");
} | java | protected boolean isMetaDataLine(ParserData parserData, String line) {
return parserData.getCurrentLevel().getLevelType() == LevelType.BASE && line.trim().matches("^\\w[\\w\\.\\s-]+=.*");
} | [
"protected",
"boolean",
"isMetaDataLine",
"(",
"ParserData",
"parserData",
",",
"String",
"line",
")",
"{",
"return",
"parserData",
".",
"getCurrentLevel",
"(",
")",
".",
"getLevelType",
"(",
")",
"==",
"LevelType",
".",
"BASE",
"&&",
"line",
".",
"trim",
"(... | Checks to see if a line is represents a Content Specifications Meta Data.
@param parserData
@param line The line to be checked.
@return True if the line is meta data, otherwise false. | [
"Checks",
"to",
"see",
"if",
"a",
"line",
"is",
"represents",
"a",
"Content",
"Specifications",
"Meta",
"Data",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L518-L520 |
151,654 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.isLevelInitialContentLine | protected boolean isLevelInitialContentLine(String line) {
final Matcher matcher = LEVEL_INITIAL_CONTENT_PATTERN.matcher(line.trim().toUpperCase(Locale.ENGLISH));
return matcher.find();
} | java | protected boolean isLevelInitialContentLine(String line) {
final Matcher matcher = LEVEL_INITIAL_CONTENT_PATTERN.matcher(line.trim().toUpperCase(Locale.ENGLISH));
return matcher.find();
} | [
"protected",
"boolean",
"isLevelInitialContentLine",
"(",
"String",
"line",
")",
"{",
"final",
"Matcher",
"matcher",
"=",
"LEVEL_INITIAL_CONTENT_PATTERN",
".",
"matcher",
"(",
"line",
".",
"trim",
"(",
")",
".",
"toUpperCase",
"(",
"Locale",
".",
"ENGLISH",
")",... | Checks to see if a line is represents a Content Specifications Level Front Matter.
@param line The line to be checked.
@return True if the line is a front matter declaration, otherwise false. | [
"Checks",
"to",
"see",
"if",
"a",
"line",
"is",
"represents",
"a",
"Content",
"Specifications",
"Level",
"Front",
"Matter",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L559-L562 |
151,655 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.isLevelLine | protected boolean isLevelLine(String line) {
final Matcher matcher = LEVEL_PATTERN.matcher(line.trim().toUpperCase(Locale.ENGLISH));
return matcher.find();
} | java | protected boolean isLevelLine(String line) {
final Matcher matcher = LEVEL_PATTERN.matcher(line.trim().toUpperCase(Locale.ENGLISH));
return matcher.find();
} | [
"protected",
"boolean",
"isLevelLine",
"(",
"String",
"line",
")",
"{",
"final",
"Matcher",
"matcher",
"=",
"LEVEL_PATTERN",
".",
"matcher",
"(",
"line",
".",
"trim",
"(",
")",
".",
"toUpperCase",
"(",
"Locale",
".",
"ENGLISH",
")",
")",
";",
"return",
"... | Checks to see if a line is represents a Content Specifications Level.
@param line The line to be checked.
@return True if the line is meta data, otherwise false. | [
"Checks",
"to",
"see",
"if",
"a",
"line",
"is",
"represents",
"a",
"Content",
"Specifications",
"Level",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L570-L573 |
151,656 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.parseEmptyOrCommentLine | protected boolean parseEmptyOrCommentLine(final ParserData parserData, final String line) {
if (isBlankLine(line)) {
if (parserData.getCurrentLevel().getLevelType() == LevelType.BASE) {
parserData.getContentSpec().appendChild(new TextNode("\n"));
} else {
... | java | protected boolean parseEmptyOrCommentLine(final ParserData parserData, final String line) {
if (isBlankLine(line)) {
if (parserData.getCurrentLevel().getLevelType() == LevelType.BASE) {
parserData.getContentSpec().appendChild(new TextNode("\n"));
} else {
... | [
"protected",
"boolean",
"parseEmptyOrCommentLine",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"String",
"line",
")",
"{",
"if",
"(",
"isBlankLine",
"(",
"line",
")",
")",
"{",
"if",
"(",
"parserData",
".",
"getCurrentLevel",
"(",
")",
".",
"getL... | Processes a line that represents a comment or an empty line in a Content Specification.
@param parserData
@param line The line to be processed.
@return True if the line was processed without errors, otherwise false. | [
"Processes",
"a",
"line",
"that",
"represents",
"a",
"comment",
"or",
"an",
"empty",
"line",
"in",
"a",
"Content",
"Specification",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L582-L598 |
151,657 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.parseLevelLine | protected Level parseLevelLine(final ParserData parserData, final String line, int lineNumber) throws ParsingException {
String tempInput[] = StringUtilities.split(line, ':', 2);
// Remove the whitespace from each value in the split array
tempInput = CollectionUtilities.trimStringArray(tempInput... | java | protected Level parseLevelLine(final ParserData parserData, final String line, int lineNumber) throws ParsingException {
String tempInput[] = StringUtilities.split(line, ':', 2);
// Remove the whitespace from each value in the split array
tempInput = CollectionUtilities.trimStringArray(tempInput... | [
"protected",
"Level",
"parseLevelLine",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"String",
"line",
",",
"int",
"lineNumber",
")",
"throws",
"ParsingException",
"{",
"String",
"tempInput",
"[",
"]",
"=",
"StringUtilities",
".",
"split",
"(",
"line"... | Processes a line that represents the start of a Content Specification Level. This method creates the level based on the data in
the line and then changes the current processing level to the new level.
@param parserData
@param line The line to be processed as a level.
@return True if the line was processed withou... | [
"Processes",
"a",
"line",
"that",
"represents",
"the",
"start",
"of",
"a",
"Content",
"Specification",
"Level",
".",
"This",
"method",
"creates",
"the",
"level",
"based",
"on",
"the",
"data",
"in",
"the",
"line",
"and",
"then",
"changes",
"the",
"current",
... | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L608-L631 |
151,658 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.isSpecTopicMetaData | private boolean isSpecTopicMetaData(final String key, final String value) {
if (ContentSpecUtilities.isSpecTopicMetaData(key)) {
// Abstracts can be plain text so check an opening bracket exists
if (key.equalsIgnoreCase(CommonConstants.CS_ABSTRACT_TITLE) || key.equalsIgnoreCase(
... | java | private boolean isSpecTopicMetaData(final String key, final String value) {
if (ContentSpecUtilities.isSpecTopicMetaData(key)) {
// Abstracts can be plain text so check an opening bracket exists
if (key.equalsIgnoreCase(CommonConstants.CS_ABSTRACT_TITLE) || key.equalsIgnoreCase(
... | [
"private",
"boolean",
"isSpecTopicMetaData",
"(",
"final",
"String",
"key",
",",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"ContentSpecUtilities",
".",
"isSpecTopicMetaData",
"(",
"key",
")",
")",
"{",
"// Abstracts can be plain text so check an opening bracket e... | Checks if a metadata line is a spec topic.
@param key The metadata key.
@param value The metadata value.
@return True if the line is a spec topic metadata element, otherwise false. | [
"Checks",
"if",
"a",
"metadata",
"line",
"is",
"a",
"spec",
"topic",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L759-L772 |
151,659 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.parseMultiLineMetaData | private KeyValueNode<String> parseMultiLineMetaData(final ParserData parserData, final String key, final String value,
final int lineNumber) throws ParsingException {
// Check if the starting brace is found, if not then assume that there is only one line.
int startingPos = StringUtilities.in... | java | private KeyValueNode<String> parseMultiLineMetaData(final ParserData parserData, final String key, final String value,
final int lineNumber) throws ParsingException {
// Check if the starting brace is found, if not then assume that there is only one line.
int startingPos = StringUtilities.in... | [
"private",
"KeyValueNode",
"<",
"String",
">",
"parseMultiLineMetaData",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"String",
"key",
",",
"final",
"String",
"value",
",",
"final",
"int",
"lineNumber",
")",
"throws",
"ParsingException",
"{",
"// Check ... | Parses a multiple line metadata element.
@param parserData
@param key The metadata key.
@param value The value on the metadata line.
@param lineNumber The initial line number.
@return The parsed multiple line value for the metadata element.
@throws ParsingException | [
"Parses",
"a",
"multiple",
"line",
"metadata",
"element",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L784-L821 |
151,660 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.parseGlobalOptionsLine | protected boolean parseGlobalOptionsLine(final ParserData parserData, final String line, int lineNumber) throws ParsingException {
// Read in the variables from the line
final HashMap<ParserType, String[]> variableMap = getLineVariables(parserData, line, lineNumber, '[', ']', ',', false);
// Ch... | java | protected boolean parseGlobalOptionsLine(final ParserData parserData, final String line, int lineNumber) throws ParsingException {
// Read in the variables from the line
final HashMap<ParserType, String[]> variableMap = getLineVariables(parserData, line, lineNumber, '[', ']', ',', false);
// Ch... | [
"protected",
"boolean",
"parseGlobalOptionsLine",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"String",
"line",
",",
"int",
"lineNumber",
")",
"throws",
"ParsingException",
"{",
"// Read in the variables from the line",
"final",
"HashMap",
"<",
"ParserType",
... | Processes a line that represents the Global Options for the Content Specification.
@param parserData
@param line The line to be processed.
@return True if the line was processed without errors, otherwise false. | [
"Processes",
"a",
"line",
"that",
"represents",
"the",
"Global",
"Options",
"for",
"the",
"Content",
"Specification",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L918-L937 |
151,661 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.changeCurrentLevel | protected void changeCurrentLevel(ParserData parserData, final Level newLevel, int newIndentationLevel) {
parserData.setIndentationLevel(newIndentationLevel);
parserData.setCurrentLevel(newLevel);
} | java | protected void changeCurrentLevel(ParserData parserData, final Level newLevel, int newIndentationLevel) {
parserData.setIndentationLevel(newIndentationLevel);
parserData.setCurrentLevel(newLevel);
} | [
"protected",
"void",
"changeCurrentLevel",
"(",
"ParserData",
"parserData",
",",
"final",
"Level",
"newLevel",
",",
"int",
"newIndentationLevel",
")",
"{",
"parserData",
".",
"setIndentationLevel",
"(",
"newIndentationLevel",
")",
";",
"parserData",
".",
"setCurrentLe... | Changes the current level that content is being processed for to a new level.
@param parserData
@param newLevel The new level to process for,
@param newIndentationLevel The new indentation level of the level in the Content Specification. | [
"Changes",
"the",
"current",
"level",
"that",
"content",
"is",
"being",
"processed",
"for",
"to",
"a",
"new",
"level",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L946-L949 |
151,662 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.parseCommonContentLine | protected CommonContent parseCommonContentLine(final ParserData parserData, final String line, int lineNumber) throws ParsingException {
// Read in the variables inside of the brackets
final HashMap<ParserType, String[]> variableMap = getLineVariables(parserData, line, lineNumber, '[', ']', ',', false);... | java | protected CommonContent parseCommonContentLine(final ParserData parserData, final String line, int lineNumber) throws ParsingException {
// Read in the variables inside of the brackets
final HashMap<ParserType, String[]> variableMap = getLineVariables(parserData, line, lineNumber, '[', ']', ',', false);... | [
"protected",
"CommonContent",
"parseCommonContentLine",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"String",
"line",
",",
"int",
"lineNumber",
")",
"throws",
"ParsingException",
"{",
"// Read in the variables inside of the brackets",
"final",
"HashMap",
"<",
... | Processes the input to create a new common content node.
@param parserData
@param line The line of input to be processed
@return A common contents object initialised with the data from the input line.
@throws ParsingException Thrown if the line can't be parsed as a Common Content node, due to incorrect syntax. | [
"Processes",
"the",
"input",
"to",
"create",
"a",
"new",
"common",
"content",
"node",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L959-L986 |
151,663 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.parseTopic | protected SpecTopic parseTopic(final ParserData parserData, final String line, int lineNumber) throws ParsingException {
// Read in the variables inside of the brackets
final HashMap<ParserType, String[]> variableMap = getLineVariables(parserData, line, lineNumber, '[', ']', ',', false);
if (!va... | java | protected SpecTopic parseTopic(final ParserData parserData, final String line, int lineNumber) throws ParsingException {
// Read in the variables inside of the brackets
final HashMap<ParserType, String[]> variableMap = getLineVariables(parserData, line, lineNumber, '[', ']', ',', false);
if (!va... | [
"protected",
"SpecTopic",
"parseTopic",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"String",
"line",
",",
"int",
"lineNumber",
")",
"throws",
"ParsingException",
"{",
"// Read in the variables inside of the brackets",
"final",
"HashMap",
"<",
"ParserType",
... | Processes the input to create a new topic
@param parserData
@param line The line of input to be processed
@return A topics object initialised with the data from the input line.
@throws ParsingException Thrown if the line can't be parsed as a Topic, due to incorrect syntax. | [
"Processes",
"the",
"input",
"to",
"create",
"a",
"new",
"topic"
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L996-L1022 |
151,664 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.processRelationshipList | private void processRelationshipList(final ParserType parserType, final SpecNodeWithRelationships tempNode,
final HashMap<ParserType, String[]> variableMap, final List<Relationship> relationships,
int lineNumber) throws ParsingException {
final String uniqueId = tempNode.getUniqueId();
... | java | private void processRelationshipList(final ParserType parserType, final SpecNodeWithRelationships tempNode,
final HashMap<ParserType, String[]> variableMap, final List<Relationship> relationships,
int lineNumber) throws ParsingException {
final String uniqueId = tempNode.getUniqueId();
... | [
"private",
"void",
"processRelationshipList",
"(",
"final",
"ParserType",
"parserType",
",",
"final",
"SpecNodeWithRelationships",
"tempNode",
",",
"final",
"HashMap",
"<",
"ParserType",
",",
"String",
"[",
"]",
">",
"variableMap",
",",
"final",
"List",
"<",
"Rela... | Processes a list of relationships for a specific relationship type from some line processed variables.
@param relationshipType The relationship type to be processed.
@param tempNode The temporary node that will be turned into a full node once fully parsed.
@param variableMap The list of variables containi... | [
"Processes",
"a",
"list",
"of",
"relationships",
"for",
"a",
"specific",
"relationship",
"type",
"from",
"some",
"line",
"processed",
"variables",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L1184-L1233 |
151,665 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.createEmptyLevelFromType | protected Level createEmptyLevelFromType(final int lineNumber, final LevelType levelType, final String input) {
// Create the level based on the type
switch (levelType) {
case APPENDIX:
return new Appendix(null, lineNumber, input);
case CHAPTER:
re... | java | protected Level createEmptyLevelFromType(final int lineNumber, final LevelType levelType, final String input) {
// Create the level based on the type
switch (levelType) {
case APPENDIX:
return new Appendix(null, lineNumber, input);
case CHAPTER:
re... | [
"protected",
"Level",
"createEmptyLevelFromType",
"(",
"final",
"int",
"lineNumber",
",",
"final",
"LevelType",
"levelType",
",",
"final",
"String",
"input",
")",
"{",
"// Create the level based on the type",
"switch",
"(",
"levelType",
")",
"{",
"case",
"APPENDIX",
... | Creates an empty Level using the LevelType to determine which Level subclass to instantiate.
@param lineNumber The line number of the level.
@param levelType The Level Type.
@param input The string that represents the level, if one exists,
@return The empty Level subclass object, or a plain Level object if no ty... | [
"Creates",
"an",
"empty",
"Level",
"using",
"the",
"LevelType",
"to",
"determine",
"which",
"Level",
"subclass",
"to",
"instantiate",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L1243-L1261 |
151,666 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.getType | protected ParserType getType(final String variableString) {
final String uppercaseVarSet = variableString.trim().toUpperCase(Locale.ENGLISH);
if (uppercaseVarSet.matches(ProcessorConstants.RELATED_REGEX)) {
return ParserType.REFER_TO;
} else if (uppercaseVarSet.matches(ProcessorConst... | java | protected ParserType getType(final String variableString) {
final String uppercaseVarSet = variableString.trim().toUpperCase(Locale.ENGLISH);
if (uppercaseVarSet.matches(ProcessorConstants.RELATED_REGEX)) {
return ParserType.REFER_TO;
} else if (uppercaseVarSet.matches(ProcessorConst... | [
"protected",
"ParserType",
"getType",
"(",
"final",
"String",
"variableString",
")",
"{",
"final",
"String",
"uppercaseVarSet",
"=",
"variableString",
".",
"trim",
"(",
")",
".",
"toUpperCase",
"(",
"Locale",
".",
"ENGLISH",
")",
";",
"if",
"(",
"uppercaseVarS... | Processes a string of variables to find the type that exists within the string.
@param variableString The variable string to be processed.
@return The parser type that was found in the string otherwise a NONE type is returned. | [
"Processes",
"a",
"string",
"of",
"variables",
"to",
"find",
"the",
"type",
"that",
"exists",
"within",
"the",
"string",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L1624-L1647 |
151,667 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.processRelationships | protected void processRelationships(final ParserData parserData) {
// Process the level relationships
for (final Map.Entry<String, List<Relationship>> entry : parserData.getLevelRelationships().entrySet()) {
final String levelId = entry.getKey();
final Level level = parserData.ge... | java | protected void processRelationships(final ParserData parserData) {
// Process the level relationships
for (final Map.Entry<String, List<Relationship>> entry : parserData.getLevelRelationships().entrySet()) {
final String levelId = entry.getKey();
final Level level = parserData.ge... | [
"protected",
"void",
"processRelationships",
"(",
"final",
"ParserData",
"parserData",
")",
"{",
"// Process the level relationships",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
"String",
",",
"List",
"<",
"Relationship",
">",
">",
"entry",
":",
"parserData",
... | Process the relationships without logging any errors.
@param parserData | [
"Process",
"the",
"relationships",
"without",
"logging",
"any",
"errors",
"."
] | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L1797-L1821 |
151,668 | pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.findVariableSets | protected List<VariableSet> findVariableSets(final ParserData parserData, final String input, final char startDelim,
final char endDelim) {
final StringBuilder varLine = new StringBuilder(input);
final List<VariableSet> retValue = new ArrayList<VariableSet>();
int startPos = 0;
... | java | protected List<VariableSet> findVariableSets(final ParserData parserData, final String input, final char startDelim,
final char endDelim) {
final StringBuilder varLine = new StringBuilder(input);
final List<VariableSet> retValue = new ArrayList<VariableSet>();
int startPos = 0;
... | [
"protected",
"List",
"<",
"VariableSet",
">",
"findVariableSets",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"String",
"input",
",",
"final",
"char",
"startDelim",
",",
"final",
"char",
"endDelim",
")",
"{",
"final",
"StringBuilder",
"varLine",
"=",... | Finds a List of variable sets within a string. If the end of a set
can't be determined then it will continue to parse the following
lines until the end is found.
@param parserData
@param input The string to find the sets in.
@param startDelim The starting character of the set.
@param endDelim The ending charact... | [
"Finds",
"a",
"List",
"of",
"variable",
"sets",
"within",
"a",
"string",
".",
"If",
"the",
"end",
"of",
"a",
"set",
"can",
"t",
"be",
"determined",
"then",
"it",
"will",
"continue",
"to",
"parse",
"the",
"following",
"lines",
"until",
"the",
"end",
"is... | 85ffac047c4ede0f972364ab1f03f7d61a4de5f1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L2012-L2066 |
151,669 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CollectionHelp.java | CollectionHelp.split | public static final <T> List<List<T>> split(List<T> list, Predicate<T> predicate)
{
if (list.isEmpty())
{
return Collections.EMPTY_LIST;
}
List<List<T>> lists = new ArrayList<>();
boolean b = predicate.test(list.get(0));
int len = list.size();
... | java | public static final <T> List<List<T>> split(List<T> list, Predicate<T> predicate)
{
if (list.isEmpty())
{
return Collections.EMPTY_LIST;
}
List<List<T>> lists = new ArrayList<>();
boolean b = predicate.test(list.get(0));
int len = list.size();
... | [
"public",
"static",
"final",
"<",
"T",
">",
"List",
"<",
"List",
"<",
"T",
">",
">",
"split",
"(",
"List",
"<",
"T",
">",
"list",
",",
"Predicate",
"<",
"T",
">",
"predicate",
")",
"{",
"if",
"(",
"list",
".",
"isEmpty",
"(",
")",
")",
"{",
"... | Splits list into several sub-lists according to predicate.
@param <T>
@param list
@param predicate
@return | [
"Splits",
"list",
"into",
"several",
"sub",
"-",
"lists",
"according",
"to",
"predicate",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L46-L68 |
151,670 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CollectionHelp.java | CollectionHelp.setFormat | public static final void setFormat(String format, Locale locale)
{
threadFormat.set(format);
threadLocale.set(locale);
} | java | public static final void setFormat(String format, Locale locale)
{
threadFormat.set(format);
threadLocale.set(locale);
} | [
"public",
"static",
"final",
"void",
"setFormat",
"(",
"String",
"format",
",",
"Locale",
"locale",
")",
"{",
"threadFormat",
".",
"set",
"(",
"format",
")",
";",
"threadLocale",
".",
"set",
"(",
"locale",
")",
";",
"}"
] | Set Format string and locale for calling thread. List items are formatted
using these. It is good practice to call removeFormat after use.
@param locale
@see #removeFormat()
@see java.lang.String#format(java.util.Locale, java.lang.String, java.lang.Object...) | [
"Set",
"Format",
"string",
"and",
"locale",
"for",
"calling",
"thread",
".",
"List",
"items",
"are",
"formatted",
"using",
"these",
".",
"It",
"is",
"good",
"practice",
"to",
"call",
"removeFormat",
"after",
"use",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L98-L102 |
151,671 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CollectionHelp.java | CollectionHelp.create | public static final <T> List<T> create(T... items)
{
List<T> list = new ArrayList<>();
Collections.addAll(list, items);
return list;
} | java | public static final <T> List<T> create(T... items)
{
List<T> list = new ArrayList<>();
Collections.addAll(list, items);
return list;
} | [
"public",
"static",
"final",
"<",
"T",
">",
"List",
"<",
"T",
">",
"create",
"(",
"T",
"...",
"items",
")",
"{",
"List",
"<",
"T",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"Collections",
".",
"addAll",
"(",
"list",
",",
"items",... | Creates a list that is populated with items
@param <T>
@param items
@return | [
"Creates",
"a",
"list",
"that",
"is",
"populated",
"with",
"items"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L131-L136 |
151,672 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CollectionHelp.java | CollectionHelp.remove | public static final <T> void remove(Collection<T> collection, T... items)
{
for (T t : items)
{
collection.remove(t);
}
} | java | public static final <T> void remove(Collection<T> collection, T... items)
{
for (T t : items)
{
collection.remove(t);
}
} | [
"public",
"static",
"final",
"<",
"T",
">",
"void",
"remove",
"(",
"Collection",
"<",
"T",
">",
"collection",
",",
"T",
"...",
"items",
")",
"{",
"for",
"(",
"T",
"t",
":",
"items",
")",
"{",
"collection",
".",
"remove",
"(",
"t",
")",
";",
"}",
... | Removes items from collection
@param <T>
@param collection
@param items | [
"Removes",
"items",
"from",
"collection"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L155-L161 |
151,673 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CollectionHelp.java | CollectionHelp.print | public static final String print(String delim, Collection<?> collection)
{
return print(null, delim, null, null, null, collection);
} | java | public static final String print(String delim, Collection<?> collection)
{
return print(null, delim, null, null, null, collection);
} | [
"public",
"static",
"final",
"String",
"print",
"(",
"String",
"delim",
",",
"Collection",
"<",
"?",
">",
"collection",
")",
"{",
"return",
"print",
"(",
"null",
",",
"delim",
",",
"null",
",",
"null",
",",
"null",
",",
"collection",
")",
";",
"}"
] | Returns collection items delimited
@param delim
@param collection
@return
@deprecated Use java.util.stream.Collectors.joining
@see java.util.stream.Collectors#joining(java.lang.CharSequence) | [
"Returns",
"collection",
"items",
"delimited"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L170-L173 |
151,674 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CollectionHelp.java | CollectionHelp.print | public static final String print(String start, String delim, String quotStart, String quotEnd, String end, Collection<?> collection)
{
try
{
StringBuilder out = new StringBuilder();
print(out, start, delim, quotStart, quotEnd, end, collection);
return out.to... | java | public static final String print(String start, String delim, String quotStart, String quotEnd, String end, Collection<?> collection)
{
try
{
StringBuilder out = new StringBuilder();
print(out, start, delim, quotStart, quotEnd, end, collection);
return out.to... | [
"public",
"static",
"final",
"String",
"print",
"(",
"String",
"start",
",",
"String",
"delim",
",",
"String",
"quotStart",
",",
"String",
"quotEnd",
",",
"String",
"end",
",",
"Collection",
"<",
"?",
">",
"collection",
")",
"{",
"try",
"{",
"StringBuilder... | Returns collection items delimited with given strings. If any of delimiters
is null, it is ignored.
@param start Start
@param delim Delimiter
@param quotStart Start of quotation
@param quotEnd End of quotation
@param end End
@param collection
@return
@deprecated Use java.util.stream.Collectors.joining
@see java.util.st... | [
"Returns",
"collection",
"items",
"delimited",
"with",
"given",
"strings",
".",
"If",
"any",
"of",
"delimiters",
"is",
"null",
"it",
"is",
"ignored",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L187-L199 |
151,675 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CollectionHelp.java | CollectionHelp.print | public static final String print(String delim, Object... array)
{
return print(null, delim, null, null, null, array);
} | java | public static final String print(String delim, Object... array)
{
return print(null, delim, null, null, null, array);
} | [
"public",
"static",
"final",
"String",
"print",
"(",
"String",
"delim",
",",
"Object",
"...",
"array",
")",
"{",
"return",
"print",
"(",
"null",
",",
"delim",
",",
"null",
",",
"null",
",",
"null",
",",
"array",
")",
";",
"}"
] | Returns array items delimited
@param delim
@param array
@return | [
"Returns",
"array",
"items",
"delimited"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L237-L240 |
151,676 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CollectionHelp.java | CollectionHelp.print | public static final String print(String start, String delim, String quotStart, String quotEnd, String end, Object... array)
{
try
{
StringBuilder out = new StringBuilder();
print(out, start, delim, quotStart, quotEnd, end, array);
return out.toString();
... | java | public static final String print(String start, String delim, String quotStart, String quotEnd, String end, Object... array)
{
try
{
StringBuilder out = new StringBuilder();
print(out, start, delim, quotStart, quotEnd, end, array);
return out.toString();
... | [
"public",
"static",
"final",
"String",
"print",
"(",
"String",
"start",
",",
"String",
"delim",
",",
"String",
"quotStart",
",",
"String",
"quotEnd",
",",
"String",
"end",
",",
"Object",
"...",
"array",
")",
"{",
"try",
"{",
"StringBuilder",
"out",
"=",
... | Returns array items delimited with given strings. If any of delimiters
is null, it is ignored.
@param start
@param delim
@param quotStart
@param quotEnd
@param end
@param array
@return | [
"Returns",
"array",
"items",
"delimited",
"with",
"given",
"strings",
".",
"If",
"any",
"of",
"delimiters",
"is",
"null",
"it",
"is",
"ignored",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L252-L264 |
151,677 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CollectionHelp.java | CollectionHelp.addAll | public static <T> Collection<T> addAll(Collection<T> list, T... array)
{
for (T item : array)
{
list.add(item);
}
return list;
} | java | public static <T> Collection<T> addAll(Collection<T> list, T... array)
{
for (T item : array)
{
list.add(item);
}
return list;
} | [
"public",
"static",
"<",
"T",
">",
"Collection",
"<",
"T",
">",
"addAll",
"(",
"Collection",
"<",
"T",
">",
"list",
",",
"T",
"...",
"array",
")",
"{",
"for",
"(",
"T",
"item",
":",
"array",
")",
"{",
"list",
".",
"add",
"(",
"item",
")",
";",
... | Adds array members to list
@param <T>
@param list
@param array | [
"Adds",
"array",
"members",
"to",
"list"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L321-L328 |
151,678 | tvesalainen/util | util/src/main/java/org/vesalainen/util/CollectionHelp.java | CollectionHelp.toArray | public static <T> T[] toArray(Collection<T> col, Class<T> cls)
{
T[] arr = (T[]) Array.newInstance(cls, col.size());
return col.toArray(arr);
} | java | public static <T> T[] toArray(Collection<T> col, Class<T> cls)
{
T[] arr = (T[]) Array.newInstance(cls, col.size());
return col.toArray(arr);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"[",
"]",
"toArray",
"(",
"Collection",
"<",
"T",
">",
"col",
",",
"Class",
"<",
"T",
">",
"cls",
")",
"{",
"T",
"[",
"]",
"arr",
"=",
"(",
"T",
"[",
"]",
")",
"Array",
".",
"newInstance",
"(",
"cls",
... | Converts Collection to array.
@param <T>
@param col
@param cls
@return
@see java.util.Collection#toArray(T[]) | [
"Converts",
"Collection",
"to",
"array",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L355-L359 |
151,679 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/channels/vc/VirtualCircuitFactory.java | VirtualCircuitFactory.create | public static final VirtualCircuit create(ByteChannel ch1, ByteChannel ch2, int capacity, boolean direct)
{
if (
(ch1 instanceof SelectableChannel) &&
(ch2 instanceof SelectableChannel)
)
{
SelectableChannel sc1 = (SelectableChannel)... | java | public static final VirtualCircuit create(ByteChannel ch1, ByteChannel ch2, int capacity, boolean direct)
{
if (
(ch1 instanceof SelectableChannel) &&
(ch2 instanceof SelectableChannel)
)
{
SelectableChannel sc1 = (SelectableChannel)... | [
"public",
"static",
"final",
"VirtualCircuit",
"create",
"(",
"ByteChannel",
"ch1",
",",
"ByteChannel",
"ch2",
",",
"int",
"capacity",
",",
"boolean",
"direct",
")",
"{",
"if",
"(",
"(",
"ch1",
"instanceof",
"SelectableChannel",
")",
"&&",
"(",
"ch2",
"insta... | Creates either SelectableVirtualCircuit or ByteChannelVirtualCircuit
depending on channel.
@param ch1
@param ch2
@param capacity
@param direct
@return | [
"Creates",
"either",
"SelectableVirtualCircuit",
"or",
"ByteChannelVirtualCircuit",
"depending",
"on",
"channel",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/channels/vc/VirtualCircuitFactory.java#L40-L67 |
151,680 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CustomTopicXMLValidator.java | CustomTopicXMLValidator.checkTopicRootElement | public static List<String> checkTopicRootElement(final ServerSettingsWrapper serverSettings, final BaseTopicWrapper<?> topic,
final Document doc) {
final List<String> xmlErrors = new ArrayList<String>();
final ServerEntitiesWrapper serverEntities = serverSettings.getEntities();
if (... | java | public static List<String> checkTopicRootElement(final ServerSettingsWrapper serverSettings, final BaseTopicWrapper<?> topic,
final Document doc) {
final List<String> xmlErrors = new ArrayList<String>();
final ServerEntitiesWrapper serverEntities = serverSettings.getEntities();
if (... | [
"public",
"static",
"List",
"<",
"String",
">",
"checkTopicRootElement",
"(",
"final",
"ServerSettingsWrapper",
"serverSettings",
",",
"final",
"BaseTopicWrapper",
"<",
"?",
">",
"topic",
",",
"final",
"Document",
"doc",
")",
"{",
"final",
"List",
"<",
"String",... | Checks that the topics root element matches the topic type.
@param topic The topic to validate the doc against.
@param doc The topics XML DOM Document.
@return A list of error messages for any invalid content found, otherwise an empty list. | [
"Checks",
"that",
"the",
"topics",
"root",
"element",
"matches",
"the",
"topic",
"type",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CustomTopicXMLValidator.java#L63-L109 |
151,681 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CustomTopicXMLValidator.java | CustomTopicXMLValidator.checkTopicContentBasedOnType | public static List<String> checkTopicContentBasedOnType(final ServerSettingsWrapper serverSettings, final BaseTopicWrapper<?> topic,
final Document doc, boolean skipNestedSectionValidation) {
final ServerEntitiesWrapper serverEntities = serverSettings.getEntities();
final List<String> xmlErr... | java | public static List<String> checkTopicContentBasedOnType(final ServerSettingsWrapper serverSettings, final BaseTopicWrapper<?> topic,
final Document doc, boolean skipNestedSectionValidation) {
final ServerEntitiesWrapper serverEntities = serverSettings.getEntities();
final List<String> xmlErr... | [
"public",
"static",
"List",
"<",
"String",
">",
"checkTopicContentBasedOnType",
"(",
"final",
"ServerSettingsWrapper",
"serverSettings",
",",
"final",
"BaseTopicWrapper",
"<",
"?",
">",
"topic",
",",
"final",
"Document",
"doc",
",",
"boolean",
"skipNestedSectionValida... | Check a topic and return an error messages if the content doesn't match the topic type.
@param serverSettings The server settings.
@param topic The topic to check the content for.
@param doc The topics XML DOM Document.
@param skipNestedSectionValidation Wheth... | [
"Check",
"a",
"topic",
"and",
"return",
"an",
"error",
"messages",
"if",
"the",
"content",
"doesn",
"t",
"match",
"the",
"topic",
"type",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CustomTopicXMLValidator.java#L120-L145 |
151,682 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CustomTopicXMLValidator.java | CustomTopicXMLValidator.isTopicANormalTopic | public static boolean isTopicANormalTopic(final BaseTopicWrapper<?> topic, final ServerSettingsWrapper serverSettings) {
return !(topic.hasTag(serverSettings.getEntities().getRevisionHistoryTagId()) || topic.hasTag(
serverSettings.getEntities().getLegalNoticeTagId()) || topic.hasTag(
... | java | public static boolean isTopicANormalTopic(final BaseTopicWrapper<?> topic, final ServerSettingsWrapper serverSettings) {
return !(topic.hasTag(serverSettings.getEntities().getRevisionHistoryTagId()) || topic.hasTag(
serverSettings.getEntities().getLegalNoticeTagId()) || topic.hasTag(
... | [
"public",
"static",
"boolean",
"isTopicANormalTopic",
"(",
"final",
"BaseTopicWrapper",
"<",
"?",
">",
"topic",
",",
"final",
"ServerSettingsWrapper",
"serverSettings",
")",
"{",
"return",
"!",
"(",
"topic",
".",
"hasTag",
"(",
"serverSettings",
".",
"getEntities"... | Check to see if a Topic is a normal topic, instead of a Revision History or Legal Notice
@param topic The topic to be checked.
@return True if the topic is a normal topic, otherwise false. | [
"Check",
"to",
"see",
"if",
"a",
"Topic",
"is",
"a",
"normal",
"topic",
"instead",
"of",
"a",
"Revision",
"History",
"or",
"Legal",
"Notice"
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CustomTopicXMLValidator.java#L153-L158 |
151,683 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CustomTopicXMLValidator.java | CustomTopicXMLValidator.doesTopicHaveValidXMLForInitialContent | public static boolean doesTopicHaveValidXMLForInitialContent(final SpecTopic specTopic, final BaseTopicWrapper<?> topic) {
boolean valid = true;
final InitialContent initialContent = (InitialContent) specTopic.getParent();
final int numSpecTopics = initialContent.getNumberOfSpecTopics() + initia... | java | public static boolean doesTopicHaveValidXMLForInitialContent(final SpecTopic specTopic, final BaseTopicWrapper<?> topic) {
boolean valid = true;
final InitialContent initialContent = (InitialContent) specTopic.getParent();
final int numSpecTopics = initialContent.getNumberOfSpecTopics() + initia... | [
"public",
"static",
"boolean",
"doesTopicHaveValidXMLForInitialContent",
"(",
"final",
"SpecTopic",
"specTopic",
",",
"final",
"BaseTopicWrapper",
"<",
"?",
">",
"topic",
")",
"{",
"boolean",
"valid",
"=",
"true",
";",
"final",
"InitialContent",
"initialContent",
"=... | Checks a topics XML to make sure it has content that can be used as front matter for a level.
@param specTopic The SpecTopic of the topic to check the XML for.
@param topic The actual topic to check the XML from.
@return True if the XML can be used, otherwise false. | [
"Checks",
"a",
"topics",
"XML",
"to",
"make",
"sure",
"it",
"has",
"content",
"that",
"can",
"be",
"used",
"as",
"front",
"matter",
"for",
"a",
"level",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CustomTopicXMLValidator.java#L167-L208 |
151,684 | nwillc/almost-functional | src/main/java/almost/functional/utils/Throwables.java | Throwables.propagate | public static RuntimeException propagate(final Exception exception) {
if (RuntimeException.class.isAssignableFrom(exception.getClass())) {
return (RuntimeException) exception;
}
return new RuntimeException("Repropagated " + exception.getMessage(), exception); //NOPMD
} | java | public static RuntimeException propagate(final Exception exception) {
if (RuntimeException.class.isAssignableFrom(exception.getClass())) {
return (RuntimeException) exception;
}
return new RuntimeException("Repropagated " + exception.getMessage(), exception); //NOPMD
} | [
"public",
"static",
"RuntimeException",
"propagate",
"(",
"final",
"Exception",
"exception",
")",
"{",
"if",
"(",
"RuntimeException",
".",
"class",
".",
"isAssignableFrom",
"(",
"exception",
".",
"getClass",
"(",
")",
")",
")",
"{",
"return",
"(",
"RuntimeExce... | Propagate a Throwable as a RuntimeException. The Runtime exception bases it's message not the message of the Throwable,
and the Throwable is set as it's cause. This can be used to deal with exceptions in lambdas etc.
@param exception the Exception to repropagate.
@return a RuntimeException | [
"Propagate",
"a",
"Throwable",
"as",
"a",
"RuntimeException",
".",
"The",
"Runtime",
"exception",
"bases",
"it",
"s",
"message",
"not",
"the",
"message",
"of",
"the",
"Throwable",
"and",
"the",
"Throwable",
"is",
"set",
"as",
"it",
"s",
"cause",
".",
"This... | a6cc7c73b2be475ed1bce5128c24b2eb9c27d666 | https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/utils/Throwables.java#L31-L37 |
151,685 | NessComputing/components-ness-event | core/src/main/java/com/nesscomputing/event/InternalEventDispatcher.java | InternalEventDispatcher.dispatch | @Override
public void dispatch(@Nonnull final NessEvent event)
{
if (event == null) {
LOG.trace("Dropping null event");
}
else {
for (final NessEventReceiver receiver : eventReceivers) {
try {
if (receiver.accept(event)) {
... | java | @Override
public void dispatch(@Nonnull final NessEvent event)
{
if (event == null) {
LOG.trace("Dropping null event");
}
else {
for (final NessEventReceiver receiver : eventReceivers) {
try {
if (receiver.accept(event)) {
... | [
"@",
"Override",
"public",
"void",
"dispatch",
"(",
"@",
"Nonnull",
"final",
"NessEvent",
"event",
")",
"{",
"if",
"(",
"event",
"==",
"null",
")",
"{",
"LOG",
".",
"trace",
"(",
"\"Dropping null event\"",
")",
";",
"}",
"else",
"{",
"for",
"(",
"final... | Dispatch an event for distribution to the local Event receivers. | [
"Dispatch",
"an",
"event",
"for",
"distribution",
"to",
"the",
"local",
"Event",
"receivers",
"."
] | 6d41f9e7c810c3ffa6bb79e19bb8cfb1d1c12c33 | https://github.com/NessComputing/components-ness-event/blob/6d41f9e7c810c3ffa6bb79e19bb8cfb1d1c12c33/core/src/main/java/com/nesscomputing/event/InternalEventDispatcher.java#L50-L69 |
151,686 | sworisbreathing/sfmf4j | sfmf4j-jpathwatch/src/main/java/com/github/sworisbreathing/sfmf4j/jpathwatch/SFMF4JWatchListener.java | SFMF4JWatchListener.onEvent | public void onEvent(final WatchEvent<Path> event) {
Kind kind = event.kind();
if (StandardWatchEventKind.ENTRY_CREATE.equals(kind)) {
File file = new File(event.context().toString());
listener.fileCreated(file);
} else if (StandardWatchEventKind.ENTRY_DELETE.equals(kind))... | java | public void onEvent(final WatchEvent<Path> event) {
Kind kind = event.kind();
if (StandardWatchEventKind.ENTRY_CREATE.equals(kind)) {
File file = new File(event.context().toString());
listener.fileCreated(file);
} else if (StandardWatchEventKind.ENTRY_DELETE.equals(kind))... | [
"public",
"void",
"onEvent",
"(",
"final",
"WatchEvent",
"<",
"Path",
">",
"event",
")",
"{",
"Kind",
"kind",
"=",
"event",
".",
"kind",
"(",
")",
";",
"if",
"(",
"StandardWatchEventKind",
".",
"ENTRY_CREATE",
".",
"equals",
"(",
"kind",
")",
")",
"{",... | Forwards watch events to the listener.
@param event the event to forward
@see StandardWatchEventKind
@see DirectoryListener#fileCreated(File)
@see DirectoryListener#fileDeleted(File)
@see DirectoryListener#fileChanged(File) | [
"Forwards",
"watch",
"events",
"to",
"the",
"listener",
"."
] | 826c2c02af69d55f98e64fbcfae23d0c7bac3f19 | https://github.com/sworisbreathing/sfmf4j/blob/826c2c02af69d55f98e64fbcfae23d0c7bac3f19/sfmf4j-jpathwatch/src/main/java/com/github/sworisbreathing/sfmf4j/jpathwatch/SFMF4JWatchListener.java#L56-L68 |
151,687 | jbundle/jbundle | app/program/db/src/main/java/org/jbundle/app/program/db/ProgramControl.java | ProgramControl.getBasePath | public String getBasePath()
{
String basePath = DBConstants.BLANK;
basePath = this.getField(ProgramControl.BASE_DIRECTORY).toString();
PropertyOwner propertyOwner = null;
if (this.getOwner() instanceof PropertyOwner)
propertyOwner = (PropertyOwner)this.getOwner();
... | java | public String getBasePath()
{
String basePath = DBConstants.BLANK;
basePath = this.getField(ProgramControl.BASE_DIRECTORY).toString();
PropertyOwner propertyOwner = null;
if (this.getOwner() instanceof PropertyOwner)
propertyOwner = (PropertyOwner)this.getOwner();
... | [
"public",
"String",
"getBasePath",
"(",
")",
"{",
"String",
"basePath",
"=",
"DBConstants",
".",
"BLANK",
";",
"basePath",
"=",
"this",
".",
"getField",
"(",
"ProgramControl",
".",
"BASE_DIRECTORY",
")",
".",
"toString",
"(",
")",
";",
"PropertyOwner",
"prop... | Get the base path.
Replace all the params first. | [
"Get",
"the",
"base",
"path",
".",
"Replace",
"all",
"the",
"params",
"first",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/ProgramControl.java#L234-L247 |
151,688 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Response.java | Response.getResponseType | private ResponseType getResponseType(int code) throws IOException {
try {
return ResponseType.values()[code];
} catch (Exception e) {
throw new IOException("Unrecognized response code: " + code);
}
} | java | private ResponseType getResponseType(int code) throws IOException {
try {
return ResponseType.values()[code];
} catch (Exception e) {
throw new IOException("Unrecognized response code: " + code);
}
} | [
"private",
"ResponseType",
"getResponseType",
"(",
"int",
"code",
")",
"throws",
"IOException",
"{",
"try",
"{",
"return",
"ResponseType",
".",
"values",
"(",
")",
"[",
"code",
"]",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"IOE... | Returns the response type from the status value.
@param code The response code.
@return The response type. | [
"Returns",
"the",
"response",
"type",
"from",
"the",
"status",
"value",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Response.java#L91-L97 |
151,689 | DDTH/ddth-tsc | ddth-tsc-core/src/main/java/com/github/ddth/tsc/DataPoint.java | DataPoint.add | public DataPoint add(DataPoint another) {
if (type == Type.NONE) {
_cloneFrom(another);
} else {
if (another.type != Type.NONE) {
add(another.value());
}
}
return this;
} | java | public DataPoint add(DataPoint another) {
if (type == Type.NONE) {
_cloneFrom(another);
} else {
if (another.type != Type.NONE) {
add(another.value());
}
}
return this;
} | [
"public",
"DataPoint",
"add",
"(",
"DataPoint",
"another",
")",
"{",
"if",
"(",
"type",
"==",
"Type",
".",
"NONE",
")",
"{",
"_cloneFrom",
"(",
"another",
")",
";",
"}",
"else",
"{",
"if",
"(",
"another",
".",
"type",
"!=",
"Type",
".",
"NONE",
")"... | Adds value from another data point.
@param another
@return
@since 0.3.0 | [
"Adds",
"value",
"from",
"another",
"data",
"point",
"."
] | d233c304c8fed2f3c069de42a36b7bbd5c8be01b | https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/DataPoint.java#L170-L180 |
151,690 | DDTH/ddth-tsc | ddth-tsc-core/src/main/java/com/github/ddth/tsc/DataPoint.java | DataPoint.add | public DataPoint add(long value) {
switch (type) {
case MINIMUM:
this.value = Math.min(this.value, value);
break;
case MAXIMUM:
this.value = Math.max(this.value, value);
break;
case AVERAGE:
case SUM:
this.value += value... | java | public DataPoint add(long value) {
switch (type) {
case MINIMUM:
this.value = Math.min(this.value, value);
break;
case MAXIMUM:
this.value = Math.max(this.value, value);
break;
case AVERAGE:
case SUM:
this.value += value... | [
"public",
"DataPoint",
"add",
"(",
"long",
"value",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"MINIMUM",
":",
"this",
".",
"value",
"=",
"Math",
".",
"min",
"(",
"this",
".",
"value",
",",
"value",
")",
";",
"break",
";",
"case",
"MAXIMUM"... | Adds a value to the data point.
<p>
How the value is actually added depends on type of the data point. See
{@link Type}.
</p>
@param value
@return | [
"Adds",
"a",
"value",
"to",
"the",
"data",
"point",
"."
] | d233c304c8fed2f3c069de42a36b7bbd5c8be01b | https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/DataPoint.java#L193-L210 |
151,691 | DDTH/ddth-tsc | ddth-tsc-core/src/main/java/com/github/ddth/tsc/DataPoint.java | DataPoint.set | public DataPoint set(DataPoint another) {
if (type == Type.NONE) {
_cloneFrom(another);
} else {
if (another.type != Type.NONE) {
set(another.value());
}
}
return this;
} | java | public DataPoint set(DataPoint another) {
if (type == Type.NONE) {
_cloneFrom(another);
} else {
if (another.type != Type.NONE) {
set(another.value());
}
}
return this;
} | [
"public",
"DataPoint",
"set",
"(",
"DataPoint",
"another",
")",
"{",
"if",
"(",
"type",
"==",
"Type",
".",
"NONE",
")",
"{",
"_cloneFrom",
"(",
"another",
")",
";",
"}",
"else",
"{",
"if",
"(",
"another",
".",
"type",
"!=",
"Type",
".",
"NONE",
")"... | Sets data point's value using another data point.
@param another
@return
@since 0.3.0 | [
"Sets",
"data",
"point",
"s",
"value",
"using",
"another",
"data",
"point",
"."
] | d233c304c8fed2f3c069de42a36b7bbd5c8be01b | https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/DataPoint.java#L219-L229 |
151,692 | DDTH/ddth-tsc | ddth-tsc-core/src/main/java/com/github/ddth/tsc/DataPoint.java | DataPoint.value | public long value() {
switch (type) {
case AVERAGE:
return numPoints != 0 ? value / numPoints : 0;
case NONE:
return 0;
case MAXIMUM:
case MINIMUM:
case SUM:
return value;
default:
throw new IllegalStateException("Un... | java | public long value() {
switch (type) {
case AVERAGE:
return numPoints != 0 ? value / numPoints : 0;
case NONE:
return 0;
case MAXIMUM:
case MINIMUM:
case SUM:
return value;
default:
throw new IllegalStateException("Un... | [
"public",
"long",
"value",
"(",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"AVERAGE",
":",
"return",
"numPoints",
"!=",
"0",
"?",
"value",
"/",
"numPoints",
":",
"0",
";",
"case",
"NONE",
":",
"return",
"0",
";",
"case",
"MAXIMUM",
":",
"ca... | Gets the data point value.
<p>
The returned value depends on type of data point's. See {@link Type}.
</p>
@return | [
"Gets",
"the",
"data",
"point",
"value",
"."
] | d233c304c8fed2f3c069de42a36b7bbd5c8be01b | https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/DataPoint.java#L252-L265 |
151,693 | jmeetsma/Iglu-Util | src/main/java/org/ijsberg/iglu/util/misc/KeyGenerator.java | KeyGenerator.generateKey | public static synchronized String generateKey() {
String code = "";
long nr = System.currentTimeMillis();
if (nr <= lastnr) {
nr = lastnr + 1;
}
lastnr = nr;
String s = String.valueOf(nr);
for (int i = 0; i < s.length(); i++) {
code += codeArray[randomizer.nextInt(6)][s.charAt(i) - 48];
}
retur... | java | public static synchronized String generateKey() {
String code = "";
long nr = System.currentTimeMillis();
if (nr <= lastnr) {
nr = lastnr + 1;
}
lastnr = nr;
String s = String.valueOf(nr);
for (int i = 0; i < s.length(); i++) {
code += codeArray[randomizer.nextInt(6)][s.charAt(i) - 48];
}
retur... | [
"public",
"static",
"synchronized",
"String",
"generateKey",
"(",
")",
"{",
"String",
"code",
"=",
"\"\"",
";",
"long",
"nr",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"if",
"(",
"nr",
"<=",
"lastnr",
")",
"{",
"nr",
"=",
"lastnr",
"+",
... | Generates a random key which is guaranteed to be unique within the application.
@return | [
"Generates",
"a",
"random",
"key",
"which",
"is",
"guaranteed",
"to",
"be",
"unique",
"within",
"the",
"application",
"."
] | 971eb022115247b1e34dc26dd02e7e621e29e910 | https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/misc/KeyGenerator.java#L45-L58 |
151,694 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL20.java | CreateWSDL20.addServiceType | public void addServiceType(DescriptionType descriptionType)
{
String interfacens;
String interfacename;
QName qname;
String name;
ServiceType serviceType = wsdlFactory.createServiceType();
descriptionType.getImportOrIncludeOrTypes().add(wsdlFactory.createServ... | java | public void addServiceType(DescriptionType descriptionType)
{
String interfacens;
String interfacename;
QName qname;
String name;
ServiceType serviceType = wsdlFactory.createServiceType();
descriptionType.getImportOrIncludeOrTypes().add(wsdlFactory.createServ... | [
"public",
"void",
"addServiceType",
"(",
"DescriptionType",
"descriptionType",
")",
"{",
"String",
"interfacens",
";",
"String",
"interfacename",
";",
"QName",
"qname",
";",
"String",
"name",
";",
"ServiceType",
"serviceType",
"=",
"wsdlFactory",
".",
"createService... | AddServiceType Method. | [
"AddServiceType",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL20.java#L112-L138 |
151,695 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL20.java | CreateWSDL20.addBindingType | public void addBindingType(DescriptionType descriptionType)
{
String interfacens;
String interfacename;
QName qname;
String value;
String name;
// Create the bindings type
BindingType bindingType = wsdlFactory.createBindingType();
descriptionT... | java | public void addBindingType(DescriptionType descriptionType)
{
String interfacens;
String interfacename;
QName qname;
String value;
String name;
// Create the bindings type
BindingType bindingType = wsdlFactory.createBindingType();
descriptionT... | [
"public",
"void",
"addBindingType",
"(",
"DescriptionType",
"descriptionType",
")",
"{",
"String",
"interfacens",
";",
"String",
"interfacename",
";",
"QName",
"qname",
";",
"String",
"value",
";",
"String",
"name",
";",
"// Create the bindings type",
"BindingType",
... | AddBindingType Method. | [
"AddBindingType",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL20.java#L142-L167 |
151,696 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL20.java | CreateWSDL20.addInterfaceType | public void addInterfaceType(DescriptionType descriptionType)
{
// Create the interfaces
InterfaceType interfaceType = wsdlFactory.createInterfaceType();
descriptionType.getImportOrIncludeOrTypes().add(wsdlFactory.createInterface(interfaceType));
String interfaceName = this.getContro... | java | public void addInterfaceType(DescriptionType descriptionType)
{
// Create the interfaces
InterfaceType interfaceType = wsdlFactory.createInterfaceType();
descriptionType.getImportOrIncludeOrTypes().add(wsdlFactory.createInterface(interfaceType));
String interfaceName = this.getContro... | [
"public",
"void",
"addInterfaceType",
"(",
"DescriptionType",
"descriptionType",
")",
"{",
"// Create the interfaces",
"InterfaceType",
"interfaceType",
"=",
"wsdlFactory",
".",
"createInterfaceType",
"(",
")",
";",
"descriptionType",
".",
"getImportOrIncludeOrTypes",
"(",
... | AddInterfaceType Method. | [
"AddInterfaceType",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL20.java#L207-L216 |
151,697 | js-lib-com/commons | src/main/java/js/format/FileSize.java | FileSize.format | private String format(double fileSize, Units units)
{
StringBuilder builder = new StringBuilder();
builder.append(numberFormat.format(fileSize));
builder.append(' ');
builder.append(units.name());
return builder.toString();
} | java | private String format(double fileSize, Units units)
{
StringBuilder builder = new StringBuilder();
builder.append(numberFormat.format(fileSize));
builder.append(' ');
builder.append(units.name());
return builder.toString();
} | [
"private",
"String",
"format",
"(",
"double",
"fileSize",
",",
"Units",
"units",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
".",
"append",
"(",
"numberFormat",
".",
"format",
"(",
"fileSize",
")",
")",
";",... | Build file size representation for given numeric value and units.
@param fileSize file size numeric part value,
@param units file size units.
@return formated file size. | [
"Build",
"file",
"size",
"representation",
"for",
"given",
"numeric",
"value",
"and",
"units",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/format/FileSize.java#L119-L126 |
151,698 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/script/process/BaseProcessRecords.java | BaseProcessRecords.includeRecord | public boolean includeRecord(Record recFileHdr, Record recClassInfo, String strPackage)
{
String strProject = this.getProperty("project");
String strType = this.getProperty("type");
String[] classLists = null;
String classList = this.getProperty("classList");
if (classList !=... | java | public boolean includeRecord(Record recFileHdr, Record recClassInfo, String strPackage)
{
String strProject = this.getProperty("project");
String strType = this.getProperty("type");
String[] classLists = null;
String classList = this.getProperty("classList");
if (classList !=... | [
"public",
"boolean",
"includeRecord",
"(",
"Record",
"recFileHdr",
",",
"Record",
"recClassInfo",
",",
"String",
"strPackage",
")",
"{",
"String",
"strProject",
"=",
"this",
".",
"getProperty",
"(",
"\"project\"",
")",
";",
"String",
"strType",
"=",
"this",
".... | Include this record?. | [
"Include",
"this",
"record?",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/process/BaseProcessRecords.java#L308-L360 |
151,699 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/script/process/BaseProcessRecords.java | BaseProcessRecords.patternToRegex | public String patternToRegex(String string)
{
if (string != null)
if (!string.contains("["))
if (!string.contains("{")) // If it has one of these, it probably is a regex already.
if (!string.contains("\\."))
{
string = string.replace("."... | java | public String patternToRegex(String string)
{
if (string != null)
if (!string.contains("["))
if (!string.contains("{")) // If it has one of these, it probably is a regex already.
if (!string.contains("\\."))
{
string = string.replace("."... | [
"public",
"String",
"patternToRegex",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"string",
"!=",
"null",
")",
"if",
"(",
"!",
"string",
".",
"contains",
"(",
"\"[\"",
")",
")",
"if",
"(",
"!",
"string",
".",
"contains",
"(",
"\"{\"",
")",
")",
"... | Kind of convert file filter to regex. | [
"Kind",
"of",
"convert",
"file",
"filter",
"to",
"regex",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/process/BaseProcessRecords.java#L364-L375 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.