repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/transform/Transformation.java | Transformation.transformTo | public void transformTo(Result r) {
if (source == null) {
throw new IllegalStateException("source must not be null");
}
if (r == null) {
throw new IllegalArgumentException("result must not be null");
}
try {
TransformerFactory fac = factory;
... | java | public void transformTo(Result r) {
if (source == null) {
throw new IllegalStateException("source must not be null");
}
if (r == null) {
throw new IllegalArgumentException("result must not be null");
}
try {
TransformerFactory fac = factory;
... | [
"public",
"void",
"transformTo",
"(",
"Result",
"r",
")",
"{",
"if",
"(",
"source",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"source must not be null\"",
")",
";",
"}",
"if",
"(",
"r",
"==",
"null",
")",
"{",
"throw",
"new"... | Perform the transformation.
@param r where to send the transformation result - must not be null
@exception IllegalStateException if source is null
@exception IllegalArgumentException if result is null
@exception ConfigurationException if the TraX system isn't
configured properly
@exception XMLUnitException if the tran... | [
"Perform",
"the",
"transformation",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/transform/Transformation.java#L159-L193 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/transform/Transformation.java | Transformation.transformToString | public String transformToString() {
StringWriter sw = new StringWriter();
transformTo(new StreamResult(sw));
return sw.toString();
} | java | public String transformToString() {
StringWriter sw = new StringWriter();
transformTo(new StreamResult(sw));
return sw.toString();
} | [
"public",
"String",
"transformToString",
"(",
")",
"{",
"StringWriter",
"sw",
"=",
"new",
"StringWriter",
"(",
")",
";",
"transformTo",
"(",
"new",
"StreamResult",
"(",
"sw",
")",
")",
";",
"return",
"sw",
".",
"toString",
"(",
")",
";",
"}"
] | Convenience method that returns the result of the
transformation as a String.
@exception IllegalArgumentException if source is null
@exception ConfigurationException if the TraX system isn't
configured properly
@exception XMLUnitException if the transformation throws an
exception | [
"Convenience",
"method",
"that",
"returns",
"the",
"result",
"of",
"the",
"transformation",
"as",
"a",
"String",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/transform/Transformation.java#L204-L208 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/transform/Transformation.java | Transformation.transformToDocument | public Document transformToDocument() {
DOMResult r = new DOMResult();
transformTo(r);
return (Document) r.getNode();
} | java | public Document transformToDocument() {
DOMResult r = new DOMResult();
transformTo(r);
return (Document) r.getNode();
} | [
"public",
"Document",
"transformToDocument",
"(",
")",
"{",
"DOMResult",
"r",
"=",
"new",
"DOMResult",
"(",
")",
";",
"transformTo",
"(",
"r",
")",
";",
"return",
"(",
"Document",
")",
"r",
".",
"getNode",
"(",
")",
";",
"}"
] | Convenience method that returns the result of the
transformation as a Document.
@exception IllegalArgumentException if source is null
@exception ConfigurationException if the TraX system isn't
configured properly
@exception XMLUnitException if the transformation throws an
exception | [
"Convenience",
"method",
"that",
"returns",
"the",
"result",
"of",
"the",
"transformation",
"as",
"a",
"Document",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/transform/Transformation.java#L219-L223 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.compareNodes | ComparisonState compareNodes(final Node control, final XPathContext controlContext,
final Node test, final XPathContext testContext) {
final Iterable<Node> controlChildren =
Linqy.filter(new IterableNodeList(control.getChildNodes()),
getNodeF... | java | ComparisonState compareNodes(final Node control, final XPathContext controlContext,
final Node test, final XPathContext testContext) {
final Iterable<Node> controlChildren =
Linqy.filter(new IterableNodeList(control.getChildNodes()),
getNodeF... | [
"ComparisonState",
"compareNodes",
"(",
"final",
"Node",
"control",
",",
"final",
"XPathContext",
"controlContext",
",",
"final",
"Node",
"test",
",",
"final",
"XPathContext",
"testContext",
")",
"{",
"final",
"Iterable",
"<",
"Node",
">",
"controlChildren",
"=",
... | Recursively compares two XML nodes.
<p>Performs comparisons common to all node types, then performs
the node type specific comparisons and finally recurses into
the node's child lists.</p>
<p>Stops as soon as any comparison returns
ComparisonResult.CRITICAL.</p>
<p>package private to support tests.</p> | [
"Recursively",
"compares",
"two",
"XML",
"nodes",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L110-L153 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.nodeTypeSpecificComparison | private ComparisonState nodeTypeSpecificComparison(Node control,
XPathContext controlContext,
Node test,
XPathContext testContext) {
switch (contro... | java | private ComparisonState nodeTypeSpecificComparison(Node control,
XPathContext controlContext,
Node test,
XPathContext testContext) {
switch (contro... | [
"private",
"ComparisonState",
"nodeTypeSpecificComparison",
"(",
"Node",
"control",
",",
"XPathContext",
"controlContext",
",",
"Node",
"test",
",",
"XPathContext",
"testContext",
")",
"{",
"switch",
"(",
"control",
".",
"getNodeType",
"(",
")",
")",
"{",
"case",
... | Dispatches to the node type specific comparison if one is
defined for the given combination of nodes. | [
"Dispatches",
"to",
"the",
"node",
"type",
"specific",
"comparison",
"if",
"one",
"is",
"defined",
"for",
"the",
"given",
"combination",
"of",
"nodes",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L159-L210 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.compareCharacterData | private ComparisonState compareCharacterData(CharacterData control,
XPathContext controlContext,
CharacterData test,
XPathContext testContext) {
return compare(new C... | java | private ComparisonState compareCharacterData(CharacterData control,
XPathContext controlContext,
CharacterData test,
XPathContext testContext) {
return compare(new C... | [
"private",
"ComparisonState",
"compareCharacterData",
"(",
"CharacterData",
"control",
",",
"XPathContext",
"controlContext",
",",
"CharacterData",
"test",
",",
"XPathContext",
"testContext",
")",
"{",
"return",
"compare",
"(",
"new",
"Comparison",
"(",
"ComparisonType"... | Compares textual content. | [
"Compares",
"textual",
"content",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L232-L241 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.compareDocuments | private ComparisonState compareDocuments(final Document control,
final XPathContext controlContext,
final Document test,
final XPathContext testContext) {
final DocumentType con... | java | private ComparisonState compareDocuments(final Document control,
final XPathContext controlContext,
final Document test,
final XPathContext testContext) {
final DocumentType con... | [
"private",
"ComparisonState",
"compareDocuments",
"(",
"final",
"Document",
"control",
",",
"final",
"XPathContext",
"controlContext",
",",
"final",
"Document",
"test",
",",
"final",
"XPathContext",
"testContext",
")",
"{",
"final",
"DocumentType",
"controlDt",
"=",
... | Compares document node, doctype and XML declaration properties | [
"Compares",
"document",
"node",
"doctype",
"and",
"XML",
"declaration",
"properties"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L246-L268 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.compareDocTypes | private ComparisonState
compareDocTypes(DocumentType control,
XPathContext controlContext,
DocumentType test,
XPathContext testContext) {
return compare(new Comparison(ComparisonType.DOCTYPE_NAME,
... | java | private ComparisonState
compareDocTypes(DocumentType control,
XPathContext controlContext,
DocumentType test,
XPathContext testContext) {
return compare(new Comparison(ComparisonType.DOCTYPE_NAME,
... | [
"private",
"ComparisonState",
"compareDocTypes",
"(",
"DocumentType",
"control",
",",
"XPathContext",
"controlContext",
",",
"DocumentType",
"test",
",",
"XPathContext",
"testContext",
")",
"{",
"return",
"compare",
"(",
"new",
"Comparison",
"(",
"ComparisonType",
"."... | Compares properties of the doctype declaration. | [
"Compares",
"properties",
"of",
"the",
"doctype",
"declaration",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L277-L295 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.compareDeclarations | private DeferredComparison compareDeclarations(final Document control,
final XPathContext controlContext,
final Document test,
final XPathContext testContext) {
... | java | private DeferredComparison compareDeclarations(final Document control,
final XPathContext controlContext,
final Document test,
final XPathContext testContext) {
... | [
"private",
"DeferredComparison",
"compareDeclarations",
"(",
"final",
"Document",
"control",
",",
"final",
"XPathContext",
"controlContext",
",",
"final",
"Document",
"test",
",",
"final",
"XPathContext",
"testContext",
")",
"{",
"return",
"new",
"DeferredComparison",
... | Compares properties of XML declaration. | [
"Compares",
"properties",
"of",
"XML",
"declaration",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L300-L325 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.compareElements | private ComparisonState compareElements(final Element control,
final XPathContext controlContext,
final Element test,
final XPathContext testContext) {
return
compare(n... | java | private ComparisonState compareElements(final Element control,
final XPathContext controlContext,
final Element test,
final XPathContext testContext) {
return
compare(n... | [
"private",
"ComparisonState",
"compareElements",
"(",
"final",
"Element",
"control",
",",
"final",
"XPathContext",
"controlContext",
",",
"final",
"Element",
"test",
",",
"final",
"XPathContext",
"testContext",
")",
"{",
"return",
"compare",
"(",
"new",
"Comparison"... | Compares elements node properties, in particular the element's
name and its attributes. | [
"Compares",
"elements",
"node",
"properties",
"in",
"particular",
"the",
"element",
"s",
"name",
"and",
"its",
"attributes",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L331-L348 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.compareElementAttributes | private ComparisonState compareElementAttributes(final Element control,
final XPathContext controlContext,
final Element test,
final XPathContext testContext) {
... | java | private ComparisonState compareElementAttributes(final Element control,
final XPathContext controlContext,
final Element test,
final XPathContext testContext) {
... | [
"private",
"ComparisonState",
"compareElementAttributes",
"(",
"final",
"Element",
"control",
",",
"final",
"XPathContext",
"controlContext",
",",
"final",
"Element",
"test",
",",
"final",
"XPathContext",
"testContext",
")",
"{",
"final",
"Attributes",
"controlAttribute... | Compares element's attributes. | [
"Compares",
"element",
"s",
"attributes",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L353-L397 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.compareProcessingInstructions | private ComparisonState compareProcessingInstructions(ProcessingInstruction control,
XPathContext controlContext,
ProcessingInstruction test,
XPat... | java | private ComparisonState compareProcessingInstructions(ProcessingInstruction control,
XPathContext controlContext,
ProcessingInstruction test,
XPat... | [
"private",
"ComparisonState",
"compareProcessingInstructions",
"(",
"ProcessingInstruction",
"control",
",",
"XPathContext",
"controlContext",
",",
"ProcessingInstruction",
"test",
",",
"XPathContext",
"testContext",
")",
"{",
"return",
"compare",
"(",
"new",
"Comparison",
... | Compares properties of a processing instruction. | [
"Compares",
"properties",
"of",
"a",
"processing",
"instruction",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L515-L529 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.compareNodeLists | private ComparisonState compareNodeLists(Iterable<Node> controlSeq,
final XPathContext controlContext,
Iterable<Node> testSeq,
final XPathContext testContext) {
ComparisonState ... | java | private ComparisonState compareNodeLists(Iterable<Node> controlSeq,
final XPathContext controlContext,
Iterable<Node> testSeq,
final XPathContext testContext) {
ComparisonState ... | [
"private",
"ComparisonState",
"compareNodeLists",
"(",
"Iterable",
"<",
"Node",
">",
"controlSeq",
",",
"final",
"XPathContext",
"controlContext",
",",
"Iterable",
"<",
"Node",
">",
"testSeq",
",",
"final",
"XPathContext",
"testContext",
")",
"{",
"ComparisonState",... | Matches nodes of two node lists and invokes compareNode on each pair.
<p>Also performs CHILD_LOOKUP comparisons for each node that
couldn't be matched to one of the "other" list.</p> | [
"Matches",
"nodes",
"of",
"two",
"node",
"lists",
"and",
"invokes",
"compareNode",
"on",
"each",
"pair",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L537-L580 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.compareAttributes | private ComparisonState compareAttributes(Attr control,
XPathContext controlContext,
Attr test,
XPathContext testContext) {
return compareAttributeExplicitness(control, contr... | java | private ComparisonState compareAttributes(Attr control,
XPathContext controlContext,
Attr test,
XPathContext testContext) {
return compareAttributeExplicitness(control, contr... | [
"private",
"ComparisonState",
"compareAttributes",
"(",
"Attr",
"control",
",",
"XPathContext",
"controlContext",
",",
"Attr",
"test",
",",
"XPathContext",
"testContext",
")",
"{",
"return",
"compareAttributeExplicitness",
"(",
"control",
",",
"controlContext",
",",
"... | Compares properties of an attribute. | [
"Compares",
"properties",
"of",
"an",
"attribute",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L712-L723 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.compareAttributeExplicitness | private DeferredComparison compareAttributeExplicitness(final Attr control,
final XPathContext controlContext,
final Attr test,
final XPathC... | java | private DeferredComparison compareAttributeExplicitness(final Attr control,
final XPathContext controlContext,
final Attr test,
final XPathC... | [
"private",
"DeferredComparison",
"compareAttributeExplicitness",
"(",
"final",
"Attr",
"control",
",",
"final",
"XPathContext",
"controlContext",
",",
"final",
"Attr",
"test",
",",
"final",
"XPathContext",
"testContext",
")",
"{",
"return",
"new",
"DeferredComparison",
... | Compares whether two attributes are specified explicitly. | [
"Compares",
"whether",
"two",
"attributes",
"are",
"specified",
"explicitly",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L728-L742 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.splitAttributes | private Attributes splitAttributes(final NamedNodeMap map) {
Attr sLoc = (Attr) map.getNamedItemNS(XMLConstants
.W3C_XML_SCHEMA_INSTANCE_NS_URI,
"schemaLocation");
Attr nNsLoc = (Attr) map.getNamedItemNS(XMLConst... | java | private Attributes splitAttributes(final NamedNodeMap map) {
Attr sLoc = (Attr) map.getNamedItemNS(XMLConstants
.W3C_XML_SCHEMA_INSTANCE_NS_URI,
"schemaLocation");
Attr nNsLoc = (Attr) map.getNamedItemNS(XMLConst... | [
"private",
"Attributes",
"splitAttributes",
"(",
"final",
"NamedNodeMap",
"map",
")",
"{",
"Attr",
"sLoc",
"=",
"(",
"Attr",
")",
"map",
".",
"getNamedItemNS",
"(",
"XMLConstants",
".",
"W3C_XML_SCHEMA_INSTANCE_NS_URI",
",",
"\"schemaLocation\"",
")",
";",
"Attr",... | Separates XML namespace related attributes from "normal" attributes.xb | [
"Separates",
"XML",
"namespace",
"related",
"attributes",
"from",
"normal",
"attributes",
".",
"xb"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L747-L768 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java | DOMDifferenceEngine.findMatchingAttr | private static Attr findMatchingAttr(final List<Attr> attrs,
final Attr attrToMatch) {
final boolean hasNs = attrToMatch.getNamespaceURI() != null;
final String nsToMatch = attrToMatch.getNamespaceURI();
final String nameToMatch = hasNs ? attrToMatch.getL... | java | private static Attr findMatchingAttr(final List<Attr> attrs,
final Attr attrToMatch) {
final boolean hasNs = attrToMatch.getNamespaceURI() != null;
final String nsToMatch = attrToMatch.getNamespaceURI();
final String nameToMatch = hasNs ? attrToMatch.getL... | [
"private",
"static",
"Attr",
"findMatchingAttr",
"(",
"final",
"List",
"<",
"Attr",
">",
"attrs",
",",
"final",
"Attr",
"attrToMatch",
")",
"{",
"final",
"boolean",
"hasNs",
"=",
"attrToMatch",
".",
"getNamespaceURI",
"(",
")",
"!=",
"null",
";",
"final",
... | Find the attribute with the same namespace and local name as a
given attribute in a list of attributes. | [
"Find",
"the",
"attribute",
"with",
"the",
"same",
"namespace",
"and",
"local",
"name",
"as",
"a",
"given",
"attribute",
"in",
"a",
"list",
"of",
"attributes",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L810-L829 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/builder/DiffBuilder.java | DiffBuilder.withComparisonListeners | @Override
public DiffBuilder withComparisonListeners(final ComparisonListener... comparisonListeners) {
this.comparisonListeners.addAll(Arrays.asList(comparisonListeners));
return this;
} | java | @Override
public DiffBuilder withComparisonListeners(final ComparisonListener... comparisonListeners) {
this.comparisonListeners.addAll(Arrays.asList(comparisonListeners));
return this;
} | [
"@",
"Override",
"public",
"DiffBuilder",
"withComparisonListeners",
"(",
"final",
"ComparisonListener",
"...",
"comparisonListeners",
")",
"{",
"this",
".",
"comparisonListeners",
".",
"addAll",
"(",
"Arrays",
".",
"asList",
"(",
"comparisonListeners",
")",
")",
";... | Registers listeners that are notified of each comparison.
@see org.xmlunit.diff.DifferenceEngine#addComparisonListener(ComparisonListener) | [
"Registers",
"listeners",
"that",
"are",
"notified",
"of",
"each",
"comparison",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/builder/DiffBuilder.java#L265-L269 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DetailedDiff.java | DetailedDiff.differenceFound | public int differenceFound(Difference difference) {
final int returnValue = super.differenceFound(difference);
switch (returnValue) {
case RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL:
return returnValue;
case RETURN_ACCEPT_DIFFERENCE:
break;
case RETURN_IGNOR... | java | public int differenceFound(Difference difference) {
final int returnValue = super.differenceFound(difference);
switch (returnValue) {
case RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL:
return returnValue;
case RETURN_ACCEPT_DIFFERENCE:
break;
case RETURN_IGNOR... | [
"public",
"int",
"differenceFound",
"(",
"Difference",
"difference",
")",
"{",
"final",
"int",
"returnValue",
"=",
"super",
".",
"differenceFound",
"(",
"difference",
")",
";",
"switch",
"(",
"returnValue",
")",
"{",
"case",
"RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL... | DifferenceListener implementation.
Add the difference to the list of all differences
@param difference
@return the value supplied by the superclass implementation | [
"DifferenceListener",
"implementation",
".",
"Add",
"the",
"difference",
"to",
"the",
"list",
"of",
"all",
"differences"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DetailedDiff.java#L69-L90 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/ElementNameAndAttributeQualifier.java | ElementNameAndAttributeQualifier.areAttributesComparable | @Deprecated
protected final boolean areAttributesComparable(Element control, Element test) {
String controlValue, testValue;
Attr[] qualifyingAttributes;
NamedNodeMap namedNodeMap = control.getAttributes();
if (matchesAllAttributes(qualifyingAttrNames)) {
qualifyingAttrib... | java | @Deprecated
protected final boolean areAttributesComparable(Element control, Element test) {
String controlValue, testValue;
Attr[] qualifyingAttributes;
NamedNodeMap namedNodeMap = control.getAttributes();
if (matchesAllAttributes(qualifyingAttrNames)) {
qualifyingAttrib... | [
"@",
"Deprecated",
"protected",
"final",
"boolean",
"areAttributesComparable",
"(",
"Element",
"control",
",",
"Element",
"test",
")",
"{",
"String",
"controlValue",
",",
"testValue",
";",
"Attr",
"[",
"]",
"qualifyingAttributes",
";",
"NamedNodeMap",
"namedNodeMap"... | Determine whether the qualifying attributes are present in both elements
and if so whether their values are the same
@param control
@param test
@return true if all qualifying attributes are present with the same
values, false otherwise
@deprecated this method is no longer used by this class and is
only kept for backwar... | [
"Determine",
"whether",
"the",
"qualifying",
"attributes",
"are",
"present",
"in",
"both",
"elements",
"and",
"if",
"so",
"whether",
"their",
"values",
"are",
"the",
"same"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/ElementNameAndAttributeQualifier.java#L113-L157 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/util/Convert.java | Convert.toInputSource | public static InputSource toInputSource(Source s, TransformerFactory fac) {
try {
InputSource is = SAXSource.sourceToInputSource(s);
if (is == null) {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult r = new StreamResult(bos);
... | java | public static InputSource toInputSource(Source s, TransformerFactory fac) {
try {
InputSource is = SAXSource.sourceToInputSource(s);
if (is == null) {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult r = new StreamResult(bos);
... | [
"public",
"static",
"InputSource",
"toInputSource",
"(",
"Source",
"s",
",",
"TransformerFactory",
"fac",
")",
"{",
"try",
"{",
"InputSource",
"is",
"=",
"SAXSource",
".",
"sourceToInputSource",
"(",
"s",
")",
";",
"if",
"(",
"is",
"==",
"null",
")",
"{",
... | Creates a SAX InputSource from a TraX Source.
<p>May use an XSLT identity transformation if SAXSource cannot
convert it directly.</p>
@param s the source to convert
@param fac the TransformerFactory to use, will use the defaul
factory if the value is null. | [
"Creates",
"a",
"SAX",
"InputSource",
"from",
"a",
"TraX",
"Source",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/util/Convert.java#L68-L89 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/util/Convert.java | Convert.toNamespaceContext | public static NamespaceContext
toNamespaceContext(Map<String, String> prefix2URI) {
final Map<String, String> copy =
new LinkedHashMap<String, String>(prefix2URI);
return new NamespaceContext() {
public String getNamespaceURI(String prefix) {
if (prefix ==... | java | public static NamespaceContext
toNamespaceContext(Map<String, String> prefix2URI) {
final Map<String, String> copy =
new LinkedHashMap<String, String>(prefix2URI);
return new NamespaceContext() {
public String getNamespaceURI(String prefix) {
if (prefix ==... | [
"public",
"static",
"NamespaceContext",
"toNamespaceContext",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"prefix2URI",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"copy",
"=",
"new",
"LinkedHashMap",
"<",
"String",
",",
"String",
">",
... | Creates a JAXP NamespaceContext from a Map prefix => Namespace URI. | [
"Creates",
"a",
"JAXP",
"NamespaceContext",
"from",
"a",
"Map",
"prefix",
"=",
">",
";",
"Namespace",
"URI",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/util/Convert.java#L194-L242 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.compareDocument | protected void compareDocument(Document control, Document test,
DifferenceListener listener, ElementQualifier elementQualifier)
throws DifferenceFoundException {
DocumentType controlDoctype = control.getDoctype();
DocumentType testDoctype = test.getDoctype();... | java | protected void compareDocument(Document control, Document test,
DifferenceListener listener, ElementQualifier elementQualifier)
throws DifferenceFoundException {
DocumentType controlDoctype = control.getDoctype();
DocumentType testDoctype = test.getDoctype();... | [
"protected",
"void",
"compareDocument",
"(",
"Document",
"control",
",",
"Document",
"test",
",",
"DifferenceListener",
"listener",
",",
"ElementQualifier",
"elementQualifier",
")",
"throws",
"DifferenceFoundException",
"{",
"DocumentType",
"controlDoctype",
"=",
"control... | Compare two Documents for doctype and then element differences
@param control
@param test
@param listener
@param elementQualifier
@throws DifferenceFoundException | [
"Compare",
"two",
"Documents",
"for",
"doctype",
"and",
"then",
"element",
"differences"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L218-L230 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.hasChildNodes | private Boolean hasChildNodes(Node n) {
boolean flag = n.hasChildNodes();
if (flag && XMLUnit.getIgnoreComments()) {
List nl = nodeList2List(n.getChildNodes());
flag = !nl.isEmpty();
}
return flag ? Boolean.TRUE : Boolean.FALSE;
} | java | private Boolean hasChildNodes(Node n) {
boolean flag = n.hasChildNodes();
if (flag && XMLUnit.getIgnoreComments()) {
List nl = nodeList2List(n.getChildNodes());
flag = !nl.isEmpty();
}
return flag ? Boolean.TRUE : Boolean.FALSE;
} | [
"private",
"Boolean",
"hasChildNodes",
"(",
"Node",
"n",
")",
"{",
"boolean",
"flag",
"=",
"n",
".",
"hasChildNodes",
"(",
")",
";",
"if",
"(",
"flag",
"&&",
"XMLUnit",
".",
"getIgnoreComments",
"(",
")",
")",
"{",
"List",
"nl",
"=",
"nodeList2List",
"... | Tests whether a Node has children, taking ignoreComments
setting into account. | [
"Tests",
"whether",
"a",
"Node",
"has",
"children",
"taking",
"ignoreComments",
"setting",
"into",
"account",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L292-L299 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.nodeList2List | static List<Node> nodeList2List(NodeList nl) {
int len = nl.getLength();
List<Node> l = new ArrayList<Node>(len);
for (int i = 0; i < len; i++) {
Node n = nl.item(i);
if (!XMLUnit.getIgnoreComments() || !(n instanceof Comment)) {
l.add(n);
}
... | java | static List<Node> nodeList2List(NodeList nl) {
int len = nl.getLength();
List<Node> l = new ArrayList<Node>(len);
for (int i = 0; i < len; i++) {
Node n = nl.item(i);
if (!XMLUnit.getIgnoreComments() || !(n instanceof Comment)) {
l.add(n);
}
... | [
"static",
"List",
"<",
"Node",
">",
"nodeList2List",
"(",
"NodeList",
"nl",
")",
"{",
"int",
"len",
"=",
"nl",
".",
"getLength",
"(",
")",
";",
"List",
"<",
"Node",
">",
"l",
"=",
"new",
"ArrayList",
"<",
"Node",
">",
"(",
"len",
")",
";",
"for",... | Returns the NodeList's Nodes as List, taking ignoreComments
into account. | [
"Returns",
"the",
"NodeList",
"s",
"Nodes",
"as",
"List",
"taking",
"ignoreComments",
"into",
"account",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L305-L315 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.compareElement | protected void compareElement(Element control, Element test,
DifferenceListener listener) throws DifferenceFoundException {
compare(getUnNamespacedNodeName(control), getUnNamespacedNodeName(test),
control, test, listener, ELEMENT_TAG_NAME);
NamedNodeMa... | java | protected void compareElement(Element control, Element test,
DifferenceListener listener) throws DifferenceFoundException {
compare(getUnNamespacedNodeName(control), getUnNamespacedNodeName(test),
control, test, listener, ELEMENT_TAG_NAME);
NamedNodeMa... | [
"protected",
"void",
"compareElement",
"(",
"Element",
"control",
",",
"Element",
"test",
",",
"DifferenceListener",
"listener",
")",
"throws",
"DifferenceFoundException",
"{",
"compare",
"(",
"getUnNamespacedNodeName",
"(",
"control",
")",
",",
"getUnNamespacedNodeName... | Compare 2 elements and their attributes
@param control
@param test
@param listener
@throws DifferenceFoundException | [
"Compare",
"2",
"elements",
"and",
"their",
"attributes"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L522-L537 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.compareCDataSection | protected void compareCDataSection(CDATASection control, CDATASection test,
DifferenceListener listener) throws DifferenceFoundException {
compareText(control, test, listener);
} | java | protected void compareCDataSection(CDATASection control, CDATASection test,
DifferenceListener listener) throws DifferenceFoundException {
compareText(control, test, listener);
} | [
"protected",
"void",
"compareCDataSection",
"(",
"CDATASection",
"control",
",",
"CDATASection",
"test",
",",
"DifferenceListener",
"listener",
")",
"throws",
"DifferenceFoundException",
"{",
"compareText",
"(",
"control",
",",
"test",
",",
"listener",
")",
";",
"}"... | Compare two CDATA sections - unused, kept for backwards compatibility
@param control
@param test
@param listener
@throws DifferenceFoundException | [
"Compare",
"two",
"CDATA",
"sections",
"-",
"unused",
"kept",
"for",
"backwards",
"compatibility"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L740-L743 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.compareComment | protected void compareComment(Comment control, Comment test,
DifferenceListener listener) throws DifferenceFoundException {
if (!XMLUnit.getIgnoreComments()) {
compareCharacterData(control, test, listener, COMMENT_VALUE);
}
} | java | protected void compareComment(Comment control, Comment test,
DifferenceListener listener) throws DifferenceFoundException {
if (!XMLUnit.getIgnoreComments()) {
compareCharacterData(control, test, listener, COMMENT_VALUE);
}
} | [
"protected",
"void",
"compareComment",
"(",
"Comment",
"control",
",",
"Comment",
"test",
",",
"DifferenceListener",
"listener",
")",
"throws",
"DifferenceFoundException",
"{",
"if",
"(",
"!",
"XMLUnit",
".",
"getIgnoreComments",
"(",
")",
")",
"{",
"compareCharac... | Compare two comments
@param control
@param test
@param listener
@throws DifferenceFoundException | [
"Compare",
"two",
"comments"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L752-L757 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.compareDocumentType | protected void compareDocumentType(DocumentType control, DocumentType test,
DifferenceListener listener) throws DifferenceFoundException {
compare(control.getName(), test.getName(), control, test, listener,
DOCTYPE_NAME);
compare(control.getPublicId... | java | protected void compareDocumentType(DocumentType control, DocumentType test,
DifferenceListener listener) throws DifferenceFoundException {
compare(control.getName(), test.getName(), control, test, listener,
DOCTYPE_NAME);
compare(control.getPublicId... | [
"protected",
"void",
"compareDocumentType",
"(",
"DocumentType",
"control",
",",
"DocumentType",
"test",
",",
"DifferenceListener",
"listener",
")",
"throws",
"DifferenceFoundException",
"{",
"compare",
"(",
"control",
".",
"getName",
"(",
")",
",",
"test",
".",
"... | Compare two DocumentType nodes
@param control
@param test
@param listener
@throws DifferenceFoundException | [
"Compare",
"two",
"DocumentType",
"nodes"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L766-L775 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.compareProcessingInstruction | protected void compareProcessingInstruction(ProcessingInstruction control,
ProcessingInstruction test, DifferenceListener listener)
throws DifferenceFoundException {
compare(control.getTarget(), test.getTarget(), control, test, listener,
PR... | java | protected void compareProcessingInstruction(ProcessingInstruction control,
ProcessingInstruction test, DifferenceListener listener)
throws DifferenceFoundException {
compare(control.getTarget(), test.getTarget(), control, test, listener,
PR... | [
"protected",
"void",
"compareProcessingInstruction",
"(",
"ProcessingInstruction",
"control",
",",
"ProcessingInstruction",
"test",
",",
"DifferenceListener",
"listener",
")",
"throws",
"DifferenceFoundException",
"{",
"compare",
"(",
"control",
".",
"getTarget",
"(",
")"... | Compare two processing instructions
@param control
@param test
@param listener
@throws DifferenceFoundException | [
"Compare",
"two",
"processing",
"instructions"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L784-L791 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.compareText | protected void compareText(Text control, Text test,
DifferenceListener listener)
throws DifferenceFoundException {
compareText((CharacterData) control, (CharacterData) test, listener);
} | java | protected void compareText(Text control, Text test,
DifferenceListener listener)
throws DifferenceFoundException {
compareText((CharacterData) control, (CharacterData) test, listener);
} | [
"protected",
"void",
"compareText",
"(",
"Text",
"control",
",",
"Text",
"test",
",",
"DifferenceListener",
"listener",
")",
"throws",
"DifferenceFoundException",
"{",
"compareText",
"(",
"(",
"CharacterData",
")",
"control",
",",
"(",
"CharacterData",
")",
"test"... | Compare text - unused, kept for backwards compatibility
@param control
@param test
@param listener
@throws DifferenceFoundException | [
"Compare",
"text",
"-",
"unused",
"kept",
"for",
"backwards",
"compatibility"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L800-L804 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.compareCharacterData | private void compareCharacterData(CharacterData control, CharacterData test,
DifferenceListener listener, Difference difference)
throws DifferenceFoundException {
compare(control.getData(), test.getData(), control, test, listener,
difference);
} | java | private void compareCharacterData(CharacterData control, CharacterData test,
DifferenceListener listener, Difference difference)
throws DifferenceFoundException {
compare(control.getData(), test.getData(), control, test, listener,
difference);
} | [
"private",
"void",
"compareCharacterData",
"(",
"CharacterData",
"control",
",",
"CharacterData",
"test",
",",
"DifferenceListener",
"listener",
",",
"Difference",
"difference",
")",
"throws",
"DifferenceFoundException",
"{",
"compare",
"(",
"control",
".",
"getData",
... | Character comparison method used by comments, text and CDATA sections
@param control
@param test
@param listener
@param difference
@throws DifferenceFoundException | [
"Character",
"comparison",
"method",
"used",
"by",
"comments",
"text",
"and",
"CDATA",
"sections"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L828-L833 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.unequal | private boolean unequal(Object expected, Object actual) {
return expected==null ? actual!=null : unequalNotNull(expected, actual);
} | java | private boolean unequal(Object expected, Object actual) {
return expected==null ? actual!=null : unequalNotNull(expected, actual);
} | [
"private",
"boolean",
"unequal",
"(",
"Object",
"expected",
",",
"Object",
"actual",
")",
"{",
"return",
"expected",
"==",
"null",
"?",
"actual",
"!=",
"null",
":",
"unequalNotNull",
"(",
"expected",
",",
"actual",
")",
";",
"}"
] | Test two possibly null values for inequality
@param expected
@param actual
@return TRUE if the values are neither both null, nor equals() equal | [
"Test",
"two",
"possibly",
"null",
"values",
"for",
"inequality"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L897-L899 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.unequalNotNull | private boolean unequalNotNull(Object expected, Object actual) {
if ((XMLUnit.getIgnoreWhitespace() || XMLUnit.getNormalizeWhitespace())
&& expected instanceof String && actual instanceof String) {
String expectedString = ((String) expected).trim();
String actualString = ((St... | java | private boolean unequalNotNull(Object expected, Object actual) {
if ((XMLUnit.getIgnoreWhitespace() || XMLUnit.getNormalizeWhitespace())
&& expected instanceof String && actual instanceof String) {
String expectedString = ((String) expected).trim();
String actualString = ((St... | [
"private",
"boolean",
"unequalNotNull",
"(",
"Object",
"expected",
",",
"Object",
"actual",
")",
"{",
"if",
"(",
"(",
"XMLUnit",
".",
"getIgnoreWhitespace",
"(",
")",
"||",
"XMLUnit",
".",
"getNormalizeWhitespace",
"(",
")",
")",
"&&",
"expected",
"instanceof"... | Test two non-null values for inequality
@param expected
@param actual
@return TRUE if the values are not equals() equal (taking whitespace
into account if necessary) | [
"Test",
"two",
"non",
"-",
"null",
"values",
"for",
"inequality"
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L908-L920 | train |
xmlunit/xmlunit | xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java | DifferenceEngine.normalizeWhitespace | final static String normalizeWhitespace(String orig) {
StringBuilder sb = new StringBuilder();
boolean lastCharWasWhitespace = false;
boolean changed = false;
char[] characters = orig.toCharArray();
for (int i = 0; i < characters.length; i++) {
if (Character.isWhitesp... | java | final static String normalizeWhitespace(String orig) {
StringBuilder sb = new StringBuilder();
boolean lastCharWasWhitespace = false;
boolean changed = false;
char[] characters = orig.toCharArray();
for (int i = 0; i < characters.length; i++) {
if (Character.isWhitesp... | [
"final",
"static",
"String",
"normalizeWhitespace",
"(",
"String",
"orig",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"boolean",
"lastCharWasWhitespace",
"=",
"false",
";",
"boolean",
"changed",
"=",
"false",
";",
"char",
"[",... | Replace all whitespace characters with SPACE and collapse
consecutive whitespace chars to a single SPACE. | [
"Replace",
"all",
"whitespace",
"characters",
"with",
"SPACE",
"and",
"collapse",
"consecutive",
"whitespace",
"chars",
"to",
"a",
"single",
"SPACE",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L926-L947 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/ElementSelectors.java | ElementSelectors.not | public static ElementSelector not(final ElementSelector es) {
if (es == null) {
throw new IllegalArgumentException("es must not be null");
}
return new ElementSelector() {
@Override
public boolean canBeCompared(Element controlElement,
... | java | public static ElementSelector not(final ElementSelector es) {
if (es == null) {
throw new IllegalArgumentException("es must not be null");
}
return new ElementSelector() {
@Override
public boolean canBeCompared(Element controlElement,
... | [
"public",
"static",
"ElementSelector",
"not",
"(",
"final",
"ElementSelector",
"es",
")",
"{",
"if",
"(",
"es",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"es must not be null\"",
")",
";",
"}",
"return",
"new",
"ElementSelector",... | Negates another ElementSelector. | [
"Negates",
"another",
"ElementSelector",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/ElementSelectors.java#L225-L236 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/ElementSelectors.java | ElementSelectors.or | public static ElementSelector or(final ElementSelector... selectors) {
if (selectors == null) {
throw new IllegalArgumentException(SELECTORS_MUST_NOT_BE_NULL);
}
final Collection<ElementSelector> s = Arrays.asList(selectors);
if (any(s, new IsNullPredicate())) {
t... | java | public static ElementSelector or(final ElementSelector... selectors) {
if (selectors == null) {
throw new IllegalArgumentException(SELECTORS_MUST_NOT_BE_NULL);
}
final Collection<ElementSelector> s = Arrays.asList(selectors);
if (any(s, new IsNullPredicate())) {
t... | [
"public",
"static",
"ElementSelector",
"or",
"(",
"final",
"ElementSelector",
"...",
"selectors",
")",
"{",
"if",
"(",
"selectors",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"SELECTORS_MUST_NOT_BE_NULL",
")",
";",
"}",
"final",
"Co... | Accepts two elements if at least one of the given ElementSelectors does.
<p>There is an important difference between using {@link
ElementSelectors#or} to combine multiple {@link
ElementSelector}s and using {@link DefaultNodeMatcher}'s
constructor with multiple {@link ElementSelector}s:</p>
<p>Consider {@link ElementS... | [
"Accepts",
"two",
"elements",
"if",
"at",
"least",
"one",
"of",
"the",
"given",
"ElementSelectors",
"does",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/ElementSelectors.java#L264-L279 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/ElementSelectors.java | ElementSelectors.xor | public static ElementSelector xor(final ElementSelector es1,
final ElementSelector es2) {
if (es1 == null || es2 == null) {
throw new IllegalArgumentException(SELECTORS_MUST_NOT_BE_NULL);
}
return new ElementSelector() {
@Override
... | java | public static ElementSelector xor(final ElementSelector es1,
final ElementSelector es2) {
if (es1 == null || es2 == null) {
throw new IllegalArgumentException(SELECTORS_MUST_NOT_BE_NULL);
}
return new ElementSelector() {
@Override
... | [
"public",
"static",
"ElementSelector",
"xor",
"(",
"final",
"ElementSelector",
"es1",
",",
"final",
"ElementSelector",
"es2",
")",
"{",
"if",
"(",
"es1",
"==",
"null",
"||",
"es2",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"SEL... | Accepts two elements if exactly on of the given ElementSelectors does. | [
"Accepts",
"two",
"elements",
"if",
"exactly",
"on",
"of",
"the",
"given",
"ElementSelectors",
"does",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/ElementSelectors.java#L305-L318 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/diff/ElementSelectors.java | ElementSelectors.conditionalSelector | public static ElementSelector conditionalSelector(final Predicate<? super Element> predicate,
final ElementSelector es) {
if (predicate == null) {
throw new IllegalArgumentException("predicate must not be null");
}
if (es == null... | java | public static ElementSelector conditionalSelector(final Predicate<? super Element> predicate,
final ElementSelector es) {
if (predicate == null) {
throw new IllegalArgumentException("predicate must not be null");
}
if (es == null... | [
"public",
"static",
"ElementSelector",
"conditionalSelector",
"(",
"final",
"Predicate",
"<",
"?",
"super",
"Element",
">",
"predicate",
",",
"final",
"ElementSelector",
"es",
")",
"{",
"if",
"(",
"predicate",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalAr... | Applies the wrapped ElementSelector's logic if and only if the
control element matches the given predicate. | [
"Applies",
"the",
"wrapped",
"ElementSelector",
"s",
"logic",
"if",
"and",
"only",
"if",
"the",
"control",
"element",
"matches",
"the",
"given",
"predicate",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/ElementSelectors.java#L324-L341 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/validation/Validator.java | Validator.setSchemaSources | public void setSchemaSources(Source... s) {
if (s != null) {
sourceLocations = Arrays.copyOf(s, s.length);
} else {
sourceLocations = null;
}
} | java | public void setSchemaSources(Source... s) {
if (s != null) {
sourceLocations = Arrays.copyOf(s, s.length);
} else {
sourceLocations = null;
}
} | [
"public",
"void",
"setSchemaSources",
"(",
"Source",
"...",
"s",
")",
"{",
"if",
"(",
"s",
"!=",
"null",
")",
"{",
"sourceLocations",
"=",
"Arrays",
".",
"copyOf",
"(",
"s",
",",
"s",
".",
"length",
")",
";",
"}",
"else",
"{",
"sourceLocations",
"=",... | Where to find the schema. | [
"Where",
"to",
"find",
"the",
"schema",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/validation/Validator.java#L32-L38 | train |
xmlunit/xmlunit | xmlunit-core/src/main/java/org/xmlunit/validation/Validator.java | Validator.forLanguage | public static Validator forLanguage(String language) {
if (!Languages.XML_DTD_NS_URI.equals(language)) {
return new JAXPValidator(language);
}
return new ParsingValidator(Languages.XML_DTD_NS_URI);
} | java | public static Validator forLanguage(String language) {
if (!Languages.XML_DTD_NS_URI.equals(language)) {
return new JAXPValidator(language);
}
return new ParsingValidator(Languages.XML_DTD_NS_URI);
} | [
"public",
"static",
"Validator",
"forLanguage",
"(",
"String",
"language",
")",
"{",
"if",
"(",
"!",
"Languages",
".",
"XML_DTD_NS_URI",
".",
"equals",
"(",
"language",
")",
")",
"{",
"return",
"new",
"JAXPValidator",
"(",
"language",
")",
";",
"}",
"retur... | Factory that obtains a Validator instance based on the schema language.
@see Languages | [
"Factory",
"that",
"obtains",
"a",
"Validator",
"instance",
"based",
"on",
"the",
"schema",
"language",
"."
] | fe3d701d43f57ee83dcba336e4c1555619d3084b | https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/validation/Validator.java#L73-L78 | train |
saucelabs/sauce-java | common/src/main/java/com/saucelabs/common/SauceOnDemandAuthentication.java | SauceOnDemandAuthentication.saveTo | public void saveTo(File propertyFile) throws IOException {
Properties props = new Properties();
props.put("username", username);
props.put("key", accessKey);
FileOutputStream out = new FileOutputStream(propertyFile);
try {
props.store(out, "Sauce OnDemand access crede... | java | public void saveTo(File propertyFile) throws IOException {
Properties props = new Properties();
props.put("username", username);
props.put("key", accessKey);
FileOutputStream out = new FileOutputStream(propertyFile);
try {
props.store(out, "Sauce OnDemand access crede... | [
"public",
"void",
"saveTo",
"(",
"File",
"propertyFile",
")",
"throws",
"IOException",
"{",
"Properties",
"props",
"=",
"new",
"Properties",
"(",
")",
";",
"props",
".",
"put",
"(",
"\"username\"",
",",
"username",
")",
";",
"props",
".",
"put",
"(",
"\"... | Persists this credential to the disk.
@param propertyFile File object to save java propery style credentials to.
@throws IOException If the file I/O fails. | [
"Persists",
"this",
"credential",
"to",
"the",
"disk",
"."
] | 1df922f0e44bfb7aba6422711e4f2384ef77ebae | https://github.com/saucelabs/sauce-java/blob/1df922f0e44bfb7aba6422711e4f2384ef77ebae/common/src/main/java/com/saucelabs/common/SauceOnDemandAuthentication.java#L119-L129 | train |
gkopff/gson-jodatime-serialisers | src/main/java/com/fatboyindustrial/gsonjodatime/Converters.java | Converters.registerAll | public static GsonBuilder registerAll(GsonBuilder builder)
{
if (builder == null) { throw new NullPointerException("builder cannot be null"); }
registerDateMidnight(builder);
registerDateTime(builder);
registerDuration(builder);
registerLocalDate(builder);
registerLocalDateTime(builder);
... | java | public static GsonBuilder registerAll(GsonBuilder builder)
{
if (builder == null) { throw new NullPointerException("builder cannot be null"); }
registerDateMidnight(builder);
registerDateTime(builder);
registerDuration(builder);
registerLocalDate(builder);
registerLocalDateTime(builder);
... | [
"public",
"static",
"GsonBuilder",
"registerAll",
"(",
"GsonBuilder",
"builder",
")",
"{",
"if",
"(",
"builder",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"builder cannot be null\"",
")",
";",
"}",
"registerDateMidnight",
"(",
"builder... | Registers all the Joda Time converters.
@param builder The GSON builder to register the converters with.
@return A reference to {@code builder}. | [
"Registers",
"all",
"the",
"Joda",
"Time",
"converters",
"."
] | a48f05ded1cb262ad1c6e3f25fd2498765589dc2 | https://github.com/gkopff/gson-jodatime-serialisers/blob/a48f05ded1cb262ad1c6e3f25fd2498765589dc2/src/main/java/com/fatboyindustrial/gsonjodatime/Converters.java#L83-L99 | train |
ef-labs/vertx-guice | vertx-guice/src/main/java/com/englishtown/vertx/guice/GuiceVerticleLoader.java | GuiceVerticleLoader.stop | @Override
public void stop(Future<Void> stopFuture) throws Exception {
// Stop the real verticle
if (realVerticle != null) {
realVerticle.stop(stopFuture);
realVerticle = null;
}
} | java | @Override
public void stop(Future<Void> stopFuture) throws Exception {
// Stop the real verticle
if (realVerticle != null) {
realVerticle.stop(stopFuture);
realVerticle = null;
}
} | [
"@",
"Override",
"public",
"void",
"stop",
"(",
"Future",
"<",
"Void",
">",
"stopFuture",
")",
"throws",
"Exception",
"{",
"// Stop the real verticle",
"if",
"(",
"realVerticle",
"!=",
"null",
")",
"{",
"realVerticle",
".",
"stop",
"(",
"stopFuture",
")",
";... | Vert.x calls the stop method when the verticle is undeployed.
Put any cleanup code for your verticle in here
@throws Exception | [
"Vert",
".",
"x",
"calls",
"the",
"stop",
"method",
"when",
"the",
"verticle",
"is",
"undeployed",
".",
"Put",
"any",
"cleanup",
"code",
"for",
"your",
"verticle",
"in",
"here"
] | 3833b813625c6eb21efb7cc6c1ee418bbf45cdb1 | https://github.com/ef-labs/vertx-guice/blob/3833b813625c6eb21efb7cc6c1ee418bbf45cdb1/vertx-guice/src/main/java/com/englishtown/vertx/guice/GuiceVerticleLoader.java#L105-L112 | train |
ef-labs/vertx-guice | examples/vertx-guice-simple/src/main/java/com/englishtown/vertx/guice/examples/SimpleVerticle.java | SimpleVerticle.start | @Override
public void start() throws Exception {
if (dependency == null) {
throw new IllegalStateException("Dependency was not injected!");
}
vertx.eventBus().consumer(EB_ADDRESS, this);
super.start();
} | java | @Override
public void start() throws Exception {
if (dependency == null) {
throw new IllegalStateException("Dependency was not injected!");
}
vertx.eventBus().consumer(EB_ADDRESS, this);
super.start();
} | [
"@",
"Override",
"public",
"void",
"start",
"(",
")",
"throws",
"Exception",
"{",
"if",
"(",
"dependency",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Dependency was not injected!\"",
")",
";",
"}",
"vertx",
".",
"eventBus",
"(",
... | If your verticle does a simple, synchronous start-up then override this method and put your start-up
code in there.
@throws Exception | [
"If",
"your",
"verticle",
"does",
"a",
"simple",
"synchronous",
"start",
"-",
"up",
"then",
"override",
"this",
"method",
"and",
"put",
"your",
"start",
"-",
"up",
"code",
"in",
"there",
"."
] | 3833b813625c6eb21efb7cc6c1ee418bbf45cdb1 | https://github.com/ef-labs/vertx-guice/blob/3833b813625c6eb21efb7cc6c1ee418bbf45cdb1/examples/vertx-guice-simple/src/main/java/com/englishtown/vertx/guice/examples/SimpleVerticle.java#L34-L44 | train |
ef-labs/vertx-guice | examples/vertx-guice-simple/src/main/java/com/englishtown/vertx/guice/examples/SimpleVerticle.java | SimpleVerticle.handle | @Override
public void handle(Message<Void> msg) {
msg.reply(dependency.getClass().getName());
} | java | @Override
public void handle(Message<Void> msg) {
msg.reply(dependency.getClass().getName());
} | [
"@",
"Override",
"public",
"void",
"handle",
"(",
"Message",
"<",
"Void",
">",
"msg",
")",
"{",
"msg",
".",
"reply",
"(",
"dependency",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"}"
] | Something has happened, so handle it.
@param msg the event to handle | [
"Something",
"has",
"happened",
"so",
"handle",
"it",
"."
] | 3833b813625c6eb21efb7cc6c1ee418bbf45cdb1 | https://github.com/ef-labs/vertx-guice/blob/3833b813625c6eb21efb7cc6c1ee418bbf45cdb1/examples/vertx-guice-simple/src/main/java/com/englishtown/vertx/guice/examples/SimpleVerticle.java#L51-L54 | train |
arquillian/arquillian-extension-persistence | core/src/main/java/org/jboss/arquillian/persistence/core/configuration/PersistenceDescriptorExtractor.java | PersistenceDescriptorExtractor.getAsStream | public InputStream getAsStream(final Archive<?> archive) {
final Archive<?> testable = findTestableArchive(archive);
final Collection<Node> values = collectPersistenceXml(testable);
if (values.size() == 1) {
return values.iterator().next().getAsset().openStream();
}
... | java | public InputStream getAsStream(final Archive<?> archive) {
final Archive<?> testable = findTestableArchive(archive);
final Collection<Node> values = collectPersistenceXml(testable);
if (values.size() == 1) {
return values.iterator().next().getAsset().openStream();
}
... | [
"public",
"InputStream",
"getAsStream",
"(",
"final",
"Archive",
"<",
"?",
">",
"archive",
")",
"{",
"final",
"Archive",
"<",
"?",
">",
"testable",
"=",
"findTestableArchive",
"(",
"archive",
")",
";",
"final",
"Collection",
"<",
"Node",
">",
"values",
"="... | Returns open stream of persistence.xml found in the archive, but
only if single file have been found.
@return Input stream of persistence.xml found or null if zero or multiple found in the archive. | [
"Returns",
"open",
"stream",
"of",
"persistence",
".",
"xml",
"found",
"in",
"the",
"archive",
"but",
"only",
"if",
"single",
"file",
"have",
"been",
"found",
"."
] | 8b4e2f8f5e807488e0fe216061bd1859729b11e1 | https://github.com/arquillian/arquillian-extension-persistence/blob/8b4e2f8f5e807488e0fe216061bd1859729b11e1/core/src/main/java/org/jboss/arquillian/persistence/core/configuration/PersistenceDescriptorExtractor.java#L45-L53 | train |
arquillian/arquillian-extension-persistence | core/src/main/java/org/jboss/arquillian/persistence/core/configuration/ConfigurationTypeConverter.java | ConfigurationTypeConverter.box | public Class<?> box(Class<?> primitive) {
if (!primitive.isPrimitive()) {
return primitive;
}
if (int.class.equals(primitive)) {
return Integer.class;
} else if (long.class.equals(primitive)) {
return Long.class;
} else if (float.class.equals(... | java | public Class<?> box(Class<?> primitive) {
if (!primitive.isPrimitive()) {
return primitive;
}
if (int.class.equals(primitive)) {
return Integer.class;
} else if (long.class.equals(primitive)) {
return Long.class;
} else if (float.class.equals(... | [
"public",
"Class",
"<",
"?",
">",
"box",
"(",
"Class",
"<",
"?",
">",
"primitive",
")",
"{",
"if",
"(",
"!",
"primitive",
".",
"isPrimitive",
"(",
")",
")",
"{",
"return",
"primitive",
";",
"}",
"if",
"(",
"int",
".",
"class",
".",
"equals",
"(",... | A helper boxing method. Returns boxed class for a primitive class
@param primitive
A primitive class
@return Boxed class if class was primitive, unchanged class in other cases | [
"A",
"helper",
"boxing",
"method",
".",
"Returns",
"boxed",
"class",
"for",
"a",
"primitive",
"class"
] | 8b4e2f8f5e807488e0fe216061bd1859729b11e1 | https://github.com/arquillian/arquillian-extension-persistence/blob/8b4e2f8f5e807488e0fe216061bd1859729b11e1/core/src/main/java/org/jboss/arquillian/persistence/core/configuration/ConfigurationTypeConverter.java#L41-L65 | train |
arquillian/arquillian-extension-persistence | dbunit/src/main/java/org/jboss/arquillian/persistence/dbunit/deployment/DBUnitArchiveAppender.java | DBUnitArchiveAppender.requiredLibraries | private String[] requiredLibraries() {
List<String> libraries = new ArrayList<String>(Arrays.asList(
"org.dbunit",
"org.apache.commons",
"org.apache.log4j",
"org.slf4j",
"org.yaml",
"org.codehaus.jackson"
));
if (!dbunitCon... | java | private String[] requiredLibraries() {
List<String> libraries = new ArrayList<String>(Arrays.asList(
"org.dbunit",
"org.apache.commons",
"org.apache.log4j",
"org.slf4j",
"org.yaml",
"org.codehaus.jackson"
));
if (!dbunitCon... | [
"private",
"String",
"[",
"]",
"requiredLibraries",
"(",
")",
"{",
"List",
"<",
"String",
">",
"libraries",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"Arrays",
".",
"asList",
"(",
"\"org.dbunit\"",
",",
"\"org.apache.commons\"",
",",
"\"org.apache.log4... | Private helper methods | [
"Private",
"helper",
"methods"
] | 8b4e2f8f5e807488e0fe216061bd1859729b11e1 | https://github.com/arquillian/arquillian-extension-persistence/blob/8b4e2f8f5e807488e0fe216061bd1859729b11e1/dbunit/src/main/java/org/jboss/arquillian/persistence/dbunit/deployment/DBUnitArchiveAppender.java#L70-L85 | train |
arquillian/arquillian-extension-persistence | core/src/main/java/org/jboss/arquillian/persistence/core/data/provider/ResourceProvider.java | ResourceProvider.getDescriptors | public Collection<T> getDescriptors(TestClass testClass) {
final List<T> descriptors = new ArrayList<T>();
for (Method testMethod : testClass.getMethods(resourceAnnotation)) {
descriptors.addAll(getDescriptorsDefinedFor(testMethod));
}
descriptors.addAll(obtainClassLevelDescr... | java | public Collection<T> getDescriptors(TestClass testClass) {
final List<T> descriptors = new ArrayList<T>();
for (Method testMethod : testClass.getMethods(resourceAnnotation)) {
descriptors.addAll(getDescriptorsDefinedFor(testMethod));
}
descriptors.addAll(obtainClassLevelDescr... | [
"public",
"Collection",
"<",
"T",
">",
"getDescriptors",
"(",
"TestClass",
"testClass",
")",
"{",
"final",
"List",
"<",
"T",
">",
"descriptors",
"=",
"new",
"ArrayList",
"<",
"T",
">",
"(",
")",
";",
"for",
"(",
"Method",
"testMethod",
":",
"testClass",
... | Returns all resources defined for this test class
including those defined on the test method level. | [
"Returns",
"all",
"resources",
"defined",
"for",
"this",
"test",
"class",
"including",
"those",
"defined",
"on",
"the",
"test",
"method",
"level",
"."
] | 8b4e2f8f5e807488e0fe216061bd1859729b11e1 | https://github.com/arquillian/arquillian-extension-persistence/blob/8b4e2f8f5e807488e0fe216061bd1859729b11e1/core/src/main/java/org/jboss/arquillian/persistence/core/data/provider/ResourceProvider.java#L63-L70 | train |
arquillian/arquillian-extension-persistence | core/src/main/java/org/jboss/arquillian/persistence/core/data/provider/ResourceProvider.java | ResourceProvider.determineLocation | protected String determineLocation(String location) {
if (existsInDefaultLocation(location)) {
return defaultFolder() + location;
}
if (!existsInGivenLocation(location)) {
throw new InvalidResourceLocation("Unable to locate " + location + ". " +
"File doe... | java | protected String determineLocation(String location) {
if (existsInDefaultLocation(location)) {
return defaultFolder() + location;
}
if (!existsInGivenLocation(location)) {
throw new InvalidResourceLocation("Unable to locate " + location + ". " +
"File doe... | [
"protected",
"String",
"determineLocation",
"(",
"String",
"location",
")",
"{",
"if",
"(",
"existsInDefaultLocation",
"(",
"location",
")",
")",
"{",
"return",
"defaultFolder",
"(",
")",
"+",
"location",
";",
"}",
"if",
"(",
"!",
"existsInGivenLocation",
"(",... | Checks if file exists in the default location.
If that's not the case, file is looked up starting from the root.
@return determined file location | [
"Checks",
"if",
"file",
"exists",
"in",
"the",
"default",
"location",
".",
"If",
"that",
"s",
"not",
"the",
"case",
"file",
"is",
"looked",
"up",
"starting",
"from",
"the",
"root",
"."
] | 8b4e2f8f5e807488e0fe216061bd1859729b11e1 | https://github.com/arquillian/arquillian-extension-persistence/blob/8b4e2f8f5e807488e0fe216061bd1859729b11e1/core/src/main/java/org/jboss/arquillian/persistence/core/data/provider/ResourceProvider.java#L134-L145 | train |
arquillian/arquillian-extension-persistence | dbunit/src/main/java/org/jboss/arquillian/persistence/dbunit/DataSetUtils.java | DataSetUtils.extractNonExistingColumns | public static List<String> extractNonExistingColumns(final Collection<String> expectedColumns,
final Collection<String> actualColumns) {
final List<String> columnsNotSpecifiedInExpectedDataSet = new ArrayList<String>();
for (String column : expectedColumns) {
if (!actualColumns.cont... | java | public static List<String> extractNonExistingColumns(final Collection<String> expectedColumns,
final Collection<String> actualColumns) {
final List<String> columnsNotSpecifiedInExpectedDataSet = new ArrayList<String>();
for (String column : expectedColumns) {
if (!actualColumns.cont... | [
"public",
"static",
"List",
"<",
"String",
">",
"extractNonExistingColumns",
"(",
"final",
"Collection",
"<",
"String",
">",
"expectedColumns",
",",
"final",
"Collection",
"<",
"String",
">",
"actualColumns",
")",
"{",
"final",
"List",
"<",
"String",
">",
"col... | Provides list of columns defined in expectedColumns, but not listed in actualColumns. | [
"Provides",
"list",
"of",
"columns",
"defined",
"in",
"expectedColumns",
"but",
"not",
"listed",
"in",
"actualColumns",
"."
] | 8b4e2f8f5e807488e0fe216061bd1859729b11e1 | https://github.com/arquillian/arquillian-extension-persistence/blob/8b4e2f8f5e807488e0fe216061bd1859729b11e1/dbunit/src/main/java/org/jboss/arquillian/persistence/dbunit/DataSetUtils.java#L54-L65 | train |
arquillian/arquillian-extension-persistence | core/src/main/java/org/jboss/arquillian/persistence/core/metadata/AnnotationInspector.java | AnnotationInspector.fetchUsingFirst | public T fetchUsingFirst(Method testMethod) {
T usedAnnotation = getAnnotationOnClassLevel();
if (isDefinedOn(testMethod)) {
usedAnnotation = fetchFrom(testMethod);
}
return usedAnnotation;
} | java | public T fetchUsingFirst(Method testMethod) {
T usedAnnotation = getAnnotationOnClassLevel();
if (isDefinedOn(testMethod)) {
usedAnnotation = fetchFrom(testMethod);
}
return usedAnnotation;
} | [
"public",
"T",
"fetchUsingFirst",
"(",
"Method",
"testMethod",
")",
"{",
"T",
"usedAnnotation",
"=",
"getAnnotationOnClassLevel",
"(",
")",
";",
"if",
"(",
"isDefinedOn",
"(",
"testMethod",
")",
")",
"{",
"usedAnnotation",
"=",
"fetchFrom",
"(",
"testMethod",
... | Fetches annotation for a given test class. If annotation is defined on method
level it's returned as a result. Otherwise class level annotation is returned if present.
@return T annotation or null if not found. | [
"Fetches",
"annotation",
"for",
"a",
"given",
"test",
"class",
".",
"If",
"annotation",
"is",
"defined",
"on",
"method",
"level",
"it",
"s",
"returned",
"as",
"a",
"result",
".",
"Otherwise",
"class",
"level",
"annotation",
"is",
"returned",
"if",
"present",... | 8b4e2f8f5e807488e0fe216061bd1859729b11e1 | https://github.com/arquillian/arquillian-extension-persistence/blob/8b4e2f8f5e807488e0fe216061bd1859729b11e1/core/src/main/java/org/jboss/arquillian/persistence/core/metadata/AnnotationInspector.java#L82-L89 | train |
silb/shiro-jersey | src/main/java/org/secnod/shiro/jersey/TypeFactory.java | TypeFactory.getValueFactory | @Override
public Factory<?> getValueFactory(Parameter parameter) {
if (type.equals(parameter.getRawType()) && parameter.isAnnotationPresent(Auth.class)) {
return this;
}
return null;
} | java | @Override
public Factory<?> getValueFactory(Parameter parameter) {
if (type.equals(parameter.getRawType()) && parameter.isAnnotationPresent(Auth.class)) {
return this;
}
return null;
} | [
"@",
"Override",
"public",
"Factory",
"<",
"?",
">",
"getValueFactory",
"(",
"Parameter",
"parameter",
")",
"{",
"if",
"(",
"type",
".",
"equals",
"(",
"parameter",
".",
"getRawType",
"(",
")",
")",
"&&",
"parameter",
".",
"isAnnotationPresent",
"(",
"Auth... | org.glassfish.jersey.server.spi.internal.ValueFactoryProvider | [
"org",
".",
"glassfish",
".",
"jersey",
".",
"server",
".",
"spi",
".",
"internal",
".",
"ValueFactoryProvider"
] | dde028badee0040e0f367c29bad3b2a45aa4c71e | https://github.com/silb/shiro-jersey/blob/dde028badee0040e0f367c29bad3b2a45aa4c71e/src/main/java/org/secnod/shiro/jersey/TypeFactory.java#L34-L40 | train |
silb/shiro-jersey | src/main/java/org/secnod/shiro/jersey/TypeFactory.java | TypeFactory.bind | @Override
public void bind(DynamicConfiguration config) {
Injections.addBinding(
Injections.newFactoryBinder(this).to(type).in(Singleton.class),
config);
Injections.addBinding(
Injections.newBinder(this).to(ValueFactoryProvider.class),
config);
... | java | @Override
public void bind(DynamicConfiguration config) {
Injections.addBinding(
Injections.newFactoryBinder(this).to(type).in(Singleton.class),
config);
Injections.addBinding(
Injections.newBinder(this).to(ValueFactoryProvider.class),
config);
... | [
"@",
"Override",
"public",
"void",
"bind",
"(",
"DynamicConfiguration",
"config",
")",
"{",
"Injections",
".",
"addBinding",
"(",
"Injections",
".",
"newFactoryBinder",
"(",
"this",
")",
".",
"to",
"(",
"type",
")",
".",
"in",
"(",
"Singleton",
".",
"class... | org.glassfish.hk2.utilities.Binder | [
"org",
".",
"glassfish",
".",
"hk2",
".",
"utilities",
".",
"Binder"
] | dde028badee0040e0f367c29bad3b2a45aa4c71e | https://github.com/silb/shiro-jersey/blob/dde028badee0040e0f367c29bad3b2a45aa4c71e/src/main/java/org/secnod/shiro/jersey/TypeFactory.java#L49-L57 | train |
openxc/openxc-android | enabler/src/main/java/com/openxc/enabler/preferences/VehiclePreferenceManager.java | VehiclePreferenceManager.setVehicleManager | public void setVehicleManager(VehicleManager vehicle) {
mVehicle = vehicle;
mPreferenceListener = watchPreferences(getPreferences());
mPreferenceListener.readStoredPreferences();
} | java | public void setVehicleManager(VehicleManager vehicle) {
mVehicle = vehicle;
mPreferenceListener = watchPreferences(getPreferences());
mPreferenceListener.readStoredPreferences();
} | [
"public",
"void",
"setVehicleManager",
"(",
"VehicleManager",
"vehicle",
")",
"{",
"mVehicle",
"=",
"vehicle",
";",
"mPreferenceListener",
"=",
"watchPreferences",
"(",
"getPreferences",
"(",
")",
")",
";",
"mPreferenceListener",
".",
"readStoredPreferences",
"(",
"... | Give the instance a reference to an active VehicleManager. | [
"Give",
"the",
"instance",
"a",
"reference",
"to",
"an",
"active",
"VehicleManager",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/enabler/src/main/java/com/openxc/enabler/preferences/VehiclePreferenceManager.java#L30-L34 | train |
openxc/openxc-android | library/src/main/java/com/openxc/interfaces/VehicleInterfaceFactory.java | VehicleInterfaceFactory.findClass | public static Class<? extends VehicleInterface> findClass(
String interfaceName) throws VehicleInterfaceException {
Class<? extends VehicleInterface> interfaceType;
try {
interfaceType = Class.forName(interfaceName).asSubclass(
VehicleInterface.class);
... | java | public static Class<? extends VehicleInterface> findClass(
String interfaceName) throws VehicleInterfaceException {
Class<? extends VehicleInterface> interfaceType;
try {
interfaceType = Class.forName(interfaceName).asSubclass(
VehicleInterface.class);
... | [
"public",
"static",
"Class",
"<",
"?",
"extends",
"VehicleInterface",
">",
"findClass",
"(",
"String",
"interfaceName",
")",
"throws",
"VehicleInterfaceException",
"{",
"Class",
"<",
"?",
"extends",
"VehicleInterface",
">",
"interfaceType",
";",
"try",
"{",
"inter... | Obtain the Class object for a given VehicleInterface class name.
The class must be in the classpath of the process' context, or an
exception will be thrown.
@param interfaceName the canonical name of class implementing
{@link VehicleInterface}
@return the Class object, if found.
@throws VehicleInterfaceException if t... | [
"Obtain",
"the",
"Class",
"object",
"for",
"a",
"given",
"VehicleInterface",
"class",
"name",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/interfaces/VehicleInterfaceFactory.java#L29-L40 | train |
openxc/openxc-android | library/src/main/java/com/openxc/sinks/UploaderSink.java | UploaderSink.validatePath | public static boolean validatePath(String path) {
if(path == null) {
Log.w(TAG, "Uploading path not set");
return false;
}
try {
uriFromString(path);
return true;
} catch(DataSinkException e) {
return false;
}
} | java | public static boolean validatePath(String path) {
if(path == null) {
Log.w(TAG, "Uploading path not set");
return false;
}
try {
uriFromString(path);
return true;
} catch(DataSinkException e) {
return false;
}
} | [
"public",
"static",
"boolean",
"validatePath",
"(",
"String",
"path",
")",
"{",
"if",
"(",
"path",
"==",
"null",
")",
"{",
"Log",
".",
"w",
"(",
"TAG",
",",
"\"Uploading path not set\"",
")",
";",
"return",
"false",
";",
"}",
"try",
"{",
"uriFromString",... | Returns true if the path is not null and if it is a valid URI.
@param path a URI to validate
@return true if path is a valid URI. | [
"Returns",
"true",
"if",
"the",
"path",
"is",
"not",
"null",
"and",
"if",
"it",
"is",
"a",
"valid",
"URI",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/sinks/UploaderSink.java#L98-L110 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.waitUntilBound | public void waitUntilBound() throws VehicleServiceException {
mRemoteBoundLock.lock();
Log.i(TAG, "Waiting for the VehicleService to bind to " + this);
while(mRemoteService == null) {
try {
if(!mRemoteBoundCondition.await(3, TimeUnit.SECONDS)) {
th... | java | public void waitUntilBound() throws VehicleServiceException {
mRemoteBoundLock.lock();
Log.i(TAG, "Waiting for the VehicleService to bind to " + this);
while(mRemoteService == null) {
try {
if(!mRemoteBoundCondition.await(3, TimeUnit.SECONDS)) {
th... | [
"public",
"void",
"waitUntilBound",
"(",
")",
"throws",
"VehicleServiceException",
"{",
"mRemoteBoundLock",
".",
"lock",
"(",
")",
";",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"Waiting for the VehicleService to bind to \"",
"+",
"this",
")",
";",
"while",
"(",
"mRem... | Block until the VehicleManager is alive and can return measurements.
Blocks for at most 3 seconds.
Most applications don't need this and don't wait this method, but it can
be useful for testing when you need to make sure you will get a
measurement back from the system. | [
"Block",
"until",
"the",
"VehicleManager",
"is",
"alive",
"and",
"can",
"return",
"measurements",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L176-L189 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.get | public Measurement get(
Class<? extends Measurement> measurementType)
throws UnrecognizedMeasurementTypeException, NoValueException {
return BaseMeasurement.getMeasurementFromMessage(measurementType,
get(BaseMeasurement.getKeyForMeasurement(measurementType)).asSimpleMessa... | java | public Measurement get(
Class<? extends Measurement> measurementType)
throws UnrecognizedMeasurementTypeException, NoValueException {
return BaseMeasurement.getMeasurementFromMessage(measurementType,
get(BaseMeasurement.getKeyForMeasurement(measurementType)).asSimpleMessa... | [
"public",
"Measurement",
"get",
"(",
"Class",
"<",
"?",
"extends",
"Measurement",
">",
"measurementType",
")",
"throws",
"UnrecognizedMeasurementTypeException",
",",
"NoValueException",
"{",
"return",
"BaseMeasurement",
".",
"getMeasurementFromMessage",
"(",
"measurementT... | Retrieve the most current value of a measurement.
@param measurementType The class of the requested Measurement
(e.g. VehicleSpeed.class)
@return An instance of the requested Measurement which may or may
not have a value.
@throws UnrecognizedMeasurementTypeException if passed a measurementType
that does not extend Mea... | [
"Retrieve",
"the",
"most",
"current",
"value",
"of",
"a",
"measurement",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L204-L209 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.get | public VehicleMessage get(MessageKey key) throws NoValueException {
if(mRemoteService == null) {
Log.w(TAG, "Not connected to the VehicleService -- " +
"throwing a NoValueException");
throw new NoValueException();
}
try {
VehicleMessage me... | java | public VehicleMessage get(MessageKey key) throws NoValueException {
if(mRemoteService == null) {
Log.w(TAG, "Not connected to the VehicleService -- " +
"throwing a NoValueException");
throw new NoValueException();
}
try {
VehicleMessage me... | [
"public",
"VehicleMessage",
"get",
"(",
"MessageKey",
"key",
")",
"throws",
"NoValueException",
"{",
"if",
"(",
"mRemoteService",
"==",
"null",
")",
"{",
"Log",
".",
"w",
"(",
"TAG",
",",
"\"Not connected to the VehicleService -- \"",
"+",
"\"throwing a NoValueExcep... | Retrieve the most current value of a keyed message.
@param key The key of the requested Measurement
(e.g. VehicleSpeed.class)
@return An instance of the requested Measurement which may or may
not have a value.
@throws NoValueException if no value has yet been received for this
measurementType
@see BaseMeasurement | [
"Retrieve",
"the",
"most",
"current",
"value",
"of",
"a",
"keyed",
"message",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L222-L239 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.request | public void request(KeyedMessage message,
VehicleMessage.Listener listener) {
// Register the listener as non-persistent, so it is deleted after
// receiving the first response
mNotifier.register(ExactKeyMatcher.buildExactMatcher(message.getKey()),
listener, false);
... | java | public void request(KeyedMessage message,
VehicleMessage.Listener listener) {
// Register the listener as non-persistent, so it is deleted after
// receiving the first response
mNotifier.register(ExactKeyMatcher.buildExactMatcher(message.getKey()),
listener, false);
... | [
"public",
"void",
"request",
"(",
"KeyedMessage",
"message",
",",
"VehicleMessage",
".",
"Listener",
"listener",
")",
"{",
"// Register the listener as non-persistent, so it is deleted after",
"// receiving the first response",
"mNotifier",
".",
"register",
"(",
"ExactKeyMatche... | Send a message to the VehicleInterface and register the given listener to
receive the first response matching the message's key.
This function is non-blocking.
The listener is unregistered after the first response is received. If you
need to accept multiple responses for the same request, you must manually
register y... | [
"Send",
"a",
"message",
"to",
"the",
"VehicleInterface",
"and",
"register",
"the",
"given",
"listener",
"to",
"receive",
"the",
"first",
"response",
"matching",
"the",
"message",
"s",
"key",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L302-L309 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.request | public VehicleMessage request(KeyedMessage message) {
BlockingMessageListener callback = new BlockingMessageListener();
request(message, callback);
return callback.waitForResponse();
} | java | public VehicleMessage request(KeyedMessage message) {
BlockingMessageListener callback = new BlockingMessageListener();
request(message, callback);
return callback.waitForResponse();
} | [
"public",
"VehicleMessage",
"request",
"(",
"KeyedMessage",
"message",
")",
"{",
"BlockingMessageListener",
"callback",
"=",
"new",
"BlockingMessageListener",
"(",
")",
";",
"request",
"(",
"message",
",",
"callback",
")",
";",
"return",
"callback",
".",
"waitForR... | Send a message to the VehicleInterface and wait up to 2 seconds to
receive a response.
This is a blocking version of the other request(...) method.
@return The response if one is received before the timeout, otherwise
null. | [
"Send",
"a",
"message",
"to",
"the",
"VehicleInterface",
"and",
"wait",
"up",
"to",
"2",
"seconds",
"to",
"receive",
"a",
"response",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L320-L324 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.addListener | public void addListener(Class<? extends Measurement> measurementType,
Measurement.Listener listener) {
Log.i(TAG, "Adding listener " + listener + " for " + measurementType);
mNotifier.register(measurementType, listener);
} | java | public void addListener(Class<? extends Measurement> measurementType,
Measurement.Listener listener) {
Log.i(TAG, "Adding listener " + listener + " for " + measurementType);
mNotifier.register(measurementType, listener);
} | [
"public",
"void",
"addListener",
"(",
"Class",
"<",
"?",
"extends",
"Measurement",
">",
"measurementType",
",",
"Measurement",
".",
"Listener",
"listener",
")",
"{",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"Adding listener \"",
"+",
"listener",
"+",
"\" for \"",
... | Register to receive asynchronous updates for a specific Measurement type.
A Measurement is a specific, known VehicleMessage subtype.
Use this method to register an object implementing the
Measurement.Listener interface to receive real-time updates
whenever a new value is received for the specified measurementType.
M... | [
"Register",
"to",
"receive",
"asynchronous",
"updates",
"for",
"a",
"specific",
"Measurement",
"type",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L343-L347 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.addListener | public void addListener(Class<? extends VehicleMessage> messageType,
VehicleMessage.Listener listener) {
Log.i(TAG, "Adding listener " + listener + " for " + messageType);
mNotifier.register(messageType, listener);
} | java | public void addListener(Class<? extends VehicleMessage> messageType,
VehicleMessage.Listener listener) {
Log.i(TAG, "Adding listener " + listener + " for " + messageType);
mNotifier.register(messageType, listener);
} | [
"public",
"void",
"addListener",
"(",
"Class",
"<",
"?",
"extends",
"VehicleMessage",
">",
"messageType",
",",
"VehicleMessage",
".",
"Listener",
"listener",
")",
"{",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"Adding listener \"",
"+",
"listener",
"+",
"\" for \"",... | Register to receive asynchronous updates for a specific VehicleMessage
type.
Use this method to register an object implementing the
VehicleMessage.Listener interface to receive real-time updates
whenever a new value is received for the specified message type.
Make sure you unregister your listeners with
VehicleManage... | [
"Register",
"to",
"receive",
"asynchronous",
"updates",
"for",
"a",
"specific",
"VehicleMessage",
"type",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L365-L369 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.addListener | public void addListener(KeyedMessage keyedMessage,
VehicleMessage.Listener listener) {
addListener(keyedMessage.getKey(), listener);
} | java | public void addListener(KeyedMessage keyedMessage,
VehicleMessage.Listener listener) {
addListener(keyedMessage.getKey(), listener);
} | [
"public",
"void",
"addListener",
"(",
"KeyedMessage",
"keyedMessage",
",",
"VehicleMessage",
".",
"Listener",
"listener",
")",
"{",
"addListener",
"(",
"keyedMessage",
".",
"getKey",
"(",
")",
",",
"listener",
")",
";",
"}"
] | Register to receive a callback when a message with same key as the given
KeyedMessage is received.
@param keyedMessage A message with the key you want to receive updates
for - the response to a command typically has the same key as the
request, so you can use the outgoing message's KeyedMessage to
register to receive ... | [
"Register",
"to",
"receive",
"a",
"callback",
"when",
"a",
"message",
"with",
"same",
"key",
"as",
"the",
"given",
"KeyedMessage",
"is",
"received",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L381-L384 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.addListener | public void addListener(MessageKey key, VehicleMessage.Listener listener) {
addListener(ExactKeyMatcher.buildExactMatcher(key), listener);
} | java | public void addListener(MessageKey key, VehicleMessage.Listener listener) {
addListener(ExactKeyMatcher.buildExactMatcher(key), listener);
} | [
"public",
"void",
"addListener",
"(",
"MessageKey",
"key",
",",
"VehicleMessage",
".",
"Listener",
"listener",
")",
"{",
"addListener",
"(",
"ExactKeyMatcher",
".",
"buildExactMatcher",
"(",
"key",
")",
",",
"listener",
")",
";",
"}"
] | Register to receive a callback when a message with the given key is
received.
@param key The key you want to receive updates.
@param listener An listener instance to receive the callback. | [
"Register",
"to",
"receive",
"a",
"callback",
"when",
"a",
"message",
"with",
"the",
"given",
"key",
"is",
"received",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L393-L395 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.addListener | public void addListener(KeyMatcher matcher, VehicleMessage.Listener listener) {
Log.i(TAG, "Adding listener " + listener + " to " + matcher);
mNotifier.register(matcher, listener);
} | java | public void addListener(KeyMatcher matcher, VehicleMessage.Listener listener) {
Log.i(TAG, "Adding listener " + listener + " to " + matcher);
mNotifier.register(matcher, listener);
} | [
"public",
"void",
"addListener",
"(",
"KeyMatcher",
"matcher",
",",
"VehicleMessage",
".",
"Listener",
"listener",
")",
"{",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"Adding listener \"",
"+",
"listener",
"+",
"\" to \"",
"+",
"matcher",
")",
";",
"mNotifier",
".... | Register to receive a callback when a message with key matching the given
KeyMatcher is received.
This function can be used to set up a wildcard listener, or one that
receives a wider range of responses than just a 1 to 1 match of keys.
@param matcher A KeyMatcher implement the desired filtering logic.
@param listene... | [
"Register",
"to",
"receive",
"a",
"callback",
"when",
"a",
"message",
"with",
"key",
"matching",
"the",
"given",
"KeyMatcher",
"is",
"received",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L407-L410 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.removeListener | public void removeListener(Class<? extends Measurement> measurementType,
Measurement.Listener listener) {
Log.i(TAG, "Removing listener " + listener + " for " + measurementType);
mNotifier.unregister(measurementType, listener);
} | java | public void removeListener(Class<? extends Measurement> measurementType,
Measurement.Listener listener) {
Log.i(TAG, "Removing listener " + listener + " for " + measurementType);
mNotifier.unregister(measurementType, listener);
} | [
"public",
"void",
"removeListener",
"(",
"Class",
"<",
"?",
"extends",
"Measurement",
">",
"measurementType",
",",
"Measurement",
".",
"Listener",
"listener",
")",
"{",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"Removing listener \"",
"+",
"listener",
"+",
"\" for \... | Unregister a previously registered Measurement.Listener instance.
When an application is no longer interested in receiving measurement
updates (e.g. when it's pausing or exiting) it should unregister all
previously registered listeners to save on CPU.
@param measurementType The class of the requested Measurement
(e.g... | [
"Unregister",
"a",
"previously",
"registered",
"Measurement",
".",
"Listener",
"instance",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L423-L427 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.removeListener | public void removeListener(Class<? extends VehicleMessage> messageType,
VehicleMessage.Listener listener) {
mNotifier.unregister(messageType, listener);
} | java | public void removeListener(Class<? extends VehicleMessage> messageType,
VehicleMessage.Listener listener) {
mNotifier.unregister(messageType, listener);
} | [
"public",
"void",
"removeListener",
"(",
"Class",
"<",
"?",
"extends",
"VehicleMessage",
">",
"messageType",
",",
"VehicleMessage",
".",
"Listener",
"listener",
")",
"{",
"mNotifier",
".",
"unregister",
"(",
"messageType",
",",
"listener",
")",
";",
"}"
] | Unregister a previously registered message type listener.
@param messageType The class of the VehicleMessage this listener was
registered to receive. A listener can be registered to receive
multiple message types, which is why this must be specified when
removing a listener.
@param listener The listener to remove. | [
"Unregister",
"a",
"previously",
"registered",
"message",
"type",
"listener",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L438-L441 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.removeListener | public void removeListener(KeyedMessage message,
VehicleMessage.Listener listener) {
removeListener(message.getKey(), listener);
} | java | public void removeListener(KeyedMessage message,
VehicleMessage.Listener listener) {
removeListener(message.getKey(), listener);
} | [
"public",
"void",
"removeListener",
"(",
"KeyedMessage",
"message",
",",
"VehicleMessage",
".",
"Listener",
"listener",
")",
"{",
"removeListener",
"(",
"message",
".",
"getKey",
"(",
")",
",",
"listener",
")",
";",
"}"
] | Unregister a previously registered keyed message listener.
@param message The message with the key this listener was previously
registered to receive.
@param listener The listener to remove. | [
"Unregister",
"a",
"previously",
"registered",
"keyed",
"message",
"listener",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L450-L453 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.removeListener | public void removeListener(KeyMatcher matcher,
VehicleMessage.Listener listener) {
mNotifier.unregister(matcher, listener);
} | java | public void removeListener(KeyMatcher matcher,
VehicleMessage.Listener listener) {
mNotifier.unregister(matcher, listener);
} | [
"public",
"void",
"removeListener",
"(",
"KeyMatcher",
"matcher",
",",
"VehicleMessage",
".",
"Listener",
"listener",
")",
"{",
"mNotifier",
".",
"unregister",
"(",
"matcher",
",",
"listener",
")",
";",
"}"
] | Unregister a previously registered key matcher listener.
@param matcher The KeyMatcher this listener was previously registered
to receive matches from.
@param listener The listener to remove. | [
"Unregister",
"a",
"previously",
"registered",
"key",
"matcher",
"listener",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L462-L465 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.removeListener | public void removeListener(MessageKey key, VehicleMessage.Listener listener) {
removeListener(ExactKeyMatcher.buildExactMatcher(key), listener);
} | java | public void removeListener(MessageKey key, VehicleMessage.Listener listener) {
removeListener(ExactKeyMatcher.buildExactMatcher(key), listener);
} | [
"public",
"void",
"removeListener",
"(",
"MessageKey",
"key",
",",
"VehicleMessage",
".",
"Listener",
"listener",
")",
"{",
"removeListener",
"(",
"ExactKeyMatcher",
".",
"buildExactMatcher",
"(",
"key",
")",
",",
"listener",
")",
";",
"}"
] | Unregister a previously registered key listener.
@param key The key this listener was previously registered to
receive updates on.
@param listener The listener to remove. | [
"Unregister",
"a",
"previously",
"registered",
"key",
"listener",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L474-L476 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.addSource | public void addSource(VehicleDataSource source) {
Log.i(TAG, "Adding data source " + source);
mUserOriginPipeline.addSource(source);
} | java | public void addSource(VehicleDataSource source) {
Log.i(TAG, "Adding data source " + source);
mUserOriginPipeline.addSource(source);
} | [
"public",
"void",
"addSource",
"(",
"VehicleDataSource",
"source",
")",
"{",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"Adding data source \"",
"+",
"source",
")",
";",
"mUserOriginPipeline",
".",
"addSource",
"(",
"source",
")",
";",
"}"
] | Add a new data source to the vehicle service.
For example, to use the trace data source to playback a trace file, call
the addSource method after binding with VehicleManager:
service.addSource(new TraceVehicleDataSource(
new URI("/sdcard/openxc/trace.json"))));
@param source an instance of a VehicleDataSource | [
"Add",
"a",
"new",
"data",
"source",
"to",
"the",
"vehicle",
"service",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L489-L492 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.removeSource | public void removeSource(VehicleDataSource source) {
if(source != null) {
Log.i(TAG, "Removing data source " + source);
mUserOriginPipeline.removeSource(source);
}
} | java | public void removeSource(VehicleDataSource source) {
if(source != null) {
Log.i(TAG, "Removing data source " + source);
mUserOriginPipeline.removeSource(source);
}
} | [
"public",
"void",
"removeSource",
"(",
"VehicleDataSource",
"source",
")",
"{",
"if",
"(",
"source",
"!=",
"null",
")",
"{",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"Removing data source \"",
"+",
"source",
")",
";",
"mUserOriginPipeline",
".",
"removeSource",
"... | Remove a previously registered source from the data pipeline. | [
"Remove",
"a",
"previously",
"registered",
"source",
"from",
"the",
"data",
"pipeline",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L497-L502 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.addSink | public void addSink(VehicleDataSink sink) {
Log.i(TAG, "Adding data sink " + sink);
mRemoteOriginPipeline.addSink(sink);
} | java | public void addSink(VehicleDataSink sink) {
Log.i(TAG, "Adding data sink " + sink);
mRemoteOriginPipeline.addSink(sink);
} | [
"public",
"void",
"addSink",
"(",
"VehicleDataSink",
"sink",
")",
"{",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"Adding data sink \"",
"+",
"sink",
")",
";",
"mRemoteOriginPipeline",
".",
"addSink",
"(",
"sink",
")",
";",
"}"
] | Add a new data sink to the vehicle service.
A data sink added with this method will receive all new measurements as
they arrive from registered data sources. For example, to use the trace
file recorder sink, call the addSink method after binding with
VehicleManager:
service.addSink(new FileRecorderSink(
new AndroidF... | [
"Add",
"a",
"new",
"data",
"sink",
"to",
"the",
"vehicle",
"service",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L517-L520 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.removeSink | public void removeSink(VehicleDataSink sink) {
if(sink != null) {
mRemoteOriginPipeline.removeSink(sink);
sink.stop();
}
} | java | public void removeSink(VehicleDataSink sink) {
if(sink != null) {
mRemoteOriginPipeline.removeSink(sink);
sink.stop();
}
} | [
"public",
"void",
"removeSink",
"(",
"VehicleDataSink",
"sink",
")",
"{",
"if",
"(",
"sink",
"!=",
"null",
")",
"{",
"mRemoteOriginPipeline",
".",
"removeSink",
"(",
"sink",
")",
";",
"sink",
".",
"stop",
"(",
")",
";",
"}",
"}"
] | Remove a previously registered sink from the data pipeline. | [
"Remove",
"a",
"previously",
"registered",
"sink",
"from",
"the",
"data",
"pipeline",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L525-L530 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.requestCommandMessage | public String requestCommandMessage(CommandType type) {
VehicleMessage message = request(new Command(type));
String value = null;
if(message != null) {
// Because we use the same key and value for commands and command
// responses, if for some reason a Command is echoed b... | java | public String requestCommandMessage(CommandType type) {
VehicleMessage message = request(new Command(type));
String value = null;
if(message != null) {
// Because we use the same key and value for commands and command
// responses, if for some reason a Command is echoed b... | [
"public",
"String",
"requestCommandMessage",
"(",
"CommandType",
"type",
")",
"{",
"VehicleMessage",
"message",
"=",
"request",
"(",
"new",
"Command",
"(",
"type",
")",
")",
";",
"String",
"value",
"=",
"null",
";",
"if",
"(",
"message",
"!=",
"null",
")",... | Send a command request to the vehicle that does not require any metadata.
@param type The command request type to send to the VI.
@return The message returned by the VI in response to this command or
null if none was received. | [
"Send",
"a",
"command",
"request",
"to",
"the",
"vehicle",
"that",
"does",
"not",
"require",
"any",
"metadata",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L539-L560 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.addOnVehicleInterfaceConnectedListener | public void addOnVehicleInterfaceConnectedListener(
ViConnectionListener listener) throws VehicleServiceException {
if(mRemoteService != null) {
try {
mRemoteService.addViConnectionListener(listener);
} catch(RemoteException e) {
throw new Vehi... | java | public void addOnVehicleInterfaceConnectedListener(
ViConnectionListener listener) throws VehicleServiceException {
if(mRemoteService != null) {
try {
mRemoteService.addViConnectionListener(listener);
} catch(RemoteException e) {
throw new Vehi... | [
"public",
"void",
"addOnVehicleInterfaceConnectedListener",
"(",
"ViConnectionListener",
"listener",
")",
"throws",
"VehicleServiceException",
"{",
"if",
"(",
"mRemoteService",
"!=",
"null",
")",
"{",
"try",
"{",
"mRemoteService",
".",
"addViConnectionListener",
"(",
"l... | Register a listener to receive a callback when the selected VI is
connected.
@param listener The listener that should receive the callback. | [
"Register",
"a",
"listener",
"to",
"receive",
"a",
"callback",
"when",
"the",
"selected",
"VI",
"is",
"connected",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L595-L605 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.setVehicleInterface | public void setVehicleInterface(
Class<? extends VehicleInterface> vehicleInterfaceType,
String resource) throws VehicleServiceException {
Log.i(TAG, "Setting VI to: " + vehicleInterfaceType);
String interfaceName = null;
if(vehicleInterfaceType != null) {
in... | java | public void setVehicleInterface(
Class<? extends VehicleInterface> vehicleInterfaceType,
String resource) throws VehicleServiceException {
Log.i(TAG, "Setting VI to: " + vehicleInterfaceType);
String interfaceName = null;
if(vehicleInterfaceType != null) {
in... | [
"public",
"void",
"setVehicleInterface",
"(",
"Class",
"<",
"?",
"extends",
"VehicleInterface",
">",
"vehicleInterfaceType",
",",
"String",
"resource",
")",
"throws",
"VehicleServiceException",
"{",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"Setting VI to: \"",
"+",
"ve... | Change the active vehicle interface to a new type using the given
resource.
To disable all vehicle interfaces, pass null to this function.
The only valid VehicleInterface types are those included with the library
- the vehicle service running in a remote process is the one to actually
instantiate the interfaces. Inte... | [
"Change",
"the",
"active",
"vehicle",
"interface",
"to",
"a",
"new",
"type",
"using",
"the",
"given",
"resource",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L640-L661 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.setNativeGpsStatus | public void setNativeGpsStatus(boolean enabled) {
Log.i(TAG, (enabled ? "Enabling" : "Disabling") + " native GPS");
if(mRemoteService != null) {
try {
mRemoteService.setNativeGpsStatus(enabled);
} catch(RemoteException e) {
Log.w(TAG, "Unable to c... | java | public void setNativeGpsStatus(boolean enabled) {
Log.i(TAG, (enabled ? "Enabling" : "Disabling") + " native GPS");
if(mRemoteService != null) {
try {
mRemoteService.setNativeGpsStatus(enabled);
} catch(RemoteException e) {
Log.w(TAG, "Unable to c... | [
"public",
"void",
"setNativeGpsStatus",
"(",
"boolean",
"enabled",
")",
"{",
"Log",
".",
"i",
"(",
"TAG",
",",
"(",
"enabled",
"?",
"\"Enabling\"",
":",
"\"Disabling\"",
")",
"+",
"\" native GPS\"",
")",
";",
"if",
"(",
"mRemoteService",
"!=",
"null",
")",... | Control whether the device's built-in GPS is used to provide location.
@param enabled True if GPS should be read from the Android device and
injected as vehicle data whenever a vehicle interface is connected. | [
"Control",
"whether",
"the",
"device",
"s",
"built",
"-",
"in",
"GPS",
"is",
"used",
"to",
"provide",
"location",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L669-L681 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.getActiveVehicleInterface | public VehicleInterfaceDescriptor getActiveVehicleInterface() {
VehicleInterfaceDescriptor descriptor = null;
if(mRemoteService != null) {
try {
descriptor = mRemoteService.getVehicleInterfaceDescriptor();
} catch(RemoteException e) {
Log.w(TAG, "U... | java | public VehicleInterfaceDescriptor getActiveVehicleInterface() {
VehicleInterfaceDescriptor descriptor = null;
if(mRemoteService != null) {
try {
descriptor = mRemoteService.getVehicleInterfaceDescriptor();
} catch(RemoteException e) {
Log.w(TAG, "U... | [
"public",
"VehicleInterfaceDescriptor",
"getActiveVehicleInterface",
"(",
")",
"{",
"VehicleInterfaceDescriptor",
"descriptor",
"=",
"null",
";",
"if",
"(",
"mRemoteService",
"!=",
"null",
")",
"{",
"try",
"{",
"descriptor",
"=",
"mRemoteService",
".",
"getVehicleInte... | Returns a descriptor of the active vehicle interface.
@return A VehicleInterfaceDescriptor for the active VI or null if none is
enabled. | [
"Returns",
"a",
"descriptor",
"of",
"the",
"active",
"vehicle",
"interface",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L709-L720 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.getMessageCount | public int getMessageCount() throws VehicleServiceException {
if(mRemoteService != null) {
try {
return mRemoteService.getMessageCount();
} catch(RemoteException e) {
throw new VehicleServiceException(
"Unable to retrieve message co... | java | public int getMessageCount() throws VehicleServiceException {
if(mRemoteService != null) {
try {
return mRemoteService.getMessageCount();
} catch(RemoteException e) {
throw new VehicleServiceException(
"Unable to retrieve message co... | [
"public",
"int",
"getMessageCount",
"(",
")",
"throws",
"VehicleServiceException",
"{",
"if",
"(",
"mRemoteService",
"!=",
"null",
")",
"{",
"try",
"{",
"return",
"mRemoteService",
".",
"getMessageCount",
"(",
")",
";",
"}",
"catch",
"(",
"RemoteException",
"e... | Read the number of messages received by the vehicle service.
@throws VehicleServiceException if the listener is unable to be
unregistered with the library internals - an exceptional situation
that shouldn't occur. | [
"Read",
"the",
"number",
"of",
"messages",
"received",
"by",
"the",
"vehicle",
"service",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L729-L741 | train |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.isViConnected | public boolean isViConnected() {
if(mRemoteService != null) {
try {
return mUserOriginPipeline.isActive() || mRemoteService.isViConnected();
} catch(RemoteException e) {
Log.d(TAG, "Unable to send message to remote service", e);
}
}
... | java | public boolean isViConnected() {
if(mRemoteService != null) {
try {
return mUserOriginPipeline.isActive() || mRemoteService.isViConnected();
} catch(RemoteException e) {
Log.d(TAG, "Unable to send message to remote service", e);
}
}
... | [
"public",
"boolean",
"isViConnected",
"(",
")",
"{",
"if",
"(",
"mRemoteService",
"!=",
"null",
")",
"{",
"try",
"{",
"return",
"mUserOriginPipeline",
".",
"isActive",
"(",
")",
"||",
"mRemoteService",
".",
"isViConnected",
"(",
")",
";",
"}",
"catch",
"("... | Return the connection status of the selected VI.
@return true if the selected VI reports that it is connected to the
vehicle. | [
"Return",
"the",
"connection",
"status",
"of",
"the",
"selected",
"VI",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L749-L758 | train |
openxc/openxc-android | library/src/main/java/com/openxc/messages/CanMessage.java | CanMessage.compareTo | @Override
public int compareTo(VehicleMessage other) {
CanMessage otherMessage = (CanMessage) other;
if(getBusId() < otherMessage.getBusId()) {
return -1;
} else if(getBusId() > otherMessage.getBusId()) {
return 1;
} else {
if(getId() < otherMessag... | java | @Override
public int compareTo(VehicleMessage other) {
CanMessage otherMessage = (CanMessage) other;
if(getBusId() < otherMessage.getBusId()) {
return -1;
} else if(getBusId() > otherMessage.getBusId()) {
return 1;
} else {
if(getId() < otherMessag... | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"VehicleMessage",
"other",
")",
"{",
"CanMessage",
"otherMessage",
"=",
"(",
"CanMessage",
")",
"other",
";",
"if",
"(",
"getBusId",
"(",
")",
"<",
"otherMessage",
".",
"getBusId",
"(",
")",
")",
"{",
"... | Sort by bus, then by message ID. | [
"Sort",
"by",
"bus",
"then",
"by",
"message",
"ID",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/messages/CanMessage.java#L79-L94 | train |
openxc/openxc-android | library/src/main/java/com/openxc/remote/VehicleService.java | VehicleService.onBind | @Override
public IBinder onBind(Intent intent) {
Log.i(TAG, "Service binding in response to " + intent);
initializeDefaultSources();
initializeDefaultSinks(mPipeline);
return mBinder;
} | java | @Override
public IBinder onBind(Intent intent) {
Log.i(TAG, "Service binding in response to " + intent);
initializeDefaultSources();
initializeDefaultSinks(mPipeline);
return mBinder;
} | [
"@",
"Override",
"public",
"IBinder",
"onBind",
"(",
"Intent",
"intent",
")",
"{",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"Service binding in response to \"",
"+",
"intent",
")",
";",
"initializeDefaultSources",
"(",
")",
";",
"initializeDefaultSinks",
"(",
"mPipel... | Initialize the service and data source when a client binds to us. | [
"Initialize",
"the",
"service",
"and",
"data",
"source",
"when",
"a",
"client",
"binds",
"to",
"us",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/remote/VehicleService.java#L98-L105 | train |
openxc/openxc-android | library/src/main/java/com/openxc/util/SupportSettingsUtils.java | SupportSettingsUtils.getStringSet | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
public static Set<String> getStringSet(SharedPreferences preferences,
String key, Set<String> defaultValue) {
Set<String> result = defaultValue;
if(supportsStringSet()) {
result = preferences.getStringSet(key, defaultValue);
}... | java | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
public static Set<String> getStringSet(SharedPreferences preferences,
String key, Set<String> defaultValue) {
Set<String> result = defaultValue;
if(supportsStringSet()) {
result = preferences.getStringSet(key, defaultValue);
}... | [
"@",
"TargetApi",
"(",
"Build",
".",
"VERSION_CODES",
".",
"HONEYCOMB",
")",
"public",
"static",
"Set",
"<",
"String",
">",
"getStringSet",
"(",
"SharedPreferences",
"preferences",
",",
"String",
"key",
",",
"Set",
"<",
"String",
">",
"defaultValue",
")",
"{... | Retrieve a set of strings from SharedPreferences, using the built-in
getStringSet method if available and falling back to a comma separated
String if not.
Note that this is a simple approach that won't work if the values in the
set contain commas.
@param preferences the SharedPreferences to retrieve the set from.
@pa... | [
"Retrieve",
"a",
"set",
"of",
"strings",
"from",
"SharedPreferences",
"using",
"the",
"built",
"-",
"in",
"getStringSet",
"method",
"if",
"available",
"and",
"falling",
"back",
"to",
"a",
"comma",
"separated",
"String",
"if",
"not",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/util/SupportSettingsUtils.java#L35-L51 | train |
openxc/openxc-android | library/src/main/java/com/openxc/interfaces/usb/UsbDeviceUtilities.java | UsbDeviceUtilities.vendorFromUri | public static int vendorFromUri(URI uri)
throws DataSourceResourceException {
try {
return Integer.parseInt(uri.getAuthority(), 16);
} catch(NumberFormatException e) {
throw new DataSourceResourceException(
"USB device must be of the format " + DEFAULT... | java | public static int vendorFromUri(URI uri)
throws DataSourceResourceException {
try {
return Integer.parseInt(uri.getAuthority(), 16);
} catch(NumberFormatException e) {
throw new DataSourceResourceException(
"USB device must be of the format " + DEFAULT... | [
"public",
"static",
"int",
"vendorFromUri",
"(",
"URI",
"uri",
")",
"throws",
"DataSourceResourceException",
"{",
"try",
"{",
"return",
"Integer",
".",
"parseInt",
"(",
"uri",
".",
"getAuthority",
"(",
")",
",",
"16",
")",
";",
"}",
"catch",
"(",
"NumberFo... | Return an integer vendor ID from a URI specifying a USB device.
@param uri the USB device URI
@throws DataSourceResourceException If the URI doesn't match the
format usb://vendor_id/device_id | [
"Return",
"an",
"integer",
"vendor",
"ID",
"from",
"a",
"URI",
"specifying",
"a",
"USB",
"device",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/interfaces/usb/UsbDeviceUtilities.java#L33-L42 | train |
openxc/openxc-android | library/src/main/java/com/openxc/interfaces/usb/UsbDeviceUtilities.java | UsbDeviceUtilities.productFromUri | public static int productFromUri(URI uri)
throws DataSourceResourceException {
try {
return Integer.parseInt(uri.getPath().substring(1), 16);
} catch(NumberFormatException e) {
throw new DataSourceResourceException(
"USB device must be of the format " ... | java | public static int productFromUri(URI uri)
throws DataSourceResourceException {
try {
return Integer.parseInt(uri.getPath().substring(1), 16);
} catch(NumberFormatException e) {
throw new DataSourceResourceException(
"USB device must be of the format " ... | [
"public",
"static",
"int",
"productFromUri",
"(",
"URI",
"uri",
")",
"throws",
"DataSourceResourceException",
"{",
"try",
"{",
"return",
"Integer",
".",
"parseInt",
"(",
"uri",
".",
"getPath",
"(",
")",
".",
"substring",
"(",
"1",
")",
",",
"16",
")",
";... | Return an integer product ID from a URI specifying a USB device.
@param uri the USB device URI
@throws DataSourceResourceException If the URI doesn't match the
format usb://vendor_id/device_id | [
"Return",
"an",
"integer",
"product",
"ID",
"from",
"a",
"URI",
"specifying",
"a",
"USB",
"device",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/interfaces/usb/UsbDeviceUtilities.java#L51-L64 | train |
openxc/openxc-android | library/src/main/java/com/openxc/sources/BaseVehicleDataSource.java | BaseVehicleDataSource.setCallback | @Override
public void setCallback(SourceCallback callback) {
try {
mCallbackLock.lock();
mCallback = callback;
mCallbackChanged.signal();
} finally {
mCallbackLock.unlock();
}
} | java | @Override
public void setCallback(SourceCallback callback) {
try {
mCallbackLock.lock();
mCallback = callback;
mCallbackChanged.signal();
} finally {
mCallbackLock.unlock();
}
} | [
"@",
"Override",
"public",
"void",
"setCallback",
"(",
"SourceCallback",
"callback",
")",
"{",
"try",
"{",
"mCallbackLock",
".",
"lock",
"(",
")",
";",
"mCallback",
"=",
"callback",
";",
"mCallbackChanged",
".",
"signal",
"(",
")",
";",
"}",
"finally",
"{"... | Set the current source callback to the given value.
@param callback a valid callback or null if you wish to stop the source
from sending updates. | [
"Set",
"the",
"current",
"source",
"callback",
"to",
"the",
"given",
"value",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/sources/BaseVehicleDataSource.java#L43-L52 | train |
openxc/openxc-android | library/src/main/java/com/openxc/sources/BaseVehicleDataSource.java | BaseVehicleDataSource.handleMessage | protected void handleMessage(VehicleMessage message) {
if(message != null) {
message.timestamp();
if(mCallback != null) {
mCallback.receive(message);
}
}
} | java | protected void handleMessage(VehicleMessage message) {
if(message != null) {
message.timestamp();
if(mCallback != null) {
mCallback.receive(message);
}
}
} | [
"protected",
"void",
"handleMessage",
"(",
"VehicleMessage",
"message",
")",
"{",
"if",
"(",
"message",
"!=",
"null",
")",
"{",
"message",
".",
"timestamp",
"(",
")",
";",
"if",
"(",
"mCallback",
"!=",
"null",
")",
"{",
"mCallback",
".",
"receive",
"(",
... | Pass a new message to the callback, if set.
@param message the new message object. | [
"Pass",
"a",
"new",
"message",
"to",
"the",
"callback",
"if",
"set",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/sources/BaseVehicleDataSource.java#L85-L92 | train |
openxc/openxc-android | library/src/main/java/com/openxc/interfaces/network/NetworkVehicleInterface.java | NetworkVehicleInterface.validateResource | public static boolean validateResource(String uriString) {
try {
URI uri = UriBasedVehicleInterfaceMixin.createUri(massageUri(uriString));
return UriBasedVehicleInterfaceMixin.validateResource(uri) &&
uri.getPort() < 65536;
} catch(DataSourceException e) {
... | java | public static boolean validateResource(String uriString) {
try {
URI uri = UriBasedVehicleInterfaceMixin.createUri(massageUri(uriString));
return UriBasedVehicleInterfaceMixin.validateResource(uri) &&
uri.getPort() < 65536;
} catch(DataSourceException e) {
... | [
"public",
"static",
"boolean",
"validateResource",
"(",
"String",
"uriString",
")",
"{",
"try",
"{",
"URI",
"uri",
"=",
"UriBasedVehicleInterfaceMixin",
".",
"createUri",
"(",
"massageUri",
"(",
"uriString",
")",
")",
";",
"return",
"UriBasedVehicleInterfaceMixin",
... | Return true if the address and port are valid.
@return true if the address and port are valid. | [
"Return",
"true",
"if",
"the",
"address",
"and",
"port",
"are",
"valid",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/interfaces/network/NetworkVehicleInterface.java#L97-L105 | train |
openxc/openxc-android | library/src/main/java/com/openxc/interfaces/network/NetworkVehicleInterface.java | NetworkVehicleInterface.write | protected synchronized boolean write(byte[] bytes) {
mConnectionLock.readLock().lock();
boolean success = true;
try {
if(isConnected()) {
Log.v(TAG, "Writing " + bytes.length + " to socket");
mOutStream.write(bytes);
} else {
... | java | protected synchronized boolean write(byte[] bytes) {
mConnectionLock.readLock().lock();
boolean success = true;
try {
if(isConnected()) {
Log.v(TAG, "Writing " + bytes.length + " to socket");
mOutStream.write(bytes);
} else {
... | [
"protected",
"synchronized",
"boolean",
"write",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"mConnectionLock",
".",
"readLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"boolean",
"success",
"=",
"true",
";",
"try",
"{",
"if",
"(",
"isConnected",
"(",
")",... | Writes given data to the socket.
@param bytes data to write to the socket.
@return true if the data was written successfully. | [
"Writes",
"given",
"data",
"to",
"the",
"socket",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/interfaces/network/NetworkVehicleInterface.java#L221-L239 | train |
openxc/openxc-android | library/src/main/java/com/openxc/interfaces/network/NetworkVehicleInterface.java | NetworkVehicleInterface.massageUri | private static String massageUri(String uriString) {
if(!uriString.startsWith(SCHEMA_SPECIFIC_PREFIX)) {
uriString = SCHEMA_SPECIFIC_PREFIX + uriString;
}
return uriString;
} | java | private static String massageUri(String uriString) {
if(!uriString.startsWith(SCHEMA_SPECIFIC_PREFIX)) {
uriString = SCHEMA_SPECIFIC_PREFIX + uriString;
}
return uriString;
} | [
"private",
"static",
"String",
"massageUri",
"(",
"String",
"uriString",
")",
"{",
"if",
"(",
"!",
"uriString",
".",
"startsWith",
"(",
"SCHEMA_SPECIFIC_PREFIX",
")",
")",
"{",
"uriString",
"=",
"SCHEMA_SPECIFIC_PREFIX",
"+",
"uriString",
";",
"}",
"return",
"... | Add the prefix required to parse with URI if it's not already there. | [
"Add",
"the",
"prefix",
"required",
"to",
"parse",
"with",
"URI",
"if",
"it",
"s",
"not",
"already",
"there",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/interfaces/network/NetworkVehicleInterface.java#L267-L272 | train |
openxc/openxc-android | library/src/main/java/com/openxc/sources/SourceLogger.java | SourceLogger.logTransferStats | public static void logTransferStats(final String tag,
final long startTime, final double bytesReceived) {
double kilobytesTransferred = bytesReceived / 1024.0;
long elapsedTime = TimeUnit.SECONDS.convert(
System.nanoTime() - startTime, TimeUnit.NANOSECONDS);
Log.i(tag, "T... | java | public static void logTransferStats(final String tag,
final long startTime, final double bytesReceived) {
double kilobytesTransferred = bytesReceived / 1024.0;
long elapsedTime = TimeUnit.SECONDS.convert(
System.nanoTime() - startTime, TimeUnit.NANOSECONDS);
Log.i(tag, "T... | [
"public",
"static",
"void",
"logTransferStats",
"(",
"final",
"String",
"tag",
",",
"final",
"long",
"startTime",
",",
"final",
"double",
"bytesReceived",
")",
"{",
"double",
"kilobytesTransferred",
"=",
"bytesReceived",
"/",
"1024.0",
";",
"long",
"elapsedTime",
... | Log data transfer statistics to the Android log.
@param tag the Android log tag to use.
@param startTime the starting time for the stats calculation in
nanoseconds.
@param bytesReceived the number of bytes received over the given period
of time | [
"Log",
"data",
"transfer",
"statistics",
"to",
"the",
"Android",
"log",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/sources/SourceLogger.java#L17-L25 | train |
openxc/openxc-android | library/src/main/java/com/openxc/messages/formatters/JsonFormatter.java | JsonFormatter.deserialize | public static VehicleMessage deserialize(String data)
throws UnrecognizedMessageTypeException {
JsonObject root;
try {
JsonParser parser = new JsonParser();
root = parser.parse(data).getAsJsonObject();
} catch(JsonSyntaxException | IllegalStateException e) {
... | java | public static VehicleMessage deserialize(String data)
throws UnrecognizedMessageTypeException {
JsonObject root;
try {
JsonParser parser = new JsonParser();
root = parser.parse(data).getAsJsonObject();
} catch(JsonSyntaxException | IllegalStateException e) {
... | [
"public",
"static",
"VehicleMessage",
"deserialize",
"(",
"String",
"data",
")",
"throws",
"UnrecognizedMessageTypeException",
"{",
"JsonObject",
"root",
";",
"try",
"{",
"JsonParser",
"parser",
"=",
"new",
"JsonParser",
"(",
")",
";",
"root",
"=",
"parser",
"."... | Deserialize a single vehicle messages from the string.
@param data a String containing the JSON serialized vehicle message.
@throws UnrecognizedMessageTypeException if no message could be
deserialized.
@return the deserialized VehicleMessage. | [
"Deserialize",
"a",
"single",
"vehicle",
"messages",
"from",
"the",
"string",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/messages/formatters/JsonFormatter.java#L83-L132 | train |
openxc/openxc-android | library/src/main/java/com/openxc/messages/streamers/JsonStreamer.java | JsonStreamer.readToDelimiter | private String readToDelimiter() {
String line = null;
while(line == null || line.isEmpty()) {
int delimiterIndex = mBuffer.indexOf(DELIMITER);
if(delimiterIndex != -1) {
line = mBuffer.substring(0, delimiterIndex);
mBuffer.delete(0, delimiterIndex... | java | private String readToDelimiter() {
String line = null;
while(line == null || line.isEmpty()) {
int delimiterIndex = mBuffer.indexOf(DELIMITER);
if(delimiterIndex != -1) {
line = mBuffer.substring(0, delimiterIndex);
mBuffer.delete(0, delimiterIndex... | [
"private",
"String",
"readToDelimiter",
"(",
")",
"{",
"String",
"line",
"=",
"null",
";",
"while",
"(",
"line",
"==",
"null",
"||",
"line",
".",
"isEmpty",
"(",
")",
")",
"{",
"int",
"delimiterIndex",
"=",
"mBuffer",
".",
"indexOf",
"(",
"DELIMITER",
... | Parse the current byte buffer to find the next potential message.
The first potential serialized message data in the buffer is removed and
returned. Any delimiters at the start of the buffer will be cleared.
@return A potential serialized JSON message or null if none found. | [
"Parse",
"the",
"current",
"byte",
"buffer",
"to",
"find",
"the",
"next",
"potential",
"message",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/messages/streamers/JsonStreamer.java#L78-L91 | train |
openxc/openxc-android | library/src/main/java/com/openxc/sources/trace/TraceVehicleDataSource.java | TraceVehicleDataSource.run | @Override
public void run() {
while(mRunning) {
waitForCallback();
Log.d(TAG, "Starting trace playback from beginning of " + mFilename);
BufferedReader reader = null;
if (checkPermission()) {
try {
reader = openFile(mFilena... | java | @Override
public void run() {
while(mRunning) {
waitForCallback();
Log.d(TAG, "Starting trace playback from beginning of " + mFilename);
BufferedReader reader = null;
if (checkPermission()) {
try {
reader = openFile(mFilena... | [
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"while",
"(",
"mRunning",
")",
"{",
"waitForCallback",
"(",
")",
";",
"Log",
".",
"d",
"(",
"TAG",
",",
"\"Starting trace playback from beginning of \"",
"+",
"mFilename",
")",
";",
"BufferedReader",
"... | While running, continuously read from the trace file and send messages
to the callback.
If the callback is not set, this function will exit immediately and the
thread will die a quick death. | [
"While",
"running",
"continuously",
"read",
"from",
"the",
"trace",
"file",
"and",
"send",
"messages",
"to",
"the",
"callback",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/sources/trace/TraceVehicleDataSource.java#L147-L233 | train |
openxc/openxc-android | library/src/main/java/com/openxc/sources/trace/TraceVehicleDataSource.java | TraceVehicleDataSource.waitForNextRecord | private void waitForNextRecord(long startingTime, long timestamp) {
if(mFirstTimestamp == 0) {
mFirstTimestamp = timestamp;
Log.d(TAG, "Storing " + timestamp + " as the first " +
"timestamp of the trace file");
}
long targetTime = startingTime + (times... | java | private void waitForNextRecord(long startingTime, long timestamp) {
if(mFirstTimestamp == 0) {
mFirstTimestamp = timestamp;
Log.d(TAG, "Storing " + timestamp + " as the first " +
"timestamp of the trace file");
}
long targetTime = startingTime + (times... | [
"private",
"void",
"waitForNextRecord",
"(",
"long",
"startingTime",
",",
"long",
"timestamp",
")",
"{",
"if",
"(",
"mFirstTimestamp",
"==",
"0",
")",
"{",
"mFirstTimestamp",
"=",
"timestamp",
";",
"Log",
".",
"d",
"(",
"TAG",
",",
"\"Storing \"",
"+",
"ti... | Using the startingTime as the relative starting point, sleep this thread
until the next timestamp would occur.
@param startingTime the relative starting time in milliseconds
@param timestamp the timestamp to wait for in milliseconds since the
epoch | [
"Using",
"the",
"startingTime",
"as",
"the",
"relative",
"starting",
"point",
"sleep",
"this",
"thread",
"until",
"the",
"next",
"timestamp",
"would",
"occur",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/sources/trace/TraceVehicleDataSource.java#L297-L308 | train |
openxc/openxc-android | library/src/main/java/com/openxc/interfaces/usb/UsbVehicleInterface.java | UsbVehicleInterface.stop | @Override
public void stop() {
super.stop();
try {
getContext().unregisterReceiver(mBroadcastReceiver);
} catch(IllegalArgumentException e) {
Log.d(TAG, "Unable to unregister receiver when stopping, probably not registered");
}
} | java | @Override
public void stop() {
super.stop();
try {
getContext().unregisterReceiver(mBroadcastReceiver);
} catch(IllegalArgumentException e) {
Log.d(TAG, "Unable to unregister receiver when stopping, probably not registered");
}
} | [
"@",
"Override",
"public",
"void",
"stop",
"(",
")",
"{",
"super",
".",
"stop",
"(",
")",
";",
"try",
"{",
"getContext",
"(",
")",
".",
"unregisterReceiver",
"(",
"mBroadcastReceiver",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"e",
")",
"{... | Unregister USB device intent broadcast receivers and stop waiting for a
connection.
This should be called before the object is given up to the garbage
collector to avoid leaking a receiver in the Android framework. | [
"Unregister",
"USB",
"device",
"intent",
"broadcast",
"receivers",
"and",
"stop",
"waiting",
"for",
"a",
"connection",
"."
] | 799adbdcd107a72fe89737bbf19c039dc2881665 | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/interfaces/usb/UsbVehicleInterface.java#L160-L168 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.