id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
46,900
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newPredicate
public Predicate newPredicate(Span<Term> span) { String newId = idManager.getNextId(AnnotationType.PREDICATE); Predicate newPredicate = new Predicate(newId, span); annotationContainer.add(newPredicate, Layer.SRL, AnnotationType.PREDICATE); return newPredicate; }
java
public Predicate newPredicate(Span<Term> span) { String newId = idManager.getNextId(AnnotationType.PREDICATE); Predicate newPredicate = new Predicate(newId, span); annotationContainer.add(newPredicate, Layer.SRL, AnnotationType.PREDICATE); return newPredicate; }
[ "public", "Predicate", "newPredicate", "(", "Span", "<", "Term", ">", "span", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "PREDICATE", ")", ";", "Predicate", "newPredicate", "=", "new", "Predicate", "(", "newI...
Creates a new srl predicate. It assigns an appropriate ID to it. The predicate is added to the document. @param span span containing all the targets of the predicate @return a new predicate
[ "Creates", "a", "new", "srl", "predicate", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "The", "predicate", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1007-L1012
46,901
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newRole
public Predicate.Role newRole(String id, Predicate predicate, String semRole, Span<Term> span) { idManager.updateCounter(AnnotationType.ROLE, id); Predicate.Role newRole = new Predicate.Role(id, semRole, span); return newRole; }
java
public Predicate.Role newRole(String id, Predicate predicate, String semRole, Span<Term> span) { idManager.updateCounter(AnnotationType.ROLE, id); Predicate.Role newRole = new Predicate.Role(id, semRole, span); return newRole; }
[ "public", "Predicate", ".", "Role", "newRole", "(", "String", "id", ",", "Predicate", "predicate", ",", "String", "semRole", ",", "Span", "<", "Term", ">", "span", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "ROLE", ",", "id", ...
Creates a Role object to load an existing role. It receives the ID as an argument. It doesn't add the role to the predicate. @param id role's ID. @param predicate the predicate which this role is part of @param semRole semantic role @param span span containing all the targets of the role @return a new role.
[ "Creates", "a", "Role", "object", "to", "load", "an", "existing", "role", ".", "It", "receives", "the", "ID", "as", "an", "argument", ".", "It", "doesn", "t", "add", "the", "role", "to", "the", "predicate", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1021-L1025
46,902
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newRole
public Predicate.Role newRole(Predicate predicate, String semRole, Span<Term> span) { String newId = idManager.getNextId(AnnotationType.ROLE); Predicate.Role newRole = new Predicate.Role(newId, semRole, span); return newRole; }
java
public Predicate.Role newRole(Predicate predicate, String semRole, Span<Term> span) { String newId = idManager.getNextId(AnnotationType.ROLE); Predicate.Role newRole = new Predicate.Role(newId, semRole, span); return newRole; }
[ "public", "Predicate", ".", "Role", "newRole", "(", "Predicate", "predicate", ",", "String", "semRole", ",", "Span", "<", "Term", ">", "span", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "ROLE", ")", ";", ...
Creates a new Role object. It assigns an appropriate ID to it. It uses the ID of the predicate to create a new ID for the role. It doesn't add the role to the predicate. @param predicate the predicate which this role is part of @param semRole semantic role @param span span containing all the targets of the role @return...
[ "Creates", "a", "new", "Role", "object", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "It", "uses", "the", "ID", "of", "the", "predicate", "to", "create", "a", "new", "ID", "for", "the", "role", ".", "It", "doesn", "t", "add", ...
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1033-L1037
46,903
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.getSentences
public List<List<WF>> getSentences() { return (List<List<WF>>)(List<?>) annotationContainer.getSentences(AnnotationType.WF); }
java
public List<List<WF>> getSentences() { return (List<List<WF>>)(List<?>) annotationContainer.getSentences(AnnotationType.WF); }
[ "public", "List", "<", "List", "<", "WF", ">", ">", "getSentences", "(", ")", "{", "return", "(", "List", "<", "List", "<", "WF", ">", ">", ")", "(", "List", "<", "?", ">", ")", "annotationContainer", ".", "getSentences", "(", "AnnotationType", ".", ...
Returns a list with all sentences. Each sentence is a list of WFs.
[ "Returns", "a", "list", "with", "all", "sentences", ".", "Each", "sentence", "is", "a", "list", "of", "WFs", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1270-L1272
46,904
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.getTermsFromWFs
public List<Term> getTermsFromWFs(List<String> wfIds) { List<Term> terms = new ArrayList<Term>(); for (String wfId : wfIds) { terms.addAll(this.wfId2Terms.get(wfId)); } return terms; }
java
public List<Term> getTermsFromWFs(List<String> wfIds) { List<Term> terms = new ArrayList<Term>(); for (String wfId : wfIds) { terms.addAll(this.wfId2Terms.get(wfId)); } return terms; }
[ "public", "List", "<", "Term", ">", "getTermsFromWFs", "(", "List", "<", "String", ">", "wfIds", ")", "{", "List", "<", "Term", ">", "terms", "=", "new", "ArrayList", "<", "Term", ">", "(", ")", ";", "for", "(", "String", "wfId", ":", "wfIds", ")",...
Hau kendu behar da
[ "Hau", "kendu", "behar", "da" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1505-L1511
46,905
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.createTimestamp
public String createTimestamp() { Date date = new Date(); //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd H:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); String formattedDate = sdf.format(date); return formattedDate; }
java
public String createTimestamp() { Date date = new Date(); //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd H:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); String formattedDate = sdf.format(date); return formattedDate; }
[ "public", "String", "createTimestamp", "(", ")", "{", "Date", "date", "=", "new", "Date", "(", ")", ";", "//SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd H:mm:ss\");", "SimpleDateFormat", "sdf", "=", "new", "SimpleDateFormat", "(", "\"yyyy-MM-dd'T'HH:mm:ssZ\"", ...
Returns current timestamp.
[ "Returns", "current", "timestamp", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1652-L1658
46,906
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.list2Span
static <T extends IdentifiableAnnotation> Span<T> list2Span(List<T> list) { Span<T> span = new Span<T>(); for (T elem : list) { span.addTarget(elem); } return span; }
java
static <T extends IdentifiableAnnotation> Span<T> list2Span(List<T> list) { Span<T> span = new Span<T>(); for (T elem : list) { span.addTarget(elem); } return span; }
[ "static", "<", "T", "extends", "IdentifiableAnnotation", ">", "Span", "<", "T", ">", "list2Span", "(", "List", "<", "T", ">", "list", ")", "{", "Span", "<", "T", ">", "span", "=", "new", "Span", "<", "T", ">", "(", ")", ";", "for", "(", "T", "e...
Converts a List into a Span
[ "Converts", "a", "List", "into", "a", "Span" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1868-L1874
46,907
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.targetList2Span
static Span<Term> targetList2Span(List<Target> list) { Span<Term> span = new Span<Term>(); for (Target target : list) { if (target.isHead()) { span.addTarget(target.getTerm(), true); } else { span.addTarget(target.getTerm()); } } return span; }
java
static Span<Term> targetList2Span(List<Target> list) { Span<Term> span = new Span<Term>(); for (Target target : list) { if (target.isHead()) { span.addTarget(target.getTerm(), true); } else { span.addTarget(target.getTerm()); } } return span; }
[ "static", "Span", "<", "Term", ">", "targetList2Span", "(", "List", "<", "Target", ">", "list", ")", "{", "Span", "<", "Term", ">", "span", "=", "new", "Span", "<", "Term", ">", "(", ")", ";", "for", "(", "Target", "target", ":", "list", ")", "{"...
Converts a Target list into a Span of terms
[ "Converts", "a", "Target", "list", "into", "a", "Span", "of", "terms" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1890-L1900
46,908
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.span2TargetList
static List<Target> span2TargetList(Span<Term> span) { List<Target> list = new ArrayList<Target>(); for (Term t : span.getTargets()) { list.add(KAFDocument.createTarget(t, (t==span.getHead()))); } return list; }
java
static List<Target> span2TargetList(Span<Term> span) { List<Target> list = new ArrayList<Target>(); for (Term t : span.getTargets()) { list.add(KAFDocument.createTarget(t, (t==span.getHead()))); } return list; }
[ "static", "List", "<", "Target", ">", "span2TargetList", "(", "Span", "<", "Term", ">", "span", ")", "{", "List", "<", "Target", ">", "list", "=", "new", "ArrayList", "<", "Target", ">", "(", ")", ";", "for", "(", "Term", "t", ":", "span", ".", "...
Converts a Span into a Target list
[ "Converts", "a", "Span", "into", "a", "Target", "list" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1903-L1909
46,909
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.findContentText
@Nullable public static String findContentText(final Node rootNode, final XPath xPath, final String expression) { final Node node = findNode(rootNode, xPath, expression); if (node == null) { return null; } return node.getTextContent(); }
java
@Nullable public static String findContentText(final Node rootNode, final XPath xPath, final String expression) { final Node node = findNode(rootNode, xPath, expression); if (node == null) { return null; } return node.getTextContent(); }
[ "@", "Nullable", "public", "static", "String", "findContentText", "(", "final", "Node", "rootNode", ",", "final", "XPath", "xPath", ",", "final", "String", "expression", ")", "{", "final", "Node", "node", "=", "findNode", "(", "rootNode", ",", "xPath", ",", ...
Returns an string from a node's content. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. @return Node or <code>null</code> if no match was found.
[ "Returns", "an", "string", "from", "a", "node", "s", "content", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L61-L68
46,910
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.findContentInteger
@Nullable public static Integer findContentInteger(final Node rootNode, final XPath xPath, final String expression) { final Node node = findNode(rootNode, xPath, expression); if (node == null) { return null; } final String str = node.getTextContent(); ...
java
@Nullable public static Integer findContentInteger(final Node rootNode, final XPath xPath, final String expression) { final Node node = findNode(rootNode, xPath, expression); if (node == null) { return null; } final String str = node.getTextContent(); ...
[ "@", "Nullable", "public", "static", "Integer", "findContentInteger", "(", "final", "Node", "rootNode", ",", "final", "XPath", "xPath", ",", "final", "String", "expression", ")", "{", "final", "Node", "node", "=", "findNode", "(", "rootNode", ",", "xPath", "...
Returns an integer value from a node's content. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. @return Node or <code>null</code> if no match was found.
[ "Returns", "an", "integer", "value", "from", "a", "node", "s", "content", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L82-L91
46,911
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.findNode
@Nullable public static Node findNode(@NotNull final Node rootNode, @NotNull final XPath xPath, @NotNull final String expression) { Contract.requireArgNotNull("rootNode", rootNode); Contract.requireArgNotNull("xPath", xPath); Contract.requireArgNotNull("expression", expression); ...
java
@Nullable public static Node findNode(@NotNull final Node rootNode, @NotNull final XPath xPath, @NotNull final String expression) { Contract.requireArgNotNull("rootNode", rootNode); Contract.requireArgNotNull("xPath", xPath); Contract.requireArgNotNull("expression", expression); ...
[ "@", "Nullable", "public", "static", "Node", "findNode", "(", "@", "NotNull", "final", "Node", "rootNode", ",", "@", "NotNull", "final", "XPath", "xPath", ",", "@", "NotNull", "final", "String", "expression", ")", "{", "Contract", ".", "requireArgNotNull", "...
Returns a single node from a given document using xpath. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. @return Node or <code>null</code> if no match was found.
[ "Returns", "a", "single", "node", "from", "a", "given", "document", "using", "xpath", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L105-L116
46,912
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.findNodes
@Nullable public static NodeList findNodes(@NotNull final Node rootNode, @NotNull final XPath xPath, @NotNull final String expression) { Contract.requireArgNotNull("doc", rootNode); Contract.requireArgNotNull("xPath", xPath); Contract.requireArgNotNull("expression", expression); ...
java
@Nullable public static NodeList findNodes(@NotNull final Node rootNode, @NotNull final XPath xPath, @NotNull final String expression) { Contract.requireArgNotNull("doc", rootNode); Contract.requireArgNotNull("xPath", xPath); Contract.requireArgNotNull("expression", expression); ...
[ "@", "Nullable", "public", "static", "NodeList", "findNodes", "(", "@", "NotNull", "final", "Node", "rootNode", ",", "@", "NotNull", "final", "XPath", "xPath", ",", "@", "NotNull", "final", "String", "expression", ")", "{", "Contract", ".", "requireArgNotNull"...
Returns a list of nodes from a given document using xpath. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. @return Nodes or <code>null</code> if no match was found.
[ "Returns", "a", "list", "of", "nodes", "from", "a", "given", "document", "using", "xpath", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L130-L141
46,913
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.parseDocument
@NotNull public static Document parseDocument(@NotNull final DocumentBuilder builder, @NotNull final InputStream inputStream) { Contract.requireArgNotNull("builder", builder); Contract.requireArgNotNull("inputStream", inputStream); try { return builder.parse(inputStre...
java
@NotNull public static Document parseDocument(@NotNull final DocumentBuilder builder, @NotNull final InputStream inputStream) { Contract.requireArgNotNull("builder", builder); Contract.requireArgNotNull("inputStream", inputStream); try { return builder.parse(inputStre...
[ "@", "NotNull", "public", "static", "Document", "parseDocument", "(", "@", "NotNull", "final", "DocumentBuilder", "builder", ",", "@", "NotNull", "final", "InputStream", "inputStream", ")", "{", "Contract", ".", "requireArgNotNull", "(", "\"builder\"", ",", "build...
Parse the document and wraps checked exceptions into runtime exceptions. @param builder Builder to use. @param inputStream Input stream with XML. @return Document.
[ "Parse", "the", "document", "and", "wraps", "checked", "exceptions", "into", "runtime", "exceptions", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L153-L163
46,914
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.createXPath
@NotNull public static XPath createXPath(@Nullable final String... values) { final NamespaceContext context = new NamespaceContextMap(values); final XPath xPath = XPathFactory.newInstance().newXPath(); xPath.setNamespaceContext(context); return xPath; }
java
@NotNull public static XPath createXPath(@Nullable final String... values) { final NamespaceContext context = new NamespaceContextMap(values); final XPath xPath = XPathFactory.newInstance().newXPath(); xPath.setNamespaceContext(context); return xPath; }
[ "@", "NotNull", "public", "static", "XPath", "createXPath", "(", "@", "Nullable", "final", "String", "...", "values", ")", "{", "final", "NamespaceContext", "context", "=", "new", "NamespaceContextMap", "(", "values", ")", ";", "final", "XPath", "xPath", "=", ...
Creates a new XPath with a configured namespace context. @param values Pairs of 'prefix' + 'uri'. @return New instance.
[ "Creates", "a", "new", "XPath", "with", "a", "configured", "namespace", "context", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L173-L179
46,915
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.createDocumentBuilder
@NotNull public static DocumentBuilder createDocumentBuilder() { try { final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); return factory.newDocumentBuilder(); } catch (final ParserConfigurationException ex...
java
@NotNull public static DocumentBuilder createDocumentBuilder() { try { final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); return factory.newDocumentBuilder(); } catch (final ParserConfigurationException ex...
[ "@", "NotNull", "public", "static", "DocumentBuilder", "createDocumentBuilder", "(", ")", "{", "try", "{", "final", "DocumentBuilderFactory", "factory", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ";", "factory", ".", "setNamespaceAware", "(", "true...
Creates a namespace aware document builder. @return New instance.
[ "Creates", "a", "namespace", "aware", "document", "builder", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L186-L195
46,916
datacleaner/AnalyzerBeans
env/cluster/src/main/java/org/eobjects/analyzer/cluster/DistributedAnalysisResultReducer.java
DistributedAnalysisResultReducer.reduceResults
private void reduceResults(final List<AnalysisResultFuture> results, final Map<ComponentJob, AnalyzerResult> resultMap, final List<AnalysisResultReductionException> reductionErrors) { if (_hasRun.get()) { // already reduced return; } _has...
java
private void reduceResults(final List<AnalysisResultFuture> results, final Map<ComponentJob, AnalyzerResult> resultMap, final List<AnalysisResultReductionException> reductionErrors) { if (_hasRun.get()) { // already reduced return; } _has...
[ "private", "void", "reduceResults", "(", "final", "List", "<", "AnalysisResultFuture", ">", "results", ",", "final", "Map", "<", "ComponentJob", ",", "AnalyzerResult", ">", "resultMap", ",", "final", "List", "<", "AnalysisResultReductionException", ">", "reductionEr...
Reduces all the analyzer results of an analysis @param results @param resultMap @param reductionErrors
[ "Reduces", "all", "the", "analyzer", "results", "of", "an", "analysis" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/cluster/src/main/java/org/eobjects/analyzer/cluster/DistributedAnalysisResultReducer.java#L90-L140
46,917
datacleaner/AnalyzerBeans
env/cluster/src/main/java/org/eobjects/analyzer/cluster/DistributedAnalysisResultReducer.java
DistributedAnalysisResultReducer.reduce
@SuppressWarnings("unchecked") private void reduce(AnalyzerJob analyzerJob, Collection<AnalyzerResult> slaveResults, Map<ComponentJob, AnalyzerResult> resultMap, List<AnalysisResultReductionException> reductionErrors) { if (slaveResults.size() == 1) { // special case where these was...
java
@SuppressWarnings("unchecked") private void reduce(AnalyzerJob analyzerJob, Collection<AnalyzerResult> slaveResults, Map<ComponentJob, AnalyzerResult> resultMap, List<AnalysisResultReductionException> reductionErrors) { if (slaveResults.size() == 1) { // special case where these was...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "reduce", "(", "AnalyzerJob", "analyzerJob", ",", "Collection", "<", "AnalyzerResult", ">", "slaveResults", ",", "Map", "<", "ComponentJob", ",", "AnalyzerResult", ">", "resultMap", ",", "List"...
Reduces result for a single analyzer @param analyzerJob @param slaveResults @param resultMap @param reductionErrors
[ "Reduces", "result", "for", "a", "single", "analyzer" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/cluster/src/main/java/org/eobjects/analyzer/cluster/DistributedAnalysisResultReducer.java#L150-L193
46,918
datacleaner/AnalyzerBeans
env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationReader.java
JaxbConfigurationReader.unmarshall
public Configuration unmarshall(InputStream inputStream) { try { final Unmarshaller unmarshaller = _jaxbContext.createUnmarshaller(); unmarshaller.setEventHandler(new JaxbValidationEventHandler()); final Configuration configuration = (Configuration) unmarshaller.unmarshal(in...
java
public Configuration unmarshall(InputStream inputStream) { try { final Unmarshaller unmarshaller = _jaxbContext.createUnmarshaller(); unmarshaller.setEventHandler(new JaxbValidationEventHandler()); final Configuration configuration = (Configuration) unmarshaller.unmarshal(in...
[ "public", "Configuration", "unmarshall", "(", "InputStream", "inputStream", ")", "{", "try", "{", "final", "Unmarshaller", "unmarshaller", "=", "_jaxbContext", ".", "createUnmarshaller", "(", ")", ";", "unmarshaller", ".", "setEventHandler", "(", "new", "JaxbValidat...
Convenience method to get the untouched JAXB configuration object from an inputstream. @param inputStream @return
[ "Convenience", "method", "to", "get", "the", "untouched", "JAXB", "configuration", "object", "from", "an", "inputstream", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationReader.java#L239-L249
46,919
datacleaner/AnalyzerBeans
env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationReader.java
JaxbConfigurationReader.marshall
public void marshall(Configuration configuration, OutputStream outputStream) { try { final Marshaller marshaller = _jaxbContext.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); marshaller.setEventHandler(new JaxbValidationEventHandle...
java
public void marshall(Configuration configuration, OutputStream outputStream) { try { final Marshaller marshaller = _jaxbContext.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); marshaller.setEventHandler(new JaxbValidationEventHandle...
[ "public", "void", "marshall", "(", "Configuration", "configuration", ",", "OutputStream", "outputStream", ")", "{", "try", "{", "final", "Marshaller", "marshaller", "=", "_jaxbContext", ".", "createMarshaller", "(", ")", ";", "marshaller", ".", "setProperty", "(",...
Convenience method to marshal a JAXB configuration object into an output stream. @param configuration @param outputStream
[ "Convenience", "method", "to", "marshal", "a", "JAXB", "configuration", "object", "into", "an", "output", "stream", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationReader.java#L258-L267
46,920
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/java/Java.java
Java.createSource
public static synchronized void createSource(Java._ClassBody clazz) throws IOException { if (baseDir == null) { throw new IOException("Base directory for output not set, use 'setBaseDirectory'"); } String pkg = clazz.getPackage(); if (pkg == null) { pkg = ""; // throw new IOException("Class package c...
java
public static synchronized void createSource(Java._ClassBody clazz) throws IOException { if (baseDir == null) { throw new IOException("Base directory for output not set, use 'setBaseDirectory'"); } String pkg = clazz.getPackage(); if (pkg == null) { pkg = ""; // throw new IOException("Class package c...
[ "public", "static", "synchronized", "void", "createSource", "(", "Java", ".", "_ClassBody", "clazz", ")", "throws", "IOException", "{", "if", "(", "baseDir", "==", "null", ")", "{", "throw", "new", "IOException", "(", "\"Base directory for output not set, use 'setBa...
Create the source file for a given class @param clazz is the class description @throws java.io.IOException
[ "Create", "the", "source", "file", "for", "a", "given", "class" ]
e8aa46313bb1d1328865f26f99455124aede828c
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/java/Java.java#L74-L91
46,921
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/java/Java.java
Java.emitCommentIndentN
private static void emitCommentIndentN(PrintWriter fp, String text, int indent, boolean type) { synchronized (lock) { String cc = type ? "/**" : "/*"; fp.println(cc); String comment = emitCommentIndentNOnly(fp, text, indent); fp.println(comment + "/"); } }
java
private static void emitCommentIndentN(PrintWriter fp, String text, int indent, boolean type) { synchronized (lock) { String cc = type ? "/**" : "/*"; fp.println(cc); String comment = emitCommentIndentNOnly(fp, text, indent); fp.println(comment + "/"); } }
[ "private", "static", "void", "emitCommentIndentN", "(", "PrintWriter", "fp", ",", "String", "text", ",", "int", "indent", ",", "boolean", "type", ")", "{", "synchronized", "(", "lock", ")", "{", "String", "cc", "=", "type", "?", "\"/**\"", ":", "\"/*\"", ...
Write a comment at some indentation level. @param fp @param text @param indent @param type
[ "Write", "a", "comment", "at", "some", "indentation", "level", "." ]
e8aa46313bb1d1328865f26f99455124aede828c
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/java/Java.java#L101-L110
46,922
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/java/Java.java
Java.emitFinishCommentIndentN
private static void emitFinishCommentIndentN(PrintWriter fp, int indent) { final String spaces = " "; synchronized (lock) { String comment = spaces.substring(0, indent) + " */"; fp.println(comment); } }
java
private static void emitFinishCommentIndentN(PrintWriter fp, int indent) { final String spaces = " "; synchronized (lock) { String comment = spaces.substring(0, indent) + " */"; fp.println(comment); } }
[ "private", "static", "void", "emitFinishCommentIndentN", "(", "PrintWriter", "fp", ",", "int", "indent", ")", "{", "final", "String", "spaces", "=", "\" \"", ";", "synchronized", "(", "lock", ")", "{", "S...
Finish a comment. @param fp @param indent
[ "Finish", "a", "comment", "." ]
e8aa46313bb1d1328865f26f99455124aede828c
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/java/Java.java#L124-L130
46,923
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/java/Java.java
Java.emitCommentIndentNOnly
private static String emitCommentIndentNOnly(PrintWriter fp, String text, int indent) { synchronized (lock) { return (emitCommentIndentNOnly(fp, text, indent, true)); } }
java
private static String emitCommentIndentNOnly(PrintWriter fp, String text, int indent) { synchronized (lock) { return (emitCommentIndentNOnly(fp, text, indent, true)); } }
[ "private", "static", "String", "emitCommentIndentNOnly", "(", "PrintWriter", "fp", ",", "String", "text", ",", "int", "indent", ")", "{", "synchronized", "(", "lock", ")", "{", "return", "(", "emitCommentIndentNOnly", "(", "fp", ",", "text", ",", "indent", "...
Write a comment indent only. @param fp @param text @param indent @return
[ "Write", "a", "comment", "indent", "only", "." ]
e8aa46313bb1d1328865f26f99455124aede828c
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/java/Java.java#L140-L144
46,924
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/FuzzerOutputContext.java
FuzzerOutputContext.create
public void create(String outputdir, Program program) { types.stream().forEach((type) -> type.createOutput(outputdir, program)); }
java
public void create(String outputdir, Program program) { types.stream().forEach((type) -> type.createOutput(outputdir, program)); }
[ "public", "void", "create", "(", "String", "outputdir", ",", "Program", "program", ")", "{", "types", ".", "stream", "(", ")", ".", "forEach", "(", "(", "type", ")", "-", ">", "type", ".", "createOutput", "(", "outputdir", ",", "program", ")", ")", "...
Create the output. @param outputdir where to write the output @param program the program
[ "Create", "the", "output", "." ]
e8aa46313bb1d1328865f26f99455124aede828c
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/FuzzerOutputContext.java#L29-L31
46,925
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/job/builder/AbstractBeanJobBuilder.java
AbstractBeanJobBuilder.setConfiguredPropertyIfChanged
protected boolean setConfiguredPropertyIfChanged(final ConfiguredPropertyDescriptor configuredProperty, final Object value) { if (configuredProperty == null) { throw new IllegalArgumentException("configuredProperty cannot be null"); } final Object currentValue = configur...
java
protected boolean setConfiguredPropertyIfChanged(final ConfiguredPropertyDescriptor configuredProperty, final Object value) { if (configuredProperty == null) { throw new IllegalArgumentException("configuredProperty cannot be null"); } final Object currentValue = configur...
[ "protected", "boolean", "setConfiguredPropertyIfChanged", "(", "final", "ConfiguredPropertyDescriptor", "configuredProperty", ",", "final", "Object", "value", ")", "{", "if", "(", "configuredProperty", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", ...
Sets a configured property if it has changed. Note that this method is for internal use. It does not invoke {@link #onConfigurationChanged()} even if changes happen. The reason for this is to allow code reuse and avoid chatty use of the notification method. @param configuredProperty @param value @return true if the v...
[ "Sets", "a", "configured", "property", "if", "it", "has", "changed", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/job/builder/AbstractBeanJobBuilder.java#L277-L323
46,926
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EscSpiUtils.java
EscSpiUtils.deserialize
@NotNull public static <T> T deserialize(@NotNull final DeserializerRegistry registry, @NotNull final SerializedData data) { Contract.requireArgNotNull("registry", registry); Contract.requireArgNotNull("data", data); final Deserializer deserializer = registry.getDeserializer(data.getType(), ...
java
@NotNull public static <T> T deserialize(@NotNull final DeserializerRegistry registry, @NotNull final SerializedData data) { Contract.requireArgNotNull("registry", registry); Contract.requireArgNotNull("data", data); final Deserializer deserializer = registry.getDeserializer(data.getType(), ...
[ "@", "NotNull", "public", "static", "<", "T", ">", "T", "deserialize", "(", "@", "NotNull", "final", "DeserializerRegistry", "registry", ",", "@", "NotNull", "final", "SerializedData", "data", ")", "{", "Contract", ".", "requireArgNotNull", "(", "\"registry\"", ...
Tries to find a deserializer for the given data block. @param registry Registry with known deserializers. @param data Persisted data. @return Unmarshalled event. @param <T> Expected type of event.
[ "Tries", "to", "find", "a", "deserializer", "for", "the", "given", "data", "block", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EscSpiUtils.java#L92-L99
46,927
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EscSpiUtils.java
EscSpiUtils.mimeType
public static EnhancedMimeType mimeType(@NotNull final SerializerRegistry registry, @NotNull final List<CommonEvent> commonEvents) { Contract.requireArgNotNull("registry", registry); Contract.requireArgNotNull("commonEvents", commonEvents); EnhancedMimeType mimeType = null; for (final ...
java
public static EnhancedMimeType mimeType(@NotNull final SerializerRegistry registry, @NotNull final List<CommonEvent> commonEvents) { Contract.requireArgNotNull("registry", registry); Contract.requireArgNotNull("commonEvents", commonEvents); EnhancedMimeType mimeType = null; for (final ...
[ "public", "static", "EnhancedMimeType", "mimeType", "(", "@", "NotNull", "final", "SerializerRegistry", "registry", ",", "@", "NotNull", "final", "List", "<", "CommonEvent", ">", "commonEvents", ")", "{", "Contract", ".", "requireArgNotNull", "(", "\"registry\"", ...
Returns the mime types shared by all events in the list. @param registry Registry used to peek the mime type used to serialize the event. @param commonEvents List to test. @return Mime type if all events share the same type or <code>null</code> if there are events with different mime types.
[ "Returns", "the", "mime", "types", "shared", "by", "all", "events", "in", "the", "list", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EscSpiUtils.java#L111-L128
46,928
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EscSpiUtils.java
EscSpiUtils.eventsEqual
public static boolean eventsEqual(@Nullable final List<CommonEvent> eventsA, @Nullable final List<CommonEvent> eventsB) { if ((eventsA == null) && (eventsB == null)) { return true; } if ((eventsA == null) && (eventsB != null)) { return false; } if ((events...
java
public static boolean eventsEqual(@Nullable final List<CommonEvent> eventsA, @Nullable final List<CommonEvent> eventsB) { if ((eventsA == null) && (eventsB == null)) { return true; } if ((eventsA == null) && (eventsB != null)) { return false; } if ((events...
[ "public", "static", "boolean", "eventsEqual", "(", "@", "Nullable", "final", "List", "<", "CommonEvent", ">", "eventsA", ",", "@", "Nullable", "final", "List", "<", "CommonEvent", ">", "eventsB", ")", "{", "if", "(", "(", "eventsA", "==", "null", ")", "&...
Tests if both lists contain the same events. @param eventsA First event list. @param eventsB Second event list. @return TRUE if both lists have the same size and all event identifiers are equal.
[ "Tests", "if", "both", "lists", "contain", "the", "same", "events", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EscSpiUtils.java#L158-L183
46,929
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EscSpiUtils.java
EscSpiUtils.nodeToString
public static String nodeToString(final Node node) { try { final Transformer t = TransformerFactory.newInstance().newTransformer(); t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); final StringWriter sw = new StringWriter(); t.transform(new DOMSource(n...
java
public static String nodeToString(final Node node) { try { final Transformer t = TransformerFactory.newInstance().newTransformer(); t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); final StringWriter sw = new StringWriter(); t.transform(new DOMSource(n...
[ "public", "static", "String", "nodeToString", "(", "final", "Node", "node", ")", "{", "try", "{", "final", "Transformer", "t", "=", "TransformerFactory", ".", "newInstance", "(", ")", ".", "newTransformer", "(", ")", ";", "t", ".", "setOutputProperty", "(", ...
Render a node as string. @param node Node to render. @return XML.
[ "Render", "a", "node", "as", "string", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EscSpiUtils.java#L243-L253
46,930
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EscSpiUtils.java
EscSpiUtils.joinJsonbDeserializerArrays
public static JsonbDeserializer<?>[] joinJsonbDeserializerArrays(final JsonbDeserializer<?>[]... deserializerArrays) { final List<JsonbDeserializer<?>> all = joinArrays(deserializerArrays); return all.toArray(new JsonbDeserializer<?>[all.size()]); }
java
public static JsonbDeserializer<?>[] joinJsonbDeserializerArrays(final JsonbDeserializer<?>[]... deserializerArrays) { final List<JsonbDeserializer<?>> all = joinArrays(deserializerArrays); return all.toArray(new JsonbDeserializer<?>[all.size()]); }
[ "public", "static", "JsonbDeserializer", "<", "?", ">", "[", "]", "joinJsonbDeserializerArrays", "(", "final", "JsonbDeserializer", "<", "?", ">", "[", "]", "...", "deserializerArrays", ")", "{", "final", "List", "<", "JsonbDeserializer", "<", "?", ">", ">", ...
Creates all available JSON-B deserializers necessary for the ESC implementation. @return New array with deserializers.
[ "Creates", "all", "available", "JSON", "-", "B", "deserializers", "necessary", "for", "the", "ESC", "implementation", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EscSpiUtils.java#L308-L311
46,931
fuinorg/event-store-commons
esjc/src/main/java/org/fuin/esc/esjc/RecordedEvent2CommonEventConverter.java
RecordedEvent2CommonEventConverter.convert
@Override public final CommonEvent convert(final RecordedEvent eventData) { final EnhancedMimeType escMetaMimeType = metaMimeType(eventData.isJson); final SerializedDataType escSerMetaType = new SerializedDataType(EscMeta.TYPE.asBaseType()); final Deserializer escMetaDeserializer = deserReg...
java
@Override public final CommonEvent convert(final RecordedEvent eventData) { final EnhancedMimeType escMetaMimeType = metaMimeType(eventData.isJson); final SerializedDataType escSerMetaType = new SerializedDataType(EscMeta.TYPE.asBaseType()); final Deserializer escMetaDeserializer = deserReg...
[ "@", "Override", "public", "final", "CommonEvent", "convert", "(", "final", "RecordedEvent", "eventData", ")", "{", "final", "EnhancedMimeType", "escMetaMimeType", "=", "metaMimeType", "(", "eventData", ".", "isJson", ")", ";", "final", "SerializedDataType", "escSer...
Converts event data into a common event. @param eventData Data to convert. @return Converted data das event.
[ "Converts", "event", "data", "into", "a", "common", "event", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/esjc/src/main/java/org/fuin/esc/esjc/RecordedEvent2CommonEventConverter.java#L66-L99
46,932
datacleaner/AnalyzerBeans
components/date-gap/src/main/java/org/eobjects/analyzer/beans/dategap/TimeLine.java
TimeLine.getOverlappingIntervals
public SortedSet<TimeInterval> getOverlappingIntervals(boolean includeSingleTimeInstanceIntervals) { SortedSet<TimeInterval> result = new TreeSet<TimeInterval>(); for (TimeInterval interval1 : intervals) { for (TimeInterval interval2 : intervals) { if (interval1 != interval2) { TimeInterval overlap = in...
java
public SortedSet<TimeInterval> getOverlappingIntervals(boolean includeSingleTimeInstanceIntervals) { SortedSet<TimeInterval> result = new TreeSet<TimeInterval>(); for (TimeInterval interval1 : intervals) { for (TimeInterval interval2 : intervals) { if (interval1 != interval2) { TimeInterval overlap = in...
[ "public", "SortedSet", "<", "TimeInterval", ">", "getOverlappingIntervals", "(", "boolean", "includeSingleTimeInstanceIntervals", ")", "{", "SortedSet", "<", "TimeInterval", ">", "result", "=", "new", "TreeSet", "<", "TimeInterval", ">", "(", ")", ";", "for", "(",...
Gets a set of intervals representing the times where there are more than one interval overlaps. @param includeSingleTimeInstanceIntervals whether or not to include intervals if only the ends of two (or more) intervals are overlapping. If, for example, there are two intervals, A-to-B and B-to-C. Should "B-to-B" be incl...
[ "Gets", "a", "set", "of", "intervals", "representing", "the", "times", "where", "there", "are", "more", "than", "one", "interval", "overlaps", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/date-gap/src/main/java/org/eobjects/analyzer/beans/dategap/TimeLine.java#L94-L119
46,933
datacleaner/AnalyzerBeans
components/date-gap/src/main/java/org/eobjects/analyzer/beans/dategap/TimeLine.java
TimeLine.getTimeGapIntervals
public SortedSet<TimeInterval> getTimeGapIntervals() { SortedSet<TimeInterval> flattenedIntervals = getFlattenedIntervals(); SortedSet<TimeInterval> gaps = new TreeSet<TimeInterval>(); TimeInterval previous = null; for (TimeInterval timeInterval : flattenedIntervals) { if (previous != null) { long from ...
java
public SortedSet<TimeInterval> getTimeGapIntervals() { SortedSet<TimeInterval> flattenedIntervals = getFlattenedIntervals(); SortedSet<TimeInterval> gaps = new TreeSet<TimeInterval>(); TimeInterval previous = null; for (TimeInterval timeInterval : flattenedIntervals) { if (previous != null) { long from ...
[ "public", "SortedSet", "<", "TimeInterval", ">", "getTimeGapIntervals", "(", ")", "{", "SortedSet", "<", "TimeInterval", ">", "flattenedIntervals", "=", "getFlattenedIntervals", "(", ")", ";", "SortedSet", "<", "TimeInterval", ">", "gaps", "=", "new", "TreeSet", ...
Gets a set of intervals representing the times that are NOT represented in this timeline. @return
[ "Gets", "a", "set", "of", "intervals", "representing", "the", "times", "that", "are", "NOT", "represented", "in", "this", "timeline", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/date-gap/src/main/java/org/eobjects/analyzer/beans/dategap/TimeLine.java#L127-L143
46,934
ktoso/janbanery
janbanery-core/src/main/java/pl/project13/janbanery/config/auth/Base64Coder.java
Base64Coder.decode
public static byte[] decode(char[] in, int iOff, int iLen) { if (iLen % 4 != 0) { throw new IllegalArgumentException("Length of Base64 encoded input string is not a multiple of 4."); } while (iLen > 0 && in[iOff + iLen - 1] == '=') { iLen--; } int oLen = (iLen * 3) / 4; byte[] out = ...
java
public static byte[] decode(char[] in, int iOff, int iLen) { if (iLen % 4 != 0) { throw new IllegalArgumentException("Length of Base64 encoded input string is not a multiple of 4."); } while (iLen > 0 && in[iOff + iLen - 1] == '=') { iLen--; } int oLen = (iLen * 3) / 4; byte[] out = ...
[ "public", "static", "byte", "[", "]", "decode", "(", "char", "[", "]", "in", ",", "int", "iOff", ",", "int", "iLen", ")", "{", "if", "(", "iLen", "%", "4", "!=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Length of Base64 encode...
Decodes a byte array from Base64 format. No blanks or line breaks are allowed within the Base64 encoded input data. @param in A character array containing the Base64 encoded data. @param iOff Offset of the first character in <code>in</code> to be processed. @param iLen Number of characters to process in <code>in</co...
[ "Decodes", "a", "byte", "array", "from", "Base64", "format", ".", "No", "blanks", "or", "line", "breaks", "are", "allowed", "within", "the", "Base64", "encoded", "input", "data", "." ]
cd77b774814c7fbb2a0c9c55d4c3f7e76affa636
https://github.com/ktoso/janbanery/blob/cd77b774814c7fbb2a0c9c55d4c3f7e76affa636/janbanery-core/src/main/java/pl/project13/janbanery/config/auth/Base64Coder.java#L239-L278
46,935
datacleaner/AnalyzerBeans
components/basic-filters/src/main/java/org/eobjects/analyzer/beans/filter/CaptureChangedRecordsFilter.java
CaptureChangedRecordsFilter.getPropertyKey
private String getPropertyKey() { if (StringUtils.isNullOrEmpty(captureStateIdentifier)) { if (lastModifiedColumn.isPhysicalColumn()) { Table table = lastModifiedColumn.getPhysicalColumn().getTable(); if (table != null && !StringUtils.isNullOrEmpty(table.getName())) {...
java
private String getPropertyKey() { if (StringUtils.isNullOrEmpty(captureStateIdentifier)) { if (lastModifiedColumn.isPhysicalColumn()) { Table table = lastModifiedColumn.getPhysicalColumn().getTable(); if (table != null && !StringUtils.isNullOrEmpty(table.getName())) {...
[ "private", "String", "getPropertyKey", "(", ")", "{", "if", "(", "StringUtils", ".", "isNullOrEmpty", "(", "captureStateIdentifier", ")", ")", "{", "if", "(", "lastModifiedColumn", ".", "isPhysicalColumn", "(", ")", ")", "{", "Table", "table", "=", "lastModifi...
Gets the key to use in the capture state file. If there is not a captureStateIdentifier available, we want to avoid using a hardcoded key, since the same file may be used for multiple purposes, even multiple filters of the same type. Of course this is not desired configuration, but may be more convenient for lazy users...
[ "Gets", "the", "key", "to", "use", "in", "the", "capture", "state", "file", ".", "If", "there", "is", "not", "a", "captureStateIdentifier", "available", "we", "want", "to", "avoid", "using", "a", "hardcoded", "key", "since", "the", "same", "file", "may", ...
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/basic-filters/src/main/java/org/eobjects/analyzer/beans/filter/CaptureChangedRecordsFilter.java#L145-L156
46,936
datacleaner/AnalyzerBeans
components/javascript/src/main/java/org/eobjects/analyzer/beans/script/JavaScriptUtils.java
JavaScriptUtils.addToScope
public static void addToScope(Scriptable scope, Object object, String... names) { Object jsObject = Context.javaToJS(object, scope); for (String name : names) { name = name.replaceAll(" ", "_"); ScriptableObject.putProperty(scope, name, jsObject); } }
java
public static void addToScope(Scriptable scope, Object object, String... names) { Object jsObject = Context.javaToJS(object, scope); for (String name : names) { name = name.replaceAll(" ", "_"); ScriptableObject.putProperty(scope, name, jsObject); } }
[ "public", "static", "void", "addToScope", "(", "Scriptable", "scope", ",", "Object", "object", ",", "String", "...", "names", ")", "{", "Object", "jsObject", "=", "Context", ".", "javaToJS", "(", "object", ",", "scope", ")", ";", "for", "(", "String", "n...
Adds an object to the JavaScript scope with a set of variable names @param scope @param object @param names
[ "Adds", "an", "object", "to", "the", "JavaScript", "scope", "with", "a", "set", "of", "variable", "names" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/javascript/src/main/java/org/eobjects/analyzer/beans/script/JavaScriptUtils.java#L48-L54
46,937
datacleaner/AnalyzerBeans
components/javascript/src/main/java/org/eobjects/analyzer/beans/script/JavaScriptUtils.java
JavaScriptUtils.addToScope
public static void addToScope(Scriptable scope, InputRow inputRow, InputColumn<?>[] columns, String arrayName) { NativeArray values = new NativeArray(columns.length * 2); for (int i = 0; i < columns.length; i++) { InputColumn<?> column = columns[i]; Object value = inputRow.getValue(column); if (value != n...
java
public static void addToScope(Scriptable scope, InputRow inputRow, InputColumn<?>[] columns, String arrayName) { NativeArray values = new NativeArray(columns.length * 2); for (int i = 0; i < columns.length; i++) { InputColumn<?> column = columns[i]; Object value = inputRow.getValue(column); if (value != n...
[ "public", "static", "void", "addToScope", "(", "Scriptable", "scope", ",", "InputRow", "inputRow", ",", "InputColumn", "<", "?", ">", "[", "]", "columns", ",", "String", "arrayName", ")", "{", "NativeArray", "values", "=", "new", "NativeArray", "(", "columns...
Adds the values of a row to the JavaScript scope @param scope @param inputRow @param columns @param arrayName
[ "Adds", "the", "values", "of", "a", "row", "to", "the", "JavaScript", "scope" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/javascript/src/main/java/org/eobjects/analyzer/beans/script/JavaScriptUtils.java#L64-L86
46,938
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EnhancedMimeType.java
EnhancedMimeType.getEncoding
@Nullable public final Charset getEncoding() { final String parameter = getParameter(ENCODING); if (parameter == null) { return null; } return Charset.forName(parameter); }
java
@Nullable public final Charset getEncoding() { final String parameter = getParameter(ENCODING); if (parameter == null) { return null; } return Charset.forName(parameter); }
[ "@", "Nullable", "public", "final", "Charset", "getEncoding", "(", ")", "{", "final", "String", "parameter", "=", "getParameter", "(", "ENCODING", ")", ";", "if", "(", "parameter", "==", "null", ")", "{", "return", "null", ";", "}", "return", "Charset", ...
Returns the encoding from the parameters. @return Encoding or <code>null</code> as default if not available.
[ "Returns", "the", "encoding", "from", "the", "parameters", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EnhancedMimeType.java#L181-L188
46,939
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EnhancedMimeType.java
EnhancedMimeType.matchEncoding
public final boolean matchEncoding(final EnhancedMimeType other) { return match(other) && Objects.equals(getEncoding(), other.getEncoding()); }
java
public final boolean matchEncoding(final EnhancedMimeType other) { return match(other) && Objects.equals(getEncoding(), other.getEncoding()); }
[ "public", "final", "boolean", "matchEncoding", "(", "final", "EnhancedMimeType", "other", ")", "{", "return", "match", "(", "other", ")", "&&", "Objects", ".", "equals", "(", "getEncoding", "(", ")", ",", "other", ".", "getEncoding", "(", ")", ")", ";", ...
Determine if the primary, sub type and encoding of this object is the same as what is in the given type. @param other The MimeType object to compare with. @return True if they match.
[ "Determine", "if", "the", "primary", "sub", "type", "and", "encoding", "of", "this", "object", "is", "the", "same", "as", "what", "is", "in", "the", "given", "type", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EnhancedMimeType.java#L217-L220
46,940
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EnhancedMimeType.java
EnhancedMimeType.create
@Nullable public static EnhancedMimeType create(@Nullable final String str) { if (str == null) { return null; } try { return new EnhancedMimeType(str); } catch (final MimeTypeParseException ex) { throw new RuntimeException("Failed to create version...
java
@Nullable public static EnhancedMimeType create(@Nullable final String str) { if (str == null) { return null; } try { return new EnhancedMimeType(str); } catch (final MimeTypeParseException ex) { throw new RuntimeException("Failed to create version...
[ "@", "Nullable", "public", "static", "EnhancedMimeType", "create", "(", "@", "Nullable", "final", "String", "str", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", "null", ";", "}", "try", "{", "return", "new", "EnhancedMimeType", "(", "str"...
Creates an instance with all data. Exceptions are wrapped to runtime exceptions. @param str Contains base type, sub type, version and parameters. @return New instance.
[ "Creates", "an", "instance", "with", "all", "data", ".", "Exceptions", "are", "wrapped", "to", "runtime", "exceptions", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EnhancedMimeType.java#L230-L240
46,941
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EnhancedMimeType.java
EnhancedMimeType.create
@NotNull public static EnhancedMimeType create(@NotNull final String primary, @NotNull final String sub, final Charset encoding, final String version) { return create(primary, sub, encoding, version, new HashMap<String, String>()); }
java
@NotNull public static EnhancedMimeType create(@NotNull final String primary, @NotNull final String sub, final Charset encoding, final String version) { return create(primary, sub, encoding, version, new HashMap<String, String>()); }
[ "@", "NotNull", "public", "static", "EnhancedMimeType", "create", "(", "@", "NotNull", "final", "String", "primary", ",", "@", "NotNull", "final", "String", "sub", ",", "final", "Charset", "encoding", ",", "final", "String", "version", ")", "{", "return", "c...
Creates an instance with primary, sub type, encoding and version. Exceptions are wrapped to runtime exceptions. @param primary Primary type. @param sub Sub type. @param encoding Encoding. @param version Version. @return New instance.
[ "Creates", "an", "instance", "with", "primary", "sub", "type", "encoding", "and", "version", ".", "Exceptions", "are", "wrapped", "to", "runtime", "exceptions", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EnhancedMimeType.java#L292-L296
46,942
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EnhancedMimeType.java
EnhancedMimeType.create
@NotNull public static EnhancedMimeType create(@NotNull final String primary, @NotNull final String sub, final Charset encoding, final String version, final Map<String, String> parameters) { try { return new EnhancedMimeType(primary, sub, encoding, version, parameters); } cat...
java
@NotNull public static EnhancedMimeType create(@NotNull final String primary, @NotNull final String sub, final Charset encoding, final String version, final Map<String, String> parameters) { try { return new EnhancedMimeType(primary, sub, encoding, version, parameters); } cat...
[ "@", "NotNull", "public", "static", "EnhancedMimeType", "create", "(", "@", "NotNull", "final", "String", "primary", ",", "@", "NotNull", "final", "String", "sub", ",", "final", "Charset", "encoding", ",", "final", "String", "version", ",", "final", "Map", "...
Creates an instance with all data and exceptions wrapped to runtime exceptions. @param primary Primary type. @param sub Sub type. @param encoding Encoding. @param version Version. @param parameters Additional parameters. @return New instance.
[ "Creates", "an", "instance", "with", "all", "data", "and", "exceptions", "wrapped", "to", "runtime", "exceptions", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EnhancedMimeType.java#L314-L322
46,943
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/JsonbDeSerializer.java
JsonbDeSerializer.init
public void init(final SerializedDataTypeRegistry typeRegistry, final DeserializerRegistry deserRegistry, final SerializerRegistry serRegistry) { if (initialized) { throw new IllegalStateException("Instance already initialized - Don't call the init methods more than once"); }...
java
public void init(final SerializedDataTypeRegistry typeRegistry, final DeserializerRegistry deserRegistry, final SerializerRegistry serRegistry) { if (initialized) { throw new IllegalStateException("Instance already initialized - Don't call the init methods more than once"); }...
[ "public", "void", "init", "(", "final", "SerializedDataTypeRegistry", "typeRegistry", ",", "final", "DeserializerRegistry", "deserRegistry", ",", "final", "SerializerRegistry", "serRegistry", ")", "{", "if", "(", "initialized", ")", "{", "throw", "new", "IllegalStateE...
Initializes the instance with necessary registries. @param typeRegistry Mapping from type name to type class. @param deserRegistry Mapping from type name to deserializers. @param serRegistry Mapping from type name to serializers.
[ "Initializes", "the", "instance", "with", "necessary", "registries", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/JsonbDeSerializer.java#L196-L243
46,944
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/util/convert/DelegatingConverter.java
DelegatingConverter.initializeAll
public void initializeAll(InjectionManager injectionManager) { if (injectionManager != null) { for (Converter<?> converter : _converters) { Field[] fields = ReflectionUtils.getFields(converter.getClass(), Inject.class); for (Field field : fields) { ...
java
public void initializeAll(InjectionManager injectionManager) { if (injectionManager != null) { for (Converter<?> converter : _converters) { Field[] fields = ReflectionUtils.getFields(converter.getClass(), Inject.class); for (Field field : fields) { ...
[ "public", "void", "initializeAll", "(", "InjectionManager", "injectionManager", ")", "{", "if", "(", "injectionManager", "!=", "null", ")", "{", "for", "(", "Converter", "<", "?", ">", "converter", ":", "_converters", ")", "{", "Field", "[", "]", "fields", ...
Initializes all converters contained with injections @param injectionManager
[ "Initializes", "all", "converters", "contained", "with", "injections" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/util/convert/DelegatingConverter.java#L167-L191
46,945
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/util/ReflectionUtils.java
ReflectionUtils.getMethods
public static Method[] getMethods(Class<?> clazz) { final boolean legacyApproach = isGetMethodsLegacyApproach(); final List<Method> allMethods = new ArrayList<>(); addMethods(allMethods, clazz, legacyApproach); return allMethods.toArray(new Method[allMethods.size()]); }
java
public static Method[] getMethods(Class<?> clazz) { final boolean legacyApproach = isGetMethodsLegacyApproach(); final List<Method> allMethods = new ArrayList<>(); addMethods(allMethods, clazz, legacyApproach); return allMethods.toArray(new Method[allMethods.size()]); }
[ "public", "static", "Method", "[", "]", "getMethods", "(", "Class", "<", "?", ">", "clazz", ")", "{", "final", "boolean", "legacyApproach", "=", "isGetMethodsLegacyApproach", "(", ")", ";", "final", "List", "<", "Method", ">", "allMethods", "=", "new", "Ar...
Gets all methods of a class, excluding those from Object. Warning: This method's result varies slightly on Java 7 and on Java 8. With Java 8 overridden methods are properly removed from the result, and inherited annotations thus also available from the result. On Java 7, overridden methods will be returned multiple ti...
[ "Gets", "all", "methods", "of", "a", "class", "excluding", "those", "from", "Object", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/util/ReflectionUtils.java#L499-L506
46,946
ktoso/janbanery
janbanery-android/src/main/java/pl/project13/janbanery/android/util/Strings.java
Strings.joinAnd
public static <T> String joinAnd(final String delimiter, final String lastDelimiter, final Collection<T> objs) { if (objs == null || objs.isEmpty()) { return ""; } final Iterator<T> iter = objs.iterator(); final StringBuffer buffer = new StringBuffer(Strings.toString(iter.next())); int i = 1;...
java
public static <T> String joinAnd(final String delimiter, final String lastDelimiter, final Collection<T> objs) { if (objs == null || objs.isEmpty()) { return ""; } final Iterator<T> iter = objs.iterator(); final StringBuffer buffer = new StringBuffer(Strings.toString(iter.next())); int i = 1;...
[ "public", "static", "<", "T", ">", "String", "joinAnd", "(", "final", "String", "delimiter", ",", "final", "String", "lastDelimiter", ",", "final", "Collection", "<", "T", ">", "objs", ")", "{", "if", "(", "objs", "==", "null", "||", "objs", ".", "isEm...
Like join, but allows for a distinct final delimiter. For english sentences such as "Alice, Bob and Charlie" use ", " and " and " as the delimiters. @param delimiter usually ", " @param lastDelimiter usually " and " @param objs the objects @param <T> the type @return a string
[ "Like", "join", "but", "allows", "for", "a", "distinct", "final", "delimiter", ".", "For", "english", "sentences", "such", "as", "Alice", "Bob", "and", "Charlie", "use", "and", "and", "as", "the", "delimiters", "." ]
cd77b774814c7fbb2a0c9c55d4c3f7e76affa636
https://github.com/ktoso/janbanery/blob/cd77b774814c7fbb2a0c9c55d4c3f7e76affa636/janbanery-android/src/main/java/pl/project13/janbanery/android/util/Strings.java#L28-L43
46,947
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ProjectionJavaScriptBuilder.java
ProjectionJavaScriptBuilder.type
public final ProjectionJavaScriptBuilder type(final String eventType) { if (count > 0) { sb.append(","); } sb.append("'" + eventType + "': function(state, ev) { linkTo('" + projection + "', ev); }"); count++; return this; }
java
public final ProjectionJavaScriptBuilder type(final String eventType) { if (count > 0) { sb.append(","); } sb.append("'" + eventType + "': function(state, ev) { linkTo('" + projection + "', ev); }"); count++; return this; }
[ "public", "final", "ProjectionJavaScriptBuilder", "type", "(", "final", "String", "eventType", ")", "{", "if", "(", "count", ">", "0", ")", "{", "sb", ".", "append", "(", "\",\"", ")", ";", "}", "sb", ".", "append", "(", "\"'\"", "+", "eventType", "+",...
Adds another type to select. @param eventType Unique event type to select from the category of streams. @return this.
[ "Adds", "another", "type", "to", "select", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ProjectionJavaScriptBuilder.java#L96-L103
46,948
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/Events.java
Events.asCommonEvents
public List<CommonEvent> asCommonEvents(final JAXBContext ctx) { final List<CommonEvent> list = new ArrayList<CommonEvent>(); for (final Event event : events) { list.add(event.asCommonEvent(ctx)); } return list; }
java
public List<CommonEvent> asCommonEvents(final JAXBContext ctx) { final List<CommonEvent> list = new ArrayList<CommonEvent>(); for (final Event event : events) { list.add(event.asCommonEvent(ctx)); } return list; }
[ "public", "List", "<", "CommonEvent", ">", "asCommonEvents", "(", "final", "JAXBContext", "ctx", ")", "{", "final", "List", "<", "CommonEvent", ">", "list", "=", "new", "ArrayList", "<", "CommonEvent", ">", "(", ")", ";", "for", "(", "final", "Event", "e...
Returns this object as a list of common event objects. @param ctx In case the XML JAXB unmarshalling is used, you have to pass the JAXB context here. @return Converted list.
[ "Returns", "this", "object", "as", "a", "list", "of", "common", "event", "objects", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/Events.java#L108-L114
46,949
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/IdentifierHelper.java
IdentifierHelper.isValid
public static boolean isValid(String name) { char[] nameChars = name.toCharArray(); for (int i = 0; i < nameChars.length; i++) { boolean valid = i == 0 ? Character.isJavaIdentifierStart(nameChars[i]) : Character.isJavaIdentifierPart(nameChars[i]); if (!valid) { return valid; } } return true; }
java
public static boolean isValid(String name) { char[] nameChars = name.toCharArray(); for (int i = 0; i < nameChars.length; i++) { boolean valid = i == 0 ? Character.isJavaIdentifierStart(nameChars[i]) : Character.isJavaIdentifierPart(nameChars[i]); if (!valid) { return valid; } } return true; }
[ "public", "static", "boolean", "isValid", "(", "String", "name", ")", "{", "char", "[", "]", "nameChars", "=", "name", ".", "toCharArray", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nameChars", ".", "length", ";", "i", "++", ...
Test if an identifier is valid. @param name the name @return true/false
[ "Test", "if", "an", "identifier", "is", "valid", "." ]
e8aa46313bb1d1328865f26f99455124aede828c
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/IdentifierHelper.java#L19-L28
46,950
ixa-ehu/kaflib
src/main/java/ixa/kaflib/AnnotationContainer.java
AnnotationContainer.getParaSents
List<Integer> getParaSents(Integer para) { List<Integer> sentList = new ArrayList<Integer>(this.paraSentIndex.get(para)); Collections.sort(sentList); return sentList; }
java
List<Integer> getParaSents(Integer para) { List<Integer> sentList = new ArrayList<Integer>(this.paraSentIndex.get(para)); Collections.sort(sentList); return sentList; }
[ "List", "<", "Integer", ">", "getParaSents", "(", "Integer", "para", ")", "{", "List", "<", "Integer", ">", "sentList", "=", "new", "ArrayList", "<", "Integer", ">", "(", "this", ".", "paraSentIndex", ".", "get", "(", "para", ")", ")", ";", "Collection...
Returns all sentences in a paragraph. @param para The paragraph @return
[ "Returns", "all", "sentences", "in", "a", "paragraph", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/AnnotationContainer.java#L211-L215
46,951
ixa-ehu/kaflib
src/main/java/ixa/kaflib/AnnotationContainer.java
AnnotationContainer.getSentences
List<List<Annotation>> getSentences(AnnotationType type, String groupID) { List<List<Annotation>> sentences = new ArrayList<List<Annotation>>(); for (int sent : Helper.getIndexKeys(type, groupID, this.sentIndex)) { sentences.add(this.getSentAnnotations(sent, type)); } return sentences; }
java
List<List<Annotation>> getSentences(AnnotationType type, String groupID) { List<List<Annotation>> sentences = new ArrayList<List<Annotation>>(); for (int sent : Helper.getIndexKeys(type, groupID, this.sentIndex)) { sentences.add(this.getSentAnnotations(sent, type)); } return sentences; }
[ "List", "<", "List", "<", "Annotation", ">", ">", "getSentences", "(", "AnnotationType", "type", ",", "String", "groupID", ")", "{", "List", "<", "List", "<", "Annotation", ">>", "sentences", "=", "new", "ArrayList", "<", "List", "<", "Annotation", ">", ...
Return all annotations of type "type" classified into sentences
[ "Return", "all", "annotations", "of", "type", "type", "classified", "into", "sentences" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/AnnotationContainer.java#L248-L254
46,952
ixa-ehu/kaflib
src/main/java/ixa/kaflib/AnnotationContainer.java
AnnotationContainer.getParagraphs
List<List<Annotation>> getParagraphs(AnnotationType type, String groupID) { List<List<Annotation>> paragraphs = new ArrayList<List<Annotation>>(); for (int para : Helper.getIndexKeys(type, groupID, this.paraIndex)) { paragraphs.add(this.getParaAnnotations(para, type)); } return paragraphs; }
java
List<List<Annotation>> getParagraphs(AnnotationType type, String groupID) { List<List<Annotation>> paragraphs = new ArrayList<List<Annotation>>(); for (int para : Helper.getIndexKeys(type, groupID, this.paraIndex)) { paragraphs.add(this.getParaAnnotations(para, type)); } return paragraphs; }
[ "List", "<", "List", "<", "Annotation", ">", ">", "getParagraphs", "(", "AnnotationType", "type", ",", "String", "groupID", ")", "{", "List", "<", "List", "<", "Annotation", ">>", "paragraphs", "=", "new", "ArrayList", "<", "List", "<", "Annotation", ">", ...
Return all annotations of type "type" classified into paragraphs
[ "Return", "all", "annotations", "of", "type", "type", "classified", "into", "paragraphs" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/AnnotationContainer.java#L262-L268
46,953
fuinorg/event-store-commons
jpa/src/main/java/org/fuin/esc/jpa/JpaUtils.java
JpaUtils.streamEntityName
public static String streamEntityName(final StreamId streamId) { // User defined ID if (streamId instanceof JpaStreamId) { final JpaStreamId jpaId = (JpaStreamId) streamId; return jpaId.getEntityName(); } // Default ID if (streamId.isProjection()) { ...
java
public static String streamEntityName(final StreamId streamId) { // User defined ID if (streamId instanceof JpaStreamId) { final JpaStreamId jpaId = (JpaStreamId) streamId; return jpaId.getEntityName(); } // Default ID if (streamId.isProjection()) { ...
[ "public", "static", "String", "streamEntityName", "(", "final", "StreamId", "streamId", ")", "{", "// User defined ID", "if", "(", "streamId", "instanceof", "JpaStreamId", ")", "{", "final", "JpaStreamId", "jpaId", "=", "(", "JpaStreamId", ")", "streamId", ";", ...
Returns the name of the stream entity for a given stream. @param streamId Identifier of the stream to return a stream entity name for. @return Name of the entity (simple class name).
[ "Returns", "the", "name", "of", "the", "stream", "entity", "for", "a", "given", "stream", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/jpa/src/main/java/org/fuin/esc/jpa/JpaUtils.java#L40-L54
46,954
fuinorg/event-store-commons
jpa/src/main/java/org/fuin/esc/jpa/JpaUtils.java
JpaUtils.nativeEventsTableName
public static String nativeEventsTableName(final StreamId streamId) { // User defined ID if (streamId instanceof JpaStreamId) { final JpaStreamId jpaId = (JpaStreamId) streamId; return jpaId.getNativeTableName(); } // Default ID if (streamId.isProjection()...
java
public static String nativeEventsTableName(final StreamId streamId) { // User defined ID if (streamId instanceof JpaStreamId) { final JpaStreamId jpaId = (JpaStreamId) streamId; return jpaId.getNativeTableName(); } // Default ID if (streamId.isProjection()...
[ "public", "static", "String", "nativeEventsTableName", "(", "final", "StreamId", "streamId", ")", "{", "// User defined ID", "if", "(", "streamId", "instanceof", "JpaStreamId", ")", "{", "final", "JpaStreamId", "jpaId", "=", "(", "JpaStreamId", ")", "streamId", ";...
Returns a native database events table name. @param streamId Unique stream identifier. @return Name that is configured in the {@link javax.persistence.Table} JPA annotation.
[ "Returns", "a", "native", "database", "events", "table", "name", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/jpa/src/main/java/org/fuin/esc/jpa/JpaUtils.java#L63-L77
46,955
fuinorg/event-store-commons
jpa/src/main/java/org/fuin/esc/jpa/JpaUtils.java
JpaUtils.camel2Underscore
public static String camel2Underscore(@Nullable final String name) { if (name == null) { return null; } return name.replaceAll("(.)(\\p{Upper})", "$1_$2").toLowerCase(); }
java
public static String camel2Underscore(@Nullable final String name) { if (name == null) { return null; } return name.replaceAll("(.)(\\p{Upper})", "$1_$2").toLowerCase(); }
[ "public", "static", "String", "camel2Underscore", "(", "@", "Nullable", "final", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "null", ";", "}", "return", "name", ".", "replaceAll", "(", "\"(.)(\\\\p{Upper})\"", ",", "\"$...
Converts the given camel case name into a name with underscores. @param name Name to convert. @return Camel case replaced with underscores.
[ "Converts", "the", "given", "camel", "case", "name", "into", "a", "name", "with", "underscores", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/jpa/src/main/java/org/fuin/esc/jpa/JpaUtils.java#L86-L91
46,956
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/Event.java
Event.asCommonEvent
public final CommonEvent asCommonEvent(final JAXBContext ctx) { final Object m; if (getMeta() == null) { m = null; } else { m = getMeta().unmarshalContent(ctx); } final Object d = getData().unmarshalContent(ctx); if (getMeta() == null) { ...
java
public final CommonEvent asCommonEvent(final JAXBContext ctx) { final Object m; if (getMeta() == null) { m = null; } else { m = getMeta().unmarshalContent(ctx); } final Object d = getData().unmarshalContent(ctx); if (getMeta() == null) { ...
[ "public", "final", "CommonEvent", "asCommonEvent", "(", "final", "JAXBContext", "ctx", ")", "{", "final", "Object", "m", ";", "if", "(", "getMeta", "(", ")", "==", "null", ")", "{", "m", "=", "null", ";", "}", "else", "{", "m", "=", "getMeta", "(", ...
Returns this object as a common event object. @param ctx In case the XML JAXB unmarshalling is used, you have to pass the JAXB context here. @return Converted object.
[ "Returns", "this", "object", "as", "a", "common", "event", "object", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/Event.java#L149-L163
46,957
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/Event.java
Event.valueOf
public static Event valueOf(final CommonEvent selEvent) { final Data data = Data.valueOf(selEvent.getDataType().asBaseType(), selEvent.getData()); if (selEvent.getMeta() == null) { return new Event(selEvent.getId(), data); } final Data meta = Data.valueO...
java
public static Event valueOf(final CommonEvent selEvent) { final Data data = Data.valueOf(selEvent.getDataType().asBaseType(), selEvent.getData()); if (selEvent.getMeta() == null) { return new Event(selEvent.getId(), data); } final Data meta = Data.valueO...
[ "public", "static", "Event", "valueOf", "(", "final", "CommonEvent", "selEvent", ")", "{", "final", "Data", "data", "=", "Data", ".", "valueOf", "(", "selEvent", ".", "getDataType", "(", ")", ".", "asBaseType", "(", ")", ",", "selEvent", ".", "getData", ...
Creates an event using a common event. @param selEvent Event to copy. @return New instance.
[ "Creates", "an", "event", "using", "a", "common", "event", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/Event.java#L208-L216
46,958
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/job/builder/AnalysisJobBuilder.java
AnalysisJobBuilder.isConfigured
public boolean isConfigured(final boolean throwException) throws IllegalStateException, UnconfiguredConfiguredPropertyException { if (_datastoreConnection == null) { if (throwException) { throw new IllegalStateException("No Datastore or DatastoreConnection set"); ...
java
public boolean isConfigured(final boolean throwException) throws IllegalStateException, UnconfiguredConfiguredPropertyException { if (_datastoreConnection == null) { if (throwException) { throw new IllegalStateException("No Datastore or DatastoreConnection set"); ...
[ "public", "boolean", "isConfigured", "(", "final", "boolean", "throwException", ")", "throws", "IllegalStateException", ",", "UnconfiguredConfiguredPropertyException", "{", "if", "(", "_datastoreConnection", "==", "null", ")", "{", "if", "(", "throwException", ")", "{...
Used to verify whether or not the builder's configuration is valid and all properties are satisfied. @param throwException whether or not an exception should be thrown in case of invalid configuration. Typically an exception message will contain more detailed information about the cause of the validation error, wherea...
[ "Used", "to", "verify", "whether", "or", "not", "the", "builder", "s", "configuration", "is", "valid", "and", "all", "properties", "are", "satisfied", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/job/builder/AnalysisJobBuilder.java#L595-L637
46,959
datacleaner/AnalyzerBeans
env/berkeleydb/src/main/java/org/eobjects/analyzer/storage/BerkeleyDbStorageProvider.java
BerkeleyDbStorageProvider.delete
private void delete(File file) { if (file.isDirectory()) { File[] children = file.listFiles(); for (File child : children) { delete(child); } } if (!file.delete()) { if (!file.isDirectory()) { logger.warn("Unable to clean/delete file: {}", file); } else { logger.debug("Unable to clean/d...
java
private void delete(File file) { if (file.isDirectory()) { File[] children = file.listFiles(); for (File child : children) { delete(child); } } if (!file.delete()) { if (!file.isDirectory()) { logger.warn("Unable to clean/delete file: {}", file); } else { logger.debug("Unable to clean/d...
[ "private", "void", "delete", "(", "File", "file", ")", "{", "if", "(", "file", ".", "isDirectory", "(", ")", ")", "{", "File", "[", "]", "children", "=", "file", ".", "listFiles", "(", ")", ";", "for", "(", "File", "child", ":", "children", ")", ...
Recursively deletes a directory and all it's files @param file
[ "Recursively", "deletes", "a", "directory", "and", "all", "it", "s", "files" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/berkeleydb/src/main/java/org/eobjects/analyzer/storage/BerkeleyDbStorageProvider.java#L111-L125
46,960
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/util/CollectionUtils2.java
CollectionUtils2.refineCandidates
public static <E> List<E> refineCandidates(final List<E> candidates, final Predicate<? super E> predicate) { if (candidates.size() == 1) { return candidates; } List<E> newCandidates = CollectionUtils.filter(candidates, predicate); if (newCandidates.isEmpty()) { re...
java
public static <E> List<E> refineCandidates(final List<E> candidates, final Predicate<? super E> predicate) { if (candidates.size() == 1) { return candidates; } List<E> newCandidates = CollectionUtils.filter(candidates, predicate); if (newCandidates.isEmpty()) { re...
[ "public", "static", "<", "E", ">", "List", "<", "E", ">", "refineCandidates", "(", "final", "List", "<", "E", ">", "candidates", ",", "final", "Predicate", "<", "?", "super", "E", ">", "predicate", ")", "{", "if", "(", "candidates", ".", "size", "(",...
Refines a list of candidate objects based on a inclusion predicate. If no candidates are found, the original list will be retained in the result. Therefore the result will always have 1 or more elements in it. @param candidates @param predicate @return
[ "Refines", "a", "list", "of", "candidate", "objects", "based", "on", "a", "inclusion", "predicate", ".", "If", "no", "candidates", "are", "found", "the", "original", "list", "will", "be", "retained", "in", "the", "result", ".", "Therefore", "the", "result", ...
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/util/CollectionUtils2.java#L58-L67
46,961
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/util/CollectionUtils2.java
CollectionUtils2.createCache
public static <K, V> Cache<K, V> createCache(int maximumSize, long expiryDurationSeconds) { Cache<K, V> cache = CacheBuilder.newBuilder().maximumSize(maximumSize) .expireAfterAccess(expiryDurationSeconds, TimeUnit.SECONDS).build(); return cache; }
java
public static <K, V> Cache<K, V> createCache(int maximumSize, long expiryDurationSeconds) { Cache<K, V> cache = CacheBuilder.newBuilder().maximumSize(maximumSize) .expireAfterAccess(expiryDurationSeconds, TimeUnit.SECONDS).build(); return cache; }
[ "public", "static", "<", "K", ",", "V", ">", "Cache", "<", "K", ",", "V", ">", "createCache", "(", "int", "maximumSize", ",", "long", "expiryDurationSeconds", ")", "{", "Cache", "<", "K", ",", "V", ">", "cache", "=", "CacheBuilder", ".", "newBuilder", ...
Creates a typical Google Guava cache @param maximumSize @param expiryDurationSeconds @return
[ "Creates", "a", "typical", "Google", "Guava", "cache" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/util/CollectionUtils2.java#L148-L152
46,962
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/lifecycle/LifeCycleHelper.java
LifeCycleHelper.close
@Deprecated public void close(ComponentDescriptor<?> descriptor, Object component) { close(descriptor, component, true); }
java
@Deprecated public void close(ComponentDescriptor<?> descriptor, Object component) { close(descriptor, component, true); }
[ "@", "Deprecated", "public", "void", "close", "(", "ComponentDescriptor", "<", "?", ">", "descriptor", ",", "Object", "component", ")", "{", "close", "(", "descriptor", ",", "component", ",", "true", ")", ";", "}" ]
Closes a component after user. @param descriptor @param component @deprecated use {@link #close(ComponentDescriptor, Object, boolean)} instead.
[ "Closes", "a", "component", "after", "user", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/lifecycle/LifeCycleHelper.java#L193-L196
46,963
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/lifecycle/LifeCycleHelper.java
LifeCycleHelper.closeReferenceData
public void closeReferenceData() { if (_referenceDataActivationManager == null) { return; } final Collection<Object> referenceData = _referenceDataActivationManager.getAllReferenceData(); for (Object object : referenceData) { ComponentDescriptor<? extends Object> ...
java
public void closeReferenceData() { if (_referenceDataActivationManager == null) { return; } final Collection<Object> referenceData = _referenceDataActivationManager.getAllReferenceData(); for (Object object : referenceData) { ComponentDescriptor<? extends Object> ...
[ "public", "void", "closeReferenceData", "(", ")", "{", "if", "(", "_referenceDataActivationManager", "==", "null", ")", "{", "return", ";", "}", "final", "Collection", "<", "Object", ">", "referenceData", "=", "_referenceDataActivationManager", ".", "getAllReference...
Closes all reference data used in this life cycle helper
[ "Closes", "all", "reference", "data", "used", "in", "this", "life", "cycle", "helper" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/lifecycle/LifeCycleHelper.java#L201-L210
46,964
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/lifecycle/LifeCycleHelper.java
LifeCycleHelper.initializeReferenceData
public void initializeReferenceData() { if (_referenceDataActivationManager == null) { return; } final Collection<Object> referenceDataCollection = _referenceDataActivationManager.getAllReferenceData(); for (Object referenceData : referenceDataCollection) { Compon...
java
public void initializeReferenceData() { if (_referenceDataActivationManager == null) { return; } final Collection<Object> referenceDataCollection = _referenceDataActivationManager.getAllReferenceData(); for (Object referenceData : referenceDataCollection) { Compon...
[ "public", "void", "initializeReferenceData", "(", ")", "{", "if", "(", "_referenceDataActivationManager", "==", "null", ")", "{", "return", ";", "}", "final", "Collection", "<", "Object", ">", "referenceDataCollection", "=", "_referenceDataActivationManager", ".", "...
Initializes all reference data used in this life cycle helper
[ "Initializes", "all", "reference", "data", "used", "in", "this", "life", "cycle", "helper" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/lifecycle/LifeCycleHelper.java#L215-L226
46,965
fuinorg/event-store-commons
api/src/main/java/org/fuin/esc/api/StreamEventsSlice.java
StreamEventsSlice.toDebugString
@NotNull public final String toDebugString() { return new ToStringBuilder(this) .append("fromEventNumber", fromEventNumber) .append("nextEventNumber", nextEventNumber) .append("endOfStream", endOfStream) .append("events", events).toString...
java
@NotNull public final String toDebugString() { return new ToStringBuilder(this) .append("fromEventNumber", fromEventNumber) .append("nextEventNumber", nextEventNumber) .append("endOfStream", endOfStream) .append("events", events).toString...
[ "@", "NotNull", "public", "final", "String", "toDebugString", "(", ")", "{", "return", "new", "ToStringBuilder", "(", "this", ")", ".", "append", "(", "\"fromEventNumber\"", ",", "fromEventNumber", ")", ".", "append", "(", "\"nextEventNumber\"", ",", "nextEventN...
Returns a debug string representation with all data. @return Includes list content.
[ "Returns", "a", "debug", "string", "representation", "with", "all", "data", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/api/src/main/java/org/fuin/esc/api/StreamEventsSlice.java#L163-L170
46,966
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/util/SystemProperties.java
SystemProperties.getString
public static String getString(String key, String valueIfNull) { String value = System.getProperty(key); if (Strings.isNullOrEmpty(value)) { return valueIfNull; } return value; }
java
public static String getString(String key, String valueIfNull) { String value = System.getProperty(key); if (Strings.isNullOrEmpty(value)) { return valueIfNull; } return value; }
[ "public", "static", "String", "getString", "(", "String", "key", ",", "String", "valueIfNull", ")", "{", "String", "value", "=", "System", ".", "getProperty", "(", "key", ")", ";", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "value", ")", ")", "{", ...
Gets a system property string, or a replacement value if the property is null or blank. @param key @param valueIfNull @return
[ "Gets", "a", "system", "property", "string", "or", "a", "replacement", "value", "if", "the", "property", "is", "null", "or", "blank", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/util/SystemProperties.java#L47-L53
46,967
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/util/SystemProperties.java
SystemProperties.getLong
public static long getLong(String key, long valueIfNullOrNotParseable) { String value = System.getProperty(key); if (Strings.isNullOrEmpty(value)) { return valueIfNullOrNotParseable; } try { return Long.parseLong(value); } catch (NumberFormatException e) {...
java
public static long getLong(String key, long valueIfNullOrNotParseable) { String value = System.getProperty(key); if (Strings.isNullOrEmpty(value)) { return valueIfNullOrNotParseable; } try { return Long.parseLong(value); } catch (NumberFormatException e) {...
[ "public", "static", "long", "getLong", "(", "String", "key", ",", "long", "valueIfNullOrNotParseable", ")", "{", "String", "value", "=", "System", ".", "getProperty", "(", "key", ")", ";", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "value", ")", ")",...
Gets a system property long, or a replacement value if the property is null or blank or not parseable @param key @param valueIfNullOrNotParseable @return
[ "Gets", "a", "system", "property", "long", "or", "a", "replacement", "value", "if", "the", "property", "is", "null", "or", "blank", "or", "not", "parseable" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/util/SystemProperties.java#L63-L73
46,968
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/util/SystemProperties.java
SystemProperties.getInt
public static long getInt(String key, int valueIfNullOrNotParseable) { String value = System.getProperty(key); if (Strings.isNullOrEmpty(value)) { return valueIfNullOrNotParseable; } try { return Integer.parseInt(value); } catch (NumberFormatException e) {...
java
public static long getInt(String key, int valueIfNullOrNotParseable) { String value = System.getProperty(key); if (Strings.isNullOrEmpty(value)) { return valueIfNullOrNotParseable; } try { return Integer.parseInt(value); } catch (NumberFormatException e) {...
[ "public", "static", "long", "getInt", "(", "String", "key", ",", "int", "valueIfNullOrNotParseable", ")", "{", "String", "value", "=", "System", ".", "getProperty", "(", "key", ")", ";", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "value", ")", ")", ...
Gets a system property int, or a replacement value if the property is null or blank or not parseable @param key @param valueIfNullOrNotParseable @return
[ "Gets", "a", "system", "property", "int", "or", "a", "replacement", "value", "if", "the", "property", "is", "null", "or", "blank", "or", "not", "parseable" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/util/SystemProperties.java#L83-L93
46,969
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/util/SystemProperties.java
SystemProperties.getBoolean
public static boolean getBoolean(String key, boolean valueIfNull) { String value = System.getProperty(key); if (Strings.isNullOrEmpty(value)) { return valueIfNull; } value = value.trim().toLowerCase(); if ("true".equals(value)) { return true; } e...
java
public static boolean getBoolean(String key, boolean valueIfNull) { String value = System.getProperty(key); if (Strings.isNullOrEmpty(value)) { return valueIfNull; } value = value.trim().toLowerCase(); if ("true".equals(value)) { return true; } e...
[ "public", "static", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "valueIfNull", ")", "{", "String", "value", "=", "System", ".", "getProperty", "(", "key", ")", ";", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "value", ")", ")", "{...
Gets a system property boolean, or a replacement value if the property is null or blank or not parseable as a boolean. @param key @param valueIfNull @return
[ "Gets", "a", "system", "property", "boolean", "or", "a", "replacement", "value", "if", "the", "property", "is", "null", "or", "blank", "or", "not", "parseable", "as", "a", "boolean", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/util/SystemProperties.java#L103-L118
46,970
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/fragments/SharedPreferencesItem.java
SharedPreferencesItem.restoreData
private void restoreData() { Map<String, ?> map = preferenceUtils.getAll(); Set<String> strings = map.keySet(); for (String string : strings) { if (string.startsWith(SharedPreferenceUtils.keyTestMode)) { preferenceUtils.restoreKey(string); } } refreshKeyValues(); }
java
private void restoreData() { Map<String, ?> map = preferenceUtils.getAll(); Set<String> strings = map.keySet(); for (String string : strings) { if (string.startsWith(SharedPreferenceUtils.keyTestMode)) { preferenceUtils.restoreKey(string); } } refreshKeyValues(); }
[ "private", "void", "restoreData", "(", ")", "{", "Map", "<", "String", ",", "?", ">", "map", "=", "preferenceUtils", ".", "getAll", "(", ")", ";", "Set", "<", "String", ">", "strings", "=", "map", ".", "keySet", "(", ")", ";", "for", "(", "String",...
Restore values of original keys stored.
[ "Restore", "values", "of", "original", "keys", "stored", "." ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/fragments/SharedPreferencesItem.java#L144-L156
46,971
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/fragments/SharedPreferencesItem.java
SharedPreferencesItem.getKeyValues
private ArrayList<Pair<String, ?>> getKeyValues() { ArrayList<Pair<String, ?>> keyValPair = new ArrayList<>(); Map<String, ?> map = preferenceUtils.getAll(); Set<String> strings = map.keySet(); Object value; for (String key : strings) { if (!key.contains(SharedPreferenceUtils.keyTestMode)) { value = ma...
java
private ArrayList<Pair<String, ?>> getKeyValues() { ArrayList<Pair<String, ?>> keyValPair = new ArrayList<>(); Map<String, ?> map = preferenceUtils.getAll(); Set<String> strings = map.keySet(); Object value; for (String key : strings) { if (!key.contains(SharedPreferenceUtils.keyTestMode)) { value = ma...
[ "private", "ArrayList", "<", "Pair", "<", "String", ",", "?", ">", ">", "getKeyValues", "(", ")", "{", "ArrayList", "<", "Pair", "<", "String", ",", "?", ">", ">", "keyValPair", "=", "new", "ArrayList", "<>", "(", ")", ";", "Map", "<", "String", ",...
Get Key value pair for given shared preference files @return : Pair of key value files from given shared preferences.
[ "Get", "Key", "value", "pair", "for", "given", "shared", "preference", "files" ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/fragments/SharedPreferencesItem.java#L170-L182
46,972
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/fragments/SharedPreferencesItem.java
SharedPreferencesItem.storeOriginal
private void storeOriginal(Pair<String, Object> keyValue) { String key = SharedPreferenceUtils.keyTestMode + keyValue.first; if (!preferenceUtils.isValueExistForKey(key)) { preferenceUtils.put(key, keyValue.second); } }
java
private void storeOriginal(Pair<String, Object> keyValue) { String key = SharedPreferenceUtils.keyTestMode + keyValue.first; if (!preferenceUtils.isValueExistForKey(key)) { preferenceUtils.put(key, keyValue.second); } }
[ "private", "void", "storeOriginal", "(", "Pair", "<", "String", ",", "Object", ">", "keyValue", ")", "{", "String", "key", "=", "SharedPreferenceUtils", ".", "keyTestMode", "+", "keyValue", ".", "first", ";", "if", "(", "!", "preferenceUtils", ".", "isValueE...
Store original value before it's changed in test mode. It will take care not to over write if original value is already stored. @param keyValue : Pair of key and original value.
[ "Store", "original", "value", "before", "it", "s", "changed", "in", "test", "mode", ".", "It", "will", "take", "care", "not", "to", "over", "write", "if", "original", "value", "is", "already", "stored", "." ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/fragments/SharedPreferencesItem.java#L373-L380
46,973
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EscMeta.java
EscMeta.getDataContentType
@NotNull public final EnhancedMimeType getDataContentType() { if (dataContentType == null) { dataContentType = EnhancedMimeType.create(dataContentTypeStr); } return dataContentType; }
java
@NotNull public final EnhancedMimeType getDataContentType() { if (dataContentType == null) { dataContentType = EnhancedMimeType.create(dataContentTypeStr); } return dataContentType; }
[ "@", "NotNull", "public", "final", "EnhancedMimeType", "getDataContentType", "(", ")", "{", "if", "(", "dataContentType", "==", "null", ")", "{", "dataContentType", "=", "EnhancedMimeType", ".", "create", "(", "dataContentTypeStr", ")", ";", "}", "return", "data...
Returns the type of the data. @return Data type.
[ "Returns", "the", "type", "of", "the", "data", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EscMeta.java#L150-L156
46,974
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EscMeta.java
EscMeta.getMetaContentType
@Nullable public final EnhancedMimeType getMetaContentType() { if ((metaContentType == null) && (metaContentTypeStr != null)) { metaContentType = EnhancedMimeType.create(metaContentTypeStr); } return metaContentType; }
java
@Nullable public final EnhancedMimeType getMetaContentType() { if ((metaContentType == null) && (metaContentTypeStr != null)) { metaContentType = EnhancedMimeType.create(metaContentTypeStr); } return metaContentType; }
[ "@", "Nullable", "public", "final", "EnhancedMimeType", "getMetaContentType", "(", ")", "{", "if", "(", "(", "metaContentType", "==", "null", ")", "&&", "(", "metaContentTypeStr", "!=", "null", ")", ")", "{", "metaContentType", "=", "EnhancedMimeType", ".", "c...
Returns the type of the meta data if meta data is available. @return Meta type.
[ "Returns", "the", "type", "of", "the", "meta", "data", "if", "meta", "data", "is", "available", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EscMeta.java#L173-L179
46,975
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/EscMeta.java
EscMeta.toJson
public JsonObject toJson() { final JsonObjectBuilder builder = Json.createObjectBuilder(); builder.add(EL_DATA_TYPE, dataType); builder.add(EL_DATA_CONTENT_TYPE, dataContentTypeStr); if (meta == null) { return builder.build(); } builder.add(EL_META_TYPE, metaT...
java
public JsonObject toJson() { final JsonObjectBuilder builder = Json.createObjectBuilder(); builder.add(EL_DATA_TYPE, dataType); builder.add(EL_DATA_CONTENT_TYPE, dataContentTypeStr); if (meta == null) { return builder.build(); } builder.add(EL_META_TYPE, metaT...
[ "public", "JsonObject", "toJson", "(", ")", "{", "final", "JsonObjectBuilder", "builder", "=", "Json", ".", "createObjectBuilder", "(", ")", ";", "builder", ".", "add", "(", "EL_DATA_TYPE", ",", "dataType", ")", ";", "builder", ".", "add", "(", "EL_DATA_CONT...
Converts the object into a JSON object. @return JSON object.
[ "Converts", "the", "object", "into", "a", "JSON", "object", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/EscMeta.java#L196-L218
46,976
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.callRC
public JsonElement callRC(LsApiBody body) throws LimesurveyRCException { try (CloseableHttpClient client = HttpClientBuilder.create().build()) { HttpPost post = new HttpPost(url); post.setHeader("Content-type", "application/json"); String jsonBody = gson.toJson(body); ...
java
public JsonElement callRC(LsApiBody body) throws LimesurveyRCException { try (CloseableHttpClient client = HttpClientBuilder.create().build()) { HttpPost post = new HttpPost(url); post.setHeader("Content-type", "application/json"); String jsonBody = gson.toJson(body); ...
[ "public", "JsonElement", "callRC", "(", "LsApiBody", "body", ")", "throws", "LimesurveyRCException", "{", "try", "(", "CloseableHttpClient", "client", "=", "HttpClientBuilder", ".", "create", "(", ")", ".", "build", "(", ")", ")", "{", "HttpPost", "post", "=",...
Call Limesurvey Remote Control. @param body the body of the request. Contains which method to call and the parameters @return the json element containing the result from the call @throws LimesurveyRCException the limesurvey rc exception
[ "Call", "Limesurvey", "Remote", "Control", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L89-L111
46,977
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.createIncompleteResponse
public int createIncompleteResponse(int surveyId, String token) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); HashMap<String, String> responseData = new HashMap<>(); responseData.put("submitdate", ""); String date = ZonedDateTime.now().format(D...
java
public int createIncompleteResponse(int surveyId, String token) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); HashMap<String, String> responseData = new HashMap<>(); responseData.put("submitdate", ""); String date = ZonedDateTime.now().format(D...
[ "public", "int", "createIncompleteResponse", "(", "int", "surveyId", ",", "String", "token", ")", "throws", "LimesurveyRCException", "{", "LsApiBody", ".", "LsApiParams", "params", "=", "getParamsWithKey", "(", "surveyId", ")", ";", "HashMap", "<", "String", ",", ...
Create an incomplete response, its field "completed" is set to "N" and the response doesn't have a submitdate. @param surveyId the survey id of the survey you want to create the response @param token the token used for the response, no token will be set if the value is empty @return the id of the response @throws L...
[ "Create", "an", "incomplete", "response", "its", "field", "completed", "is", "set", "to", "N", "and", "the", "response", "doesn", "t", "have", "a", "submitdate", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L132-L144
46,978
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.completeResponse
public boolean completeResponse(int surveyId, int responseId, LocalDateTime date) throws LimesurveyRCException { Map<String, String> responseData = new HashMap<>(); responseData.put("submitdate", date.format(DateTimeFormatter.ISO_LOCAL_DATE) + " " + date.format(DateTimeFormatter.ISO_LOCAL_TIME)); ...
java
public boolean completeResponse(int surveyId, int responseId, LocalDateTime date) throws LimesurveyRCException { Map<String, String> responseData = new HashMap<>(); responseData.put("submitdate", date.format(DateTimeFormatter.ISO_LOCAL_DATE) + " " + date.format(DateTimeFormatter.ISO_LOCAL_TIME)); ...
[ "public", "boolean", "completeResponse", "(", "int", "surveyId", ",", "int", "responseId", ",", "LocalDateTime", "date", ")", "throws", "LimesurveyRCException", "{", "Map", "<", "String", ",", "String", ">", "responseData", "=", "new", "HashMap", "<>", "(", ")...
Complete a response. @param surveyId the survey id of the survey you want to complete the response @param responseId the response id of the response you want to complete @param date the date where the response will be completed (submitdate) @return true if the response was successfuly completed @throws Limesur...
[ "Complete", "a", "response", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L167-L177
46,979
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.updateResponse
public JsonElement updateResponse(int surveyId, int responseId, Map<String, String> responseData) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); responseData.put("id", String.valueOf(responseId)); params.setResponseData(responseData); return ca...
java
public JsonElement updateResponse(int surveyId, int responseId, Map<String, String> responseData) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); responseData.put("id", String.valueOf(responseId)); params.setResponseData(responseData); return ca...
[ "public", "JsonElement", "updateResponse", "(", "int", "surveyId", ",", "int", "responseId", ",", "Map", "<", "String", ",", "String", ">", "responseData", ")", "throws", "LimesurveyRCException", "{", "LsApiBody", ".", "LsApiParams", "params", "=", "getParamsWithK...
Update a response. @param surveyId the survey id of the survey you want to update the response @param responseId the response id of the response you want to update @param responseData the response data that contains the fields you want to update @return the json element @throws LimesurveyRCException the limesurv...
[ "Update", "a", "response", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L188-L194
46,980
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getQuestions
public Stream<LsQuestion> getQuestions(int surveyId) throws LimesurveyRCException { return getGroups(surveyId).flatMap(group -> { try { return getQuestionsFromGroup(surveyId, group.getId()); } catch (LimesurveyRCException e) { LOGGER.error("Unable to get q...
java
public Stream<LsQuestion> getQuestions(int surveyId) throws LimesurveyRCException { return getGroups(surveyId).flatMap(group -> { try { return getQuestionsFromGroup(surveyId, group.getId()); } catch (LimesurveyRCException e) { LOGGER.error("Unable to get q...
[ "public", "Stream", "<", "LsQuestion", ">", "getQuestions", "(", "int", "surveyId", ")", "throws", "LimesurveyRCException", "{", "return", "getGroups", "(", "surveyId", ")", ".", "flatMap", "(", "group", "->", "{", "try", "{", "return", "getQuestionsFromGroup", ...
Gets questions from a survey. The questions are ordered using the "group_order" field from the groups and then the "question_order" field from the questions @param surveyId the survey id of the survey you want to get the questions @return a stream of questions in an ordered order @throws LimesurveyRCException the lime...
[ "Gets", "questions", "from", "a", "survey", ".", "The", "questions", "are", "ordered", "using", "the", "group_order", "field", "from", "the", "groups", "and", "then", "the", "question_order", "field", "from", "the", "questions" ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L204-L213
46,981
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getQuestion
public LsQuestion getQuestion(int surveyId, int questionId) throws LimesurveyRCException { return getQuestions(surveyId).filter(question -> question.getId() == questionId) .findFirst().orElseThrow(() -> new LimesurveyRCException("No question found for id " + questionId + " in survey " + surveyId...
java
public LsQuestion getQuestion(int surveyId, int questionId) throws LimesurveyRCException { return getQuestions(surveyId).filter(question -> question.getId() == questionId) .findFirst().orElseThrow(() -> new LimesurveyRCException("No question found for id " + questionId + " in survey " + surveyId...
[ "public", "LsQuestion", "getQuestion", "(", "int", "surveyId", ",", "int", "questionId", ")", "throws", "LimesurveyRCException", "{", "return", "getQuestions", "(", "surveyId", ")", ".", "filter", "(", "question", "->", "question", ".", "getId", "(", ")", "=="...
Gets question from a survey. @param surveyId the survey id of the survey you want to get the question @param questionId the question id @return the question @throws LimesurveyRCException if no question was found with the given id
[ "Gets", "question", "from", "a", "survey", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L223-L226
46,982
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getQuestionAnswers
public Map<String, LsQuestionAnswer> getQuestionAnswers(int questionId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(); params.setQuestionId(questionId); List<String> questionSettings = new ArrayList<>(); questionSettings.add("answeroptions"); pa...
java
public Map<String, LsQuestionAnswer> getQuestionAnswers(int questionId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(); params.setQuestionId(questionId); List<String> questionSettings = new ArrayList<>(); questionSettings.add("answeroptions"); pa...
[ "public", "Map", "<", "String", ",", "LsQuestionAnswer", ">", "getQuestionAnswers", "(", "int", "questionId", ")", "throws", "LimesurveyRCException", "{", "LsApiBody", ".", "LsApiParams", "params", "=", "getParamsWithKey", "(", ")", ";", "params", ".", "setQuestio...
Gets possible answers from a question. @param questionId the question id you want to get the answers @return the answers of the question @throws LimesurveyRCException the limesurvey rc exception
[ "Gets", "possible", "answers", "from", "a", "question", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L235-L245
46,983
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getGroups
public Stream<LsQuestionGroup> getGroups(int surveyId) throws LimesurveyRCException { JsonElement result = callRC(new LsApiBody("list_groups", getParamsWithKey(surveyId))); List<LsQuestionGroup> questionGroups = gson.fromJson(result, new TypeToken<List<LsQuestionGroup>>() { }.getType()); ...
java
public Stream<LsQuestionGroup> getGroups(int surveyId) throws LimesurveyRCException { JsonElement result = callRC(new LsApiBody("list_groups", getParamsWithKey(surveyId))); List<LsQuestionGroup> questionGroups = gson.fromJson(result, new TypeToken<List<LsQuestionGroup>>() { }.getType()); ...
[ "public", "Stream", "<", "LsQuestionGroup", ">", "getGroups", "(", "int", "surveyId", ")", "throws", "LimesurveyRCException", "{", "JsonElement", "result", "=", "callRC", "(", "new", "LsApiBody", "(", "\"list_groups\"", ",", "getParamsWithKey", "(", "surveyId", ")...
Gets groups from a survey. The groups are ordered using the "group_order" field. @param surveyId the survey id you want to get the groups @return a stream of groups in an ordered order @throws LimesurveyRCException the limesurvey rc exception
[ "Gets", "groups", "from", "a", "survey", ".", "The", "groups", "are", "ordered", "using", "the", "group_order", "field", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L255-L261
46,984
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getQuestionsFromGroup
public Stream<LsQuestion> getQuestionsFromGroup(int surveyId, int groupId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); params.setGroupId(groupId); JsonElement result = callRC(new LsApiBody("list_questions", params)); List<LsQuestion> question...
java
public Stream<LsQuestion> getQuestionsFromGroup(int surveyId, int groupId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); params.setGroupId(groupId); JsonElement result = callRC(new LsApiBody("list_questions", params)); List<LsQuestion> question...
[ "public", "Stream", "<", "LsQuestion", ">", "getQuestionsFromGroup", "(", "int", "surveyId", ",", "int", "groupId", ")", "throws", "LimesurveyRCException", "{", "LsApiBody", ".", "LsApiParams", "params", "=", "getParamsWithKey", "(", "surveyId", ")", ";", "params"...
Gets questions from a group. The questions are ordered using the "question_order" field. @param surveyId the survey id you want to get the questions @param groupId the group id you want to get the questions @return a stream of questions in an ordered order @throws LimesurveyRCException the limesurvey rc exception
[ "Gets", "questions", "from", "a", "group", ".", "The", "questions", "are", "ordered", "using", "the", "question_order", "field", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L272-L280
46,985
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.isSurveyActive
public boolean isSurveyActive(int surveyId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); List<String> surveySettings = new ArrayList<>(); surveySettings.add("active"); params.setSurveySettings(surveySettings); return "Y".equals(callRC...
java
public boolean isSurveyActive(int surveyId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); List<String> surveySettings = new ArrayList<>(); surveySettings.add("active"); params.setSurveySettings(surveySettings); return "Y".equals(callRC...
[ "public", "boolean", "isSurveyActive", "(", "int", "surveyId", ")", "throws", "LimesurveyRCException", "{", "LsApiBody", ".", "LsApiParams", "params", "=", "getParamsWithKey", "(", "surveyId", ")", ";", "List", "<", "String", ">", "surveySettings", "=", "new", "...
Check if a survey is active. @param surveyId the survey id of the survey you want to check @return true if the survey is active @throws LimesurveyRCException the limesurvey rc exception
[ "Check", "if", "a", "survey", "is", "active", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L289-L296
46,986
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getSurveys
public Stream<LsSurvey> getSurveys() throws LimesurveyRCException { JsonElement result = callRC(new LsApiBody("list_surveys", getParamsWithKey())); List<LsSurvey> surveys = gson.fromJson(result, new TypeToken<List<LsSurvey>>() { }.getType()); return surveys.stream(); }
java
public Stream<LsSurvey> getSurveys() throws LimesurveyRCException { JsonElement result = callRC(new LsApiBody("list_surveys", getParamsWithKey())); List<LsSurvey> surveys = gson.fromJson(result, new TypeToken<List<LsSurvey>>() { }.getType()); return surveys.stream(); }
[ "public", "Stream", "<", "LsSurvey", ">", "getSurveys", "(", ")", "throws", "LimesurveyRCException", "{", "JsonElement", "result", "=", "callRC", "(", "new", "LsApiBody", "(", "\"list_surveys\"", ",", "getParamsWithKey", "(", ")", ")", ")", ";", "List", "<", ...
Gets all surveys. @return a stream of surveys @throws LimesurveyRCException the limesurvey rc exception
[ "Gets", "all", "surveys", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L325-L331
46,987
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getSurveyLanguageProperties
public LsSurveyLanguage getSurveyLanguageProperties(int surveyId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); List<String> localeSettings = new ArrayList<>(); localeSettings.add("surveyls_welcometext"); localeSettings.add("surveyls_endtext");...
java
public LsSurveyLanguage getSurveyLanguageProperties(int surveyId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); List<String> localeSettings = new ArrayList<>(); localeSettings.add("surveyls_welcometext"); localeSettings.add("surveyls_endtext");...
[ "public", "LsSurveyLanguage", "getSurveyLanguageProperties", "(", "int", "surveyId", ")", "throws", "LimesurveyRCException", "{", "LsApiBody", ".", "LsApiParams", "params", "=", "getParamsWithKey", "(", "surveyId", ")", ";", "List", "<", "String", ">", "localeSettings...
Gets language properties from a survey. @param surveyId the survey id of the survey you want the properties @return the language properties @throws LimesurveyRCException the limesurvey rc exception
[ "Gets", "language", "properties", "from", "a", "survey", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L340-L350
46,988
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getSessionKey
public String getSessionKey() throws LimesurveyRCException { // Use the saved key if isn't expired if (!key.isEmpty() && ZonedDateTime.now().isBefore(keyExpiration)) { return key; } // Get session key and save it with an expiration set to 1 minute before the expiration date ...
java
public String getSessionKey() throws LimesurveyRCException { // Use the saved key if isn't expired if (!key.isEmpty() && ZonedDateTime.now().isBefore(keyExpiration)) { return key; } // Get session key and save it with an expiration set to 1 minute before the expiration date ...
[ "public", "String", "getSessionKey", "(", ")", "throws", "LimesurveyRCException", "{", "// Use the saved key if isn't expired", "if", "(", "!", "key", ".", "isEmpty", "(", ")", "&&", "ZonedDateTime", ".", "now", "(", ")", ".", "isBefore", "(", "keyExpiration", "...
Gets the current session key. @return the session key @throws LimesurveyRCException the limesurvey rc exception
[ "Gets", "the", "current", "session", "key", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L358-L373
46,989
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getParticipantProperties
public Map<String, String> getParticipantProperties(int surveyId, String token, List<String> tokenProperties) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); Map<String, String> queryProperties = new HashMap<>(); queryProperties.put("token", token); ...
java
public Map<String, String> getParticipantProperties(int surveyId, String token, List<String> tokenProperties) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); Map<String, String> queryProperties = new HashMap<>(); queryProperties.put("token", token); ...
[ "public", "Map", "<", "String", ",", "String", ">", "getParticipantProperties", "(", "int", "surveyId", ",", "String", "token", ",", "List", "<", "String", ">", "tokenProperties", ")", "throws", "LimesurveyRCException", "{", "LsApiBody", ".", "LsApiParams", "par...
Gets participant properties. @param surveyId the survey id of the participant's survey @param token the token of the participant @param tokenProperties the token properties @return the participant properties @throws LimesurveyRCException the limesurvey rc exception
[ "Gets", "participant", "properties", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L384-L393
46,990
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getAllParticipants
public Stream<LsParticipant> getAllParticipants(int surveyId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); params.setStart(0); params.setLimit(-1); List<LsParticipant> participants = gson.fromJson(callRC(new LsApiBody("list_participants", para...
java
public Stream<LsParticipant> getAllParticipants(int surveyId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); params.setStart(0); params.setLimit(-1); List<LsParticipant> participants = gson.fromJson(callRC(new LsApiBody("list_participants", para...
[ "public", "Stream", "<", "LsParticipant", ">", "getAllParticipants", "(", "int", "surveyId", ")", "throws", "LimesurveyRCException", "{", "LsApiBody", ".", "LsApiParams", "params", "=", "getParamsWithKey", "(", "surveyId", ")", ";", "params", ".", "setStart", "(",...
Gets all participants from a survey. @param surveyId the survey id of the survey you want the participants @return the all participants @throws LimesurveyRCException the limesurvey rc exception
[ "Gets", "all", "participants", "from", "a", "survey", "." ]
b8d573389086395e46a0bdeeddeef4d1c2c0a488
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L402-L410
46,991
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.initWith
public static SharedPreferenceUtils initWith(SharedPreferences sharedPreferences) { if (sharedPreferenceUtils == null) { sharedPreferenceUtils = new SharedPreferenceUtils(); } sharedPreferenceUtils.sharedPreferences = sharedPreferences; return sharedPreferenceUtils; }
java
public static SharedPreferenceUtils initWith(SharedPreferences sharedPreferences) { if (sharedPreferenceUtils == null) { sharedPreferenceUtils = new SharedPreferenceUtils(); } sharedPreferenceUtils.sharedPreferences = sharedPreferences; return sharedPreferenceUtils; }
[ "public", "static", "SharedPreferenceUtils", "initWith", "(", "SharedPreferences", "sharedPreferences", ")", "{", "if", "(", "sharedPreferenceUtils", "==", "null", ")", "{", "sharedPreferenceUtils", "=", "new", "SharedPreferenceUtils", "(", ")", ";", "}", "sharedPrefe...
Init SharedPreferenceUtils with SharedPreferences file @param sharedPreferences : SharedPreferences object to init with. @return : SharedPreferenceUtils object. It will store the sharedPreferences value with given SharedPreferences.
[ "Init", "SharedPreferenceUtils", "with", "SharedPreferences", "file" ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L44-L51
46,992
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.initWith
public static SharedPreferenceUtils initWith(Context context, String name) { if (sharedPreferenceUtils == null) { sharedPreferenceUtils = new SharedPreferenceUtils(); } if (isEmptyString(name)) { sharedPreferenceUtils.sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); } else { ...
java
public static SharedPreferenceUtils initWith(Context context, String name) { if (sharedPreferenceUtils == null) { sharedPreferenceUtils = new SharedPreferenceUtils(); } if (isEmptyString(name)) { sharedPreferenceUtils.sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); } else { ...
[ "public", "static", "SharedPreferenceUtils", "initWith", "(", "Context", "context", ",", "String", "name", ")", "{", "if", "(", "sharedPreferenceUtils", "==", "null", ")", "{", "sharedPreferenceUtils", "=", "new", "SharedPreferenceUtils", "(", ")", ";", "}", "if...
Init SharedPreferences with context and a SharedPreferences name @param context: Context to init SharedPreferences @param name: Name of SharedPreferences file. If you pass <code>null</code> it will create default SharedPrefernces @return: SharedPreferenceUtils object. It will store given the sharedPreferences value w...
[ "Init", "SharedPreferences", "with", "context", "and", "a", "SharedPreferences", "name" ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L63-L73
46,993
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.getNumber
public static int getNumber(CharSequence string) { int number = 0; if (!isEmptyString(string)) { if (TextUtils.isDigitsOnly(string)) { number = Integer.parseInt(string.toString()); } } return number; }
java
public static int getNumber(CharSequence string) { int number = 0; if (!isEmptyString(string)) { if (TextUtils.isDigitsOnly(string)) { number = Integer.parseInt(string.toString()); } } return number; }
[ "public", "static", "int", "getNumber", "(", "CharSequence", "string", ")", "{", "int", "number", "=", "0", ";", "if", "(", "!", "isEmptyString", "(", "string", ")", ")", "{", "if", "(", "TextUtils", ".", "isDigitsOnly", "(", "string", ")", ")", "{", ...
Extract number from string, failsafe. If the string is not a proper number it will always return 0; @param string : String that should be converted into a number @return : 0 if conversion to number is failed anyhow, otherwise converted number is returned
[ "Extract", "number", "from", "string", "failsafe", ".", "If", "the", "string", "is", "not", "a", "proper", "number", "it", "will", "always", "return", "0", ";" ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L95-L104
46,994
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.getNumberFloat
public static float getNumberFloat(CharSequence string) { float number = 0.0f; try { if (!isEmptyString(string)) { number = Float.parseFloat(string.toString()); } } catch (NumberFormatException e) { e.printStackTrace(); } return number; }
java
public static float getNumberFloat(CharSequence string) { float number = 0.0f; try { if (!isEmptyString(string)) { number = Float.parseFloat(string.toString()); } } catch (NumberFormatException e) { e.printStackTrace(); } return number; }
[ "public", "static", "float", "getNumberFloat", "(", "CharSequence", "string", ")", "{", "float", "number", "=", "0.0f", ";", "try", "{", "if", "(", "!", "isEmptyString", "(", "string", ")", ")", "{", "number", "=", "Float", ".", "parseFloat", "(", "strin...
Extract number from string, failsafe. If the string is not a proper number it will always return 0.0f; @param string : String that should be converted into a number @return : 0.0f if conversion to number is failed anyhow, otherwise converted number is returned
[ "Extract", "number", "from", "string", "failsafe", ".", "If", "the", "string", "is", "not", "a", "proper", "number", "it", "will", "always", "return", "0", ".", "0f", ";" ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L114-L124
46,995
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.getNumberLong
public static long getNumberLong(CharSequence string) { long number = 0l; try { if (!isEmptyString(string)) { if (TextUtils.isDigitsOnly(string)) { number = Long.parseLong(string.toString()); } } } catch (NumberFormatException e) { e.printStackTrace(); } return number; }
java
public static long getNumberLong(CharSequence string) { long number = 0l; try { if (!isEmptyString(string)) { if (TextUtils.isDigitsOnly(string)) { number = Long.parseLong(string.toString()); } } } catch (NumberFormatException e) { e.printStackTrace(); } return number; }
[ "public", "static", "long", "getNumberLong", "(", "CharSequence", "string", ")", "{", "long", "number", "=", "0l", ";", "try", "{", "if", "(", "!", "isEmptyString", "(", "string", ")", ")", "{", "if", "(", "TextUtils", ".", "isDigitsOnly", "(", "string",...
Extract number from string, failsafe. If the string is not a proper number it will always return 0l; @param string : String that should be converted into a number @return : 0l if conversion to number is failed anyhow, otherwise converted number is returned
[ "Extract", "number", "from", "string", "failsafe", ".", "If", "the", "string", "is", "not", "a", "proper", "number", "it", "will", "always", "return", "0l", ";" ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L135-L148
46,996
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.inflateDebugMenu
public void inflateDebugMenu(MenuInflater inflater, Menu menu) { inflater.inflate(R.menu.debug, menu); }
java
public void inflateDebugMenu(MenuInflater inflater, Menu menu) { inflater.inflate(R.menu.debug, menu); }
[ "public", "void", "inflateDebugMenu", "(", "MenuInflater", "inflater", ",", "Menu", "menu", ")", "{", "inflater", ".", "inflate", "(", "R", ".", "menu", ".", "debug", ",", "menu", ")", ";", "}" ]
Inflate menu item for debug. @param inflater: MenuInflater to inflate the menu. @param menu : Menu object to inflate debug menu.
[ "Inflate", "menu", "item", "for", "debug", "." ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L167-L169
46,997
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.isDebugHandled
public boolean isDebugHandled(Context context, MenuItem item) { int id = item.getItemId(); if (id == R.id.action_debug) { startActivity(context); return true; } return false; }
java
public boolean isDebugHandled(Context context, MenuItem item) { int id = item.getItemId(); if (id == R.id.action_debug) { startActivity(context); return true; } return false; }
[ "public", "boolean", "isDebugHandled", "(", "Context", "context", ",", "MenuItem", "item", ")", "{", "int", "id", "=", "item", ".", "getItemId", "(", ")", ";", "if", "(", "id", "==", "R", ".", "id", ".", "action_debug", ")", "{", "startActivity", "(", ...
Checks if debug menu item clicked or not. @param context : context to start activity if debug item handled. @param item : Menu item whose click is to be checked. @return : <code>true</code> if debug menu item is clicked, it will automatically Start the SharedPrefsBrowser activity. If debug menu item is not clicked, y...
[ "Checks", "if", "debug", "menu", "item", "clicked", "or", "not", "." ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L182-L189
46,998
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.isValueExistForKey
public boolean isValueExistForKey(String key) { boolean isValueExists; try { String string = getString(key, ""); isValueExists = !string.equalsIgnoreCase(""); } catch (ClassCastException e) { try { int anInt = getInt(key, 0); isValueExists = anInt != 0; } catch (ClassCastException e1) { tr...
java
public boolean isValueExistForKey(String key) { boolean isValueExists; try { String string = getString(key, ""); isValueExists = !string.equalsIgnoreCase(""); } catch (ClassCastException e) { try { int anInt = getInt(key, 0); isValueExists = anInt != 0; } catch (ClassCastException e1) { tr...
[ "public", "boolean", "isValueExistForKey", "(", "String", "key", ")", "{", "boolean", "isValueExists", ";", "try", "{", "String", "string", "=", "getString", "(", "key", ",", "\"\"", ")", ";", "isValueExists", "=", "!", "string", ".", "equalsIgnoreCase", "("...
Check if value exists for key. @param key : Key for which we need to check the value exists or not. @return : <code>true</code> if the value exists and it's other than default data.
[ "Check", "if", "value", "exists", "for", "key", "." ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L209-L243
46,999
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.getString
public String getString(String key, String defaultValue) throws ClassCastException { return sharedPreferences.getString(key, (defaultValue == null) ? "" : defaultValue); }
java
public String getString(String key, String defaultValue) throws ClassCastException { return sharedPreferences.getString(key, (defaultValue == null) ? "" : defaultValue); }
[ "public", "String", "getString", "(", "String", "key", ",", "String", "defaultValue", ")", "throws", "ClassCastException", "{", "return", "sharedPreferences", ".", "getString", "(", "key", ",", "(", "defaultValue", "==", "null", ")", "?", "\"\"", ":", "default...
Retrieve a String value from the preferences. @param key The name of the preference to retrieve. @param defaultValue value to return when a key does not exists. @return the preference value if it exists, or defValue. Throws ClassCastException if there is a preference with this name that is not a String. @Throws Clas...
[ "Retrieve", "a", "String", "value", "from", "the", "preferences", "." ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L258-L261