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 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
jingwei/krati | krati-main/src/main/java/krati/core/StoreConfig.java | StoreConfig.load | @SuppressWarnings("unchecked")
public void load(File propertiesFile) throws IOException {
String paramName;
String paramValue;
Reader reader = new FileReader(propertiesFile);
_properties.load(reader);
reader.close();
paramName = StoreParams.PARAM_IND... | java | @SuppressWarnings("unchecked")
public void load(File propertiesFile) throws IOException {
String paramName;
String paramValue;
Reader reader = new FileReader(propertiesFile);
_properties.load(reader);
reader.close();
paramName = StoreParams.PARAM_IND... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"load",
"(",
"File",
"propertiesFile",
")",
"throws",
"IOException",
"{",
"String",
"paramName",
";",
"String",
"paramValue",
";",
"Reader",
"reader",
"=",
"new",
"FileReader",
"(",
"propertie... | Loads configuration from a properties file.
@param propertiesFile - a configuration properties file
@throws IOException | [
"Loads",
"configuration",
"from",
"a",
"properties",
"file",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L203-L282 | train |
jingwei/krati | krati-main/src/main/java/krati/core/StoreConfig.java | StoreConfig.validate | public void validate() throws InvalidStoreConfigException {
if(getSegmentFactory() == null) {
throw new InvalidStoreConfigException("Segment factory not found");
}
if(getHashFunction() == null) {
throw new InvalidStoreConfigException("Store hash function not foun... | java | public void validate() throws InvalidStoreConfigException {
if(getSegmentFactory() == null) {
throw new InvalidStoreConfigException("Segment factory not found");
}
if(getHashFunction() == null) {
throw new InvalidStoreConfigException("Store hash function not foun... | [
"public",
"void",
"validate",
"(",
")",
"throws",
"InvalidStoreConfigException",
"{",
"if",
"(",
"getSegmentFactory",
"(",
")",
"==",
"null",
")",
"{",
"throw",
"new",
"InvalidStoreConfigException",
"(",
"\"Segment factory not found\"",
")",
";",
"}",
"if",
"(",
... | Checks the validity of this StoreConfig.
@throws InvalidStoreConfigException if any store parameter is found invalid. | [
"Checks",
"the",
"validity",
"of",
"this",
"StoreConfig",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L311-L339 | train |
jingwei/krati | krati-main/src/main/java/krati/core/StoreConfig.java | StoreConfig.setProperty | public boolean setProperty(String pName, String pValue) {
if(pName == null) return false;
_properties.setProperty(pName, pValue);
return true;
} | java | public boolean setProperty(String pName, String pValue) {
if(pName == null) return false;
_properties.setProperty(pName, pValue);
return true;
} | [
"public",
"boolean",
"setProperty",
"(",
"String",
"pName",
",",
"String",
"pValue",
")",
"{",
"if",
"(",
"pName",
"==",
"null",
")",
"return",
"false",
";",
"_properties",
".",
"setProperty",
"(",
"pName",
",",
"pValue",
")",
";",
"return",
"true",
";",... | Sets a store configuration property via its name and value.
@param pName - the property name
@param pValue - the property value
@return <code>true</code> if the property is set successfully. | [
"Sets",
"a",
"store",
"configuration",
"property",
"via",
"its",
"name",
"and",
"value",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L365-L369 | train |
jingwei/krati | krati-main/src/main/java/krati/core/StoreConfig.java | StoreConfig.setClass | public boolean setClass(String pName, Class<?> pValue) {
if(pName == null) return false;
_properties.setProperty(pName, pValue.getName() + "");
return true;
} | java | public boolean setClass(String pName, Class<?> pValue) {
if(pName == null) return false;
_properties.setProperty(pName, pValue.getName() + "");
return true;
} | [
"public",
"boolean",
"setClass",
"(",
"String",
"pName",
",",
"Class",
"<",
"?",
">",
"pValue",
")",
"{",
"if",
"(",
"pName",
"==",
"null",
")",
"return",
"false",
";",
"_properties",
".",
"setProperty",
"(",
"pName",
",",
"pValue",
".",
"getName",
"("... | Sets a class property via a string property name. | [
"Sets",
"a",
"class",
"property",
"via",
"a",
"string",
"property",
"name",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L410-L414 | train |
jingwei/krati | krati-main/src/main/java/krati/core/StoreConfig.java | StoreConfig.getInt | public int getInt(String pName, int defaultValue) {
String pValue = _properties.getProperty(pName);
return parseInt(pName, pValue, defaultValue);
} | java | public int getInt(String pName, int defaultValue) {
String pValue = _properties.getProperty(pName);
return parseInt(pName, pValue, defaultValue);
} | [
"public",
"int",
"getInt",
"(",
"String",
"pName",
",",
"int",
"defaultValue",
")",
"{",
"String",
"pValue",
"=",
"_properties",
".",
"getProperty",
"(",
"pName",
")",
";",
"return",
"parseInt",
"(",
"pName",
",",
"pValue",
",",
"defaultValue",
")",
";",
... | Gets an integer property via a string property name.
@param pName - the property name
@param defaultValue - the default property value
@return an integer property | [
"Gets",
"an",
"integer",
"property",
"via",
"a",
"string",
"property",
"name",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L423-L426 | train |
jingwei/krati | krati-main/src/main/java/krati/core/StoreConfig.java | StoreConfig.getFloat | public float getFloat(String pName, float defaultValue) {
String pValue = _properties.getProperty(pName);
return parseFloat(pName, pValue, defaultValue);
} | java | public float getFloat(String pName, float defaultValue) {
String pValue = _properties.getProperty(pName);
return parseFloat(pName, pValue, defaultValue);
} | [
"public",
"float",
"getFloat",
"(",
"String",
"pName",
",",
"float",
"defaultValue",
")",
"{",
"String",
"pValue",
"=",
"_properties",
".",
"getProperty",
"(",
"pName",
")",
";",
"return",
"parseFloat",
"(",
"pName",
",",
"pValue",
",",
"defaultValue",
")",
... | Gets a float property via a string property name.
@param pName - the property name
@param defaultValue - the default property value
@return a float property | [
"Gets",
"a",
"float",
"property",
"via",
"a",
"string",
"property",
"name",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L435-L438 | train |
jingwei/krati | krati-main/src/main/java/krati/core/StoreConfig.java | StoreConfig.getDouble | public double getDouble(String pName, double defaultValue) {
String pValue = _properties.getProperty(pName);
return parseDouble(pName, pValue, defaultValue);
} | java | public double getDouble(String pName, double defaultValue) {
String pValue = _properties.getProperty(pName);
return parseDouble(pName, pValue, defaultValue);
} | [
"public",
"double",
"getDouble",
"(",
"String",
"pName",
",",
"double",
"defaultValue",
")",
"{",
"String",
"pValue",
"=",
"_properties",
".",
"getProperty",
"(",
"pName",
")",
";",
"return",
"parseDouble",
"(",
"pName",
",",
"pValue",
",",
"defaultValue",
"... | Gets a double property via a string property name.
@param pName - the property name
@param defaultValue - the default property value
@return a double property | [
"Gets",
"a",
"double",
"property",
"via",
"a",
"string",
"property",
"name",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L447-L450 | train |
jingwei/krati | krati-main/src/main/java/krati/core/StoreConfig.java | StoreConfig.getBoolean | public boolean getBoolean(String pName, boolean defaultValue) {
String pValue = _properties.getProperty(pName);
return parseBoolean(pName, pValue, defaultValue);
} | java | public boolean getBoolean(String pName, boolean defaultValue) {
String pValue = _properties.getProperty(pName);
return parseBoolean(pName, pValue, defaultValue);
} | [
"public",
"boolean",
"getBoolean",
"(",
"String",
"pName",
",",
"boolean",
"defaultValue",
")",
"{",
"String",
"pValue",
"=",
"_properties",
".",
"getProperty",
"(",
"pName",
")",
";",
"return",
"parseBoolean",
"(",
"pName",
",",
"pValue",
",",
"defaultValue",... | Gets a boolean property via a string property name.
@param pName - the property name
@param defaultValue - the default property value
@return a boolean property | [
"Gets",
"a",
"boolean",
"property",
"via",
"a",
"string",
"property",
"name",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L459-L462 | train |
jingwei/krati | krati-main/src/main/java/krati/core/StoreConfig.java | StoreConfig.getClass | public Class<?> getClass(String pName, Class<?> defaultValue) {
String pValue = _properties.getProperty(pName);
return parseClass(pName, pValue, defaultValue);
} | java | public Class<?> getClass(String pName, Class<?> defaultValue) {
String pValue = _properties.getProperty(pName);
return parseClass(pName, pValue, defaultValue);
} | [
"public",
"Class",
"<",
"?",
">",
"getClass",
"(",
"String",
"pName",
",",
"Class",
"<",
"?",
">",
"defaultValue",
")",
"{",
"String",
"pValue",
"=",
"_properties",
".",
"getProperty",
"(",
"pName",
")",
";",
"return",
"parseClass",
"(",
"pName",
",",
... | Gets a class property via a string property name.
@param pName - the property name
@param defaultValue - the default property value
@return a {@link Class} property | [
"Gets",
"a",
"class",
"property",
"via",
"a",
"string",
"property",
"name",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L471-L474 | train |
jingwei/krati | krati-main/src/main/java/krati/core/StoreConfig.java | StoreConfig.setSegmentFactory | public void setSegmentFactory(SegmentFactory segmentFactory) {
if(segmentFactory == null) {
throw new IllegalArgumentException("Invalid segmentFactory: " + segmentFactory);
}
this._segmentFactory = segmentFactory;
this._properties.setProperty(PARAM_SEGMENT_FACTORY_CL... | java | public void setSegmentFactory(SegmentFactory segmentFactory) {
if(segmentFactory == null) {
throw new IllegalArgumentException("Invalid segmentFactory: " + segmentFactory);
}
this._segmentFactory = segmentFactory;
this._properties.setProperty(PARAM_SEGMENT_FACTORY_CL... | [
"public",
"void",
"setSegmentFactory",
"(",
"SegmentFactory",
"segmentFactory",
")",
"{",
"if",
"(",
"segmentFactory",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid segmentFactory: \"",
"+",
"segmentFactory",
")",
";",
"}",
"thi... | Sets the segment factory of the target store.
@param segmentFactory | [
"Sets",
"the",
"segment",
"factory",
"of",
"the",
"target",
"store",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L538-L545 | train |
jingwei/krati | krati-main/src/main/java/krati/core/StoreConfig.java | StoreConfig.newInstance | public static StoreConfig newInstance(File filePath) throws IOException {
File homeDir;
Properties p = new Properties();
if(filePath.exists()) {
if(filePath.isDirectory()) {
homeDir = filePath;
File propertiesFile = new File(filePath, CONFIG_PROPERTIES... | java | public static StoreConfig newInstance(File filePath) throws IOException {
File homeDir;
Properties p = new Properties();
if(filePath.exists()) {
if(filePath.isDirectory()) {
homeDir = filePath;
File propertiesFile = new File(filePath, CONFIG_PROPERTIES... | [
"public",
"static",
"StoreConfig",
"newInstance",
"(",
"File",
"filePath",
")",
"throws",
"IOException",
"{",
"File",
"homeDir",
";",
"Properties",
"p",
"=",
"new",
"Properties",
"(",
")",
";",
"if",
"(",
"filePath",
".",
"exists",
"(",
")",
")",
"{",
"i... | Creates a new instance of StoreConfig.
@param filePath - the <code>config.properties</code> file or the directory containing <code>config.properties</code>
@return a new instance of StoreConfig
@throws IOException
@throws InvalidStoreConfigException | [
"Creates",
"a",
"new",
"instance",
"of",
"StoreConfig",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L607-L656 | train |
legsem/legstar-core2 | legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/XsdDataItem.java | XsdDataItem.setAttributesFromUsage | private void setAttributesFromUsage(final Usage usage) {
switch (usage) {
case BINARY:
_cobolType = CobolTypes.BINARY_ITEM;
_xsdType = XsdType.INTEGER;
break;
case NATIVEBINARY:
_cobolType = CobolTypes.NATIVE_BINARY_ITEM;
_xsdType = Xsd... | java | private void setAttributesFromUsage(final Usage usage) {
switch (usage) {
case BINARY:
_cobolType = CobolTypes.BINARY_ITEM;
_xsdType = XsdType.INTEGER;
break;
case NATIVEBINARY:
_cobolType = CobolTypes.NATIVE_BINARY_ITEM;
_xsdType = Xsd... | [
"private",
"void",
"setAttributesFromUsage",
"(",
"final",
"Usage",
"usage",
")",
"{",
"switch",
"(",
"usage",
")",
"{",
"case",
"BINARY",
":",
"_cobolType",
"=",
"CobolTypes",
".",
"BINARY_ITEM",
";",
"_xsdType",
"=",
"XsdType",
".",
"INTEGER",
";",
"break"... | Derive XML schema attributes from a COBOL usage clause. This gives a
rough approximation of the XSD type because the picture clause usually
carries info that needs to be further analyzed to determine a more
precise type. If no usage clause, we assume there will be a picture
clause.
@param usage COBOL usage clause | [
"Derive",
"XML",
"schema",
"attributes",
"from",
"a",
"COBOL",
"usage",
"clause",
".",
"This",
"gives",
"a",
"rough",
"approximation",
"of",
"the",
"XSD",
"type",
"because",
"the",
"picture",
"clause",
"usually",
"carries",
"info",
"that",
"needs",
"to",
"be... | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/XsdDataItem.java#L430-L489 | train |
legsem/legstar-core2 | legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/XsdDataItem.java | XsdDataItem.getXmlCompatibleCobolName | public static String getXmlCompatibleCobolName(final String cobolName) {
if (cobolName != null && cobolName.length() > 0
&& Character.isDigit(cobolName.charAt(0))) {
return SAFE_NAME_PREFIX + cobolName;
} else {
return cobolName;
}
} | java | public static String getXmlCompatibleCobolName(final String cobolName) {
if (cobolName != null && cobolName.length() > 0
&& Character.isDigit(cobolName.charAt(0))) {
return SAFE_NAME_PREFIX + cobolName;
} else {
return cobolName;
}
} | [
"public",
"static",
"String",
"getXmlCompatibleCobolName",
"(",
"final",
"String",
"cobolName",
")",
"{",
"if",
"(",
"cobolName",
"!=",
"null",
"&&",
"cobolName",
".",
"length",
"(",
")",
">",
"0",
"&&",
"Character",
".",
"isDigit",
"(",
"cobolName",
".",
... | Transform the COBOL name to a valid XML Name. Does not do any
beautification other than strictly complying with XML specifications.
@param cobolName the original COBOL data item name
@return a valid XML Name | [
"Transform",
"the",
"COBOL",
"name",
"to",
"a",
"valid",
"XML",
"Name",
".",
"Does",
"not",
"do",
"any",
"beautification",
"other",
"than",
"strictly",
"complying",
"with",
"XML",
"specifications",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/XsdDataItem.java#L868-L875 | train |
apptik/jus | android/jus-android/src/main/java/io/apptik/comm/jus/util/DefaultBitmapLruCache.java | DefaultBitmapLruCache.entryRemoved | @Override
protected void entryRemoved(boolean evicted, String key,
Bitmap oldValue, Bitmap newValue) {
if (Utils.hasHoneycomb()) {
// We're running on Honeycomb or later, so add the bitmap
// to the pool set for possible use with inBitmap later
... | java | @Override
protected void entryRemoved(boolean evicted, String key,
Bitmap oldValue, Bitmap newValue) {
if (Utils.hasHoneycomb()) {
// We're running on Honeycomb or later, so add the bitmap
// to the pool set for possible use with inBitmap later
... | [
"@",
"Override",
"protected",
"void",
"entryRemoved",
"(",
"boolean",
"evicted",
",",
"String",
"key",
",",
"Bitmap",
"oldValue",
",",
"Bitmap",
"newValue",
")",
"{",
"if",
"(",
"Utils",
".",
"hasHoneycomb",
"(",
")",
")",
"{",
"// We're running on Honeycomb o... | Notify the removed entry that is no longer being cached | [
"Notify",
"the",
"removed",
"entry",
"that",
"is",
"no",
"longer",
"being",
"cached"
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/android/jus-android/src/main/java/io/apptik/comm/jus/util/DefaultBitmapLruCache.java#L64-L74 | train |
apptik/jus | android/jus-android/src/main/java/io/apptik/comm/jus/util/DefaultBitmapLruCache.java | DefaultBitmapLruCache.sizeOf | @Override
protected int sizeOf(String key, Bitmap value) {
final int bitmapSize = BitmapLruPool.getBitmapSize(value);
return bitmapSize == 0 ? 1 : bitmapSize;
} | java | @Override
protected int sizeOf(String key, Bitmap value) {
final int bitmapSize = BitmapLruPool.getBitmapSize(value);
return bitmapSize == 0 ? 1 : bitmapSize;
} | [
"@",
"Override",
"protected",
"int",
"sizeOf",
"(",
"String",
"key",
",",
"Bitmap",
"value",
")",
"{",
"final",
"int",
"bitmapSize",
"=",
"BitmapLruPool",
".",
"getBitmapSize",
"(",
"value",
")",
";",
"return",
"bitmapSize",
"==",
"0",
"?",
"1",
":",
"bi... | Measure item size in kilobytes rather than units which is more practical
for a bitmap cache | [
"Measure",
"item",
"size",
"in",
"kilobytes",
"rather",
"than",
"units",
"which",
"is",
"more",
"practical",
"for",
"a",
"bitmap",
"cache"
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/android/jus-android/src/main/java/io/apptik/comm/jus/util/DefaultBitmapLruCache.java#L80-L84 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/basic/IOTypeLongArray.java | IOTypeLongArray.saveHWMark | @Override
public void saveHWMark(long endOfPeriod) {
if(getHWMark() < endOfPeriod) {
try {
set(0, get(0), endOfPeriod);
} catch(Exception e) {
_logger.error("Failed to saveHWMark " + endOfPeriod, e);
}
} else if(0 < endOfPeriod && e... | java | @Override
public void saveHWMark(long endOfPeriod) {
if(getHWMark() < endOfPeriod) {
try {
set(0, get(0), endOfPeriod);
} catch(Exception e) {
_logger.error("Failed to saveHWMark " + endOfPeriod, e);
}
} else if(0 < endOfPeriod && e... | [
"@",
"Override",
"public",
"void",
"saveHWMark",
"(",
"long",
"endOfPeriod",
")",
"{",
"if",
"(",
"getHWMark",
"(",
")",
"<",
"endOfPeriod",
")",
"{",
"try",
"{",
"set",
"(",
"0",
",",
"get",
"(",
"0",
")",
",",
"endOfPeriod",
")",
";",
"}",
"catch... | Sync-up the high water mark to a given value.
@param endOfPeriod | [
"Sync",
"-",
"up",
"the",
"high",
"water",
"mark",
"to",
"a",
"given",
"value",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/IOTypeLongArray.java#L77-L93 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/NetworkEntryEvent.java | NetworkEntryEvent.addNodeActiveParticipant | public void addNodeActiveParticipant(String userId, String altUserId, String userName, String networkId)
{
addActiveParticipant(
userId,
altUserId,
userName,
false,
null,
networkId);
} | java | public void addNodeActiveParticipant(String userId, String altUserId, String userName, String networkId)
{
addActiveParticipant(
userId,
altUserId,
userName,
false,
null,
networkId);
} | [
"public",
"void",
"addNodeActiveParticipant",
"(",
"String",
"userId",
",",
"String",
"altUserId",
",",
"String",
"userName",
",",
"String",
"networkId",
")",
"{",
"addActiveParticipant",
"(",
"userId",
",",
"altUserId",
",",
"userName",
",",
"false",
",",
"null... | Add an Active Participant to this message representing the node doing
the network entry
@param userId The Active Participant's User ID
@param altUserId The Active Participant's Alternate UserID
@param userName The Active Participant's UserName
@param networkId The Active Participant's Network Access Point ID | [
"Add",
"an",
"Active",
"Participant",
"to",
"this",
"message",
"representing",
"the",
"node",
"doing",
"the",
"network",
"entry"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/NetworkEntryEvent.java#L52-L61 | train |
keshrath/Giphy4J | src/main/java/at/mukprojects/giphy4j/Giphy.java | Giphy.search | public SearchFeed search(String query, int limit, int offset) throws GiphyException {
SearchFeed feed = null;
HashMap<String, String> params = new HashMap<String, String>();
params.put("api_key", apiKey);
params.put("q", query);
if (limit > 100) {
params.put("limit", "100");
} else {
params.put("limit... | java | public SearchFeed search(String query, int limit, int offset) throws GiphyException {
SearchFeed feed = null;
HashMap<String, String> params = new HashMap<String, String>();
params.put("api_key", apiKey);
params.put("q", query);
if (limit > 100) {
params.put("limit", "100");
} else {
params.put("limit... | [
"public",
"SearchFeed",
"search",
"(",
"String",
"query",
",",
"int",
"limit",
",",
"int",
"offset",
")",
"throws",
"GiphyException",
"{",
"SearchFeed",
"feed",
"=",
"null",
";",
"HashMap",
"<",
"String",
",",
"String",
">",
"params",
"=",
"new",
"HashMap"... | Search all Giphy GIFs for a word or phrase and returns a SearchFeed
object.
<p>
Be aware that not every response has all information available. In that
case the value will be returned as null.
@param query
the query parameters. Multiple parameters are separated by a
space
@param limit
the result limit. The maximum is... | [
"Search",
"all",
"Giphy",
"GIFs",
"for",
"a",
"word",
"or",
"phrase",
"and",
"returns",
"a",
"SearchFeed",
"object",
"."
] | e56b67f161e2184ccff9b9e8f95a70ef89cec897 | https://github.com/keshrath/Giphy4J/blob/e56b67f161e2184ccff9b9e8f95a70ef89cec897/src/main/java/at/mukprojects/giphy4j/Giphy.java#L138-L163 | train |
keshrath/Giphy4J | src/main/java/at/mukprojects/giphy4j/Giphy.java | Giphy.searchByID | public SearchGiphy searchByID(String id) throws GiphyException {
SearchGiphy giphy = null;
HashMap<String, String> params = new HashMap<String, String>();
params.put("api_key", apiKey);
Request request = new Request(UrlUtil.buildUrlQuery(IDEndpoint + id, params));
try {
Response response = sender.sendRequ... | java | public SearchGiphy searchByID(String id) throws GiphyException {
SearchGiphy giphy = null;
HashMap<String, String> params = new HashMap<String, String>();
params.put("api_key", apiKey);
Request request = new Request(UrlUtil.buildUrlQuery(IDEndpoint + id, params));
try {
Response response = sender.sendRequ... | [
"public",
"SearchGiphy",
"searchByID",
"(",
"String",
"id",
")",
"throws",
"GiphyException",
"{",
"SearchGiphy",
"giphy",
"=",
"null",
";",
"HashMap",
"<",
"String",
",",
"String",
">",
"params",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(... | Returns a SerachGiphy object.
<p>
Be aware that not every response has all information available. In that
case the value will be returned as null.
@param id
the Giphy id
@return the SerachGiphy object
@throws GiphyException
if an error occurs during the search | [
"Returns",
"a",
"SerachGiphy",
"object",
"."
] | e56b67f161e2184ccff9b9e8f95a70ef89cec897 | https://github.com/keshrath/Giphy4J/blob/e56b67f161e2184ccff9b9e8f95a70ef89cec897/src/main/java/at/mukprojects/giphy4j/Giphy.java#L178-L196 | train |
keshrath/Giphy4J | src/main/java/at/mukprojects/giphy4j/Giphy.java | Giphy.trendSticker | public SearchFeed trendSticker() throws GiphyException {
SearchFeed feed = null;
HashMap<String, String> params = new HashMap<String, String>();
params.put("api_key", apiKey);
Request request = new Request(UrlUtil.buildUrlQuery(TrendingStickerEndpoint, params));
try {
Response response = sender.sendReques... | java | public SearchFeed trendSticker() throws GiphyException {
SearchFeed feed = null;
HashMap<String, String> params = new HashMap<String, String>();
params.put("api_key", apiKey);
Request request = new Request(UrlUtil.buildUrlQuery(TrendingStickerEndpoint, params));
try {
Response response = sender.sendReques... | [
"public",
"SearchFeed",
"trendSticker",
"(",
")",
"throws",
"GiphyException",
"{",
"SearchFeed",
"feed",
"=",
"null",
";",
"HashMap",
"<",
"String",
",",
"String",
">",
"params",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"p... | Fetch GIFs currently trending online. Hand curated by the Giphy editorial
team. The data returned mirrors the GIFs showcased on the Giphy homepage.
Returns 25 results by default.
<p>
Be aware that not every response has all information available. In that
case the value will be returned as null.
@return the SearchFeed... | [
"Fetch",
"GIFs",
"currently",
"trending",
"online",
".",
"Hand",
"curated",
"by",
"the",
"Giphy",
"editorial",
"team",
".",
"The",
"data",
"returned",
"mirrors",
"the",
"GIFs",
"showcased",
"on",
"the",
"Giphy",
"homepage",
".",
"Returns",
"25",
"results",
"... | e56b67f161e2184ccff9b9e8f95a70ef89cec897 | https://github.com/keshrath/Giphy4J/blob/e56b67f161e2184ccff9b9e8f95a70ef89cec897/src/main/java/at/mukprojects/giphy4j/Giphy.java#L415-L433 | train |
keshrath/Giphy4J | src/main/java/at/mukprojects/giphy4j/Giphy.java | Giphy.searchRandomSticker | public SearchRandom searchRandomSticker(String tag) throws GiphyException {
SearchRandom random = null;
HashMap<String, String> params = new HashMap<String, String>();
params.put("api_key", apiKey);
params.put("tag", tag);
Request request = new Request(UrlUtil.buildUrlQuery(RandomEndpointSticker, params));
tr... | java | public SearchRandom searchRandomSticker(String tag) throws GiphyException {
SearchRandom random = null;
HashMap<String, String> params = new HashMap<String, String>();
params.put("api_key", apiKey);
params.put("tag", tag);
Request request = new Request(UrlUtil.buildUrlQuery(RandomEndpointSticker, params));
tr... | [
"public",
"SearchRandom",
"searchRandomSticker",
"(",
"String",
"tag",
")",
"throws",
"GiphyException",
"{",
"SearchRandom",
"random",
"=",
"null",
";",
"HashMap",
"<",
"String",
",",
"String",
">",
"params",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String"... | Returns a random GIF, limited by tag.
<p>
Be aware that not every response has all information available. In that
case the value will be returned as null.
@param tag
the GIF tag to limit randomness
@return the SerachGiphy object
@throws GiphyException
if an error occurs during the search | [
"Returns",
"a",
"random",
"GIF",
"limited",
"by",
"tag",
"."
] | e56b67f161e2184ccff9b9e8f95a70ef89cec897 | https://github.com/keshrath/Giphy4J/blob/e56b67f161e2184ccff9b9e8f95a70ef89cec897/src/main/java/at/mukprojects/giphy4j/Giphy.java#L448-L467 | train |
apptik/jus | examples-android/src/main/java/io/apptik/comm/jus/examples/request/ImageRequest.java | ImageRequest.getResizedDimension | private static int getResizedDimension(int maxPrimary, int maxSecondary, int actualPrimary,
int actualSecondary, ScaleType scaleType) {
// If no dominant value at all, just return the actual.
if ((maxPrimary == 0) && (maxSecondary == 0)) {
return a... | java | private static int getResizedDimension(int maxPrimary, int maxSecondary, int actualPrimary,
int actualSecondary, ScaleType scaleType) {
// If no dominant value at all, just return the actual.
if ((maxPrimary == 0) && (maxSecondary == 0)) {
return a... | [
"private",
"static",
"int",
"getResizedDimension",
"(",
"int",
"maxPrimary",
",",
"int",
"maxSecondary",
",",
"int",
"actualPrimary",
",",
"int",
"actualSecondary",
",",
"ScaleType",
"scaleType",
")",
"{",
"// If no dominant value at all, just return the actual.",
"if",
... | Scales one side of a rectangle to fit aspect ratio.
@param maxPrimary Maximum size of the primary dimension (i.e. width for
max width), or zero to maintain aspect ratio with secondary
dimension
@param maxSecondary Maximum size of the secondary dimension, or zero to
maintain aspect ratio with primary dimension
@param a... | [
"Scales",
"one",
"side",
"of",
"a",
"rectangle",
"to",
"fit",
"aspect",
"ratio",
"."
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/examples-android/src/main/java/io/apptik/comm/jus/examples/request/ImageRequest.java#L114-L155 | train |
legsem/legstar-core2 | legstar-base/src/main/java/com/legstar/base/type/primitive/CobolStringType.java | CobolStringType.isValidString | protected boolean isValidString(CobolContext cobolContext, byte[] hostData,
int start) {
int length = start + getBytesLen();
for (int i = start; i < length; i++) {
int code = hostData[i] & 0xFF;
if (code != 0 && code < cobolContext.getHostSpaceCharCode()) {
... | java | protected boolean isValidString(CobolContext cobolContext, byte[] hostData,
int start) {
int length = start + getBytesLen();
for (int i = start; i < length; i++) {
int code = hostData[i] & 0xFF;
if (code != 0 && code < cobolContext.getHostSpaceCharCode()) {
... | [
"protected",
"boolean",
"isValidString",
"(",
"CobolContext",
"cobolContext",
",",
"byte",
"[",
"]",
"hostData",
",",
"int",
"start",
")",
"{",
"int",
"length",
"=",
"start",
"+",
"getBytesLen",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"start",
";",
... | Relatively naive implementation that assumes content is either low-value
or a code point greater or equal to the space character.
@param cobolContext host COBOL configuration parameters
@param hostData the byte array containing mainframe data
@param start the start position for the expected type in the byte array
@ret... | [
"Relatively",
"naive",
"implementation",
"that",
"assumes",
"content",
"is",
"either",
"low",
"-",
"value",
"or",
"a",
"code",
"point",
"greater",
"or",
"equal",
"to",
"the",
"space",
"character",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base/src/main/java/com/legstar/base/type/primitive/CobolStringType.java#L53-L66 | train |
legsem/legstar-core2 | legstar-base/src/main/java/com/legstar/base/type/primitive/CobolStringType.java | CobolStringType.fromHostString | private FromHostPrimitiveResult < String > fromHostString(
CobolContext cobolContext, byte[] hostData, int start, int bytesLen) {
// Trim trailing low-values and, optionally, trailing spaces
int spaceCode = cobolContext.getHostSpaceCharCode();
boolean checkSpace = cobolContext.isTru... | java | private FromHostPrimitiveResult < String > fromHostString(
CobolContext cobolContext, byte[] hostData, int start, int bytesLen) {
// Trim trailing low-values and, optionally, trailing spaces
int spaceCode = cobolContext.getHostSpaceCharCode();
boolean checkSpace = cobolContext.isTru... | [
"private",
"FromHostPrimitiveResult",
"<",
"String",
">",
"fromHostString",
"(",
"CobolContext",
"cobolContext",
",",
"byte",
"[",
"]",
"hostData",
",",
"int",
"start",
",",
"int",
"bytesLen",
")",
"{",
"// Trim trailing low-values and, optionally, trailing spaces",
"in... | Convert host data to a java String.
@param cobolContext the COBOL config parameters
@param hostData the host data
@param start where to start in the host data
@param bytesLen how many bytes from the host data to process
@return the result of the conversion | [
"Convert",
"host",
"data",
"to",
"a",
"java",
"String",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base/src/main/java/com/legstar/base/type/primitive/CobolStringType.java#L111-L164 | train |
jingwei/krati | krati-main/src/main/java/krati/io/IOFactory.java | IOFactory.createDataReader | public final static DataReader createDataReader(File file, IOType type) {
if(type == IOType.MAPPED) {
if(file.length() <= Integer.MAX_VALUE) {
return new MappedReader(file);
} else {
return new MultiMappedReader(file);
}
} else {
... | java | public final static DataReader createDataReader(File file, IOType type) {
if(type == IOType.MAPPED) {
if(file.length() <= Integer.MAX_VALUE) {
return new MappedReader(file);
} else {
return new MultiMappedReader(file);
}
} else {
... | [
"public",
"final",
"static",
"DataReader",
"createDataReader",
"(",
"File",
"file",
",",
"IOType",
"type",
")",
"{",
"if",
"(",
"type",
"==",
"IOType",
".",
"MAPPED",
")",
"{",
"if",
"(",
"file",
".",
"length",
"(",
")",
"<=",
"Integer",
".",
"MAX_VALU... | Creates a new DataReader to read from a file.
@param file - file to read.
@param type - I/O type.
@return a new DataReader instance. | [
"Creates",
"a",
"new",
"DataReader",
"to",
"read",
"from",
"a",
"file",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/io/IOFactory.java#L37-L47 | train |
jingwei/krati | krati-main/src/main/java/krati/io/IOFactory.java | IOFactory.createDataWriter | public final static DataWriter createDataWriter(File file, IOType type) {
if(type == IOType.MAPPED) {
if(file.length() <= Integer.MAX_VALUE) {
return new MappedWriter(file);
} else {
return new MultiMappedWriter(file);
}
} else {
... | java | public final static DataWriter createDataWriter(File file, IOType type) {
if(type == IOType.MAPPED) {
if(file.length() <= Integer.MAX_VALUE) {
return new MappedWriter(file);
} else {
return new MultiMappedWriter(file);
}
} else {
... | [
"public",
"final",
"static",
"DataWriter",
"createDataWriter",
"(",
"File",
"file",
",",
"IOType",
"type",
")",
"{",
"if",
"(",
"type",
"==",
"IOType",
".",
"MAPPED",
")",
"{",
"if",
"(",
"file",
".",
"length",
"(",
")",
"<=",
"Integer",
".",
"MAX_VALU... | Creates a new DataWriter to write to a file.
@param file - file to write.
@param type - I/O type.
@return a new DataWriter instance of type {@link BasicIO}. | [
"Creates",
"a",
"new",
"DataWriter",
"to",
"write",
"to",
"a",
"file",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/io/IOFactory.java#L56-L66 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java | XDSConsumerAuditor.getAuditor | public static XDSConsumerAuditor getAuditor()
{
AuditorModuleContext ctx = AuditorModuleContext.getContext();
return (XDSConsumerAuditor)ctx.getAuditor(XDSConsumerAuditor.class);
} | java | public static XDSConsumerAuditor getAuditor()
{
AuditorModuleContext ctx = AuditorModuleContext.getContext();
return (XDSConsumerAuditor)ctx.getAuditor(XDSConsumerAuditor.class);
} | [
"public",
"static",
"XDSConsumerAuditor",
"getAuditor",
"(",
")",
"{",
"AuditorModuleContext",
"ctx",
"=",
"AuditorModuleContext",
".",
"getContext",
"(",
")",
";",
"return",
"(",
"XDSConsumerAuditor",
")",
"ctx",
".",
"getAuditor",
"(",
"XDSConsumerAuditor",
".",
... | Get an instance of the XDS Document Consumer Auditor from the
global context
@return XDS Document Consumer Auditor instance | [
"Get",
"an",
"instance",
"of",
"the",
"XDS",
"Document",
"Consumer",
"Auditor",
"from",
"the",
"global",
"context"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java#L46-L50 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java | XDSConsumerAuditor.auditRegistryQueryEvent | public void auditRegistryQueryEvent(
RFC3881EventOutcomeCodes eventOutcome,
String registryEndpointUri,
String consumerUserName,
String adhocQueryRequestPayload,
String patientId)
{
if (!isAuditorEnabled()) {
return;
}
auditQueryEvent(true,
new IHETransactionEventTypeCodes.Registr... | java | public void auditRegistryQueryEvent(
RFC3881EventOutcomeCodes eventOutcome,
String registryEndpointUri,
String consumerUserName,
String adhocQueryRequestPayload,
String patientId)
{
if (!isAuditorEnabled()) {
return;
}
auditQueryEvent(true,
new IHETransactionEventTypeCodes.Registr... | [
"public",
"void",
"auditRegistryQueryEvent",
"(",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"registryEndpointUri",
",",
"String",
"consumerUserName",
",",
"String",
"adhocQueryRequestPayload",
",",
"String",
"patientId",
")",
"{",
"if",
"(",
"!",
"isAud... | Audits an ITI-16 Registry Query event for XDS.a Document Consumer actors.
@param eventOutcome The event outcome indicator
@param registryEndpointUri The endpoint of the registry in this transaction
@param adhocQueryRequestPayload The payload of the adhoc query request element
@param patientId The patient ID queried (i... | [
"Audits",
"an",
"ITI",
"-",
"16",
"Registry",
"Query",
"event",
"for",
"XDS",
".",
"a",
"Document",
"Consumer",
"actors",
"."
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java#L60-L79 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java | XDSConsumerAuditor.auditRegistryStoredQueryEvent | public void auditRegistryStoredQueryEvent(
RFC3881EventOutcomeCodes eventOutcome,
String registryEndpointUri,
String consumerUserName,
String storedQueryUUID, String adhocQueryRequestPayload, String homeCommunityId,
String patientId,
List<CodedValueType> purposesOfUse,
List<CodedV... | java | public void auditRegistryStoredQueryEvent(
RFC3881EventOutcomeCodes eventOutcome,
String registryEndpointUri,
String consumerUserName,
String storedQueryUUID, String adhocQueryRequestPayload, String homeCommunityId,
String patientId,
List<CodedValueType> purposesOfUse,
List<CodedV... | [
"public",
"void",
"auditRegistryStoredQueryEvent",
"(",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"registryEndpointUri",
",",
"String",
"consumerUserName",
",",
"String",
"storedQueryUUID",
",",
"String",
"adhocQueryRequestPayload",
",",
"String",
"homeCommun... | Audits an ITI-18 Registry Stored Query event for XDS.a and XDS.b Document Consumer actors.
@param eventOutcome The event outcome indicator
@param registryEndpointUri The endpoint of the registry in this transaction
@param consumerUserName The Active Participant UserName for the consumer (if using WS-Security / XUA)
@p... | [
"Audits",
"an",
"ITI",
"-",
"18",
"Registry",
"Stored",
"Query",
"event",
"for",
"XDS",
".",
"a",
"and",
"XDS",
".",
"b",
"Document",
"Consumer",
"actors",
"."
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java#L94-L121 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java | XDSConsumerAuditor.auditRetrieveDocumentEvent | public void auditRetrieveDocumentEvent(RFC3881EventOutcomeCodes eventOutcome,
String repositoryRetrieveUri,
String userName,
String documentUniqueId,
String patientId)
{
if (!isAuditorEnabled()) {
return;
}
ImportEvent importEvent = new ImportEvent(false, eventOutcome, new IHETransactionE... | java | public void auditRetrieveDocumentEvent(RFC3881EventOutcomeCodes eventOutcome,
String repositoryRetrieveUri,
String userName,
String documentUniqueId,
String patientId)
{
if (!isAuditorEnabled()) {
return;
}
ImportEvent importEvent = new ImportEvent(false, eventOutcome, new IHETransactionE... | [
"public",
"void",
"auditRetrieveDocumentEvent",
"(",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"repositoryRetrieveUri",
",",
"String",
"userName",
",",
"String",
"documentUniqueId",
",",
"String",
"patientId",
")",
"{",
"if",
"(",
"!",
"isAuditorEnabled... | Audits an ITI-17 Retrieve Document event for XDS.a Document Consumer actors.
@param eventOutcome The event outcome indicator
@param repositoryRetrieveUri The URI of the document being retrieved
@param documentUniqueId The Document Entry Unique ID of the document being retrieved (if known)
@param patientId The patient ... | [
"Audits",
"an",
"ITI",
"-",
"17",
"Retrieve",
"Document",
"event",
"for",
"XDS",
".",
"a",
"Document",
"Consumer",
"actors",
"."
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java#L132-L154 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java | XDSConsumerAuditor.auditRetrieveDocumentSetEvent | public void auditRetrieveDocumentSetEvent(RFC3881EventOutcomeCodes eventOutcome,
String repositoryEndpointUri,
String userName,
String[] documentUniqueIds, String repositoryUniqueId, String homeCommunityId,
String patientId,
List<CodedValueType> purposesOfUse,
List<CodedValueType> ... | java | public void auditRetrieveDocumentSetEvent(RFC3881EventOutcomeCodes eventOutcome,
String repositoryEndpointUri,
String userName,
String[] documentUniqueIds, String repositoryUniqueId, String homeCommunityId,
String patientId,
List<CodedValueType> purposesOfUse,
List<CodedValueType> ... | [
"public",
"void",
"auditRetrieveDocumentSetEvent",
"(",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"repositoryEndpointUri",
",",
"String",
"userName",
",",
"String",
"[",
"]",
"documentUniqueIds",
",",
"String",
"repositoryUniqueId",
",",
"String",
"homeCo... | Audits an ITI-43 Retrieve Document Set event for XDS.b Document Consumer actors.
Sends audit messages for situations when exactly one repository and zero or one community are specified in the transaction.
@param eventOutcome The event outcome indicator
@param repositoryEndpointUri The Web service endpoint URI for the ... | [
"Audits",
"an",
"ITI",
"-",
"43",
"Retrieve",
"Document",
"Set",
"event",
"for",
"XDS",
".",
"b",
"Document",
"Consumer",
"actors",
".",
"Sends",
"audit",
"messages",
"for",
"situations",
"when",
"exactly",
"one",
"repository",
"and",
"zero",
"or",
"one",
... | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java#L169-L193 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java | XDSConsumerAuditor.auditRetrieveDocumentSetEvent | public void auditRetrieveDocumentSetEvent(RFC3881EventOutcomeCodes eventOutcome,
String repositoryEndpointUri,
String userName,
String[] documentUniqueIds, String[] repositoryUniqueIds, String[] homeCommunityIds,
String patientId,
List<CodedValueType> purposesOfUse,
List<CodedVa... | java | public void auditRetrieveDocumentSetEvent(RFC3881EventOutcomeCodes eventOutcome,
String repositoryEndpointUri,
String userName,
String[] documentUniqueIds, String[] repositoryUniqueIds, String[] homeCommunityIds,
String patientId,
List<CodedValueType> purposesOfUse,
List<CodedVa... | [
"public",
"void",
"auditRetrieveDocumentSetEvent",
"(",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"repositoryEndpointUri",
",",
"String",
"userName",
",",
"String",
"[",
"]",
"documentUniqueIds",
",",
"String",
"[",
"]",
"repositoryUniqueIds",
",",
"Str... | Audits an ITI-43 Retrieve Document Set event for XDS.b Document Consumer actors.
Sends audit messages for situations when more than one repository and more than one community are specified in the transaction.
@param eventOutcome The event outcome indicator
@param repositoryEndpointUri The Web service endpoint URI for ... | [
"Audits",
"an",
"ITI",
"-",
"43",
"Retrieve",
"Document",
"Set",
"event",
"for",
"XDS",
".",
"b",
"Document",
"Consumer",
"actors",
".",
"Sends",
"audit",
"messages",
"for",
"situations",
"when",
"more",
"than",
"one",
"repository",
"and",
"more",
"than",
... | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java#L209-L240 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/AuditLogUsedEvent.java | AuditLogUsedEvent.addAccessingParticipant | public void addAccessingParticipant(String userId, String altUserId, String userName, String networkId)
{
addActiveParticipant(
userId,
altUserId,
userName,
true,
null,
networkId);
} | java | public void addAccessingParticipant(String userId, String altUserId, String userName, String networkId)
{
addActiveParticipant(
userId,
altUserId,
userName,
true,
null,
networkId);
} | [
"public",
"void",
"addAccessingParticipant",
"(",
"String",
"userId",
",",
"String",
"altUserId",
",",
"String",
"userName",
",",
"String",
"networkId",
")",
"{",
"addActiveParticipant",
"(",
"userId",
",",
"altUserId",
",",
"userName",
",",
"true",
",",
"null",... | Adds the Active Participant of the User or System that accessed the log
@param userId The Active Participant's User ID
@param altUserId The Active Participant's Alternate UserID
@param userName The Active Participant's UserName
@param networkId The Active Participant's Network Access Point ID | [
"Adds",
"the",
"Active",
"Participant",
"of",
"the",
"User",
"or",
"System",
"that",
"accessed",
"the",
"log"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/AuditLogUsedEvent.java#L51-L60 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/AuditLogUsedEvent.java | AuditLogUsedEvent.addAuditLogIdentity | public void addAuditLogIdentity(String auditLogUri)
{
addParticipantObjectIdentification(
new RFC3881ParticipantObjectCodes.RFC3881ParticipantObjectIDTypeCodes.URI(),
"Security Audit Log",
null,
null,
auditLogUri,
RFC3881ParticipantObjectTypeCodes.SYSTEM,
RFC3881ParticipantObjectType... | java | public void addAuditLogIdentity(String auditLogUri)
{
addParticipantObjectIdentification(
new RFC3881ParticipantObjectCodes.RFC3881ParticipantObjectIDTypeCodes.URI(),
"Security Audit Log",
null,
null,
auditLogUri,
RFC3881ParticipantObjectTypeCodes.SYSTEM,
RFC3881ParticipantObjectType... | [
"public",
"void",
"addAuditLogIdentity",
"(",
"String",
"auditLogUri",
")",
"{",
"addParticipantObjectIdentification",
"(",
"new",
"RFC3881ParticipantObjectCodes",
".",
"RFC3881ParticipantObjectIDTypeCodes",
".",
"URI",
"(",
")",
",",
"\"Security Audit Log\"",
",",
"null",
... | Adds the Participant Object block representing the audit log accessed
@param auditLogUri The URI of the audit log that was accessed | [
"Adds",
"the",
"Participant",
"Object",
"block",
"representing",
"the",
"audit",
"log",
"accessed"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/AuditLogUsedEvent.java#L67-L79 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java | XDSRepositoryAuditor.getAuditor | public static XDSRepositoryAuditor getAuditor()
{
AuditorModuleContext ctx = AuditorModuleContext.getContext();
return (XDSRepositoryAuditor)ctx.getAuditor(XDSRepositoryAuditor.class);
} | java | public static XDSRepositoryAuditor getAuditor()
{
AuditorModuleContext ctx = AuditorModuleContext.getContext();
return (XDSRepositoryAuditor)ctx.getAuditor(XDSRepositoryAuditor.class);
} | [
"public",
"static",
"XDSRepositoryAuditor",
"getAuditor",
"(",
")",
"{",
"AuditorModuleContext",
"ctx",
"=",
"AuditorModuleContext",
".",
"getContext",
"(",
")",
";",
"return",
"(",
"XDSRepositoryAuditor",
")",
"ctx",
".",
"getAuditor",
"(",
"XDSRepositoryAuditor",
... | Get an instance of the XDS Document Repository Auditor from the
global context
@return XDS Document Repository Auditor instance | [
"Get",
"an",
"instance",
"of",
"the",
"XDS",
"Document",
"Repository",
"Auditor",
"from",
"the",
"global",
"context"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java#L49-L53 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java | XDSRepositoryAuditor.auditRegisterDocumentSetEvent | public void auditRegisterDocumentSetEvent(
RFC3881EventOutcomeCodes eventOutcome,
String repositoryUserId,
String userName,
String registryEndpointUri,
String submissionSetUniqueId, String patientId)
{
if (!isAuditorEnabled()) {
return;
}
auditRegisterEvent(new IHETransactionEventType... | java | public void auditRegisterDocumentSetEvent(
RFC3881EventOutcomeCodes eventOutcome,
String repositoryUserId,
String userName,
String registryEndpointUri,
String submissionSetUniqueId, String patientId)
{
if (!isAuditorEnabled()) {
return;
}
auditRegisterEvent(new IHETransactionEventType... | [
"public",
"void",
"auditRegisterDocumentSetEvent",
"(",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"repositoryUserId",
",",
"String",
"userName",
",",
"String",
"registryEndpointUri",
",",
"String",
"submissionSetUniqueId",
",",
"String",
"patientId",
")",
... | Audits an ITI-14 Register Document Set event for XDS.a Document Repository actors.
@param eventOutcome The event outcome indicator
@param registryEndpointUri The endpoint of the registry in this transaction
@param submissionSetUniqueId The UniqueID of the Submission Set registered
@param patientId The Patient Id that ... | [
"Audits",
"an",
"ITI",
"-",
"14",
"Register",
"Document",
"Set",
"event",
"for",
"XDS",
".",
"a",
"Document",
"Repository",
"actors",
"."
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java#L134-L147 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java | XDSRepositoryAuditor.auditRegisterDocumentSetBEvent | public void auditRegisterDocumentSetBEvent(
RFC3881EventOutcomeCodes eventOutcome,
String repositoryUserId,
String userName,
String registryEndpointUri,
String submissionSetUniqueId, String patientId,
List<CodedValueType> purposesOfUse,
List<CodedValueType> userRoles)
{
if (!i... | java | public void auditRegisterDocumentSetBEvent(
RFC3881EventOutcomeCodes eventOutcome,
String repositoryUserId,
String userName,
String registryEndpointUri,
String submissionSetUniqueId, String patientId,
List<CodedValueType> purposesOfUse,
List<CodedValueType> userRoles)
{
if (!i... | [
"public",
"void",
"auditRegisterDocumentSetBEvent",
"(",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"repositoryUserId",
",",
"String",
"userName",
",",
"String",
"registryEndpointUri",
",",
"String",
"submissionSetUniqueId",
",",
"String",
"patientId",
",",
... | Audits an ITI-42 Register Document Set-b event for XDS.b Document Repository actors.
@param eventOutcome The event outcome indicator
@param registryEndpointUri The endpoint of the registry in this transaction
@param submissionSetUniqueId The UniqueID of the Submission Set registered
@param patientId The Patient Id tha... | [
"Audits",
"an",
"ITI",
"-",
"42",
"Register",
"Document",
"Set",
"-",
"b",
"event",
"for",
"XDS",
".",
"b",
"Document",
"Repository",
"actors",
"."
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java#L159-L174 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java | XDSRepositoryAuditor.auditRetrieveDocumentEvent | public void auditRetrieveDocumentEvent(
RFC3881EventOutcomeCodes eventOutcome,
String consumerIpAddress,
String userName,
String repositoryRetrieveUri, String documentUniqueId)
{
if (!isAuditorEnabled()) {
return;
}
ExportEvent exportEvent = new ExportEvent(true, eventOutcome, new IHETran... | java | public void auditRetrieveDocumentEvent(
RFC3881EventOutcomeCodes eventOutcome,
String consumerIpAddress,
String userName,
String repositoryRetrieveUri, String documentUniqueId)
{
if (!isAuditorEnabled()) {
return;
}
ExportEvent exportEvent = new ExportEvent(true, eventOutcome, new IHETran... | [
"public",
"void",
"auditRetrieveDocumentEvent",
"(",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"consumerIpAddress",
",",
"String",
"userName",
",",
"String",
"repositoryRetrieveUri",
",",
"String",
"documentUniqueId",
")",
"{",
"if",
"(",
"!",
"isAudito... | Audits an ITI-17 Retrieve Document event for XDS.a Document Repository actors.
@param eventOutcome The event outcome indicator
@param consumerIpAddress The IP address of the document consumer that initiated the transaction
@param repositoryRetrieveUri The URI that was used to retrieve the document
@param documentUniqu... | [
"Audits",
"an",
"ITI",
"-",
"17",
"Retrieve",
"Document",
"event",
"for",
"XDS",
".",
"a",
"Document",
"Repository",
"actors",
"."
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java#L196-L215 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java | XDSRepositoryAuditor.auditRetrieveDocumentSetEvent | public void auditRetrieveDocumentSetEvent(
RFC3881EventOutcomeCodes eventOutcome,
String consumerUserId, String consumerUserName, String consumerIpAddress,
String repositoryEndpointUri,
String[] documentUniqueIds, String repositoryUniqueId, String homeCommunityId,
List<CodedValueType> purposesO... | java | public void auditRetrieveDocumentSetEvent(
RFC3881EventOutcomeCodes eventOutcome,
String consumerUserId, String consumerUserName, String consumerIpAddress,
String repositoryEndpointUri,
String[] documentUniqueIds, String repositoryUniqueId, String homeCommunityId,
List<CodedValueType> purposesO... | [
"public",
"void",
"auditRetrieveDocumentSetEvent",
"(",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"consumerUserId",
",",
"String",
"consumerUserName",
",",
"String",
"consumerIpAddress",
",",
"String",
"repositoryEndpointUri",
",",
"String",
"[",
"]",
"do... | Audits an ITI-43 Retrieve Document Set-b event for XDS.b Document Repository actors.
Sends audit messages for situations when exactly one repository and zero or one community are specified in the transaction.
@param eventOutcome The event outcome indicator
@param consumerUserId The Active Participant UserID for the do... | [
"Audits",
"an",
"ITI",
"-",
"43",
"Retrieve",
"Document",
"Set",
"-",
"b",
"event",
"for",
"XDS",
".",
"b",
"Document",
"Repository",
"actors",
".",
"Sends",
"audit",
"messages",
"for",
"situations",
"when",
"exactly",
"one",
"repository",
"and",
"zero",
"... | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java#L232-L251 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java | XDSRepositoryAuditor.auditRetrieveDocumentSetEvent | public void auditRetrieveDocumentSetEvent(
RFC3881EventOutcomeCodes eventOutcome,
String consumerUserId, String consumerUserName, String consumerIpAddress,
String repositoryEndpointUri,
String[] documentUniqueIds, String[] repositoryUniqueIds, String[] homeCommunityIds,
List<CodedValueType> purp... | java | public void auditRetrieveDocumentSetEvent(
RFC3881EventOutcomeCodes eventOutcome,
String consumerUserId, String consumerUserName, String consumerIpAddress,
String repositoryEndpointUri,
String[] documentUniqueIds, String[] repositoryUniqueIds, String[] homeCommunityIds,
List<CodedValueType> purp... | [
"public",
"void",
"auditRetrieveDocumentSetEvent",
"(",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"consumerUserId",
",",
"String",
"consumerUserName",
",",
"String",
"consumerIpAddress",
",",
"String",
"repositoryEndpointUri",
",",
"String",
"[",
"]",
"do... | Audits an ITI-43 Retrieve Document Set-b event for XDS.b Document Repository actors.
Sends audit messages for situations when more than one repository and more than one community are specified in the transaction.
@param eventOutcome The event outcome indicator
@param consumerUserId The Active Participant UserID for th... | [
"Audits",
"an",
"ITI",
"-",
"43",
"Retrieve",
"Document",
"Set",
"-",
"b",
"event",
"for",
"XDS",
".",
"b",
"Document",
"Repository",
"actors",
".",
"Sends",
"audit",
"messages",
"for",
"situations",
"when",
"more",
"than",
"one",
"repository",
"and",
"mor... | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java#L326-L352 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java | XDSRepositoryAuditor.auditProvideAndRegisterEvent | protected void auditProvideAndRegisterEvent (
IHETransactionEventTypeCodes transaction,
RFC3881EventOutcomeCodes eventOutcome,
String sourceUserId, String sourceIpAddress,
String userName,
String repositoryEndpointUri,
String submissionSetUniqueId,
String patientId,
List<Coded... | java | protected void auditProvideAndRegisterEvent (
IHETransactionEventTypeCodes transaction,
RFC3881EventOutcomeCodes eventOutcome,
String sourceUserId, String sourceIpAddress,
String userName,
String repositoryEndpointUri,
String submissionSetUniqueId,
String patientId,
List<Coded... | [
"protected",
"void",
"auditProvideAndRegisterEvent",
"(",
"IHETransactionEventTypeCodes",
"transaction",
",",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"sourceUserId",
",",
"String",
"sourceIpAddress",
",",
"String",
"userName",
",",
"String",
"repositoryEndp... | Generically sends audit messages for XDS Document Repository Provide And Register Document Set events
@param transaction The specific IHE Transaction (ITI-15 or ITI-41)
@param eventOutcome The event outcome indicator
@param sourceUserId The Active Participant UserID for the document consumer (if using WS-Addressing)
@... | [
"Generically",
"sends",
"audit",
"messages",
"for",
"XDS",
"Document",
"Repository",
"Provide",
"And",
"Register",
"Document",
"Set",
"events"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java#L378-L402 | train |
jingwei/krati | krati-main/src/main/java/krati/core/segment/SegmentManager.java | SegmentManager.getLiveSegmentCount | public final int getLiveSegmentCount() {
int num = 0;
for (int i = 0; i < _segList.size(); i++) {
if (_segList.get(i) != null)
num++;
}
return num;
} | java | public final int getLiveSegmentCount() {
int num = 0;
for (int i = 0; i < _segList.size(); i++) {
if (_segList.get(i) != null)
num++;
}
return num;
} | [
"public",
"final",
"int",
"getLiveSegmentCount",
"(",
")",
"{",
"int",
"num",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"_segList",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"_segList",
".",
"get",
"(",
... | Gets the count of live segments managed by this SegmentManager. | [
"Gets",
"the",
"count",
"of",
"live",
"segments",
"managed",
"by",
"this",
"SegmentManager",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/segment/SegmentManager.java#L180-L189 | train |
jingwei/krati | krati-main/src/main/java/krati/core/segment/SegmentManager.java | SegmentManager.freeSegment | public synchronized boolean freeSegment(Segment seg) throws IOException {
if (seg == null)
return false;
int segId = seg.getSegmentId();
if (segId < _segList.size() && _segList.get(segId) == seg) {
_segList.set(segId, null);
seg.close(false);
... | java | public synchronized boolean freeSegment(Segment seg) throws IOException {
if (seg == null)
return false;
int segId = seg.getSegmentId();
if (segId < _segList.size() && _segList.get(segId) == seg) {
_segList.set(segId, null);
seg.close(false);
... | [
"public",
"synchronized",
"boolean",
"freeSegment",
"(",
"Segment",
"seg",
")",
"throws",
"IOException",
"{",
"if",
"(",
"seg",
"==",
"null",
")",
"return",
"false",
";",
"int",
"segId",
"=",
"seg",
".",
"getSegmentId",
"(",
")",
";",
"if",
"(",
"segId",... | Frees the specified segment. | [
"Frees",
"the",
"specified",
"segment",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/segment/SegmentManager.java#L201-L237 | train |
jingwei/krati | krati-main/src/main/java/krati/core/segment/SegmentManager.java | SegmentManager.nextSegment | public synchronized Segment nextSegment() throws IOException {
Segment seg = nextSegment(false);
// Remove the writer segment index buffer file.
File sibFile = getSegmentIndexBufferFile(seg.getSegmentId());
if(sibFile.exists()) {
sibFile.delete();
}
... | java | public synchronized Segment nextSegment() throws IOException {
Segment seg = nextSegment(false);
// Remove the writer segment index buffer file.
File sibFile = getSegmentIndexBufferFile(seg.getSegmentId());
if(sibFile.exists()) {
sibFile.delete();
}
... | [
"public",
"synchronized",
"Segment",
"nextSegment",
"(",
")",
"throws",
"IOException",
"{",
"Segment",
"seg",
"=",
"nextSegment",
"(",
"false",
")",
";",
"// Remove the writer segment index buffer file.",
"File",
"sibFile",
"=",
"getSegmentIndexBufferFile",
"(",
"seg",
... | Opens the next segment available for read and write. | [
"Opens",
"the",
"next",
"segment",
"available",
"for",
"read",
"and",
"write",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/segment/SegmentManager.java#L242-L252 | train |
jingwei/krati | krati-main/src/main/java/krati/core/segment/SegmentManager.java | SegmentManager.flushSegmentIndexBuffers | public void flushSegmentIndexBuffers() {
SegmentIndexBuffer sib = null;
while((sib = _sibManager.poll()) != null) {
File sibFile = getSegmentIndexBufferFile(sib.getSegmentId());
try {
_sibManager.getSegmentIndexBufferIO().write(sib, sibFile);
... | java | public void flushSegmentIndexBuffers() {
SegmentIndexBuffer sib = null;
while((sib = _sibManager.poll()) != null) {
File sibFile = getSegmentIndexBufferFile(sib.getSegmentId());
try {
_sibManager.getSegmentIndexBufferIO().write(sib, sibFile);
... | [
"public",
"void",
"flushSegmentIndexBuffers",
"(",
")",
"{",
"SegmentIndexBuffer",
"sib",
"=",
"null",
";",
"while",
"(",
"(",
"sib",
"=",
"_sibManager",
".",
"poll",
"(",
")",
")",
"!=",
"null",
")",
"{",
"File",
"sibFile",
"=",
"getSegmentIndexBufferFile",... | Flushes accumulated segment index buffers to disk. | [
"Flushes",
"accumulated",
"segment",
"index",
"buffers",
"to",
"disk",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/segment/SegmentManager.java#L314-L326 | train |
jingwei/krati | krati-main/src/main/java/krati/core/segment/SegmentManager.java | SegmentManager.nextSegment | private Segment nextSegment(boolean newOnly) throws IOException {
int index;
Segment seg;
if (newOnly) {
index = _segList.size();
} else {
if (_recycleList.size() > 0) {
seg = _recycleList.remove();
seg.reinit();
_... | java | private Segment nextSegment(boolean newOnly) throws IOException {
int index;
Segment seg;
if (newOnly) {
index = _segList.size();
} else {
if (_recycleList.size() > 0) {
seg = _recycleList.remove();
seg.reinit();
_... | [
"private",
"Segment",
"nextSegment",
"(",
"boolean",
"newOnly",
")",
"throws",
"IOException",
"{",
"int",
"index",
";",
"Segment",
"seg",
";",
"if",
"(",
"newOnly",
")",
"{",
"index",
"=",
"_segList",
".",
"size",
"(",
")",
";",
"}",
"else",
"{",
"if",... | Gets the next segment available for read and write.
@param newOnly
If true, create a new segment from scratch. Otherwise, reuse
the first free segment.
@return
@throws IOException | [
"Gets",
"the",
"next",
"segment",
"available",
"for",
"read",
"and",
"write",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/segment/SegmentManager.java#L369-L401 | train |
jingwei/krati | krati-main/src/main/java/krati/core/segment/SegmentManager.java | SegmentManager.initSegs | private void initSegs() throws IOException {
int loaded = 0;
File[] segFiles = listSegmentFiles();
if (segFiles.length == 0) {
return;
}
try {
for (int i = 0; i < segFiles.length; i++) {
File segFile = segFiles[i];
int segI... | java | private void initSegs() throws IOException {
int loaded = 0;
File[] segFiles = listSegmentFiles();
if (segFiles.length == 0) {
return;
}
try {
for (int i = 0; i < segFiles.length; i++) {
File segFile = segFiles[i];
int segI... | [
"private",
"void",
"initSegs",
"(",
")",
"throws",
"IOException",
"{",
"int",
"loaded",
"=",
"0",
";",
"File",
"[",
"]",
"segFiles",
"=",
"listSegmentFiles",
"(",
")",
";",
"if",
"(",
"segFiles",
".",
"length",
"==",
"0",
")",
"{",
"return",
";",
"}"... | Initializes the segments managed by this SegmentManager
@throws IOException | [
"Initializes",
"the",
"segments",
"managed",
"by",
"this",
"SegmentManager"
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/segment/SegmentManager.java#L417-L451 | train |
jingwei/krati | krati-main/src/main/java/krati/core/segment/SegmentManager.java | SegmentManager.clearInternal | private void clearInternal(boolean clearMeta) {
// Close all known segments
for(int segId = 0, cnt = _segList.size(); segId < cnt; segId++) {
Segment seg = _segList.get(segId);
if(seg != null) {
try {
if(seg.getMode() == Segment.Mode.READ_WRITE... | java | private void clearInternal(boolean clearMeta) {
// Close all known segments
for(int segId = 0, cnt = _segList.size(); segId < cnt; segId++) {
Segment seg = _segList.get(segId);
if(seg != null) {
try {
if(seg.getMode() == Segment.Mode.READ_WRITE... | [
"private",
"void",
"clearInternal",
"(",
"boolean",
"clearMeta",
")",
"{",
"// Close all known segments",
"for",
"(",
"int",
"segId",
"=",
"0",
",",
"cnt",
"=",
"_segList",
".",
"size",
"(",
")",
";",
"segId",
"<",
"cnt",
";",
"segId",
"++",
")",
"{",
... | Clears this SegmentManager.
@param clearMeta - whether to clear the segment meta file | [
"Clears",
"this",
"SegmentManager",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/segment/SegmentManager.java#L458-L486 | train |
jingwei/krati | krati-main/src/main/java/krati/core/segment/SegmentManager.java | SegmentManager.listSegmentFiles | protected File[] listSegmentFiles() {
File segDir = new File(_segHomePath);
File[] segFiles = segDir.listFiles(new FileFilter() {
@Override
public boolean accept(File filePath) {
String fileName = filePath.getName();
if (fileName.matches("^[0-9]+\\... | java | protected File[] listSegmentFiles() {
File segDir = new File(_segHomePath);
File[] segFiles = segDir.listFiles(new FileFilter() {
@Override
public boolean accept(File filePath) {
String fileName = filePath.getName();
if (fileName.matches("^[0-9]+\\... | [
"protected",
"File",
"[",
"]",
"listSegmentFiles",
"(",
")",
"{",
"File",
"segDir",
"=",
"new",
"File",
"(",
"_segHomePath",
")",
";",
"File",
"[",
"]",
"segFiles",
"=",
"segDir",
".",
"listFiles",
"(",
"new",
"FileFilter",
"(",
")",
"{",
"@",
"Overrid... | Lists all the segment files managed by this SegmentManager. | [
"Lists",
"all",
"the",
"segment",
"files",
"managed",
"by",
"this",
"SegmentManager",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/segment/SegmentManager.java#L505-L532 | train |
legsem/legstar-core2 | legstar-jaxb-generator/src/main/java/com/legstar/jaxb/generator/EachHelper.java | EachHelper.hashContext | private CharSequence hashContext(final Object context, final Options options)
throws IOException {
Set < Entry < String, Object >> propertySet = options
.propertySet(context);
StringBuilder buffer = new StringBuilder();
Context parent = options.context;
boolea... | java | private CharSequence hashContext(final Object context, final Options options)
throws IOException {
Set < Entry < String, Object >> propertySet = options
.propertySet(context);
StringBuilder buffer = new StringBuilder();
Context parent = options.context;
boolea... | [
"private",
"CharSequence",
"hashContext",
"(",
"final",
"Object",
"context",
",",
"final",
"Options",
"options",
")",
"throws",
"IOException",
"{",
"Set",
"<",
"Entry",
"<",
"String",
",",
"Object",
">",
">",
"propertySet",
"=",
"options",
".",
"propertySet",
... | Iterate over a hash like object.
@param context The context object.
@param options The helper options.
@return The string output.
@throws IOException If something goes wrong. | [
"Iterate",
"over",
"a",
"hash",
"like",
"object",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-jaxb-generator/src/main/java/com/legstar/jaxb/generator/EachHelper.java#L54-L70 | train |
legsem/legstar-core2 | legstar-jaxb-generator/src/main/java/com/legstar/jaxb/generator/EachHelper.java | EachHelper.iterableContext | private CharSequence iterableContext(final Iterable<Object> context, final Options options)
throws IOException {
StringBuilder buffer = new StringBuilder();
if (options.isFalsy(context)) {
buffer.append(options.inverse());
} else {
Iterator<Object> iterator = context.iterator();
int ... | java | private CharSequence iterableContext(final Iterable<Object> context, final Options options)
throws IOException {
StringBuilder buffer = new StringBuilder();
if (options.isFalsy(context)) {
buffer.append(options.inverse());
} else {
Iterator<Object> iterator = context.iterator();
int ... | [
"private",
"CharSequence",
"iterableContext",
"(",
"final",
"Iterable",
"<",
"Object",
">",
"context",
",",
"final",
"Options",
"options",
")",
"throws",
"IOException",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"opt... | Iterate over an iterable object.
@param context The context object.
@param options The helper options.
@return The string output.
@throws IOException If something goes wrong. | [
"Iterate",
"over",
"an",
"iterable",
"object",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-jaxb-generator/src/main/java/com/legstar/jaxb/generator/EachHelper.java#L80-L107 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java | ArrayEntryManager.switchEntry | protected synchronized void switchEntry(boolean blocking) throws IOException {
/**
* Must create compaction redo before update redo to prevent data loss.
*
* The "applyEntries" method will internally sort compaction redo and update redo
* entries using stable Arrays.sort. The following order of... | java | protected synchronized void switchEntry(boolean blocking) throws IOException {
/**
* Must create compaction redo before update redo to prevent data loss.
*
* The "applyEntries" method will internally sort compaction redo and update redo
* entries using stable Arrays.sort. The following order of... | [
"protected",
"synchronized",
"void",
"switchEntry",
"(",
"boolean",
"blocking",
")",
"throws",
"IOException",
"{",
"/**\n * Must create compaction redo before update redo to prevent data loss.\n * \n * The \"applyEntries\" method will internally sort compaction redo and update redo... | Switches to a new entry if the current _entry is not empty.
@throws IOException | [
"Switches",
"to",
"a",
"new",
"entry",
"if",
"the",
"current",
"_entry",
"is",
"not",
"empty",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java#L295-L336 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java | ArrayEntryManager.applyEntries | protected synchronized void applyEntries(boolean blocking) throws IOException {
if (blocking) { /* Blocking Mode */
synchronized(_entryApply) {
List<Entry<V>> entryList = new ArrayList<Entry<V>>();
while(_entryPool.getServiceQueueSize() > 0) {
Entry<V> entry = _entryPool.pollFromServ... | java | protected synchronized void applyEntries(boolean blocking) throws IOException {
if (blocking) { /* Blocking Mode */
synchronized(_entryApply) {
List<Entry<V>> entryList = new ArrayList<Entry<V>>();
while(_entryPool.getServiceQueueSize() > 0) {
Entry<V> entry = _entryPool.pollFromServ... | [
"protected",
"synchronized",
"void",
"applyEntries",
"(",
"boolean",
"blocking",
")",
"throws",
"IOException",
"{",
"if",
"(",
"blocking",
")",
"{",
"/* Blocking Mode */",
"synchronized",
"(",
"_entryApply",
")",
"{",
"List",
"<",
"Entry",
"<",
"V",
">>",
"ent... | Apply accumulated entries to the array file.
@throws IOException | [
"Apply",
"accumulated",
"entries",
"to",
"the",
"array",
"file",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java#L359-L381 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java | ArrayEntryManager.loadEntryFiles | protected List<Entry<V>> loadEntryFiles() {
File[] files = getDirectory().listFiles();
String prefix = getEntryLogPrefix();
String suffix = getEntryLogSuffix();
List<Entry<V>> entryList = new ArrayList<Entry<V>>();
if(files == null) return entryList;
for (File file : files) {
Str... | java | protected List<Entry<V>> loadEntryFiles() {
File[] files = getDirectory().listFiles();
String prefix = getEntryLogPrefix();
String suffix = getEntryLogSuffix();
List<Entry<V>> entryList = new ArrayList<Entry<V>>();
if(files == null) return entryList;
for (File file : files) {
Str... | [
"protected",
"List",
"<",
"Entry",
"<",
"V",
">",
">",
"loadEntryFiles",
"(",
")",
"{",
"File",
"[",
"]",
"files",
"=",
"getDirectory",
"(",
")",
".",
"listFiles",
"(",
")",
";",
"String",
"prefix",
"=",
"getEntryLogPrefix",
"(",
")",
";",
"String",
... | Load entry log files from disk into _entryList.
@throws IOException | [
"Load",
"entry",
"log",
"files",
"from",
"disk",
"into",
"_entryList",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java#L411-L437 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java | ArrayEntryManager.filterEntryList | private List<Entry<V>> filterEntryList(List<Entry<V>> entryList, long minScn, long maxScn) {
List<Entry<V>> result = new ArrayList<Entry<V>>(entryList.size());
for (Entry<V> e : entryList) {
if (minScn <= e.getMinScn() && e.getMaxScn() <= maxScn) {
result.add(e);
}
}
return resu... | java | private List<Entry<V>> filterEntryList(List<Entry<V>> entryList, long minScn, long maxScn) {
List<Entry<V>> result = new ArrayList<Entry<V>>(entryList.size());
for (Entry<V> e : entryList) {
if (minScn <= e.getMinScn() && e.getMaxScn() <= maxScn) {
result.add(e);
}
}
return resu... | [
"private",
"List",
"<",
"Entry",
"<",
"V",
">",
">",
"filterEntryList",
"(",
"List",
"<",
"Entry",
"<",
"V",
">",
">",
"entryList",
",",
"long",
"minScn",
",",
"long",
"maxScn",
")",
"{",
"List",
"<",
"Entry",
"<",
"V",
">>",
"result",
"=",
"new",
... | Filter and select entries from an entry list
that only have SCNs no less than the specified lower bound minScn and
that only have SCNs no greater than the specified upper bound maxScn.
@param minScn Inclusive lower bound SCN.
@param maxScn Inclusive upper bound SCN. | [
"Filter",
"and",
"select",
"entries",
"from",
"an",
"entry",
"list",
"that",
"only",
"have",
"SCNs",
"no",
"less",
"than",
"the",
"specified",
"lower",
"bound",
"minScn",
"and",
"that",
"only",
"have",
"SCNs",
"no",
"greater",
"than",
"the",
"specified",
"... | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java#L489-L498 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java | ArrayEntryManager.filterEntryListLowerBound | private List<Entry<V>> filterEntryListLowerBound(List<Entry<V>> entryList, long scn) {
List<Entry<V>> result = new ArrayList<Entry<V>>(entryList.size());
for (Entry<V> e : entryList) {
if (scn <= e.getMinScn()) {
result.add(e);
}
}
return result;
} | java | private List<Entry<V>> filterEntryListLowerBound(List<Entry<V>> entryList, long scn) {
List<Entry<V>> result = new ArrayList<Entry<V>>(entryList.size());
for (Entry<V> e : entryList) {
if (scn <= e.getMinScn()) {
result.add(e);
}
}
return result;
} | [
"private",
"List",
"<",
"Entry",
"<",
"V",
">",
">",
"filterEntryListLowerBound",
"(",
"List",
"<",
"Entry",
"<",
"V",
">",
">",
"entryList",
",",
"long",
"scn",
")",
"{",
"List",
"<",
"Entry",
"<",
"V",
">>",
"result",
"=",
"new",
"ArrayList",
"<",
... | Filter and select entries from an entry list that only have SCNs no less than the specified lower bound.
@param scn Inclusive lower bound SCN | [
"Filter",
"and",
"select",
"entries",
"from",
"an",
"entry",
"list",
"that",
"only",
"have",
"SCNs",
"no",
"less",
"than",
"the",
"specified",
"lower",
"bound",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java#L505-L514 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java | ArrayEntryManager.filterEntryListUpperBound | @SuppressWarnings("unused")
private List<Entry<V>> filterEntryListUpperBound(List<Entry<V>> entryList, long scn) {
List<Entry<V>> result = new ArrayList<Entry<V>>(entryList.size());
for (Entry<V> e : entryList) {
if (e.getMaxScn() <= scn) {
result.add(e);
}
}
return result;
... | java | @SuppressWarnings("unused")
private List<Entry<V>> filterEntryListUpperBound(List<Entry<V>> entryList, long scn) {
List<Entry<V>> result = new ArrayList<Entry<V>>(entryList.size());
for (Entry<V> e : entryList) {
if (e.getMaxScn() <= scn) {
result.add(e);
}
}
return result;
... | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"private",
"List",
"<",
"Entry",
"<",
"V",
">",
">",
"filterEntryListUpperBound",
"(",
"List",
"<",
"Entry",
"<",
"V",
">",
">",
"entryList",
",",
"long",
"scn",
")",
"{",
"List",
"<",
"Entry",
"<",
"V",... | Filter and select entries from an entry list that only have SCNs no greater than the specified upper bound.
@param scn Inclusive upper bound SCN | [
"Filter",
"and",
"select",
"entries",
"from",
"an",
"entry",
"list",
"that",
"only",
"have",
"SCNs",
"no",
"greater",
"than",
"the",
"specified",
"upper",
"bound",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayEntryManager.java#L521-L531 | train |
legsem/legstar-core2 | legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdMain.java | Cob2XsdMain.execute | protected void execute(final File input, final String cobolFileEncoding,
final File target, final String targetNamespacePrefix,
final String xsltFileName)
throws XsdGenerationException {
try {
_log.info("Started translation from COBOL to XML Schema");
... | java | protected void execute(final File input, final String cobolFileEncoding,
final File target, final String targetNamespacePrefix,
final String xsltFileName)
throws XsdGenerationException {
try {
_log.info("Started translation from COBOL to XML Schema");
... | [
"protected",
"void",
"execute",
"(",
"final",
"File",
"input",
",",
"final",
"String",
"cobolFileEncoding",
",",
"final",
"File",
"target",
",",
"final",
"String",
"targetNamespacePrefix",
",",
"final",
"String",
"xsltFileName",
")",
"throws",
"XsdGenerationExceptio... | Translate a single file or all files from an input folder. Place results
in the output folder.
@param input the input COBOL file or folder
@param cobolFileEncoding the COBOL file character encoding
@param target the output folder or file where XML schema file must go
@param targetNamespacePrefix the output XML schemas... | [
"Translate",
"a",
"single",
"file",
"or",
"all",
"files",
"from",
"an",
"input",
"folder",
".",
"Place",
"results",
"in",
"the",
"output",
"folder",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdMain.java#L270-L305 | train |
legsem/legstar-core2 | legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdMain.java | Cob2XsdMain.getVersion | protected String getVersion() throws IOException {
InputStream stream = null;
try {
Properties version = new Properties();
stream = Cob2XsdMain.class.getResourceAsStream(VERSION_FILE_NAME);
version.load(stream);
return version.getProperty("version");
... | java | protected String getVersion() throws IOException {
InputStream stream = null;
try {
Properties version = new Properties();
stream = Cob2XsdMain.class.getResourceAsStream(VERSION_FILE_NAME);
version.load(stream);
return version.getProperty("version");
... | [
"protected",
"String",
"getVersion",
"(",
")",
"throws",
"IOException",
"{",
"InputStream",
"stream",
"=",
"null",
";",
"try",
"{",
"Properties",
"version",
"=",
"new",
"Properties",
"(",
")",
";",
"stream",
"=",
"Cob2XsdMain",
".",
"class",
".",
"getResourc... | Pick up the version from the properties file.
@return the product version
@throws IOException if version cannot be identified | [
"Pick",
"up",
"the",
"version",
"from",
"the",
"properties",
"file",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdMain.java#L337-L349 | train |
legsem/legstar-core2 | legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdMain.java | Cob2XsdMain.setConfigFile | public void setConfigFile(final String config) {
if (config == null) {
throw (new IllegalArgumentException(
"Configuration file parameter is null"));
}
File file = new File(config);
if (file.exists()) {
if (file.isDirectory()) {
... | java | public void setConfigFile(final String config) {
if (config == null) {
throw (new IllegalArgumentException(
"Configuration file parameter is null"));
}
File file = new File(config);
if (file.exists()) {
if (file.isDirectory()) {
... | [
"public",
"void",
"setConfigFile",
"(",
"final",
"String",
"config",
")",
"{",
"if",
"(",
"config",
"==",
"null",
")",
"{",
"throw",
"(",
"new",
"IllegalArgumentException",
"(",
"\"Configuration file parameter is null\"",
")",
")",
";",
"}",
"File",
"file",
"=... | Check the config parameter and keep it only if it is valid.
@param config a file name (relative or absolute) | [
"Check",
"the",
"config",
"parameter",
"and",
"keep",
"it",
"only",
"if",
"it",
"is",
"valid",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdMain.java#L363-L379 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/PIXConsumerAuditor.java | PIXConsumerAuditor.getAuditor | public static PIXConsumerAuditor getAuditor()
{
AuditorModuleContext ctx = AuditorModuleContext.getContext();
return (PIXConsumerAuditor)ctx.getAuditor(PIXConsumerAuditor.class);
} | java | public static PIXConsumerAuditor getAuditor()
{
AuditorModuleContext ctx = AuditorModuleContext.getContext();
return (PIXConsumerAuditor)ctx.getAuditor(PIXConsumerAuditor.class);
} | [
"public",
"static",
"PIXConsumerAuditor",
"getAuditor",
"(",
")",
"{",
"AuditorModuleContext",
"ctx",
"=",
"AuditorModuleContext",
".",
"getContext",
"(",
")",
";",
"return",
"(",
"PIXConsumerAuditor",
")",
"ctx",
".",
"getAuditor",
"(",
"PIXConsumerAuditor",
".",
... | Get an instance of the PIX Consumer Auditor from the
global context
@return PIX Consumer Auditor instance | [
"Get",
"an",
"instance",
"of",
"the",
"PIX",
"Consumer",
"Auditor",
"from",
"the",
"global",
"context"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/PIXConsumerAuditor.java#L45-L49 | train |
apptik/jus | benchmark/src/perf/java/com/android/volley/VolleyLog.java | VolleyLog.buildMessage | private static String buildMessage(String format, Object... args) {
String msg = (args == null) ? format : String.format(Locale.US, format, args);
StackTraceElement[] trace = new Throwable().fillInStackTrace().getStackTrace();
String caller = "<unknown>";
// Walk up the stack looking fo... | java | private static String buildMessage(String format, Object... args) {
String msg = (args == null) ? format : String.format(Locale.US, format, args);
StackTraceElement[] trace = new Throwable().fillInStackTrace().getStackTrace();
String caller = "<unknown>";
// Walk up the stack looking fo... | [
"private",
"static",
"String",
"buildMessage",
"(",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"String",
"msg",
"=",
"(",
"args",
"==",
"null",
")",
"?",
"format",
":",
"String",
".",
"format",
"(",
"Locale",
".",
"US",
",",
"format",
... | Formats the caller's provided message and prepends useful info like
calling thread ID and method name. | [
"Formats",
"the",
"caller",
"s",
"provided",
"message",
"and",
"prepends",
"useful",
"info",
"like",
"calling",
"thread",
"ID",
"and",
"method",
"name",
"."
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/benchmark/src/perf/java/com/android/volley/VolleyLog.java#L80-L100 | train |
jingwei/krati | krati-main/src/main/java/krati/store/SerializableObjectStore.java | SerializableObjectStore.get | @Override
public V get(K key) {
if(key == null) {
return null;
}
byte[] bytes = _store.get(_keySerializer.serialize(key));
return bytes == null ? null : _valSerializer.deserialize(bytes);
} | java | @Override
public V get(K key) {
if(key == null) {
return null;
}
byte[] bytes = _store.get(_keySerializer.serialize(key));
return bytes == null ? null : _valSerializer.deserialize(bytes);
} | [
"@",
"Override",
"public",
"V",
"get",
"(",
"K",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"byte",
"[",
"]",
"bytes",
"=",
"_store",
".",
"get",
"(",
"_keySerializer",
".",
"serialize",
"(",
"key",
")"... | Gets an object based on its key from the store.
@param key
the retrieving key for a serializable object in the store.
@return the retrieved object. | [
"Gets",
"an",
"object",
"based",
"on",
"its",
"key",
"from",
"the",
"store",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/store/SerializableObjectStore.java#L106-L114 | train |
jingwei/krati | krati-main/src/main/java/krati/store/SerializableObjectStore.java | SerializableObjectStore.getBytes | @Override
public byte[] getBytes(K key) {
if(key == null) {
return null;
}
return _store.get(_keySerializer.serialize(key));
} | java | @Override
public byte[] getBytes(K key) {
if(key == null) {
return null;
}
return _store.get(_keySerializer.serialize(key));
} | [
"@",
"Override",
"public",
"byte",
"[",
"]",
"getBytes",
"(",
"K",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"_store",
".",
"get",
"(",
"_keySerializer",
".",
"serialize",
"(",
"key",
")",
")",... | Gets an object in the form of byte array from the store.
@param key
the retrieving key.
@return the retrieved object in raw bytes. | [
"Gets",
"an",
"object",
"in",
"the",
"form",
"of",
"byte",
"array",
"from",
"the",
"store",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/store/SerializableObjectStore.java#L133-L140 | train |
jingwei/krati | krati-main/src/main/java/krati/store/SerializableObjectStore.java | SerializableObjectStore.put | @Override
public boolean put(K key, V value) throws Exception {
if(key == null) {
throw new NullPointerException("key");
}
if(value == null) {
return _store.delete(_keySerializer.serialize(key));
} else {
return _store.put(_keySerializer.s... | java | @Override
public boolean put(K key, V value) throws Exception {
if(key == null) {
throw new NullPointerException("key");
}
if(value == null) {
return _store.delete(_keySerializer.serialize(key));
} else {
return _store.put(_keySerializer.s... | [
"@",
"Override",
"public",
"boolean",
"put",
"(",
"K",
"key",
",",
"V",
"value",
")",
"throws",
"Exception",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"key\"",
")",
";",
"}",
"if",
"(",
"value",
"==... | Puts an serializable object into the store.
@param key
the object key.
@param value
the serializable object.
@return true if the put operation is succeeds.
@throws NullPointerException if <code>key</code> is null.
@throws Exception if this operation cannot be completed successfully. | [
"Puts",
"an",
"serializable",
"object",
"into",
"the",
"store",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/store/SerializableObjectStore.java#L165-L176 | train |
jingwei/krati | krati-main/src/main/java/krati/store/SerializableObjectStore.java | SerializableObjectStore.delete | @Override
public boolean delete(K key) throws Exception {
if(key == null) {
throw new NullPointerException("key");
}
return _store.delete(_keySerializer.serialize(key));
} | java | @Override
public boolean delete(K key) throws Exception {
if(key == null) {
throw new NullPointerException("key");
}
return _store.delete(_keySerializer.serialize(key));
} | [
"@",
"Override",
"public",
"boolean",
"delete",
"(",
"K",
"key",
")",
"throws",
"Exception",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"key\"",
")",
";",
"}",
"return",
"_store",
".",
"delete",
"(",
"... | Deletes an object from the store based on its key.
@param key
the object key.
@return true if the delete operation succeeds.
@throws NullPointerException if <code>key</code> is null.
@throws Exception if this operation cannot be completed successfully. | [
"Deletes",
"an",
"object",
"from",
"the",
"store",
"based",
"on",
"its",
"key",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/store/SerializableObjectStore.java#L187-L194 | train |
apptik/jus | jus-java/src/main/java/io/apptik/comm/jus/Request.java | Request.setRetryPolicy | public <R extends Request<T>> R setRetryPolicy(RetryPolicy retryPolicy) {
checkIfActive();
this.retryPolicy = retryPolicy;
return (R) this;
} | java | public <R extends Request<T>> R setRetryPolicy(RetryPolicy retryPolicy) {
checkIfActive();
this.retryPolicy = retryPolicy;
return (R) this;
} | [
"public",
"<",
"R",
"extends",
"Request",
"<",
"T",
">",
">",
"R",
"setRetryPolicy",
"(",
"RetryPolicy",
"retryPolicy",
")",
"{",
"checkIfActive",
"(",
")",
";",
"this",
".",
"retryPolicy",
"=",
"retryPolicy",
";",
"return",
"(",
"R",
")",
"this",
";",
... | Sets the retry policy for this request.
@return This Request object to allow for chaining. | [
"Sets",
"the",
"retry",
"policy",
"for",
"this",
"request",
"."
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Request.java#L758-L762 | train |
apptik/jus | jus-java/src/main/java/io/apptik/comm/jus/Request.java | Request.setRedirectPolicy | public <R extends Request<T>> R setRedirectPolicy(RedirectPolicy redirectPolicy) {
checkIfActive();
this.redirectPolicy = redirectPolicy;
return (R) this;
} | java | public <R extends Request<T>> R setRedirectPolicy(RedirectPolicy redirectPolicy) {
checkIfActive();
this.redirectPolicy = redirectPolicy;
return (R) this;
} | [
"public",
"<",
"R",
"extends",
"Request",
"<",
"T",
">",
">",
"R",
"setRedirectPolicy",
"(",
"RedirectPolicy",
"redirectPolicy",
")",
"{",
"checkIfActive",
"(",
")",
";",
"this",
".",
"redirectPolicy",
"=",
"redirectPolicy",
";",
"return",
"(",
"R",
")",
"... | Sets the redirect policy for this request.
@return This Request object to allow for chaining. | [
"Sets",
"the",
"redirect",
"policy",
"for",
"this",
"request",
"."
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Request.java#L776-L780 | train |
apptik/jus | jus-java/src/main/java/io/apptik/comm/jus/Request.java | Request.setRequestQueue | <R extends Request<T>> R setRequestQueue(RequestQueue requestQueue) {
checkIfActive();
java.lang.reflect.Method m = null;
if (!(this.getClass().equals(Request.class))) {
try {
m = this.getClass().getDeclaredMethod("parseNetworkResponse", NetworkResponse
... | java | <R extends Request<T>> R setRequestQueue(RequestQueue requestQueue) {
checkIfActive();
java.lang.reflect.Method m = null;
if (!(this.getClass().equals(Request.class))) {
try {
m = this.getClass().getDeclaredMethod("parseNetworkResponse", NetworkResponse
... | [
"<",
"R",
"extends",
"Request",
"<",
"T",
">",
">",
"R",
"setRequestQueue",
"(",
"RequestQueue",
"requestQueue",
")",
"{",
"checkIfActive",
"(",
")",
";",
"java",
".",
"lang",
".",
"reflect",
".",
"Method",
"m",
"=",
"null",
";",
"if",
"(",
"!",
"(",... | Associates this request with the given queue. The request queue will be notified when this
request has finished.
@return This Request object to allow for chaining. | [
"Associates",
"this",
"request",
"with",
"the",
"given",
"queue",
".",
"The",
"request",
"queue",
"will",
"be",
"notified",
"when",
"this",
"request",
"has",
"finished",
"."
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Request.java#L843-L887 | train |
apptik/jus | jus-java/src/main/java/io/apptik/comm/jus/Request.java | Request.setCacheEntry | public <R extends Request<T>> R setCacheEntry(Cache.Entry entry) {
cacheEntry = entry;
return (R) this;
} | java | public <R extends Request<T>> R setCacheEntry(Cache.Entry entry) {
cacheEntry = entry;
return (R) this;
} | [
"public",
"<",
"R",
"extends",
"Request",
"<",
"T",
">",
">",
"R",
"setCacheEntry",
"(",
"Cache",
".",
"Entry",
"entry",
")",
"{",
"cacheEntry",
"=",
"entry",
";",
"return",
"(",
"R",
")",
"this",
";",
"}"
] | Annotates this request with an entry retrieved for it from cache.
Used for cache coherency support.
@return This Request object to allow for chaining. | [
"Annotates",
"this",
"request",
"with",
"an",
"entry",
"retrieved",
"for",
"it",
"from",
"cache",
".",
"Used",
"for",
"cache",
"coherency",
"support",
"."
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Request.java#L940-L943 | train |
apptik/jus | jus-java/src/main/java/io/apptik/comm/jus/Request.java | Request.getHeadersMap | public final Map<String, String> getHeadersMap() {
if (networkRequest != null && networkRequest.headers != null) {
return networkRequest.headers.toMap();
}
return Collections.emptyMap();
} | java | public final Map<String, String> getHeadersMap() {
if (networkRequest != null && networkRequest.headers != null) {
return networkRequest.headers.toMap();
}
return Collections.emptyMap();
} | [
"public",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"getHeadersMap",
"(",
")",
"{",
"if",
"(",
"networkRequest",
"!=",
"null",
"&&",
"networkRequest",
".",
"headers",
"!=",
"null",
")",
"{",
"return",
"networkRequest",
".",
"headers",
".",
"toMap"... | Returns a list of extra HTTP headers to go along with this request | [
"Returns",
"a",
"list",
"of",
"extra",
"HTTP",
"headers",
"to",
"go",
"along",
"with",
"this",
"request"
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Request.java#L969-L974 | train |
apptik/jus | jus-java/src/main/java/io/apptik/comm/jus/Request.java | Request.getBodyContentType | public String getBodyContentType() {
if (networkRequest != null && networkRequest.contentType != null) {
return networkRequest.contentType.toString();
}
return null;
} | java | public String getBodyContentType() {
if (networkRequest != null && networkRequest.contentType != null) {
return networkRequest.contentType.toString();
}
return null;
} | [
"public",
"String",
"getBodyContentType",
"(",
")",
"{",
"if",
"(",
"networkRequest",
"!=",
"null",
"&&",
"networkRequest",
".",
"contentType",
"!=",
"null",
")",
"{",
"return",
"networkRequest",
".",
"contentType",
".",
"toString",
"(",
")",
";",
"}",
"retu... | Returns the content type of the POST or PUT body. | [
"Returns",
"the",
"content",
"type",
"of",
"the",
"POST",
"or",
"PUT",
"body",
"."
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Request.java#L986-L991 | train |
apptik/jus | jus-java/src/main/java/io/apptik/comm/jus/Request.java | Request.setShouldCache | public final <R extends Request<T>> R setShouldCache(boolean shouldCache) {
checkIfActive();
this.shouldCache = shouldCache;
return (R) this;
} | java | public final <R extends Request<T>> R setShouldCache(boolean shouldCache) {
checkIfActive();
this.shouldCache = shouldCache;
return (R) this;
} | [
"public",
"final",
"<",
"R",
"extends",
"Request",
"<",
"T",
">",
">",
"R",
"setShouldCache",
"(",
"boolean",
"shouldCache",
")",
"{",
"checkIfActive",
"(",
")",
";",
"this",
".",
"shouldCache",
"=",
"shouldCache",
";",
"return",
"(",
"R",
")",
"this",
... | Set whether or not responses to this request should be cached.
@return This Request object to allow for chaining. | [
"Set",
"whether",
"or",
"not",
"responses",
"to",
"this",
"request",
"should",
"be",
"cached",
"."
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Request.java#L1008-L1012 | train |
apptik/jus | jus-java/src/main/java/io/apptik/comm/jus/Request.java | Request.parseNetworkResponse | protected Response<T> parseNetworkResponse(NetworkResponse response) {
T parsed = null;
try {
parsed = converterFromResponse.convert(response);
} catch (Exception e) {
return Response.error(new ParseError(e));
}
return Response.success(parsed, HttpHeaderPa... | java | protected Response<T> parseNetworkResponse(NetworkResponse response) {
T parsed = null;
try {
parsed = converterFromResponse.convert(response);
} catch (Exception e) {
return Response.error(new ParseError(e));
}
return Response.success(parsed, HttpHeaderPa... | [
"protected",
"Response",
"<",
"T",
">",
"parseNetworkResponse",
"(",
"NetworkResponse",
"response",
")",
"{",
"T",
"parsed",
"=",
"null",
";",
"try",
"{",
"parsed",
"=",
"converterFromResponse",
".",
"convert",
"(",
"response",
")",
";",
"}",
"catch",
"(",
... | Subclasses can implement this to parse the raw network response
and return an appropriate response type. This method will be
called from a worker threadId. The response will not be delivered
if you return null.
@param response Response from the network
@return The parsed response, or null in the case of an error | [
"Subclasses",
"can",
"implement",
"this",
"to",
"parse",
"the",
"raw",
"network",
"response",
"and",
"return",
"an",
"appropriate",
"response",
"type",
".",
"This",
"method",
"will",
"be",
"called",
"from",
"a",
"worker",
"threadId",
".",
"The",
"response",
... | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Request.java#L1046-L1054 | train |
apptik/jus | jus-java/src/main/java/io/apptik/comm/jus/Request.java | Request.deliverResponse | protected void deliverResponse(T response) {
synchronized (responseListeners) {
for (RequestListener.ResponseListener responseListener : responseListeners) {
responseListener.onResponse(response);
}
if (!this.response.intermediate) {
responseLi... | java | protected void deliverResponse(T response) {
synchronized (responseListeners) {
for (RequestListener.ResponseListener responseListener : responseListeners) {
responseListener.onResponse(response);
}
if (!this.response.intermediate) {
responseLi... | [
"protected",
"void",
"deliverResponse",
"(",
"T",
"response",
")",
"{",
"synchronized",
"(",
"responseListeners",
")",
"{",
"for",
"(",
"RequestListener",
".",
"ResponseListener",
"responseListener",
":",
"responseListeners",
")",
"{",
"responseListener",
".",
"onRe... | Subclasses must implement this to perform delivery of the parsed
response to their listeners. The given response is guaranteed to
be non-null; responses that fail to parse are not delivered.
@param response The parsed response returned by
{@link #parseNetworkResponse(NetworkResponse)} | [
"Subclasses",
"must",
"implement",
"this",
"to",
"perform",
"delivery",
"of",
"the",
"parsed",
"response",
"to",
"their",
"listeners",
".",
"The",
"given",
"response",
"is",
"guaranteed",
"to",
"be",
"non",
"-",
"null",
";",
"responses",
"that",
"fail",
"to"... | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Request.java#L1076-L1090 | train |
apptik/jus | jus-java/src/main/java/io/apptik/comm/jus/Request.java | Request.deliverError | public void deliverError(JusError error) {
synchronized (errorListeners) {
for (RequestListener.ErrorListener errorListener : errorListeners) {
errorListener.onError(error);
}
errorListeners.clear();
}
synchronized (responseListeners) {
... | java | public void deliverError(JusError error) {
synchronized (errorListeners) {
for (RequestListener.ErrorListener errorListener : errorListeners) {
errorListener.onError(error);
}
errorListeners.clear();
}
synchronized (responseListeners) {
... | [
"public",
"void",
"deliverError",
"(",
"JusError",
"error",
")",
"{",
"synchronized",
"(",
"errorListeners",
")",
"{",
"for",
"(",
"RequestListener",
".",
"ErrorListener",
"errorListener",
":",
"errorListeners",
")",
"{",
"errorListener",
".",
"onError",
"(",
"e... | Delivers error message to the ErrorListener that the Request was
initialized with.
@param error Error details | [
"Delivers",
"error",
"message",
"to",
"the",
"ErrorListener",
"that",
"the",
"Request",
"was",
"initialized",
"with",
"."
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Request.java#L1098-L1108 | train |
apptik/jus | jus-java/src/main/java/io/apptik/comm/jus/Request.java | Request.compareTo | @Override
public int compareTo(Request<T> other) {
Priority left = this.getPriority();
Priority right = other.getPriority();
// High-priority requests are "lesser" so they are sorted to the front.
// Equal priorities are sorted by sequence number to provide FIFO ordering.
re... | java | @Override
public int compareTo(Request<T> other) {
Priority left = this.getPriority();
Priority right = other.getPriority();
// High-priority requests are "lesser" so they are sorted to the front.
// Equal priorities are sorted by sequence number to provide FIFO ordering.
re... | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"Request",
"<",
"T",
">",
"other",
")",
"{",
"Priority",
"left",
"=",
"this",
".",
"getPriority",
"(",
")",
";",
"Priority",
"right",
"=",
"other",
".",
"getPriority",
"(",
")",
";",
"// High-priority r... | Our comparator sorts from high to low priority, and secondarily by
sequence number to provide FIFO ordering. | [
"Our",
"comparator",
"sorts",
"from",
"high",
"to",
"low",
"priority",
"and",
"secondarily",
"by",
"sequence",
"number",
"to",
"provide",
"FIFO",
"ordering",
"."
] | 8a37a21b41f897d68eaeaab07368ec22a1e5a60e | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Request.java#L1119-L1129 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java | IHEAuditor.getSystemAltUserId | public String getSystemAltUserId()
{
// If a localized value is set, use it
if (!EventUtils.isEmptyOrNull(systemAltUserId)) {
return systemAltUserId;
}
// Check if a configuration parameter is set
systemAltUserId = getConfig().getSystemAltUserId();
if (!EventUtils.isEmptyOrNull(systemAltUserId)) {
... | java | public String getSystemAltUserId()
{
// If a localized value is set, use it
if (!EventUtils.isEmptyOrNull(systemAltUserId)) {
return systemAltUserId;
}
// Check if a configuration parameter is set
systemAltUserId = getConfig().getSystemAltUserId();
if (!EventUtils.isEmptyOrNull(systemAltUserId)) {
... | [
"public",
"String",
"getSystemAltUserId",
"(",
")",
"{",
"// If a localized value is set, use it",
"if",
"(",
"!",
"EventUtils",
".",
"isEmptyOrNull",
"(",
"systemAltUserId",
")",
")",
"{",
"return",
"systemAltUserId",
";",
"}",
"// Check if a configuration parameter is s... | Get alternate user id for the system's ActiveParticipant in
audit messages. This is either set in configuration or
the the auditor will attempt to determine it from the JVM's process
id.
@see org.openhealthtools.ihe.atna.auditor.context.AuditorModuleConfig#setSystemAltUserId(String)
@return The alternate user id | [
"Get",
"alternate",
"user",
"id",
"for",
"the",
"system",
"s",
"ActiveParticipant",
"in",
"audit",
"messages",
".",
"This",
"is",
"either",
"set",
"in",
"configuration",
"or",
"the",
"the",
"auditor",
"will",
"attempt",
"to",
"determine",
"it",
"from",
"the"... | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java#L333-L372 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java | IHEAuditor.getSystemNetworkId | public String getSystemNetworkId()
{
String ipAddress = getConfig().getSystemIpAddress();
if (!EventUtils.isEmptyOrNull(ipAddress)) {
return ipAddress;
}
if (EventUtils.isEmptyOrNull(systemNetworkAccessPointId)) {
// No set System Address, will attempt to look it up
try {
InetAddress localAddress ... | java | public String getSystemNetworkId()
{
String ipAddress = getConfig().getSystemIpAddress();
if (!EventUtils.isEmptyOrNull(ipAddress)) {
return ipAddress;
}
if (EventUtils.isEmptyOrNull(systemNetworkAccessPointId)) {
// No set System Address, will attempt to look it up
try {
InetAddress localAddress ... | [
"public",
"String",
"getSystemNetworkId",
"(",
")",
"{",
"String",
"ipAddress",
"=",
"getConfig",
"(",
")",
".",
"getSystemIpAddress",
"(",
")",
";",
"if",
"(",
"!",
"EventUtils",
".",
"isEmptyOrNull",
"(",
"ipAddress",
")",
")",
"{",
"return",
"ipAddress",
... | Get the system's ActiveParticipant Network ID for use
in audit messages. Configuration is the default value
used. If no value is set in configuration, then Java
will attempt to determine your system's IP address. If
Java cannot determine your system's IP address, then localhost
is used.
@see org.openhealthtools.ih... | [
"Get",
"the",
"system",
"s",
"ActiveParticipant",
"Network",
"ID",
"for",
"use",
"in",
"audit",
"messages",
".",
"Configuration",
"is",
"the",
"default",
"value",
"used",
".",
"If",
"no",
"value",
"is",
"set",
"in",
"configuration",
"then",
"Java",
"will",
... | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java#L453-L470 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java | IHEAuditor.isAuditorEnabled | public boolean isAuditorEnabled()
{
if (!getConfig().isAuditorEnabled()) {
return false;
}
if (getConfig().getDisabledAuditors().contains(this.getClass())) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Auditor "+ this.getClass().getName() + " is disabled by configuration");
}
return false;
}
... | java | public boolean isAuditorEnabled()
{
if (!getConfig().isAuditorEnabled()) {
return false;
}
if (getConfig().getDisabledAuditors().contains(this.getClass())) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Auditor "+ this.getClass().getName() + " is disabled by configuration");
}
return false;
}
... | [
"public",
"boolean",
"isAuditorEnabled",
"(",
")",
"{",
"if",
"(",
"!",
"getConfig",
"(",
")",
".",
"isAuditorEnabled",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"getConfig",
"(",
")",
".",
"getDisabledAuditors",
"(",
")",
".",
"conta... | Determines whether this auditor instance is enabled.
Checks if global auditing is enabled in configuration and
if the auditor instance's class is in the list of auditors
specifically disabled by configuration
@see org.openhealthtools.ihe.atna.auditor.context.AuditorModuleConfig#isAuditorEnabled()
@see org.openhealthto... | [
"Determines",
"whether",
"this",
"auditor",
"instance",
"is",
"enabled",
".",
"Checks",
"if",
"global",
"auditing",
"is",
"enabled",
"in",
"configuration",
"and",
"if",
"the",
"auditor",
"instance",
"s",
"class",
"is",
"in",
"the",
"list",
"of",
"auditors",
... | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java#L486-L498 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java | IHEAuditor.isAuditorEnabledForEventId | public boolean isAuditorEnabledForEventId(AuditEventMessage msg)
{
CodedValueType eventIdCode = msg.getAuditMessage().getEventIdentification().getEventID();
if (EventUtils.containsCode(eventIdCode, getConfig().getDisabledEvents())) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Auditor is disabled by confi... | java | public boolean isAuditorEnabledForEventId(AuditEventMessage msg)
{
CodedValueType eventIdCode = msg.getAuditMessage().getEventIdentification().getEventID();
if (EventUtils.containsCode(eventIdCode, getConfig().getDisabledEvents())) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Auditor is disabled by confi... | [
"public",
"boolean",
"isAuditorEnabledForEventId",
"(",
"AuditEventMessage",
"msg",
")",
"{",
"CodedValueType",
"eventIdCode",
"=",
"msg",
".",
"getAuditMessage",
"(",
")",
".",
"getEventIdentification",
"(",
")",
".",
"getEventID",
"(",
")",
";",
"if",
"(",
"Ev... | Determines if the event that this audit message represents should be audited
or if the auditor is disabled by configuration. Examples of events that
may be disabled include "Export", "Import", "Patient Record", "Security Alert", etc.
This method is useful for disabling event-specific messages (such as those
relating t... | [
"Determines",
"if",
"the",
"event",
"that",
"this",
"audit",
"message",
"represents",
"should",
"be",
"audited",
"or",
"if",
"the",
"auditor",
"is",
"disabled",
"by",
"configuration",
".",
"Examples",
"of",
"events",
"that",
"may",
"be",
"disabled",
"include",... | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java#L515-L525 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java | IHEAuditor.auditUserAuthenticationLoginEvent | public void auditUserAuthenticationLoginEvent(RFC3881EventOutcomeCodes outcome,
boolean isAuthenticatedSystem, String remoteUserId, String remoteIpAddress,
String remoteUserNodeIpAddress)
{
auditUserAuthenticationEvent(outcome, new DICOMEventTypeCodes.Login(), isAuthenticatedSystem, remoteUserId, remoteIpAddr... | java | public void auditUserAuthenticationLoginEvent(RFC3881EventOutcomeCodes outcome,
boolean isAuthenticatedSystem, String remoteUserId, String remoteIpAddress,
String remoteUserNodeIpAddress)
{
auditUserAuthenticationEvent(outcome, new DICOMEventTypeCodes.Login(), isAuthenticatedSystem, remoteUserId, remoteIpAddr... | [
"public",
"void",
"auditUserAuthenticationLoginEvent",
"(",
"RFC3881EventOutcomeCodes",
"outcome",
",",
"boolean",
"isAuthenticatedSystem",
",",
"String",
"remoteUserId",
",",
"String",
"remoteIpAddress",
",",
"String",
"remoteUserNodeIpAddress",
")",
"{",
"auditUserAuthentic... | Audit a User Authentication - Login Event
@param outcome Event outcome indicator
@param isAuthenticatedSystem Whether the system auditing is the authenticated system (client) or authenticator (server, e.g. kerberos)
@param remoteUserId User ID of the system that is not sending the audit message
@param remoteIpAddress ... | [
"Audit",
"a",
"User",
"Authentication",
"-",
"Login",
"Event"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java#L709-L714 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java | IHEAuditor.auditUserAuthenticationLogoutEvent | public void auditUserAuthenticationLogoutEvent(RFC3881EventOutcomeCodes outcome,
boolean isAuthenticatedSystem, String remoteUserId, String remoteIpAddress,
String remoteUserNodeIpAddress)
{
auditUserAuthenticationEvent(outcome, new DICOMEventTypeCodes.Logout(), isAuthenticatedSystem, remoteUserId, remoteIpAd... | java | public void auditUserAuthenticationLogoutEvent(RFC3881EventOutcomeCodes outcome,
boolean isAuthenticatedSystem, String remoteUserId, String remoteIpAddress,
String remoteUserNodeIpAddress)
{
auditUserAuthenticationEvent(outcome, new DICOMEventTypeCodes.Logout(), isAuthenticatedSystem, remoteUserId, remoteIpAd... | [
"public",
"void",
"auditUserAuthenticationLogoutEvent",
"(",
"RFC3881EventOutcomeCodes",
"outcome",
",",
"boolean",
"isAuthenticatedSystem",
",",
"String",
"remoteUserId",
",",
"String",
"remoteIpAddress",
",",
"String",
"remoteUserNodeIpAddress",
")",
"{",
"auditUserAuthenti... | Audit a User Authentication - Logout Event
@param outcome Event outcome indicator
@param isAuthenticatedSystem Whether the system auditing is the authenticated system (client) or authenticator (server, e.g. kerberos)
@param remoteUserId User ID of the system that is not sending the audit message
@param remoteIpAddress... | [
"Audit",
"a",
"User",
"Authentication",
"-",
"Logout",
"Event"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java#L725-L730 | train |
legsem/legstar-core2 | legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java | Xsd2CobolTypesModelBuilder.addField | private void addField(int fieldIndex, XmlSchemaObjectBase xsdSchemaObject,
Map < String, Object > fields, RootCompositeType compositeTypes) {
if (xsdSchemaObject instanceof XmlSchemaElement) {
XmlSchemaElement xsdElement = (XmlSchemaElement) xsdSchemaObject;
fields.put(getFie... | java | private void addField(int fieldIndex, XmlSchemaObjectBase xsdSchemaObject,
Map < String, Object > fields, RootCompositeType compositeTypes) {
if (xsdSchemaObject instanceof XmlSchemaElement) {
XmlSchemaElement xsdElement = (XmlSchemaElement) xsdSchemaObject;
fields.put(getFie... | [
"private",
"void",
"addField",
"(",
"int",
"fieldIndex",
",",
"XmlSchemaObjectBase",
"xsdSchemaObject",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"fields",
",",
"RootCompositeType",
"compositeTypes",
")",
"{",
"if",
"(",
"xsdSchemaObject",
"instanceof",
"XmlS... | Add a field with associated properties to a complex type.
@param index the order of the field in the parent complex type
@param xsdSchemaObject the potential field
@param xsdSchemaObject the potential field
@param fields the parent complex type's fields collection
@param compositeTypes the lists of composite types bei... | [
"Add",
"a",
"field",
"with",
"associated",
"properties",
"to",
"a",
"complex",
"type",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java#L253-L265 | train |
legsem/legstar-core2 | legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java | Xsd2CobolTypesModelBuilder.addOptionalProps | private void addOptionalProps(XmlSchemaElement xsdElement,
CobolAnnotations cobolAnnotations, Map < String, Object > props) {
String dependingOn = cobolAnnotations.getDependingOn();
if (dependingOn != null) {
props.put(IS_OPTIONAL_PROP_NAME, true);
props.put(DEPENDING... | java | private void addOptionalProps(XmlSchemaElement xsdElement,
CobolAnnotations cobolAnnotations, Map < String, Object > props) {
String dependingOn = cobolAnnotations.getDependingOn();
if (dependingOn != null) {
props.put(IS_OPTIONAL_PROP_NAME, true);
props.put(DEPENDING... | [
"private",
"void",
"addOptionalProps",
"(",
"XmlSchemaElement",
"xsdElement",
",",
"CobolAnnotations",
"cobolAnnotations",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"props",
")",
"{",
"String",
"dependingOn",
"=",
"cobolAnnotations",
".",
"getDependingOn",
"(",... | Optional items are declared with a minOccurs of 0 and a maxOccurs of one. Usually, there is a depending on clause.
@param xsdElement the xsd element marked as optional
@param cobolAnnotations the xsd element COBOL annotations
@param props the corresponding set of properties | [
"Optional",
"items",
"are",
"declared",
"with",
"a",
"minOccurs",
"of",
"0",
"and",
"a",
"maxOccurs",
"of",
"one",
".",
"Usually",
"there",
"is",
"a",
"depending",
"on",
"clause",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java#L439-L446 | train |
legsem/legstar-core2 | legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java | Xsd2CobolTypesModelBuilder.getProps | private Map < String, Object > getProps(XmlSchemaSimpleType xsdSimpleType,
final CobolAnnotations cobolAnnotations) {
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) xsdSimpleType
.getContent();
if (restriction != null && restriction.getBaseTypeN... | java | private Map < String, Object > getProps(XmlSchemaSimpleType xsdSimpleType,
final CobolAnnotations cobolAnnotations) {
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) xsdSimpleType
.getContent();
if (restriction != null && restriction.getBaseTypeN... | [
"private",
"Map",
"<",
"String",
",",
"Object",
">",
"getProps",
"(",
"XmlSchemaSimpleType",
"xsdSimpleType",
",",
"final",
"CobolAnnotations",
"cobolAnnotations",
")",
"{",
"XmlSchemaSimpleTypeRestriction",
"restriction",
"=",
"(",
"XmlSchemaSimpleTypeRestriction",
")",
... | Retrieve the properties of a primitive type.
@param xsdSimpleType the XML schema primitive type
@param cobolAnnotations the associated COBOL annotations
@return a set of properties | [
"Retrieve",
"the",
"properties",
"of",
"a",
"primitive",
"type",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java#L455-L496 | train |
legsem/legstar-core2 | legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java | Xsd2CobolTypesModelBuilder.getCobolAlphanumType | private <T extends Number> Map < String, Object > getCobolAlphanumType(
List < XmlSchemaFacet > facets) {
Map < String, Object > props = new LinkedHashMap < String, Object >();
props.put(COBOL_TYPE_NAME_PROP_NAME, "CobolStringType");
props.put(CHAR_NUM_PROP_NAME, getMaxLength(facets)... | java | private <T extends Number> Map < String, Object > getCobolAlphanumType(
List < XmlSchemaFacet > facets) {
Map < String, Object > props = new LinkedHashMap < String, Object >();
props.put(COBOL_TYPE_NAME_PROP_NAME, "CobolStringType");
props.put(CHAR_NUM_PROP_NAME, getMaxLength(facets)... | [
"private",
"<",
"T",
"extends",
"Number",
">",
"Map",
"<",
"String",
",",
"Object",
">",
"getCobolAlphanumType",
"(",
"List",
"<",
"XmlSchemaFacet",
">",
"facets",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"props",
"=",
"new",
"LinkedHashMap",
... | Retrieve the properties of an alphanumeric type.
@param facets the XSD facets
@return the properties of an alphanumeric type | [
"Retrieve",
"the",
"properties",
"of",
"an",
"alphanumeric",
"type",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java#L504-L511 | train |
legsem/legstar-core2 | legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java | Xsd2CobolTypesModelBuilder.getMaxLength | private int getMaxLength(List < XmlSchemaFacet > facets) {
for (XmlSchemaFacet facet : facets) {
if (facet instanceof XmlSchemaMaxLengthFacet) {
return Integer
.parseInt((String) ((XmlSchemaMaxLengthFacet) facet)
.getValue());
... | java | private int getMaxLength(List < XmlSchemaFacet > facets) {
for (XmlSchemaFacet facet : facets) {
if (facet instanceof XmlSchemaMaxLengthFacet) {
return Integer
.parseInt((String) ((XmlSchemaMaxLengthFacet) facet)
.getValue());
... | [
"private",
"int",
"getMaxLength",
"(",
"List",
"<",
"XmlSchemaFacet",
">",
"facets",
")",
"{",
"for",
"(",
"XmlSchemaFacet",
"facet",
":",
"facets",
")",
"{",
"if",
"(",
"facet",
"instanceof",
"XmlSchemaMaxLengthFacet",
")",
"{",
"return",
"Integer",
".",
"p... | Retrieve the maxLength facet if it exists.
@param facets the list of facets
@return the maxlength value or -1 if there are no maxLength facets | [
"Retrieve",
"the",
"maxLength",
"facet",
"if",
"it",
"exists",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java#L534-L543 | train |
legsem/legstar-core2 | legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java | Xsd2CobolTypesModelBuilder.getCobolDecimalType | private <T extends Number> Map < String, Object > getCobolDecimalType(
CobolAnnotations cobolAnnotations, Class < T > clazz) {
String cobolType = cobolAnnotations.getCobolType();
Map < String, Object > props = new LinkedHashMap < String, Object >();
switch (CobolTypes.valueOf(cobolT... | java | private <T extends Number> Map < String, Object > getCobolDecimalType(
CobolAnnotations cobolAnnotations, Class < T > clazz) {
String cobolType = cobolAnnotations.getCobolType();
Map < String, Object > props = new LinkedHashMap < String, Object >();
switch (CobolTypes.valueOf(cobolT... | [
"private",
"<",
"T",
"extends",
"Number",
">",
"Map",
"<",
"String",
",",
"Object",
">",
"getCobolDecimalType",
"(",
"CobolAnnotations",
"cobolAnnotations",
",",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"String",
"cobolType",
"=",
"cobolAnnotations",
".",
... | Retrieve the properties of a decimal type.
@param cobolAnnotations the current set of COBOL annotations
@param clazz the target java numeric type
@return the properties of a decimal type | [
"Retrieve",
"the",
"properties",
"of",
"a",
"decimal",
"type",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java#L552-L597 | train |
legsem/legstar-core2 | legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java | Xsd2CobolTypesModelBuilder.getShortTypeName | private static String getShortTypeName(Class < ? > javaType) {
String javaTypeName = javaType.getName();
if (javaTypeName.startsWith("java.lang.")) {
return javaTypeName.substring("java.lang.".length());
} else {
return javaTypeName;
}
} | java | private static String getShortTypeName(Class < ? > javaType) {
String javaTypeName = javaType.getName();
if (javaTypeName.startsWith("java.lang.")) {
return javaTypeName.substring("java.lang.".length());
} else {
return javaTypeName;
}
} | [
"private",
"static",
"String",
"getShortTypeName",
"(",
"Class",
"<",
"?",
">",
"javaType",
")",
"{",
"String",
"javaTypeName",
"=",
"javaType",
".",
"getName",
"(",
")",
";",
"if",
"(",
"javaTypeName",
".",
"startsWith",
"(",
"\"java.lang.\"",
")",
")",
"... | For java.lang types, strips the package which is not needed in generated
java classes.
@param javaType the proposed java class
@return the java type name shortened if needed | [
"For",
"java",
".",
"lang",
"types",
"strips",
"the",
"package",
"which",
"is",
"not",
"needed",
"in",
"generated",
"java",
"classes",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base-generator/src/main/java/com/legstar/base/generator/Xsd2CobolTypesModelBuilder.java#L606-L613 | train |
legsem/legstar-core2 | legstar-cob2xsd/src/main/java/com/legstar/cobol/model/CobolAnnotations.java | CobolAnnotations.getCobolXsdAnnotations | private static Element getCobolXsdAnnotations(XmlSchemaElement xsdElement) {
XmlSchemaAnnotation annotation = xsdElement.getAnnotation();
if (annotation == null || annotation.getItems().size() == 0) {
throw new IllegalArgumentException("Xsd element of type "
+ xsdElement.... | java | private static Element getCobolXsdAnnotations(XmlSchemaElement xsdElement) {
XmlSchemaAnnotation annotation = xsdElement.getAnnotation();
if (annotation == null || annotation.getItems().size() == 0) {
throw new IllegalArgumentException("Xsd element of type "
+ xsdElement.... | [
"private",
"static",
"Element",
"getCobolXsdAnnotations",
"(",
"XmlSchemaElement",
"xsdElement",
")",
"{",
"XmlSchemaAnnotation",
"annotation",
"=",
"xsdElement",
".",
"getAnnotation",
"(",
")",
";",
"if",
"(",
"annotation",
"==",
"null",
"||",
"annotation",
".",
... | XSD elements are annotated with COBOL markup that we extract here.
@param xsdElement the XSD element
@return the COBOL markup | [
"XSD",
"elements",
"are",
"annotated",
"with",
"COBOL",
"markup",
"that",
"we",
"extract",
"here",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cobol/model/CobolAnnotations.java#L28-L62 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/entry/EntryValueShortFactory.java | EntryValueShortFactory.reinitValue | @Override
public void reinitValue(DataReader in, EntryValueShort value) throws IOException {
value.reinit(in.readInt(), /* array position */
in.readShort(), /* data value */
in.readLong() /* SCN value */);
} | java | @Override
public void reinitValue(DataReader in, EntryValueShort value) throws IOException {
value.reinit(in.readInt(), /* array position */
in.readShort(), /* data value */
in.readLong() /* SCN value */);
} | [
"@",
"Override",
"public",
"void",
"reinitValue",
"(",
"DataReader",
"in",
",",
"EntryValueShort",
"value",
")",
"throws",
"IOException",
"{",
"value",
".",
"reinit",
"(",
"in",
".",
"readInt",
"(",
")",
",",
"/* array position */",
"in",
".",
"readShort",
"... | Read data from stream to populate an EntryValueShort.
@param in
data reader for EntryValueShort.
@param value
an EntryValue to populate.
@throws IOException | [
"Read",
"data",
"from",
"stream",
"to",
"populate",
"an",
"EntryValueShort",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/entry/EntryValueShortFactory.java#L67-L72 | train |
legsem/legstar-core2 | legstar-base/src/main/java/com/legstar/base/type/primitive/CobolDecimalType.java | CobolDecimalType.intPart | private static String intPart(String str) {
return str.indexOf(JAVA_DECIMAL_POINT) > 0 ? str.substring(0,
str.indexOf(JAVA_DECIMAL_POINT)) : str;
} | java | private static String intPart(String str) {
return str.indexOf(JAVA_DECIMAL_POINT) > 0 ? str.substring(0,
str.indexOf(JAVA_DECIMAL_POINT)) : str;
} | [
"private",
"static",
"String",
"intPart",
"(",
"String",
"str",
")",
"{",
"return",
"str",
".",
"indexOf",
"(",
"JAVA_DECIMAL_POINT",
")",
">",
"0",
"?",
"str",
".",
"substring",
"(",
"0",
",",
"str",
".",
"indexOf",
"(",
"JAVA_DECIMAL_POINT",
")",
")",
... | Removes the fractional part from a numeric's string representation.
@param str the numeric string decimal representation
@return the decimal representation without the factional part | [
"Removes",
"the",
"fractional",
"part",
"from",
"a",
"numeric",
"s",
"string",
"representation",
"."
] | f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6 | https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base/src/main/java/com/legstar/base/type/primitive/CobolDecimalType.java#L252-L255 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/SecurityAlertEvent.java | SecurityAlertEvent.addReportingUser | public void addReportingUser(String userId)
{
addActiveParticipant(
userId,
null,
null,
true,
null,
null);
} | java | public void addReportingUser(String userId)
{
addActiveParticipant(
userId,
null,
null,
true,
null,
null);
} | [
"public",
"void",
"addReportingUser",
"(",
"String",
"userId",
")",
"{",
"addActiveParticipant",
"(",
"userId",
",",
"null",
",",
"null",
",",
"true",
",",
"null",
",",
"null",
")",
";",
"}"
] | Add an active participant for the user reporting the security alert
@param userId The User ID of the user reporting the failure | [
"Add",
"an",
"active",
"participant",
"for",
"the",
"user",
"reporting",
"the",
"security",
"alert"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/SecurityAlertEvent.java#L57-L66 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/SecurityAlertEvent.java | SecurityAlertEvent.addActiveParticipant | public void addActiveParticipant(String userId)
{
addActiveParticipant(
userId,
null,
null,
false,
null,
null);
} | java | public void addActiveParticipant(String userId)
{
addActiveParticipant(
userId,
null,
null,
false,
null,
null);
} | [
"public",
"void",
"addActiveParticipant",
"(",
"String",
"userId",
")",
"{",
"addActiveParticipant",
"(",
"userId",
",",
"null",
",",
"null",
",",
"false",
",",
"null",
",",
"null",
")",
";",
"}"
] | Add an active participant for any participant involved in the alert
@param userId The User ID of the participant | [
"Add",
"an",
"active",
"participant",
"for",
"any",
"participant",
"involved",
"in",
"the",
"alert"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/SecurityAlertEvent.java#L72-L81 | train |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/SecurityAlertEvent.java | SecurityAlertEvent.addURIParticipantObject | public void addURIParticipantObject(String failedUri, String failureDescription)
{
List<TypeValuePairType> failureDescriptionValue = new LinkedList<>();
if (!EventUtils.isEmptyOrNull(failureDescription)) {
failureDescriptionValue.add(getTypeValuePair("Alert Description", failureDescription.getBytes()));
}
t... | java | public void addURIParticipantObject(String failedUri, String failureDescription)
{
List<TypeValuePairType> failureDescriptionValue = new LinkedList<>();
if (!EventUtils.isEmptyOrNull(failureDescription)) {
failureDescriptionValue.add(getTypeValuePair("Alert Description", failureDescription.getBytes()));
}
t... | [
"public",
"void",
"addURIParticipantObject",
"(",
"String",
"failedUri",
",",
"String",
"failureDescription",
")",
"{",
"List",
"<",
"TypeValuePairType",
">",
"failureDescriptionValue",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"if",
"(",
"!",
"EventUtils",
... | Adds a Participant Object representing the URI resource that was accessed and
generated the Security Alert
@param failedUri The URI accessed
@param failureDescription A description of why the alert was created | [
"Adds",
"a",
"Participant",
"Object",
"representing",
"the",
"URI",
"resource",
"that",
"was",
"accessed",
"and",
"generated",
"the",
"Security",
"Alert"
] | 25ed1e926825169c94923a2c89a4618f60478ae8 | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/SecurityAlertEvent.java#L90-L106 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/basic/ArrayFile.java | ArrayFile.initCheck | protected void initCheck() throws IOException {
// Check storage version
if (_version != STORAGE_VERSION) {
throw new IOException("Invalid version in " + _file.getName() + ": "
+ _version + ", " + STORAGE_VERSION + " expected");
}
// Check array file header
if(!checkHeader()... | java | protected void initCheck() throws IOException {
// Check storage version
if (_version != STORAGE_VERSION) {
throw new IOException("Invalid version in " + _file.getName() + ": "
+ _version + ", " + STORAGE_VERSION + " expected");
}
// Check array file header
if(!checkHeader()... | [
"protected",
"void",
"initCheck",
"(",
")",
"throws",
"IOException",
"{",
"// Check storage version",
"if",
"(",
"_version",
"!=",
"STORAGE_VERSION",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Invalid version in \"",
"+",
"_file",
".",
"getName",
"(",
")",
... | Checks the header of this ArrayFile upon initial loading.
@throws IOException the header is not valid. | [
"Checks",
"the",
"header",
"of",
"this",
"ArrayFile",
"upon",
"initial",
"loading",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayFile.java#L155-L166 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/basic/ArrayFile.java | ArrayFile.load | public void load(MemoryIntArray intArray) throws IOException {
if (!_file.exists() || _file.length() == 0) {
return;
}
Chronos c = new Chronos();
DataReader r = IOFactory.createDataReader(_file, _type);
try {
r.open();
r.position(DATA_START_POSITION);
for (in... | java | public void load(MemoryIntArray intArray) throws IOException {
if (!_file.exists() || _file.length() == 0) {
return;
}
Chronos c = new Chronos();
DataReader r = IOFactory.createDataReader(_file, _type);
try {
r.open();
r.position(DATA_START_POSITION);
for (in... | [
"public",
"void",
"load",
"(",
"MemoryIntArray",
"intArray",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"_file",
".",
"exists",
"(",
")",
"||",
"_file",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
";",
"}",
"Chronos",
"c",
"=",
... | Loads this ArrayFile into a memory-based int array.
@throws IOException | [
"Loads",
"this",
"ArrayFile",
"into",
"a",
"memory",
"-",
"based",
"int",
"array",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayFile.java#L322-L342 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/basic/ArrayFile.java | ArrayFile.load | public void load(MemoryLongArray longArray) throws IOException {
if (!_file.exists() || _file.length() == 0) {
return;
}
Chronos c = new Chronos();
DataReader r = IOFactory.createDataReader(_file, _type);
try {
r.open();
r.position(DATA_START_POSITION);
for (... | java | public void load(MemoryLongArray longArray) throws IOException {
if (!_file.exists() || _file.length() == 0) {
return;
}
Chronos c = new Chronos();
DataReader r = IOFactory.createDataReader(_file, _type);
try {
r.open();
r.position(DATA_START_POSITION);
for (... | [
"public",
"void",
"load",
"(",
"MemoryLongArray",
"longArray",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"_file",
".",
"exists",
"(",
")",
"||",
"_file",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
";",
"}",
"Chronos",
"c",
"=",
... | Loads this ArrayFile into a memory-based long array.
@throws IOException | [
"Loads",
"this",
"ArrayFile",
"into",
"a",
"memory",
"-",
"based",
"long",
"array",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayFile.java#L349-L369 | train |
jingwei/krati | krati-main/src/main/java/krati/core/array/basic/ArrayFile.java | ArrayFile.load | public void load(MemoryShortArray shortArray) throws IOException {
if (!_file.exists() || _file.length() == 0) {
return;
}
Chronos c = new Chronos();
DataReader r = IOFactory.createDataReader(_file, _type);
try {
r.open();
r.position(DATA_START_POSITION);
for... | java | public void load(MemoryShortArray shortArray) throws IOException {
if (!_file.exists() || _file.length() == 0) {
return;
}
Chronos c = new Chronos();
DataReader r = IOFactory.createDataReader(_file, _type);
try {
r.open();
r.position(DATA_START_POSITION);
for... | [
"public",
"void",
"load",
"(",
"MemoryShortArray",
"shortArray",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"_file",
".",
"exists",
"(",
")",
"||",
"_file",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
";",
"}",
"Chronos",
"c",
"="... | Loads this ArrayFile into a memory-based short array.
@throws IOException | [
"Loads",
"this",
"ArrayFile",
"into",
"a",
"memory",
"-",
"based",
"short",
"array",
"."
] | 1ca0f994a7b0c8215b827eac9aaf95789ec08d21 | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayFile.java#L376-L396 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.