repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/AbstractInstance.java
AbstractInstance.checkLibraryAvailability
public synchronized void checkLibraryAvailability(final JobID jobID) throws IOException { // Now distribute the required libraries for the job String[] requiredLibraries = LibraryCacheManager.getRequiredJarFiles(jobID); if (requiredLibraries == null) { throw new IOException("No entry of required libraries fo...
java
public synchronized void checkLibraryAvailability(final JobID jobID) throws IOException { // Now distribute the required libraries for the job String[] requiredLibraries = LibraryCacheManager.getRequiredJarFiles(jobID); if (requiredLibraries == null) { throw new IOException("No entry of required libraries fo...
[ "public", "synchronized", "void", "checkLibraryAvailability", "(", "final", "JobID", "jobID", ")", "throws", "IOException", "{", "// Now distribute the required libraries for the job", "String", "[", "]", "requiredLibraries", "=", "LibraryCacheManager", ".", "getRequiredJarFi...
Checks if all the libraries required to run the job with the given job ID are available on this instance. Any libary that is missing is transferred to the instance as a result of this call. @param jobID the ID of the job whose libraries are to be checked for @throws IOException thrown if an error occurs while checking...
[ "Checks", "if", "all", "the", "libraries", "required", "to", "run", "the", "job", "with", "the", "given", "job", "ID", "are", "available", "on", "this", "instance", ".", "Any", "libary", "that", "is", "missing", "is", "transferred", "to", "the", "instance"...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/AbstractInstance.java#L154-L177
train
stratosphere/stratosphere
stratosphere-addons/hbase/src/main/java/eu/stratosphere/addons/hbase/TableInputFormat.java
TableInputFormat.mapResultToRecord
public void mapResultToRecord(Record record, HBaseKey key, HBaseResult result) { record.setField(0, key); record.setField(1, result); }
java
public void mapResultToRecord(Record record, HBaseKey key, HBaseResult result) { record.setField(0, key); record.setField(1, result); }
[ "public", "void", "mapResultToRecord", "(", "Record", "record", ",", "HBaseKey", "key", ",", "HBaseResult", "result", ")", "{", "record", ".", "setField", "(", "0", ",", "key", ")", ";", "record", ".", "setField", "(", "1", ",", "result", ")", ";", "}"...
Maps the current HBase Result into a Record. This implementation simply stores the HBaseKey at position 0, and the HBase Result object at position 1. @param record @param key @param result
[ "Maps", "the", "current", "HBase", "Result", "into", "a", "Record", ".", "This", "implementation", "simply", "stores", "the", "HBaseKey", "at", "position", "0", "and", "the", "HBase", "Result", "object", "at", "position", "1", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-addons/hbase/src/main/java/eu/stratosphere/addons/hbase/TableInputFormat.java#L257-L260
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/util/NativeCodeLoader.java
NativeCodeLoader.loadLibraryFromFile
public static void loadLibraryFromFile(final String directory, final String filename) throws IOException { final String libraryPath = directory + File.separator + filename; synchronized (loadedLibrarySet) { final File outputFile = new File(directory, filename); if (!outputFile.exists()) { // Try to ex...
java
public static void loadLibraryFromFile(final String directory, final String filename) throws IOException { final String libraryPath = directory + File.separator + filename; synchronized (loadedLibrarySet) { final File outputFile = new File(directory, filename); if (!outputFile.exists()) { // Try to ex...
[ "public", "static", "void", "loadLibraryFromFile", "(", "final", "String", "directory", ",", "final", "String", "filename", ")", "throws", "IOException", "{", "final", "String", "libraryPath", "=", "directory", "+", "File", ".", "separator", "+", "filename", ";"...
Loads a native library from a file. @param directory the directory in which the library is supposed to be located @param filename filename of the library to be loaded @throws IOException thrown if an internal native library cannot be extracted
[ "Loads", "a", "native", "library", "from", "a", "file", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/util/NativeCodeLoader.java#L61-L84
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/PendingRequestsMap.java
PendingRequestsMap.addRequest
void addRequest(final InstanceType instanceType, final int numberOfInstances) { Integer numberOfRemainingInstances = this.pendingRequests.get(instanceType); if (numberOfRemainingInstances == null) { numberOfRemainingInstances = Integer.valueOf(numberOfInstances); } else { numberOfRemainingInstances = Integ...
java
void addRequest(final InstanceType instanceType, final int numberOfInstances) { Integer numberOfRemainingInstances = this.pendingRequests.get(instanceType); if (numberOfRemainingInstances == null) { numberOfRemainingInstances = Integer.valueOf(numberOfInstances); } else { numberOfRemainingInstances = Integ...
[ "void", "addRequest", "(", "final", "InstanceType", "instanceType", ",", "final", "int", "numberOfInstances", ")", "{", "Integer", "numberOfRemainingInstances", "=", "this", ".", "pendingRequests", ".", "get", "(", "instanceType", ")", ";", "if", "(", "numberOfRem...
Adds the a pending request for the given number of instances of the given type to this map. @param instanceType the requested instance type @param numberOfInstances the requested number of instances of this type
[ "Adds", "the", "a", "pending", "request", "for", "the", "given", "number", "of", "instances", "of", "the", "given", "type", "to", "this", "map", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/PendingRequestsMap.java#L55-L65
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/PendingRequestsMap.java
PendingRequestsMap.decreaseNumberOfPendingInstances
void decreaseNumberOfPendingInstances(final InstanceType instanceType) { Integer numberOfRemainingInstances = this.pendingRequests.get(instanceType); if (numberOfRemainingInstances == null) { return; } numberOfRemainingInstances = Integer.valueOf(numberOfRemainingInstances.intValue() - 1); if (numberOfRe...
java
void decreaseNumberOfPendingInstances(final InstanceType instanceType) { Integer numberOfRemainingInstances = this.pendingRequests.get(instanceType); if (numberOfRemainingInstances == null) { return; } numberOfRemainingInstances = Integer.valueOf(numberOfRemainingInstances.intValue() - 1); if (numberOfRe...
[ "void", "decreaseNumberOfPendingInstances", "(", "final", "InstanceType", "instanceType", ")", "{", "Integer", "numberOfRemainingInstances", "=", "this", ".", "pendingRequests", ".", "get", "(", "instanceType", ")", ";", "if", "(", "numberOfRemainingInstances", "==", ...
Decreases the number of remaining instances to request of the given type. @param instanceType the instance type for which the number of remaining instances shall be decreased
[ "Decreases", "the", "number", "of", "remaining", "instances", "to", "request", "of", "the", "given", "type", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/PendingRequestsMap.java#L83-L96
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java
ManagementGraph.getStage
public ManagementStage getStage(final int index) { if (index >= 0 && index < this.stages.size()) { return this.stages.get(index); } return null; }
java
public ManagementStage getStage(final int index) { if (index >= 0 && index < this.stages.size()) { return this.stages.get(index); } return null; }
[ "public", "ManagementStage", "getStage", "(", "final", "int", "index", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "stages", ".", "size", "(", ")", ")", "{", "return", "this", ".", "stages", ".", "get", "(", "index", "...
Returns the management stage with the given index. @param index the index of the management stage to be returned @return the management stage with the given index or <code>null</code> if no such management stage exists
[ "Returns", "the", "management", "stage", "with", "the", "given", "index", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java#L169-L176
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java
ManagementGraph.getNumberOfInputGroupVertices
public int getNumberOfInputGroupVertices(final int stage) { if (stage < 0 || stage >= this.stages.size()) { return 0; } return this.stages.get(stage).getNumberOfInputGroupVertices(); }
java
public int getNumberOfInputGroupVertices(final int stage) { if (stage < 0 || stage >= this.stages.size()) { return 0; } return this.stages.get(stage).getNumberOfInputGroupVertices(); }
[ "public", "int", "getNumberOfInputGroupVertices", "(", "final", "int", "stage", ")", "{", "if", "(", "stage", "<", "0", "||", "stage", ">=", "this", ".", "stages", ".", "size", "(", ")", ")", "{", "return", "0", ";", "}", "return", "this", ".", "stag...
Returns the number of input group vertices in the management stage with the given index. @param stage the index to the management stage @return the number of input group vertices in this stage, possibly 0.
[ "Returns", "the", "number", "of", "input", "group", "vertices", "in", "the", "management", "stage", "with", "the", "given", "index", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java#L185-L192
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java
ManagementGraph.getInputGroupVertex
public ManagementGroupVertex getInputGroupVertex(final int stage, final int index) { if (stage >= this.stages.size()) { return null; } return this.stages.get(stage).getInputGroupVertex(index); }
java
public ManagementGroupVertex getInputGroupVertex(final int stage, final int index) { if (stage >= this.stages.size()) { return null; } return this.stages.get(stage).getInputGroupVertex(index); }
[ "public", "ManagementGroupVertex", "getInputGroupVertex", "(", "final", "int", "stage", ",", "final", "int", "index", ")", "{", "if", "(", "stage", ">=", "this", ".", "stages", ".", "size", "(", ")", ")", "{", "return", "null", ";", "}", "return", "this"...
Returns the input group vertex at the given index in the given stage. @param stage the index to the management stage @param index the index to the input group vertex @return the input group vertex at the given index in the given stage or <code>null</code> if either the stage does not exists or the given index is inval...
[ "Returns", "the", "input", "group", "vertex", "at", "the", "given", "index", "in", "the", "given", "stage", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java#L220-L227
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java
ManagementGraph.getOutputGroupVertex
public ManagementGroupVertex getOutputGroupVertex(final int stage, final int index) { if (stage >= this.stages.size()) { return null; } return this.stages.get(stage).getOutputGroupVertex(index); }
java
public ManagementGroupVertex getOutputGroupVertex(final int stage, final int index) { if (stage >= this.stages.size()) { return null; } return this.stages.get(stage).getOutputGroupVertex(index); }
[ "public", "ManagementGroupVertex", "getOutputGroupVertex", "(", "final", "int", "stage", ",", "final", "int", "index", ")", "{", "if", "(", "stage", ">=", "this", ".", "stages", ".", "size", "(", ")", ")", "{", "return", "null", ";", "}", "return", "this...
Returns the output group vertex at the given index in the given stage. @param stage the index to the management stage @param index the index to the output group vertex @return the output group vertex at the given index in the given stage or <code>null</code> if either the stage does not exists or the given index is in...
[ "Returns", "the", "output", "group", "vertex", "at", "the", "given", "index", "in", "the", "given", "stage", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java#L239-L246
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java
ManagementGraph.getInputVertex
public ManagementVertex getInputVertex(final int stage, final int index) { if (stage >= this.stages.size()) { return null; } return this.stages.get(stage).getInputManagementVertex(index); }
java
public ManagementVertex getInputVertex(final int stage, final int index) { if (stage >= this.stages.size()) { return null; } return this.stages.get(stage).getInputManagementVertex(index); }
[ "public", "ManagementVertex", "getInputVertex", "(", "final", "int", "stage", ",", "final", "int", "index", ")", "{", "if", "(", "stage", ">=", "this", ".", "stages", ".", "size", "(", ")", ")", "{", "return", "null", ";", "}", "return", "this", ".", ...
Returns the input vertex with the specified index for the given stage. @param stage the index of the stage @param index the index of the input vertex to return @return the input vertex with the specified index or <code>null</code> if no input vertex with such an index exists in that stage
[ "Returns", "the", "input", "vertex", "with", "the", "specified", "index", "for", "the", "given", "stage", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java#L290-L297
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java
ManagementGraph.getGroupVerticesInTopologicalOrder
public List<ManagementGroupVertex> getGroupVerticesInTopologicalOrder() { final List<ManagementGroupVertex> topologicalSort = new ArrayList<ManagementGroupVertex>(); final Deque<ManagementGroupVertex> noIncomingEdges = new ArrayDeque<ManagementGroupVertex>(); final Map<ManagementGroupVertex, Integer> indegrees =...
java
public List<ManagementGroupVertex> getGroupVerticesInTopologicalOrder() { final List<ManagementGroupVertex> topologicalSort = new ArrayList<ManagementGroupVertex>(); final Deque<ManagementGroupVertex> noIncomingEdges = new ArrayDeque<ManagementGroupVertex>(); final Map<ManagementGroupVertex, Integer> indegrees =...
[ "public", "List", "<", "ManagementGroupVertex", ">", "getGroupVerticesInTopologicalOrder", "(", ")", "{", "final", "List", "<", "ManagementGroupVertex", ">", "topologicalSort", "=", "new", "ArrayList", "<", "ManagementGroupVertex", ">", "(", ")", ";", "final", "Dequ...
Returns a list of group vertices sorted in topological order. @return a list of group vertices sorted in topological order
[ "Returns", "a", "list", "of", "group", "vertices", "sorted", "in", "topological", "order", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java#L332-L365
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java
ManagementGraph.getGroupVerticesInReverseTopologicalOrder
public List<ManagementGroupVertex> getGroupVerticesInReverseTopologicalOrder() { final List<ManagementGroupVertex> reverseTopologicalSort = new ArrayList<ManagementGroupVertex>(); final Deque<ManagementGroupVertex> noOutgoingEdges = new ArrayDeque<ManagementGroupVertex>(); final Map<ManagementGroupVertex, Intege...
java
public List<ManagementGroupVertex> getGroupVerticesInReverseTopologicalOrder() { final List<ManagementGroupVertex> reverseTopologicalSort = new ArrayList<ManagementGroupVertex>(); final Deque<ManagementGroupVertex> noOutgoingEdges = new ArrayDeque<ManagementGroupVertex>(); final Map<ManagementGroupVertex, Intege...
[ "public", "List", "<", "ManagementGroupVertex", ">", "getGroupVerticesInReverseTopologicalOrder", "(", ")", "{", "final", "List", "<", "ManagementGroupVertex", ">", "reverseTopologicalSort", "=", "new", "ArrayList", "<", "ManagementGroupVertex", ">", "(", ")", ";", "f...
Returns a list of group vertices sorted in reverse topological order. @return a list of group vertices sorted in reverse topological order
[ "Returns", "a", "list", "of", "group", "vertices", "sorted", "in", "reverse", "topological", "order", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java#L372-L405
train
inmite/android-validation-komensky
library/src/main/java/eu/inmite/android/lib/validations/form/FormValidator.java
FormValidator.validate
public static boolean validate(Fragment fragment, IValidationCallback callback) { return validate(fragment.getActivity(), fragment, callback); }
java
public static boolean validate(Fragment fragment, IValidationCallback callback) { return validate(fragment.getActivity(), fragment, callback); }
[ "public", "static", "boolean", "validate", "(", "Fragment", "fragment", ",", "IValidationCallback", "callback", ")", "{", "return", "validate", "(", "fragment", ".", "getActivity", "(", ")", ",", "fragment", ",", "callback", ")", ";", "}" ]
Perform validation over the views of given fragment @param fragment fragment with views to validate @param callback callback the will receive result of validation, results are ordered by order param in annotation. @return whether the validation succeeded
[ "Perform", "validation", "over", "the", "views", "of", "given", "fragment" ]
7c544f2d9f104a9800fcf4757eecb3caa8e76451
https://github.com/inmite/android-validation-komensky/blob/7c544f2d9f104a9800fcf4757eecb3caa8e76451/library/src/main/java/eu/inmite/android/lib/validations/form/FormValidator.java#L203-L205
train
inmite/android-validation-komensky
library/src/main/java/eu/inmite/android/lib/validations/form/FormValidator.java
FormValidator.performFieldValidations
@SuppressWarnings("unchecked") private static ValidationFail performFieldValidations(Context context, FieldInfo fieldInfo, View view) { // first, we need to check if condition is not applied for all validations on field if (fieldInfo.condition != null && fieldInfo.condition.validationAnnotation().equals(Condition....
java
@SuppressWarnings("unchecked") private static ValidationFail performFieldValidations(Context context, FieldInfo fieldInfo, View view) { // first, we need to check if condition is not applied for all validations on field if (fieldInfo.condition != null && fieldInfo.condition.validationAnnotation().equals(Condition....
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "ValidationFail", "performFieldValidations", "(", "Context", "context", ",", "FieldInfo", "fieldInfo", ",", "View", "view", ")", "{", "// first, we need to check if condition is not applied for all valid...
perform all validations on single field
[ "perform", "all", "validations", "on", "single", "field" ]
7c544f2d9f104a9800fcf4757eecb3caa8e76451
https://github.com/inmite/android-validation-komensky/blob/7c544f2d9f104a9800fcf4757eecb3caa8e76451/library/src/main/java/eu/inmite/android/lib/validations/form/FormValidator.java#L299-L339
train
inmite/android-validation-komensky
library/src/main/java/eu/inmite/android/lib/validations/form/FieldFinder.java
FieldFinder.getFieldsForTarget
static Map<View, FormValidator.FieldInfo> getFieldsForTarget(Object target) { Map<View, FormValidator.FieldInfo> infoMap = sCachedFieldsByTarget.get(target); if (infoMap != null) { for (View view : infoMap.keySet()) { // view has been removed from the window - we will need to scan fields of target again ...
java
static Map<View, FormValidator.FieldInfo> getFieldsForTarget(Object target) { Map<View, FormValidator.FieldInfo> infoMap = sCachedFieldsByTarget.get(target); if (infoMap != null) { for (View view : infoMap.keySet()) { // view has been removed from the window - we will need to scan fields of target again ...
[ "static", "Map", "<", "View", ",", "FormValidator", ".", "FieldInfo", ">", "getFieldsForTarget", "(", "Object", "target", ")", "{", "Map", "<", "View", ",", "FormValidator", ".", "FieldInfo", ">", "infoMap", "=", "sCachedFieldsByTarget", ".", "get", "(", "ta...
get map of field information on view for given target
[ "get", "map", "of", "field", "information", "on", "view", "for", "given", "target" ]
7c544f2d9f104a9800fcf4757eecb3caa8e76451
https://github.com/inmite/android-validation-komensky/blob/7c544f2d9f104a9800fcf4757eecb3caa8e76451/library/src/main/java/eu/inmite/android/lib/validations/form/FieldFinder.java#L32-L51
train
inmite/android-validation-komensky
library/src/main/java/eu/inmite/android/lib/validations/form/FieldFinder.java
FieldFinder.findFieldsToValidate
@SuppressWarnings("TryWithIdenticalCatches") private static Map<View, FormValidator.FieldInfo> findFieldsToValidate(Object target) { final Field[] fields = target.getClass().getDeclaredFields(); if (fields == null || fields.length == 0) { return Collections.emptyMap(); } final WeakHashMap<View, FormValidat...
java
@SuppressWarnings("TryWithIdenticalCatches") private static Map<View, FormValidator.FieldInfo> findFieldsToValidate(Object target) { final Field[] fields = target.getClass().getDeclaredFields(); if (fields == null || fields.length == 0) { return Collections.emptyMap(); } final WeakHashMap<View, FormValidat...
[ "@", "SuppressWarnings", "(", "\"TryWithIdenticalCatches\"", ")", "private", "static", "Map", "<", "View", ",", "FormValidator", ".", "FieldInfo", ">", "findFieldsToValidate", "(", "Object", "target", ")", "{", "final", "Field", "[", "]", "fields", "=", "target"...
find fields on target to validate and prepare for their validation
[ "find", "fields", "on", "target", "to", "validate", "and", "prepare", "for", "their", "validation" ]
7c544f2d9f104a9800fcf4757eecb3caa8e76451
https://github.com/inmite/android-validation-komensky/blob/7c544f2d9f104a9800fcf4757eecb3caa8e76451/library/src/main/java/eu/inmite/android/lib/validations/form/FieldFinder.java#L56-L112
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.getEnum
public static <T extends Enum<T>> T getEnum(Class<T> enumClass, AbstractConfig config, String key) { Preconditions.checkNotNull(enumClass, "enumClass cannot be null"); Preconditions.checkState(enumClass.isEnum(), "enumClass must be an enum."); String textValue = config.getString(key); return Enum.valueO...
java
public static <T extends Enum<T>> T getEnum(Class<T> enumClass, AbstractConfig config, String key) { Preconditions.checkNotNull(enumClass, "enumClass cannot be null"); Preconditions.checkState(enumClass.isEnum(), "enumClass must be an enum."); String textValue = config.getString(key); return Enum.valueO...
[ "public", "static", "<", "T", "extends", "Enum", "<", "T", ">", ">", "T", "getEnum", "(", "Class", "<", "T", ">", "enumClass", ",", "AbstractConfig", "config", ",", "String", "key", ")", "{", "Preconditions", ".", "checkNotNull", "(", "enumClass", ",", ...
Method is used to return an enum value from a given string. @param enumClass Class for the resulting enum value @param config config to read the value from @param key key for the value @param <T> Enum class to return type for. @return enum value for the given key. @see ValidEnum
[ "Method", "is", "used", "to", "return", "an", "enum", "value", "from", "a", "given", "string", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L60-L65
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.enumValues
public static String enumValues(Class<?> enumClass) { Preconditions.checkNotNull(enumClass, "enumClass cannot be null"); Preconditions.checkState(enumClass.isEnum(), "enumClass must be an enum."); return Joiner.on(", ").join(enumClass.getEnumConstants()); }
java
public static String enumValues(Class<?> enumClass) { Preconditions.checkNotNull(enumClass, "enumClass cannot be null"); Preconditions.checkState(enumClass.isEnum(), "enumClass must be an enum."); return Joiner.on(", ").join(enumClass.getEnumConstants()); }
[ "public", "static", "String", "enumValues", "(", "Class", "<", "?", ">", "enumClass", ")", "{", "Preconditions", ".", "checkNotNull", "(", "enumClass", ",", "\"enumClass cannot be null\"", ")", ";", "Preconditions", ".", "checkState", "(", "enumClass", ".", "isE...
Method is used to return the values for an enum. @param enumClass Enum class to return the constants for. @return Returns a comma seperated string of all of the values in the enum.
[ "Method", "is", "used", "to", "return", "the", "values", "for", "an", "enum", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L73-L77
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.getAbsoluteFile
public static File getAbsoluteFile(AbstractConfig config, String key) { Preconditions.checkNotNull(config, "config cannot be null"); String path = config.getString(key); File file = new File(path); if (!file.isAbsolute()) { throw new ConfigException( key, path, "Must ...
java
public static File getAbsoluteFile(AbstractConfig config, String key) { Preconditions.checkNotNull(config, "config cannot be null"); String path = config.getString(key); File file = new File(path); if (!file.isAbsolute()) { throw new ConfigException( key, path, "Must ...
[ "public", "static", "File", "getAbsoluteFile", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "Preconditions", ".", "checkNotNull", "(", "config", ",", "\"config cannot be null\"", ")", ";", "String", "path", "=", "config", ".", "getString", "(...
Method is used to return a File checking to ensure that it is an absolute path. @param config config to read the value from @param key key for the value @return File for the config value.
[ "Method", "is", "used", "to", "return", "a", "File", "checking", "to", "ensure", "that", "it", "is", "an", "absolute", "path", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L86-L98
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.hostAndPorts
public static List<HostAndPort> hostAndPorts(AbstractConfig config, String key, Integer defaultPort) { final List<String> inputs = config.getList(key); List<HostAndPort> result = new ArrayList<>(); for (final String input : inputs) { final HostAndPort hostAndPort = hostAndPort(input, defaultPort); ...
java
public static List<HostAndPort> hostAndPorts(AbstractConfig config, String key, Integer defaultPort) { final List<String> inputs = config.getList(key); List<HostAndPort> result = new ArrayList<>(); for (final String input : inputs) { final HostAndPort hostAndPort = hostAndPort(input, defaultPort); ...
[ "public", "static", "List", "<", "HostAndPort", ">", "hostAndPorts", "(", "AbstractConfig", "config", ",", "String", "key", ",", "Integer", "defaultPort", ")", "{", "final", "List", "<", "String", ">", "inputs", "=", "config", ".", "getList", "(", "key", "...
Method is used to parse a list ConfigDef item to a list of HostAndPort @param config Config to read from @param key ConfigItem to get the host string from. @param defaultPort The default port to use if a port was not specified. Can be null. @return
[ "Method", "is", "used", "to", "parse", "a", "list", "ConfigDef", "item", "to", "a", "list", "of", "HostAndPort" ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L181-L190
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.hostAndPorts
public static List<HostAndPort> hostAndPorts(AbstractConfig config, String key) { return hostAndPorts(config, key, null); }
java
public static List<HostAndPort> hostAndPorts(AbstractConfig config, String key) { return hostAndPorts(config, key, null); }
[ "public", "static", "List", "<", "HostAndPort", ">", "hostAndPorts", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "return", "hostAndPorts", "(", "config", ",", "key", ",", "null", ")", ";", "}" ]
Method is used to parse hosts and ports @param config @param key @return
[ "Method", "is", "used", "to", "parse", "hosts", "and", "ports" ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L199-L201
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.url
public static URL url(AbstractConfig config, String key) { final String value = config.getString(key); return url(key, value); }
java
public static URL url(AbstractConfig config, String key) { final String value = config.getString(key); return url(key, value); }
[ "public", "static", "URL", "url", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "final", "String", "value", "=", "config", ".", "getString", "(", "key", ")", ";", "return", "url", "(", "key", ",", "value", ")", ";", "}" ]
Method is used to retrieve a URL from a configuration key. @param config Config to read @param key Key to read @return URL for the value.
[ "Method", "is", "used", "to", "retrieve", "a", "URL", "from", "a", "configuration", "key", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L223-L226
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.uri
public static URI uri(AbstractConfig config, String key) { final String value = config.getString(key); return uri(key, value); }
java
public static URI uri(AbstractConfig config, String key) { final String value = config.getString(key); return uri(key, value); }
[ "public", "static", "URI", "uri", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "final", "String", "value", "=", "config", ".", "getString", "(", "key", ")", ";", "return", "uri", "(", "key", ",", "value", ")", ";", "}" ]
Method is used to retrieve a URI from a configuration key. @param config Config to read @param key Key to read @return URI for the value.
[ "Method", "is", "used", "to", "retrieve", "a", "URI", "from", "a", "configuration", "key", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L264-L267
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.getSet
public static Set<String> getSet(AbstractConfig config, String key) { List<String> value = config.getList(key); return ImmutableSet.copyOf(value); }
java
public static Set<String> getSet(AbstractConfig config, String key) { List<String> value = config.getList(key); return ImmutableSet.copyOf(value); }
[ "public", "static", "Set", "<", "String", ">", "getSet", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "List", "<", "String", ">", "value", "=", "config", ".", "getList", "(", "key", ")", ";", "return", "ImmutableSet", ".", "copyOf", ...
Method is used to retrieve a list and convert it to an immutable set. @param config Config to read @param key Key to read @return ImmutableSet with the contents of the config key. @see com.google.common.collect.ImmutableSet
[ "Method", "is", "used", "to", "retrieve", "a", "list", "and", "convert", "it", "to", "an", "immutable", "set", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L293-L296
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.pattern
public static Pattern pattern(AbstractConfig config, String key) { String pattern = config.getString(key); try { return Pattern.compile(pattern); } catch (PatternSyntaxException e) { throw new ConfigException( key, pattern, String.format( "Could not c...
java
public static Pattern pattern(AbstractConfig config, String key) { String pattern = config.getString(key); try { return Pattern.compile(pattern); } catch (PatternSyntaxException e) { throw new ConfigException( key, pattern, String.format( "Could not c...
[ "public", "static", "Pattern", "pattern", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "String", "pattern", "=", "config", ".", "getString", "(", "key", ")", ";", "try", "{", "return", "Pattern", ".", "compile", "(", "pattern", ")", "...
Method is used to create a pattern based on the config element. @param config @param key @return
[ "Method", "is", "used", "to", "create", "a", "pattern", "based", "on", "the", "config", "element", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L305-L320
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.passwordCharArray
public static char[] passwordCharArray(AbstractConfig config, String key) { final Password password = config.getPassword(key); return password.value().toCharArray(); }
java
public static char[] passwordCharArray(AbstractConfig config, String key) { final Password password = config.getPassword(key); return password.value().toCharArray(); }
[ "public", "static", "char", "[", "]", "passwordCharArray", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "final", "Password", "password", "=", "config", ".", "getPassword", "(", "key", ")", ";", "return", "password", ".", "value", "(", "...
Method is used to return an array of characters representing the password stored in the config. @param config Config to read from @param key Key to read from @return char array containing the password
[ "Method", "is", "used", "to", "return", "an", "array", "of", "characters", "representing", "the", "password", "stored", "in", "the", "config", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L365-L368
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.keyStore
public static KeyStore keyStore(AbstractConfig config, String key) { final String keyStoreType = config.getString(key); try { return KeyStore.getInstance(keyStoreType); } catch (KeyStoreException e) { ConfigException exception = new ConfigException( key, keyStoreType, ...
java
public static KeyStore keyStore(AbstractConfig config, String key) { final String keyStoreType = config.getString(key); try { return KeyStore.getInstance(keyStoreType); } catch (KeyStoreException e) { ConfigException exception = new ConfigException( key, keyStoreType, ...
[ "public", "static", "KeyStore", "keyStore", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "final", "String", "keyStoreType", "=", "config", ".", "getString", "(", "key", ")", ";", "try", "{", "return", "KeyStore", ".", "getInstance", "(", ...
Method will create a KeyStore based on the KeyStore type specified in the config. @param config Config to read from. @param key Key to read from @return KeyStore based on the type specified in the config.
[ "Method", "will", "create", "a", "KeyStore", "based", "on", "the", "KeyStore", "type", "specified", "in", "the", "config", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L377-L390
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.keyManagerFactory
public static KeyManagerFactory keyManagerFactory(AbstractConfig config, String key) { final String keyManagerFactoryType = config.getString(key); try { return KeyManagerFactory.getInstance(keyManagerFactoryType); } catch (NoSuchAlgorithmException e) { ConfigException exception = new ConfigExcep...
java
public static KeyManagerFactory keyManagerFactory(AbstractConfig config, String key) { final String keyManagerFactoryType = config.getString(key); try { return KeyManagerFactory.getInstance(keyManagerFactoryType); } catch (NoSuchAlgorithmException e) { ConfigException exception = new ConfigExcep...
[ "public", "static", "KeyManagerFactory", "keyManagerFactory", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "final", "String", "keyManagerFactoryType", "=", "config", ".", "getString", "(", "key", ")", ";", "try", "{", "return", "KeyManagerFacto...
Method will create a KeyManagerFactory based on the Algorithm type specified in the config. @param config Config to read from. @param key Key to read from @return KeyManagerFactory based on the type specified in the config.
[ "Method", "will", "create", "a", "KeyManagerFactory", "based", "on", "the", "Algorithm", "type", "specified", "in", "the", "config", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L399-L412
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.trustManagerFactory
public static TrustManagerFactory trustManagerFactory(AbstractConfig config, String key) { final String trustManagerFactoryType = config.getString(key); try { return TrustManagerFactory.getInstance(trustManagerFactoryType); } catch (NoSuchAlgorithmException e) { ConfigException exception = new C...
java
public static TrustManagerFactory trustManagerFactory(AbstractConfig config, String key) { final String trustManagerFactoryType = config.getString(key); try { return TrustManagerFactory.getInstance(trustManagerFactoryType); } catch (NoSuchAlgorithmException e) { ConfigException exception = new C...
[ "public", "static", "TrustManagerFactory", "trustManagerFactory", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "final", "String", "trustManagerFactoryType", "=", "config", ".", "getString", "(", "key", ")", ";", "try", "{", "return", "TrustMana...
Method will create a TrustManagerFactory based on the Algorithm type specified in the config. @param config Config to read from. @param key Key to read from @return TrustManagerFactory based on the type specified in the config.
[ "Method", "will", "create", "a", "TrustManagerFactory", "based", "on", "the", "Algorithm", "type", "specified", "in", "the", "config", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L421-L434
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.sslContext
public static SSLContext sslContext(AbstractConfig config, String key) { final String trustManagerFactoryType = config.getString(key); try { return SSLContext.getInstance(trustManagerFactoryType); } catch (NoSuchAlgorithmException e) { ConfigException exception = new ConfigException( k...
java
public static SSLContext sslContext(AbstractConfig config, String key) { final String trustManagerFactoryType = config.getString(key); try { return SSLContext.getInstance(trustManagerFactoryType); } catch (NoSuchAlgorithmException e) { ConfigException exception = new ConfigException( k...
[ "public", "static", "SSLContext", "sslContext", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "final", "String", "trustManagerFactoryType", "=", "config", ".", "getString", "(", "key", ")", ";", "try", "{", "return", "SSLContext", ".", "getI...
Method will create a SSLContext based on the Algorithm type specified in the config. @param config Config to read from. @param key Key to read from @return SSLContext based on the type specified in the config.
[ "Method", "will", "create", "a", "SSLContext", "based", "on", "the", "Algorithm", "type", "specified", "in", "the", "config", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L443-L456
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/APIs/ApiBase.java
ApiBase.getRequestUrl
protected String getRequestUrl(String key) throws Exception { String result = ""; try { result = this.methods.get(key)[0]; } catch (Exception ex) { throw new Exception("Unknown method key: " + key); } return result; }
java
protected String getRequestUrl(String key) throws Exception { String result = ""; try { result = this.methods.get(key)[0]; } catch (Exception ex) { throw new Exception("Unknown method key: " + key); } return result; }
[ "protected", "String", "getRequestUrl", "(", "String", "key", ")", "throws", "Exception", "{", "String", "result", "=", "\"\"", ";", "try", "{", "result", "=", "this", ".", "methods", ".", "get", "(", "key", ")", "[", "0", "]", ";", "}", "catch", "("...
Gets the URL of REST Mango Pay API. @param key The method key to get URL of. @return The URL string of given method.
[ "Gets", "the", "URL", "of", "REST", "Mango", "Pay", "API", "." ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/APIs/ApiBase.java#L199-L207
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/APIs/ApiBase.java
ApiBase.getList
protected <T extends Dto> List<T> getList(Class<T[]> classOfT, Class<T> classOfTItem, String methodKey, Pagination pagination, String entityId, String secondEntityId, Map<String, String> filter, Sorting sorting) throws Exception { String urlMethod = ""; if (entityId != null && entityId.length() > 0 &&...
java
protected <T extends Dto> List<T> getList(Class<T[]> classOfT, Class<T> classOfTItem, String methodKey, Pagination pagination, String entityId, String secondEntityId, Map<String, String> filter, Sorting sorting) throws Exception { String urlMethod = ""; if (entityId != null && entityId.length() > 0 &&...
[ "protected", "<", "T", "extends", "Dto", ">", "List", "<", "T", ">", "getList", "(", "Class", "<", "T", "[", "]", ">", "classOfT", ",", "Class", "<", "T", ">", "classOfTItem", ",", "String", "methodKey", ",", "Pagination", "pagination", ",", "String", ...
Gets the array of Dto instances from API. @param <T> Type on behalf of which the request is being called. @param classOfT Type on behalf of which the request is being called. @param methodKey Relevant method key. @param pagination Pagination object. @param entityId ...
[ "Gets", "the", "array", "of", "Dto", "instances", "from", "API", "." ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/APIs/ApiBase.java#L322-L351
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/data/SourceRecordConcurrentLinkedDeque.java
SourceRecordConcurrentLinkedDeque.drain
public boolean drain(List<SourceRecord> records, int timeout) throws InterruptedException { Preconditions.checkNotNull(records, "records cannot be null"); Preconditions.checkArgument(timeout >= 0, "timeout should be greater than or equal to 0."); if (log.isDebugEnabled()) { log.debug("determining siz...
java
public boolean drain(List<SourceRecord> records, int timeout) throws InterruptedException { Preconditions.checkNotNull(records, "records cannot be null"); Preconditions.checkArgument(timeout >= 0, "timeout should be greater than or equal to 0."); if (log.isDebugEnabled()) { log.debug("determining siz...
[ "public", "boolean", "drain", "(", "List", "<", "SourceRecord", ">", "records", ",", "int", "timeout", ")", "throws", "InterruptedException", "{", "Preconditions", ".", "checkNotNull", "(", "records", ",", "\"records cannot be null\"", ")", ";", "Preconditions", "...
Method is used to drain the records from the deque in order and add them to the supplied list. @param records list to add the records to. @param timeout amount of time to sleep if no records are added. @return true if records were added to the list, false if not. @throws InterruptedException Thrown if the thread i...
[ "Method", "is", "used", "to", "drain", "the", "records", "from", "the", "deque", "in", "order", "and", "add", "them", "to", "the", "supplied", "list", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/data/SourceRecordConcurrentLinkedDeque.java#L73-L108
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/AuthenticationHelper.java
AuthenticationHelper.getHttpHeaderBasicKey
public String getHttpHeaderBasicKey() throws Exception { if (root.getConfig().getClientId() == null || root.getConfig().getClientId().length() == 0) throw new Exception ("MangoPay.config.ClientId is not set."); if (root.getConfig().getClientPassword() == null || root.getConfig()...
java
public String getHttpHeaderBasicKey() throws Exception { if (root.getConfig().getClientId() == null || root.getConfig().getClientId().length() == 0) throw new Exception ("MangoPay.config.ClientId is not set."); if (root.getConfig().getClientPassword() == null || root.getConfig()...
[ "public", "String", "getHttpHeaderBasicKey", "(", ")", "throws", "Exception", "{", "if", "(", "root", ".", "getConfig", "(", ")", ".", "getClientId", "(", ")", "==", "null", "||", "root", ".", "getConfig", "(", ")", ".", "getClientId", "(", ")", ".", "...
Gets basic key for HTTP header. @return Authorization string. @throws Exception
[ "Gets", "basic", "key", "for", "HTTP", "header", "." ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/AuthenticationHelper.java#L38-L48
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/AuthenticationHelper.java
AuthenticationHelper.getHttpHeaderBasic
private Map<String, String> getHttpHeaderBasic() throws Exception { return new HashMap<String, String>(){{ put("Authorization", "Basic " + getHttpHeaderBasicKey()); }}; }
java
private Map<String, String> getHttpHeaderBasic() throws Exception { return new HashMap<String, String>(){{ put("Authorization", "Basic " + getHttpHeaderBasicKey()); }}; }
[ "private", "Map", "<", "String", ",", "String", ">", "getHttpHeaderBasic", "(", ")", "throws", "Exception", "{", "return", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", "{", "{", "put", "(", "\"Authorization\"", ",", "\"Basic \"", "+", "...
gets HTTP header value with authorization string for basic authentication
[ "gets", "HTTP", "header", "value", "with", "authorization", "string", "for", "basic", "authentication" ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/AuthenticationHelper.java#L51-L56
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/AuthenticationHelper.java
AuthenticationHelper.getHttpHeaderStrong
private Map<String, String> getHttpHeaderStrong() throws Exception { final OAuthToken token = root.getOAuthTokenManager().getToken(); if (token == null || token.getAccessToken().length() == 0 || token.getTokenType().length() == 0) throw new Exception ("OAuth token is n...
java
private Map<String, String> getHttpHeaderStrong() throws Exception { final OAuthToken token = root.getOAuthTokenManager().getToken(); if (token == null || token.getAccessToken().length() == 0 || token.getTokenType().length() == 0) throw new Exception ("OAuth token is n...
[ "private", "Map", "<", "String", ",", "String", ">", "getHttpHeaderStrong", "(", ")", "throws", "Exception", "{", "final", "OAuthToken", "token", "=", "root", ".", "getOAuthTokenManager", "(", ")", ".", "getToken", "(", ")", ";", "if", "(", "token", "==", ...
gets HTTP header value with authorization string for strong authentication
[ "gets", "HTTP", "header", "value", "with", "authorization", "string", "for", "strong", "authentication" ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/AuthenticationHelper.java#L59-L69
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/Sorting.java
Sorting.addField
public void addField(String fieldName, SortDirection sortDirection) { if (sortFields == null) sortFields = new HashMap<>(); sortFields.put(fieldName, sortDirection); }
java
public void addField(String fieldName, SortDirection sortDirection) { if (sortFields == null) sortFields = new HashMap<>(); sortFields.put(fieldName, sortDirection); }
[ "public", "void", "addField", "(", "String", "fieldName", ",", "SortDirection", "sortDirection", ")", "{", "if", "(", "sortFields", "==", "null", ")", "sortFields", "=", "new", "HashMap", "<>", "(", ")", ";", "sortFields", ".", "put", "(", "fieldName", ","...
Adds field to sort by. @param fieldName Property name to sort by. @param sortDirection Sort direction.
[ "Adds", "field", "to", "sort", "by", "." ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/Sorting.java#L34-L38
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/Sorting.java
Sorting.getSortParameter
public Map<String, String> getSortParameter() { return new HashMap<String, String>() {{ put(sortUrlParameterName, getFields()); }}; }
java
public Map<String, String> getSortParameter() { return new HashMap<String, String>() {{ put(sortUrlParameterName, getFields()); }}; }
[ "public", "Map", "<", "String", ",", "String", ">", "getSortParameter", "(", ")", "{", "return", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", "{", "{", "put", "(", "sortUrlParameterName", ",", "getFields", "(", ")", ")", ";", "}", "...
Gets sort parameters. @return
[ "Gets", "sort", "parameters", "." ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/Sorting.java#L45-L50
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/UrlTool.java
UrlTool.getFullUrl
public String getFullUrl(String restUrl) { String result = ""; try { result = (new URL(root.getConfig().getBaseUrl())).getProtocol() + "://" + this.getHost() + restUrl; } catch (Exception ex) { } return result; }
java
public String getFullUrl(String restUrl) { String result = ""; try { result = (new URL(root.getConfig().getBaseUrl())).getProtocol() + "://" + this.getHost() + restUrl; } catch (Exception ex) { } return result; }
[ "public", "String", "getFullUrl", "(", "String", "restUrl", ")", "{", "String", "result", "=", "\"\"", ";", "try", "{", "result", "=", "(", "new", "URL", "(", "root", ".", "getConfig", "(", ")", ".", "getBaseUrl", "(", ")", ")", ")", ".", "getProtoco...
Gets complete url. @param restUrl Rest url. @return Complete url.
[ "Gets", "complete", "url", "." ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/UrlTool.java#L118-L128
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/Address.java
Address.isValid
public Boolean isValid() { return addressLine1 != null || addressLine2 != null || city != null || region != null || postalCode != null || (country != null && country != CountryIso.NotSpecified); }
java
public Boolean isValid() { return addressLine1 != null || addressLine2 != null || city != null || region != null || postalCode != null || (country != null && country != CountryIso.NotSpecified); }
[ "public", "Boolean", "isValid", "(", ")", "{", "return", "addressLine1", "!=", "null", "||", "addressLine2", "!=", "null", "||", "city", "!=", "null", "||", "region", "!=", "null", "||", "postalCode", "!=", "null", "||", "(", "country", "!=", "null", "&&...
Helper method used internally. @return True if the {@link Address} details are valid.
[ "Helper", "method", "used", "internally", "." ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/Address.java#L100-L109
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/Configuration.java
Configuration.readMangopayVersion
private String readMangopayVersion() { try { Properties prop = new Properties(); InputStream input = getClass().getResourceAsStream("mangopay.properties"); prop.load(input); return prop.getProperty("version"); } catch (IOException ex) { ...
java
private String readMangopayVersion() { try { Properties prop = new Properties(); InputStream input = getClass().getResourceAsStream("mangopay.properties"); prop.load(input); return prop.getProperty("version"); } catch (IOException ex) { ...
[ "private", "String", "readMangopayVersion", "(", ")", "{", "try", "{", "Properties", "prop", "=", "new", "Properties", "(", ")", ";", "InputStream", "input", "=", "getClass", "(", ")", ".", "getResourceAsStream", "(", "\"mangopay.properties\"", ")", ";", "prop...
Read Mangopay version from mangopay properties @return String Mangopay Version
[ "Read", "Mangopay", "version", "from", "mangopay", "properties" ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/Configuration.java#L134-L144
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ValidPort.java
ValidPort.ensureValid
@Override public void ensureValid(String setting, Object value) { if (null == value || !(value instanceof Integer)) { throw new ConfigException(setting, "Must be an integer."); } final Integer port = (Integer) value; if (!(port >= this.start && port <= this.end)) { throw new ConfigExcepti...
java
@Override public void ensureValid(String setting, Object value) { if (null == value || !(value instanceof Integer)) { throw new ConfigException(setting, "Must be an integer."); } final Integer port = (Integer) value; if (!(port >= this.start && port <= this.end)) { throw new ConfigExcepti...
[ "@", "Override", "public", "void", "ensureValid", "(", "String", "setting", ",", "Object", "value", ")", "{", "if", "(", "null", "==", "value", "||", "!", "(", "value", "instanceof", "Integer", ")", ")", "{", "throw", "new", "ConfigException", "(", "sett...
Method is used to validate that the supplied port is within the valid range. @param setting name of the setting being tested. @param value value being tested.
[ "Method", "is", "used", "to", "validate", "that", "the", "supplied", "port", "is", "within", "the", "valid", "range", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ValidPort.java#L75-L88
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/recommenders/Recommenders.java
Recommenders.visibleIf
public static ConfigDef.Recommender visibleIf(String configKey, Object value) { return new VisibleIfRecommender(configKey, value, ValidValuesCallback.EMPTY); }
java
public static ConfigDef.Recommender visibleIf(String configKey, Object value) { return new VisibleIfRecommender(configKey, value, ValidValuesCallback.EMPTY); }
[ "public", "static", "ConfigDef", ".", "Recommender", "visibleIf", "(", "String", "configKey", ",", "Object", "value", ")", "{", "return", "new", "VisibleIfRecommender", "(", "configKey", ",", "value", ",", "ValidValuesCallback", ".", "EMPTY", ")", ";", "}" ]
Method is used to return a recommender that will mark a ConfigItem as visible if the configKey is set to the specified value. @param configKey The setting to retrieve the value from. @param value The expected value. @return recommender
[ "Method", "is", "used", "to", "return", "a", "recommender", "that", "will", "mark", "a", "ConfigItem", "as", "visible", "if", "the", "configKey", "is", "set", "to", "the", "specified", "value", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/recommenders/Recommenders.java#L36-L38
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/RestTool.java
RestTool.addRequestHttpHeader
public void addRequestHttpHeader(final String key, final String value) { addRequestHttpHeader(new HashMap<String, String>() {{ put(key, value); }}); }
java
public void addRequestHttpHeader(final String key, final String value) { addRequestHttpHeader(new HashMap<String, String>() {{ put(key, value); }}); }
[ "public", "void", "addRequestHttpHeader", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "addRequestHttpHeader", "(", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", "{", "{", "put", "(", "key", ",", "value", ")"...
Adds HTTP header into the request. @param key Header name. @param value Header value.
[ "Adds", "HTTP", "header", "into", "the", "request", "." ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/RestTool.java#L88-L92
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/RestTool.java
RestTool.getHttpHeaders
private Map<String, String> getHttpHeaders(String restUrl) throws Exception { // return if already created... if (this.requestHttpHeaders != null) return this.requestHttpHeaders; // ...or initialize with default headers Map<String, String> httpHeaders = new HashMap<>(); ...
java
private Map<String, String> getHttpHeaders(String restUrl) throws Exception { // return if already created... if (this.requestHttpHeaders != null) return this.requestHttpHeaders; // ...or initialize with default headers Map<String, String> httpHeaders = new HashMap<>(); ...
[ "private", "Map", "<", "String", ",", "String", ">", "getHttpHeaders", "(", "String", "restUrl", ")", "throws", "Exception", "{", "// return if already created...", "if", "(", "this", ".", "requestHttpHeaders", "!=", "null", ")", "return", "this", ".", "requestH...
Gets HTTP header to use in request. @param restUrl The REST API URL. @return Array containing HTTP headers.
[ "Gets", "HTTP", "header", "to", "use", "in", "request", "." ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/RestTool.java#L1023-L1041
train
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/RestTool.java
RestTool.checkResponseCode
private void checkResponseCode(String message) throws ResponseException { if (this.responseCode != 200 && this.responseCode != 204) { HashMap<Integer, String> responseCodes = new HashMap<Integer, String>() {{ put(206, "PartialContent"); put(400, "Bad request"); ...
java
private void checkResponseCode(String message) throws ResponseException { if (this.responseCode != 200 && this.responseCode != 204) { HashMap<Integer, String> responseCodes = new HashMap<Integer, String>() {{ put(206, "PartialContent"); put(400, "Bad request"); ...
[ "private", "void", "checkResponseCode", "(", "String", "message", ")", "throws", "ResponseException", "{", "if", "(", "this", ".", "responseCode", "!=", "200", "&&", "this", ".", "responseCode", "!=", "204", ")", "{", "HashMap", "<", "Integer", ",", "String"...
Checks the HTTP response code and if it's neither 200 nor 204 throws a ResponseException. @param message Text response. @throws ResponseException If response code is other than 200 or 204.
[ "Checks", "the", "HTTP", "response", "code", "and", "if", "it", "s", "neither", "200", "nor", "204", "throws", "a", "ResponseException", "." ]
037cecb44ea62def63b507817fd9961649151157
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/RestTool.java#L1049-L1114
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/data/Parser.java
Parser.registerTypeParser
public final void registerTypeParser(Schema schema, TypeParser typeParser) { Preconditions.checkNotNull(schema, "schema cannot be null."); Preconditions.checkNotNull(typeParser, "typeParser cannot be null."); this.typeParsers.put(new ParserKey(schema), typeParser); }
java
public final void registerTypeParser(Schema schema, TypeParser typeParser) { Preconditions.checkNotNull(schema, "schema cannot be null."); Preconditions.checkNotNull(typeParser, "typeParser cannot be null."); this.typeParsers.put(new ParserKey(schema), typeParser); }
[ "public", "final", "void", "registerTypeParser", "(", "Schema", "schema", ",", "TypeParser", "typeParser", ")", "{", "Preconditions", ".", "checkNotNull", "(", "schema", ",", "\"schema cannot be null.\"", ")", ";", "Preconditions", ".", "checkNotNull", "(", "typePar...
Method is used to register a TypeParser for a given schema. If the schema is already registered, the new TypeParser will replace the existing one. @param schema Schema to register to. This supports any logical type by checking Schema.name() and schema.type(). @param typeParser The type parser to register for schem...
[ "Method", "is", "used", "to", "register", "a", "TypeParser", "for", "a", "given", "schema", ".", "If", "the", "schema", "is", "already", "registered", "the", "new", "TypeParser", "will", "replace", "the", "existing", "one", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/data/Parser.java#L83-L87
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/data/Parser.java
Parser.parseString
public Object parseString(Schema schema, String input) { checkSchemaAndInput(schema, input); if (null == input) { return null; } TypeParser parser = findParser(schema); try { Object result = parser.parseString(input, schema); return result; } catch (Exception ex) { Str...
java
public Object parseString(Schema schema, String input) { checkSchemaAndInput(schema, input); if (null == input) { return null; } TypeParser parser = findParser(schema); try { Object result = parser.parseString(input, schema); return result; } catch (Exception ex) { Str...
[ "public", "Object", "parseString", "(", "Schema", "schema", ",", "String", "input", ")", "{", "checkSchemaAndInput", "(", "schema", ",", "input", ")", ";", "if", "(", "null", "==", "input", ")", "{", "return", "null", ";", "}", "TypeParser", "parser", "=...
Method is used to parse String data to the proper Java types. @param schema Input schema to parse the String data by. @param input Java type specific to the schema supplied. @return Java type for the @throws DataException Exception is thrown when there is an exception thrown while parsing the input st...
[ "Method", "is", "used", "to", "parse", "String", "data", "to", "the", "proper", "Java", "types", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/data/Parser.java#L99-L115
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java
Validators.blankOr
public static Validator blankOr(Validator validator) { Preconditions.checkNotNull(validator, "validator cannot be null."); return BlankOrValidator.of(validator); }
java
public static Validator blankOr(Validator validator) { Preconditions.checkNotNull(validator, "validator cannot be null."); return BlankOrValidator.of(validator); }
[ "public", "static", "Validator", "blankOr", "(", "Validator", "validator", ")", "{", "Preconditions", ".", "checkNotNull", "(", "validator", ",", "\"validator cannot be null.\"", ")", ";", "return", "BlankOrValidator", ".", "of", "(", "validator", ")", ";", "}" ]
Method will return a validator that will accept a blank string. Any other value will be passed on to the supplied validator. @param validator Validator to test non blank values with. @return validator that will accept a blank string. Any other value will be passed on to the supplied validator.
[ "Method", "will", "return", "a", "validator", "that", "will", "accept", "a", "blank", "string", ".", "Any", "other", "value", "will", "be", "passed", "on", "to", "the", "supplied", "validator", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java#L75-L78
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java
Validators.validCharset
public static Validator validCharset(String... charsets) { if (null == charsets || charsets.length == 0) { return new ValidCharset(); } else { return new ValidCharset(charsets); } }
java
public static Validator validCharset(String... charsets) { if (null == charsets || charsets.length == 0) { return new ValidCharset(); } else { return new ValidCharset(charsets); } }
[ "public", "static", "Validator", "validCharset", "(", "String", "...", "charsets", ")", "{", "if", "(", "null", "==", "charsets", "||", "charsets", ".", "length", "==", "0", ")", "{", "return", "new", "ValidCharset", "(", ")", ";", "}", "else", "{", "r...
Method will return a validator that will ensure that a String or List contains a charset that is supported by the system. @param charsets The charsets that are allowed. If empty all of the available charsets on the system will be included. @return validator
[ "Method", "will", "return", "a", "validator", "that", "will", "ensure", "that", "a", "String", "or", "List", "contains", "a", "charset", "that", "is", "supported", "by", "the", "system", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java#L109-L115
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java
Validators.validEnum
public static Validator validEnum(Class<? extends Enum> enumClass, Enum... excludes) { String[] ex = new String[excludes.length]; for (int i = 0; i < ex.length; i++) { ex[i] = excludes[i].toString(); } return ValidEnum.of(enumClass, ex); }
java
public static Validator validEnum(Class<? extends Enum> enumClass, Enum... excludes) { String[] ex = new String[excludes.length]; for (int i = 0; i < ex.length; i++) { ex[i] = excludes[i].toString(); } return ValidEnum.of(enumClass, ex); }
[ "public", "static", "Validator", "validEnum", "(", "Class", "<", "?", "extends", "Enum", ">", "enumClass", ",", "Enum", "...", "excludes", ")", "{", "String", "[", "]", "ex", "=", "new", "String", "[", "excludes", ".", "length", "]", ";", "for", "(", ...
Method is used to create a new INSTANCE of the enum validator. @param enumClass Enum class with the entries to validate for. @param excludes Enum entries to exclude from the validator. @return validator
[ "Method", "is", "used", "to", "create", "a", "new", "INSTANCE", "of", "the", "enum", "validator", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java#L134-L140
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java
Validators.validHostAndPort
public static Validator validHostAndPort(Integer defaultPort, boolean requireBracketsForIPv6, boolean portRequired) { return ValidHostAndPort.of(defaultPort, requireBracketsForIPv6, portRequired); }
java
public static Validator validHostAndPort(Integer defaultPort, boolean requireBracketsForIPv6, boolean portRequired) { return ValidHostAndPort.of(defaultPort, requireBracketsForIPv6, portRequired); }
[ "public", "static", "Validator", "validHostAndPort", "(", "Integer", "defaultPort", ",", "boolean", "requireBracketsForIPv6", ",", "boolean", "portRequired", ")", "{", "return", "ValidHostAndPort", ".", "of", "(", "defaultPort", ",", "requireBracketsForIPv6", ",", "po...
Validator to ensure that a configuration setting is a hostname and port. @param defaultPort @param requireBracketsForIPv6 @param portRequired @return validator
[ "Validator", "to", "ensure", "that", "a", "configuration", "setting", "is", "a", "hostname", "and", "port", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java#L182-L184
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java
Validators.validKeyStoreType
public static Validator validKeyStoreType() { return (s, o) -> { if (!(o instanceof String)) { throw new ConfigException(s, o, "Must be a string."); } String keyStoreType = o.toString(); try { KeyStore.getInstance(keyStoreType); } catch (KeyStoreException e) { ...
java
public static Validator validKeyStoreType() { return (s, o) -> { if (!(o instanceof String)) { throw new ConfigException(s, o, "Must be a string."); } String keyStoreType = o.toString(); try { KeyStore.getInstance(keyStoreType); } catch (KeyStoreException e) { ...
[ "public", "static", "Validator", "validKeyStoreType", "(", ")", "{", "return", "(", "s", ",", "o", ")", "->", "{", "if", "(", "!", "(", "o", "instanceof", "String", ")", ")", "{", "throw", "new", "ConfigException", "(", "s", ",", "o", ",", "\"Must be...
Validator is used to ensure that the KeyStore type specified is valid. @return
[ "Validator", "is", "used", "to", "ensure", "that", "the", "KeyStore", "type", "specified", "is", "valid", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java#L190-L205
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java
Validators.validKeyManagerFactory
public static Validator validKeyManagerFactory() { return (s, o) -> { if (!(o instanceof String)) { throw new ConfigException(s, o, "Must be a string."); } String keyStoreType = o.toString(); try { KeyManagerFactory.getInstance(keyStoreType); } catch (NoSuchAlgorithmEx...
java
public static Validator validKeyManagerFactory() { return (s, o) -> { if (!(o instanceof String)) { throw new ConfigException(s, o, "Must be a string."); } String keyStoreType = o.toString(); try { KeyManagerFactory.getInstance(keyStoreType); } catch (NoSuchAlgorithmEx...
[ "public", "static", "Validator", "validKeyManagerFactory", "(", ")", "{", "return", "(", "s", ",", "o", ")", "->", "{", "if", "(", "!", "(", "o", "instanceof", "String", ")", ")", "{", "throw", "new", "ConfigException", "(", "s", ",", "o", ",", "\"Mu...
Validator is used to ensure that the KeyManagerFactory Algorithm specified is valid. @return
[ "Validator", "is", "used", "to", "ensure", "that", "the", "KeyManagerFactory", "Algorithm", "specified", "is", "valid", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java#L211-L226
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/TaskConfigs.java
TaskConfigs.single
public static List<Map<String, String>> single(Map<String, String> settings) { Preconditions.checkNotNull(settings, "settings cannot be null."); return ImmutableList.of(settings); }
java
public static List<Map<String, String>> single(Map<String, String> settings) { Preconditions.checkNotNull(settings, "settings cannot be null."); return ImmutableList.of(settings); }
[ "public", "static", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "single", "(", "Map", "<", "String", ",", "String", ">", "settings", ")", "{", "Preconditions", ".", "checkNotNull", "(", "settings", ",", "\"settings cannot be null.\"", ")", ...
Method will create a single from the supplied settings. @param settings @return
[ "Method", "will", "create", "a", "single", "from", "the", "supplied", "settings", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/TaskConfigs.java#L32-L35
train
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/TaskConfigs.java
TaskConfigs.multiple
public static List<Map<String, String>> multiple(Map<String, String> settings, final int taskCount) { Preconditions.checkNotNull(settings, "settings cannot be null."); Preconditions.checkState(taskCount > 0, "taskCount must be greater than 0."); final List<Map<String, String>> result = new ArrayList<>(taskC...
java
public static List<Map<String, String>> multiple(Map<String, String> settings, final int taskCount) { Preconditions.checkNotNull(settings, "settings cannot be null."); Preconditions.checkState(taskCount > 0, "taskCount must be greater than 0."); final List<Map<String, String>> result = new ArrayList<>(taskC...
[ "public", "static", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "multiple", "(", "Map", "<", "String", ",", "String", ">", "settings", ",", "final", "int", "taskCount", ")", "{", "Preconditions", ".", "checkNotNull", "(", "settings", ",",...
Method is used to generate a list of taskConfigs based on the supplied settings. @param settings @param taskCount @return
[ "Method", "is", "used", "to", "generate", "a", "list", "of", "taskConfigs", "based", "on", "the", "supplied", "settings", "." ]
19add138921f59ffcc85282d7aad551eeb582370
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/TaskConfigs.java#L44-L52
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/codec/ZWaveFrameDecoder.java
ZWaveFrameDecoder.createDataFrame
private DataFrame createDataFrame(ByteBuf buf) { if (buf.readableBytes() > 3) { byte messageType = buf.getByte(buf.readerIndex() + 3); switch (messageType) { case Version.ID: return new Version(buf); case MemoryGetId.ID: ...
java
private DataFrame createDataFrame(ByteBuf buf) { if (buf.readableBytes() > 3) { byte messageType = buf.getByte(buf.readerIndex() + 3); switch (messageType) { case Version.ID: return new Version(buf); case MemoryGetId.ID: ...
[ "private", "DataFrame", "createDataFrame", "(", "ByteBuf", "buf", ")", "{", "if", "(", "buf", ".", "readableBytes", "(", ")", ">", "3", ")", "{", "byte", "messageType", "=", "buf", ".", "getByte", "(", "buf", ".", "readerIndex", "(", ")", "+", "3", "...
Creates a Z-Wave DataFrame from a ByteBuf. @param buf the buffer to process @return a DataFrame instance (or null if a valid one wasn't found)
[ "Creates", "a", "Z", "-", "Wave", "DataFrame", "from", "a", "ByteBuf", "." ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/codec/ZWaveFrameDecoder.java#L143-L177
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/node/ZWaveNode.java
ZWaveNode.onApplicationCommand
public void onApplicationCommand(ZWaveControllerContext context, ApplicationCommand ac) { byte commandClassId = ac.getCommandClassId(); CommandClass cc = getCommandClass(commandClassId); if (cc != null) { // if it's a BasicCommandClass instance, allow the node to perform any ...
java
public void onApplicationCommand(ZWaveControllerContext context, ApplicationCommand ac) { byte commandClassId = ac.getCommandClassId(); CommandClass cc = getCommandClass(commandClassId); if (cc != null) { // if it's a BasicCommandClass instance, allow the node to perform any ...
[ "public", "void", "onApplicationCommand", "(", "ZWaveControllerContext", "context", ",", "ApplicationCommand", "ac", ")", "{", "byte", "commandClassId", "=", "ac", ".", "getCommandClassId", "(", ")", ";", "CommandClass", "cc", "=", "getCommandClass", "(", "commandCl...
Called when an application command message is received for this specific node. @param context the context for processing the command @param ac the application command received
[ "Called", "when", "an", "application", "command", "message", "is", "received", "for", "this", "specific", "node", "." ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/node/ZWaveNode.java#L161-L192
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/node/ZWaveNode.java
ZWaveNode.onApplicationUpdate
public void onApplicationUpdate(ZWaveControllerContext context, ApplicationUpdate update) { switch (nodeState) { case NodeInfo: // if the application update failed to send, re-send it if (update.didInfoRequestFail()) { if (stateRetries < 1) { ...
java
public void onApplicationUpdate(ZWaveControllerContext context, ApplicationUpdate update) { switch (nodeState) { case NodeInfo: // if the application update failed to send, re-send it if (update.didInfoRequestFail()) { if (stateRetries < 1) { ...
[ "public", "void", "onApplicationUpdate", "(", "ZWaveControllerContext", "context", ",", "ApplicationUpdate", "update", ")", "{", "switch", "(", "nodeState", ")", "{", "case", "NodeInfo", ":", "// if the application update failed to send, re-send it", "if", "(", "update", ...
Called when an application update message is received for this node. @param context the context for processing the update @param update the application update received
[ "Called", "when", "an", "application", "update", "message", "is", "received", "for", "this", "node", "." ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/node/ZWaveNode.java#L207-L258
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/channel/TransactionInboundHandler.java
TransactionInboundHandler.channelRead
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) { if (msg instanceof Frame) { Frame frame = (Frame) msg; if (hasCurrentTransaction()) { String tid = currentDataFrameTransaction.getId(); logger.trace("Received frame within trans...
java
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) { if (msg instanceof Frame) { Frame frame = (Frame) msg; if (hasCurrentTransaction()) { String tid = currentDataFrameTransaction.getId(); logger.trace("Received frame within trans...
[ "@", "Override", "public", "void", "channelRead", "(", "ChannelHandlerContext", "ctx", ",", "Object", "msg", ")", "{", "if", "(", "msg", "instanceof", "Frame", ")", "{", "Frame", "frame", "=", "(", "Frame", ")", "msg", ";", "if", "(", "hasCurrentTransactio...
Called when data is read from the Z-Wave network. @param ctx the handler context @param msg the message that was read
[ "Called", "when", "data", "is", "read", "from", "the", "Z", "-", "Wave", "network", "." ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/channel/TransactionInboundHandler.java#L50-L82
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/commandclass/MultiInstanceCommandClass.java
MultiInstanceCommandClass.createMultiInstanceGet
public DataFrame createMultiInstanceGet(byte nodeId, byte commandClass) { if (getVersion() > 1) { throw new ZWaveRuntimeException("MULTI_INSTANCE_GET is deprecated for command class versions > 1"); } return createSendDataFrame( "MULTI_INSTANCE_GET", nodeId, ...
java
public DataFrame createMultiInstanceGet(byte nodeId, byte commandClass) { if (getVersion() > 1) { throw new ZWaveRuntimeException("MULTI_INSTANCE_GET is deprecated for command class versions > 1"); } return createSendDataFrame( "MULTI_INSTANCE_GET", nodeId, ...
[ "public", "DataFrame", "createMultiInstanceGet", "(", "byte", "nodeId", ",", "byte", "commandClass", ")", "{", "if", "(", "getVersion", "(", ")", ">", "1", ")", "{", "throw", "new", "ZWaveRuntimeException", "(", "\"MULTI_INSTANCE_GET is deprecated for command class ve...
Create a MULTI_INSTANCE_GET command. @param nodeId the target node ID @param commandClass the command class being requested @return a DataFrame instance
[ "Create", "a", "MULTI_INSTANCE_GET", "command", "." ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/commandclass/MultiInstanceCommandClass.java#L234-L248
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/commandclass/MultiInstanceCommandClass.java
MultiInstanceCommandClass.createMultiChannelEndPointGet
public DataFrame createMultiChannelEndPointGet(byte nodeId) { if (getVersion() < 2) { throw new ZWaveRuntimeException("MULTI_CHANNEL_END_POINT_GET is not available in command class version 1"); } return createSendDataFrame( "MULTI_CHANNEL_END_POINT_GET", nodeI...
java
public DataFrame createMultiChannelEndPointGet(byte nodeId) { if (getVersion() < 2) { throw new ZWaveRuntimeException("MULTI_CHANNEL_END_POINT_GET is not available in command class version 1"); } return createSendDataFrame( "MULTI_CHANNEL_END_POINT_GET", nodeI...
[ "public", "DataFrame", "createMultiChannelEndPointGet", "(", "byte", "nodeId", ")", "{", "if", "(", "getVersion", "(", ")", "<", "2", ")", "{", "throw", "new", "ZWaveRuntimeException", "(", "\"MULTI_CHANNEL_END_POINT_GET is not available in command class version 1\"", ")"...
Create a MULTI_CHANNEL_END_POINT_GET command. @param nodeId the target node ID @return a DataFrame instance
[ "Create", "a", "MULTI_CHANNEL_END_POINT_GET", "command", "." ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/commandclass/MultiInstanceCommandClass.java#L273-L286
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/commandclass/MultiInstanceCommandClass.java
MultiInstanceCommandClass.createMultiChannelCapabilityGet
public DataFrame createMultiChannelCapabilityGet(byte nodeId, byte endPoint) { if (getVersion() < 2) { throw new ZWaveRuntimeException("MULTI_CHANNEL_CAPABILITY_GET is not available in command class version 1"); } return createSendDataFrame( "MULTI_CHANNEL_CAPABILITY_GET"...
java
public DataFrame createMultiChannelCapabilityGet(byte nodeId, byte endPoint) { if (getVersion() < 2) { throw new ZWaveRuntimeException("MULTI_CHANNEL_CAPABILITY_GET is not available in command class version 1"); } return createSendDataFrame( "MULTI_CHANNEL_CAPABILITY_GET"...
[ "public", "DataFrame", "createMultiChannelCapabilityGet", "(", "byte", "nodeId", ",", "byte", "endPoint", ")", "{", "if", "(", "getVersion", "(", ")", "<", "2", ")", "{", "throw", "new", "ZWaveRuntimeException", "(", "\"MULTI_CHANNEL_CAPABILITY_GET is not available in...
Create a MULTI_CHANNEL_CAPABILITY_GET command. @param nodeId the target node ID @param endPoint the endpoint ID @return a DataFrame instance
[ "Create", "a", "MULTI_CHANNEL_CAPABILITY_GET", "command", "." ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/commandclass/MultiInstanceCommandClass.java#L296-L310
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/frame/transaction/AbstractDataFrameTransaction.java
AbstractDataFrameTransaction.attemptResend
boolean attemptResend(ZWaveChannelContext ctx, boolean dueToCAN) { if (startFrame.getSendCount() < MAX_SEND_COUNT) { logger.debug("Transaction {} has failed - will reset and resend initial request", getId()); reset(); // if a CAN was received, then we decrement the send count...
java
boolean attemptResend(ZWaveChannelContext ctx, boolean dueToCAN) { if (startFrame.getSendCount() < MAX_SEND_COUNT) { logger.debug("Transaction {} has failed - will reset and resend initial request", getId()); reset(); // if a CAN was received, then we decrement the send count...
[ "boolean", "attemptResend", "(", "ZWaveChannelContext", "ctx", ",", "boolean", "dueToCAN", ")", "{", "if", "(", "startFrame", ".", "getSendCount", "(", ")", "<", "MAX_SEND_COUNT", ")", "{", "logger", ".", "debug", "(", "\"Transaction {} has failed - will reset and r...
Attempts to re-send the data frame that initiated this transaction. @param ctx the ChannelHandlerContext @param dueToCAN indicates whether the re-send attempt was due to a CAN frame that was received @return boolean indicating whether re-send was attempted
[ "Attempts", "to", "re", "-", "send", "the", "data", "frame", "that", "initiated", "this", "transaction", "." ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/frame/transaction/AbstractDataFrameTransaction.java#L71-L86
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/commandclass/CommandClass.java
CommandClass.restore
public Map<String,Object> restore(PersistenceContext ctx, byte nodeId) { Map<String,Object> map = ctx.getCommandClassMap(nodeId, getId()); this.version = (int)map.get("version"); return map; }
java
public Map<String,Object> restore(PersistenceContext ctx, byte nodeId) { Map<String,Object> map = ctx.getCommandClassMap(nodeId, getId()); this.version = (int)map.get("version"); return map; }
[ "public", "Map", "<", "String", ",", "Object", ">", "restore", "(", "PersistenceContext", "ctx", ",", "byte", "nodeId", ")", "{", "Map", "<", "String", ",", "Object", ">", "map", "=", "ctx", ".", "getCommandClassMap", "(", "nodeId", ",", "getId", "(", ...
Restores details about this command class from a persistence context. @param ctx the persistence context @param nodeId the node ID associated with this command class @return a Map with the command class properties
[ "Restores", "details", "about", "this", "command", "class", "from", "a", "persistence", "context", "." ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/commandclass/CommandClass.java#L72-L76
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/commandclass/CommandClass.java
CommandClass.save
public Map<String,Object> save(PersistenceContext ctx, byte nodeId) { Map<String,Object> map = ctx.getCommandClassMap(nodeId, getId()); map.put("version", getVersion()); return map; }
java
public Map<String,Object> save(PersistenceContext ctx, byte nodeId) { Map<String,Object> map = ctx.getCommandClassMap(nodeId, getId()); map.put("version", getVersion()); return map; }
[ "public", "Map", "<", "String", ",", "Object", ">", "save", "(", "PersistenceContext", "ctx", ",", "byte", "nodeId", ")", "{", "Map", "<", "String", ",", "Object", ">", "map", "=", "ctx", ".", "getCommandClassMap", "(", "nodeId", ",", "getId", "(", ")"...
Saves details about this command class to a persistence context. @param ctx the persistence context @param nodeId the node ID associated with this command class @return a Map with the command class properties
[ "Saves", "details", "about", "this", "command", "class", "to", "a", "persistence", "context", "." ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/commandclass/CommandClass.java#L86-L90
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/commandclass/CommandClass.java
CommandClass.createSendDataFrame
static protected DataFrame createSendDataFrame(String name, byte nodeId, byte[] data, boolean isResponseExpected) { return new SendData(name, nodeId, data, (byte)(SendData.TRANSMIT_OPTION_ACK | SendData.TRANSMIT_OPTION_AUTO_ROUTE), isResponseExpected); }
java
static protected DataFrame createSendDataFrame(String name, byte nodeId, byte[] data, boolean isResponseExpected) { return new SendData(name, nodeId, data, (byte)(SendData.TRANSMIT_OPTION_ACK | SendData.TRANSMIT_OPTION_AUTO_ROUTE), isResponseExpected); }
[ "static", "protected", "DataFrame", "createSendDataFrame", "(", "String", "name", ",", "byte", "nodeId", ",", "byte", "[", "]", "data", ",", "boolean", "isResponseExpected", ")", "{", "return", "new", "SendData", "(", "name", ",", "nodeId", ",", "data", ",",...
Convenience method for creating SendData frames @param name the name for logging purposes @param nodeId the destination node ID @param data the data portion of the SendData frame @param isResponseExpected indicates whether sending this data frame should require a response @return a DataFrame instance
[ "Convenience", "method", "for", "creating", "SendData", "frames" ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/commandclass/CommandClass.java#L136-L138
train
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/commandclass/MeterCommandClass.java
MeterCommandClass.createGet
public DataFrame createGet(byte nodeId, Scale s) { switch (getVersion()) { case 1: return createSendDataFrame("METER_GET", nodeId, new byte[]{MeterCommandClass.ID, METER_GET}, true); default: { byte scale = scaleToByte(s); byte b = (byte) (...
java
public DataFrame createGet(byte nodeId, Scale s) { switch (getVersion()) { case 1: return createSendDataFrame("METER_GET", nodeId, new byte[]{MeterCommandClass.ID, METER_GET}, true); default: { byte scale = scaleToByte(s); byte b = (byte) (...
[ "public", "DataFrame", "createGet", "(", "byte", "nodeId", ",", "Scale", "s", ")", "{", "switch", "(", "getVersion", "(", ")", ")", "{", "case", "1", ":", "return", "createSendDataFrame", "(", "\"METER_GET\"", ",", "nodeId", ",", "new", "byte", "[", "]",...
Create a Get data frame. @param nodeId the target node ID @param s the scale (null for version 1) @return a DataFrame instance
[ "Create", "a", "Get", "data", "frame", "." ]
b9dfec6b55515226edf9d772a89933b336397501
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/commandclass/MeterCommandClass.java#L180-L191
train
iwgang/FamiliarRecyclerView
library/src/main/java/cn/iwgang/familiarrecyclerview/FamiliarRecyclerView.java
FamiliarRecyclerView.setOnHeadViewBindViewHolderListener
public void setOnHeadViewBindViewHolderListener(FamiliarRecyclerView.OnHeadViewBindViewHolderListener onHeadViewBindViewHolderListener) { if (null != mWrapFamiliarRecyclerViewAdapter) { mWrapFamiliarRecyclerViewAdapter.setOnHeadViewBindViewHolderListener(onHeadViewBindViewHolderListener); } ...
java
public void setOnHeadViewBindViewHolderListener(FamiliarRecyclerView.OnHeadViewBindViewHolderListener onHeadViewBindViewHolderListener) { if (null != mWrapFamiliarRecyclerViewAdapter) { mWrapFamiliarRecyclerViewAdapter.setOnHeadViewBindViewHolderListener(onHeadViewBindViewHolderListener); } ...
[ "public", "void", "setOnHeadViewBindViewHolderListener", "(", "FamiliarRecyclerView", ".", "OnHeadViewBindViewHolderListener", "onHeadViewBindViewHolderListener", ")", "{", "if", "(", "null", "!=", "mWrapFamiliarRecyclerViewAdapter", ")", "{", "mWrapFamiliarRecyclerViewAdapter", ...
HeadView onBindViewHolder callback @param onHeadViewBindViewHolderListener OnHeadViewBindViewHolderListener
[ "HeadView", "onBindViewHolder", "callback" ]
e1254ead7ef081a7212e95921806ece6522e5f50
https://github.com/iwgang/FamiliarRecyclerView/blob/e1254ead7ef081a7212e95921806ece6522e5f50/library/src/main/java/cn/iwgang/familiarrecyclerview/FamiliarRecyclerView.java#L611-L617
train
iwgang/FamiliarRecyclerView
library/src/main/java/cn/iwgang/familiarrecyclerview/FamiliarRecyclerView.java
FamiliarRecyclerView.setOnFooterViewBindViewHolderListener
public void setOnFooterViewBindViewHolderListener(FamiliarRecyclerView.OnFooterViewBindViewHolderListener onFooterViewBindViewHolderListener) { if (null != mWrapFamiliarRecyclerViewAdapter) { mWrapFamiliarRecyclerViewAdapter.setOnFooterViewBindViewHolderListener(onFooterViewBindViewHolderListener); ...
java
public void setOnFooterViewBindViewHolderListener(FamiliarRecyclerView.OnFooterViewBindViewHolderListener onFooterViewBindViewHolderListener) { if (null != mWrapFamiliarRecyclerViewAdapter) { mWrapFamiliarRecyclerViewAdapter.setOnFooterViewBindViewHolderListener(onFooterViewBindViewHolderListener); ...
[ "public", "void", "setOnFooterViewBindViewHolderListener", "(", "FamiliarRecyclerView", ".", "OnFooterViewBindViewHolderListener", "onFooterViewBindViewHolderListener", ")", "{", "if", "(", "null", "!=", "mWrapFamiliarRecyclerViewAdapter", ")", "{", "mWrapFamiliarRecyclerViewAdapte...
FooterView onBindViewHolder callback @param onFooterViewBindViewHolderListener OnFooterViewBindViewHolderListener
[ "FooterView", "onBindViewHolder", "callback" ]
e1254ead7ef081a7212e95921806ece6522e5f50
https://github.com/iwgang/FamiliarRecyclerView/blob/e1254ead7ef081a7212e95921806ece6522e5f50/library/src/main/java/cn/iwgang/familiarrecyclerview/FamiliarRecyclerView.java#L624-L630
train
iwgang/FamiliarRecyclerView
library/src/main/java/cn/iwgang/familiarrecyclerview/FamiliarRefreshRecyclerView.java
FamiliarRefreshRecyclerView.autoRefresh
public void autoRefresh() { if (!isPullRefreshEnabled) return; setRefreshing(true); new android.os.Handler().postDelayed(new Runnable() { @Override public void run() { callOnPullRefresh(); } }, 1000); }
java
public void autoRefresh() { if (!isPullRefreshEnabled) return; setRefreshing(true); new android.os.Handler().postDelayed(new Runnable() { @Override public void run() { callOnPullRefresh(); } }, 1000); }
[ "public", "void", "autoRefresh", "(", ")", "{", "if", "(", "!", "isPullRefreshEnabled", ")", "return", ";", "setRefreshing", "(", "true", ")", ";", "new", "android", ".", "os", ".", "Handler", "(", ")", ".", "postDelayed", "(", "new", "Runnable", "(", ...
Automatic pull refresh
[ "Automatic", "pull", "refresh" ]
e1254ead7ef081a7212e95921806ece6522e5f50
https://github.com/iwgang/FamiliarRecyclerView/blob/e1254ead7ef081a7212e95921806ece6522e5f50/library/src/main/java/cn/iwgang/familiarrecyclerview/FamiliarRefreshRecyclerView.java#L75-L85
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java
AbstractMojo.readRules
protected RuleSet readRules(MavenProject rootModule) throws MojoExecutionException { List<RuleSource> sources = new ArrayList<>(); PluginRepository pluginRepository = pluginRepositoryProvider.getPluginRepository(); if (rulesUrl != null) { getLog().debug("Retrieving rules from URL " +...
java
protected RuleSet readRules(MavenProject rootModule) throws MojoExecutionException { List<RuleSource> sources = new ArrayList<>(); PluginRepository pluginRepository = pluginRepositoryProvider.getPluginRepository(); if (rulesUrl != null) { getLog().debug("Retrieving rules from URL " +...
[ "protected", "RuleSet", "readRules", "(", "MavenProject", "rootModule", ")", "throws", "MojoExecutionException", "{", "List", "<", "RuleSource", ">", "sources", "=", "new", "ArrayList", "<>", "(", ")", ";", "PluginRepository", "pluginRepository", "=", "pluginReposit...
Reads the available rules from the rules directory and deployed catalogs. @return A rule set. . @throws MojoExecutionException If the rules cannot be read.
[ "Reads", "the", "available", "rules", "from", "the", "rules", "directory", "and", "deployed", "catalogs", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java#L268-L296
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java
AbstractMojo.addRuleFiles
private void addRuleFiles(List<RuleSource> sources, File directory) throws MojoExecutionException { List<RuleSource> ruleSources = readRulesDirectory(directory); for (RuleSource ruleSource : ruleSources) { getLog().debug("Adding rules from file " + ruleSource); sources.add(ruleSo...
java
private void addRuleFiles(List<RuleSource> sources, File directory) throws MojoExecutionException { List<RuleSource> ruleSources = readRulesDirectory(directory); for (RuleSource ruleSource : ruleSources) { getLog().debug("Adding rules from file " + ruleSource); sources.add(ruleSo...
[ "private", "void", "addRuleFiles", "(", "List", "<", "RuleSource", ">", "sources", ",", "File", "directory", ")", "throws", "MojoExecutionException", "{", "List", "<", "RuleSource", ">", "ruleSources", "=", "readRulesDirectory", "(", "directory", ")", ";", "for"...
Add rules from the given directory to the list of sources. @param sources The sources. @param directory The directory. @throws MojoExecutionException On error.
[ "Add", "rules", "from", "the", "given", "directory", "to", "the", "list", "of", "sources", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java#L327-L333
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java
AbstractMojo.readRulesDirectory
private List<RuleSource> readRulesDirectory(File rulesDirectory) throws MojoExecutionException { if (rulesDirectory.exists() && !rulesDirectory.isDirectory()) { throw new MojoExecutionException(rulesDirectory.getAbsolutePath() + " does not exist or is not a directory."); } getLog().i...
java
private List<RuleSource> readRulesDirectory(File rulesDirectory) throws MojoExecutionException { if (rulesDirectory.exists() && !rulesDirectory.isDirectory()) { throw new MojoExecutionException(rulesDirectory.getAbsolutePath() + " does not exist or is not a directory."); } getLog().i...
[ "private", "List", "<", "RuleSource", ">", "readRulesDirectory", "(", "File", "rulesDirectory", ")", "throws", "MojoExecutionException", "{", "if", "(", "rulesDirectory", ".", "exists", "(", ")", "&&", "!", "rulesDirectory", ".", "isDirectory", "(", ")", ")", ...
Retrieves the list of available rules from the rules directory. @param rulesDirectory The rules directory. @return The {@link java.util.List} of available rules {@link java.io.File}s. @throws MojoExecutionException If the rules directory cannot be read.
[ "Retrieves", "the", "list", "of", "available", "rules", "from", "the", "rules", "directory", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java#L343-L353
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java
AbstractMojo.execute
protected void execute(StoreOperation storeOperation, MavenProject rootModule, Set<MavenProject> executedModules) throws MojoExecutionException, MojoFailureException { synchronized (cachingStoreProvider) { Store store = getStore(rootModule); if (isResetStoreBeforeExecution() ...
java
protected void execute(StoreOperation storeOperation, MavenProject rootModule, Set<MavenProject> executedModules) throws MojoExecutionException, MojoFailureException { synchronized (cachingStoreProvider) { Store store = getStore(rootModule); if (isResetStoreBeforeExecution() ...
[ "protected", "void", "execute", "(", "StoreOperation", "storeOperation", ",", "MavenProject", "rootModule", ",", "Set", "<", "MavenProject", ">", "executedModules", ")", "throws", "MojoExecutionException", ",", "MojoFailureException", "{", "synchronized", "(", "cachingS...
Execute an operation with the store. This method enforces thread safety based on the store factory. @param storeOperation The store. @param rootModule The root module to use for store initialization. @throws MojoExecutionException On execution errors. @throws MojoFailureException On execution failures.
[ "Execute", "an", "operation", "with", "the", "store", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java#L365-L377
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java
AbstractMojo.getExecutedModules
protected Set<MavenProject> getExecutedModules(MavenProject rootModule) { String executionKey = createExecutionKey( execution ); String executedModulesContextKey = AbstractProjectMojo.class.getName() + "#executedModules"; Map<String, Set<MavenProject>> executedProjectsPerExecutionKey = ...
java
protected Set<MavenProject> getExecutedModules(MavenProject rootModule) { String executionKey = createExecutionKey( execution ); String executedModulesContextKey = AbstractProjectMojo.class.getName() + "#executedModules"; Map<String, Set<MavenProject>> executedProjectsPerExecutionKey = ...
[ "protected", "Set", "<", "MavenProject", ">", "getExecutedModules", "(", "MavenProject", "rootModule", ")", "{", "String", "executionKey", "=", "createExecutionKey", "(", "execution", ")", ";", "String", "executedModulesContextKey", "=", "AbstractProjectMojo", ".", "c...
Determine the already executed modules for a given root module. @param rootModule The root module. @return The set of already executed modules belonging to the root module.
[ "Determine", "the", "already", "executed", "modules", "for", "a", "given", "root", "module", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java#L385-L400
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java
AbstractMojo.getStore
private Store getStore(MavenProject rootModule) throws MojoExecutionException { StoreConfiguration configuration = getStoreConfiguration(rootModule); List<Class<?>> descriptorTypes; try { descriptorTypes = pluginRepositoryProvider.getPluginRepository().getModelPluginRepository().getD...
java
private Store getStore(MavenProject rootModule) throws MojoExecutionException { StoreConfiguration configuration = getStoreConfiguration(rootModule); List<Class<?>> descriptorTypes; try { descriptorTypes = pluginRepositoryProvider.getPluginRepository().getModelPluginRepository().getD...
[ "private", "Store", "getStore", "(", "MavenProject", "rootModule", ")", "throws", "MojoExecutionException", "{", "StoreConfiguration", "configuration", "=", "getStoreConfiguration", "(", "rootModule", ")", ";", "List", "<", "Class", "<", "?", ">", ">", "descriptorTy...
Determine the store instance to use for the given root module. @param rootModule The root module. @return The store instance. @throws MojoExecutionException If the store cannot be opened.
[ "Determine", "the", "store", "instance", "to", "use", "for", "the", "given", "root", "module", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java#L409-L424
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java
AbstractMojo.getEmbeddedNeo4jConfiguration
private EmbeddedNeo4jConfiguration getEmbeddedNeo4jConfiguration() { OptionHelper.verifyDeprecatedOption(PARAMETER_SERVER_ADDRESS, this.serverAddress, PARAMETER_EMBEDDED_LISTEN_ADDRESS); OptionHelper.verifyDeprecatedOption(PARAMETER_SERVER_PORT, this.serverPort, PARAMETER_EMBEDDED_HTTP_PORT); Em...
java
private EmbeddedNeo4jConfiguration getEmbeddedNeo4jConfiguration() { OptionHelper.verifyDeprecatedOption(PARAMETER_SERVER_ADDRESS, this.serverAddress, PARAMETER_EMBEDDED_LISTEN_ADDRESS); OptionHelper.verifyDeprecatedOption(PARAMETER_SERVER_PORT, this.serverPort, PARAMETER_EMBEDDED_HTTP_PORT); Em...
[ "private", "EmbeddedNeo4jConfiguration", "getEmbeddedNeo4jConfiguration", "(", ")", "{", "OptionHelper", ".", "verifyDeprecatedOption", "(", "PARAMETER_SERVER_ADDRESS", ",", "this", ".", "serverAddress", ",", "PARAMETER_EMBEDDED_LISTEN_ADDRESS", ")", ";", "OptionHelper", ".",...
Create the configuration for the embedded server.
[ "Create", "the", "configuration", "for", "the", "embedded", "server", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java#L472-L484
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/ProjectResolver.java
ProjectResolver.getProjects
static Map<MavenProject, List<MavenProject>> getProjects(List<MavenProject> reactorProjects, String rulesDirectory, boolean useExecutionRootAsProjectRoot) throws MojoExecutionException { Map<MavenProject, List<MavenProject>> rootModules = new HashMap<...
java
static Map<MavenProject, List<MavenProject>> getProjects(List<MavenProject> reactorProjects, String rulesDirectory, boolean useExecutionRootAsProjectRoot) throws MojoExecutionException { Map<MavenProject, List<MavenProject>> rootModules = new HashMap<...
[ "static", "Map", "<", "MavenProject", ",", "List", "<", "MavenProject", ">", ">", "getProjects", "(", "List", "<", "MavenProject", ">", "reactorProjects", ",", "String", "rulesDirectory", ",", "boolean", "useExecutionRootAsProjectRoot", ")", "throws", "MojoExecution...
Aggregate projects to their base projects @param reactorProjects The current reactor projects. @param rulesDirectory The configured rules directory. @param useExecutionRootAsProjectRoot <code>true</code> if the execution root shall be used as project root. @return A map containing resolved...
[ "Aggregate", "projects", "to", "their", "base", "projects" ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/ProjectResolver.java#L96-L110
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/ProjectResolver.java
ProjectResolver.getRulesDirectory
static File getRulesDirectory(MavenProject rootModule, String rulesDirectory) { File rules = new File(rulesDirectory); return rules.isAbsolute() ? rules : new File(rootModule.getBasedir().getAbsolutePath() + File.separator + rulesDirectory); }
java
static File getRulesDirectory(MavenProject rootModule, String rulesDirectory) { File rules = new File(rulesDirectory); return rules.isAbsolute() ? rules : new File(rootModule.getBasedir().getAbsolutePath() + File.separator + rulesDirectory); }
[ "static", "File", "getRulesDirectory", "(", "MavenProject", "rootModule", ",", "String", "rulesDirectory", ")", "{", "File", "rules", "=", "new", "File", "(", "rulesDirectory", ")", ";", "return", "rules", ".", "isAbsolute", "(", ")", "?", "rules", ":", "new...
Returns the directory containing rules. @param rootModule The root module of the project. @param rulesDirectory The name of the directory used for identifying the root module. @return The file representing the directory.
[ "Returns", "the", "directory", "containing", "rules", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/ProjectResolver.java#L130-L133
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/ProjectResolver.java
ProjectResolver.getOutputDirectory
static File getOutputDirectory(MavenProject rootModule) { String directoryName = rootModule.getBuild().getDirectory() + "/" + OUTPUT_DIRECTORY; File directory = new File(directoryName); directory.mkdirs(); return directory; }
java
static File getOutputDirectory(MavenProject rootModule) { String directoryName = rootModule.getBuild().getDirectory() + "/" + OUTPUT_DIRECTORY; File directory = new File(directoryName); directory.mkdirs(); return directory; }
[ "static", "File", "getOutputDirectory", "(", "MavenProject", "rootModule", ")", "{", "String", "directoryName", "=", "rootModule", ".", "getBuild", "(", ")", ".", "getDirectory", "(", ")", "+", "\"/\"", "+", "OUTPUT_DIRECTORY", ";", "File", "directory", "=", "...
Determines the directory for writing output files. @param rootModule The root module of the project. @return The report directory.
[ "Determines", "the", "directory", "for", "writing", "output", "files", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/ProjectResolver.java#L141-L146
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/ProjectResolver.java
ProjectResolver.getOutputFile
static File getOutputFile(MavenProject rootModule, File reportFile, String defaultFile) throws MojoExecutionException { File selectedXmlReportFile; if (reportFile != null) { selectedXmlReportFile = reportFile; } else if (rootModule != null) { selectedXmlReportFile = new F...
java
static File getOutputFile(MavenProject rootModule, File reportFile, String defaultFile) throws MojoExecutionException { File selectedXmlReportFile; if (reportFile != null) { selectedXmlReportFile = reportFile; } else if (rootModule != null) { selectedXmlReportFile = new F...
[ "static", "File", "getOutputFile", "(", "MavenProject", "rootModule", ",", "File", "reportFile", ",", "String", "defaultFile", ")", "throws", "MojoExecutionException", "{", "File", "selectedXmlReportFile", ";", "if", "(", "reportFile", "!=", "null", ")", "{", "sel...
Determines a report file name. @param rootModule The base project. @param reportFile The report file as specified in the pom.xml file or on the command line. @return The resolved {@link java.io.File}. @throws MojoExecutionException If the file cannot be determined.
[ "Determines", "a", "report", "file", "name", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/ProjectResolver.java#L156-L166
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/ScanMojo.java
ScanMojo.getPluginProperties
protected Map<String, Object> getPluginProperties() { Map<String, Object> properties = new HashMap<>(); if (scanProperties != null) { properties.putAll(scanProperties); } properties.put(ScanInclude.class.getName(), scanIncludes); return properties; }
java
protected Map<String, Object> getPluginProperties() { Map<String, Object> properties = new HashMap<>(); if (scanProperties != null) { properties.putAll(scanProperties); } properties.put(ScanInclude.class.getName(), scanIncludes); return properties; }
[ "protected", "Map", "<", "String", ",", "Object", ">", "getPluginProperties", "(", ")", "{", "Map", "<", "String", ",", "Object", ">", "properties", "=", "new", "HashMap", "<>", "(", ")", ";", "if", "(", "scanProperties", "!=", "null", ")", "{", "prope...
Return the plugin properties. @return The plugin properties.
[ "Return", "the", "plugin", "properties", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/ScanMojo.java#L82-L89
train
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/AbstractProjectMojo.java
AbstractProjectMojo.isLastModuleInProject
private boolean isLastModuleInProject(Set<MavenProject> executedModules, List<MavenProject> projectModules) { Set<MavenProject> remainingModules = new HashSet<>(); if (execution.getPlugin().getExecutions().isEmpty()) { getLog().debug("No configured executions found, assuming CLI invocation."...
java
private boolean isLastModuleInProject(Set<MavenProject> executedModules, List<MavenProject> projectModules) { Set<MavenProject> remainingModules = new HashSet<>(); if (execution.getPlugin().getExecutions().isEmpty()) { getLog().debug("No configured executions found, assuming CLI invocation."...
[ "private", "boolean", "isLastModuleInProject", "(", "Set", "<", "MavenProject", ">", "executedModules", ",", "List", "<", "MavenProject", ">", "projectModules", ")", "{", "Set", "<", "MavenProject", ">", "remainingModules", "=", "new", "HashSet", "<>", "(", ")",...
Determines if the last module for a project is currently executed. @param projectModules The modules of the project. @return <code>true</code> if the current module is the last of the project.
[ "Determines", "if", "the", "last", "module", "for", "a", "project", "is", "currently", "executed", "." ]
5c21a8058fc1b013333081907fbf00d3525e11c3
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractProjectMojo.java#L45-L73
train
m9aertner/PBKDF2
src/main/java/de/rtner/security/auth/spi/SimplePBKDF2.java
SimplePBKDF2.deriveKeyFormatted
public String deriveKeyFormatted(String inputPassword) { PBKDF2Parameters p = getParameters(); byte[] salt = generateSalt(); p.setSalt(salt); p.setDerivedKey(deriveKey(inputPassword)); String formatted = getFormatter().toString(p); return formatted; }
java
public String deriveKeyFormatted(String inputPassword) { PBKDF2Parameters p = getParameters(); byte[] salt = generateSalt(); p.setSalt(salt); p.setDerivedKey(deriveKey(inputPassword)); String formatted = getFormatter().toString(p); return formatted; }
[ "public", "String", "deriveKeyFormatted", "(", "String", "inputPassword", ")", "{", "PBKDF2Parameters", "p", "=", "getParameters", "(", ")", ";", "byte", "[", "]", "salt", "=", "generateSalt", "(", ")", ";", "p", ".", "setSalt", "(", "salt", ")", ";", "p...
Derive key from password, then format. @param inputPassword The password to derive key from. @return &quot;salt:iteration-count:derived-key&quot; (depends on effective formatter)
[ "Derive", "key", "from", "password", "then", "format", "." ]
b84511bb78848106c0f778136d9f01870c957722
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/main/java/de/rtner/security/auth/spi/SimplePBKDF2.java#L119-L126
train
m9aertner/PBKDF2
src/main/java/de/rtner/security/auth/spi/SimplePBKDF2.java
SimplePBKDF2.verifyKeyFormatted
public boolean verifyKeyFormatted(String formatted, String candidatePassword) { // Parameter as member of Engine was not the smartest design decision back then... PBKDF2Parameters p = getParameters(); PBKDF2Parameters q = new PBKDF2Parameters(); q.hashAlgorithm = p.hashAlgorithm; q.hashCharset = p.hashCharse...
java
public boolean verifyKeyFormatted(String formatted, String candidatePassword) { // Parameter as member of Engine was not the smartest design decision back then... PBKDF2Parameters p = getParameters(); PBKDF2Parameters q = new PBKDF2Parameters(); q.hashAlgorithm = p.hashAlgorithm; q.hashCharset = p.hashCharse...
[ "public", "boolean", "verifyKeyFormatted", "(", "String", "formatted", ",", "String", "candidatePassword", ")", "{", "// Parameter as member of Engine was not the smartest design decision back then...", "PBKDF2Parameters", "p", "=", "getParameters", "(", ")", ";", "PBKDF2Parame...
Verification function. @param formatted &quot;salt:iteration-count:derived-key&quot; (depends on effective formatter). This value should come from server-side storage. @param candidatePassword The password that is checked against the formatted reference data. This value will usually be supplied by the &quot;user&quot;...
[ "Verification", "function", "." ]
b84511bb78848106c0f778136d9f01870c957722
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/main/java/de/rtner/security/auth/spi/SimplePBKDF2.java#L154-L170
train
m9aertner/PBKDF2
src/jboss/java/de/rtner/security/auth/spi/SaltedDatabaseServerLoginModule.java
SaltedDatabaseServerLoginModule.validatePassword
@Override protected boolean validatePassword(String inputPassword, String expectedPassword) { boolean verifyOK = false; for(;;) { // single point of exit if (inputPassword == null || expectedPassword == null) { break; } PBKDF2Parameters p = getEngineParameters(); ...
java
@Override protected boolean validatePassword(String inputPassword, String expectedPassword) { boolean verifyOK = false; for(;;) { // single point of exit if (inputPassword == null || expectedPassword == null) { break; } PBKDF2Parameters p = getEngineParameters(); ...
[ "@", "Override", "protected", "boolean", "validatePassword", "(", "String", "inputPassword", ",", "String", "expectedPassword", ")", "{", "boolean", "verifyOK", "=", "false", ";", "for", "(", ";", ";", ")", "{", "// single point of exit", "if", "(", "inputPasswo...
Actual salt-enabled verification function. Get parameters from database 'password', then compute candidate derived key from user-supplied password and parameters, then compare database derived key and candidate derived key. Login if match. @param inputPassword Password that was supplied by user (candidate password) @p...
[ "Actual", "salt", "-", "enabled", "verification", "function", ".", "Get", "parameters", "from", "database", "password", "then", "compute", "candidate", "derived", "key", "from", "user", "-", "supplied", "password", "and", "parameters", "then", "compare", "database...
b84511bb78848106c0f778136d9f01870c957722
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/jboss/java/de/rtner/security/auth/spi/SaltedDatabaseServerLoginModule.java#L161-L191
train
m9aertner/PBKDF2
src/main/java/de/rtner/security/auth/spi/PBKDF2Engine.java
PBKDF2Engine.PBKDF2
protected byte[] PBKDF2(PRF prf, byte[] S, int c, int dkLen) { if (S == null) { S = new byte[0]; } int hLen = prf.getHLen(); int l = ceil(dkLen, hLen); int r = dkLen - (l - 1) * hLen; byte T[] = new byte[l * hLen]; int ti_offset = 0; ...
java
protected byte[] PBKDF2(PRF prf, byte[] S, int c, int dkLen) { if (S == null) { S = new byte[0]; } int hLen = prf.getHLen(); int l = ceil(dkLen, hLen); int r = dkLen - (l - 1) * hLen; byte T[] = new byte[l * hLen]; int ti_offset = 0; ...
[ "protected", "byte", "[", "]", "PBKDF2", "(", "PRF", "prf", ",", "byte", "[", "]", "S", ",", "int", "c", ",", "int", "dkLen", ")", "{", "if", "(", "S", "==", "null", ")", "{", "S", "=", "new", "byte", "[", "0", "]", ";", "}", "int", "hLen",...
Core Password Based Key Derivation Function 2. @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2</a> @param prf Pseudo Random Function (i.e. HmacSHA1) @param S Salt as array of bytes. <code>null</code> means no salt. @param c Iteration count (see RFC 2898 4.2) @param dkLen desired length of derived key. @...
[ "Core", "Password", "Based", "Key", "Derivation", "Function", "2", "." ]
b84511bb78848106c0f778136d9f01870c957722
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/main/java/de/rtner/security/auth/spi/PBKDF2Engine.java#L206-L230
train
m9aertner/PBKDF2
src/main/java/de/rtner/security/auth/spi/PBKDF2Engine.java
PBKDF2Engine.ceil
protected int ceil(int a, int b) { int m = 0; if (a % b > 0) { m = 1; } return a / b + m; }
java
protected int ceil(int a, int b) { int m = 0; if (a % b > 0) { m = 1; } return a / b + m; }
[ "protected", "int", "ceil", "(", "int", "a", ",", "int", "b", ")", "{", "int", "m", "=", "0", ";", "if", "(", "a", "%", "b", ">", "0", ")", "{", "m", "=", "1", ";", "}", "return", "a", "/", "b", "+", "m", ";", "}" ]
Integer division with ceiling function. @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step 2.</a> @param a Numerator @param b Denominator @return ceil(a/b)
[ "Integer", "division", "with", "ceiling", "function", "." ]
b84511bb78848106c0f778136d9f01870c957722
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/main/java/de/rtner/security/auth/spi/PBKDF2Engine.java#L240-L248
train
m9aertner/PBKDF2
src/main/java/de/rtner/security/auth/spi/PBKDF2Engine.java
PBKDF2Engine._F
protected void _F(byte[] dest, int offset, PRF prf, byte[] S, int c, int blockIndex) { int hLen = prf.getHLen(); byte U_r[] = new byte[hLen]; // U0 = S || INT (i); byte U_i[] = new byte[S.length + 4]; System.arraycopy(S, 0, U_i, 0, S.length); INT(U_i, S.l...
java
protected void _F(byte[] dest, int offset, PRF prf, byte[] S, int c, int blockIndex) { int hLen = prf.getHLen(); byte U_r[] = new byte[hLen]; // U0 = S || INT (i); byte U_i[] = new byte[S.length + 4]; System.arraycopy(S, 0, U_i, 0, S.length); INT(U_i, S.l...
[ "protected", "void", "_F", "(", "byte", "[", "]", "dest", ",", "int", "offset", ",", "PRF", "prf", ",", "byte", "[", "]", "S", ",", "int", "c", ",", "int", "blockIndex", ")", "{", "int", "hLen", "=", "prf", ".", "getHLen", "(", ")", ";", "byte"...
Function F. @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step 3.</a> @param dest Destination byte buffer @param offset Offset into destination byte buffer @param prf Pseudo Random Function @param S Salt as array of bytes @param c Iteration count @param blockIndex The block index (&gt;= 1).
[ "Function", "F", "." ]
b84511bb78848106c0f778136d9f01870c957722
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/main/java/de/rtner/security/auth/spi/PBKDF2Engine.java#L267-L284
train
m9aertner/PBKDF2
src/main/java/de/rtner/security/auth/spi/PBKDF2Engine.java
PBKDF2Engine.xor
protected void xor(byte[] dest, byte[] src) { for (int i = 0; i < dest.length; i++) { dest[i] ^= src[i]; } }
java
protected void xor(byte[] dest, byte[] src) { for (int i = 0; i < dest.length; i++) { dest[i] ^= src[i]; } }
[ "protected", "void", "xor", "(", "byte", "[", "]", "dest", ",", "byte", "[", "]", "src", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "dest", ".", "length", ";", "i", "++", ")", "{", "dest", "[", "i", "]", "^=", "src", "[", ...
Block-Xor. Xor source bytes into destination byte buffer. Destination buffer must be same length or less than source buffer. @param dest destination byte buffer @param src source bytes
[ "Block", "-", "Xor", ".", "Xor", "source", "bytes", "into", "destination", "byte", "buffer", ".", "Destination", "buffer", "must", "be", "same", "length", "or", "less", "than", "source", "buffer", "." ]
b84511bb78848106c0f778136d9f01870c957722
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/main/java/de/rtner/security/auth/spi/PBKDF2Engine.java#L293-L299
train
m9aertner/PBKDF2
src/main/java/de/rtner/security/auth/spi/PBKDF2Engine.java
PBKDF2Engine.INT
protected void INT(byte[] dest, int offset, int i) { dest[offset + 0] = (byte) (i / (256 * 256 * 256)); dest[offset + 1] = (byte) (i / (256 * 256)); dest[offset + 2] = (byte) (i / (256)); dest[offset + 3] = (byte) (i); }
java
protected void INT(byte[] dest, int offset, int i) { dest[offset + 0] = (byte) (i / (256 * 256 * 256)); dest[offset + 1] = (byte) (i / (256 * 256)); dest[offset + 2] = (byte) (i / (256)); dest[offset + 3] = (byte) (i); }
[ "protected", "void", "INT", "(", "byte", "[", "]", "dest", ",", "int", "offset", ",", "int", "i", ")", "{", "dest", "[", "offset", "+", "0", "]", "=", "(", "byte", ")", "(", "i", "/", "(", "256", "*", "256", "*", "256", ")", ")", ";", "dest...
Four-octet encoding of the integer i, most significant octet first. @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step 3.</a> @param dest destination byte buffer @param offset zero-based offset into dest @param i the integer to encode
[ "Four", "-", "octet", "encoding", "of", "the", "integer", "i", "most", "significant", "octet", "first", "." ]
b84511bb78848106c0f778136d9f01870c957722
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/main/java/de/rtner/security/auth/spi/PBKDF2Engine.java#L309-L315
train
m9aertner/PBKDF2
src/main/java/de/rtner/misc/BinTools.java
BinTools.bin2hex
public static String bin2hex(final byte[] b) { if (b == null) { return ""; } StringBuffer sb = new StringBuffer(2 * b.length); for (int i = 0; i < b.length; i++) { int v = (256 + b[i]) % 256; sb.append(hex.charAt((v / 16) & 15)); ...
java
public static String bin2hex(final byte[] b) { if (b == null) { return ""; } StringBuffer sb = new StringBuffer(2 * b.length); for (int i = 0; i < b.length; i++) { int v = (256 + b[i]) % 256; sb.append(hex.charAt((v / 16) & 15)); ...
[ "public", "static", "String", "bin2hex", "(", "final", "byte", "[", "]", "b", ")", "{", "if", "(", "b", "==", "null", ")", "{", "return", "\"\"", ";", "}", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "2", "*", "b", ".", "length", ")", ...
Simple binary-to-hexadecimal conversion. @param b Input bytes. May be <code>null</code>. @return Hexadecimal representation of b. Uppercase A-F, two characters per byte. Empty string on <code>null</code> input.
[ "Simple", "binary", "-", "to", "-", "hexadecimal", "conversion", "." ]
b84511bb78848106c0f778136d9f01870c957722
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/main/java/de/rtner/misc/BinTools.java#L39-L53
train
m9aertner/PBKDF2
src/main/java/de/rtner/misc/BinTools.java
BinTools.hex2bin
public static byte[] hex2bin(final String s) { String m = s; if (s == null) { // Allow empty input string. m = ""; } else if (s.length() % 2 != 0) { // Assume leading zero for odd string length m = "0" + s; } ...
java
public static byte[] hex2bin(final String s) { String m = s; if (s == null) { // Allow empty input string. m = ""; } else if (s.length() % 2 != 0) { // Assume leading zero for odd string length m = "0" + s; } ...
[ "public", "static", "byte", "[", "]", "hex2bin", "(", "final", "String", "s", ")", "{", "String", "m", "=", "s", ";", "if", "(", "s", "==", "null", ")", "{", "// Allow empty input string.", "m", "=", "\"\"", ";", "}", "else", "if", "(", "s", ".", ...
Convert hex string to array of bytes. @param s String containing hexadecimal digits. May be <code>null</code>. On odd length leading zero will be assumed. @return Array on bytes, non-<code>null</code>. @throws IllegalArgumentException when string contains non-hex character
[ "Convert", "hex", "string", "to", "array", "of", "bytes", "." ]
b84511bb78848106c0f778136d9f01870c957722
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/main/java/de/rtner/misc/BinTools.java#L65-L86
train
m9aertner/PBKDF2
src/main/java/de/rtner/misc/BinTools.java
BinTools.hex2bin
public static int hex2bin(char c) { if (c >= '0' && c <= '9') { return (c - '0'); } if (c >= 'A' && c <= 'F') { return (c - 'A' + 10); } if (c >= 'a' && c <= 'f') { return (c - 'a' + 10); } throw new ...
java
public static int hex2bin(char c) { if (c >= '0' && c <= '9') { return (c - '0'); } if (c >= 'A' && c <= 'F') { return (c - 'A' + 10); } if (c >= 'a' && c <= 'f') { return (c - 'a' + 10); } throw new ...
[ "public", "static", "int", "hex2bin", "(", "char", "c", ")", "{", "if", "(", "c", ">=", "'", "'", "&&", "c", "<=", "'", "'", ")", "{", "return", "(", "c", "-", "'", "'", ")", ";", "}", "if", "(", "c", ">=", "'", "'", "&&", "c", "<=", "'...
Convert hex digit to numerical value. @param c 0-9, a-f, A-F allowd. @return 0-15 @throws IllegalArgumentException on non-hex character
[ "Convert", "hex", "digit", "to", "numerical", "value", "." ]
b84511bb78848106c0f778136d9f01870c957722
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/main/java/de/rtner/misc/BinTools.java#L97-L114
train
YahooArchive/samoa
samoa-api/src/main/java/com/yahoo/labs/samoa/learners/classifiers/rules/distributed/AMRulesAggregatorProcessor.java
AMRulesAggregatorProcessor.processInstanceEvent
private void processInstanceEvent(InstanceContentEvent instanceEvent) { Instance instance = instanceEvent.getInstance(); boolean predictionCovered = false; boolean trainingCovered = false; boolean continuePrediction = instanceEvent.isTesting(); boolean continueTraining = instanceEvent.isTraining(); Error...
java
private void processInstanceEvent(InstanceContentEvent instanceEvent) { Instance instance = instanceEvent.getInstance(); boolean predictionCovered = false; boolean trainingCovered = false; boolean continuePrediction = instanceEvent.isTesting(); boolean continueTraining = instanceEvent.isTraining(); Error...
[ "private", "void", "processInstanceEvent", "(", "InstanceContentEvent", "instanceEvent", ")", "{", "Instance", "instance", "=", "instanceEvent", ".", "getInstance", "(", ")", ";", "boolean", "predictionCovered", "=", "false", ";", "boolean", "trainingCovered", "=", ...
Merge predict and train so we only check for covering rules one time
[ "Merge", "predict", "and", "train", "so", "we", "only", "check", "for", "covering", "rules", "one", "time" ]
540a2c30167ac85c432b593baabd5ca97e7e8a0f
https://github.com/YahooArchive/samoa/blob/540a2c30167ac85c432b593baabd5ca97e7e8a0f/samoa-api/src/main/java/com/yahoo/labs/samoa/learners/classifiers/rules/distributed/AMRulesAggregatorProcessor.java#L144-L210
train
YahooArchive/samoa
samoa-api/src/main/java/com/yahoo/labs/samoa/learners/classifiers/rules/distributed/AMRulesAggregatorProcessor.java
AMRulesAggregatorProcessor.newResultContentEvent
private ResultContentEvent newResultContentEvent(double[] prediction, InstanceContentEvent inEvent){ ResultContentEvent rce = new ResultContentEvent(inEvent.getInstanceIndex(), inEvent.getInstance(), inEvent.getClassId(), prediction, inEvent.isLastEvent()); rce.setClassifierIndex(this.processorId); rce.setEvaluat...
java
private ResultContentEvent newResultContentEvent(double[] prediction, InstanceContentEvent inEvent){ ResultContentEvent rce = new ResultContentEvent(inEvent.getInstanceIndex(), inEvent.getInstance(), inEvent.getClassId(), prediction, inEvent.isLastEvent()); rce.setClassifierIndex(this.processorId); rce.setEvaluat...
[ "private", "ResultContentEvent", "newResultContentEvent", "(", "double", "[", "]", "prediction", ",", "InstanceContentEvent", "inEvent", ")", "{", "ResultContentEvent", "rce", "=", "new", "ResultContentEvent", "(", "inEvent", ".", "getInstanceIndex", "(", ")", ",", ...
Helper method to generate new ResultContentEvent based on an instance and its prediction result. @param prediction The predicted class label from the decision tree model. @param inEvent The associated instance content event @return ResultContentEvent to be sent into Evaluator PI or other destination PI.
[ "Helper", "method", "to", "generate", "new", "ResultContentEvent", "based", "on", "an", "instance", "and", "its", "prediction", "result", "." ]
540a2c30167ac85c432b593baabd5ca97e7e8a0f
https://github.com/YahooArchive/samoa/blob/540a2c30167ac85c432b593baabd5ca97e7e8a0f/samoa-api/src/main/java/com/yahoo/labs/samoa/learners/classifiers/rules/distributed/AMRulesAggregatorProcessor.java#L219-L224
train
YahooArchive/samoa
samoa-api/src/main/java/com/yahoo/labs/samoa/learners/clusterers/ClustreamClustererAdapter.java
ClustreamClustererAdapter.getVotesForInstance
@Override public double[] getVotesForInstance(Instance inst) { double[] ret; inst.setDataset(dataset); if (this.isInit == false) { ret = new double[dataset.numClasses()]; } else { ret = learner.getVotesForInstance(inst); } return ret; }
java
@Override public double[] getVotesForInstance(Instance inst) { double[] ret; inst.setDataset(dataset); if (this.isInit == false) { ret = new double[dataset.numClasses()]; } else { ret = learner.getVotesForInstance(inst); } return ret; }
[ "@", "Override", "public", "double", "[", "]", "getVotesForInstance", "(", "Instance", "inst", ")", "{", "double", "[", "]", "ret", ";", "inst", ".", "setDataset", "(", "dataset", ")", ";", "if", "(", "this", ".", "isInit", "==", "false", ")", "{", "...
Predicts the class memberships for a given instance. If an instance is unclassified, the returned array elements must be all zero. @param inst the instance to be classified @return an array containing the estimated membership probabilities of the test instance in each class
[ "Predicts", "the", "class", "memberships", "for", "a", "given", "instance", ".", "If", "an", "instance", "is", "unclassified", "the", "returned", "array", "elements", "must", "be", "all", "zero", "." ]
540a2c30167ac85c432b593baabd5ca97e7e8a0f
https://github.com/YahooArchive/samoa/blob/540a2c30167ac85c432b593baabd5ca97e7e8a0f/samoa-api/src/main/java/com/yahoo/labs/samoa/learners/clusterers/ClustreamClustererAdapter.java#L132-L142
train
YahooArchive/samoa
samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/S4ProcessingItem.java
S4ProcessingItem.getKeyFinder
private KeyFinder<S4Event> getKeyFinder() { KeyFinder<S4Event> keyFinder = new KeyFinder<S4Event>() { @Override public List<String> get(S4Event s4event) { List<String> results = new ArrayList<String>(); results.add(s4event.getKey()); return results; } }; return keyFinder; }
java
private KeyFinder<S4Event> getKeyFinder() { KeyFinder<S4Event> keyFinder = new KeyFinder<S4Event>() { @Override public List<String> get(S4Event s4event) { List<String> results = new ArrayList<String>(); results.add(s4event.getKey()); return results; } }; return keyFinder; }
[ "private", "KeyFinder", "<", "S4Event", ">", "getKeyFinder", "(", ")", "{", "KeyFinder", "<", "S4Event", ">", "keyFinder", "=", "new", "KeyFinder", "<", "S4Event", ">", "(", ")", "{", "@", "Override", "public", "List", "<", "String", ">", "get", "(", "...
KeyFinder sets the keys for a specific event. @return KeyFinder
[ "KeyFinder", "sets", "the", "keys", "for", "a", "specific", "event", "." ]
540a2c30167ac85c432b593baabd5ca97e7e8a0f
https://github.com/YahooArchive/samoa/blob/540a2c30167ac85c432b593baabd5ca97e7e8a0f/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/S4ProcessingItem.java#L123-L134
train
YahooArchive/samoa
samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/S4ProcessingItem.java
S4ProcessingItem.onCreate
@Override protected void onCreate() { logger.debug("PE ID {}", getId()); if (this.processor != null) { this.processor = this.processor.newProcessor(this.processor); this.processor.onCreate(Integer.parseInt(getId())); } }
java
@Override protected void onCreate() { logger.debug("PE ID {}", getId()); if (this.processor != null) { this.processor = this.processor.newProcessor(this.processor); this.processor.onCreate(Integer.parseInt(getId())); } }
[ "@", "Override", "protected", "void", "onCreate", "(", ")", "{", "logger", ".", "debug", "(", "\"PE ID {}\"", ",", "getId", "(", ")", ")", ";", "if", "(", "this", ".", "processor", "!=", "null", ")", "{", "this", ".", "processor", "=", "this", ".", ...
Methods from ProcessingElement
[ "Methods", "from", "ProcessingElement" ]
540a2c30167ac85c432b593baabd5ca97e7e8a0f
https://github.com/YahooArchive/samoa/blob/540a2c30167ac85c432b593baabd5ca97e7e8a0f/samoa-s4/src/main/java/com/yahoo/labs/samoa/topology/impl/S4ProcessingItem.java#L170-L177
train