id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
40,400
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
40,401
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
40,402
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
40,403
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
40,404
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
40,405
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
40,406
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
40,407
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
40,408
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
40,409
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
40,410
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
40,411
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
40,412
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
40,413
jingwei/krati
krati-main/src/main/java/krati/core/array/basic/ArrayFile.java
ArrayFile.loadShortArray
public short[] loadShortArray() throws IOException { if (!_file.exists() || _file.length() == 0) { return null; } Chronos c = new Chronos(); DataReader r = IOFactory.createDataReader(_file, _type); try { r.open(); r.position(DATA_START_POSITION); short[] ar...
java
public short[] loadShortArray() throws IOException { if (!_file.exists() || _file.length() == 0) { return null; } Chronos c = new Chronos(); DataReader r = IOFactory.createDataReader(_file, _type); try { r.open(); r.position(DATA_START_POSITION); short[] ar...
[ "public", "short", "[", "]", "loadShortArray", "(", ")", "throws", "IOException", "{", "if", "(", "!", "_file", ".", "exists", "(", ")", "||", "_file", ".", "length", "(", ")", "==", "0", ")", "{", "return", "null", ";", "}", "Chronos", "c", "=", ...
Loads the main array. @return a short array @throws IOException
[ "Loads", "the", "main", "array", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayFile.java#L464-L486
40,414
jingwei/krati
krati-main/src/main/java/krati/core/array/basic/ArrayFile.java
ArrayFile.update
public synchronized <T extends EntryValue> void update(List<Entry<T>> entryList) throws IOException { Chronos c = new Chronos(); // Sort values by position in the array file T[] values = EntryUtility.sortEntriesToValues(entryList); if (values == null || values.length == 0) return; // Obt...
java
public synchronized <T extends EntryValue> void update(List<Entry<T>> entryList) throws IOException { Chronos c = new Chronos(); // Sort values by position in the array file T[] values = EntryUtility.sortEntriesToValues(entryList); if (values == null || values.length == 0) return; // Obt...
[ "public", "synchronized", "<", "T", "extends", "EntryValue", ">", "void", "update", "(", "List", "<", "Entry", "<", "T", ">", ">", "entryList", ")", "throws", "IOException", "{", "Chronos", "c", "=", "new", "Chronos", "(", ")", ";", "// Sort values by posi...
Apply entries to the array file. The method will flatten entry data and sort it by position. So the array file can be updated sequentially to reduce disk seeking time. This method updates hwmScn and lwmScn in the array file. @param entryList @throws IOException
[ "Apply", "entries", "to", "the", "array", "file", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayFile.java#L547-L582
40,415
jingwei/krati
krati-main/src/main/java/krati/core/array/basic/ArrayFile.java
ArrayFile.setWaterMarks
public void setWaterMarks(long lwmScn, long hwmScn) throws IOException { if(lwmScn <= hwmScn) { writeHwmScn(hwmScn); _writer.flush(); writeLwmScn(lwmScn); _writer.flush(); } else { throw new IOException("Invalid water marks: lwmScn=" + lwmScn + " hwmScn=" + ...
java
public void setWaterMarks(long lwmScn, long hwmScn) throws IOException { if(lwmScn <= hwmScn) { writeHwmScn(hwmScn); _writer.flush(); writeLwmScn(lwmScn); _writer.flush(); } else { throw new IOException("Invalid water marks: lwmScn=" + lwmScn + " hwmScn=" + ...
[ "public", "void", "setWaterMarks", "(", "long", "lwmScn", ",", "long", "hwmScn", ")", "throws", "IOException", "{", "if", "(", "lwmScn", "<=", "hwmScn", ")", "{", "writeHwmScn", "(", "hwmScn", ")", ";", "_writer", ".", "flush", "(", ")", ";", "writeLwmSc...
Sets the water marks of this ArrayFile. @param lwmScn - the low water mark @param hwmScn - the high water mark @throws IOException if the <code>lwmScn</code> is greater than the <code>hwmScn</code> or the changes to the underlying file cannot be flushed.
[ "Sets", "the", "water", "marks", "of", "this", "ArrayFile", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayFile.java#L617-L626
40,416
jingwei/krati
krati-main/src/main/java/krati/core/array/basic/ArrayFile.java
ArrayFile.resetAll
public synchronized void resetAll(long value) throws IOException { if(_elementSize != 8) { throw new IOException("Operation aborted: elementSize=" + _elementSize); } _writer.flush(); _writer.position(DATA_START_POSITION); for(int i = 0; i < this._arrayLength; i++) { ...
java
public synchronized void resetAll(long value) throws IOException { if(_elementSize != 8) { throw new IOException("Operation aborted: elementSize=" + _elementSize); } _writer.flush(); _writer.position(DATA_START_POSITION); for(int i = 0; i < this._arrayLength; i++) { ...
[ "public", "synchronized", "void", "resetAll", "(", "long", "value", ")", "throws", "IOException", "{", "if", "(", "_elementSize", "!=", "8", ")", "{", "throw", "new", "IOException", "(", "\"Operation aborted: elementSize=\"", "+", "_elementSize", ")", ";", "}", ...
Resets all element values to the specified long value. @param value - the element value. @throws IOException
[ "Resets", "all", "element", "values", "to", "the", "specified", "long", "value", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayFile.java#L820-L831
40,417
jingwei/krati
krati-main/src/main/java/krati/core/array/basic/ArrayFile.java
ArrayFile.setArrayLength
public synchronized void setArrayLength(int arrayLength, File renameToFile) throws IOException { if(arrayLength < 0) { throw new IOException("Invalid array length: " + arrayLength); } if(this._arrayLength == arrayLength) return; // Flush all the changes. this.flush(...
java
public synchronized void setArrayLength(int arrayLength, File renameToFile) throws IOException { if(arrayLength < 0) { throw new IOException("Invalid array length: " + arrayLength); } if(this._arrayLength == arrayLength) return; // Flush all the changes. this.flush(...
[ "public", "synchronized", "void", "setArrayLength", "(", "int", "arrayLength", ",", "File", "renameToFile", ")", "throws", "IOException", "{", "if", "(", "arrayLength", "<", "0", ")", "{", "throw", "new", "IOException", "(", "\"Invalid array length: \"", "+", "a...
Updates the length of this ArrayFile to the specified value. @param arrayLength - the new array length @param renameToFile - the copy of this ArrayFile. If <code>null</code>, no backup copy will be created. @throws IOException
[ "Updates", "the", "length", "of", "this", "ArrayFile", "to", "the", "specified", "value", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/ArrayFile.java#L866-L912
40,418
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cobol/model/CobolUsage.java
CobolUsage.getUsage
public static Usage getUsage(String cobolUsage) { if (cobolUsage == null) { return null; } if (cobolUsage.equals(BINARY)) { return Usage.BINARY; } else if (cobolUsage.equals("COMP")) { return Usage.BINARY; } else if (cobolUsage.equals("COMPUTAT...
java
public static Usage getUsage(String cobolUsage) { if (cobolUsage == null) { return null; } if (cobolUsage.equals(BINARY)) { return Usage.BINARY; } else if (cobolUsage.equals("COMP")) { return Usage.BINARY; } else if (cobolUsage.equals("COMPUTAT...
[ "public", "static", "Usage", "getUsage", "(", "String", "cobolUsage", ")", "{", "if", "(", "cobolUsage", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "cobolUsage", ".", "equals", "(", "BINARY", ")", ")", "{", "return", "Usage", ".", ...
Get the java enumeration corresponding to a COBOL usage string. @param cobolUsage the COBOL usage string @return the java enumeration
[ "Get", "the", "java", "enumeration", "corresponding", "to", "a", "COBOL", "usage", "string", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cobol/model/CobolUsage.java#L128-L175
40,419
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDMAuditor.java
XDMAuditor.getAuditor
public static XDMAuditor getAuditor() { AuditorModuleContext ctx = AuditorModuleContext.getContext(); return (XDMAuditor)ctx.getAuditor(XDMAuditor.class); }
java
public static XDMAuditor getAuditor() { AuditorModuleContext ctx = AuditorModuleContext.getContext(); return (XDMAuditor)ctx.getAuditor(XDMAuditor.class); }
[ "public", "static", "XDMAuditor", "getAuditor", "(", ")", "{", "AuditorModuleContext", "ctx", "=", "AuditorModuleContext", ".", "getContext", "(", ")", ";", "return", "(", "XDMAuditor", ")", "ctx", ".", "getAuditor", "(", "XDMAuditor", ".", "class", ")", ";", ...
Get an instance of the XDM auditor from the global context @return XDM auditor instance
[ "Get", "an", "instance", "of", "the", "XDM", "auditor", "from", "the", "global", "context" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDMAuditor.java#L38-L42
40,420
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDMAuditor.java
XDMAuditor.auditPortableMediaImport
public void auditPortableMediaImport( RFC3881EventOutcomeCodes eventOutcome, String submissionSetUniqueId, String patientId, List<CodedValueType> purposesOfUse) { if (!isAuditorEnabled()) { return; } ImportEvent importEvent = new ImportEvent(false, eventOutcome, new IHETransactionEventTy...
java
public void auditPortableMediaImport( RFC3881EventOutcomeCodes eventOutcome, String submissionSetUniqueId, String patientId, List<CodedValueType> purposesOfUse) { if (!isAuditorEnabled()) { return; } ImportEvent importEvent = new ImportEvent(false, eventOutcome, new IHETransactionEventTy...
[ "public", "void", "auditPortableMediaImport", "(", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "submissionSetUniqueId", ",", "String", "patientId", ",", "List", "<", "CodedValueType", ">", "purposesOfUse", ")", "{", "if", "(", "!", "isAuditorEnabled", "...
Audits a PHI Import event for the IHE XDM Portable Media Importer actor and ITI-32 Distribute Document Set on Media Transaction. @param eventOutcome The event outcome indicator @param submissionSetUniqueId The Unique ID of the Submission Set imported @param patientId The ID of the Patient to which the Submission Set...
[ "Audits", "a", "PHI", "Import", "event", "for", "the", "IHE", "XDM", "Portable", "Media", "Importer", "actor", "and", "ITI", "-", "32", "Distribute", "Document", "Set", "on", "Media", "Transaction", "." ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDMAuditor.java#L53-L71
40,421
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDMAuditor.java
XDMAuditor.auditPortableMediaCreate
public void auditPortableMediaCreate( RFC3881EventOutcomeCodes eventOutcome, String submissionSetUniqueId, String patientId, List<CodedValueType> purposesOfUse) { if (!isAuditorEnabled()) { return; } ExportEvent exportEvent = new ExportEvent(true, eventOutcome, new IHETransactionEventType...
java
public void auditPortableMediaCreate( RFC3881EventOutcomeCodes eventOutcome, String submissionSetUniqueId, String patientId, List<CodedValueType> purposesOfUse) { if (!isAuditorEnabled()) { return; } ExportEvent exportEvent = new ExportEvent(true, eventOutcome, new IHETransactionEventType...
[ "public", "void", "auditPortableMediaCreate", "(", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "submissionSetUniqueId", ",", "String", "patientId", ",", "List", "<", "CodedValueType", ">", "purposesOfUse", ")", "{", "if", "(", "!", "isAuditorEnabled", "...
Audits a PHI Export event for the IHE XDM Portable Media Creator actor, ITI-32 Distribute Document Set on Media transaction. @param eventOutcome The event outcome indicator @param submissionSetUniqueId The Unique ID of the Submission Set exported @param patientId The ID of the Patient to which the Submission Set perta...
[ "Audits", "a", "PHI", "Export", "event", "for", "the", "IHE", "XDM", "Portable", "Media", "Creator", "actor", "ITI", "-", "32", "Distribute", "Document", "Set", "on", "Media", "transaction", "." ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDMAuditor.java#L81-L98
40,422
jingwei/krati
krati-main/src/main/java/krati/util/Chronos.java
Chronos.tick
public long tick() { long tick = System.currentTimeMillis(); long diff = tick - _lastTick; _lastTick = tick; return diff; }
java
public long tick() { long tick = System.currentTimeMillis(); long diff = tick - _lastTick; _lastTick = tick; return diff; }
[ "public", "long", "tick", "(", ")", "{", "long", "tick", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "long", "diff", "=", "tick", "-", "_lastTick", ";", "_lastTick", "=", "tick", ";", "return", "diff", ";", "}" ]
Returns the number of milliseconds elapsed since the last call to this function. @return the number of milliseconds since last call
[ "Returns", "the", "number", "of", "milliseconds", "elapsed", "since", "the", "last", "call", "to", "this", "function", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/util/Chronos.java#L76-L82
40,423
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java
Cob2Xsd.translate
public String translate(final Reader cobolReader, final String targetNamespace, final String xsltFileName) throws XsdGenerationException { try { if (_log.isDebugEnabled()) { _log.debug("Translating with options: {}", getConfig() .toStri...
java
public String translate(final Reader cobolReader, final String targetNamespace, final String xsltFileName) throws XsdGenerationException { try { if (_log.isDebugEnabled()) { _log.debug("Translating with options: {}", getConfig() .toStri...
[ "public", "String", "translate", "(", "final", "Reader", "cobolReader", ",", "final", "String", "targetNamespace", ",", "final", "String", "xsltFileName", ")", "throws", "XsdGenerationException", "{", "try", "{", "if", "(", "_log", ".", "isDebugEnabled", "(", ")...
Execute the translation from COBOL to XML Schema. @param cobolReader reads the raw COBOL source @param targetNamespace the generated XML schema target namespace (null for no namespace) @param xsltFileName an optional xslt to apply on the XML Schema @return the XML Schema @throws XsdGenerationException if XML schema ge...
[ "Execute", "the", "translation", "from", "COBOL", "to", "XML", "Schema", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java#L115-L129
40,424
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java
Cob2Xsd.toModel
public List < CobolDataItem > toModel(final Reader cobolReader) throws RecognizerException { return emitModel(parse(lex(clean(cobolReader)))); }
java
public List < CobolDataItem > toModel(final Reader cobolReader) throws RecognizerException { return emitModel(parse(lex(clean(cobolReader)))); }
[ "public", "List", "<", "CobolDataItem", ">", "toModel", "(", "final", "Reader", "cobolReader", ")", "throws", "RecognizerException", "{", "return", "emitModel", "(", "parse", "(", "lex", "(", "clean", "(", "cobolReader", ")", ")", ")", ")", ";", "}" ]
Parses a COBOL source into an in-memory model. @param cobolReader reads the raw COBOL source @return a list of root COBOL data items @throws RecognizerException if COBOL recognition fails
[ "Parses", "a", "COBOL", "source", "into", "an", "in", "-", "memory", "model", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java#L138-L141
40,425
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java
Cob2Xsd.clean
public String clean(final Reader cobolReader) throws CleanerException { if (_log.isDebugEnabled()) { _log.debug("1. Cleaning COBOL source code"); } switch (getConfig().getCodeFormat()) { case FIXED_FORMAT: CobolFixedFormatSourceCleaner fixedCleaner = new CobolFixe...
java
public String clean(final Reader cobolReader) throws CleanerException { if (_log.isDebugEnabled()) { _log.debug("1. Cleaning COBOL source code"); } switch (getConfig().getCodeFormat()) { case FIXED_FORMAT: CobolFixedFormatSourceCleaner fixedCleaner = new CobolFixe...
[ "public", "String", "clean", "(", "final", "Reader", "cobolReader", ")", "throws", "CleanerException", "{", "if", "(", "_log", ".", "isDebugEnabled", "(", ")", ")", "{", "_log", ".", "debug", "(", "\"1. Cleaning COBOL source code\"", ")", ";", "}", "switch", ...
Remove any non COBOL Structure characters from the source. @param cobolReader reads the raw COBOL source @return a cleaned up source @throws CleanerException if source cannot be read
[ "Remove", "any", "non", "COBOL", "Structure", "characters", "from", "the", "source", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java#L150-L168
40,426
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java
Cob2Xsd.lex
public CommonTokenStream lex(final String cleanedCobolSource) throws RecognizerException { if (_log.isDebugEnabled()) { _log.debug("2. Lexing COBOL source code: {}", cleanedCobolSource); } try { CobolStructureLexer lex = new CobolStructureLexerImpl( ...
java
public CommonTokenStream lex(final String cleanedCobolSource) throws RecognizerException { if (_log.isDebugEnabled()) { _log.debug("2. Lexing COBOL source code: {}", cleanedCobolSource); } try { CobolStructureLexer lex = new CobolStructureLexerImpl( ...
[ "public", "CommonTokenStream", "lex", "(", "final", "String", "cleanedCobolSource", ")", "throws", "RecognizerException", "{", "if", "(", "_log", ".", "isDebugEnabled", "(", ")", ")", "{", "_log", ".", "debug", "(", "\"2. Lexing COBOL source code: {}\"", ",", "cle...
Apply the lexer to produce a token stream from source. @param cleanedCobolSource the source code (clean outside columns 7 to 72) @return an antlr token stream @throws RecognizerException if lexer failed to tokenize COBOL source
[ "Apply", "the", "lexer", "to", "produce", "a", "token", "stream", "from", "source", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java#L177-L197
40,427
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java
Cob2Xsd.parse
public CommonTree parse(final CommonTokenStream tokens) throws RecognizerException { if (_log.isDebugEnabled()) { _log.debug("3. Parsing tokens: {}", tokens.toString()); } try { CobolStructureParser parser = new CobolStructureParserImpl(tokens, ...
java
public CommonTree parse(final CommonTokenStream tokens) throws RecognizerException { if (_log.isDebugEnabled()) { _log.debug("3. Parsing tokens: {}", tokens.toString()); } try { CobolStructureParser parser = new CobolStructureParserImpl(tokens, ...
[ "public", "CommonTree", "parse", "(", "final", "CommonTokenStream", "tokens", ")", "throws", "RecognizerException", "{", "if", "(", "_log", ".", "isDebugEnabled", "(", ")", ")", "{", "_log", ".", "debug", "(", "\"3. Parsing tokens: {}\"", ",", "tokens", ".", "...
Apply Parser to produce an abstract syntax tree from a token stream. @param tokens the stream token produced by lexer @return an antlr abstract syntax tree @throws RecognizerException if source contains unsupported statements
[ "Apply", "Parser", "to", "produce", "an", "abstract", "syntax", "tree", "from", "a", "token", "stream", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java#L206-L225
40,428
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java
Cob2Xsd.emitModel
public List < CobolDataItem > emitModel(final CommonTree ast) throws RecognizerException { List < CobolDataItem > cobolDataItems = new ArrayList < CobolDataItem >(); if (_log.isDebugEnabled()) { _log.debug("4. Emitting Model from AST: {}", ((ast == null) ? "nu...
java
public List < CobolDataItem > emitModel(final CommonTree ast) throws RecognizerException { List < CobolDataItem > cobolDataItems = new ArrayList < CobolDataItem >(); if (_log.isDebugEnabled()) { _log.debug("4. Emitting Model from AST: {}", ((ast == null) ? "nu...
[ "public", "List", "<", "CobolDataItem", ">", "emitModel", "(", "final", "CommonTree", "ast", ")", "throws", "RecognizerException", "{", "List", "<", "CobolDataItem", ">", "cobolDataItems", "=", "new", "ArrayList", "<", "CobolDataItem", ">", "(", ")", ";", "if"...
Generates a model from an Abstract Syntax Tree. @param ast the abstract syntax tree produced by parser @return a list of root COBOL data items @throws RecognizerException if tree cannot be walked
[ "Generates", "a", "model", "from", "an", "Abstract", "Syntax", "Tree", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java#L234-L253
40,429
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java
Cob2Xsd.getNonUniqueCobolNames
public static List < String > getNonUniqueCobolNames( final List < CobolDataItem > cobolDataItems) { List < String > cobolNames = new ArrayList < String >(); List < String > nonUniqueCobolNames = new ArrayList < String >(); for (CobolDataItem cobolDataItem : cobolDataItems) { ...
java
public static List < String > getNonUniqueCobolNames( final List < CobolDataItem > cobolDataItems) { List < String > cobolNames = new ArrayList < String >(); List < String > nonUniqueCobolNames = new ArrayList < String >(); for (CobolDataItem cobolDataItem : cobolDataItems) { ...
[ "public", "static", "List", "<", "String", ">", "getNonUniqueCobolNames", "(", "final", "List", "<", "CobolDataItem", ">", "cobolDataItems", ")", "{", "List", "<", "String", ">", "cobolNames", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "Li...
Create a list of COBOL names which are not unique. This is useful when we build complex type names from the COBOL names. Complex type names need to be unique within a target namespace. @param cobolDataItems a list of root data items @return a list of COBOL names which are not unique
[ "Create", "a", "list", "of", "COBOL", "names", "which", "are", "not", "unique", ".", "This", "is", "useful", "when", "we", "build", "complex", "type", "names", "from", "the", "COBOL", "names", ".", "Complex", "type", "names", "need", "to", "be", "unique"...
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2Xsd.java#L355-L364
40,430
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/sender/TLSSyslogSenderImpl.java
TLSSyslogSenderImpl.getTLSSocket
private Socket getTLSSocket(InetAddress destination, int port) throws Exception { String key = destination.getHostAddress() + ":" + port; synchronized (socketMap){ Socket socket = socketMap.get(key); if (socket == null){ // create a new one NodeAuthModuleContext nodeAuthContext = NodeAuthModuleContex...
java
private Socket getTLSSocket(InetAddress destination, int port) throws Exception { String key = destination.getHostAddress() + ":" + port; synchronized (socketMap){ Socket socket = socketMap.get(key); if (socket == null){ // create a new one NodeAuthModuleContext nodeAuthContext = NodeAuthModuleContex...
[ "private", "Socket", "getTLSSocket", "(", "InetAddress", "destination", ",", "int", "port", ")", "throws", "Exception", "{", "String", "key", "=", "destination", ".", "getHostAddress", "(", ")", "+", "\":\"", "+", "port", ";", "synchronized", "(", "socketMap",...
Gets the socket tied to the address and port for this transport @param port Port to check @return Port to use
[ "Gets", "the", "socket", "tied", "to", "the", "address", "and", "port", "for", "this", "transport" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/sender/TLSSyslogSenderImpl.java#L171-L189
40,431
apptik/jus
jus-java/src/main/java/io/apptik/comm/jus/toolbox/DiskBasedCache.java
DiskBasedCache.clear
@Override public synchronized void clear() { File[] files = mRootDirectory.listFiles(); if (files != null) { for (File file : files) { file.delete(); } } mEntries.clear(); mTotalSize = 0; //todo add queue markers //JusLo...
java
@Override public synchronized void clear() { File[] files = mRootDirectory.listFiles(); if (files != null) { for (File file : files) { file.delete(); } } mEntries.clear(); mTotalSize = 0; //todo add queue markers //JusLo...
[ "@", "Override", "public", "synchronized", "void", "clear", "(", ")", "{", "File", "[", "]", "files", "=", "mRootDirectory", ".", "listFiles", "(", ")", ";", "if", "(", "files", "!=", "null", ")", "{", "for", "(", "File", "file", ":", "files", ")", ...
Clears the cache. Deletes all cached files from disk.
[ "Clears", "the", "cache", ".", "Deletes", "all", "cached", "files", "from", "disk", "." ]
8a37a21b41f897d68eaeaab07368ec22a1e5a60e
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/toolbox/DiskBasedCache.java#L107-L119
40,432
apptik/jus
jus-java/src/main/java/io/apptik/comm/jus/toolbox/DiskBasedCache.java
DiskBasedCache.get
@Override public synchronized Entry get(String key) { CacheHeader entry = mEntries.get(key); // if the entry does not exist, return. if (entry == null) { return null; } File file = getFileForKey(key); CountingInputStream cis = null; try { ...
java
@Override public synchronized Entry get(String key) { CacheHeader entry = mEntries.get(key); // if the entry does not exist, return. if (entry == null) { return null; } File file = getFileForKey(key); CountingInputStream cis = null; try { ...
[ "@", "Override", "public", "synchronized", "Entry", "get", "(", "String", "key", ")", "{", "CacheHeader", "entry", "=", "mEntries", ".", "get", "(", "key", ")", ";", "// if the entry does not exist, return.", "if", "(", "entry", "==", "null", ")", "{", "retu...
Returns the cache entry with the specified key if it exists, null otherwise.
[ "Returns", "the", "cache", "entry", "with", "the", "specified", "key", "if", "it", "exists", "null", "otherwise", "." ]
8a37a21b41f897d68eaeaab07368ec22a1e5a60e
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/toolbox/DiskBasedCache.java#L124-L157
40,433
apptik/jus
jus-java/src/main/java/io/apptik/comm/jus/toolbox/DiskBasedCache.java
DiskBasedCache.initialize
@Override public synchronized void initialize() { if (!mRootDirectory.exists()) { if (!mRootDirectory.mkdirs()) { //silently ignoring no cache is not good so we throw and let the user decide // what // to do throw new IllegalStateEx...
java
@Override public synchronized void initialize() { if (!mRootDirectory.exists()) { if (!mRootDirectory.mkdirs()) { //silently ignoring no cache is not good so we throw and let the user decide // what // to do throw new IllegalStateEx...
[ "@", "Override", "public", "synchronized", "void", "initialize", "(", ")", "{", "if", "(", "!", "mRootDirectory", ".", "exists", "(", ")", ")", "{", "if", "(", "!", "mRootDirectory", ".", "mkdirs", "(", ")", ")", "{", "//silently ignoring no cache is not goo...
Initializes the DiskBasedCache by scanning for all files currently in the specified root directory. Creates the root directory if necessary.
[ "Initializes", "the", "DiskBasedCache", "by", "scanning", "for", "all", "files", "currently", "in", "the", "specified", "root", "directory", ".", "Creates", "the", "root", "directory", "if", "necessary", "." ]
8a37a21b41f897d68eaeaab07368ec22a1e5a60e
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/toolbox/DiskBasedCache.java#L163-L201
40,434
apptik/jus
jus-java/src/main/java/io/apptik/comm/jus/http/MultipartBuilder.java
MultipartBuilder.addPart
public MultipartBuilder addPart(NetworkRequest part) { if (part == null) { throw new NullPointerException("part == null"); } parts.add(part); return this; }
java
public MultipartBuilder addPart(NetworkRequest part) { if (part == null) { throw new NullPointerException("part == null"); } parts.add(part); return this; }
[ "public", "MultipartBuilder", "addPart", "(", "NetworkRequest", "part", ")", "{", "if", "(", "part", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"part == null\"", ")", ";", "}", "parts", ".", "add", "(", "part", ")", ";", "return...
Add a part to the body.
[ "Add", "a", "part", "to", "the", "body", "." ]
8a37a21b41f897d68eaeaab07368ec22a1e5a60e
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/http/MultipartBuilder.java#L116-L122
40,435
apptik/jus
jus-java/src/main/java/io/apptik/comm/jus/http/MultipartBuilder.java
MultipartBuilder.build
public NetworkRequest build() { if (parts.isEmpty()) { throw new IllegalStateException("Multipart body must have at least one part."); } MultipartRequest mrb = new MultipartRequest(type, boundary, parts); Buffer bb = new Buffer(); try { mrb.writeOrCountByt...
java
public NetworkRequest build() { if (parts.isEmpty()) { throw new IllegalStateException("Multipart body must have at least one part."); } MultipartRequest mrb = new MultipartRequest(type, boundary, parts); Buffer bb = new Buffer(); try { mrb.writeOrCountByt...
[ "public", "NetworkRequest", "build", "(", ")", "{", "if", "(", "parts", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Multipart body must have at least one part.\"", ")", ";", "}", "MultipartRequest", "mrb", "=", "new", "Mu...
Assemble the specified parts into a request body.
[ "Assemble", "the", "specified", "parts", "into", "a", "request", "body", "." ]
8a37a21b41f897d68eaeaab07368ec22a1e5a60e
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/http/MultipartBuilder.java#L186-L201
40,436
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/XsdAnnotationEmitter.java
XsdAnnotationEmitter.addNamespaceContext
protected void addNamespaceContext() { NamespaceMap prefixmap = new NamespaceMap(); NamespacePrefixList npl = getXsd().getNamespaceContext(); if (npl == null) { /* We get an NPE if we don't add this. */ prefixmap.add("", XMLConstants.W3C_XML_SCHEMA_NS_URI); } else...
java
protected void addNamespaceContext() { NamespaceMap prefixmap = new NamespaceMap(); NamespacePrefixList npl = getXsd().getNamespaceContext(); if (npl == null) { /* We get an NPE if we don't add this. */ prefixmap.add("", XMLConstants.W3C_XML_SCHEMA_NS_URI); } else...
[ "protected", "void", "addNamespaceContext", "(", ")", "{", "NamespaceMap", "prefixmap", "=", "new", "NamespaceMap", "(", ")", ";", "NamespacePrefixList", "npl", "=", "getXsd", "(", ")", ".", "getNamespaceContext", "(", ")", ";", "if", "(", "npl", "==", "null...
Adds the COXB namespace and associated prefixes to the XML schema.
[ "Adds", "the", "COXB", "namespace", "and", "associated", "prefixes", "to", "the", "XML", "schema", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/XsdAnnotationEmitter.java#L217-L232
40,437
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/RecognizerErrorHandler.java
RecognizerErrorHandler.getErrorMessage
public static String getErrorMessage( final Logger log, final BaseRecognizer recognizer, final RecognitionException e, final String superMessage, final String[] tokenNames) { if (log.isDebugEnabled()) { List < ? > stack = BaseRecognizer.get...
java
public static String getErrorMessage( final Logger log, final BaseRecognizer recognizer, final RecognitionException e, final String superMessage, final String[] tokenNames) { if (log.isDebugEnabled()) { List < ? > stack = BaseRecognizer.get...
[ "public", "static", "String", "getErrorMessage", "(", "final", "Logger", "log", ",", "final", "BaseRecognizer", "recognizer", ",", "final", "RecognitionException", "e", ",", "final", "String", "superMessage", ",", "final", "String", "[", "]", "tokenNames", ")", ...
Format an error message as expected by ANTLR. It is basically the same error message that ANTL BaseRecognizer generates with some additional data. Also used to log debugging information. @param log the logger to use at debug time @param recognizer the lexer or parser who generated the error @param e the exception that ...
[ "Format", "an", "error", "message", "as", "expected", "by", "ANTLR", ".", "It", "is", "basically", "the", "same", "error", "message", "that", "ANTL", "BaseRecognizer", "generates", "with", "some", "additional", "data", ".", "Also", "used", "to", "log", "debu...
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/RecognizerErrorHandler.java#L51-L82
40,438
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/RecognizerErrorHandler.java
RecognizerErrorHandler.makeUserMsg
public static String makeUserMsg(final RecognitionException e, final String msg) { if (e instanceof NoViableAltException) { return msg.replace("no viable alternative at", "unrecognized"); } else if (e instanceof UnwantedTokenException) { return msg.replace("extraneous input", "un...
java
public static String makeUserMsg(final RecognitionException e, final String msg) { if (e instanceof NoViableAltException) { return msg.replace("no viable alternative at", "unrecognized"); } else if (e instanceof UnwantedTokenException) { return msg.replace("extraneous input", "un...
[ "public", "static", "String", "makeUserMsg", "(", "final", "RecognitionException", "e", ",", "final", "String", "msg", ")", "{", "if", "(", "e", "instanceof", "NoViableAltException", ")", "{", "return", "msg", ".", "replace", "(", "\"no viable alternative at\"", ...
Simplify error message text for end users. @param e exception that occurred @param msg as formatted by ANTLR @return a more readable error message
[ "Simplify", "error", "message", "text", "for", "end", "users", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/RecognizerErrorHandler.java#L90-L118
40,439
jingwei/krati
krati-main/src/main/java/krati/store/IndexedDataStore.java
IndexedDataStore.initIndexPersistableListener
protected void initIndexPersistableListener() { _index.setPersistableListener(new PersistableListener() { @Override public void beforePersist() { try { PersistableListener l = _listener; if(l != null) l.beforePersist(); ...
java
protected void initIndexPersistableListener() { _index.setPersistableListener(new PersistableListener() { @Override public void beforePersist() { try { PersistableListener l = _listener; if(l != null) l.beforePersist(); ...
[ "protected", "void", "initIndexPersistableListener", "(", ")", "{", "_index", ".", "setPersistableListener", "(", "new", "PersistableListener", "(", ")", "{", "@", "Override", "public", "void", "beforePersist", "(", ")", "{", "try", "{", "PersistableListener", "l"...
Initialize the Index persistable listener.
[ "Initialize", "the", "Index", "persistable", "listener", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/store/IndexedDataStore.java#L249-L277
40,440
jingwei/krati
krati-main/src/examples/java/krati/examples/KratiDataPartition.java
KratiDataPartition.populate
public void populate() throws Exception { for (int i = 0, cnt = _partition.getIdCount(); i < cnt; i++) { int memberId = _partition.getIdStart() + i; _partition.set(memberId, createDataForMember(memberId), System.nanoTime()); } _partition.sync(); }
java
public void populate() throws Exception { for (int i = 0, cnt = _partition.getIdCount(); i < cnt; i++) { int memberId = _partition.getIdStart() + i; _partition.set(memberId, createDataForMember(memberId), System.nanoTime()); } _partition.sync(); }
[ "public", "void", "populate", "(", ")", "throws", "Exception", "{", "for", "(", "int", "i", "=", "0", ",", "cnt", "=", "_partition", ".", "getIdCount", "(", ")", ";", "i", "<", "cnt", ";", "i", "++", ")", "{", "int", "memberId", "=", "_partition", ...
Populates the underlying data partition. @throws Exception
[ "Populates", "the", "underlying", "data", "partition", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/examples/java/krati/examples/KratiDataPartition.java#L74-L80
40,441
jingwei/krati
krati-main/src/examples/java/krati/examples/KratiDataPartition.java
KratiDataPartition.doRandomReads
public void doRandomReads(int readCnt) { Random rand = new Random(); int idStart = _partition.getIdStart(); int idCount = _partition.getIdCount(); for (int i = 0; i < readCnt; i++) { int memberId = idStart + rand.nextInt(idCount); System.out.printf("MemberId=%-10d...
java
public void doRandomReads(int readCnt) { Random rand = new Random(); int idStart = _partition.getIdStart(); int idCount = _partition.getIdCount(); for (int i = 0; i < readCnt; i++) { int memberId = idStart + rand.nextInt(idCount); System.out.printf("MemberId=%-10d...
[ "public", "void", "doRandomReads", "(", "int", "readCnt", ")", "{", "Random", "rand", "=", "new", "Random", "(", ")", ";", "int", "idStart", "=", "_partition", ".", "getIdStart", "(", ")", ";", "int", "idCount", "=", "_partition", ".", "getIdCount", "(",...
Perform a number of random reads from the underlying data partition. @param readCnt the number of reads
[ "Perform", "a", "number", "of", "random", "reads", "from", "the", "underlying", "data", "partition", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/examples/java/krati/examples/KratiDataPartition.java#L87-L95
40,442
jingwei/krati
krati-main/src/examples/java/krati/examples/KratiDataPartition.java
KratiDataPartition.main
public static void main(String[] args) { try { // Parse arguments: homeDir idStart idCount File homeDir = new File(args[0]); int idStart = Integer.parseInt(args[1]); int idCount = Integer.parseInt(args[2]); // Create an instance of KratiDa...
java
public static void main(String[] args) { try { // Parse arguments: homeDir idStart idCount File homeDir = new File(args[0]); int idStart = Integer.parseInt(args[1]); int idCount = Integer.parseInt(args[2]); // Create an instance of KratiDa...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "try", "{", "// Parse arguments: homeDir idStart idCount", "File", "homeDir", "=", "new", "File", "(", "args", "[", "0", "]", ")", ";", "int", "idStart", "=", "Integer", ".", ...
java -Xmx4G krati.examples.KratiDataPartition homeDir idStart idCount
[ "java", "-", "Xmx4G", "krati", ".", "examples", ".", "KratiDataPartition", "homeDir", "idStart", "idCount" ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/examples/java/krati/examples/KratiDataPartition.java#L128-L149
40,443
jingwei/krati
krati-main/src/retention/java/krati/retention/clock/SourceWaterMarksClock.java
SourceWaterMarksClock.updateHWMark
@Override public synchronized Clock updateHWMark(String source, long hwm) { _sourceWaterMarks.saveHWMark(source, hwm); return current(); }
java
@Override public synchronized Clock updateHWMark(String source, long hwm) { _sourceWaterMarks.saveHWMark(source, hwm); return current(); }
[ "@", "Override", "public", "synchronized", "Clock", "updateHWMark", "(", "String", "source", ",", "long", "hwm", ")", "{", "_sourceWaterMarks", ".", "saveHWMark", "(", "source", ",", "hwm", ")", ";", "return", "current", "(", ")", ";", "}" ]
Save the high water mark of a given source. @param source @param hwm
[ "Save", "the", "high", "water", "mark", "of", "a", "given", "source", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/retention/java/krati/retention/clock/SourceWaterMarksClock.java#L134-L138
40,444
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/PDQConsumerAuditor.java
PDQConsumerAuditor.getAuditor
public static PDQConsumerAuditor getAuditor() { AuditorModuleContext ctx = AuditorModuleContext.getContext(); return (PDQConsumerAuditor)ctx.getAuditor(PDQConsumerAuditor.class); }
java
public static PDQConsumerAuditor getAuditor() { AuditorModuleContext ctx = AuditorModuleContext.getContext(); return (PDQConsumerAuditor)ctx.getAuditor(PDQConsumerAuditor.class); }
[ "public", "static", "PDQConsumerAuditor", "getAuditor", "(", ")", "{", "AuditorModuleContext", "ctx", "=", "AuditorModuleContext", ".", "getContext", "(", ")", ";", "return", "(", "PDQConsumerAuditor", ")", "ctx", ".", "getAuditor", "(", "PDQConsumerAuditor", ".", ...
Get an instance of the PDQ Consumer Auditor from the global context @return PDQ Consumer Auditor instance
[ "Get", "an", "instance", "of", "the", "PDQ", "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/PDQConsumerAuditor.java#L43-L47
40,445
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/PDQConsumerAuditor.java
PDQConsumerAuditor.auditPDQQueryEvent
public void auditPDQQueryEvent(RFC3881EventOutcomeCodes eventOutcome, String pixManagerUri, String receivingFacility, String receivingApp, String sendingFacility, String sendingApp, String hl7MessageControlId, String hl7QueryParameters, String[] patientIds) { if (!isAuditorEnabled()) { return; } ...
java
public void auditPDQQueryEvent(RFC3881EventOutcomeCodes eventOutcome, String pixManagerUri, String receivingFacility, String receivingApp, String sendingFacility, String sendingApp, String hl7MessageControlId, String hl7QueryParameters, String[] patientIds) { if (!isAuditorEnabled()) { return; } ...
[ "public", "void", "auditPDQQueryEvent", "(", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "pixManagerUri", ",", "String", "receivingFacility", ",", "String", "receivingApp", ",", "String", "sendingFacility", ",", "String", "sendingApp", ",", "String", "hl7...
Audits an ITI-21 Patient Demographics Query event for Patient Demographics Consumer actors. @param eventOutcome The event outcome indicator @param pixManagerUri The URI of the PIX Manager being accessed @param receivingFacility The HL7 receiving facility @param receivingApp The HL7 receiving application @param sending...
[ "Audits", "an", "ITI", "-", "21", "Patient", "Demographics", "Query", "event", "for", "Patient", "Demographics", "Consumer", "actors", "." ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/PDQConsumerAuditor.java#L63-L79
40,446
oehf/ipf-oht-atna
nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/SecurityDomainManager.java
SecurityDomainManager.formatKey
public String formatKey(URI uri) throws URISyntaxException { if (uri == null) { throw new URISyntaxException("","URI specified is null"); } return formatKey(uri.getHost(), uri.getPort()); }
java
public String formatKey(URI uri) throws URISyntaxException { if (uri == null) { throw new URISyntaxException("","URI specified is null"); } return formatKey(uri.getHost(), uri.getPort()); }
[ "public", "String", "formatKey", "(", "URI", "uri", ")", "throws", "URISyntaxException", "{", "if", "(", "uri", "==", "null", ")", "{", "throw", "new", "URISyntaxException", "(", "\"\"", ",", "\"URI specified is null\"", ")", ";", "}", "return", "formatKey", ...
Converts a well-formed URI containing a hostname and port into string which allows for lookups in the Security Domain table @param uri URI to convert @return A string with "host:port" concatenated @throws URISyntaxException
[ "Converts", "a", "well", "-", "formed", "URI", "containing", "a", "hostname", "and", "port", "into", "string", "which", "allows", "for", "lookups", "in", "the", "Security", "Domain", "table" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/SecurityDomainManager.java#L240-L246
40,447
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.submitSegmentIndexBuffer
protected void submitSegmentIndexBuffer() { if(_sibEnabled && !_sib.isDirty()) { _sib.setSegmentId(_segment.getSegmentId()); _sib.setSegmentLastForcedTime(_segment.getLastForcedTime()); _segmentManager.submit(_sib); } else { _segmentManager.remove(_sib); ...
java
protected void submitSegmentIndexBuffer() { if(_sibEnabled && !_sib.isDirty()) { _sib.setSegmentId(_segment.getSegmentId()); _sib.setSegmentLastForcedTime(_segment.getLastForcedTime()); _segmentManager.submit(_sib); } else { _segmentManager.remove(_sib); ...
[ "protected", "void", "submitSegmentIndexBuffer", "(", ")", "{", "if", "(", "_sibEnabled", "&&", "!", "_sib", ".", "isDirty", "(", ")", ")", "{", "_sib", ".", "setSegmentId", "(", "_segment", ".", "getSegmentId", "(", ")", ")", ";", "_sib", ".", "setSegme...
Submit current segment index buffer for asynchronous handling.
[ "Submit", "current", "segment", "index", "buffer", "for", "asynchronous", "handling", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L287-L295
40,448
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.init
protected void init() { try { // Initialize the current working segment _segment = _segmentManager.nextSegment(); // Segment index buffer is enabled by default! _sib = _segmentManager.openSegmentIndexBuffer(_segment.getSegmentId()); if(!_s...
java
protected void init() { try { // Initialize the current working segment _segment = _segmentManager.nextSegment(); // Segment index buffer is enabled by default! _sib = _segmentManager.openSegmentIndexBuffer(_segment.getSegmentId()); if(!_s...
[ "protected", "void", "init", "(", ")", "{", "try", "{", "// Initialize the current working segment", "_segment", "=", "_segmentManager", ".", "nextSegment", "(", ")", ";", "// Segment index buffer is enabled by default!", "_sib", "=", "_segmentManager", ".", "openSegmentI...
Initialize this SimpleDataArray after it is instantiated.
[ "Initialize", "this", "SimpleDataArray", "after", "it", "is", "instantiated", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L300-L314
40,449
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.decrOriginalSegmentLoad
protected void decrOriginalSegmentLoad(int index) { try { long address = getAddress(index); int segPos = _addressFormat.getOffset(address); int segInd = _addressFormat.getSegment(address); int length = _addressFormat.getDataSize(address); ...
java
protected void decrOriginalSegmentLoad(int index) { try { long address = getAddress(index); int segPos = _addressFormat.getOffset(address); int segInd = _addressFormat.getSegment(address); int length = _addressFormat.getDataSize(address); ...
[ "protected", "void", "decrOriginalSegmentLoad", "(", "int", "index", ")", "{", "try", "{", "long", "address", "=", "getAddress", "(", "index", ")", ";", "int", "segPos", "=", "_addressFormat", ".", "getOffset", "(", "address", ")", ";", "int", "segInd", "=...
Decrease the load factor of a Segment based on the specified array index. @param index - the array index.
[ "Decrease", "the", "load", "factor", "of", "a", "Segment", "based", "on", "the", "specified", "array", "index", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L393-L410
40,450
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.get
@Override public byte[] get(int index) { rangeCheck(index); try { long address = getAddress(index); int segPos = _addressFormat.getOffset(address); int segInd = _addressFormat.getSegment(address); // no data found if(s...
java
@Override public byte[] get(int index) { rangeCheck(index); try { long address = getAddress(index); int segPos = _addressFormat.getOffset(address); int segInd = _addressFormat.getSegment(address); // no data found if(s...
[ "@", "Override", "public", "byte", "[", "]", "get", "(", "int", "index", ")", "{", "rangeCheck", "(", "index", ")", ";", "try", "{", "long", "address", "=", "getAddress", "(", "index", ")", ";", "int", "segPos", "=", "_addressFormat", ".", "getOffset",...
Gets data at a given index. @param index the array index @return the data at a given index. @throws ArrayIndexOutOfBoundsException if the index is out of range.
[ "Gets", "data", "at", "a", "given", "index", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L479-L510
40,451
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.read
public int read(int index, byte[] dst) { rangeCheck(index); try { long address = getAddress(index); int segPos = _addressFormat.getOffset(address); int segInd = _addressFormat.getSegment(address); // no data found if(segPo...
java
public int read(int index, byte[] dst) { rangeCheck(index); try { long address = getAddress(index); int segPos = _addressFormat.getOffset(address); int segInd = _addressFormat.getSegment(address); // no data found if(segPo...
[ "public", "int", "read", "(", "int", "index", ",", "byte", "[", "]", "dst", ")", "{", "rangeCheck", "(", "index", ")", ";", "try", "{", "long", "address", "=", "getAddress", "(", "index", ")", ";", "int", "segPos", "=", "_addressFormat", ".", "getOff...
Reads data bytes at an index into a byte array. This method does a full read of data bytes only if the destination byte array has enough capacity to store all the bytes from the specified index. Otherwise, a partial read is done to fill in the destination byte array. @param index the array index @param dst the by...
[ "Reads", "data", "bytes", "at", "an", "index", "into", "a", "byte", "array", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L580-L610
40,452
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.transferTo
@Override public int transferTo(int index, WritableByteChannel channel) { rangeCheck(index); try { long address = getAddress(index); int segPos = _addressFormat.getOffset(address); int segInd = _addressFormat.getSegment(address); ...
java
@Override public int transferTo(int index, WritableByteChannel channel) { rangeCheck(index); try { long address = getAddress(index); int segPos = _addressFormat.getOffset(address); int segInd = _addressFormat.getSegment(address); ...
[ "@", "Override", "public", "int", "transferTo", "(", "int", "index", ",", "WritableByteChannel", "channel", ")", "{", "rangeCheck", "(", "index", ")", ";", "try", "{", "long", "address", "=", "getAddress", "(", "index", ")", ";", "int", "segPos", "=", "_...
Transfers data at a given index to a writable channel. @param index the array index @return the amount of bytes transferred (the length of data at the given index). @throws ArrayIndexOutOfBoundsException if the index is out of range.
[ "Transfers", "data", "at", "a", "given", "index", "to", "a", "writable", "channel", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L664-L693
40,453
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.clear
@Override public synchronized void clear() { if(isOpen()) { _compactor.clear(); _addressArray.clear(); _segmentManager.clear(); this.init(); } }
java
@Override public synchronized void clear() { if(isOpen()) { _compactor.clear(); _addressArray.clear(); _segmentManager.clear(); this.init(); } }
[ "@", "Override", "public", "synchronized", "void", "clear", "(", ")", "{", "if", "(", "isOpen", "(", ")", ")", "{", "_compactor", ".", "clear", "(", ")", ";", "_addressArray", ".", "clear", "(", ")", ";", "_segmentManager", ".", "clear", "(", ")", ";...
Clears all data stored in this SimpleDataArray. This method is not effective if this SimpleDataArray is not open.
[ "Clears", "all", "data", "stored", "in", "this", "SimpleDataArray", ".", "This", "method", "is", "not", "effective", "if", "this", "SimpleDataArray", "is", "not", "open", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L917-L925
40,454
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.close
@Override public synchronized void close() throws IOException { if (_mode == Mode.CLOSED) { return; } _mode = Mode.CLOSED; try { // THE CALLS ORDERED. _compactor.shutdown(); // shutdown compactor /* Cal...
java
@Override public synchronized void close() throws IOException { if (_mode == Mode.CLOSED) { return; } _mode = Mode.CLOSED; try { // THE CALLS ORDERED. _compactor.shutdown(); // shutdown compactor /* Cal...
[ "@", "Override", "public", "synchronized", "void", "close", "(", ")", "throws", "IOException", "{", "if", "(", "_mode", "==", "Mode", ".", "CLOSED", ")", "{", "return", ";", "}", "_mode", "=", "Mode", ".", "CLOSED", ";", "try", "{", "// THE CALLS ORDERED...
Close to quit from serving requests. @throws IOException if the underlying service cannot be closed properly.
[ "Close", "to", "quit", "from", "serving", "requests", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L932-L965
40,455
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.open
@Override public synchronized void open() throws IOException { if (_mode == Mode.OPEN) { return; } try { _addressArray.open(); _segmentManager.open(); _compactor.start(); init(); _mode = Mode.OPEN; ...
java
@Override public synchronized void open() throws IOException { if (_mode == Mode.OPEN) { return; } try { _addressArray.open(); _segmentManager.open(); _compactor.start(); init(); _mode = Mode.OPEN; ...
[ "@", "Override", "public", "synchronized", "void", "open", "(", ")", "throws", "IOException", "{", "if", "(", "_mode", "==", "Mode", ".", "OPEN", ")", "{", "return", ";", "}", "try", "{", "_addressArray", ".", "open", "(", ")", ";", "_segmentManager", ...
Open to start serving requests. @throws IOException if the underlying service cannot be opened properly.
[ "Open", "to", "start", "serving", "requests", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L972-L1003
40,456
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.fireBeforePersist
protected void fireBeforePersist() { PersistableListener l = _listener; if(l != null) { try { l.beforePersist(); } catch(Exception e) { _log.error("failure on calling beforePersist", e); } } }
java
protected void fireBeforePersist() { PersistableListener l = _listener; if(l != null) { try { l.beforePersist(); } catch(Exception e) { _log.error("failure on calling beforePersist", e); } } }
[ "protected", "void", "fireBeforePersist", "(", ")", "{", "PersistableListener", "l", "=", "_listener", ";", "if", "(", "l", "!=", "null", ")", "{", "try", "{", "l", ".", "beforePersist", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "...
Fire beforePersist events to the PersistableListener.
[ "Fire", "beforePersist", "events", "to", "the", "PersistableListener", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L1081-L1091
40,457
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.fireAfterPersist
protected void fireAfterPersist() { PersistableListener l = _listener; if(l != null) { try { l.afterPersist(); } catch(Exception e) { _log.error("failure on calling afterPersist", e); } } }
java
protected void fireAfterPersist() { PersistableListener l = _listener; if(l != null) { try { l.afterPersist(); } catch(Exception e) { _log.error("failure on calling afterPersist", e); } } }
[ "protected", "void", "fireAfterPersist", "(", ")", "{", "PersistableListener", "l", "=", "_listener", ";", "if", "(", "l", "!=", "null", ")", "{", "try", "{", "l", ".", "afterPersist", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "_l...
Fire afterPersist events to the PersistableListener.
[ "Fire", "afterPersist", "events", "to", "the", "PersistableListener", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L1096-L1106
40,458
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/CobolFixedFormatSourceCleaner.java
CobolFixedFormatSourceCleaner.cleanFixedLine
public String cleanFixedLine(final String line) { StringBuilder cleanedLine = new StringBuilder(); int length = line.length(); /* Clear sequence numbering */ for (int i = 0; i < _startColumn - 1; i++) { cleanedLine.append(" "); } /* Trim anything beyond end...
java
public String cleanFixedLine(final String line) { StringBuilder cleanedLine = new StringBuilder(); int length = line.length(); /* Clear sequence numbering */ for (int i = 0; i < _startColumn - 1; i++) { cleanedLine.append(" "); } /* Trim anything beyond end...
[ "public", "String", "cleanFixedLine", "(", "final", "String", "line", ")", "{", "StringBuilder", "cleanedLine", "=", "new", "StringBuilder", "(", ")", ";", "int", "length", "=", "line", ".", "length", "(", ")", ";", "/* Clear sequence numbering */", "for", "("...
Clear sequence numbers in column 1-6 and anything beyond column 72. @param line the line of code @return a line of code without sequence numbers
[ "Clear", "sequence", "numbers", "in", "column", "1", "-", "6", "and", "anything", "beyond", "column", "72", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/CobolFixedFormatSourceCleaner.java#L66-L84
40,459
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArrayCompactor.java
SimpleDataArrayCompactor.freeCompactedSegments
private void freeCompactedSegments() { SegmentManager segManager = _dataArray.getSegmentManager(); if(segManager == null) return; while(!_freeQueue.isEmpty()) { Segment seg = _freeQueue.remove(); try { segManager.freeSegment(seg); } ca...
java
private void freeCompactedSegments() { SegmentManager segManager = _dataArray.getSegmentManager(); if(segManager == null) return; while(!_freeQueue.isEmpty()) { Segment seg = _freeQueue.remove(); try { segManager.freeSegment(seg); } ca...
[ "private", "void", "freeCompactedSegments", "(", ")", "{", "SegmentManager", "segManager", "=", "_dataArray", ".", "getSegmentManager", "(", ")", ";", "if", "(", "segManager", "==", "null", ")", "return", ";", "while", "(", "!", "_freeQueue", ".", "isEmpty", ...
Frees segments that were compacted successfully.
[ "Frees", "segments", "that", "were", "compacted", "successfully", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArrayCompactor.java#L228-L240
40,460
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArrayCompactor.java
SimpleDataArrayCompactor.compact
private boolean compact() throws IOException { try { final boolean sibEnabled = _dataArray.isSibEnabled(); _segTarget = _dataArray.getSegmentManager().nextSegment(); for(Segment seg : _segSourceList) { if(!_enabled) { try { ...
java
private boolean compact() throws IOException { try { final boolean sibEnabled = _dataArray.isSibEnabled(); _segTarget = _dataArray.getSegmentManager().nextSegment(); for(Segment seg : _segSourceList) { if(!_enabled) { try { ...
[ "private", "boolean", "compact", "(", ")", "throws", "IOException", "{", "try", "{", "final", "boolean", "sibEnabled", "=", "_dataArray", ".", "isSibEnabled", "(", ")", ";", "_segTarget", "=", "_dataArray", ".", "getSegmentManager", "(", ")", ".", "nextSegment...
Compacts a number of source fragmented Segments by moving data into a new target Segment. @return <code>true</code> if this operation finished successfully. Otherwise, <code>false</code>. @throws IOException if this operation can not be finished properly.
[ "Compacts", "a", "number", "of", "source", "fragmented", "Segments", "by", "moving", "data", "into", "a", "new", "target", "Segment", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArrayCompactor.java#L325-L370
40,461
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArrayCompactor.java
SimpleDataArrayCompactor.compact
private boolean compact(Segment segment, SegmentIndexBuffer sibSource, Segment segTarget) throws IOException { Segment segSource = segment; int segSourceId = segSource.getSegmentId(); int segTargetId = segTarget.getSegmentId(); Chronos c = new Chronos(); if(!segment.can...
java
private boolean compact(Segment segment, SegmentIndexBuffer sibSource, Segment segTarget) throws IOException { Segment segSource = segment; int segSourceId = segSource.getSegmentId(); int segTargetId = segTarget.getSegmentId(); Chronos c = new Chronos(); if(!segment.can...
[ "private", "boolean", "compact", "(", "Segment", "segment", ",", "SegmentIndexBuffer", "sibSource", ",", "Segment", "segTarget", ")", "throws", "IOException", "{", "Segment", "segSource", "=", "segment", ";", "int", "segSourceId", "=", "segSource", ".", "getSegmen...
Compacts data from the specified source Segment into the specified target Segment. @param segment - the source Segment, from which data is read. @param sibSource - the source Segment Index Buffer, from which address indexes are read. @param segTarget - the target Segment, to which data is written. @return <code>true...
[ "Compacts", "data", "from", "the", "specified", "source", "Segment", "into", "the", "specified", "target", "Segment", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArrayCompactor.java#L462-L527
40,462
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArrayCompactor.java
SimpleDataArrayCompactor.run
@Override public void run() { while(_enabled) { if(_newCycle.compareAndSet(true, false)) { // One and only one compactor is at work. _lock.lock(); try { reset(); _state = State.INIT; ...
java
@Override public void run() { while(_enabled) { if(_newCycle.compareAndSet(true, false)) { // One and only one compactor is at work. _lock.lock(); try { reset(); _state = State.INIT; ...
[ "@", "Override", "public", "void", "run", "(", ")", "{", "while", "(", "_enabled", ")", "{", "if", "(", "_newCycle", ".", "compareAndSet", "(", "true", ",", "false", ")", ")", "{", "// One and only one compactor is at work.", "_lock", ".", "lock", "(", ")"...
Compacting Segments.
[ "Compacting", "Segments", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArrayCompactor.java#L532-L571
40,463
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArrayCompactor.java
SimpleDataArrayCompactor.getByteBuffer
protected ByteBuffer getByteBuffer(int bufferLength) { if(_buffer == null) { _buffer = ByteBuffer.wrap(new byte[bufferLength]); _log.info("ByteBuffer allocated for buffering"); } return _buffer; }
java
protected ByteBuffer getByteBuffer(int bufferLength) { if(_buffer == null) { _buffer = ByteBuffer.wrap(new byte[bufferLength]); _log.info("ByteBuffer allocated for buffering"); } return _buffer; }
[ "protected", "ByteBuffer", "getByteBuffer", "(", "int", "bufferLength", ")", "{", "if", "(", "_buffer", "==", "null", ")", "{", "_buffer", "=", "ByteBuffer", ".", "wrap", "(", "new", "byte", "[", "bufferLength", "]", ")", ";", "_log", ".", "info", "(", ...
Gets the buffer for speeding up compaction. @param bufferLength - the length of buffer.
[ "Gets", "the", "buffer", "for", "speeding", "up", "compaction", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArrayCompactor.java#L685-L692
40,464
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cobol/model/CobolDataItem.java
CobolDataItem.toStringRenames
private void toStringRenames(final StringBuilder sb) { if (getRenamesSubject() != null) { sb.append(','); sb.append("renamesSubject:" + getRenamesSubject()); } if (getRenamesSubjectRange() != null) { sb.append(','); sb.append("renamesSubjectRange:"...
java
private void toStringRenames(final StringBuilder sb) { if (getRenamesSubject() != null) { sb.append(','); sb.append("renamesSubject:" + getRenamesSubject()); } if (getRenamesSubjectRange() != null) { sb.append(','); sb.append("renamesSubjectRange:"...
[ "private", "void", "toStringRenames", "(", "final", "StringBuilder", "sb", ")", "{", "if", "(", "getRenamesSubject", "(", ")", "!=", "null", ")", "{", "sb", ".", "append", "(", "'", "'", ")", ";", "sb", ".", "append", "(", "\"renamesSubject:\"", "+", "...
Pretty printing for a renames entry. @param sb the string builder
[ "Pretty", "printing", "for", "a", "renames", "entry", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cobol/model/CobolDataItem.java#L831-L841
40,465
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cobol/model/CobolDataItem.java
CobolDataItem.toStringCondition
private void toStringCondition(final StringBuilder sb) { if (getConditionLiterals().size() > 0) { toStringList(sb, getConditionLiterals(), "conditionLiterals"); } if (getConditionRanges().size() > 0) { toStringList(sb, getConditionRanges(), "conditionRanges"); } ...
java
private void toStringCondition(final StringBuilder sb) { if (getConditionLiterals().size() > 0) { toStringList(sb, getConditionLiterals(), "conditionLiterals"); } if (getConditionRanges().size() > 0) { toStringList(sb, getConditionRanges(), "conditionRanges"); } ...
[ "private", "void", "toStringCondition", "(", "final", "StringBuilder", "sb", ")", "{", "if", "(", "getConditionLiterals", "(", ")", ".", "size", "(", ")", ">", "0", ")", "{", "toStringList", "(", "sb", ",", "getConditionLiterals", "(", ")", ",", "\"conditi...
Pretty printing for a condition entry. @param sb the string builder
[ "Pretty", "printing", "for", "a", "condition", "entry", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cobol/model/CobolDataItem.java#L848-L856
40,466
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cobol/model/CobolDataItem.java
CobolDataItem.toStringList
private void toStringList(final StringBuilder sb, final List < ? > list, final String title) { sb.append(','); sb.append(title + ":["); boolean first = true; for (Object child : list) { if (!first) { sb.append(","); } else { ...
java
private void toStringList(final StringBuilder sb, final List < ? > list, final String title) { sb.append(','); sb.append(title + ":["); boolean first = true; for (Object child : list) { if (!first) { sb.append(","); } else { ...
[ "private", "void", "toStringList", "(", "final", "StringBuilder", "sb", ",", "final", "List", "<", "?", ">", "list", ",", "final", "String", "title", ")", "{", "sb", ".", "append", "(", "'", "'", ")", ";", "sb", ".", "append", "(", "title", "+", "\...
Adds list elements to a string builder. @param sb the string builder @param list list of elements @param title name of elements list
[ "Adds", "list", "elements", "to", "a", "string", "builder", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cobol/model/CobolDataItem.java#L865-L879
40,467
jingwei/krati
krati-main/src/main/java/krati/core/array/entry/EntryValueIntFactory.java
EntryValueIntFactory.reinitValue
@Override public void reinitValue(DataReader in, EntryValueInt value) throws IOException { value.reinit(in.readInt(), /* array position */ in.readInt(), /* data value */ in.readLong() /* SCN value */); }
java
@Override public void reinitValue(DataReader in, EntryValueInt value) throws IOException { value.reinit(in.readInt(), /* array position */ in.readInt(), /* data value */ in.readLong() /* SCN value */); }
[ "@", "Override", "public", "void", "reinitValue", "(", "DataReader", "in", ",", "EntryValueInt", "value", ")", "throws", "IOException", "{", "value", ".", "reinit", "(", "in", ".", "readInt", "(", ")", ",", "/* array position */", "in", ".", "readInt", "(", ...
Read data from stream to populate an EntryValueInt. @param in data reader for EntryValueInt. @param value an EntryValueInt to populate. @throws IOException
[ "Read", "data", "from", "stream", "to", "populate", "an", "EntryValueInt", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/entry/EntryValueIntFactory.java#L68-L73
40,468
oehf/ipf-oht-atna
context/src/main/java/org/openhealthtools/ihe/atna/context/SecurityContextInitializer.java
SecurityContextInitializer.initializeDefaultModules
private static void initializeDefaultModules(SecurityContext context) { if (context.isInitialized()) { return; } if (LOGGER.isDebugEnabled()) { LOGGER.debug("SecurityContext default module initializer starting"); } String moduleName; // Loop through the module names for (int i=0; i<DEFAULT...
java
private static void initializeDefaultModules(SecurityContext context) { if (context.isInitialized()) { return; } if (LOGGER.isDebugEnabled()) { LOGGER.debug("SecurityContext default module initializer starting"); } String moduleName; // Loop through the module names for (int i=0; i<DEFAULT...
[ "private", "static", "void", "initializeDefaultModules", "(", "SecurityContext", "context", ")", "{", "if", "(", "context", ".", "isInitialized", "(", ")", ")", "{", "return", ";", "}", "if", "(", "LOGGER", ".", "isDebugEnabled", "(", ")", ")", "{", "LOGGE...
Initialize and register the contexts for modules that, by default, are initialized with the security context @param context The Security Context to perform initialzation routines
[ "Initialize", "and", "register", "the", "contexts", "for", "modules", "that", "by", "default", "are", "initialized", "with", "the", "security", "context" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/context/src/main/java/org/openhealthtools/ihe/atna/context/SecurityContextInitializer.java#L78-L136
40,469
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/GenericAuditEventMessageImpl.java
GenericAuditEventMessageImpl.setAuditSourceId
public void setAuditSourceId(String sourceId, String enterpriseSiteId) { setAuditSourceId(sourceId, enterpriseSiteId, (RFC3881AuditSourceTypes[])null); }
java
public void setAuditSourceId(String sourceId, String enterpriseSiteId) { setAuditSourceId(sourceId, enterpriseSiteId, (RFC3881AuditSourceTypes[])null); }
[ "public", "void", "setAuditSourceId", "(", "String", "sourceId", ",", "String", "enterpriseSiteId", ")", "{", "setAuditSourceId", "(", "sourceId", ",", "enterpriseSiteId", ",", "(", "RFC3881AuditSourceTypes", "[", "]", ")", "null", ")", ";", "}" ]
Sets a Audit Source Identification block for a given Audit Source ID and Audit Source Enterprise Site ID @param sourceId The Audit Source ID to use @param enterpriseSiteId The Audit Enterprise Site ID to use
[ "Sets", "a", "Audit", "Source", "Identification", "block", "for", "a", "given", "Audit", "Source", "ID", "and", "Audit", "Source", "Enterprise", "Site", "ID" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/GenericAuditEventMessageImpl.java#L77-L80
40,470
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/GenericAuditEventMessageImpl.java
GenericAuditEventMessageImpl.setAuditSourceId
public void setAuditSourceId(String sourceId, String enterpriseSiteId, RFC3881AuditSourceTypes[] typeCodes) { addAuditSourceIdentification(sourceId, enterpriseSiteId, typeCodes); }
java
public void setAuditSourceId(String sourceId, String enterpriseSiteId, RFC3881AuditSourceTypes[] typeCodes) { addAuditSourceIdentification(sourceId, enterpriseSiteId, typeCodes); }
[ "public", "void", "setAuditSourceId", "(", "String", "sourceId", ",", "String", "enterpriseSiteId", ",", "RFC3881AuditSourceTypes", "[", "]", "typeCodes", ")", "{", "addAuditSourceIdentification", "(", "sourceId", ",", "enterpriseSiteId", ",", "typeCodes", ")", ";", ...
Sets a Audit Source Identification block for a given Audit Source ID, Audit Source Enterprise Site ID, and a list of audit source type codes @param sourceId The Audit Source ID to use @param enterpriseSiteId The Audit Enterprise Site ID to use @param typeCodes The RFC 3881 Audit Source Type codes to use
[ "Sets", "a", "Audit", "Source", "Identification", "block", "for", "a", "given", "Audit", "Source", "ID", "Audit", "Source", "Enterprise", "Site", "ID", "and", "a", "list", "of", "audit", "source", "type", "codes" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/GenericAuditEventMessageImpl.java#L103-L106
40,471
jingwei/krati
krati-main/src/retention/java/krati/retention/policy/RetentionPolicyOnTime.java
RetentionPolicyOnTime.setRetention
public void setRetention(long duration, TimeUnit timeUnit) { this._duration = Math.max(1, duration); this._timeUnit = timeUnit; long millis = TimeUnit.MILLISECONDS == timeUnit ? _duration : TimeUnit.MILLISECONDS.convert(_duration, timeUnit); _timeMillis = Math.ma...
java
public void setRetention(long duration, TimeUnit timeUnit) { this._duration = Math.max(1, duration); this._timeUnit = timeUnit; long millis = TimeUnit.MILLISECONDS == timeUnit ? _duration : TimeUnit.MILLISECONDS.convert(_duration, timeUnit); _timeMillis = Math.ma...
[ "public", "void", "setRetention", "(", "long", "duration", ",", "TimeUnit", "timeUnit", ")", "{", "this", ".", "_duration", "=", "Math", ".", "max", "(", "1", ",", "duration", ")", ";", "this", ".", "_timeUnit", "=", "timeUnit", ";", "long", "millis", ...
Sets the retention duration period of this policy. @param duration - the retention duration @param timeUnit - the time unit as defined by {@link TimeUnit}
[ "Sets", "the", "retention", "duration", "period", "of", "this", "policy", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/retention/java/krati/retention/policy/RetentionPolicyOnTime.java#L97-L104
40,472
apptik/jus
jus-java/src/main/java/io/apptik/comm/jus/toolbox/PoolingByteArrayOutputStream.java
PoolingByteArrayOutputStream.expand
private void expand(int i) { /* Can the buffer handle @i more bytes, if not expand it */ if (count + i <= buf.length) { return; } byte[] newbuf = mPool.getBuf((count + i) * 2); System.arraycopy(buf, 0, newbuf, 0, count); mPool.returnBuf(buf); buf = new...
java
private void expand(int i) { /* Can the buffer handle @i more bytes, if not expand it */ if (count + i <= buf.length) { return; } byte[] newbuf = mPool.getBuf((count + i) * 2); System.arraycopy(buf, 0, newbuf, 0, count); mPool.returnBuf(buf); buf = new...
[ "private", "void", "expand", "(", "int", "i", ")", "{", "/* Can the buffer handle @i more bytes, if not expand it */", "if", "(", "count", "+", "i", "<=", "buf", ".", "length", ")", "{", "return", ";", "}", "byte", "[", "]", "newbuf", "=", "mPool", ".", "g...
Ensures there is enough space in the buffer for the given number of additional bytes.
[ "Ensures", "there", "is", "enough", "space", "in", "the", "buffer", "for", "the", "given", "number", "of", "additional", "bytes", "." ]
8a37a21b41f897d68eaeaab07368ec22a1e5a60e
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/toolbox/PoolingByteArrayOutputStream.java#L72-L81
40,473
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdIO.java
Cob2XsdIO.checkCobolSourceFile
protected void checkCobolSourceFile(final File cobolSourceFile) throws IOException { if (cobolSourceFile == null) { throw new IOException("You must provide a COBOL source file"); } if (!cobolSourceFile.exists()) { throw new IOException("COBOL source file " + ...
java
protected void checkCobolSourceFile(final File cobolSourceFile) throws IOException { if (cobolSourceFile == null) { throw new IOException("You must provide a COBOL source file"); } if (!cobolSourceFile.exists()) { throw new IOException("COBOL source file " + ...
[ "protected", "void", "checkCobolSourceFile", "(", "final", "File", "cobolSourceFile", ")", "throws", "IOException", "{", "if", "(", "cobolSourceFile", "==", "null", ")", "{", "throw", "new", "IOException", "(", "\"You must provide a COBOL source file\"", ")", ";", "...
make sure the COBOL file is valid. @param cobolSourceFile the COBOL source file @throws IOException if file cannot be located
[ "make", "sure", "the", "COBOL", "file", "is", "valid", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdIO.java#L92-L101
40,474
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdIO.java
Cob2XsdIO.checkTarget
protected void checkTarget(final File target) throws IOException { if (target == null) { throw new IOException("You must provide a target directory or file"); } if (!target.exists()) { String extension = FilenameUtils.getExtension(target.getName()); if (extens...
java
protected void checkTarget(final File target) throws IOException { if (target == null) { throw new IOException("You must provide a target directory or file"); } if (!target.exists()) { String extension = FilenameUtils.getExtension(target.getName()); if (extens...
[ "protected", "void", "checkTarget", "(", "final", "File", "target", ")", "throws", "IOException", "{", "if", "(", "target", "==", "null", ")", "{", "throw", "new", "IOException", "(", "\"You must provide a target directory or file\"", ")", ";", "}", "if", "(", ...
make sure the target, folder or file, is valid. We consider that target files will have extensions. Its ok for a target file not to exist but target folders must exist. @param target the target folder or file @throws IOException if file cannot be located
[ "make", "sure", "the", "target", "folder", "or", "file", "is", "valid", ".", "We", "consider", "that", "target", "files", "will", "have", "extensions", ".", "Its", "ok", "for", "a", "target", "file", "not", "to", "exist", "but", "target", "folders", "mus...
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdIO.java#L111-L121
40,475
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdIO.java
Cob2XsdIO.getUniqueTargetNamespace
protected String getUniqueTargetNamespace(String targetNamespacePrefix, final String baseName) throws IOException { if (targetNamespacePrefix == null || targetNamespacePrefix.length() == 0) { return null; } if (baseName == null || baseName.length() == 0)...
java
protected String getUniqueTargetNamespace(String targetNamespacePrefix, final String baseName) throws IOException { if (targetNamespacePrefix == null || targetNamespacePrefix.length() == 0) { return null; } if (baseName == null || baseName.length() == 0)...
[ "protected", "String", "getUniqueTargetNamespace", "(", "String", "targetNamespacePrefix", ",", "final", "String", "baseName", ")", "throws", "IOException", "{", "if", "(", "targetNamespacePrefix", "==", "null", "||", "targetNamespacePrefix", ".", "length", "(", ")", ...
TargetNamespace, if it is not null, is completed with the baseName. @param targetNamespacePrefix the target namespace prefix @param baseName A name, derived from the COBOL file name, that can be used to identify generated artifacts @return the targetNamespace for the xml schema @throws IOException if unable to create ...
[ "TargetNamespace", "if", "it", "is", "not", "null", "is", "completed", "with", "the", "baseName", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/Cob2XsdIO.java#L132-L149
40,476
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/PIXAuditor.java
PIXAuditor.auditQueryEvent
protected void auditQueryEvent(boolean systemIsSource, IHETransactionEventTypeCodes transaction, RFC3881EventOutcomeCodes eventOutcome, String sourceFacility, String sourceApp, String sourceAltUserId, String sourceNetworkId, String destinationFacility, String destinationApp, String destinationAltUserId, Strin...
java
protected void auditQueryEvent(boolean systemIsSource, IHETransactionEventTypeCodes transaction, RFC3881EventOutcomeCodes eventOutcome, String sourceFacility, String sourceApp, String sourceAltUserId, String sourceNetworkId, String destinationFacility, String destinationApp, String destinationAltUserId, Strin...
[ "protected", "void", "auditQueryEvent", "(", "boolean", "systemIsSource", ",", "IHETransactionEventTypeCodes", "transaction", ",", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "sourceFacility", ",", "String", "sourceApp", ",", "String", "sourceAltUserId", ",",...
Audit a QUERY event for PIX and PDQ transactions. Useful for PIX Query, PDQ Query, and PDVQ Query in the PIX Manager as well as the PIX and PDQ Consumer @param systemIsSource Whether the system sending the message is the source active participant @param transaction IHE Transaction sending the message @param eventOutc...
[ "Audit", "a", "QUERY", "event", "for", "PIX", "and", "PDQ", "transactions", ".", "Useful", "for", "PIX", "Query", "PDQ", "Query", "and", "PDVQ", "Query", "in", "the", "PIX", "Manager", "as", "well", "as", "the", "PIX", "and", "PDQ", "Consumer" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/PIXAuditor.java#L55-L95
40,477
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/context/AuditorModuleContext.java
AuditorModuleContext.getContext
public static AuditorModuleContext getContext() { SecurityContext securityContext = SecurityContextFactory.getSecurityContext(); if (!securityContext.isInitialized()) { securityContext.initialize(); } AbstractModuleContext moduleContext = securityContext.getModuleContext(CONTEXT_ID); if (null == module...
java
public static AuditorModuleContext getContext() { SecurityContext securityContext = SecurityContextFactory.getSecurityContext(); if (!securityContext.isInitialized()) { securityContext.initialize(); } AbstractModuleContext moduleContext = securityContext.getModuleContext(CONTEXT_ID); if (null == module...
[ "public", "static", "AuditorModuleContext", "getContext", "(", ")", "{", "SecurityContext", "securityContext", "=", "SecurityContextFactory", ".", "getSecurityContext", "(", ")", ";", "if", "(", "!", "securityContext", ".", "isInitialized", "(", ")", ")", "{", "se...
Returns the current singleton instance of the Auditor Module Context from the ThreadLocal cache. If the ThreadLocal cache has not been initialized or does not contain this context, then create and initialize module context, register in the ThreadLocal and return the new instance. @return Context singleton
[ "Returns", "the", "current", "singleton", "instance", "of", "the", "Auditor", "Module", "Context", "from", "the", "ThreadLocal", "cache", ".", "If", "the", "ThreadLocal", "cache", "has", "not", "been", "initialized", "or", "does", "not", "contain", "this", "co...
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/context/AuditorModuleContext.java#L79-L93
40,478
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/context/AuditorModuleContext.java
AuditorModuleContext.getSender
public AuditMessageSender getSender() { if (customSender == null){ String transport = AuditorModuleContext.getContext().getConfig().getAuditRepositoryTransport(); if (transport.equalsIgnoreCase("TLS") ) { return new TLSSyslogSenderImpl(); } else if (transport.equalsIgnoreCase("UDP") ){ return new...
java
public AuditMessageSender getSender() { if (customSender == null){ String transport = AuditorModuleContext.getContext().getConfig().getAuditRepositoryTransport(); if (transport.equalsIgnoreCase("TLS") ) { return new TLSSyslogSenderImpl(); } else if (transport.equalsIgnoreCase("UDP") ){ return new...
[ "public", "AuditMessageSender", "getSender", "(", ")", "{", "if", "(", "customSender", "==", "null", ")", "{", "String", "transport", "=", "AuditorModuleContext", ".", "getContext", "(", ")", ".", "getConfig", "(", ")", ".", "getAuditRepositoryTransport", "(", ...
Gets the transport-specific sending instance used to deliver audit messages to their destination @return Audit message sender
[ "Gets", "the", "transport", "-", "specific", "sending", "instance", "used", "to", "deliver", "audit", "messages", "to", "their", "destination" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/context/AuditorModuleContext.java#L137-L150
40,479
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/context/AuditorModuleContext.java
AuditorModuleContext.getAuditor
public IHEAuditor getAuditor(String className, boolean useContextAuditorRegistry) { return getAuditor(AuditorFactory.getAuditorClassForClassName(className),useContextAuditorRegistry); }
java
public IHEAuditor getAuditor(String className, boolean useContextAuditorRegistry) { return getAuditor(AuditorFactory.getAuditorClassForClassName(className),useContextAuditorRegistry); }
[ "public", "IHEAuditor", "getAuditor", "(", "String", "className", ",", "boolean", "useContextAuditorRegistry", ")", "{", "return", "getAuditor", "(", "AuditorFactory", ".", "getAuditorClassForClassName", "(", "className", ")", ",", "useContextAuditorRegistry", ")", ";",...
Get an IHE Auditor instance from a fully-qualified class name @param className Auditor class to use @param useContextAuditorRegistry Whether to reuse cached auditors from context @return Auditor instance
[ "Get", "an", "IHE", "Auditor", "instance", "from", "a", "fully", "-", "qualified", "class", "name" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/context/AuditorModuleContext.java#L287-L290
40,480
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRegistryAuditor.java
XDSRegistryAuditor.getAuditor
public static XDSRegistryAuditor getAuditor() { AuditorModuleContext ctx = AuditorModuleContext.getContext(); return (XDSRegistryAuditor)ctx.getAuditor(XDSRegistryAuditor.class); }
java
public static XDSRegistryAuditor getAuditor() { AuditorModuleContext ctx = AuditorModuleContext.getContext(); return (XDSRegistryAuditor)ctx.getAuditor(XDSRegistryAuditor.class); }
[ "public", "static", "XDSRegistryAuditor", "getAuditor", "(", ")", "{", "AuditorModuleContext", "ctx", "=", "AuditorModuleContext", ".", "getContext", "(", ")", ";", "return", "(", "XDSRegistryAuditor", ")", "ctx", ".", "getAuditor", "(", "XDSRegistryAuditor", ".", ...
Get an instance of the XDS Document Registry Auditor from the global context @return XDS Document Registry Auditor instance
[ "Get", "an", "instance", "of", "the", "XDS", "Document", "Registry", "Auditor", "from", "the", "global", "context" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRegistryAuditor.java#L45-L49
40,481
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRegistryAuditor.java
XDSRegistryAuditor.auditRegistryQueryEvent
public void auditRegistryQueryEvent( RFC3881EventOutcomeCodes eventOutcome, String consumerUserId, String consumerUserName, String consumerIpAddress, String registryEndpointUri, String adhocQueryRequestPayload, String patientId) { if (!isAuditorEnabled()) { return; } auditQueryEvent(false, ...
java
public void auditRegistryQueryEvent( RFC3881EventOutcomeCodes eventOutcome, String consumerUserId, String consumerUserName, String consumerIpAddress, String registryEndpointUri, String adhocQueryRequestPayload, String patientId) { if (!isAuditorEnabled()) { return; } auditQueryEvent(false, ...
[ "public", "void", "auditRegistryQueryEvent", "(", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "consumerUserId", ",", "String", "consumerUserName", ",", "String", "consumerIpAddress", ",", "String", "registryEndpointUri", ",", "String", "adhocQueryRequestPayload...
Audits an ITI-16 Registry SQL Query event for XDS.a Document Registry actors. @param eventOutcome The event outcome indicator @param consumerUserId The Active Participant UserID for the consumer (if using WS-Addressing) @param consumerUserName The Active Participant UserName for the consumer (if using WS-Security / XU...
[ "Audits", "an", "ITI", "-", "16", "Registry", "SQL", "Query", "event", "for", "XDS", ".", "a", "Document", "Registry", "actors", "." ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRegistryAuditor.java#L89-L107
40,482
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRegistryAuditor.java
XDSRegistryAuditor.auditRegistryStoredQueryEvent
public void auditRegistryStoredQueryEvent( RFC3881EventOutcomeCodes eventOutcome, String consumerUserId, String consumerUserName, String consumerIpAddress, String registryEndpointUri, String storedQueryUUID, String adhocQueryRequestPayload, String homeCommunityId, String patientId, List<CodedValueType> ...
java
public void auditRegistryStoredQueryEvent( RFC3881EventOutcomeCodes eventOutcome, String consumerUserId, String consumerUserName, String consumerIpAddress, String registryEndpointUri, String storedQueryUUID, String adhocQueryRequestPayload, String homeCommunityId, String patientId, List<CodedValueType> ...
[ "public", "void", "auditRegistryStoredQueryEvent", "(", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "consumerUserId", ",", "String", "consumerUserName", ",", "String", "consumerIpAddress", ",", "String", "registryEndpointUri", ",", "String", "storedQueryUUID", ...
Audits an ITI-18 Registry Stored Query event for XDS.a and XDS.b Document Registry actors. @param eventOutcome The event outcome indicator @param consumerUserId The Active Participant UserID for the consumer (if using WS-Addressing) @param consumerUserName The Active Participant UserName for the consumer (if using WS-...
[ "Audits", "an", "ITI", "-", "18", "Registry", "Stored", "Query", "event", "for", "XDS", ".", "a", "and", "XDS", ".", "b", "Document", "Registry", "actors", "." ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRegistryAuditor.java#L124-L142
40,483
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRegistryAuditor.java
XDSRegistryAuditor.auditRegisterEvent
protected void auditRegisterEvent( IHETransactionEventTypeCodes transaction, RFC3881EventOutcomeCodes eventOutcome, String repositoryUserId, String repositoryIpAddress, String userName, String registryEndpointUri, String submissionSetUniqueId, String patientId, List<CodedValueTy...
java
protected void auditRegisterEvent( IHETransactionEventTypeCodes transaction, RFC3881EventOutcomeCodes eventOutcome, String repositoryUserId, String repositoryIpAddress, String userName, String registryEndpointUri, String submissionSetUniqueId, String patientId, List<CodedValueTy...
[ "protected", "void", "auditRegisterEvent", "(", "IHETransactionEventTypeCodes", "transaction", ",", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "repositoryUserId", ",", "String", "repositoryIpAddress", ",", "String", "userName", ",", "String", "registryEndpoint...
Generically sends audit messages for XDS Document Registry Register Document Set events @param transaction The specific IHE Transaction (ITI-15 or ITI-41) @param eventOutcome The event outcome indicator @param repositoryUserId The Active Participant UserID for the repository (if using WS-Addressing) @param repositoryI...
[ "Generically", "sends", "audit", "messages", "for", "XDS", "Document", "Registry", "Register", "Document", "Set", "events" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRegistryAuditor.java#L215-L238
40,484
oehf/ipf-oht-atna
nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/SecurityDomain.java
SecurityDomain.fixKeyManagers
private void fixKeyManagers() { // If the key manager factory is null, do not continue if (null == keyManagerFactory || null == keyManagerFactory.getKeyManagers()) { return; } KeyManager[] defaultKeyManagers = keyManagerFactory.getKeyManagers(); KeyManager[] newKeyMan...
java
private void fixKeyManagers() { // If the key manager factory is null, do not continue if (null == keyManagerFactory || null == keyManagerFactory.getKeyManagers()) { return; } KeyManager[] defaultKeyManagers = keyManagerFactory.getKeyManagers(); KeyManager[] newKeyMan...
[ "private", "void", "fixKeyManagers", "(", ")", "{", "// If the key manager factory is null, do not continue", "if", "(", "null", "==", "keyManagerFactory", "||", "null", "==", "keyManagerFactory", ".", "getKeyManagers", "(", ")", ")", "{", "return", ";", "}", "KeyMa...
If a keystore alias is defined, then override the key manager assigned to with an alias-sensitive wrapper that selects the proper key from your assigned key alias.
[ "If", "a", "keystore", "alias", "is", "defined", "then", "override", "the", "key", "manager", "assigned", "to", "with", "an", "alias", "-", "sensitive", "wrapper", "that", "selects", "the", "proper", "key", "from", "your", "assigned", "key", "alias", "." ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/SecurityDomain.java#L438-L458
40,485
rpatil26/webutilities
src/main/java/com/googlecode/webutilities/filters/ResponseCacheFilter.java
ResponseCacheFilter.init
@Override public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); int reloadTime = readInt(filterConfig.getInitParameter(INIT_PARAM_RELOAD_TIME), 0); this.resetTime = readInt(filterConfig.getInitParameter(INIT_PARAM_RESET_TIME), resetTime); t...
java
@Override public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); int reloadTime = readInt(filterConfig.getInitParameter(INIT_PARAM_RELOAD_TIME), 0); this.resetTime = readInt(filterConfig.getInitParameter(INIT_PARAM_RESET_TIME), resetTime); t...
[ "@", "Override", "public", "void", "init", "(", "FilterConfig", "filterConfig", ")", "throws", "ServletException", "{", "super", ".", "init", "(", "filterConfig", ")", ";", "int", "reloadTime", "=", "readInt", "(", "filterConfig", ".", "getInitParameter", "(", ...
eg. "queryString, header=X-Requested-By, parameter=username". URI is always part of key
[ "eg", ".", "queryString", "header", "=", "X", "-", "Requested", "-", "By", "parameter", "=", "username", ".", "URI", "is", "always", "part", "of", "key" ]
fdd04f59923cd0f2d80540b861aa0268da99f5c7
https://github.com/rpatil26/webutilities/blob/fdd04f59923cd0f2d80540b861aa0268da99f5c7/src/main/java/com/googlecode/webutilities/filters/ResponseCacheFilter.java#L114-L157
40,486
rpatil26/webutilities
src/main/java/com/googlecode/webutilities/filters/ResponseCacheFilter.java
ResponseCacheFilter.generateCacheKeyForTheRequest
protected String generateCacheKeyForTheRequest(HttpServletRequest request) { StringBuilder cacheKey = new StringBuilder(); cacheKey.append(request.getRequestURI()); String[] keyAttributes = this.cacheKeyFormat.split(","); for (String attr : keyAttributes) { String keyAttr = a...
java
protected String generateCacheKeyForTheRequest(HttpServletRequest request) { StringBuilder cacheKey = new StringBuilder(); cacheKey.append(request.getRequestURI()); String[] keyAttributes = this.cacheKeyFormat.split(","); for (String attr : keyAttributes) { String keyAttr = a...
[ "protected", "String", "generateCacheKeyForTheRequest", "(", "HttpServletRequest", "request", ")", "{", "StringBuilder", "cacheKey", "=", "new", "StringBuilder", "(", ")", ";", "cacheKey", ".", "append", "(", "request", ".", "getRequestURI", "(", ")", ")", ";", ...
Generate the cache key for the specific request by using the cacheKeyFormat init param You can specify comma separated list of attributes that you want to use to build the cache key. URI is by default part of the cache key. Using cacheKeyFormat params you can optionally include following details. - queryString - specif...
[ "Generate", "the", "cache", "key", "for", "the", "specific", "request", "by", "using", "the", "cacheKeyFormat", "init", "param", "You", "can", "specify", "comma", "separated", "list", "of", "attributes", "that", "you", "want", "to", "use", "to", "build", "th...
fdd04f59923cd0f2d80540b861aa0268da99f5c7
https://github.com/rpatil26/webutilities/blob/fdd04f59923cd0f2d80540b861aa0268da99f5c7/src/main/java/com/googlecode/webutilities/filters/ResponseCacheFilter.java#L302-L317
40,487
jingwei/krati
krati-main/src/main/java/krati/core/array/basic/AbstractRecoverableArray.java
AbstractRecoverableArray.init
protected void init() throws IOException { try { long lwmScn = _arrayFile.getLwmScn(); long hwmScn = _arrayFile.getHwmScn(); if (hwmScn < lwmScn) { throw new IOException(_arrayFile.getAbsolutePath() + " is corrupted: lwmScn=" + lwmScn + " hwmScn=" + hwmScn); ...
java
protected void init() throws IOException { try { long lwmScn = _arrayFile.getLwmScn(); long hwmScn = _arrayFile.getHwmScn(); if (hwmScn < lwmScn) { throw new IOException(_arrayFile.getAbsolutePath() + " is corrupted: lwmScn=" + lwmScn + " hwmScn=" + hwmScn); ...
[ "protected", "void", "init", "(", ")", "throws", "IOException", "{", "try", "{", "long", "lwmScn", "=", "_arrayFile", ".", "getLwmScn", "(", ")", ";", "long", "hwmScn", "=", "_arrayFile", ".", "getHwmScn", "(", ")", ";", "if", "(", "hwmScn", "<", "lwmS...
Loads data from the array file.
[ "Loads", "data", "from", "the", "array", "file", "." ]
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/basic/AbstractRecoverableArray.java#L105-L123
40,488
oehf/ipf-oht-atna
nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/utils/AliasSensitiveX509KeyManager.java
AliasSensitiveX509KeyManager.chooseClientAliasForKey
private String chooseClientAliasForKey(String preferredAlias, String keyType, Principal[] issuers, Socket socket) { String[] aliases = getClientAliases(keyType, issuers); if (aliases != null && aliases.length > 0) { for (int i=0; i<aliases.length;i++) { if (preferredAlias.equals(aliases[i])) { return ...
java
private String chooseClientAliasForKey(String preferredAlias, String keyType, Principal[] issuers, Socket socket) { String[] aliases = getClientAliases(keyType, issuers); if (aliases != null && aliases.length > 0) { for (int i=0; i<aliases.length;i++) { if (preferredAlias.equals(aliases[i])) { return ...
[ "private", "String", "chooseClientAliasForKey", "(", "String", "preferredAlias", ",", "String", "keyType", ",", "Principal", "[", "]", "issuers", ",", "Socket", "socket", ")", "{", "String", "[", "]", "aliases", "=", "getClientAliases", "(", "keyType", ",", "i...
Attempts to find a keystore @param keyType @param issuers @param socket @return
[ "Attempts", "to", "find", "a", "keystore" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/utils/AliasSensitiveX509KeyManager.java#L142-L154
40,489
rpatil26/webutilities
src/main/java/com/googlecode/webutilities/util/Utils.java
Utils.simpleHashOf
private static String simpleHashOf(String resourceRealPath) { if (resourceRealPath == null) return null; File resource = new File(resourceRealPath); if (!resource.exists()) return null; long lastModified = resource.lastModified(); long size = resource.length(); return Str...
java
private static String simpleHashOf(String resourceRealPath) { if (resourceRealPath == null) return null; File resource = new File(resourceRealPath); if (!resource.exists()) return null; long lastModified = resource.lastModified(); long size = resource.length(); return Str...
[ "private", "static", "String", "simpleHashOf", "(", "String", "resourceRealPath", ")", "{", "if", "(", "resourceRealPath", "==", "null", ")", "return", "null", ";", "File", "resource", "=", "new", "File", "(", "resourceRealPath", ")", ";", "if", "(", "!", ...
Calculates simple hash using file size and last modified time. @param resourceRealPath - file path, whose has to be calculated @return - hash string as lastmodified#size
[ "Calculates", "simple", "hash", "using", "file", "size", "and", "last", "modified", "time", "." ]
fdd04f59923cd0f2d80540b861aa0268da99f5c7
https://github.com/rpatil26/webutilities/blob/fdd04f59923cd0f2d80540b861aa0268da99f5c7/src/main/java/com/googlecode/webutilities/util/Utils.java#L190-L197
40,490
rpatil26/webutilities
src/main/java/com/googlecode/webutilities/util/Utils.java
Utils.getParentPath
public static String getParentPath(String path) { if (path == null) return null; path = path.trim(); if (path.endsWith(PATH_ROOT) && path.length() > 1) { path = path.substring(0, path.length() - 1); } int lastIndex = path.lastIndexOf(PATH_ROOT); if (path.lengt...
java
public static String getParentPath(String path) { if (path == null) return null; path = path.trim(); if (path.endsWith(PATH_ROOT) && path.length() > 1) { path = path.substring(0, path.length() - 1); } int lastIndex = path.lastIndexOf(PATH_ROOT); if (path.lengt...
[ "public", "static", "String", "getParentPath", "(", "String", "path", ")", "{", "if", "(", "path", "==", "null", ")", "return", "null", ";", "path", "=", "path", ".", "trim", "(", ")", ";", "if", "(", "path", ".", "endsWith", "(", "PATH_ROOT", ")", ...
Fast get parent directory using substring @param path path whose parent path has to be returned @return parent path of the argument
[ "Fast", "get", "parent", "directory", "using", "substring" ]
fdd04f59923cd0f2d80540b861aa0268da99f5c7
https://github.com/rpatil26/webutilities/blob/fdd04f59923cd0f2d80540b861aa0268da99f5c7/src/main/java/com/googlecode/webutilities/util/Utils.java#L503-L514
40,491
oehf/ipf-oht-atna
nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/handlers/AbstractSecureSocketHandler.java
AbstractSecureSocketHandler.createSocket
protected Socket createSocket(String host, int port) throws SocketException, UnknownHostException { Socket socket = null; int retries = 0; // Loop to get a connection or until we've exhausted number of retries Throwable cause = null; while (retries < CONTEXT.getConfig().getS...
java
protected Socket createSocket(String host, int port) throws SocketException, UnknownHostException { Socket socket = null; int retries = 0; // Loop to get a connection or until we've exhausted number of retries Throwable cause = null; while (retries < CONTEXT.getConfig().getS...
[ "protected", "Socket", "createSocket", "(", "String", "host", ",", "int", "port", ")", "throws", "SocketException", ",", "UnknownHostException", "{", "Socket", "socket", "=", "null", ";", "int", "retries", "=", "0", ";", "// Loop to get a connection or until we've e...
Create non-secure socket for a given URI. @param host host to connect to @param port port to connect to @return socket @throws SocketException @throws UnknownHostException @throws Exception
[ "Create", "non", "-", "secure", "socket", "for", "a", "given", "URI", "." ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/handlers/AbstractSecureSocketHandler.java#L160-L214
40,492
oehf/ipf-oht-atna
nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/handlers/AbstractSecureSocketHandler.java
AbstractSecureSocketHandler.createSocketFromFactory
protected Socket createSocketFromFactory(SocketFactory factory, String host, int port) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Connecting to " + host +" on port " + port + " (timeout: " + CONTEXT.getConfig().getConnectTimeout() + " ms) using factory "+ factory.getClass(...
java
protected Socket createSocketFromFactory(SocketFactory factory, String host, int port) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Connecting to " + host +" on port " + port + " (timeout: " + CONTEXT.getConfig().getConnectTimeout() + " ms) using factory "+ factory.getClass(...
[ "protected", "Socket", "createSocketFromFactory", "(", "SocketFactory", "factory", ",", "String", "host", ",", "int", "port", ")", "throws", "IOException", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"C...
Creates a new connected socket to a given host and port from a provided Socket Factory. @param factory Java Socket Factory to use in the connection @param host Hostname to connect to @param port Port to connect to @return Connected socket instance from the given factory @throws IOException
[ "Creates", "a", "new", "connected", "socket", "to", "a", "given", "host", "and", "port", "from", "a", "provided", "Socket", "Factory", "." ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/handlers/AbstractSecureSocketHandler.java#L224-L238
40,493
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/AbstractCobolSourceCleaner.java
AbstractCobolSourceCleaner.isLineOfCode
public boolean isLineOfCode(final String line) { if (line.length() < getIndicatorAreaPos() + 1) { return false; } /* Remove white space lines */ if (line.trim().length() == 0) { return false; } /* Remove comments and special lines */ if (...
java
public boolean isLineOfCode(final String line) { if (line.length() < getIndicatorAreaPos() + 1) { return false; } /* Remove white space lines */ if (line.trim().length() == 0) { return false; } /* Remove comments and special lines */ if (...
[ "public", "boolean", "isLineOfCode", "(", "final", "String", "line", ")", "{", "if", "(", "line", ".", "length", "(", ")", "<", "getIndicatorAreaPos", "(", ")", "+", "1", ")", "{", "return", "false", ";", "}", "/* Remove white space lines */", "if", "(", ...
Make sure this is a line worth parsing. Ignore empty lines, comments and compiler directives. @param line the line to parse @return true if this is not an empty or comment line
[ "Make", "sure", "this", "is", "a", "line", "worth", "parsing", ".", "Ignore", "empty", "lines", "comments", "and", "compiler", "directives", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/AbstractCobolSourceCleaner.java#L130-L157
40,494
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/AbstractCobolSourceCleaner.java
AbstractCobolSourceCleaner.cleanLine
public String cleanLine(final String line) { String cleanedLine = extendedCleanLine(line); /* Right trim, no need to over burden the lexer with spaces */ cleanedLine = ("a" + cleanedLine).trim().substring(1); return cleanedLine; }
java
public String cleanLine(final String line) { String cleanedLine = extendedCleanLine(line); /* Right trim, no need to over burden the lexer with spaces */ cleanedLine = ("a" + cleanedLine).trim().substring(1); return cleanedLine; }
[ "public", "String", "cleanLine", "(", "final", "String", "line", ")", "{", "String", "cleanedLine", "=", "extendedCleanLine", "(", "line", ")", ";", "/* Right trim, no need to over burden the lexer with spaces */", "cleanedLine", "=", "(", "\"a\"", "+", "cleanedLine", ...
Remove characters that should not be passed to the lexer. @param line before cleaning @return a cleaner line of code
[ "Remove", "characters", "that", "should", "not", "be", "passed", "to", "the", "lexer", "." ]
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/AbstractCobolSourceCleaner.java#L165-L172
40,495
legsem/legstar-core2
legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/AbstractCobolSourceCleaner.java
AbstractCobolSourceCleaner.isArgument
protected boolean isArgument(final String fragment) { String s = fragment.trim(); if (s.length() > 0) { return s.charAt(s.length() - 1) != COBOL_DELIMITER; } return false; }
java
protected boolean isArgument(final String fragment) { String s = fragment.trim(); if (s.length() > 0) { return s.charAt(s.length() - 1) != COBOL_DELIMITER; } return false; }
[ "protected", "boolean", "isArgument", "(", "final", "String", "fragment", ")", "{", "String", "s", "=", "fragment", ".", "trim", "(", ")", ";", "if", "(", "s", ".", "length", "(", ")", ">", "0", ")", "{", "return", "s", ".", "charAt", "(", "s", "...
Examine characters before an assumed level. If these characters are not terminated by a COBOL delimiter then the level is actually an argument to a previous keyword, not an actual level. @param fragment a fragment of code preceding an assumed level @return true if the assumed level is an argument
[ "Examine", "characters", "before", "an", "assumed", "level", ".", "If", "these", "characters", "are", "not", "terminated", "by", "a", "COBOL", "delimiter", "then", "the", "level", "is", "actually", "an", "argument", "to", "a", "previous", "keyword", "not", "...
f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-cob2xsd/src/main/java/com/legstar/cob2xsd/antlr/AbstractCobolSourceCleaner.java#L506-L512
40,496
apptik/jus
android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java
ImageLoader.getImageListener
public static ImageListener getImageListener(final ImageView view, final int defaultImageResId, final int errorImageResId) { return new ImageListener() { @Override public void onError(JusError error) { if (errorImageResId !...
java
public static ImageListener getImageListener(final ImageView view, final int defaultImageResId, final int errorImageResId) { return new ImageListener() { @Override public void onError(JusError error) { if (errorImageResId !...
[ "public", "static", "ImageListener", "getImageListener", "(", "final", "ImageView", "view", ",", "final", "int", "defaultImageResId", ",", "final", "int", "errorImageResId", ")", "{", "return", "new", "ImageListener", "(", ")", "{", "@", "Override", "public", "v...
The default implementation of ImageListener which handles basic functionality of showing a default image until the network response is received, at which point it will switch to either the actual image or the error image. @param view The imageView that the listener is associated with. @param defaultImageResId Default i...
[ "The", "default", "implementation", "of", "ImageListener", "which", "handles", "basic", "functionality", "of", "showing", "a", "default", "image", "until", "the", "network", "response", "is", "received", "at", "which", "point", "it", "will", "switch", "to", "eit...
8a37a21b41f897d68eaeaab07368ec22a1e5a60e
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java#L153-L172
40,497
apptik/jus
android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java
ImageLoader.get
public ImageContainer get(String requestUrl, final ImageListener listener, final Object tag) { return get(requestUrl, listener, 0, 0, tag); }
java
public ImageContainer get(String requestUrl, final ImageListener listener, final Object tag) { return get(requestUrl, listener, 0, 0, tag); }
[ "public", "ImageContainer", "get", "(", "String", "requestUrl", ",", "final", "ImageListener", "listener", ",", "final", "Object", "tag", ")", "{", "return", "get", "(", "requestUrl", ",", "listener", ",", "0", ",", "0", ",", "tag", ")", ";", "}" ]
Returns an ImageContainer for the requested URL. The ImageContainer will contain either the specified default bitmap or the loaded bitmap. If the default was returned, the {@link ImageLoader} will be invoked when the request is fulfilled. @param requestUrl The URL of the image to be loaded.
[ "Returns", "an", "ImageContainer", "for", "the", "requested", "URL", "." ]
8a37a21b41f897d68eaeaab07368ec22a1e5a60e
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java#L238-L240
40,498
apptik/jus
android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java
ImageLoader.onGetImageSuccess
protected void onGetImageSuccess(String cacheKey, Bitmap response) { // cache the image that was fetched. imageCache.putBitmap(cacheKey, response); // remove the request from the list of in-flight requests. BatchedImageRequest request = inFlightRequests.remove(cacheKey); if (re...
java
protected void onGetImageSuccess(String cacheKey, Bitmap response) { // cache the image that was fetched. imageCache.putBitmap(cacheKey, response); // remove the request from the list of in-flight requests. BatchedImageRequest request = inFlightRequests.remove(cacheKey); if (re...
[ "protected", "void", "onGetImageSuccess", "(", "String", "cacheKey", ",", "Bitmap", "response", ")", "{", "// cache the image that was fetched.", "imageCache", ".", "putBitmap", "(", "cacheKey", ",", "response", ")", ";", "// remove the request from the list of in-flight re...
Handler for when an image was successfully loaded. @param cacheKey The cache key that is associated with the image request. @param response The bitmap that was returned from the network.
[ "Handler", "for", "when", "an", "image", "was", "successfully", "loaded", "." ]
8a37a21b41f897d68eaeaab07368ec22a1e5a60e
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java#L343-L357
40,499
apptik/jus
android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java
ImageLoader.onGetImageError
protected void onGetImageError(String cacheKey, JusError error) { // Notify the requesters that something failed via a null result. // Remove this request from the list of in-flight requests. BatchedImageRequest request = inFlightRequests.remove(cacheKey); if (request != null) { ...
java
protected void onGetImageError(String cacheKey, JusError error) { // Notify the requesters that something failed via a null result. // Remove this request from the list of in-flight requests. BatchedImageRequest request = inFlightRequests.remove(cacheKey); if (request != null) { ...
[ "protected", "void", "onGetImageError", "(", "String", "cacheKey", ",", "JusError", "error", ")", "{", "// Notify the requesters that something failed via a null result.", "// Remove this request from the list of in-flight requests.", "BatchedImageRequest", "request", "=", "inFlightR...
Handler for when an image failed to load. @param cacheKey The cache key that is associated with the image request.
[ "Handler", "for", "when", "an", "image", "failed", "to", "load", "." ]
8a37a21b41f897d68eaeaab07368ec22a1e5a60e
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java#L363-L375