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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
152,000 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/script/db/Script.java | Script.getProperty | public String getProperty(String strKey)
{
return ((PropertiesField)this.getField(Script.PROPERTIES)).getProperty(strKey);
} | java | public String getProperty(String strKey)
{
return ((PropertiesField)this.getField(Script.PROPERTIES)).getProperty(strKey);
} | [
"public",
"String",
"getProperty",
"(",
"String",
"strKey",
")",
"{",
"return",
"(",
"(",
"PropertiesField",
")",
"this",
".",
"getField",
"(",
"Script",
".",
"PROPERTIES",
")",
")",
".",
"getProperty",
"(",
"strKey",
")",
";",
"}"
] | GetProperty Method. | [
"GetProperty",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/db/Script.java#L261-L264 |
152,001 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/script/db/Script.java | Script.getSubScript | public Script getSubScript()
{
if (m_recSubScript == null)
{
RecordOwner recordOwner = this.findRecordOwner();
m_recSubScript = new Script(recordOwner);
recordOwner.removeRecord(m_recSubScript);
m_recSubScript.addListener(new SubFileFilter(this));
... | java | public Script getSubScript()
{
if (m_recSubScript == null)
{
RecordOwner recordOwner = this.findRecordOwner();
m_recSubScript = new Script(recordOwner);
recordOwner.removeRecord(m_recSubScript);
m_recSubScript.addListener(new SubFileFilter(this));
... | [
"public",
"Script",
"getSubScript",
"(",
")",
"{",
"if",
"(",
"m_recSubScript",
"==",
"null",
")",
"{",
"RecordOwner",
"recordOwner",
"=",
"this",
".",
"findRecordOwner",
"(",
")",
";",
"m_recSubScript",
"=",
"new",
"Script",
"(",
"recordOwner",
")",
";",
... | Create a record to read through this script's children. | [
"Create",
"a",
"record",
"to",
"read",
"through",
"this",
"script",
"s",
"children",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/db/Script.java#L268-L278 |
152,002 | huangp/entityunit | src/main/java/com/github/huangp/entityunit/maker/RangeValuesMaker.java | RangeValuesMaker.cycle | public static <T> Maker<T> cycle(T first, T... rest) {
ImmutableList<T> values = ImmutableList.<T>builder().add(first).add(rest).build();
return new RangeValuesMaker<T>(Iterables.cycle(values).iterator());
} | java | public static <T> Maker<T> cycle(T first, T... rest) {
ImmutableList<T> values = ImmutableList.<T>builder().add(first).add(rest).build();
return new RangeValuesMaker<T>(Iterables.cycle(values).iterator());
} | [
"public",
"static",
"<",
"T",
">",
"Maker",
"<",
"T",
">",
"cycle",
"(",
"T",
"first",
",",
"T",
"...",
"rest",
")",
"{",
"ImmutableList",
"<",
"T",
">",
"values",
"=",
"ImmutableList",
".",
"<",
"T",
">",
"builder",
"(",
")",
".",
"add",
"(",
... | Factory method. Given a list of values and the produced maker will cycle them infinitely.
@param first
first value
@param rest
rest of the values
@param <T>
value type
@return a RangeValuesMaker | [
"Factory",
"method",
".",
"Given",
"a",
"list",
"of",
"values",
"and",
"the",
"produced",
"maker",
"will",
"cycle",
"them",
"infinitely",
"."
] | 1a09b530149d707dbff7ff46f5428d9db709a4b4 | https://github.com/huangp/entityunit/blob/1a09b530149d707dbff7ff46f5428d9db709a4b4/src/main/java/com/github/huangp/entityunit/maker/RangeValuesMaker.java#L36-L39 |
152,003 | huangp/entityunit | src/main/java/com/github/huangp/entityunit/maker/RangeValuesMaker.java | RangeValuesMaker.errorOnEnd | public static <T> Maker<T> errorOnEnd(T first, T... rest) {
ImmutableList<T> values = ImmutableList.<T>builder().add(first).add(rest).build();
return new RangeValuesMaker<T>(values.iterator());
} | java | public static <T> Maker<T> errorOnEnd(T first, T... rest) {
ImmutableList<T> values = ImmutableList.<T>builder().add(first).add(rest).build();
return new RangeValuesMaker<T>(values.iterator());
} | [
"public",
"static",
"<",
"T",
">",
"Maker",
"<",
"T",
">",
"errorOnEnd",
"(",
"T",
"first",
",",
"T",
"...",
"rest",
")",
"{",
"ImmutableList",
"<",
"T",
">",
"values",
"=",
"ImmutableList",
".",
"<",
"T",
">",
"builder",
"(",
")",
".",
"add",
"(... | Factory method. Given a list of values and the produced maker will exhaust them before throwing an exception.
@param first
first value
@param rest
rest of the values
@param <T>
value type
@return a RangeValuesMaker | [
"Factory",
"method",
".",
"Given",
"a",
"list",
"of",
"values",
"and",
"the",
"produced",
"maker",
"will",
"exhaust",
"them",
"before",
"throwing",
"an",
"exception",
"."
] | 1a09b530149d707dbff7ff46f5428d9db709a4b4 | https://github.com/huangp/entityunit/blob/1a09b530149d707dbff7ff46f5428d9db709a4b4/src/main/java/com/github/huangp/entityunit/maker/RangeValuesMaker.java#L52-L55 |
152,004 | drewwills/cernunnos | cernunnos-core/src/main/java/org/danann/cernunnos/runtime/web/CernunnosServlet.java | CernunnosServlet.init | @SuppressWarnings("unchecked")
@Override
public void init() throws ServletException {
ServletConfig config = getServletConfig();
// Load the context, if present...
try {
// Bootstrap the servlet Grammar instance...
final Grammar root = XmlGrammar.getMainGrammar();
fi... | java | @SuppressWarnings("unchecked")
@Override
public void init() throws ServletException {
ServletConfig config = getServletConfig();
// Load the context, if present...
try {
// Bootstrap the servlet Grammar instance...
final Grammar root = XmlGrammar.getMainGrammar();
fi... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Override",
"public",
"void",
"init",
"(",
")",
"throws",
"ServletException",
"{",
"ServletConfig",
"config",
"=",
"getServletConfig",
"(",
")",
";",
"// Load the context, if present...",
"try",
"{",
"// Boots... | Don't declare as static in general libraries | [
"Don",
"t",
"declare",
"as",
"static",
"in",
"general",
"libraries"
] | dc6848e0253775e22b6c869fd06506d4ddb6d728 | https://github.com/drewwills/cernunnos/blob/dc6848e0253775e22b6c869fd06506d4ddb6d728/cernunnos-core/src/main/java/org/danann/cernunnos/runtime/web/CernunnosServlet.java#L74-L123 |
152,005 | BeholderTAF/beholder-selenium | src/main/java/br/ufmg/dcc/saotome/beholder/selenium/SeleniumController.java | SeleniumController.startSelenium | @BeforeSuite(alwaysRun=true)
@Parameters(value={"parameters"})
public static void startSelenium(String parameters)
{
parametersMap = parameterScanner(parameters);
parametersInfo();
String browserName = parametersMap.get("browser"),
profile = parametersMap.get("profile"),
chromeDriverBin = parame... | java | @BeforeSuite(alwaysRun=true)
@Parameters(value={"parameters"})
public static void startSelenium(String parameters)
{
parametersMap = parameterScanner(parameters);
parametersInfo();
String browserName = parametersMap.get("browser"),
profile = parametersMap.get("profile"),
chromeDriverBin = parame... | [
"@",
"BeforeSuite",
"(",
"alwaysRun",
"=",
"true",
")",
"@",
"Parameters",
"(",
"value",
"=",
"{",
"\"parameters\"",
"}",
")",
"public",
"static",
"void",
"startSelenium",
"(",
"String",
"parameters",
")",
"{",
"parametersMap",
"=",
"parameterScanner",
"(",
... | This method starts the selenium remote control using the parameters
informed by testng.xml file
@param parameters
@throws Exception | [
"This",
"method",
"starts",
"the",
"selenium",
"remote",
"control",
"using",
"the",
"parameters",
"informed",
"by",
"testng",
".",
"xml",
"file"
] | 8dc999e74a9c3f5c09e4e68ea0ef5634cdb760ee | https://github.com/BeholderTAF/beholder-selenium/blob/8dc999e74a9c3f5c09e4e68ea0ef5634cdb760ee/src/main/java/br/ufmg/dcc/saotome/beholder/selenium/SeleniumController.java#L90-L166 |
152,006 | BeholderTAF/beholder-selenium | src/main/java/br/ufmg/dcc/saotome/beholder/selenium/SeleniumController.java | SeleniumController.closeSelenium | @AfterSuite(alwaysRun=true)
public static void closeSelenium()
{
if(driver != null) {
driver.quit();
driver = null;
}
} | java | @AfterSuite(alwaysRun=true)
public static void closeSelenium()
{
if(driver != null) {
driver.quit();
driver = null;
}
} | [
"@",
"AfterSuite",
"(",
"alwaysRun",
"=",
"true",
")",
"public",
"static",
"void",
"closeSelenium",
"(",
")",
"{",
"if",
"(",
"driver",
"!=",
"null",
")",
"{",
"driver",
".",
"quit",
"(",
")",
";",
"driver",
"=",
"null",
";",
"}",
"}"
] | Close the driver. It'll close the browsers window and stop the selenium RC. | [
"Close",
"the",
"driver",
".",
"It",
"ll",
"close",
"the",
"browsers",
"window",
"and",
"stop",
"the",
"selenium",
"RC",
"."
] | 8dc999e74a9c3f5c09e4e68ea0ef5634cdb760ee | https://github.com/BeholderTAF/beholder-selenium/blob/8dc999e74a9c3f5c09e4e68ea0ef5634cdb760ee/src/main/java/br/ufmg/dcc/saotome/beholder/selenium/SeleniumController.java#L169-L176 |
152,007 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/util/PropertyValueRecovered.java | PropertyValueRecovered.recoveredValueASArray | public static <T> T[] recoveredValueASArray(Class<T> type, String properties) throws ExecutionException {
LOGGER.info(String.format("Recovered propeties [%s] as [%s]", properties, type));
String[] stringParseProperties = properties.replaceAll("\\s+", "").replaceAll("\\[", "").replaceAll("]", "").split(... | java | public static <T> T[] recoveredValueASArray(Class<T> type, String properties) throws ExecutionException {
LOGGER.info(String.format("Recovered propeties [%s] as [%s]", properties, type));
String[] stringParseProperties = properties.replaceAll("\\s+", "").replaceAll("\\[", "").replaceAll("]", "").split(... | [
"public",
"static",
"<",
"T",
">",
"T",
"[",
"]",
"recoveredValueASArray",
"(",
"Class",
"<",
"T",
">",
"type",
",",
"String",
"properties",
")",
"throws",
"ExecutionException",
"{",
"LOGGER",
".",
"info",
"(",
"String",
".",
"format",
"(",
"\"Recovered pr... | This method recovered the array of properties.
@param properties the string which represents the properties to recovered.
@param type the type to recovered.
@return the properties.
@throws ExecutionException if an error happens. | [
"This",
"method",
"recovered",
"the",
"array",
"of",
"properties",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/util/PropertyValueRecovered.java#L57-L80 |
152,008 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/util/PropertyValueRecovered.java | PropertyValueRecovered.recoveredValue | public static <T> T recoveredValue(Class<T> type, String properties) throws ExecutionException {
return recoveredValueASArray(type, properties)[0];
} | java | public static <T> T recoveredValue(Class<T> type, String properties) throws ExecutionException {
return recoveredValueASArray(type, properties)[0];
} | [
"public",
"static",
"<",
"T",
">",
"T",
"recoveredValue",
"(",
"Class",
"<",
"T",
">",
"type",
",",
"String",
"properties",
")",
"throws",
"ExecutionException",
"{",
"return",
"recoveredValueASArray",
"(",
"type",
",",
"properties",
")",
"[",
"0",
"]",
";"... | This method recovered the property.
@param properties the string which represents the properties to recovered.
@param type the type to recovered.
@return the properties.
@Throws ExecutionException if an error happens. | [
"This",
"method",
"recovered",
"the",
"property",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/util/PropertyValueRecovered.java#L91-L93 |
152,009 | pahakia/lib | settings/src/main/java/pahakia/settings/Settings.java | Settings.init | public static final void init() {
String settingDir = System.getProperty(SETTINGS_DIR);
if (settingDir == null) {
settingDir = System.getenv(SETTINGS_DIR);
}
if (settingDir == null) {
throw Fault.create(SettingsFaultCodes.SettingsDirNotSpecified, SETTINGS_DIR);
... | java | public static final void init() {
String settingDir = System.getProperty(SETTINGS_DIR);
if (settingDir == null) {
settingDir = System.getenv(SETTINGS_DIR);
}
if (settingDir == null) {
throw Fault.create(SettingsFaultCodes.SettingsDirNotSpecified, SETTINGS_DIR);
... | [
"public",
"static",
"final",
"void",
"init",
"(",
")",
"{",
"String",
"settingDir",
"=",
"System",
".",
"getProperty",
"(",
"SETTINGS_DIR",
")",
";",
"if",
"(",
"settingDir",
"==",
"null",
")",
"{",
"settingDir",
"=",
"System",
".",
"getenv",
"(",
"SETTI... | load the files from -Dcom.pahakia.settings.dir=directory | [
"load",
"the",
"files",
"from",
"-",
"Dcom",
".",
"pahakia",
".",
"settings",
".",
"dir",
"=",
"directory"
] | f78402d176371837a5c33fcd540475bcb81f4086 | https://github.com/pahakia/lib/blob/f78402d176371837a5c33fcd540475bcb81f4086/settings/src/main/java/pahakia/settings/Settings.java#L53-L62 |
152,010 | jbundle/jbundle | main/db/src/main/java/org/jbundle/main/user/db/UpdateGroupPermissionHandler.java | UpdateGroupPermissionHandler.updateGroupPermission | public void updateGroupPermission(int iGroupID)
{
if (m_recUserPermission == null)
m_recUserPermission = new UserPermission(this.getOwner().findRecordOwner());
Record m_recUserGroup = ((ReferenceField)m_recUserPermission.getField(UserPermission.USER_GROUP_ID)).getReferenceRecord();
... | java | public void updateGroupPermission(int iGroupID)
{
if (m_recUserPermission == null)
m_recUserPermission = new UserPermission(this.getOwner().findRecordOwner());
Record m_recUserGroup = ((ReferenceField)m_recUserPermission.getField(UserPermission.USER_GROUP_ID)).getReferenceRecord();
... | [
"public",
"void",
"updateGroupPermission",
"(",
"int",
"iGroupID",
")",
"{",
"if",
"(",
"m_recUserPermission",
"==",
"null",
")",
"m_recUserPermission",
"=",
"new",
"UserPermission",
"(",
"this",
".",
"getOwner",
"(",
")",
".",
"findRecordOwner",
"(",
")",
")"... | UpdateGroupPermission Method. | [
"UpdateGroupPermission",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/user/db/UpdateGroupPermissionHandler.java#L116-L161 |
152,011 | tvesalainen/util | ham/src/main/java/org/vesalainen/ham/HfFax.java | HfFax.inMap | public boolean inMap(Location location)
{
for (String map : schedule.getMap())
{
if (station.inMap(map, location))
{
return true;
}
}
return false;
} | java | public boolean inMap(Location location)
{
for (String map : schedule.getMap())
{
if (station.inMap(map, location))
{
return true;
}
}
return false;
} | [
"public",
"boolean",
"inMap",
"(",
"Location",
"location",
")",
"{",
"for",
"(",
"String",
"map",
":",
"schedule",
".",
"getMap",
"(",
")",
")",
"{",
"if",
"(",
"station",
".",
"inMap",
"(",
"map",
",",
"location",
")",
")",
"{",
"return",
"true",
... | Returns true if location is inside map.
@param location
@return | [
"Returns",
"true",
"if",
"location",
"is",
"inside",
"map",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/ham/src/main/java/org/vesalainen/ham/HfFax.java#L44-L54 |
152,012 | jbundle/jbundle | base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/ServletApplication.java | ServletApplication.init | public void init(Object env, Map<String,Object> properties, Object applet)
{
super.init(env, properties, applet);
} | java | public void init(Object env, Map<String,Object> properties, Object applet)
{
super.init(env, properties, applet);
} | [
"public",
"void",
"init",
"(",
"Object",
"env",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
",",
"Object",
"applet",
")",
"{",
"super",
".",
"init",
"(",
"env",
",",
"properties",
",",
"applet",
")",
";",
"}"
] | Initializes the ServletApplication.
Usually you pass the object that wants to use this session.
For example, the applet or ServletApplication.
@param env The Environment.
@param strURL The application parameters as a URL.
@param args The application parameters as an initial arg list.
@param applet The application param... | [
"Initializes",
"the",
"ServletApplication",
".",
"Usually",
"you",
"pass",
"the",
"object",
"that",
"wants",
"to",
"use",
"this",
"session",
".",
"For",
"example",
"the",
"applet",
"or",
"ServletApplication",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/ServletApplication.java#L51-L54 |
152,013 | jbundle/jbundle | base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/ServletApplication.java | ServletApplication.valueUnbound | public void valueUnbound(HttpSessionBindingEvent event)
{
Utility.getLogger().info("Session Unbound");
if (this.getMainTask() == null)
this.free();
else // Never - This would mean the session was released before the http response was sent (memory leak)
Utility.getL... | java | public void valueUnbound(HttpSessionBindingEvent event)
{
Utility.getLogger().info("Session Unbound");
if (this.getMainTask() == null)
this.free();
else // Never - This would mean the session was released before the http response was sent (memory leak)
Utility.getL... | [
"public",
"void",
"valueUnbound",
"(",
"HttpSessionBindingEvent",
"event",
")",
"{",
"Utility",
".",
"getLogger",
"(",
")",
".",
"info",
"(",
"\"Session Unbound\"",
")",
";",
"if",
"(",
"this",
".",
"getMainTask",
"(",
")",
"==",
"null",
")",
"this",
".",
... | Notifies the object that is being unbound from a session and identifies the session. | [
"Notifies",
"the",
"object",
"that",
"is",
"being",
"unbound",
"from",
"a",
"session",
"and",
"identifies",
"the",
"session",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/ServletApplication.java#L73-L80 |
152,014 | jeremiehuchet/acrachilisync | acrachilisync-core/src/main/java/fr/dudie/acrachilisync/utils/ChiliprojectUtils.java | ChiliprojectUtils.isSynchronized | public static boolean isSynchronized(final AcraReport pReport, final Issue pIssue)
throws IssueParseException {
final IssueDescriptionReader reader = new IssueDescriptionReader(pIssue);
return CollectionUtils.exists(reader.getOccurrences(), new ReportPredicate(pReport));
} | java | public static boolean isSynchronized(final AcraReport pReport, final Issue pIssue)
throws IssueParseException {
final IssueDescriptionReader reader = new IssueDescriptionReader(pIssue);
return CollectionUtils.exists(reader.getOccurrences(), new ReportPredicate(pReport));
} | [
"public",
"static",
"boolean",
"isSynchronized",
"(",
"final",
"AcraReport",
"pReport",
",",
"final",
"Issue",
"pIssue",
")",
"throws",
"IssueParseException",
"{",
"final",
"IssueDescriptionReader",
"reader",
"=",
"new",
"IssueDescriptionReader",
"(",
"pIssue",
")",
... | Gets wheter or not the given report has already been synchronized with the given issue.
@param pReport
an ACRA report
@param pIssue
a Chiliproject issue
@return true if the given report has already been synchronized with the given issue
@throws IssueParseException
the Date of one of the synchronized issue is unreadabl... | [
"Gets",
"wheter",
"or",
"not",
"the",
"given",
"report",
"has",
"already",
"been",
"synchronized",
"with",
"the",
"given",
"issue",
"."
] | 4eadb0218623e77e0d92b5a08515eea2db51e988 | https://github.com/jeremiehuchet/acrachilisync/blob/4eadb0218623e77e0d92b5a08515eea2db51e988/acrachilisync-core/src/main/java/fr/dudie/acrachilisync/utils/ChiliprojectUtils.java#L55-L60 |
152,015 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.getNumWarnings | public int getNumWarnings() {
int numWarnings = 0;
if (getBuildData().getErrorDatabase() != null && getBuildData().getErrorDatabase().getErrors(
getBuildData().getBuildLocale()) != null) {
for (final TopicErrorData errorData : getBuildData().getErrorDatabase().getErrors(getBu... | java | public int getNumWarnings() {
int numWarnings = 0;
if (getBuildData().getErrorDatabase() != null && getBuildData().getErrorDatabase().getErrors(
getBuildData().getBuildLocale()) != null) {
for (final TopicErrorData errorData : getBuildData().getErrorDatabase().getErrors(getBu... | [
"public",
"int",
"getNumWarnings",
"(",
")",
"{",
"int",
"numWarnings",
"=",
"0",
";",
"if",
"(",
"getBuildData",
"(",
")",
".",
"getErrorDatabase",
"(",
")",
"!=",
"null",
"&&",
"getBuildData",
"(",
")",
".",
"getErrorDatabase",
"(",
")",
".",
"getError... | Gets the number of warnings that occurred during the last build.
@return The number of warnings that occurred. | [
"Gets",
"the",
"number",
"of",
"warnings",
"that",
"occurred",
"during",
"the",
"last",
"build",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L342-L351 |
152,016 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.getNumErrors | public int getNumErrors() {
int numErrors = 0;
if (getBuildData().getErrorDatabase() != null && getBuildData().getErrorDatabase().getErrors(
getBuildData().getBuildLocale()) != null) {
for (final TopicErrorData errorData : getBuildData().getErrorDatabase().getErrors(getBuildD... | java | public int getNumErrors() {
int numErrors = 0;
if (getBuildData().getErrorDatabase() != null && getBuildData().getErrorDatabase().getErrors(
getBuildData().getBuildLocale()) != null) {
for (final TopicErrorData errorData : getBuildData().getErrorDatabase().getErrors(getBuildD... | [
"public",
"int",
"getNumErrors",
"(",
")",
"{",
"int",
"numErrors",
"=",
"0",
";",
"if",
"(",
"getBuildData",
"(",
")",
".",
"getErrorDatabase",
"(",
")",
"!=",
"null",
"&&",
"getBuildData",
"(",
")",
".",
"getErrorDatabase",
"(",
")",
".",
"getErrors",
... | Gets the number of errors that occurred during the last build.
@return The number of errors that occurred. | [
"Gets",
"the",
"number",
"of",
"errors",
"that",
"occurred",
"during",
"the",
"last",
"build",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L358-L367 |
152,017 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.pullTranslations | protected void pullTranslations(final ContentSpec contentSpec, final String locale) throws BuildProcessingException {
final CollectionWrapper<TranslatedContentSpecWrapper> translatedContentSpecs = providerFactory.getProvider(
TranslatedContentSpecProvider.class).getTranslatedContentSpecsWithQuer... | java | protected void pullTranslations(final ContentSpec contentSpec, final String locale) throws BuildProcessingException {
final CollectionWrapper<TranslatedContentSpecWrapper> translatedContentSpecs = providerFactory.getProvider(
TranslatedContentSpecProvider.class).getTranslatedContentSpecsWithQuer... | [
"protected",
"void",
"pullTranslations",
"(",
"final",
"ContentSpec",
"contentSpec",
",",
"final",
"String",
"locale",
")",
"throws",
"BuildProcessingException",
"{",
"final",
"CollectionWrapper",
"<",
"TranslatedContentSpecWrapper",
">",
"translatedContentSpecs",
"=",
"p... | Get the translations from the REST API and replace the original strings with the values downloaded.
@param contentSpec The Content Spec to get and replace the translations for.
@param locale The locale to pull the translations for.
@throws BuildProcessingException Thrown if an unexpected error occurs during build... | [
"Get",
"the",
"translations",
"from",
"the",
"REST",
"API",
"and",
"replace",
"the",
"original",
"strings",
"with",
"the",
"values",
"downloaded",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L580-L623 |
152,018 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.setTranslationUniqueIds | protected void setTranslationUniqueIds(final ContentSpec contentSpec,
final TranslatedContentSpecWrapper translatedContentSpec) throws BuildProcessingException {
final List<TranslatedCSNodeWrapper> translatedCSNodes = translatedContentSpec.getTranslatedNodes().getItems();
for (final Translat... | java | protected void setTranslationUniqueIds(final ContentSpec contentSpec,
final TranslatedContentSpecWrapper translatedContentSpec) throws BuildProcessingException {
final List<TranslatedCSNodeWrapper> translatedCSNodes = translatedContentSpec.getTranslatedNodes().getItems();
for (final Translat... | [
"protected",
"void",
"setTranslationUniqueIds",
"(",
"final",
"ContentSpec",
"contentSpec",
",",
"final",
"TranslatedContentSpecWrapper",
"translatedContentSpec",
")",
"throws",
"BuildProcessingException",
"{",
"final",
"List",
"<",
"TranslatedCSNodeWrapper",
">",
"translated... | Sets the Translation Unique Ids on all the content spec nodes, that have a matching translated node.
@param contentSpec The content spec that contains all the nodes to set the translation unique ids for.
@param translatedContentSpec The Translated Content Spec object, that holds details on the translated nod... | [
"Sets",
"the",
"Translation",
"Unique",
"Ids",
"on",
"all",
"the",
"content",
"spec",
"nodes",
"that",
"have",
"a",
"matching",
"translated",
"node",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L631-L648 |
152,019 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.validateTopicLinks | @SuppressWarnings("unchecked")
protected void validateTopicLinks(final BuildData buildData, final Set<String> bookIdAttributes) throws BuildProcessingException {
final List<SpecTopic> topics = buildData.getBuildDatabase().getAllSpecTopics();
final Set<Integer> processedTopics = new HashSet<Integer>(... | java | @SuppressWarnings("unchecked")
protected void validateTopicLinks(final BuildData buildData, final Set<String> bookIdAttributes) throws BuildProcessingException {
final List<SpecTopic> topics = buildData.getBuildDatabase().getAllSpecTopics();
final Set<Integer> processedTopics = new HashSet<Integer>(... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"void",
"validateTopicLinks",
"(",
"final",
"BuildData",
"buildData",
",",
"final",
"Set",
"<",
"String",
">",
"bookIdAttributes",
")",
"throws",
"BuildProcessingException",
"{",
"final",
"List",
"<",
... | Validate all the book links in the each topic to ensure that they exist somewhere in the book. If they don't then the
topic XML is replaced with a generic error template.
@param buildData Information and data structures for the build.
@param bookIdAttributes A set of all the id's that exist in the book.
@throws... | [
"Validate",
"all",
"the",
"book",
"links",
"in",
"the",
"each",
"topic",
"to",
"ensure",
"that",
"they",
"exist",
"somewhere",
"in",
"the",
"book",
".",
"If",
"they",
"don",
"t",
"then",
"the",
"topic",
"XML",
"is",
"replaced",
"with",
"a",
"generic",
... | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L658-L708 |
152,020 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.doPopulateDatabasePass | @SuppressWarnings("unchecked")
private void doPopulateDatabasePass(final BuildData buildData) throws BuildProcessingException {
log.info("Doing " + buildData.getBuildLocale() + " Populate Database Pass");
final ContentSpec contentSpec = buildData.getContentSpec();
final Map<String, BaseTopi... | java | @SuppressWarnings("unchecked")
private void doPopulateDatabasePass(final BuildData buildData) throws BuildProcessingException {
log.info("Doing " + buildData.getBuildLocale() + " Populate Database Pass");
final ContentSpec contentSpec = buildData.getContentSpec();
final Map<String, BaseTopi... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"void",
"doPopulateDatabasePass",
"(",
"final",
"BuildData",
"buildData",
")",
"throws",
"BuildProcessingException",
"{",
"log",
".",
"info",
"(",
"\"Doing \"",
"+",
"buildData",
".",
"getBuildLocale",
"... | Populates the SpecTopicDatabase with the SpecTopics inside the content specification. It also adds the equivalent real
topics to each SpecTopic.
@param buildData Information and data structures for the build.
@return True if the database was populated successfully otherwise false.
@throws BuildProcessingException Thro... | [
"Populates",
"the",
"SpecTopicDatabase",
"with",
"the",
"SpecTopics",
"inside",
"the",
"content",
"specification",
".",
"It",
"also",
"adds",
"the",
"equivalent",
"real",
"topics",
"to",
"each",
"SpecTopic",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L718-L746 |
152,021 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.populateTranslatedTopicDatabase | private void populateTranslatedTopicDatabase(final BuildData buildData,
final Map<String, BaseTopicWrapper<?>> translatedTopics) throws BuildProcessingException {
final List<ITopicNode> topicNodes = buildData.getContentSpec().getAllTopicNodes();
final int showPercent = 10;
final flo... | java | private void populateTranslatedTopicDatabase(final BuildData buildData,
final Map<String, BaseTopicWrapper<?>> translatedTopics) throws BuildProcessingException {
final List<ITopicNode> topicNodes = buildData.getContentSpec().getAllTopicNodes();
final int showPercent = 10;
final flo... | [
"private",
"void",
"populateTranslatedTopicDatabase",
"(",
"final",
"BuildData",
"buildData",
",",
"final",
"Map",
"<",
"String",
",",
"BaseTopicWrapper",
"<",
"?",
">",
">",
"translatedTopics",
")",
"throws",
"BuildProcessingException",
"{",
"final",
"List",
"<",
... | Gets the translated topics from the REST Interface and also creates any dummy translations for topics that have yet to be
translated.
@param buildData Information and data structures for the build.
@param translatedTopics The translated topic collection to add translated topics to. | [
"Gets",
"the",
"translated",
"topics",
"from",
"the",
"REST",
"Interface",
"and",
"also",
"creates",
"any",
"dummy",
"translations",
"for",
"topics",
"that",
"have",
"yet",
"to",
"be",
"translated",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L794-L814 |
152,022 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.createDummyTranslatedTopicFromExisting | private TranslatedTopicWrapper createDummyTranslatedTopicFromExisting(final TranslatedTopicWrapper translatedTopic,
final LocaleWrapper locale) {
// Make sure some collections are loaded, so the clone works properly
translatedTopic.getTags();
translatedTopic.getProperties();
... | java | private TranslatedTopicWrapper createDummyTranslatedTopicFromExisting(final TranslatedTopicWrapper translatedTopic,
final LocaleWrapper locale) {
// Make sure some collections are loaded, so the clone works properly
translatedTopic.getTags();
translatedTopic.getProperties();
... | [
"private",
"TranslatedTopicWrapper",
"createDummyTranslatedTopicFromExisting",
"(",
"final",
"TranslatedTopicWrapper",
"translatedTopic",
",",
"final",
"LocaleWrapper",
"locale",
")",
"{",
"// Make sure some collections are loaded, so the clone works properly",
"translatedTopic",
".",
... | Creates a dummy translated topic from an existing translated topic so that a book can be built using the same relationships as a
normal build.
@param translatedTopic The translated topic to create the dummy translated topic from.
@param locale The locale to build the dummy translations for.
@return The dummy ... | [
"Creates",
"a",
"dummy",
"translated",
"topic",
"from",
"an",
"existing",
"translated",
"topic",
"so",
"that",
"a",
"book",
"can",
"be",
"built",
"using",
"the",
"same",
"relationships",
"as",
"a",
"normal",
"build",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L1029-L1045 |
152,023 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.mergeAdditionalTranslatedXML | private Document mergeAdditionalTranslatedXML(BuildData buildData, final Document topicDoc,
final TranslatedTopicWrapper translatedTopic, final TopicType topicType) throws BuildProcessingException {
Document retValue = topicDoc;
if (!isNullOrEmpty(translatedTopic.getTranslatedAdditionalXML()... | java | private Document mergeAdditionalTranslatedXML(BuildData buildData, final Document topicDoc,
final TranslatedTopicWrapper translatedTopic, final TopicType topicType) throws BuildProcessingException {
Document retValue = topicDoc;
if (!isNullOrEmpty(translatedTopic.getTranslatedAdditionalXML()... | [
"private",
"Document",
"mergeAdditionalTranslatedXML",
"(",
"BuildData",
"buildData",
",",
"final",
"Document",
"topicDoc",
",",
"final",
"TranslatedTopicWrapper",
"translatedTopic",
",",
"final",
"TopicType",
"topicType",
")",
"throws",
"BuildProcessingException",
"{",
"... | Merges the Additional Translated XML of a Translated Topic into the original Topic XML content.
@param buildData
@param topicDoc The transformed original XML content.
@param translatedTopic The Translated Topic that is being merged.
@param topicType The type of topic being merged.
@return The merged DOM d... | [
"Merges",
"the",
"Additional",
"Translated",
"XML",
"of",
"a",
"Translated",
"Topic",
"into",
"the",
"original",
"Topic",
"XML",
"content",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L1217-L1259 |
152,024 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.processConditions | protected void processConditions(final BuildData buildData, final SpecTopic specTopic, final Document doc) {
final String condition = specTopic.getConditionStatement(true);
DocBookUtilities.processConditions(condition, doc, BuilderConstants.DEFAULT_CONDITION);
} | java | protected void processConditions(final BuildData buildData, final SpecTopic specTopic, final Document doc) {
final String condition = specTopic.getConditionStatement(true);
DocBookUtilities.processConditions(condition, doc, BuilderConstants.DEFAULT_CONDITION);
} | [
"protected",
"void",
"processConditions",
"(",
"final",
"BuildData",
"buildData",
",",
"final",
"SpecTopic",
"specTopic",
",",
"final",
"Document",
"doc",
")",
"{",
"final",
"String",
"condition",
"=",
"specTopic",
".",
"getConditionStatement",
"(",
"true",
")",
... | Checks if the conditional pass should be performed.
@param buildData Information and data structures for the build.
@param specTopic The spec topic the conditions should be processed for,
@param doc The DOM Document to process the conditions against. | [
"Checks",
"if",
"the",
"conditional",
"pass",
"should",
"be",
"performed",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L1368-L1371 |
152,025 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.doLinkSecondPass | protected void doLinkSecondPass(final BuildData buildData,
final Map<SpecTopic, Set<String>> usedIdAttributes) throws BuildProcessingException {
final List<SpecTopic> topics = buildData.getBuildDatabase().getAllSpecTopics();
for (final SpecTopic specTopic : topics) {
final Docume... | java | protected void doLinkSecondPass(final BuildData buildData,
final Map<SpecTopic, Set<String>> usedIdAttributes) throws BuildProcessingException {
final List<SpecTopic> topics = buildData.getBuildDatabase().getAllSpecTopics();
for (final SpecTopic specTopic : topics) {
final Docume... | [
"protected",
"void",
"doLinkSecondPass",
"(",
"final",
"BuildData",
"buildData",
",",
"final",
"Map",
"<",
"SpecTopic",
",",
"Set",
"<",
"String",
">",
">",
"usedIdAttributes",
")",
"throws",
"BuildProcessingException",
"{",
"final",
"List",
"<",
"SpecTopic",
">... | Fixes any topics links that have been broken due to the linked topics XML being invalid.
@param buildData Information and data structures for the build.
@param usedIdAttributes The set of ids that have been used in the set of topics in the content spec.
@throws BuildProcessingException | [
"Fixes",
"any",
"topics",
"links",
"that",
"have",
"been",
"broken",
"due",
"to",
"the",
"linked",
"topics",
"XML",
"being",
"invalid",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L1492-L1539 |
152,026 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.processSpecTopicInjectionErrors | protected boolean processSpecTopicInjectionErrors(final BuildData buildData, final BaseTopicWrapper<?> topic,
final List<String> customInjectionErrors) {
boolean valid = true;
if (!customInjectionErrors.isEmpty()) {
final String message = "Topic has referenced Topic/Level(s) " +... | java | protected boolean processSpecTopicInjectionErrors(final BuildData buildData, final BaseTopicWrapper<?> topic,
final List<String> customInjectionErrors) {
boolean valid = true;
if (!customInjectionErrors.isEmpty()) {
final String message = "Topic has referenced Topic/Level(s) " +... | [
"protected",
"boolean",
"processSpecTopicInjectionErrors",
"(",
"final",
"BuildData",
"buildData",
",",
"final",
"BaseTopicWrapper",
"<",
"?",
">",
"topic",
",",
"final",
"List",
"<",
"String",
">",
"customInjectionErrors",
")",
"{",
"boolean",
"valid",
"=",
"true... | Process the Injection Errors and add them to the Error Database.
@param buildData Information and data structures for the build.
@param topic The topic that the errors occurred for.
@param customInjectionErrors The List of Custom Injection Errors.
@return True if no errors were processed or... | [
"Process",
"the",
"Injection",
"Errors",
"and",
"add",
"them",
"to",
"the",
"Error",
"Database",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L1619-L1635 |
152,027 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.addBookBaseFilesAndImages | protected void addBookBaseFilesAndImages(final BuildData buildData) throws BuildProcessingException {
final String pressgangWebsiteJS = buildPressGangWebsiteJS(buildData);
addToZip(buildData.getBookImagesFolder() + "icon.svg", ResourceUtilities.resourceFileToByteArray("/", "icon.svg"), buildData);
... | java | protected void addBookBaseFilesAndImages(final BuildData buildData) throws BuildProcessingException {
final String pressgangWebsiteJS = buildPressGangWebsiteJS(buildData);
addToZip(buildData.getBookImagesFolder() + "icon.svg", ResourceUtilities.resourceFileToByteArray("/", "icon.svg"), buildData);
... | [
"protected",
"void",
"addBookBaseFilesAndImages",
"(",
"final",
"BuildData",
"buildData",
")",
"throws",
"BuildProcessingException",
"{",
"final",
"String",
"pressgangWebsiteJS",
"=",
"buildPressGangWebsiteJS",
"(",
"buildData",
")",
";",
"addToZip",
"(",
"buildData",
"... | Adds the basic Images and Files to the book that are the minimum requirements to build it.
@param buildData Information and data structures for the build. | [
"Adds",
"the",
"basic",
"Images",
"and",
"Files",
"to",
"the",
"book",
"that",
"are",
"the",
"minimum",
"requirements",
"to",
"build",
"it",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L1916-L1921 |
152,028 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.buildBookPreface | protected void buildBookPreface(final BuildData buildData) throws BuildProcessingException {
final ContentSpec contentSpec = buildData.getContentSpec();
// Check that should actually use the preface
if (contentSpec.getUseDefaultPreface()) {
final Map<String, String> overrides = buil... | java | protected void buildBookPreface(final BuildData buildData) throws BuildProcessingException {
final ContentSpec contentSpec = buildData.getContentSpec();
// Check that should actually use the preface
if (contentSpec.getUseDefaultPreface()) {
final Map<String, String> overrides = buil... | [
"protected",
"void",
"buildBookPreface",
"(",
"final",
"BuildData",
"buildData",
")",
"throws",
"BuildProcessingException",
"{",
"final",
"ContentSpec",
"contentSpec",
"=",
"buildData",
".",
"getContentSpec",
"(",
")",
";",
"// Check that should actually use the preface",
... | Builds the Preface.xml file for the book.
@param buildData
@throws BuildProcessingException | [
"Builds",
"the",
"Preface",
".",
"xml",
"file",
"for",
"the",
"book",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L2158-L2197 |
152,029 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.buildBookEntityFile | protected String buildBookEntityFile(final BuildData buildData) throws BuildProcessingException {
final ContentSpec contentSpec = buildData.getContentSpec();
final StringBuilder retValue = new StringBuilder();
if (!buildData.getBuildOptions().getUseOldBugLinks() && buildData.getBuildOptions().... | java | protected String buildBookEntityFile(final BuildData buildData) throws BuildProcessingException {
final ContentSpec contentSpec = buildData.getContentSpec();
final StringBuilder retValue = new StringBuilder();
if (!buildData.getBuildOptions().getUseOldBugLinks() && buildData.getBuildOptions().... | [
"protected",
"String",
"buildBookEntityFile",
"(",
"final",
"BuildData",
"buildData",
")",
"throws",
"BuildProcessingException",
"{",
"final",
"ContentSpec",
"contentSpec",
"=",
"buildData",
".",
"getContentSpec",
"(",
")",
";",
"final",
"StringBuilder",
"retValue",
"... | Builds the book .ent file that is a basic requirement to build the book.
@param buildData Information and data structures for the build.
@return The book .ent file filled with content from the Content Spec. | [
"Builds",
"the",
"book",
".",
"ent",
"file",
"that",
"is",
"a",
"basic",
"requirement",
"to",
"build",
"the",
"book",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L2205-L2238 |
152,030 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.setUpRootElement | protected void setUpRootElement(final BuildData buildData, final Level level, final Document doc, Element ele) {
final Element titleNode = doc.createElement("title");
if (buildData.isTranslationBuild() && !isNullOrEmpty(level.getTranslatedTitle())) {
titleNode.setTextContent(DocBookUtilities... | java | protected void setUpRootElement(final BuildData buildData, final Level level, final Document doc, Element ele) {
final Element titleNode = doc.createElement("title");
if (buildData.isTranslationBuild() && !isNullOrEmpty(level.getTranslatedTitle())) {
titleNode.setTextContent(DocBookUtilities... | [
"protected",
"void",
"setUpRootElement",
"(",
"final",
"BuildData",
"buildData",
",",
"final",
"Level",
"level",
",",
"final",
"Document",
"doc",
",",
"Element",
"ele",
")",
"{",
"final",
"Element",
"titleNode",
"=",
"doc",
".",
"createElement",
"(",
"\"title\... | Sets up an elements title, info and id based on the passed level.
@param buildData Information and data structures for the build.
@param level The level to build the root element is being built for.
@param doc The document object the content is being added to.
@param ele | [
"Sets",
"up",
"an",
"elements",
"title",
"info",
"and",
"id",
"based",
"on",
"the",
"passed",
"level",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L2354-L2399 |
152,031 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.createTopicXMLFile | protected String createTopicXMLFile(final BuildData buildData, final SpecTopic specTopic,
final String parentFileLocation) throws BuildProcessingException {
String topicFileName;
final BaseTopicWrapper<?> topic = specTopic.getTopic();
if (topic != null) {
topicFileName =... | java | protected String createTopicXMLFile(final BuildData buildData, final SpecTopic specTopic,
final String parentFileLocation) throws BuildProcessingException {
String topicFileName;
final BaseTopicWrapper<?> topic = specTopic.getTopic();
if (topic != null) {
topicFileName =... | [
"protected",
"String",
"createTopicXMLFile",
"(",
"final",
"BuildData",
"buildData",
",",
"final",
"SpecTopic",
"specTopic",
",",
"final",
"String",
"parentFileLocation",
")",
"throws",
"BuildProcessingException",
"{",
"String",
"topicFileName",
";",
"final",
"BaseTopic... | Creates the Topic component of a chapter.xml for a specific SpecTopic.
@param buildData Information and data structures for the build.
@param specTopic The build topic object to get content from.
@param parentFileLocation The topics parent file location, so the topic can be saved in a subdirectory.
@... | [
"Creates",
"the",
"Topic",
"component",
"of",
"a",
"chapter",
".",
"xml",
"for",
"a",
"specific",
"SpecTopic",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L2650-L2673 |
152,032 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.buildRevisionHistoryFromTemplate | protected void buildRevisionHistoryFromTemplate(final BuildData buildData,
final String revisionHistoryXml) throws BuildProcessingException {
log.info("\tBuilding " + REVISION_HISTORY_FILE_NAME);
Document revHistoryDoc;
try {
revHistoryDoc = XMLUtilities.convertStringToD... | java | protected void buildRevisionHistoryFromTemplate(final BuildData buildData,
final String revisionHistoryXml) throws BuildProcessingException {
log.info("\tBuilding " + REVISION_HISTORY_FILE_NAME);
Document revHistoryDoc;
try {
revHistoryDoc = XMLUtilities.convertStringToD... | [
"protected",
"void",
"buildRevisionHistoryFromTemplate",
"(",
"final",
"BuildData",
"buildData",
",",
"final",
"String",
"revisionHistoryXml",
")",
"throws",
"BuildProcessingException",
"{",
"log",
".",
"info",
"(",
"\"\\tBuilding \"",
"+",
"REVISION_HISTORY_FILE_NAME",
"... | Builds the revision history using the requester of the build.
@param buildData Information and data structures for the build.
@param revisionHistoryXml The Revision_History.xml file/template to add revision information to.
@throws BuildProcessingException Thrown if an unexpected error occurs during building. | [
"Builds",
"the",
"revision",
"history",
"using",
"the",
"requester",
"of",
"the",
"build",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L3061-L3139 |
152,033 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.addRevisionToRevHistory | private void addRevisionToRevHistory(final Node revHistory, final Node revision) {
if (revHistory.hasChildNodes()) {
revHistory.insertBefore(revision, revHistory.getFirstChild());
} else {
revHistory.appendChild(revision);
}
} | java | private void addRevisionToRevHistory(final Node revHistory, final Node revision) {
if (revHistory.hasChildNodes()) {
revHistory.insertBefore(revision, revHistory.getFirstChild());
} else {
revHistory.appendChild(revision);
}
} | [
"private",
"void",
"addRevisionToRevHistory",
"(",
"final",
"Node",
"revHistory",
",",
"final",
"Node",
"revision",
")",
"{",
"if",
"(",
"revHistory",
".",
"hasChildNodes",
"(",
")",
")",
"{",
"revHistory",
".",
"insertBefore",
"(",
"revision",
",",
"revHistor... | Adds a revision element to the list of revisions in a revhistory element. This method ensures that the new revision is at
the top of the revhistory list.
@param revHistory The revhistory element to add the revision to.
@param revision The revision element to be added into the revisionhistory element. | [
"Adds",
"a",
"revision",
"element",
"to",
"the",
"list",
"of",
"revisions",
"in",
"a",
"revhistory",
"element",
".",
"This",
"method",
"ensures",
"that",
"the",
"new",
"revision",
"is",
"at",
"the",
"top",
"of",
"the",
"revhistory",
"list",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L3148-L3154 |
152,034 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.buildTranslateCSChapter | private String buildTranslateCSChapter(final BuildData buildData) {
final ContentSpec contentSpec = buildData.getContentSpec();
final TranslatedContentSpecWrapper translatedContentSpec = EntityUtilities.getClosestTranslatedContentSpecById(providerFactory,
contentSpec.getId(), contentSpec... | java | private String buildTranslateCSChapter(final BuildData buildData) {
final ContentSpec contentSpec = buildData.getContentSpec();
final TranslatedContentSpecWrapper translatedContentSpec = EntityUtilities.getClosestTranslatedContentSpecById(providerFactory,
contentSpec.getId(), contentSpec... | [
"private",
"String",
"buildTranslateCSChapter",
"(",
"final",
"BuildData",
"buildData",
")",
"{",
"final",
"ContentSpec",
"contentSpec",
"=",
"buildData",
".",
"getContentSpec",
"(",
")",
";",
"final",
"TranslatedContentSpecWrapper",
"translatedContentSpec",
"=",
"Entit... | Builds a Chapter with a single paragraph, that contains a link to translate the Content Specification.
@param buildData Information and data structures for the build.@return The Chapter represented as Docbook markup. | [
"Builds",
"a",
"Chapter",
"with",
"a",
"single",
"paragraph",
"that",
"contains",
"a",
"link",
"to",
"translate",
"the",
"Content",
"Specification",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L3270-L3295 |
152,035 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.buildErrorChapterGlossary | private String buildErrorChapterGlossary(final BuildData buildData, final String title) {
final StringBuilder glossary = new StringBuilder("<glossary>");
// Add the title of the glossary
glossary.append("<title>");
if (title != null) {
glossary.append(title);
}
... | java | private String buildErrorChapterGlossary(final BuildData buildData, final String title) {
final StringBuilder glossary = new StringBuilder("<glossary>");
// Add the title of the glossary
glossary.append("<title>");
if (title != null) {
glossary.append(title);
}
... | [
"private",
"String",
"buildErrorChapterGlossary",
"(",
"final",
"BuildData",
"buildData",
",",
"final",
"String",
"title",
")",
"{",
"final",
"StringBuilder",
"glossary",
"=",
"new",
"StringBuilder",
"(",
"\"<glossary>\"",
")",
";",
"// Add the title of the glossary",
... | Builds the Glossary used in the Error Chapter.
@param buildData Information and data structures for the build.
@param title The title for the glossary.
@return A docbook formatted string representation of the glossary. | [
"Builds",
"the",
"Glossary",
"used",
"in",
"the",
"Error",
"Chapter",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L3386-L3464 |
152,036 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.processImageLocations | @SuppressWarnings("unchecked")
private void processImageLocations(final BuildData buildData) {
final List<Integer> topicIds = buildData.getBuildDatabase().getTopicIds();
for (final Integer topicId : topicIds) {
final ITopicNode topicNode = buildData.getBuildDatabase().getTopicNodesForTop... | java | @SuppressWarnings("unchecked")
private void processImageLocations(final BuildData buildData) {
final List<Integer> topicIds = buildData.getBuildDatabase().getTopicIds();
for (final Integer topicId : topicIds) {
final ITopicNode topicNode = buildData.getBuildDatabase().getTopicNodesForTop... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"void",
"processImageLocations",
"(",
"final",
"BuildData",
"buildData",
")",
"{",
"final",
"List",
"<",
"Integer",
">",
"topicIds",
"=",
"buildData",
".",
"getBuildDatabase",
"(",
")",
".",
"getTopi... | Processes the Topics in the BuildDatabase and builds up the images found within the topics XML. If the image reference is
blank or invalid it is replaced by the fail penguin image.
@param buildData Information and data structures for the build. | [
"Processes",
"the",
"Topics",
"in",
"the",
"BuildDatabase",
"and",
"builds",
"up",
"the",
"images",
"found",
"within",
"the",
"topics",
"XML",
".",
"If",
"the",
"image",
"reference",
"is",
"blank",
"or",
"invalid",
"it",
"is",
"replaced",
"by",
"the",
"fai... | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L3650-L3694 |
152,037 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.processTopicSectionInfo | protected void processTopicSectionInfo(final BuildData buildData, final BaseTopicWrapper<?> topic, final Document doc) {
if (doc == null || topic == null) return;
final String infoName;
if (buildData.getDocBookVersion() == DocBookVersion.DOCBOOK_50) {
infoName = "info";
} el... | java | protected void processTopicSectionInfo(final BuildData buildData, final BaseTopicWrapper<?> topic, final Document doc) {
if (doc == null || topic == null) return;
final String infoName;
if (buildData.getDocBookVersion() == DocBookVersion.DOCBOOK_50) {
infoName = "info";
} el... | [
"protected",
"void",
"processTopicSectionInfo",
"(",
"final",
"BuildData",
"buildData",
",",
"final",
"BaseTopicWrapper",
"<",
"?",
">",
"topic",
",",
"final",
"Document",
"doc",
")",
"{",
"if",
"(",
"doc",
"==",
"null",
"||",
"topic",
"==",
"null",
")",
"... | Process a topic and add the section info information. This information consists of the keywordset information. The
keywords are populated using the tags assigned to the topic.
@param buildData Information and data structures for the build.
@param topic The Topic to create the sectioninfo for.
@param doc The ... | [
"Process",
"a",
"topic",
"and",
"add",
"the",
"section",
"info",
"information",
".",
"This",
"information",
"consists",
"of",
"the",
"keywordset",
"information",
".",
"The",
"keywords",
"are",
"populated",
"using",
"the",
"tags",
"assigned",
"to",
"the",
"topi... | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L3806-L3851 |
152,038 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.doFixedURLsPass | protected boolean doFixedURLsPass(final BuildData buildData) throws BuildProcessingException {
log.info("Doing Fixed URL Pass");
final Set<String> processedFileNames = new HashSet<String>();
final Set<SpecNode> nodesWithoutFixedUrls = new HashSet<SpecNode>();
boolean success = true;
... | java | protected boolean doFixedURLsPass(final BuildData buildData) throws BuildProcessingException {
log.info("Doing Fixed URL Pass");
final Set<String> processedFileNames = new HashSet<String>();
final Set<SpecNode> nodesWithoutFixedUrls = new HashSet<SpecNode>();
boolean success = true;
... | [
"protected",
"boolean",
"doFixedURLsPass",
"(",
"final",
"BuildData",
"buildData",
")",
"throws",
"BuildProcessingException",
"{",
"log",
".",
"info",
"(",
"\"Doing Fixed URL Pass\"",
")",
";",
"final",
"Set",
"<",
"String",
">",
"processedFileNames",
"=",
"new",
... | This method does a pass over all the spec nodes and attempts to create unique Fixed URL if one does not
already exist.
@param buildData Information and data structures for the build.
@return True if the fixed url property tags were able to be created, and false otherwise. | [
"This",
"method",
"does",
"a",
"pass",
"over",
"all",
"the",
"spec",
"nodes",
"and",
"attempts",
"to",
"create",
"unique",
"Fixed",
"URL",
"if",
"one",
"does",
"not",
"already",
"exist",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L3860-L3888 |
152,039 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java | DocBookBuilder.addAdditionalFilesToBook | protected void addAdditionalFilesToBook(final BuildData buildData) throws BuildProcessingException {
final FileProvider fileProvider = providerFactory.getProvider(FileProvider.class);
final ContentSpec contentSpec = buildData.getContentSpec();
if (contentSpec.getFiles() != null) {
l... | java | protected void addAdditionalFilesToBook(final BuildData buildData) throws BuildProcessingException {
final FileProvider fileProvider = providerFactory.getProvider(FileProvider.class);
final ContentSpec contentSpec = buildData.getContentSpec();
if (contentSpec.getFiles() != null) {
l... | [
"protected",
"void",
"addAdditionalFilesToBook",
"(",
"final",
"BuildData",
"buildData",
")",
"throws",
"BuildProcessingException",
"{",
"final",
"FileProvider",
"fileProvider",
"=",
"providerFactory",
".",
"getProvider",
"(",
"FileProvider",
".",
"class",
")",
";",
"... | Adds the additional files defined in a content spec to the book.
@param buildData Information and data structures for the build. | [
"Adds",
"the",
"additional",
"files",
"defined",
"in",
"a",
"content",
"spec",
"to",
"the",
"book",
"."
] | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L3922-L3981 |
152,040 | FitLayout/tools | src/main/java/org/fit/layout/tools/BlockBrowser.java | BlockBrowser.segmentPage | private void segmentPage()
{
DefaultContentRect.resetId(); //reset the default ID generator to obtain the same IDs for every segmentation
if (segmentatorCombo.getSelectedIndex() != -1)
{
AreaTreeProvider provider = segmentatorCombo.getItemAt(segmentatorCombo.getSelectedIndex());
... | java | private void segmentPage()
{
DefaultContentRect.resetId(); //reset the default ID generator to obtain the same IDs for every segmentation
if (segmentatorCombo.getSelectedIndex() != -1)
{
AreaTreeProvider provider = segmentatorCombo.getItemAt(segmentatorCombo.getSelectedIndex());
... | [
"private",
"void",
"segmentPage",
"(",
")",
"{",
"DefaultContentRect",
".",
"resetId",
"(",
")",
";",
"//reset the default ID generator to obtain the same IDs for every segmentation",
"if",
"(",
"segmentatorCombo",
".",
"getSelectedIndex",
"(",
")",
"!=",
"-",
"1",
")",... | Segments the page using the chosen provider and parametres. | [
"Segments",
"the",
"page",
"using",
"the",
"chosen",
"provider",
"and",
"parametres",
"."
] | 43a8e3f4ddf21a031d3ab7247b8d37310bda4856 | https://github.com/FitLayout/tools/blob/43a8e3f4ddf21a031d3ab7247b8d37310bda4856/src/main/java/org/fit/layout/tools/BlockBrowser.java#L530-L539 |
152,041 | FitLayout/tools | src/main/java/org/fit/layout/tools/BlockBrowser.java | BlockBrowser.buildLogicalTree | private void buildLogicalTree()
{
if (logicalCombo.getSelectedIndex() != -1)
{
LogicalTreeProvider provider = logicalCombo.getItemAt(logicalCombo.getSelectedIndex());
proc.buildLogicalTree(provider, null); //the parametres should have been set through the GUI
setL... | java | private void buildLogicalTree()
{
if (logicalCombo.getSelectedIndex() != -1)
{
LogicalTreeProvider provider = logicalCombo.getItemAt(logicalCombo.getSelectedIndex());
proc.buildLogicalTree(provider, null); //the parametres should have been set through the GUI
setL... | [
"private",
"void",
"buildLogicalTree",
"(",
")",
"{",
"if",
"(",
"logicalCombo",
".",
"getSelectedIndex",
"(",
")",
"!=",
"-",
"1",
")",
"{",
"LogicalTreeProvider",
"provider",
"=",
"logicalCombo",
".",
"getItemAt",
"(",
"logicalCombo",
".",
"getSelectedIndex",
... | Builds the logical tree the chosen provider and parametres. | [
"Builds",
"the",
"logical",
"tree",
"the",
"chosen",
"provider",
"and",
"parametres",
"."
] | 43a8e3f4ddf21a031d3ab7247b8d37310bda4856 | https://github.com/FitLayout/tools/blob/43a8e3f4ddf21a031d3ab7247b8d37310bda4856/src/main/java/org/fit/layout/tools/BlockBrowser.java#L544-L552 |
152,042 | FitLayout/tools | src/main/java/org/fit/layout/tools/BlockBrowser.java | BlockBrowser.createContentCanvas | private JPanel createContentCanvas()
{
if (contentCanvas != null)
{
contentCanvas = new BrowserPanel(proc.getPage());
contentCanvas.setLayout(null);
selection = new Selection();
contentCanvas.add(selection);
selection.setVisible(false);
... | java | private JPanel createContentCanvas()
{
if (contentCanvas != null)
{
contentCanvas = new BrowserPanel(proc.getPage());
contentCanvas.setLayout(null);
selection = new Selection();
contentCanvas.add(selection);
selection.setVisible(false);
... | [
"private",
"JPanel",
"createContentCanvas",
"(",
")",
"{",
"if",
"(",
"contentCanvas",
"!=",
"null",
")",
"{",
"contentCanvas",
"=",
"new",
"BrowserPanel",
"(",
"proc",
".",
"getPage",
"(",
")",
")",
";",
"contentCanvas",
".",
"setLayout",
"(",
"null",
")"... | Creates the appropriate canvas based on the file type | [
"Creates",
"the",
"appropriate",
"canvas",
"based",
"on",
"the",
"file",
"type"
] | 43a8e3f4ddf21a031d3ab7247b8d37310bda4856 | https://github.com/FitLayout/tools/blob/43a8e3f4ddf21a031d3ab7247b8d37310bda4856/src/main/java/org/fit/layout/tools/BlockBrowser.java#L556-L568 |
152,043 | FitLayout/tools | src/main/java/org/fit/layout/tools/BlockBrowser.java | BlockBrowser.canvasClick | private void canvasClick(int x, int y)
{
//always called listeners
for (CanvasClickListener listener : canvasClickAlwaysListeners)
listener.canvasClicked(x, y);
//selected listener by toggle buttons
for (JToggleButton button : canvasClickToggleListeners.keySet())
... | java | private void canvasClick(int x, int y)
{
//always called listeners
for (CanvasClickListener listener : canvasClickAlwaysListeners)
listener.canvasClicked(x, y);
//selected listener by toggle buttons
for (JToggleButton button : canvasClickToggleListeners.keySet())
... | [
"private",
"void",
"canvasClick",
"(",
"int",
"x",
",",
"int",
"y",
")",
"{",
"//always called listeners",
"for",
"(",
"CanvasClickListener",
"listener",
":",
"canvasClickAlwaysListeners",
")",
"listener",
".",
"canvasClicked",
"(",
"x",
",",
"y",
")",
";",
"/... | This is called when the browser canvas is clicked | [
"This",
"is",
"called",
"when",
"the",
"browser",
"canvas",
"is",
"clicked"
] | 43a8e3f4ddf21a031d3ab7247b8d37310bda4856 | https://github.com/FitLayout/tools/blob/43a8e3f4ddf21a031d3ab7247b8d37310bda4856/src/main/java/org/fit/layout/tools/BlockBrowser.java#L593-L648 |
152,044 | sworisbreathing/sfmf4j | sfmf4j-jpathwatch/src/main/java/com/github/sworisbreathing/sfmf4j/jpathwatch/WatchServiceFileMonitorServiceImpl.java | WatchServiceFileMonitorServiceImpl.cleanup | @SuppressWarnings("PMD.EmptyCatchBlock")
private synchronized void cleanup(final WatchKey key) {
logger.trace("cleanUp {}", key);
try {
key.cancel();
}catch(Exception ex) {
//trap
}
Collection<SFMF4JWatchListener> listeners = listenersByWatchKey.remove... | java | @SuppressWarnings("PMD.EmptyCatchBlock")
private synchronized void cleanup(final WatchKey key) {
logger.trace("cleanUp {}", key);
try {
key.cancel();
}catch(Exception ex) {
//trap
}
Collection<SFMF4JWatchListener> listeners = listenersByWatchKey.remove... | [
"@",
"SuppressWarnings",
"(",
"\"PMD.EmptyCatchBlock\"",
")",
"private",
"synchronized",
"void",
"cleanup",
"(",
"final",
"WatchKey",
"key",
")",
"{",
"logger",
".",
"trace",
"(",
"\"cleanUp {}\"",
",",
"key",
")",
";",
"try",
"{",
"key",
".",
"cancel",
"(",... | Properly unregisters and removes a watch key.
@param key the watch key | [
"Properly",
"unregisters",
"and",
"removes",
"a",
"watch",
"key",
"."
] | 826c2c02af69d55f98e64fbcfae23d0c7bac3f19 | https://github.com/sworisbreathing/sfmf4j/blob/826c2c02af69d55f98e64fbcfae23d0c7bac3f19/sfmf4j-jpathwatch/src/main/java/com/github/sworisbreathing/sfmf4j/jpathwatch/WatchServiceFileMonitorServiceImpl.java#L210-L226 |
152,045 | jkyamog/DeDS | sample_clients/java/src/main/java/nz/net/catalyst/mobile/dds/sample/DDSClient.java | DDSClient.getCapabilities | public static Map<String, String> getCapabilities(HttpServletRequest request, String ddsUrl) throws IOException {
URL url;
try {
url = new URL(ddsUrl + "/get_capabilities?capability=resolution_width&capability=model_name&capability=xhtml_support_level&" +
"headers=" + URLEncoder.encode(... | java | public static Map<String, String> getCapabilities(HttpServletRequest request, String ddsUrl) throws IOException {
URL url;
try {
url = new URL(ddsUrl + "/get_capabilities?capability=resolution_width&capability=model_name&capability=xhtml_support_level&" +
"headers=" + URLEncoder.encode(... | [
"public",
"static",
"Map",
"<",
"String",
",",
"String",
">",
"getCapabilities",
"(",
"HttpServletRequest",
"request",
",",
"String",
"ddsUrl",
")",
"throws",
"IOException",
"{",
"URL",
"url",
";",
"try",
"{",
"url",
"=",
"new",
"URL",
"(",
"ddsUrl",
"+",
... | Get the capabilities as a map of capabilities. There are times that a strict data type is not desirable.
Getting it as map provides some flexibility. This does not require any knowledge of what capabilities
will be returned by the service.
@param request
@param ddsUrl
@return
@throws IOException | [
"Get",
"the",
"capabilities",
"as",
"a",
"map",
"of",
"capabilities",
".",
"There",
"are",
"times",
"that",
"a",
"strict",
"data",
"type",
"is",
"not",
"desirable",
".",
"Getting",
"it",
"as",
"map",
"provides",
"some",
"flexibility",
".",
"This",
"does",
... | d8cf6a294a23daa8e8a92073827c73b1befe3fa1 | https://github.com/jkyamog/DeDS/blob/d8cf6a294a23daa8e8a92073827c73b1befe3fa1/sample_clients/java/src/main/java/nz/net/catalyst/mobile/dds/sample/DDSClient.java#L50-L63 |
152,046 | jkyamog/DeDS | sample_clients/java/src/main/java/nz/net/catalyst/mobile/dds/sample/DDSClient.java | DDSClient.fetchHttpResponse | private static String fetchHttpResponse(URL url) throws IOException {
HttpURLConnection conn = null;
try {
logger.info("fetching from url = " + url);
conn = (HttpURLConnection) url.openConnection();
int response = conn.getResponseCode();
if (response != HttpURLConnection.... | java | private static String fetchHttpResponse(URL url) throws IOException {
HttpURLConnection conn = null;
try {
logger.info("fetching from url = " + url);
conn = (HttpURLConnection) url.openConnection();
int response = conn.getResponseCode();
if (response != HttpURLConnection.... | [
"private",
"static",
"String",
"fetchHttpResponse",
"(",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"HttpURLConnection",
"conn",
"=",
"null",
";",
"try",
"{",
"logger",
".",
"info",
"(",
"\"fetching from url = \"",
"+",
"url",
")",
";",
"conn",
"=",
"(... | convenience method to do a http request on url, and return result as a string
@param url
@return
@throws IOException | [
"convenience",
"method",
"to",
"do",
"a",
"http",
"request",
"on",
"url",
"and",
"return",
"result",
"as",
"a",
"string"
] | d8cf6a294a23daa8e8a92073827c73b1befe3fa1 | https://github.com/jkyamog/DeDS/blob/d8cf6a294a23daa8e8a92073827c73b1befe3fa1/sample_clients/java/src/main/java/nz/net/catalyst/mobile/dds/sample/DDSClient.java#L72-L92 |
152,047 | jkyamog/DeDS | sample_clients/java/src/main/java/nz/net/catalyst/mobile/dds/sample/DDSClient.java | DDSClient.jsonDecode | private static <T> T jsonDecode(String responseContent, TypeReference<T> valueTypeRef) throws IOException {
ObjectMapper mapper = new ObjectMapper();
try {
return mapper.<T>readValue(responseContent, valueTypeRef);
} catch (JsonGenerationException e) {
logger.severe("unable d... | java | private static <T> T jsonDecode(String responseContent, TypeReference<T> valueTypeRef) throws IOException {
ObjectMapper mapper = new ObjectMapper();
try {
return mapper.<T>readValue(responseContent, valueTypeRef);
} catch (JsonGenerationException e) {
logger.severe("unable d... | [
"private",
"static",
"<",
"T",
">",
"T",
"jsonDecode",
"(",
"String",
"responseContent",
",",
"TypeReference",
"<",
"T",
">",
"valueTypeRef",
")",
"throws",
"IOException",
"{",
"ObjectMapper",
"mapper",
"=",
"new",
"ObjectMapper",
"(",
")",
";",
"try",
"{",
... | Given a string and a type ref. Decode the string and return the values.
@param <T>
@param responseContent
@param valueTypeRef
@return
@throws IOException | [
"Given",
"a",
"string",
"and",
"a",
"type",
"ref",
".",
"Decode",
"the",
"string",
"and",
"return",
"the",
"values",
"."
] | d8cf6a294a23daa8e8a92073827c73b1befe3fa1 | https://github.com/jkyamog/DeDS/blob/d8cf6a294a23daa8e8a92073827c73b1befe3fa1/sample_clients/java/src/main/java/nz/net/catalyst/mobile/dds/sample/DDSClient.java#L103-L116 |
152,048 | jkyamog/DeDS | sample_clients/java/src/main/java/nz/net/catalyst/mobile/dds/sample/DDSClient.java | DDSClient.jsonEncode | private static String jsonEncode(Object object) throws IOException {
ObjectMapper mapper = new ObjectMapper();
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
try {
mapper.writeValue(outputStream, object);
return new String(outputStream.toByteArray());
... | java | private static String jsonEncode(Object object) throws IOException {
ObjectMapper mapper = new ObjectMapper();
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
try {
mapper.writeValue(outputStream, object);
return new String(outputStream.toByteArray());
... | [
"private",
"static",
"String",
"jsonEncode",
"(",
"Object",
"object",
")",
"throws",
"IOException",
"{",
"ObjectMapper",
"mapper",
"=",
"new",
"ObjectMapper",
"(",
")",
";",
"ByteArrayOutputStream",
"outputStream",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";... | Encode a java object into a json which is returned as a string
@param object
@return
@throws IOException | [
"Encode",
"a",
"java",
"object",
"into",
"a",
"json",
"which",
"is",
"returned",
"as",
"a",
"string"
] | d8cf6a294a23daa8e8a92073827c73b1befe3fa1 | https://github.com/jkyamog/DeDS/blob/d8cf6a294a23daa8e8a92073827c73b1befe3fa1/sample_clients/java/src/main/java/nz/net/catalyst/mobile/dds/sample/DDSClient.java#L126-L141 |
152,049 | jkyamog/DeDS | sample_clients/java/src/main/java/nz/net/catalyst/mobile/dds/sample/DDSClient.java | DDSClient.getHeadersAsHashMap | private static Map<String, String> getHeadersAsHashMap(HttpServletRequest request) {
Map<String, String> headers = new HashMap<String, String>();
for (Enumeration<?> h=request.getHeaderNames(); h.hasMoreElements();) {
String headerName = (String) h.nextElement();
String headerValue ... | java | private static Map<String, String> getHeadersAsHashMap(HttpServletRequest request) {
Map<String, String> headers = new HashMap<String, String>();
for (Enumeration<?> h=request.getHeaderNames(); h.hasMoreElements();) {
String headerName = (String) h.nextElement();
String headerValue ... | [
"private",
"static",
"Map",
"<",
"String",
",",
"String",
">",
"getHeadersAsHashMap",
"(",
"HttpServletRequest",
"request",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
... | convenience method turn http headers into a hash map
@param request
@return | [
"convenience",
"method",
"turn",
"http",
"headers",
"into",
"a",
"hash",
"map"
] | d8cf6a294a23daa8e8a92073827c73b1befe3fa1 | https://github.com/jkyamog/DeDS/blob/d8cf6a294a23daa8e8a92073827c73b1befe3fa1/sample_clients/java/src/main/java/nz/net/catalyst/mobile/dds/sample/DDSClient.java#L149-L160 |
152,050 | jbundle/jbundle | base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/html/HTMLServlet.java | HTMLServlet.addBrowserProperties | public void addBrowserProperties(HttpServletRequest req, PropertyOwner servletTask)
{
String strBrowser = this.getBrowser(req);
String strOS = this.getOS(req);
servletTask.setProperty(DBParams.BROWSER, strBrowser);
servletTask.setProperty(DBParams.OS, strOS);
} | java | public void addBrowserProperties(HttpServletRequest req, PropertyOwner servletTask)
{
String strBrowser = this.getBrowser(req);
String strOS = this.getOS(req);
servletTask.setProperty(DBParams.BROWSER, strBrowser);
servletTask.setProperty(DBParams.OS, strOS);
} | [
"public",
"void",
"addBrowserProperties",
"(",
"HttpServletRequest",
"req",
",",
"PropertyOwner",
"servletTask",
")",
"{",
"String",
"strBrowser",
"=",
"this",
".",
"getBrowser",
"(",
"req",
")",
";",
"String",
"strOS",
"=",
"this",
".",
"getOS",
"(",
"req",
... | Add the browser properties to this servlet task.
@param req
@param servletTask | [
"Add",
"the",
"browser",
"properties",
"to",
"this",
"servlet",
"task",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/html/HTMLServlet.java#L154-L160 |
152,051 | isisaddons-legacy/isis-module-settings | dom/src/main/java/org/isisaddons/module/settings/dom/UserSettingRepository.java | UserSettingRepository.newLocalDate | @Programmatic
public UserSettingJdo newLocalDate(
final String user,
final String key,
final String description,
final LocalDate value) {
return newSetting(user, key, description, SettingType.LOCAL_DATE, value.toString(SettingAbstract.DATE_FORMATTER));
} | java | @Programmatic
public UserSettingJdo newLocalDate(
final String user,
final String key,
final String description,
final LocalDate value) {
return newSetting(user, key, description, SettingType.LOCAL_DATE, value.toString(SettingAbstract.DATE_FORMATTER));
} | [
"@",
"Programmatic",
"public",
"UserSettingJdo",
"newLocalDate",
"(",
"final",
"String",
"user",
",",
"final",
"String",
"key",
",",
"final",
"String",
"description",
",",
"final",
"LocalDate",
"value",
")",
"{",
"return",
"newSetting",
"(",
"user",
",",
"key"... | region > newLocalDate | [
"region",
">",
"newLocalDate"
] | e56c4e4a828b37381e7af7426c1cf1b26739f23e | https://github.com/isisaddons-legacy/isis-module-settings/blob/e56c4e4a828b37381e7af7426c1cf1b26739f23e/dom/src/main/java/org/isisaddons/module/settings/dom/UserSettingRepository.java#L131-L138 |
152,052 | rometools/rome-certiorem | src/main/java/com/rometools/certiorem/hub/notify/standard/UnthreadedNotifier.java | UnthreadedNotifier.enqueueNotification | @Override
protected void enqueueNotification(final Notification not) {
not.lastRun = System.currentTimeMillis();
final SubscriptionSummary summary = postNotification(not.subscriber, not.mimeType, not.payload);
not.callback.onSummaryInfo(summary);
} | java | @Override
protected void enqueueNotification(final Notification not) {
not.lastRun = System.currentTimeMillis();
final SubscriptionSummary summary = postNotification(not.subscriber, not.mimeType, not.payload);
not.callback.onSummaryInfo(summary);
} | [
"@",
"Override",
"protected",
"void",
"enqueueNotification",
"(",
"final",
"Notification",
"not",
")",
"{",
"not",
".",
"lastRun",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"final",
"SubscriptionSummary",
"summary",
"=",
"postNotification",
"(",
"n... | A blocking call that performs a notification. If there are pending retries that are older
than two minutes old, they will be retried before the method returns.
@param not | [
"A",
"blocking",
"call",
"that",
"performs",
"a",
"notification",
".",
"If",
"there",
"are",
"pending",
"retries",
"that",
"are",
"older",
"than",
"two",
"minutes",
"old",
"they",
"will",
"be",
"retried",
"before",
"the",
"method",
"returns",
"."
] | e5a003193dd2abd748e77961c0f216a7f5690712 | https://github.com/rometools/rome-certiorem/blob/e5a003193dd2abd748e77961c0f216a7f5690712/src/main/java/com/rometools/certiorem/hub/notify/standard/UnthreadedNotifier.java#L36-L41 |
152,053 | jbundle/jbundle | base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/report/XTechHelpScreen.java | XTechHelpScreen.printHtmlHeaderArea | public void printHtmlHeaderArea(PrintWriter out)
{
ClassInfoModel classInfo = ((HelpScreen)this.getScreenField()).getClassInfo();
if (classInfo != null)
if (classInfo.isValidRecord())
{
String strHeader =
" <title>Technical Help Screen - " + Utility.encod... | java | public void printHtmlHeaderArea(PrintWriter out)
{
ClassInfoModel classInfo = ((HelpScreen)this.getScreenField()).getClassInfo();
if (classInfo != null)
if (classInfo.isValidRecord())
{
String strHeader =
" <title>Technical Help Screen - " + Utility.encod... | [
"public",
"void",
"printHtmlHeaderArea",
"(",
"PrintWriter",
"out",
")",
"{",
"ClassInfoModel",
"classInfo",
"=",
"(",
"(",
"HelpScreen",
")",
"this",
".",
"getScreenField",
"(",
")",
")",
".",
"getClassInfo",
"(",
")",
";",
"if",
"(",
"classInfo",
"!=",
"... | Get the top menu. | [
"Get",
"the",
"top",
"menu",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/report/XTechHelpScreen.java#L69-L82 |
152,054 | jbundle/jbundle | app/program/demo/src/main/java/org/jbundle/app/program/demo/BaseSetupSiteProcess.java | BaseSetupSiteProcess.processMessage | public BaseMessage processMessage(BaseMessage message)
{
RunRemoteProcessMessageData runRemoteProcessMessageData = (RunRemoteProcessMessageData)message.getMessageDataDesc(null);
if (runRemoteProcessMessageData == null)
message.addMessageDataDesc(runRemoteProcessMessageData = new RunRemot... | java | public BaseMessage processMessage(BaseMessage message)
{
RunRemoteProcessMessageData runRemoteProcessMessageData = (RunRemoteProcessMessageData)message.getMessageDataDesc(null);
if (runRemoteProcessMessageData == null)
message.addMessageDataDesc(runRemoteProcessMessageData = new RunRemot... | [
"public",
"BaseMessage",
"processMessage",
"(",
"BaseMessage",
"message",
")",
"{",
"RunRemoteProcessMessageData",
"runRemoteProcessMessageData",
"=",
"(",
"RunRemoteProcessMessageData",
")",
"message",
".",
"getMessageDataDesc",
"(",
"null",
")",
";",
"if",
"(",
"runRe... | Process this message and return a reply. | [
"Process",
"this",
"message",
"and",
"return",
"a",
"reply",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/demo/src/main/java/org/jbundle/app/program/demo/BaseSetupSiteProcess.java#L87-L99 |
152,055 | jbundle/jbundle | app/program/demo/src/main/java/org/jbundle/app/program/demo/BaseSetupSiteProcess.java | BaseSetupSiteProcess.createCustomArchive | public void createCustomArchive(String destArchivePath, String homePath, String templateArchivePath, String templateFilename)
{
Record recUser = this.getMainRecord();
Map<String,String> map = new HashMap<String,String>();
map.put("${email}", recUser.getField(UserInfo.USER_NAME).toString());
... | java | public void createCustomArchive(String destArchivePath, String homePath, String templateArchivePath, String templateFilename)
{
Record recUser = this.getMainRecord();
Map<String,String> map = new HashMap<String,String>();
map.put("${email}", recUser.getField(UserInfo.USER_NAME).toString());
... | [
"public",
"void",
"createCustomArchive",
"(",
"String",
"destArchivePath",
",",
"String",
"homePath",
",",
"String",
"templateArchivePath",
",",
"String",
"templateFilename",
")",
"{",
"Record",
"recUser",
"=",
"this",
".",
"getMainRecord",
"(",
")",
";",
"Map",
... | CreateCustomArchive Method. | [
"CreateCustomArchive",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/demo/src/main/java/org/jbundle/app/program/demo/BaseSetupSiteProcess.java#L254-L303 |
152,056 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/filter/StringSubFileFilter.java | StringSubFileFilter.setMainKey | public boolean setMainKey(boolean bDisplayOption, Boolean boolSetModified, boolean bSetIfModified)
{
super.setMainKey(bDisplayOption, boolSetModified, bSetIfModified);
boolean bNonNulls = false; // Default to yes, all keys are null.
if (m_fldThisFile != null)
{
m_fldThis... | java | public boolean setMainKey(boolean bDisplayOption, Boolean boolSetModified, boolean bSetIfModified)
{
super.setMainKey(bDisplayOption, boolSetModified, bSetIfModified);
boolean bNonNulls = false; // Default to yes, all keys are null.
if (m_fldThisFile != null)
{
m_fldThis... | [
"public",
"boolean",
"setMainKey",
"(",
"boolean",
"bDisplayOption",
",",
"Boolean",
"boolSetModified",
",",
"boolean",
"bSetIfModified",
")",
"{",
"super",
".",
"setMainKey",
"(",
"bDisplayOption",
",",
"boolSetModified",
",",
"bSetIfModified",
")",
";",
"boolean",... | Setup the target key field to the initial string values.
@oaram bDisplayOption If true, display changes.
@param boolSetModified - If not null, set this field's modified flag to this value
@return false If this key was set to all nulls. | [
"Setup",
"the",
"target",
"key",
"field",
"to",
"the",
"initial",
"string",
"values",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/filter/StringSubFileFilter.java#L110-L133 |
152,057 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/cpa/Vessel.java | Vessel.update | public void update(long time, double latitude, double longitude, double rateOfTurn)
{
if (strat == Strategy.LONG)
{
throw new IllegalStateException("mixing short/long update");
}
strat = Strategy.SHORT;
lock.lock();
try
{
if (... | java | public void update(long time, double latitude, double longitude, double rateOfTurn)
{
if (strat == Strategy.LONG)
{
throw new IllegalStateException("mixing short/long update");
}
strat = Strategy.SHORT;
lock.lock();
try
{
if (... | [
"public",
"void",
"update",
"(",
"long",
"time",
",",
"double",
"latitude",
",",
"double",
"longitude",
",",
"double",
"rateOfTurn",
")",
"{",
"if",
"(",
"strat",
"==",
"Strategy",
".",
"LONG",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"mix... | Updates values and calculates speed and bearing.
<p>Don't mix short and long update method usage in same instance!
@param time
@param latitude
@param longitude
@param rateOfTurn Degrees / minute
@throws IllegalStateException If mixing short and long update method usage in same instance! | [
"Updates",
"values",
"and",
"calculates",
"speed",
"and",
"bearing",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/cpa/Vessel.java#L81-L109 |
152,058 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/cpa/Vessel.java | Vessel.update | public void update(long time, double latitude, double longitude, double speed, double bearing, double rateOfTurn)
{
if (strat == Strategy.SHORT)
{
throw new IllegalStateException("mixing short/long update");
}
strat = Strategy.LONG;
lock.lock();
tr... | java | public void update(long time, double latitude, double longitude, double speed, double bearing, double rateOfTurn)
{
if (strat == Strategy.SHORT)
{
throw new IllegalStateException("mixing short/long update");
}
strat = Strategy.LONG;
lock.lock();
tr... | [
"public",
"void",
"update",
"(",
"long",
"time",
",",
"double",
"latitude",
",",
"double",
"longitude",
",",
"double",
"speed",
",",
"double",
"bearing",
",",
"double",
"rateOfTurn",
")",
"{",
"if",
"(",
"strat",
"==",
"Strategy",
".",
"SHORT",
")",
"{",... | Updates values.
<p>Don't mix short and long update method usage in same instance!
@param time
@param latitude
@param longitude
@param speed
@param bearing Degrees
@param rateOfTurn Degrees / minute
@throws IllegalStateException If mixing short and long update method usage in same instance! | [
"Updates",
"values",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/cpa/Vessel.java#L123-L145 |
152,059 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/cpa/Vessel.java | Vessel.estimatedLatitude | public final double estimatedLatitude(long et)
{
et = correctedTime(et);
lock.lock();
try
{
calc();
if (rateOfTurn == 0)
{
double dist = calcDist(et);
return latitude+deltaLatitude(dist, bearing);
... | java | public final double estimatedLatitude(long et)
{
et = correctedTime(et);
lock.lock();
try
{
calc();
if (rateOfTurn == 0)
{
double dist = calcDist(et);
return latitude+deltaLatitude(dist, bearing);
... | [
"public",
"final",
"double",
"estimatedLatitude",
"(",
"long",
"et",
")",
"{",
"et",
"=",
"correctedTime",
"(",
"et",
")",
";",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"calc",
"(",
")",
";",
"if",
"(",
"rateOfTurn",
"==",
"0",
")",
"{",
"... | Returns estimated latitude at et
@param et
@return | [
"Returns",
"estimated",
"latitude",
"at",
"et"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/cpa/Vessel.java#L197-L219 |
152,060 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/cpa/Vessel.java | Vessel.estimatedLongitude | public final double estimatedLongitude(long et)
{
et = correctedTime(et);
lock.lock();
try
{
calc();
if (rateOfTurn == 0)
{
double dist = calcDist(et);
return addLongitude(longitude, deltaLongitude(latitude... | java | public final double estimatedLongitude(long et)
{
et = correctedTime(et);
lock.lock();
try
{
calc();
if (rateOfTurn == 0)
{
double dist = calcDist(et);
return addLongitude(longitude, deltaLongitude(latitude... | [
"public",
"final",
"double",
"estimatedLongitude",
"(",
"long",
"et",
")",
"{",
"et",
"=",
"correctedTime",
"(",
"et",
")",
";",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"calc",
"(",
")",
";",
"if",
"(",
"rateOfTurn",
"==",
"0",
")",
"{",
... | Return estimated longitude at et
@param et
@return | [
"Return",
"estimated",
"longitude",
"at",
"et"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/cpa/Vessel.java#L225-L247 |
152,061 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/cpa/Vessel.java | Vessel.estimatedLocation | public final Location estimatedLocation(long et)
{
lock.lock();
try
{
return new Location(estimatedLatitude(et), estimatedLongitude(et));
}
finally
{
lock.unlock();
}
} | java | public final Location estimatedLocation(long et)
{
lock.lock();
try
{
return new Location(estimatedLatitude(et), estimatedLongitude(et));
}
finally
{
lock.unlock();
}
} | [
"public",
"final",
"Location",
"estimatedLocation",
"(",
"long",
"et",
")",
"{",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"return",
"new",
"Location",
"(",
"estimatedLatitude",
"(",
"et",
")",
",",
"estimatedLongitude",
"(",
"et",
")",
")",
";",
... | Using this method protects from parallel updates
@param et Estimated time
@return | [
"Using",
"this",
"method",
"protects",
"from",
"parallel",
"updates"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/cpa/Vessel.java#L253-L264 |
152,062 | Shredder121/jda-async-packetprovider | src/main/java/com/github/shredder121/asyncaudio/common/ProvideForkJoinTask.java | ProvideForkJoinTask.optionallyCopyData | private static DatagramPacket optionallyCopyData(DatagramPacket packet) {
if (packet != null) {
packet.setData(packet.getData().clone(), packet.getOffset(), packet.getLength());
}
return packet;
} | java | private static DatagramPacket optionallyCopyData(DatagramPacket packet) {
if (packet != null) {
packet.setData(packet.getData().clone(), packet.getOffset(), packet.getLength());
}
return packet;
} | [
"private",
"static",
"DatagramPacket",
"optionallyCopyData",
"(",
"DatagramPacket",
"packet",
")",
"{",
"if",
"(",
"packet",
"!=",
"null",
")",
"{",
"packet",
".",
"setData",
"(",
"packet",
".",
"getData",
"(",
")",
".",
"clone",
"(",
")",
",",
"packet",
... | Makes a copy of the data in the packet to make the packet safe to store for longer periods of time.
<p>
JDA changed to have only one backing array for all packets, to reduce allocations.
This means that in JAPP code we have to copy the packet data before storing it for longer periods of time.
</p>
@param packet the p... | [
"Makes",
"a",
"copy",
"of",
"the",
"data",
"in",
"the",
"packet",
"to",
"make",
"the",
"packet",
"safe",
"to",
"store",
"for",
"longer",
"periods",
"of",
"time",
"."
] | ef9cedd3136bbc31ee751511586351c21042b291 | https://github.com/Shredder121/jda-async-packetprovider/blob/ef9cedd3136bbc31ee751511586351c21042b291/src/main/java/com/github/shredder121/asyncaudio/common/ProvideForkJoinTask.java#L73-L78 |
152,063 | jbundle/jbundle | thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/SendQueueProxy.java | SendQueueProxy.sendMessage | public void sendMessage(Message message) throws RemoteException
{
BaseTransport transport = this.createProxyTransport(SEND_MESSAGE);
transport.addParam(MESSAGE, message); // Don't use COMMAND
transport.sendMessageAndGetReply();
} | java | public void sendMessage(Message message) throws RemoteException
{
BaseTransport transport = this.createProxyTransport(SEND_MESSAGE);
transport.addParam(MESSAGE, message); // Don't use COMMAND
transport.sendMessageAndGetReply();
} | [
"public",
"void",
"sendMessage",
"(",
"Message",
"message",
")",
"throws",
"RemoteException",
"{",
"BaseTransport",
"transport",
"=",
"this",
".",
"createProxyTransport",
"(",
"SEND_MESSAGE",
")",
";",
"transport",
".",
"addParam",
"(",
"MESSAGE",
",",
"message",
... | Send a remote message.
@param message The message to send. | [
"Send",
"a",
"remote",
"message",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/SendQueueProxy.java#L60-L65 |
152,064 | JM-Lab/utils-java9 | src/main/java/kr/jm/utils/flow/subscriber/JMSubscriberBuilder.java | JMSubscriberBuilder.getSOPLSubscriber | public static <I> JMSubscriber<I> getSOPLSubscriber(
Function<I, ?> transformFunction) {
return build(o -> System.out.println(transformFunction.apply(o)));
} | java | public static <I> JMSubscriber<I> getSOPLSubscriber(
Function<I, ?> transformFunction) {
return build(o -> System.out.println(transformFunction.apply(o)));
} | [
"public",
"static",
"<",
"I",
">",
"JMSubscriber",
"<",
"I",
">",
"getSOPLSubscriber",
"(",
"Function",
"<",
"I",
",",
"?",
">",
"transformFunction",
")",
"{",
"return",
"build",
"(",
"o",
"->",
"System",
".",
"out",
".",
"println",
"(",
"transformFuncti... | Gets sopl subscriber.
@param <I> the type parameter
@param transformFunction the transform function
@return the sopl subscriber | [
"Gets",
"sopl",
"subscriber",
"."
] | ee80235b2760396a616cf7563cbdc98d4affe8e1 | https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/flow/subscriber/JMSubscriberBuilder.java#L40-L43 |
152,065 | JM-Lab/utils-java9 | src/main/java/kr/jm/utils/flow/subscriber/JMSubscriberBuilder.java | JMSubscriberBuilder.getJsonStringSOPLSubscriber | public static <I> JMSubscriber<I> getJsonStringSOPLSubscriber(
Function<I, ?> transformFunction) {
return getSOPLSubscriber(
o -> JMJson.toJsonString(transformFunction.apply(o)));
} | java | public static <I> JMSubscriber<I> getJsonStringSOPLSubscriber(
Function<I, ?> transformFunction) {
return getSOPLSubscriber(
o -> JMJson.toJsonString(transformFunction.apply(o)));
} | [
"public",
"static",
"<",
"I",
">",
"JMSubscriber",
"<",
"I",
">",
"getJsonStringSOPLSubscriber",
"(",
"Function",
"<",
"I",
",",
"?",
">",
"transformFunction",
")",
"{",
"return",
"getSOPLSubscriber",
"(",
"o",
"->",
"JMJson",
".",
"toJsonString",
"(",
"tran... | Gets json string sopl subscriber.
@param <I> the type parameter
@param transformFunction the transform function
@return the json string sopl subscriber | [
"Gets",
"json",
"string",
"sopl",
"subscriber",
"."
] | ee80235b2760396a616cf7563cbdc98d4affe8e1 | https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/flow/subscriber/JMSubscriberBuilder.java#L52-L56 |
152,066 | JM-Lab/utils-java9 | src/main/java/kr/jm/utils/flow/subscriber/JMSubscriberBuilder.java | JMSubscriberBuilder.buildJsonStringFileSubscriber | public static <I> JMFileSubscriber<I> buildJsonStringFileSubscriber(
String filePath, Function<Object, String> toStringFunction) {
return new JMFileSubscriber<>(filePath, toStringFunction);
} | java | public static <I> JMFileSubscriber<I> buildJsonStringFileSubscriber(
String filePath, Function<Object, String> toStringFunction) {
return new JMFileSubscriber<>(filePath, toStringFunction);
} | [
"public",
"static",
"<",
"I",
">",
"JMFileSubscriber",
"<",
"I",
">",
"buildJsonStringFileSubscriber",
"(",
"String",
"filePath",
",",
"Function",
"<",
"Object",
",",
"String",
">",
"toStringFunction",
")",
"{",
"return",
"new",
"JMFileSubscriber",
"<>",
"(",
... | Build json string file subscriber jm file subscriber.
@param <I> the type parameter
@param filePath the file path
@param toStringFunction the to string function
@return the jm file subscriber | [
"Build",
"json",
"string",
"file",
"subscriber",
"jm",
"file",
"subscriber",
"."
] | ee80235b2760396a616cf7563cbdc98d4affe8e1 | https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/flow/subscriber/JMSubscriberBuilder.java#L89-L92 |
152,067 | tacitknowledge/discovery | src/main/java/com/tacitknowledge/util/discovery/ClasspathFileReader.java | ClasspathFileReader.findFile | private File findFile(String fileName, List path)
{
final String methodName = "findFile(): ";
String fileSeparator = System.getProperty("file.separator");
for (Iterator i = path.iterator(); i.hasNext();)
{
String directory = (String) i.next();
if (!directory.e... | java | private File findFile(String fileName, List path)
{
final String methodName = "findFile(): ";
String fileSeparator = System.getProperty("file.separator");
for (Iterator i = path.iterator(); i.hasNext();)
{
String directory = (String) i.next();
if (!directory.e... | [
"private",
"File",
"findFile",
"(",
"String",
"fileName",
",",
"List",
"path",
")",
"{",
"final",
"String",
"methodName",
"=",
"\"findFile(): \"",
";",
"String",
"fileSeparator",
"=",
"System",
".",
"getProperty",
"(",
"\"file.separator\"",
")",
";",
"for",
"(... | Finds a file if it exists in a list of provided paths
@param fileName the name of the file
@param path a list of file paths
@return a file or null if none is found | [
"Finds",
"a",
"file",
"if",
"it",
"exists",
"in",
"a",
"list",
"of",
"provided",
"paths"
] | 700f5492c9cb5c0146d684acb38b71fd4ef4e97a | https://github.com/tacitknowledge/discovery/blob/700f5492c9cb5c0146d684acb38b71fd4ef4e97a/src/main/java/com/tacitknowledge/util/discovery/ClasspathFileReader.java#L184-L208 |
152,068 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/event/MoveIDToCodeHandler.java | MoveIDToCodeHandler.getCodeField | public BaseField getCodeField()
{
Record record = this.getOwner();
if (m_iCodeField != null)
return record.getField(m_iCodeField);
else
return record.getKeyArea(record.getCodeKeyArea()).getField(DBConstants.MAIN_KEY_FIELD);
} | java | public BaseField getCodeField()
{
Record record = this.getOwner();
if (m_iCodeField != null)
return record.getField(m_iCodeField);
else
return record.getKeyArea(record.getCodeKeyArea()).getField(DBConstants.MAIN_KEY_FIELD);
} | [
"public",
"BaseField",
"getCodeField",
"(",
")",
"{",
"Record",
"record",
"=",
"this",
".",
"getOwner",
"(",
")",
";",
"if",
"(",
"m_iCodeField",
"!=",
"null",
")",
"return",
"record",
".",
"getField",
"(",
"m_iCodeField",
")",
";",
"else",
"return",
"re... | Get the code field.
@return The code field (or the index field if not found) | [
"Get",
"the",
"code",
"field",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/MoveIDToCodeHandler.java#L96-L103 |
152,069 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/event/MoveIDToCodeHandler.java | MoveIDToCodeHandler.moveIDToCodeField | public int moveIDToCodeField()
{
if (this.getCodeField().isNull())
return getCodeField().moveFieldToThis((BaseField)this.getOwner().getCounterField());
else
return DBConstants.NORMAL_RETURN;
} | java | public int moveIDToCodeField()
{
if (this.getCodeField().isNull())
return getCodeField().moveFieldToThis((BaseField)this.getOwner().getCounterField());
else
return DBConstants.NORMAL_RETURN;
} | [
"public",
"int",
"moveIDToCodeField",
"(",
")",
"{",
"if",
"(",
"this",
".",
"getCodeField",
"(",
")",
".",
"isNull",
"(",
")",
")",
"return",
"getCodeField",
"(",
")",
".",
"moveFieldToThis",
"(",
"(",
"BaseField",
")",
"this",
".",
"getOwner",
"(",
"... | Move the ID field to the code field.
@return | [
"Move",
"the",
"ID",
"field",
"to",
"the",
"code",
"field",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/MoveIDToCodeHandler.java#L108-L114 |
152,070 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/manual/convert/ConvertBase.java | ConvertBase.tabsToSpaces | public String tabsToSpaces(String string)
{
int iOffset = 0;
for (int i = 0; i < string.length(); i++)
{
if (string.charAt(i) == '\n')
iOffset = i + 1;
if (string.charAt(i) == '\t')
{
int iSpaces = (i - iOffset) % 4;
... | java | public String tabsToSpaces(String string)
{
int iOffset = 0;
for (int i = 0; i < string.length(); i++)
{
if (string.charAt(i) == '\n')
iOffset = i + 1;
if (string.charAt(i) == '\t')
{
int iSpaces = (i - iOffset) % 4;
... | [
"public",
"String",
"tabsToSpaces",
"(",
"String",
"string",
")",
"{",
"int",
"iOffset",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"string",
".",
"length",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"string",
".",
"cha... | Convert the tabs to spaces. | [
"Convert",
"the",
"tabs",
"to",
"spaces",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/manual/convert/ConvertBase.java#L134-L150 |
152,071 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenDialog.java | ScreenDialog.setSampleStyle | public void setSampleStyle()
{
Color colorBackground = ScreenUtil.getColor(ScreenUtil.BACKGROUND_COLOR, null, properties);
Color colorControl = ScreenUtil.getColor(ScreenUtil.CONTROL_COLOR, null, properties);
Color colorText = ScreenUtil.getColor(ScreenUtil.TEXT_COLOR, null, properties);
... | java | public void setSampleStyle()
{
Color colorBackground = ScreenUtil.getColor(ScreenUtil.BACKGROUND_COLOR, null, properties);
Color colorControl = ScreenUtil.getColor(ScreenUtil.CONTROL_COLOR, null, properties);
Color colorText = ScreenUtil.getColor(ScreenUtil.TEXT_COLOR, null, properties);
... | [
"public",
"void",
"setSampleStyle",
"(",
")",
"{",
"Color",
"colorBackground",
"=",
"ScreenUtil",
".",
"getColor",
"(",
"ScreenUtil",
".",
"BACKGROUND_COLOR",
",",
"null",
",",
"properties",
")",
";",
"Color",
"colorControl",
"=",
"ScreenUtil",
".",
"getColor",
... | Handle the button actions. | [
"Handle",
"the",
"button",
"actions",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenDialog.java#L499-L528 |
152,072 | PuyallupFoursquare/ccb-api-client-java | src/main/java/com/p4square/ccbapi/CCBXmlBinder.java | CCBXmlBinder.getJAXBContext | private JAXBContext getJAXBContext(Class<? extends CCBAPIResponse> responseClass) {
if (!jaxbContextCache.containsKey(responseClass)) {
synchronized (jaxbContextCache) {
// Check again to be sure.
if (!jaxbContextCache.containsKey(responseClass)) {
... | java | private JAXBContext getJAXBContext(Class<? extends CCBAPIResponse> responseClass) {
if (!jaxbContextCache.containsKey(responseClass)) {
synchronized (jaxbContextCache) {
// Check again to be sure.
if (!jaxbContextCache.containsKey(responseClass)) {
... | [
"private",
"JAXBContext",
"getJAXBContext",
"(",
"Class",
"<",
"?",
"extends",
"CCBAPIResponse",
">",
"responseClass",
")",
"{",
"if",
"(",
"!",
"jaxbContextCache",
".",
"containsKey",
"(",
"responseClass",
")",
")",
"{",
"synchronized",
"(",
"jaxbContextCache",
... | Find or create the JAXBContext for a CCBAPIResponse implementation.
@param responseClass The response implementation class.
@return a JAXBContext which can be used to unmarshell the responseClass. | [
"Find",
"or",
"create",
"the",
"JAXBContext",
"for",
"a",
"CCBAPIResponse",
"implementation",
"."
] | 54a7a3184dc565fe513aa520e1344b2303ea6834 | https://github.com/PuyallupFoursquare/ccb-api-client-java/blob/54a7a3184dc565fe513aa520e1344b2303ea6834/src/main/java/com/p4square/ccbapi/CCBXmlBinder.java#L62-L77 |
152,073 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/ChangeOnChangeHandler.java | ChangeOnChangeHandler.fieldChanged | public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
if (m_bSetModified)
m_fldTarget.setModified(true);
return m_fldTarget.handleFieldChanged(bDisplayOption, iMoveMode); // init dependent field
} | java | public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
if (m_bSetModified)
m_fldTarget.setModified(true);
return m_fldTarget.handleFieldChanged(bDisplayOption, iMoveMode); // init dependent field
} | [
"public",
"int",
"fieldChanged",
"(",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"if",
"(",
"m_bSetModified",
")",
"m_fldTarget",
".",
"setModified",
"(",
"true",
")",
";",
"return",
"m_fldTarget",
".",
"handleFieldChanged",
"(",
"bDisplayOp... | The Field has Changed.
Initialize the target field also.
@param bDisplayOption If true, display the change.
@param iMoveMode The type of move being done (init/read/screen).
@return The error code (or NORMAL_RETURN if okay).
Field Changed, init the field. | [
"The",
"Field",
"has",
"Changed",
".",
"Initialize",
"the",
"target",
"field",
"also",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ChangeOnChangeHandler.java#L109-L114 |
152,074 | tvesalainen/hoski-lib | src/main/java/fi/hoski/datastore/repository/DataObjectModel.java | DataObjectModel.convert | public Object convert(String property, Object value)
{
if (value == null)
{
return defaultMap.get(property);
}
Class<?> type = getType(property);
if (type == null)
{
throw new IllegalArgumentException(property+" unknown");
}
... | java | public Object convert(String property, Object value)
{
if (value == null)
{
return defaultMap.get(property);
}
Class<?> type = getType(property);
if (type == null)
{
throw new IllegalArgumentException(property+" unknown");
}
... | [
"public",
"Object",
"convert",
"(",
"String",
"property",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"defaultMap",
".",
"get",
"(",
"property",
")",
";",
"}",
"Class",
"<",
"?",
">",
"type",
"=",
"getType"... | Tries to convert object to model type
@param value
@return | [
"Tries",
"to",
"convert",
"object",
"to",
"model",
"type"
] | 9b5bab44113e0adb74bf1ee436013e8a7c608d00 | https://github.com/tvesalainen/hoski-lib/blob/9b5bab44113e0adb74bf1ee436013e8a7c608d00/src/main/java/fi/hoski/datastore/repository/DataObjectModel.java#L141-L153 |
152,075 | tvesalainen/hoski-lib | src/main/java/fi/hoski/datastore/repository/DataObjectModel.java | DataObjectModel.view | public DataObjectModel view(int from)
{
DataObjectModel view = clone();
view.propertyList = propertyList.subList(from, propertyList.size());
return view;
} | java | public DataObjectModel view(int from)
{
DataObjectModel view = clone();
view.propertyList = propertyList.subList(from, propertyList.size());
return view;
} | [
"public",
"DataObjectModel",
"view",
"(",
"int",
"from",
")",
"{",
"DataObjectModel",
"view",
"=",
"clone",
"(",
")",
";",
"view",
".",
"propertyList",
"=",
"propertyList",
".",
"subList",
"(",
"from",
",",
"propertyList",
".",
"size",
"(",
")",
")",
";"... | Returns a clone of this model where only propertyList starting from from
are present.
@param from
@return | [
"Returns",
"a",
"clone",
"of",
"this",
"model",
"where",
"only",
"propertyList",
"starting",
"from",
"from",
"are",
"present",
"."
] | 9b5bab44113e0adb74bf1ee436013e8a7c608d00 | https://github.com/tvesalainen/hoski-lib/blob/9b5bab44113e0adb74bf1ee436013e8a7c608d00/src/main/java/fi/hoski/datastore/repository/DataObjectModel.java#L160-L165 |
152,076 | tvesalainen/hoski-lib | src/main/java/fi/hoski/datastore/repository/DataObjectModel.java | DataObjectModel.view | public DataObjectModel view(String... properties)
{
DataObjectModel view = clone();
view.propertyList = new ArrayList<String>();
for (String property : properties)
{
view.propertyList.add(property);
}
return view;
} | java | public DataObjectModel view(String... properties)
{
DataObjectModel view = clone();
view.propertyList = new ArrayList<String>();
for (String property : properties)
{
view.propertyList.add(property);
}
return view;
} | [
"public",
"DataObjectModel",
"view",
"(",
"String",
"...",
"properties",
")",
"{",
"DataObjectModel",
"view",
"=",
"clone",
"(",
")",
";",
"view",
".",
"propertyList",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"String",
"pro... | Returns a clone of this model where only listed propertyList are present.
@param properties
@return | [
"Returns",
"a",
"clone",
"of",
"this",
"model",
"where",
"only",
"listed",
"propertyList",
"are",
"present",
"."
] | 9b5bab44113e0adb74bf1ee436013e8a7c608d00 | https://github.com/tvesalainen/hoski-lib/blob/9b5bab44113e0adb74bf1ee436013e8a7c608d00/src/main/java/fi/hoski/datastore/repository/DataObjectModel.java#L184-L193 |
152,077 | tvesalainen/hoski-lib | src/main/java/fi/hoski/datastore/repository/DataObjectModel.java | DataObjectModel.view | public DataObjectModel view(Collection<? extends DataObject> dos)
{
DataObjectModel view = clone();
view.propertyList = new ArrayList<String>();
Set<String> propertySet = new HashSet<String>();
for (DataObject dob : dos)
{
for (String property : propertyLis... | java | public DataObjectModel view(Collection<? extends DataObject> dos)
{
DataObjectModel view = clone();
view.propertyList = new ArrayList<String>();
Set<String> propertySet = new HashSet<String>();
for (DataObject dob : dos)
{
for (String property : propertyLis... | [
"public",
"DataObjectModel",
"view",
"(",
"Collection",
"<",
"?",
"extends",
"DataObject",
">",
"dos",
")",
"{",
"DataObjectModel",
"view",
"=",
"clone",
"(",
")",
";",
"view",
".",
"propertyList",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
"... | Returns a clone of this model where only properties that have values are present
@param dos
@return | [
"Returns",
"a",
"clone",
"of",
"this",
"model",
"where",
"only",
"properties",
"that",
"have",
"values",
"are",
"present"
] | 9b5bab44113e0adb74bf1ee436013e8a7c608d00 | https://github.com/tvesalainen/hoski-lib/blob/9b5bab44113e0adb74bf1ee436013e8a7c608d00/src/main/java/fi/hoski/datastore/repository/DataObjectModel.java#L199-L223 |
152,078 | tvesalainen/hoski-lib | src/main/java/fi/hoski/datastore/repository/DataObjectModel.java | DataObjectModel.hide | public DataObjectModel hide(String... properties)
{
DataObjectModel view = clone();
view.propertyList = new ArrayList<String>();
view.propertyList.addAll(this.propertyList);
for (String property : properties)
{
view.propertyList.remove(property);
}... | java | public DataObjectModel hide(String... properties)
{
DataObjectModel view = clone();
view.propertyList = new ArrayList<String>();
view.propertyList.addAll(this.propertyList);
for (String property : properties)
{
view.propertyList.remove(property);
}... | [
"public",
"DataObjectModel",
"hide",
"(",
"String",
"...",
"properties",
")",
"{",
"DataObjectModel",
"view",
"=",
"clone",
"(",
")",
";",
"view",
".",
"propertyList",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"view",
".",
"propertyList",... | Returns a clone of model where listed propertyList are hidden;
@param properties
@return | [
"Returns",
"a",
"clone",
"of",
"model",
"where",
"listed",
"propertyList",
"are",
"hidden",
";"
] | 9b5bab44113e0adb74bf1ee436013e8a7c608d00 | https://github.com/tvesalainen/hoski-lib/blob/9b5bab44113e0adb74bf1ee436013e8a7c608d00/src/main/java/fi/hoski/datastore/repository/DataObjectModel.java#L229-L239 |
152,079 | fuinorg/utils4swing | src/main/java/org/fuin/utils4swing/dialogs/DirectorySelectionPanel.java | DirectorySelectionPanel.getButtonOK | protected final JButton getButtonOK() {
if (buttonOK == null) {
buttonOK = new JButton();
buttonOK.setText("OK");
buttonOK.setPreferredSize(new Dimension(80, 26));
buttonOK.addActionListener(new ActionListener() {
public void actionPerformed(... | java | protected final JButton getButtonOK() {
if (buttonOK == null) {
buttonOK = new JButton();
buttonOK.setText("OK");
buttonOK.setPreferredSize(new Dimension(80, 26));
buttonOK.addActionListener(new ActionListener() {
public void actionPerformed(... | [
"protected",
"final",
"JButton",
"getButtonOK",
"(",
")",
"{",
"if",
"(",
"buttonOK",
"==",
"null",
")",
"{",
"buttonOK",
"=",
"new",
"JButton",
"(",
")",
";",
"buttonOK",
".",
"setText",
"(",
"\"OK\"",
")",
";",
"buttonOK",
".",
"setPreferredSize",
"(",... | Returns the 'OK' button for usage as default button.
@return Button. | [
"Returns",
"the",
"OK",
"button",
"for",
"usage",
"as",
"default",
"button",
"."
] | 560fb69eac182e3473de9679c3c15433e524ef6b | https://github.com/fuinorg/utils4swing/blob/560fb69eac182e3473de9679c3c15433e524ef6b/src/main/java/org/fuin/utils4swing/dialogs/DirectorySelectionPanel.java#L153-L167 |
152,080 | fuinorg/utils4swing | src/main/java/org/fuin/utils4swing/dialogs/DirectorySelectionPanel.java | DirectorySelectionPanel.getButtonCancel | protected final JButton getButtonCancel() {
if (buttonCancel == null) {
buttonCancel = new JButton();
buttonCancel.setText("Cancel");
buttonCancel.setPreferredSize(new Dimension(80, 26));
buttonCancel.addActionListener(new ActionListener() {
... | java | protected final JButton getButtonCancel() {
if (buttonCancel == null) {
buttonCancel = new JButton();
buttonCancel.setText("Cancel");
buttonCancel.setPreferredSize(new Dimension(80, 26));
buttonCancel.addActionListener(new ActionListener() {
... | [
"protected",
"final",
"JButton",
"getButtonCancel",
"(",
")",
"{",
"if",
"(",
"buttonCancel",
"==",
"null",
")",
"{",
"buttonCancel",
"=",
"new",
"JButton",
"(",
")",
";",
"buttonCancel",
".",
"setText",
"(",
"\"Cancel\"",
")",
";",
"buttonCancel",
".",
"s... | Returns the 'Cancel' button for usage as default button.
@return Button. | [
"Returns",
"the",
"Cancel",
"button",
"for",
"usage",
"as",
"default",
"button",
"."
] | 560fb69eac182e3473de9679c3c15433e524ef6b | https://github.com/fuinorg/utils4swing/blob/560fb69eac182e3473de9679c3c15433e524ef6b/src/main/java/org/fuin/utils4swing/dialogs/DirectorySelectionPanel.java#L174-L188 |
152,081 | js-lib-com/net-client | src/main/java/js/net/client/EventStreamClient.java | EventStreamClient.open | public void open(URL eventStreamURL) throws IOException {
log.info("Connecting to event stream |%s|.", eventStreamURL);
connection = (HttpURLConnection) eventStreamURL.openConnection();
connection.setConnectTimeout(CONNECTION_TIMEOUT);
connection.setReadTimeout(READ_TIMEOUT);
connection.setRequestPrope... | java | public void open(URL eventStreamURL) throws IOException {
log.info("Connecting to event stream |%s|.", eventStreamURL);
connection = (HttpURLConnection) eventStreamURL.openConnection();
connection.setConnectTimeout(CONNECTION_TIMEOUT);
connection.setReadTimeout(READ_TIMEOUT);
connection.setRequestPrope... | [
"public",
"void",
"open",
"(",
"URL",
"eventStreamURL",
")",
"throws",
"IOException",
"{",
"log",
".",
"info",
"(",
"\"Connecting to event stream |%s|.\"",
",",
"eventStreamURL",
")",
";",
"connection",
"=",
"(",
"HttpURLConnection",
")",
"eventStreamURL",
".",
"o... | Opens connection with given event stream and initialize internal input stream. Because this method involve networking and
server side processes it is not instant. Anyway, usually cannot exceed one second or two.
@param eventStreamURL event stream URL.
@throws IOException if event stream connection fails including conn... | [
"Opens",
"connection",
"with",
"given",
"event",
"stream",
"and",
"initialize",
"internal",
"input",
"stream",
".",
"Because",
"this",
"method",
"involve",
"networking",
"and",
"server",
"side",
"processes",
"it",
"is",
"not",
"instant",
".",
"Anyway",
"usually"... | 0489f85d8baa1be1ff115aa79929e0cf05d4c72d | https://github.com/js-lib-com/net-client/blob/0489f85d8baa1be1ff115aa79929e0cf05d4c72d/src/main/java/js/net/client/EventStreamClient.java#L109-L123 |
152,082 | js-lib-com/net-client | src/main/java/js/net/client/EventStreamClient.java | EventStreamClient.close | public void close() throws InterruptedException {
assert connection != null;
if (connection != null) {
Files.close(inputStream);
if (thread.isAlive()) {
synchronized (this) {
if (thread.isAlive()) {
thread.wait(THREAD_STOP_TIMEOUT);
}
}
}
}
} | java | public void close() throws InterruptedException {
assert connection != null;
if (connection != null) {
Files.close(inputStream);
if (thread.isAlive()) {
synchronized (this) {
if (thread.isAlive()) {
thread.wait(THREAD_STOP_TIMEOUT);
}
}
}
}
} | [
"public",
"void",
"close",
"(",
")",
"throws",
"InterruptedException",
"{",
"assert",
"connection",
"!=",
"null",
";",
"if",
"(",
"connection",
"!=",
"null",
")",
"{",
"Files",
".",
"close",
"(",
"inputStream",
")",
";",
"if",
"(",
"thread",
".",
"isAliv... | Close this event stream client. This method stops receiving thread and closes internal input stream. It is not necessary
if end of event stream is controlled by server side, in with case this event stream client does auto-close.
@throws InterruptedException if waiting for thread close is interrupted. | [
"Close",
"this",
"event",
"stream",
"client",
".",
"This",
"method",
"stops",
"receiving",
"thread",
"and",
"closes",
"internal",
"input",
"stream",
".",
"It",
"is",
"not",
"necessary",
"if",
"end",
"of",
"event",
"stream",
"is",
"controlled",
"by",
"server"... | 0489f85d8baa1be1ff115aa79929e0cf05d4c72d | https://github.com/js-lib-com/net-client/blob/0489f85d8baa1be1ff115aa79929e0cf05d4c72d/src/main/java/js/net/client/EventStreamClient.java#L155-L167 |
152,083 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/RegisterValueHandler.java | RegisterValueHandler.retrieveUserProperties | public PropertyOwner retrieveUserProperties()
{
Record record = this.getOwner().getRecord();
ComponentParent screen = null;
if (record.getRecordOwner() instanceof ComponentParent)
screen = (ComponentParent)record.getRecordOwner();
if (screen != null)
return sc... | java | public PropertyOwner retrieveUserProperties()
{
Record record = this.getOwner().getRecord();
ComponentParent screen = null;
if (record.getRecordOwner() instanceof ComponentParent)
screen = (ComponentParent)record.getRecordOwner();
if (screen != null)
return sc... | [
"public",
"PropertyOwner",
"retrieveUserProperties",
"(",
")",
"{",
"Record",
"record",
"=",
"this",
".",
"getOwner",
"(",
")",
".",
"getRecord",
"(",
")",
";",
"ComponentParent",
"screen",
"=",
"null",
";",
"if",
"(",
"record",
".",
"getRecordOwner",
"(",
... | Get the owner of this property key.
The registration key is the screen's key.
The property key is the field name.
@return The owner of this property key. | [
"Get",
"the",
"owner",
"of",
"this",
"property",
"key",
".",
"The",
"registration",
"key",
"is",
"the",
"screen",
"s",
"key",
".",
"The",
"property",
"key",
"is",
"the",
"field",
"name",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/RegisterValueHandler.java#L113-L123 |
152,084 | BeholderTAF/beholder-selenium | src/main/java/br/ufmg/dcc/saotome/beholder/selenium/ui/form/SeleniumSelectField.java | SeleniumSelectField.select | private void select(Type type, Object value) {
assert value != null;
reloadElement();
this.selectByType(type, value);
} | java | private void select(Type type, Object value) {
assert value != null;
reloadElement();
this.selectByType(type, value);
} | [
"private",
"void",
"select",
"(",
"Type",
"type",
",",
"Object",
"value",
")",
"{",
"assert",
"value",
"!=",
"null",
";",
"reloadElement",
"(",
")",
";",
"this",
".",
"selectByType",
"(",
"type",
",",
"value",
")",
";",
"}"
] | this private method try to search the value of the select for n seconds
specified by TIMEOUT static variable. The coerence if the data passed is
or isn't the correct value is responsability of the test developer.
@param type
values defined by the Type private enumeration
@param value
value to be selected | [
"this",
"private",
"method",
"try",
"to",
"search",
"the",
"value",
"of",
"the",
"select",
"for",
"n",
"seconds",
"specified",
"by",
"TIMEOUT",
"static",
"variable",
".",
"The",
"coerence",
"if",
"the",
"data",
"passed",
"is",
"or",
"isn",
"t",
"the",
"c... | 8dc999e74a9c3f5c09e4e68ea0ef5634cdb760ee | https://github.com/BeholderTAF/beholder-selenium/blob/8dc999e74a9c3f5c09e4e68ea0ef5634cdb760ee/src/main/java/br/ufmg/dcc/saotome/beholder/selenium/ui/form/SeleniumSelectField.java#L112-L118 |
152,085 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/convert/BitConverter.java | BitConverter.getState | public boolean getState()
{
if (this.getData() == null)
return m_bTrueIfNull;
int fieldValue = (int)this.getValue();
boolean returnValue = false;
if ((fieldValue & (1 << m_iBitNumber)) != 0)
returnValue = true;
if (m_bTrueIfMatch)
return re... | java | public boolean getState()
{
if (this.getData() == null)
return m_bTrueIfNull;
int fieldValue = (int)this.getValue();
boolean returnValue = false;
if ((fieldValue & (1 << m_iBitNumber)) != 0)
returnValue = true;
if (m_bTrueIfMatch)
return re... | [
"public",
"boolean",
"getState",
"(",
")",
"{",
"if",
"(",
"this",
".",
"getData",
"(",
")",
"==",
"null",
")",
"return",
"m_bTrueIfNull",
";",
"int",
"fieldValue",
"=",
"(",
"int",
")",
"this",
".",
"getValue",
"(",
")",
";",
"boolean",
"returnValue",... | For binary fields, return the current state.
Gets the state of the target bit.
@param True is this field is true. | [
"For",
"binary",
"fields",
"return",
"the",
"current",
"state",
".",
"Gets",
"the",
"state",
"of",
"the",
"target",
"bit",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/BitConverter.java#L101-L113 |
152,086 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/convert/BitConverter.java | BitConverter.setState | public int setState(boolean bState, boolean bDisplayOption, int iMoveMode)
{
int iFieldValue = (int)this.getValue();
if (!m_bTrueIfMatch)
bState = !bState; // Do opposite operation
if (bState)
iFieldValue |= (1 << m_iBitNumber); // Set the bit
else
... | java | public int setState(boolean bState, boolean bDisplayOption, int iMoveMode)
{
int iFieldValue = (int)this.getValue();
if (!m_bTrueIfMatch)
bState = !bState; // Do opposite operation
if (bState)
iFieldValue |= (1 << m_iBitNumber); // Set the bit
else
... | [
"public",
"int",
"setState",
"(",
"boolean",
"bState",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"int",
"iFieldValue",
"=",
"(",
"int",
")",
"this",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"!",
"m_bTrueIfMatch",
")",
"bState... | For binary fields, set the current state.
Sets the target bit to the state.
@param state The state to set this field.
@param bDisplayOption Display changed fields if true.
@param iMoveMode The move mode.
@return The error code (or NORMAL_RETURN). | [
"For",
"binary",
"fields",
"set",
"the",
"current",
"state",
".",
"Sets",
"the",
"target",
"bit",
"to",
"the",
"state",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/BitConverter.java#L122-L132 |
152,087 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultBase.java | JDefaultBase.findStream | private static InputStream findStream(String filename) {
InputStream streamOnClass = JDefaultAddress.class.getResourceAsStream(filename);
if (streamOnClass != null) {
return streamOnClass;
}
InputStream is = JDefaultAddress.class.getClassLoader().getResourceAsStream(filename)... | java | private static InputStream findStream(String filename) {
InputStream streamOnClass = JDefaultAddress.class.getResourceAsStream(filename);
if (streamOnClass != null) {
return streamOnClass;
}
InputStream is = JDefaultAddress.class.getClassLoader().getResourceAsStream(filename)... | [
"private",
"static",
"InputStream",
"findStream",
"(",
"String",
"filename",
")",
"{",
"InputStream",
"streamOnClass",
"=",
"JDefaultAddress",
".",
"class",
".",
"getResourceAsStream",
"(",
"filename",
")",
";",
"if",
"(",
"streamOnClass",
"!=",
"null",
")",
"{"... | Finds the InputStream of a file in a Jar
@param filename of the stream to return
@return the file's InputStream | [
"Finds",
"the",
"InputStream",
"of",
"a",
"file",
"in",
"a",
"Jar"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultBase.java#L56-L63 |
152,088 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultBase.java | JDefaultBase.fetch | protected static Object fetch(String key) {
List valuesArray = (List) fetchObject(key);
return valuesArray.get(RandomUtils.nextInt(valuesArray.size()));
} | java | protected static Object fetch(String key) {
List valuesArray = (List) fetchObject(key);
return valuesArray.get(RandomUtils.nextInt(valuesArray.size()));
} | [
"protected",
"static",
"Object",
"fetch",
"(",
"String",
"key",
")",
"{",
"List",
"valuesArray",
"=",
"(",
"List",
")",
"fetchObject",
"(",
"key",
")",
";",
"return",
"valuesArray",
".",
"get",
"(",
"RandomUtils",
".",
"nextInt",
"(",
"valuesArray",
".",
... | Fetches a random Object from the dictionary based on a key
@param key of the object to find
@return the Object that represents the key | [
"Fetches",
"a",
"random",
"Object",
"from",
"the",
"dictionary",
"based",
"on",
"a",
"key"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultBase.java#L71-L74 |
152,089 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultBase.java | JDefaultBase.fetchList | protected static String fetchList(String key) {
List valuesArray = (List) fetchObject(key);
//TODO: Make this dynamic - assumes 3 lists
List<String> stringList1 = (List<String>) valuesArray.get(0);
List<String> stringList2 = (List<String>) valuesArray.get(1);
List<String> string... | java | protected static String fetchList(String key) {
List valuesArray = (List) fetchObject(key);
//TODO: Make this dynamic - assumes 3 lists
List<String> stringList1 = (List<String>) valuesArray.get(0);
List<String> stringList2 = (List<String>) valuesArray.get(1);
List<String> string... | [
"protected",
"static",
"String",
"fetchList",
"(",
"String",
"key",
")",
"{",
"List",
"valuesArray",
"=",
"(",
"List",
")",
"fetchObject",
"(",
"key",
")",
";",
"//TODO: Make this dynamic - assumes 3 lists",
"List",
"<",
"String",
">",
"stringList1",
"=",
"(",
... | Fetches a List of of Values
@param key of the values to find
@return random value from each list | [
"Fetches",
"a",
"List",
"of",
"of",
"Values"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultBase.java#L82-L92 |
152,090 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultBase.java | JDefaultBase.fetchString | protected static String fetchString(String key) {
List<String> stringList = (List<String>) fetchObject(key);
return stringList.get(RandomUtils.nextInt(stringList.size()));
} | java | protected static String fetchString(String key) {
List<String> stringList = (List<String>) fetchObject(key);
return stringList.get(RandomUtils.nextInt(stringList.size()));
} | [
"protected",
"static",
"String",
"fetchString",
"(",
"String",
"key",
")",
"{",
"List",
"<",
"String",
">",
"stringList",
"=",
"(",
"List",
"<",
"String",
">",
")",
"fetchObject",
"(",
"key",
")",
";",
"return",
"stringList",
".",
"get",
"(",
"RandomUtil... | Fetches a value
@param key of the value to find
@return the value converted to type String | [
"Fetches",
"a",
"value"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultBase.java#L100-L105 |
152,091 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultBase.java | JDefaultBase.fetchObject | protected static Object fetchObject(String key) {
String[] path = key.split("\\.");
Object currentValue = fakeValuesMap;
for (String pathSection : path) {
currentValue = ((Map<String, Object>) currentValue).get(pathSection);
}
return currentValue;
} | java | protected static Object fetchObject(String key) {
String[] path = key.split("\\.");
Object currentValue = fakeValuesMap;
for (String pathSection : path) {
currentValue = ((Map<String, Object>) currentValue).get(pathSection);
}
return currentValue;
} | [
"protected",
"static",
"Object",
"fetchObject",
"(",
"String",
"key",
")",
"{",
"String",
"[",
"]",
"path",
"=",
"key",
".",
"split",
"(",
"\"\\\\.\"",
")",
";",
"Object",
"currentValue",
"=",
"fakeValuesMap",
";",
"for",
"(",
"String",
"pathSection",
":",... | Finds map of values based on a key
@param key to lookup
@return map of key value pairs | [
"Finds",
"map",
"of",
"values",
"based",
"on",
"a",
"key"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultBase.java#L113-L120 |
152,092 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultBase.java | JDefaultBase.letterify | protected static String letterify(String letterString) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < letterString.length(); i++) {
if (letterString.charAt(i) == '?') {
sb.append((char) (97 + RandomUtils.nextInt(26))); // a-z
} else {
... | java | protected static String letterify(String letterString) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < letterString.length(); i++) {
if (letterString.charAt(i) == '?') {
sb.append((char) (97 + RandomUtils.nextInt(26))); // a-z
} else {
... | [
"protected",
"static",
"String",
"letterify",
"(",
"String",
"letterString",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"letterString",
".",
"length",
"(",
")",
";",
"i",
... | Replace '?' in a string with random letters
@param letterString to insert random letters
@return a string with random letters | [
"Replace",
"?",
"in",
"a",
"string",
"with",
"random",
"letters"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultBase.java#L147-L158 |
152,093 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultBase.java | JDefaultBase.parseFoundKey | protected static String parseFoundKey(String value) {
// System.out.println("Start Value: " + value);
String regex = "#\\{([A-Za-z]+\\.)?([^\\}]+)\\}";
Pattern p = Pattern.compile(regex);
Matcher matcher = p.matcher(value);
while (matcher.find()) {
// Syste... | java | protected static String parseFoundKey(String value) {
// System.out.println("Start Value: " + value);
String regex = "#\\{([A-Za-z]+\\.)?([^\\}]+)\\}";
Pattern p = Pattern.compile(regex);
Matcher matcher = p.matcher(value);
while (matcher.find()) {
// Syste... | [
"protected",
"static",
"String",
"parseFoundKey",
"(",
"String",
"value",
")",
"{",
"// System.out.println(\"Start Value: \" + value);",
"String",
"regex",
"=",
"\"#\\\\{([A-Za-z]+\\\\.)?([^\\\\}]+)\\\\}\"",
";",
"Pattern",
"p",
"=",
"Pattern",
".",
"compile",
"(",
"reg... | resolves an embedded key
@param value embedded key that has been already fetched
@return fully resolved string | [
"resolves",
"an",
"embedded",
"key"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultBase.java#L189-L213 |
152,094 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/thread/SyncPageWorker.java | SyncPageWorker.run | public void run()
{
// Note: To make sure the user gets a chance to see the
// html text, we wait for a paint before returing.
// Since these threads are stacked in a private thread queue, the next
// thread is not executed until this one is finished.
if (! EventQueue.isD... | java | public void run()
{
// Note: To make sure the user gets a chance to see the
// html text, we wait for a paint before returing.
// Since these threads are stacked in a private thread queue, the next
// thread is not executed until this one is finished.
if (! EventQueue.isD... | [
"public",
"void",
"run",
"(",
")",
"{",
"// Note: To make sure the user gets a chance to see the",
"// html text, we wait for a paint before returing.",
"// Since these threads are stacked in a private thread queue, the next",
"// thread is not executed until this one is finished.",
"if",
"(",... | Make sure everything goes in the right order. | [
"Make",
"sure",
"everything",
"goes",
"in",
"the",
"right",
"order",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/thread/SyncPageWorker.java#L61-L90 |
152,095 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Security.java | Security.validatePassword | public static boolean validatePassword(BrokerSession session, String password) {
password = encrypt(password, session.getServerCaps().getCipherKey());
return session.callRPCBool("RGCWFUSR VALIDPSW", password);
} | java | public static boolean validatePassword(BrokerSession session, String password) {
password = encrypt(password, session.getServerCaps().getCipherKey());
return session.callRPCBool("RGCWFUSR VALIDPSW", password);
} | [
"public",
"static",
"boolean",
"validatePassword",
"(",
"BrokerSession",
"session",
",",
"String",
"password",
")",
"{",
"password",
"=",
"encrypt",
"(",
"password",
",",
"session",
".",
"getServerCaps",
"(",
")",
".",
"getCipherKey",
"(",
")",
")",
";",
"re... | Validates the current user's password.
@param session Broker session.
@param password Password.
@return True if the password is valid. | [
"Validates",
"the",
"current",
"user",
"s",
"password",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Security.java#L69-L72 |
152,096 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Security.java | Security.changePassword | public static String changePassword(BrokerSession session, String oldPassword, String newPassword) {
String cipherKey = session.getServerCaps().getCipherKey();
String result = session.callRPC("RGNETBRP CVC", encrypt(oldPassword, cipherKey), encrypt(newPassword, cipherKey));
return result.startsW... | java | public static String changePassword(BrokerSession session, String oldPassword, String newPassword) {
String cipherKey = session.getServerCaps().getCipherKey();
String result = session.callRPC("RGNETBRP CVC", encrypt(oldPassword, cipherKey), encrypt(newPassword, cipherKey));
return result.startsW... | [
"public",
"static",
"String",
"changePassword",
"(",
"BrokerSession",
"session",
",",
"String",
"oldPassword",
",",
"String",
"newPassword",
")",
"{",
"String",
"cipherKey",
"=",
"session",
".",
"getServerCaps",
"(",
")",
".",
"getCipherKey",
"(",
")",
";",
"S... | Change a password.
@param session Broker session.
@param oldPassword Old password.
@param newPassword New password.
@return Status message from server. | [
"Change",
"a",
"password",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Security.java#L82-L86 |
152,097 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Security.java | Security.encrypt | protected static String encrypt(String value, String cipherKey) {
String[] cipher = CipherRegistry.getCipher(cipherKey);
int associatorIndex = randomIndex(cipher.length);
int identifierIndex;
do {
identifierIndex = randomIndex(cipher.length);
} while (associa... | java | protected static String encrypt(String value, String cipherKey) {
String[] cipher = CipherRegistry.getCipher(cipherKey);
int associatorIndex = randomIndex(cipher.length);
int identifierIndex;
do {
identifierIndex = randomIndex(cipher.length);
} while (associa... | [
"protected",
"static",
"String",
"encrypt",
"(",
"String",
"value",
",",
"String",
"cipherKey",
")",
"{",
"String",
"[",
"]",
"cipher",
"=",
"CipherRegistry",
".",
"getCipher",
"(",
"cipherKey",
")",
";",
"int",
"associatorIndex",
"=",
"randomIndex",
"(",
"c... | Encrypt a string value.
@param value Value to encrypt.
@return Encrypted value. | [
"Encrypt",
"a",
"string",
"value",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Security.java#L94-L105 |
152,098 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Security.java | Security.decrypt | protected static final String decrypt(String value, String cipherKey) {
int len = value == null ? 0 : value.length();
if (len < 3) {
return "";
}
int identifierIndex = value.charAt(0) - 32;
int associatorIndex = value.charAt(len - 1) - 32;
St... | java | protected static final String decrypt(String value, String cipherKey) {
int len = value == null ? 0 : value.length();
if (len < 3) {
return "";
}
int identifierIndex = value.charAt(0) - 32;
int associatorIndex = value.charAt(len - 1) - 32;
St... | [
"protected",
"static",
"final",
"String",
"decrypt",
"(",
"String",
"value",
",",
"String",
"cipherKey",
")",
"{",
"int",
"len",
"=",
"value",
"==",
"null",
"?",
"0",
":",
"value",
".",
"length",
"(",
")",
";",
"if",
"(",
"len",
"<",
"3",
")",
"{",... | Decrypt a string value.
@param value Value to decrypt.
@return Decrypted value. | [
"Decrypt",
"a",
"string",
"value",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/Security.java#L113-L125 |
152,099 | pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanDocBookBuilder.java | PublicanDocBookBuilder.processConditions | @Override
protected void processConditions(final BuildData buildData, final SpecTopic specTopic, final Document doc) {
if (buildData.getContentSpec().getPublicanCfg() == null || !buildData.getContentSpec().getPublicanCfg().contains("condition:")) {
super.processConditions(buildData, specTopic, d... | java | @Override
protected void processConditions(final BuildData buildData, final SpecTopic specTopic, final Document doc) {
if (buildData.getContentSpec().getPublicanCfg() == null || !buildData.getContentSpec().getPublicanCfg().contains("condition:")) {
super.processConditions(buildData, specTopic, d... | [
"@",
"Override",
"protected",
"void",
"processConditions",
"(",
"final",
"BuildData",
"buildData",
",",
"final",
"SpecTopic",
"specTopic",
",",
"final",
"Document",
"doc",
")",
"{",
"if",
"(",
"buildData",
".",
"getContentSpec",
"(",
")",
".",
"getPublicanCfg",
... | Checks if the conditional pass should be done by checking to see if the publican.cfg has it's own condition set. If none are set
then the conditions are processed.
@param buildData Information and data structures for the build.
@param specTopic The spec topic the conditions should be processed for,
@param doc Th... | [
"Checks",
"if",
"the",
"conditional",
"pass",
"should",
"be",
"done",
"by",
"checking",
"to",
"see",
"if",
"the",
"publican",
".",
"cfg",
"has",
"it",
"s",
"own",
"condition",
"set",
".",
"If",
"none",
"are",
"set",
"then",
"the",
"conditions",
"are",
... | 5436d36ba1b3c5baa246b270e5fc350e6778bce8 | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanDocBookBuilder.java#L59-L64 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.