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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateActivation | protected void updateActivation(Activation value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | java | protected void updateActivation(Activation value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | [
"protected",
"void",
"updateActivation",
"(",
"Activation",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
"(... | Method updateActivation.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateActivation",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1292-L1306 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateActivationFile | protected void updateActivationFile(ActivationFile value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth(... | java | protected void updateActivationFile(ActivationFile value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth(... | [
"protected",
"void",
"updateActivationFile",
"(",
"ActivationFile",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElemen... | Method updateActivationFile.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateActivationFile",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1316-L1326 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateActivationOS | protected void updateActivationOS(ActivationOS value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + ... | java | protected void updateActivationOS(ActivationOS value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + ... | [
"protected",
"void",
"updateActivationOS",
"(",
"ActivationOS",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
... | Method updateActivationOS.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateActivationOS",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1336-L1348 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateActivationProperty | protected void updateActivationProperty(ActivationProperty value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.g... | java | protected void updateActivationProperty(ActivationProperty value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.g... | [
"protected",
"void",
"updateActivationProperty",
"(",
"ActivationProperty",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"upda... | Method updateActivationProperty.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateActivationProperty",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1358-L1368 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateBuild | protected void updateBuild(Build value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
f... | java | protected void updateBuild(Build value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
f... | [
"protected",
"void",
"updateBuild",
"(",
"Build",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
"(",
"coun... | Method updateBuild.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateBuild",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1379-L1402 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateBuildBase | protected void updateBuildBase(BuildBase value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | java | protected void updateBuildBase(BuildBase value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | [
"protected",
"void",
"updateBuildBase",
"(",
"BuildBase",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
"(",... | Method updateBuildBase.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateBuildBase",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1412-L1428 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateCiManagement | protected void updateCiManagement(CiManagement value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + ... | java | protected void updateCiManagement(CiManagement value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + ... | [
"protected",
"void",
"updateCiManagement",
"(",
"CiManagement",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
... | Method updateCiManagement.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateCiManagement",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1438-L1449 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateConfigurationContainer | protected void updateConfigurationContainer(ConfigurationContainer value, String xmlTag, Counter counter,
Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = n... | java | protected void updateConfigurationContainer(ConfigurationContainer value, String xmlTag, Counter counter,
Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = n... | [
"protected",
"void",
"updateConfigurationContainer",
"(",
"ConfigurationContainer",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",... | Method updateConfigurationContainer.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateConfigurationContainer",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1459-L1470 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateContributor | protected void updateContributor(Contributor value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
findAndReplaceSimpleElement(in... | java | protected void updateContributor(Contributor value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
findAndReplaceSimpleElement(in... | [
"protected",
"void",
"updateContributor",
"(",
"Contributor",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counte... | Method updateContributor.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateContributor",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1481-L1493 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateDependency | protected void updateDependency(Dependency value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), null);
findAndReplaceSimpleElemen... | java | protected void updateDependency(Dependency value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), null);
findAndReplaceSimpleElemen... | [
"protected",
"void",
"updateDependency",
"(",
"Dependency",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counter"... | Method updateDependency.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateDependency",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1503-L1517 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateDependencyManagement | protected void updateDependencyManagement(DependencyManagement value, String xmlTag, Counter counter,
Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new C... | java | protected void updateDependencyManagement(DependencyManagement value, String xmlTag, Counter counter,
Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new C... | [
"protected",
"void",
"updateDependencyManagement",
"(",
"DependencyManagement",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"... | Method updateDependencyManagement.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateDependencyManagement",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1527-L1537 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateDeploymentRepository | protected void updateDeploymentRepository(DeploymentRepository value, String xmlTag, Counter counter,
Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new C... | java | protected void updateDeploymentRepository(DeploymentRepository value, String xmlTag, Counter counter,
Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new C... | [
"protected",
"void",
"updateDeploymentRepository",
"(",
"DeploymentRepository",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"... | Method updateDeploymentRepository.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateDeploymentRepository",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1548-L1563 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateDistributionManagement | protected void updateDistributionManagement(DistributionManagement value, String xmlTag, Counter counter,
Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = n... | java | protected void updateDistributionManagement(DistributionManagement value, String xmlTag, Counter counter,
Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = n... | [
"protected",
"void",
"updateDistributionManagement",
"(",
"DistributionManagement",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",... | Method updateDistributionManagement.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateDistributionManagement",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1597-L1612 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateElement | protected Element updateElement(Counter counter, Element parent, String name, boolean shouldExist)
{
Element element = parent.getChild(name, parent.getNamespace());
if ((element != null) && shouldExist)
{
counter.increaseCount();
}
if ((element == null) && shouldExist)
{
... | java | protected Element updateElement(Counter counter, Element parent, String name, boolean shouldExist)
{
Element element = parent.getChild(name, parent.getNamespace());
if ((element != null) && shouldExist)
{
counter.increaseCount();
}
if ((element == null) && shouldExist)
{
... | [
"protected",
"Element",
"updateElement",
"(",
"Counter",
"counter",
",",
"Element",
"parent",
",",
"String",
"name",
",",
"boolean",
"shouldExist",
")",
"{",
"Element",
"element",
"=",
"parent",
".",
"getChild",
"(",
"name",
",",
"parent",
".",
"getNamespace",... | Method updateElement.
@param counter
@param shouldExist
@param name
@param parent | [
"Method",
"updateElement",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1623-L1654 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateExclusion | protected void updateExclusion(Exclusion value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "artifactId", value.getArtifactId(), null);
findAndReplaceSimpleEl... | java | protected void updateExclusion(Exclusion value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "artifactId", value.getArtifactId(), null);
findAndReplaceSimpleEl... | [
"protected",
"void",
"updateExclusion",
"(",
"Exclusion",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counter",
... | Method updateExclusion.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateExclusion",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1664-L1670 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateExtension | protected void updateExtension(Extension value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), null);
findAndReplaceSimpleElement(... | java | protected void updateExtension(Extension value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), null);
findAndReplaceSimpleElement(... | [
"protected",
"void",
"updateExtension",
"(",
"Extension",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counter",
... | Method updateExtension.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateExtension",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1680-L1687 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateFileSet | protected void updateFileSet(FileSet value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | java | protected void updateFileSet(FileSet value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | [
"protected",
"void",
"updateFileSet",
"(",
"FileSet",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
"(",
"... | Method updateFileSet.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateFileSet",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1697-L1708 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateIssueManagement | protected void updateIssueManagement(IssueManagement value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDept... | java | protected void updateIssueManagement(IssueManagement value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDept... | [
"protected",
"void",
"updateIssueManagement",
"(",
"IssueManagement",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElem... | Method updateIssueManagement.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateIssueManagement",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1718-L1728 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateLicense | protected void updateLicense(License value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
findAndReplaceSimpleElement(innerCount... | java | protected void updateLicense(License value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
findAndReplaceSimpleElement(innerCount... | [
"protected",
"void",
"updateLicense",
"(",
"License",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counter",
".... | Method updateLicense.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateLicense",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1739-L1747 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateMailingList | protected void updateMailingList(MailingList value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
findAndReplaceSimpleElement(in... | java | protected void updateMailingList(MailingList value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
findAndReplaceSimpleElement(in... | [
"protected",
"void",
"updateMailingList",
"(",
"MailingList",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counte... | Method updateMailingList.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateMailingList",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1757-L1767 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateModelBase | protected void updateModelBase(ModelBase value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | java | protected void updateModelBase(ModelBase value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | [
"protected",
"void",
"updateModelBase",
"(",
"ModelBase",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
"(",... | Method updateModelBase.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateModelBase",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1821-L1839 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateNotifier | protected void updateNotifier(Notifier value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "type", value.getType(), "mail");
findAndReplaceSimpleElement(innerC... | java | protected void updateNotifier(Notifier value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "type", value.getType(), "mail");
findAndReplaceSimpleElement(innerC... | [
"protected",
"void",
"updateNotifier",
"(",
"Notifier",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counter",
... | Method updateNotifier.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateNotifier",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1849-L1864 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateOrganization | protected void updateOrganization(Organization value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + ... | java | protected void updateOrganization(Organization value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + ... | [
"protected",
"void",
"updateOrganization",
"(",
"Organization",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
... | Method updateOrganization.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateOrganization",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1874-L1884 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateParent | protected void updateParent(Parent value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | java | protected void updateParent(Parent value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | [
"protected",
"void",
"updateParent",
"(",
"Parent",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
"(",
"co... | Method updateParent.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateParent",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1894-L1906 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updatePatternSet | protected void updatePatternSet(PatternSet value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | java | protected void updatePatternSet(PatternSet value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | [
"protected",
"void",
"updatePatternSet",
"(",
"PatternSet",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
"(... | Method updatePatternSet.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updatePatternSet",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1916-L1926 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updatePlugin | protected void updatePlugin(Plugin value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), "org.apache.maven.plugins");
findAndRepla... | java | protected void updatePlugin(Plugin value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), "org.apache.maven.plugins");
findAndRepla... | [
"protected",
"void",
"updatePlugin",
"(",
"Plugin",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counter",
".",... | Method updatePlugin.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updatePlugin",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1936-L1950 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updatePluginConfiguration | protected void updatePluginConfiguration(PluginConfiguration value, String xmlTag, Counter counter,
Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Cou... | java | protected void updatePluginConfiguration(PluginConfiguration value, String xmlTag, Counter counter,
Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Cou... | [
"protected",
"void",
"updatePluginConfiguration",
"(",
"PluginConfiguration",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"up... | Method updatePluginConfiguration.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updatePluginConfiguration",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1960-L1971 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updatePluginContainer | protected void updatePluginContainer(PluginContainer value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDept... | java | protected void updatePluginContainer(PluginContainer value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDept... | [
"protected",
"void",
"updatePluginContainer",
"(",
"PluginContainer",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElem... | Method updatePluginContainer.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updatePluginContainer",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L1982-L1991 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updatePluginExecution | protected void updatePluginExecution(PluginExecution value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), "default");
findAndReplaceSimpleE... | java | protected void updatePluginExecution(PluginExecution value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), "default");
findAndReplaceSimpleE... | [
"protected",
"void",
"updatePluginExecution",
"(",
"PluginExecution",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
... | Method updatePluginExecution.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updatePluginExecution",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2002-L2011 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updatePrerequisites | protected void updatePrerequisites(Prerequisites value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() ... | java | protected void updatePrerequisites(Prerequisites value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() ... | [
"protected",
"void",
"updatePrerequisites",
"(",
"Prerequisites",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement"... | Method updatePrerequisites.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updatePrerequisites",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2042-L2051 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateProfile | protected void updateProfile(Profile value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null);
updateActivation(value.getActivation(), "a... | java | protected void updateProfile(Profile value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null);
updateActivation(value.getActivation(), "a... | [
"protected",
"void",
"updateProfile",
"(",
"Profile",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counter",
".... | Method updateProfile.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateProfile",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2061-L2077 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateRelocation | protected void updateRelocation(Relocation value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | java | protected void updateRelocation(Relocation value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | [
"protected",
"void",
"updateRelocation",
"(",
"Relocation",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
"(... | Method updateRelocation.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateRelocation",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2087-L2099 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateReporting | protected void updateReporting(Reporting value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | java | protected void updateReporting(Reporting value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
... | [
"protected",
"void",
"updateReporting",
"(",
"Reporting",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
"(",... | Method updateReporting.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateReporting",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2109-L2121 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateReportPlugin | protected void updateReportPlugin(ReportPlugin value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), "org.apache.maven.plugins");
... | java | protected void updateReportPlugin(ReportPlugin value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), "org.apache.maven.plugins");
... | [
"protected",
"void",
"updateReportPlugin",
"(",
"ReportPlugin",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"coun... | Method updateReportPlugin.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateReportPlugin",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2131-L2141 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateReportSet | protected void updateReportSet(ReportSet value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), "default");
findAndReplaceXpp3DOM(innerCount,... | java | protected void updateReportSet(ReportSet value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), "default");
findAndReplaceXpp3DOM(innerCount,... | [
"protected",
"void",
"updateReportSet",
"(",
"ReportSet",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counter",
... | Method updateReportSet.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateReportSet",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2151-L2159 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateRepository | protected void updateRepository(Repository value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
updateRepositoryPolicy(value.getReleases(), "releases", innerCount, root);
updateRepositoryPolicy(value.getSna... | java | protected void updateRepository(Repository value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
updateRepositoryPolicy(value.getReleases(), "releases", innerCount, root);
updateRepositoryPolicy(value.getSna... | [
"protected",
"void",
"updateRepository",
"(",
"Repository",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counter"... | Method updateRepository.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateRepository",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2169-L2179 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateRepositoryBase | protected void updateRepositoryBase(RepositoryBase value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth(... | java | protected void updateRepositoryBase(RepositoryBase value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth(... | [
"protected",
"void",
"updateRepositoryBase",
"(",
"RepositoryBase",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElemen... | Method updateRepositoryBase.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateRepositoryBase",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2189-L2201 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateRepositoryPolicy | protected void updateRepositoryPolicy(RepositoryPolicy value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDe... | java | protected void updateRepositoryPolicy(RepositoryPolicy value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDe... | [
"protected",
"void",
"updateRepositoryPolicy",
"(",
"RepositoryPolicy",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateEl... | Method updateRepositoryPolicy.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateRepositoryPolicy",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2211-L2223 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateResource | protected void updateResource(Resource value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "targetPath", value.getTargetPath(), null);
findAndReplaceSimpleElem... | java | protected void updateResource(Resource value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "targetPath", value.getTargetPath(), null);
findAndReplaceSimpleElem... | [
"protected",
"void",
"updateResource",
"(",
"Resource",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"Element",
"root",
"=",
"element",
";",
"Counter",
"innerCount",
"=",
"new",
"Counter",
"(",
"counter",
... | Method updateResource.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateResource",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2234-L2244 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateScm | protected void updateScm(Scm value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
findA... | java | protected void updateScm(Scm value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
findA... | [
"protected",
"void",
"updateScm",
"(",
"Scm",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
"(",
"counter"... | Method updateScm.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateScm",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2254-L2266 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java | MavenJDOMWriter.updateSite | protected void updateSite(Site value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
fin... | java | protected void updateSite(Site value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
fin... | [
"protected",
"void",
"updateSite",
"(",
"Site",
"value",
",",
"String",
"xmlTag",
",",
"Counter",
"counter",
",",
"Element",
"element",
")",
"{",
"boolean",
"shouldExist",
"=",
"value",
"!=",
"null",
";",
"Element",
"root",
"=",
"updateElement",
"(",
"counte... | Method updateSite.
@param value
@param element
@param counter
@param xmlTag | [
"Method",
"updateSite",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java#L2276-L2287 | train |
forge/core | ui/api/src/main/java/org/jboss/forge/addon/ui/util/InputComponents.java | InputComponents.validateRequired | public static String validateRequired(final InputComponent<?, ?> input)
{
String requiredMessage = null;
if (input.isEnabled() && input.isRequired() && !InputComponents.hasValue(input))
{
requiredMessage = input.getRequiredMessage();
if (Strings.isNullOrEmpty(requiredMessage))
... | java | public static String validateRequired(final InputComponent<?, ?> input)
{
String requiredMessage = null;
if (input.isEnabled() && input.isRequired() && !InputComponents.hasValue(input))
{
requiredMessage = input.getRequiredMessage();
if (Strings.isNullOrEmpty(requiredMessage))
... | [
"public",
"static",
"String",
"validateRequired",
"(",
"final",
"InputComponent",
"<",
"?",
",",
"?",
">",
"input",
")",
"{",
"String",
"requiredMessage",
"=",
"null",
";",
"if",
"(",
"input",
".",
"isEnabled",
"(",
")",
"&&",
"input",
".",
"isRequired",
... | Validate if an required and enabled input has a value. If not, return the error message.
@param input
@return | [
"Validate",
"if",
"an",
"required",
"and",
"enabled",
"input",
"has",
"a",
"value",
".",
"If",
"not",
"return",
"the",
"error",
"message",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/api/src/main/java/org/jboss/forge/addon/ui/util/InputComponents.java#L325-L343 | train |
forge/core | ui/api/src/main/java/org/jboss/forge/addon/ui/util/InputComponents.java | InputComponents.getLabelFor | public static String getLabelFor(InputComponent<?, ?> input, boolean addColon)
{
String label = input.getLabel();
// If no label was provided, use name
if (label == null)
{
label = input.getName();
}
// if a colon is required, add it
if (addColon && !label.endsWith(... | java | public static String getLabelFor(InputComponent<?, ?> input, boolean addColon)
{
String label = input.getLabel();
// If no label was provided, use name
if (label == null)
{
label = input.getName();
}
// if a colon is required, add it
if (addColon && !label.endsWith(... | [
"public",
"static",
"String",
"getLabelFor",
"(",
"InputComponent",
"<",
"?",
",",
"?",
">",
"input",
",",
"boolean",
"addColon",
")",
"{",
"String",
"label",
"=",
"input",
".",
"getLabel",
"(",
")",
";",
"// If no label was provided, use name",
"if",
"(",
"... | Returns the label for this component
@param input the input component
@param addColon should a colon be added in the end of the label ?
@return the label with a colon in the end if addColon is true | [
"Returns",
"the",
"label",
"for",
"this",
"component"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/api/src/main/java/org/jboss/forge/addon/ui/util/InputComponents.java#L373-L387 | train |
forge/core | ui/impl/src/main/java/org/jboss/forge/addon/ui/impl/controller/WizardCommandControllerImpl.java | WizardCommandControllerImpl.refreshFlow | private synchronized void refreshFlow()
{
try
{
initialize();
}
catch (Exception e)
{
throw new IllegalStateException("Error while initializing wizard", e);
}
int currentFlowPointer = this.flowPointer;
try
{
this.flowPointer = 0;
... | java | private synchronized void refreshFlow()
{
try
{
initialize();
}
catch (Exception e)
{
throw new IllegalStateException("Error while initializing wizard", e);
}
int currentFlowPointer = this.flowPointer;
try
{
this.flowPointer = 0;
... | [
"private",
"synchronized",
"void",
"refreshFlow",
"(",
")",
"{",
"try",
"{",
"initialize",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Error while initializing wizard\"",
",",
"e",
")",
";",
... | Refreshes the current flow so it's possible to eagerly fetch all the steps | [
"Refreshes",
"the",
"current",
"flow",
"so",
"it",
"s",
"possible",
"to",
"eagerly",
"fetch",
"all",
"the",
"steps"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/impl/src/main/java/org/jboss/forge/addon/ui/impl/controller/WizardCommandControllerImpl.java#L92-L123 | train |
forge/core | ui/impl/src/main/java/org/jboss/forge/addon/ui/impl/controller/WizardCommandControllerImpl.java | WizardCommandControllerImpl.cleanSubsequentStalePages | private synchronized void cleanSubsequentStalePages()
{
// FIXME: Workaround until FORGE-1704 is fixed
if (flowPointer == 0)
{
flow.subList(1, flow.size()).clear();
subflow.clear();
}
else
{
// Remove subsequent pages and push the subflows back to the st... | java | private synchronized void cleanSubsequentStalePages()
{
// FIXME: Workaround until FORGE-1704 is fixed
if (flowPointer == 0)
{
flow.subList(1, flow.size()).clear();
subflow.clear();
}
else
{
// Remove subsequent pages and push the subflows back to the st... | [
"private",
"synchronized",
"void",
"cleanSubsequentStalePages",
"(",
")",
"{",
"// FIXME: Workaround until FORGE-1704 is fixed",
"if",
"(",
"flowPointer",
"==",
"0",
")",
"{",
"flow",
".",
"subList",
"(",
"1",
",",
"flow",
".",
"size",
"(",
")",
")",
".",
"cle... | Remove stale pages in case of navigational changes | [
"Remove",
"stale",
"pages",
"in",
"case",
"of",
"navigational",
"changes"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/impl/src/main/java/org/jboss/forge/addon/ui/impl/controller/WizardCommandControllerImpl.java#L417-L440 | train |
forge/core | projects/impl/src/main/java/org/jboss/forge/addon/projects/impl/ProjectFactoryImpl.java | ProjectFactoryImpl.allDirectoriesOnPath | private List<Resource<?>> allDirectoriesOnPath(Resource<?> startingDir)
{
List<Resource<?>> result = new ArrayList<>();
while (startingDir != null)
{
result.add(startingDir);
startingDir = startingDir.getParent();
}
return result;
} | java | private List<Resource<?>> allDirectoriesOnPath(Resource<?> startingDir)
{
List<Resource<?>> result = new ArrayList<>();
while (startingDir != null)
{
result.add(startingDir);
startingDir = startingDir.getParent();
}
return result;
} | [
"private",
"List",
"<",
"Resource",
"<",
"?",
">",
">",
"allDirectoriesOnPath",
"(",
"Resource",
"<",
"?",
">",
"startingDir",
")",
"{",
"List",
"<",
"Resource",
"<",
"?",
">",
">",
"result",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"while",
"("... | Returns all directories on path starting from given directory up to the root. | [
"Returns",
"all",
"directories",
"on",
"path",
"starting",
"from",
"given",
"directory",
"up",
"to",
"the",
"root",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/projects/impl/src/main/java/org/jboss/forge/addon/projects/impl/ProjectFactoryImpl.java#L172-L183 | train |
forge/core | projects/impl/src/main/java/org/jboss/forge/addon/projects/impl/ProjectFactoryImpl.java | ProjectFactoryImpl.findProjectInDirectory | private Project findProjectInDirectory(Resource<?> target, ProjectProvider projectProvider,
Predicate<Project> filter)
{
Project result = null;
Imported<ProjectCache> caches = getCaches();
if (projectProvider.containsProject(target))
{
boolean cached = false;
for... | java | private Project findProjectInDirectory(Resource<?> target, ProjectProvider projectProvider,
Predicate<Project> filter)
{
Project result = null;
Imported<ProjectCache> caches = getCaches();
if (projectProvider.containsProject(target))
{
boolean cached = false;
for... | [
"private",
"Project",
"findProjectInDirectory",
"(",
"Resource",
"<",
"?",
">",
"target",
",",
"ProjectProvider",
"projectProvider",
",",
"Predicate",
"<",
"Project",
">",
"filter",
")",
"{",
"Project",
"result",
"=",
"null",
";",
"Imported",
"<",
"ProjectCache"... | Returns project residing in given directory, if no such is found then null is returned. | [
"Returns",
"project",
"residing",
"in",
"given",
"directory",
"if",
"no",
"such",
"is",
"found",
"then",
"null",
"is",
"returned",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/projects/impl/src/main/java/org/jboss/forge/addon/projects/impl/ProjectFactoryImpl.java#L188-L225 | train |
forge/core | ui/api/src/main/java/org/jboss/forge/addon/ui/result/navigation/NavigationResultBuilder.java | NavigationResultBuilder.create | public static NavigationResultBuilder create(NavigationResult result)
{
NavigationResultBuilder builder = new NavigationResultBuilder();
if (result != null && result.getNext() != null)
{
builder.entries.addAll(Arrays.asList(result.getNext()));
}
return builder;
} | java | public static NavigationResultBuilder create(NavigationResult result)
{
NavigationResultBuilder builder = new NavigationResultBuilder();
if (result != null && result.getNext() != null)
{
builder.entries.addAll(Arrays.asList(result.getNext()));
}
return builder;
} | [
"public",
"static",
"NavigationResultBuilder",
"create",
"(",
"NavigationResult",
"result",
")",
"{",
"NavigationResultBuilder",
"builder",
"=",
"new",
"NavigationResultBuilder",
"(",
")",
";",
"if",
"(",
"result",
"!=",
"null",
"&&",
"result",
".",
"getNext",
"("... | Create a new instance of a NavigationResultBuilder using the provided NavigationResult instance as a base.
@param result A NavigationResult whose entries are used as the basis to eventually construct a new
NavigationResult through this NavigationResultBuilder.
@return A NavigationResultBuilder instance | [
"Create",
"a",
"new",
"instance",
"of",
"a",
"NavigationResultBuilder",
"using",
"the",
"provided",
"NavigationResult",
"instance",
"as",
"a",
"base",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/api/src/main/java/org/jboss/forge/addon/ui/result/navigation/NavigationResultBuilder.java#L50-L58 | train |
forge/core | ui/api/src/main/java/org/jboss/forge/addon/ui/result/navigation/NavigationResultBuilder.java | NavigationResultBuilder.add | public NavigationResultBuilder add(NavigationResult result)
{
if (result != null && result.getNext() != null)
{
entries.addAll(Arrays.asList(result.getNext()));
}
return this;
} | java | public NavigationResultBuilder add(NavigationResult result)
{
if (result != null && result.getNext() != null)
{
entries.addAll(Arrays.asList(result.getNext()));
}
return this;
} | [
"public",
"NavigationResultBuilder",
"add",
"(",
"NavigationResult",
"result",
")",
"{",
"if",
"(",
"result",
"!=",
"null",
"&&",
"result",
".",
"getNext",
"(",
")",
"!=",
"null",
")",
"{",
"entries",
".",
"addAll",
"(",
"Arrays",
".",
"asList",
"(",
"re... | Add a UICommand instance to create a single navigation entry.
@param result The NavigationResult to add
@return This NavigationResultBuilder instance | [
"Add",
"a",
"UICommand",
"instance",
"to",
"create",
"a",
"single",
"navigation",
"entry",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/api/src/main/java/org/jboss/forge/addon/ui/result/navigation/NavigationResultBuilder.java#L90-L97 | train |
forge/core | ui/api/src/main/java/org/jboss/forge/addon/ui/result/navigation/NavigationResultBuilder.java | NavigationResultBuilder.add | public NavigationResultBuilder add(UICommandMetadata metadata, Iterable<Class<? extends UICommand>> types)
{
List<NavigationResultEntry> internalEntries = new ArrayList<>();
for (Class<? extends UICommand> type : types)
{
if (UIWizard.class.isAssignableFrom(type))
{
th... | java | public NavigationResultBuilder add(UICommandMetadata metadata, Iterable<Class<? extends UICommand>> types)
{
List<NavigationResultEntry> internalEntries = new ArrayList<>();
for (Class<? extends UICommand> type : types)
{
if (UIWizard.class.isAssignableFrom(type))
{
th... | [
"public",
"NavigationResultBuilder",
"add",
"(",
"UICommandMetadata",
"metadata",
",",
"Iterable",
"<",
"Class",
"<",
"?",
"extends",
"UICommand",
">",
">",
"types",
")",
"{",
"List",
"<",
"NavigationResultEntry",
">",
"internalEntries",
"=",
"new",
"ArrayList",
... | Add multiple UICommand types to create a single navigation entry. Every invocation of this method creates a
separate navigation entry. UIWizard types must not be provided as arguments since wizards and wizard steps cannot
be combined with other UICommand types in the same navigation entry.
Use the other add(...) metho... | [
"Add",
"multiple",
"UICommand",
"types",
"to",
"create",
"a",
"single",
"navigation",
"entry",
".",
"Every",
"invocation",
"of",
"this",
"method",
"creates",
"a",
"separate",
"navigation",
"entry",
".",
"UIWizard",
"types",
"must",
"not",
"be",
"provided",
"as... | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/api/src/main/java/org/jboss/forge/addon/ui/result/navigation/NavigationResultBuilder.java#L110-L127 | train |
forge/core | resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourcePathResolver.java | ResourcePathResolver.search | public List<Resource<?>> search()
{
return match(path.split(Pattern.quote(File.separator)), 0, res, new LinkedList<Resource<?>>());
} | java | public List<Resource<?>> search()
{
return match(path.split(Pattern.quote(File.separator)), 0, res, new LinkedList<Resource<?>>());
} | [
"public",
"List",
"<",
"Resource",
"<",
"?",
">",
">",
"search",
"(",
")",
"{",
"return",
"match",
"(",
"path",
".",
"split",
"(",
"Pattern",
".",
"quote",
"(",
"File",
".",
"separator",
")",
")",
",",
"0",
",",
"res",
",",
"new",
"LinkedList",
"... | Perform a search, by doing a breadth-first traversal of the resource tree for resources that match the path
string.
@return A list of resources that match the path string. Empty if there are no matches. | [
"Perform",
"a",
"search",
"by",
"doing",
"a",
"breadth",
"-",
"first",
"traversal",
"of",
"the",
"resource",
"tree",
"for",
"resources",
"that",
"match",
"the",
"path",
"string",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourcePathResolver.java#L254-L257 | train |
forge/core | resources/impl/src/main/java/org/jboss/forge/addon/resource/DirectoryResourceImpl.java | DirectoryResourceImpl.getChild | @Override
public Resource<?> getChild(final String name)
{
return getResourceFactory().create(new File(getUnderlyingResourceObject().getAbsolutePath(), name));
} | java | @Override
public Resource<?> getChild(final String name)
{
return getResourceFactory().create(new File(getUnderlyingResourceObject().getAbsolutePath(), name));
} | [
"@",
"Override",
"public",
"Resource",
"<",
"?",
">",
"getChild",
"(",
"final",
"String",
"name",
")",
"{",
"return",
"getResourceFactory",
"(",
")",
".",
"create",
"(",
"new",
"File",
"(",
"getUnderlyingResourceObject",
"(",
")",
".",
"getAbsolutePath",
"("... | Obtain a reference to the child resource. | [
"Obtain",
"a",
"reference",
"to",
"the",
"child",
"resource",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/resources/impl/src/main/java/org/jboss/forge/addon/resource/DirectoryResourceImpl.java#L64-L68 | train |
forge/core | javaee/impl/src/main/java/org/jboss/forge/addon/javaee/ejb/EJBOperations.java | EJBOperations.isEJB | public boolean isEJB(JavaType<?> javaType)
{
return javaType.hasAnnotation(Stateless.class) ||
javaType.hasAnnotation(Stateful.class) ||
javaType.hasAnnotation(Singleton.class) ||
javaType.hasAnnotation(MessageDriven.class);
} | java | public boolean isEJB(JavaType<?> javaType)
{
return javaType.hasAnnotation(Stateless.class) ||
javaType.hasAnnotation(Stateful.class) ||
javaType.hasAnnotation(Singleton.class) ||
javaType.hasAnnotation(MessageDriven.class);
} | [
"public",
"boolean",
"isEJB",
"(",
"JavaType",
"<",
"?",
">",
"javaType",
")",
"{",
"return",
"javaType",
".",
"hasAnnotation",
"(",
"Stateless",
".",
"class",
")",
"||",
"javaType",
".",
"hasAnnotation",
"(",
"Stateful",
".",
"class",
")",
"||",
"javaType... | Given a JavaType, this method checks if it's an EJB or not
@param javaType given type
@return true if the type is an EJB | [
"Given",
"a",
"JavaType",
"this",
"method",
"checks",
"if",
"it",
"s",
"an",
"EJB",
"or",
"not"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/javaee/impl/src/main/java/org/jboss/forge/addon/javaee/ejb/EJBOperations.java#L162-L169 | train |
forge/core | shell/impl/src/main/java/org/jboss/forge/addon/shell/ShellImpl.java | ShellImpl.createPrompt | private static Prompt createPrompt(Resource<?> currentResource)
{
// [ currentdir]$
if (OperatingSystemUtils.isWindows())
{
List<TerminalCharacter> prompt = new LinkedList<>();
prompt.add(new TerminalCharacter('['));
for (char c : currentResource.getName().toCharArray())
... | java | private static Prompt createPrompt(Resource<?> currentResource)
{
// [ currentdir]$
if (OperatingSystemUtils.isWindows())
{
List<TerminalCharacter> prompt = new LinkedList<>();
prompt.add(new TerminalCharacter('['));
for (char c : currentResource.getName().toCharArray())
... | [
"private",
"static",
"Prompt",
"createPrompt",
"(",
"Resource",
"<",
"?",
">",
"currentResource",
")",
"{",
"// [ currentdir]$",
"if",
"(",
"OperatingSystemUtils",
".",
"isWindows",
"(",
")",
")",
"{",
"List",
"<",
"TerminalCharacter",
">",
"prompt",
"=",
"new... | Creates an initial prompt | [
"Creates",
"an",
"initial",
"prompt"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/shell/impl/src/main/java/org/jboss/forge/addon/shell/ShellImpl.java#L134-L165 | train |
forge/core | maven/impl/src/main/java/org/jboss/forge/addon/maven/dependencies/MavenDependencyResolver.java | MavenDependencyResolver.getVersions | VersionRangeResult getVersions(DependencyQuery query)
{
Coordinate dep = query.getCoordinate();
try
{
String version = dep.getVersion();
if (version == null || version.isEmpty())
{
dep = CoordinateBuilder.create(dep).setVersion("[,)");
}
else... | java | VersionRangeResult getVersions(DependencyQuery query)
{
Coordinate dep = query.getCoordinate();
try
{
String version = dep.getVersion();
if (version == null || version.isEmpty())
{
dep = CoordinateBuilder.create(dep).setVersion("[,)");
}
else... | [
"VersionRangeResult",
"getVersions",
"(",
"DependencyQuery",
"query",
")",
"{",
"Coordinate",
"dep",
"=",
"query",
".",
"getCoordinate",
"(",
")",
";",
"try",
"{",
"String",
"version",
"=",
"dep",
".",
"getVersion",
"(",
")",
";",
"if",
"(",
"version",
"==... | Returns the versions of a specific artifact
@param query
@return | [
"Returns",
"the",
"versions",
"of",
"a",
"specific",
"artifact"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl/src/main/java/org/jboss/forge/addon/maven/dependencies/MavenDependencyResolver.java#L141-L174 | train |
forge/core | resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourceUtil.java | ResourceUtil.getContextFile | public static File getContextFile(Resource<?> r)
{
do
{
Object o = r.getUnderlyingResourceObject();
if (o instanceof File)
{
return (File) r.getUnderlyingResourceObject();
}
}
while ((r = r.getParent()) != null);
return null;
} | java | public static File getContextFile(Resource<?> r)
{
do
{
Object o = r.getUnderlyingResourceObject();
if (o instanceof File)
{
return (File) r.getUnderlyingResourceObject();
}
}
while ((r = r.getParent()) != null);
return null;
} | [
"public",
"static",
"File",
"getContextFile",
"(",
"Resource",
"<",
"?",
">",
"r",
")",
"{",
"do",
"{",
"Object",
"o",
"=",
"r",
".",
"getUnderlyingResourceObject",
"(",
")",
";",
"if",
"(",
"o",
"instanceof",
"File",
")",
"{",
"return",
"(",
"File",
... | A simple utility method to locate the outermost contextual File reference for the specified resource.
@param r resource instance.
@return outermost relevant file context. | [
"A",
"simple",
"utility",
"method",
"to",
"locate",
"the",
"outermost",
"contextual",
"File",
"reference",
"for",
"the",
"specified",
"resource",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourceUtil.java#L79-L93 | train |
forge/core | maven/impl-projects/src/main/java/org/jboss/forge/addon/maven/projects/MavenFacetImpl.java | MavenFacetImpl.createCliRequest | CliRequest createCliRequest(String[] params, String workingDirectory)
{
CliRequest cliRequest = null;
try
{
Constructor<CliRequest> constructor = CliRequest.class.getDeclaredConstructor(String[].class,
ClassWorld.class);
// This is package-private
constr... | java | CliRequest createCliRequest(String[] params, String workingDirectory)
{
CliRequest cliRequest = null;
try
{
Constructor<CliRequest> constructor = CliRequest.class.getDeclaredConstructor(String[].class,
ClassWorld.class);
// This is package-private
constr... | [
"CliRequest",
"createCliRequest",
"(",
"String",
"[",
"]",
"params",
",",
"String",
"workingDirectory",
")",
"{",
"CliRequest",
"cliRequest",
"=",
"null",
";",
"try",
"{",
"Constructor",
"<",
"CliRequest",
">",
"constructor",
"=",
"CliRequest",
".",
"class",
"... | Horrible hack. Bad Maven API | [
"Horrible",
"hack",
".",
"Bad",
"Maven",
"API"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl-projects/src/main/java/org/jboss/forge/addon/maven/projects/MavenFacetImpl.java#L310-L335 | train |
forge/core | parser-java/impl/src/main/java/org/jboss/forge/addon/parser/java/ui/JavaNewInterfaceCommandImpl.java | JavaNewInterfaceCommandImpl.implementInterface | @Override
protected void implementInterface(InterfaceCapableSource<?> source, Iterable<String> value, JavaSourceFacet facet)
{
for (String type : value)
{
source.addInterface(type);
}
} | java | @Override
protected void implementInterface(InterfaceCapableSource<?> source, Iterable<String> value, JavaSourceFacet facet)
{
for (String type : value)
{
source.addInterface(type);
}
} | [
"@",
"Override",
"protected",
"void",
"implementInterface",
"(",
"InterfaceCapableSource",
"<",
"?",
">",
"source",
",",
"Iterable",
"<",
"String",
">",
"value",
",",
"JavaSourceFacet",
"facet",
")",
"{",
"for",
"(",
"String",
"type",
":",
"value",
")",
"{",... | Interfaces don't require overriding method declarations | [
"Interfaces",
"don",
"t",
"require",
"overriding",
"method",
"declarations"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/parser-java/impl/src/main/java/org/jboss/forge/addon/parser/java/ui/JavaNewInterfaceCommandImpl.java#L46-L53 | train |
forge/core | ui/api/src/main/java/org/jboss/forge/addon/ui/util/Commands.java | Commands.isEnabled | public static boolean isEnabled(UICommand command, UIContext context)
{
return (command.isEnabled(context) && !(command instanceof UIWizardStep));
} | java | public static boolean isEnabled(UICommand command, UIContext context)
{
return (command.isEnabled(context) && !(command instanceof UIWizardStep));
} | [
"public",
"static",
"boolean",
"isEnabled",
"(",
"UICommand",
"command",
",",
"UIContext",
"context",
")",
"{",
"return",
"(",
"command",
".",
"isEnabled",
"(",
"context",
")",
"&&",
"!",
"(",
"command",
"instanceof",
"UIWizardStep",
")",
")",
";",
"}"
] | Returns true if this command can be invoked | [
"Returns",
"true",
"if",
"this",
"command",
"can",
"be",
"invoked"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/api/src/main/java/org/jboss/forge/addon/ui/util/Commands.java#L61-L64 | train |
forge/core | ui/api/src/main/java/org/jboss/forge/addon/ui/util/Commands.java | Commands.shellifyOptionValue | public static String shellifyOptionValue(String value)
{
return COLONS.matcher(WHITESPACES.matcher(value.trim()).replaceAll("_")).replaceAll("").toUpperCase();
} | java | public static String shellifyOptionValue(String value)
{
return COLONS.matcher(WHITESPACES.matcher(value.trim()).replaceAll("_")).replaceAll("").toUpperCase();
} | [
"public",
"static",
"String",
"shellifyOptionValue",
"(",
"String",
"value",
")",
"{",
"return",
"COLONS",
".",
"matcher",
"(",
"WHITESPACES",
".",
"matcher",
"(",
"value",
".",
"trim",
"(",
")",
")",
".",
"replaceAll",
"(",
"\"_\"",
")",
")",
".",
"repl... | Shellifies an option value
@param value
@return | [
"Shellifies",
"an",
"option",
"value"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/api/src/main/java/org/jboss/forge/addon/ui/util/Commands.java#L128-L131 | train |
forge/core | ui/api/src/main/java/org/jboss/forge/addon/ui/util/Commands.java | Commands.shellifyOptionNameDashed | public static String shellifyOptionNameDashed(String name)
{
String shellName = shellifyName(name);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < shellName.length(); i++)
{
char c = shellName.charAt(i);
if (Character.isUpperCase(c))
{
if (i... | java | public static String shellifyOptionNameDashed(String name)
{
String shellName = shellifyName(name);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < shellName.length(); i++)
{
char c = shellName.charAt(i);
if (Character.isUpperCase(c))
{
if (i... | [
"public",
"static",
"String",
"shellifyOptionNameDashed",
"(",
"String",
"name",
")",
"{",
"String",
"shellName",
"=",
"shellifyName",
"(",
"name",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0... | Shellifies an option name using the provided style
@param name
@param style
@return | [
"Shellifies",
"an",
"option",
"name",
"using",
"the",
"provided",
"style"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/api/src/main/java/org/jboss/forge/addon/ui/util/Commands.java#L140-L166 | train |
forge/core | maven/impl-projects/src/main/java/org/jboss/forge/addon/maven/projects/util/NativeSystemCall.java | NativeSystemCall.execFromPath | public static int execFromPath(final String command, final String[] parms, final OutputStream out,
final DirectoryResource path) throws IOException
{
Assert.notNull(command, "Command must not be null.");
Assert.notNull(path, "Directory path must not be null.");
Assert.notNull(out, "Outp... | java | public static int execFromPath(final String command, final String[] parms, final OutputStream out,
final DirectoryResource path) throws IOException
{
Assert.notNull(command, "Command must not be null.");
Assert.notNull(path, "Directory path must not be null.");
Assert.notNull(out, "Outp... | [
"public",
"static",
"int",
"execFromPath",
"(",
"final",
"String",
"command",
",",
"final",
"String",
"[",
"]",
"parms",
",",
"final",
"OutputStream",
"out",
",",
"final",
"DirectoryResource",
"path",
")",
"throws",
"IOException",
"{",
"Assert",
".",
"notNull"... | Execute a native system command as if it were run from the given path.
@param command the system command to execute
@param parms the command parameters
@param out a print writer to which command output will be streamed
@param path the path from which to execute the command
@return 0 on successful completion, any othe... | [
"Execute",
"a",
"native",
"system",
"command",
"as",
"if",
"it",
"were",
"run",
"from",
"the",
"given",
"path",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl-projects/src/main/java/org/jboss/forge/addon/maven/projects/util/NativeSystemCall.java#L34-L69 | train |
forge/core | maven/impl-projects/src/main/java/org/jboss/forge/addon/maven/projects/util/NativeSystemCall.java | NativeSystemCall.exec | public static void exec(final boolean wait, final String command, final String... parms)
throws IOException
{
String[] commandTokens = parms == null ? new String[1] : new String[parms.length + 1];
commandTokens[0] = command;
if (commandTokens.length > 1)
{
System.arrayco... | java | public static void exec(final boolean wait, final String command, final String... parms)
throws IOException
{
String[] commandTokens = parms == null ? new String[1] : new String[parms.length + 1];
commandTokens[0] = command;
if (commandTokens.length > 1)
{
System.arrayco... | [
"public",
"static",
"void",
"exec",
"(",
"final",
"boolean",
"wait",
",",
"final",
"String",
"command",
",",
"final",
"String",
"...",
"parms",
")",
"throws",
"IOException",
"{",
"String",
"[",
"]",
"commandTokens",
"=",
"parms",
"==",
"null",
"?",
"new",
... | Execute the given system command
@return 0 on successful completion, any other return code denotes failure | [
"Execute",
"the",
"given",
"system",
"command"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/impl-projects/src/main/java/org/jboss/forge/addon/maven/projects/util/NativeSystemCall.java#L76-L88 | train |
forge/core | shell/impl/src/main/java/org/jboss/forge/addon/shell/ui/ShellUIPromptImpl.java | ShellUIPromptImpl.readInput | private String readInput(PrintStream out, boolean echo) throws InterruptedException
{
StringBuilder sb = new StringBuilder();
Key inputKey;
do
{
CommandOperation input = commandInvocation.getInput();
inputKey = input.getInputKey();
if (inputKey == Key.CTRL_C || inpu... | java | private String readInput(PrintStream out, boolean echo) throws InterruptedException
{
StringBuilder sb = new StringBuilder();
Key inputKey;
do
{
CommandOperation input = commandInvocation.getInput();
inputKey = input.getInputKey();
if (inputKey == Key.CTRL_C || inpu... | [
"private",
"String",
"readInput",
"(",
"PrintStream",
"out",
",",
"boolean",
"echo",
")",
"throws",
"InterruptedException",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"Key",
"inputKey",
";",
"do",
"{",
"CommandOperation",
"input",
... | Performs the hard work
@throws InterruptedException if CTRL+C or CTRL+D is pressed | [
"Performs",
"the",
"hard",
"work"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/shell/impl/src/main/java/org/jboss/forge/addon/shell/ui/ShellUIPromptImpl.java#L314-L351 | train |
forge/core | ui/impl/src/main/java/org/jboss/forge/addon/ui/impl/input/InputComponentFactoryImpl.java | InputComponentFactoryImpl.preconfigureInput | public void preconfigureInput(InputComponent<?, ?> input, WithAttributes atts)
{
if (atts != null)
{
input.setEnabled(atts.enabled());
input.setLabel(atts.label());
input.setRequired(atts.required());
input.setRequiredMessage(atts.requiredMessage());
input.set... | java | public void preconfigureInput(InputComponent<?, ?> input, WithAttributes atts)
{
if (atts != null)
{
input.setEnabled(atts.enabled());
input.setLabel(atts.label());
input.setRequired(atts.required());
input.setRequiredMessage(atts.requiredMessage());
input.set... | [
"public",
"void",
"preconfigureInput",
"(",
"InputComponent",
"<",
"?",
",",
"?",
">",
"input",
",",
"WithAttributes",
"atts",
")",
"{",
"if",
"(",
"atts",
"!=",
"null",
")",
"{",
"input",
".",
"setEnabled",
"(",
"atts",
".",
"enabled",
"(",
")",
")",
... | Pre-configure input based on WithAttributes info if annotation exists | [
"Pre",
"-",
"configure",
"input",
"based",
"on",
"WithAttributes",
"info",
"if",
"annotation",
"exists"
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/impl/src/main/java/org/jboss/forge/addon/ui/impl/input/InputComponentFactoryImpl.java#L118-L148 | train |
forge/core | javaee/impl/src/main/java/org/jboss/forge/addon/javaee/rest/generator/impl/RootAndNestedDTOResourceGenerator.java | RootAndNestedDTOResourceGenerator.from | public DTOCollection from(Project project, JavaClass<?> entity, String dtoPackage)
{
DTOCollection dtoCollection = new DTOCollection();
if (entity == null)
{
throw new IllegalArgumentException("The argument entity was null.");
}
generatedDTOGraphForEntity(project, entity, dtoPa... | java | public DTOCollection from(Project project, JavaClass<?> entity, String dtoPackage)
{
DTOCollection dtoCollection = new DTOCollection();
if (entity == null)
{
throw new IllegalArgumentException("The argument entity was null.");
}
generatedDTOGraphForEntity(project, entity, dtoPa... | [
"public",
"DTOCollection",
"from",
"(",
"Project",
"project",
",",
"JavaClass",
"<",
"?",
">",
"entity",
",",
"String",
"dtoPackage",
")",
"{",
"DTOCollection",
"dtoCollection",
"=",
"new",
"DTOCollection",
"(",
")",
";",
"if",
"(",
"entity",
"==",
"null",
... | Creates a collection of DTOs for the provided JPA entity, and any JPA entities referenced in the JPA entity.
@param entity The JPA entity for which DTOs are to be generated
@param dtoPackage The Java package in which the DTOs are to be created
@return The {@link DTOCollection} containing the DTOs created for the JPA e... | [
"Creates",
"a",
"collection",
"of",
"DTOs",
"for",
"the",
"provided",
"JPA",
"entity",
"and",
"any",
"JPA",
"entities",
"referenced",
"in",
"the",
"JPA",
"entity",
"."
] | e140eb03bbe2b3409478ad70c86c3edbef6d9a0c | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/javaee/impl/src/main/java/org/jboss/forge/addon/javaee/rest/generator/impl/RootAndNestedDTOResourceGenerator.java#L121-L130 | train |
esanchezros/quickfixj-spring-boot-starter | quickfixj-spring-boot-starter/src/main/java/io/allune/quickfixj/spring/boot/starter/connection/ConnectorManager.java | ConnectorManager.start | @Override
public void start() {
synchronized (this.lifecycleMonitor) {
if (!isRunning()) {
log.info("start: Starting ConnectorManager");
try {
connector.start();
} catch (ConfigError | RuntimeError ex) {
thro... | java | @Override
public void start() {
synchronized (this.lifecycleMonitor) {
if (!isRunning()) {
log.info("start: Starting ConnectorManager");
try {
connector.start();
} catch (ConfigError | RuntimeError ex) {
thro... | [
"@",
"Override",
"public",
"void",
"start",
"(",
")",
"{",
"synchronized",
"(",
"this",
".",
"lifecycleMonitor",
")",
"{",
"if",
"(",
"!",
"isRunning",
"(",
")",
")",
"{",
"log",
".",
"info",
"(",
"\"start: Starting ConnectorManager\"",
")",
";",
"try",
... | Start the connector, accepting new connections | [
"Start",
"the",
"connector",
"accepting",
"new",
"connections"
] | 2eb9a4e9d76220809a67943a2286515d8622ee66 | https://github.com/esanchezros/quickfixj-spring-boot-starter/blob/2eb9a4e9d76220809a67943a2286515d8622ee66/quickfixj-spring-boot-starter/src/main/java/io/allune/quickfixj/spring/boot/starter/connection/ConnectorManager.java#L87-L103 | train |
esanchezros/quickfixj-spring-boot-starter | quickfixj-spring-boot-starter/src/main/java/io/allune/quickfixj/spring/boot/starter/connection/ConnectorManager.java | ConnectorManager.stop | @Override
public void stop() {
synchronized (this.lifecycleMonitor) {
if (isRunning()) {
log.info("stop: Stopping ConnectorManager");
try {
connector.stop();
} finally {
running = false;
}
... | java | @Override
public void stop() {
synchronized (this.lifecycleMonitor) {
if (isRunning()) {
log.info("stop: Stopping ConnectorManager");
try {
connector.stop();
} finally {
running = false;
}
... | [
"@",
"Override",
"public",
"void",
"stop",
"(",
")",
"{",
"synchronized",
"(",
"this",
".",
"lifecycleMonitor",
")",
"{",
"if",
"(",
"isRunning",
"(",
")",
")",
"{",
"log",
".",
"info",
"(",
"\"stop: Stopping ConnectorManager\"",
")",
";",
"try",
"{",
"c... | Stop this connector, logging out existing sessions, closing their connections, and stopping to accept new
connections. | [
"Stop",
"this",
"connector",
"logging",
"out",
"existing",
"sessions",
"closing",
"their",
"connections",
"and",
"stopping",
"to",
"accept",
"new",
"connections",
"."
] | 2eb9a4e9d76220809a67943a2286515d8622ee66 | https://github.com/esanchezros/quickfixj-spring-boot-starter/blob/2eb9a4e9d76220809a67943a2286515d8622ee66/quickfixj-spring-boot-starter/src/main/java/io/allune/quickfixj/spring/boot/starter/connection/ConnectorManager.java#L109-L121 | train |
Whiley/WhileyCompiler | src/main/java/wyil/io/WyilFilePrinter.java | WyilFilePrinter.visitBracketedExpression | public void visitBracketedExpression(Expr expr, Integer indent) {
boolean needsBrackets = needsBrackets(expr);
if (needsBrackets) {
out.print("(");
}
visitExpression(expr, indent);
if (needsBrackets) {
out.print(")");
}
} | java | public void visitBracketedExpression(Expr expr, Integer indent) {
boolean needsBrackets = needsBrackets(expr);
if (needsBrackets) {
out.print("(");
}
visitExpression(expr, indent);
if (needsBrackets) {
out.print(")");
}
} | [
"public",
"void",
"visitBracketedExpression",
"(",
"Expr",
"expr",
",",
"Integer",
"indent",
")",
"{",
"boolean",
"needsBrackets",
"=",
"needsBrackets",
"(",
"expr",
")",
";",
"if",
"(",
"needsBrackets",
")",
"{",
"out",
".",
"print",
"(",
"\"(\"",
")",
";... | Write a bracketed operand if necessary. Any operand whose human-readable
representation can contain whitespace must have brackets around it.
@param operand
@param enclosing
@param out | [
"Write",
"a",
"bracketed",
"operand",
"if",
"necessary",
".",
"Any",
"operand",
"whose",
"human",
"-",
"readable",
"representation",
"can",
"contain",
"whitespace",
"must",
"have",
"brackets",
"around",
"it",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/io/WyilFilePrinter.java#L397-L406 | train |
Whiley/WhileyCompiler | src/main/java/wyil/util/AbstractTypedVisitor.java | AbstractTypedVisitor.selectCandidate | public <T extends Type> T selectCandidate(T candidate, T next, T actual, Environment environment) {
// Found a viable candidate
boolean left = subtypeOperator.isSubtype(candidate, next, environment);
boolean right = subtypeOperator.isSubtype(next, candidate, environment);
if (left && !right) {
// Yes, is bet... | java | public <T extends Type> T selectCandidate(T candidate, T next, T actual, Environment environment) {
// Found a viable candidate
boolean left = subtypeOperator.isSubtype(candidate, next, environment);
boolean right = subtypeOperator.isSubtype(next, candidate, environment);
if (left && !right) {
// Yes, is bet... | [
"public",
"<",
"T",
"extends",
"Type",
">",
"T",
"selectCandidate",
"(",
"T",
"candidate",
",",
"T",
"next",
",",
"T",
"actual",
",",
"Environment",
"environment",
")",
"{",
"// Found a viable candidate",
"boolean",
"left",
"=",
"subtypeOperator",
".",
"isSubt... | Given two candidates, return the more precise one. If no viable candidate,
return null;
@param candidate
The current best candidate.
@param next
The next candidate being considered
@param environment
@return
@throws ResolutionError | [
"Given",
"two",
"candidates",
"return",
"the",
"more",
"precise",
"one",
".",
"If",
"no",
"viable",
"candidate",
"return",
"null",
";"
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/util/AbstractTypedVisitor.java#L1258-L1280 | train |
Whiley/WhileyCompiler | src/main/java/wyil/lang/WyilFile.java | WyilFile.substitute | public static Type.Callable substitute(Type.Callable fmp, Tuple<Template.Variable> templateParameters,
Tuple<SyntacticItem> templateArguments) {
Function<Identifier,SyntacticItem> binding = WyilFile.bindingFunction(templateParameters,templateArguments);
// Proceed with the potentially updated binding
Tuple<Typ... | java | public static Type.Callable substitute(Type.Callable fmp, Tuple<Template.Variable> templateParameters,
Tuple<SyntacticItem> templateArguments) {
Function<Identifier,SyntacticItem> binding = WyilFile.bindingFunction(templateParameters,templateArguments);
// Proceed with the potentially updated binding
Tuple<Typ... | [
"public",
"static",
"Type",
".",
"Callable",
"substitute",
"(",
"Type",
".",
"Callable",
"fmp",
",",
"Tuple",
"<",
"Template",
".",
"Variable",
">",
"templateParameters",
",",
"Tuple",
"<",
"SyntacticItem",
">",
"templateArguments",
")",
"{",
"Function",
"<",
... | Apply an explicit binding to a given function, method or property declaration
via substitution. Observe we cannot just use the existing Type.substitute
method as this accounts for lifetime captures. Therefore, we first build the
binding and then apply it to each of the parameters and returns.
@param fmp
@param templat... | [
"Apply",
"an",
"explicit",
"binding",
"to",
"a",
"given",
"function",
"method",
"or",
"property",
"declaration",
"via",
"substitution",
".",
"Observe",
"we",
"cannot",
"just",
"use",
"the",
"existing",
"Type",
".",
"substitute",
"method",
"as",
"this",
"accoun... | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/lang/WyilFile.java#L5121-L5137 | train |
Whiley/WhileyCompiler | src/main/java/wyil/lang/WyilFile.java | WyilFile.bindingFunction | public static <T extends SyntacticItem> java.util.function.Function<Identifier, SyntacticItem> bindingFunction(
Tuple<Template.Variable> variables, Tuple<T> arguments) {
//
return (Identifier var) -> {
for (int i = 0; i != variables.size(); ++i) {
if (var.equals(variables.get(i).getName())) {
return ... | java | public static <T extends SyntacticItem> java.util.function.Function<Identifier, SyntacticItem> bindingFunction(
Tuple<Template.Variable> variables, Tuple<T> arguments) {
//
return (Identifier var) -> {
for (int i = 0; i != variables.size(); ++i) {
if (var.equals(variables.get(i).getName())) {
return ... | [
"public",
"static",
"<",
"T",
"extends",
"SyntacticItem",
">",
"java",
".",
"util",
".",
"function",
".",
"Function",
"<",
"Identifier",
",",
"SyntacticItem",
">",
"bindingFunction",
"(",
"Tuple",
"<",
"Template",
".",
"Variable",
">",
"variables",
",",
"Tup... | Create a simple binding function from two tuples representing the key set and
value set respectively.
@param variables
@param arguments
@return | [
"Create",
"a",
"simple",
"binding",
"function",
"from",
"two",
"tuples",
"representing",
"the",
"key",
"set",
"and",
"value",
"set",
"respectively",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/lang/WyilFile.java#L5630-L5641 | train |
Whiley/WhileyCompiler | src/main/java/wyil/lang/WyilFile.java | WyilFile.removeFromBinding | public static java.util.function.Function<Identifier, SyntacticItem> removeFromBinding(
java.util.function.Function<Identifier, SyntacticItem> binding, Tuple<Identifier> variables) {
return (Identifier var) -> {
// Sanity check whether this is a variable which is being removed
for (int i = 0; i != variables.... | java | public static java.util.function.Function<Identifier, SyntacticItem> removeFromBinding(
java.util.function.Function<Identifier, SyntacticItem> binding, Tuple<Identifier> variables) {
return (Identifier var) -> {
// Sanity check whether this is a variable which is being removed
for (int i = 0; i != variables.... | [
"public",
"static",
"java",
".",
"util",
".",
"function",
".",
"Function",
"<",
"Identifier",
",",
"SyntacticItem",
">",
"removeFromBinding",
"(",
"java",
".",
"util",
".",
"function",
".",
"Function",
"<",
"Identifier",
",",
"SyntacticItem",
">",
"binding",
... | Construct a binding function from another binding where a given set of
variables are removed. This is necessary in situations where the given
variables are captured.
@param binding
@param variables
@return | [
"Construct",
"a",
"binding",
"function",
"from",
"another",
"binding",
"where",
"a",
"given",
"set",
"of",
"variables",
"are",
"removed",
".",
"This",
"is",
"necessary",
"in",
"situations",
"where",
"the",
"given",
"variables",
"are",
"captured",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/lang/WyilFile.java#L5652-L5664 | train |
Whiley/WhileyCompiler | src/main/java/wyil/type/util/ReadWriteTypeExtractor.java | ReadWriteTypeExtractor.construct | protected <T extends SemanticType.Atom> T construct(Disjunct type, LifetimeRelation lifetimes, Combinator<T> kind) {
T result = null;
Conjunct[] conjuncts = type.conjuncts;
for (int i = 0; i != conjuncts.length; ++i) {
Conjunct conjunct = conjuncts[i];
if (!isVoid(conjunct, lifetimes)) {
T tmp = constru... | java | protected <T extends SemanticType.Atom> T construct(Disjunct type, LifetimeRelation lifetimes, Combinator<T> kind) {
T result = null;
Conjunct[] conjuncts = type.conjuncts;
for (int i = 0; i != conjuncts.length; ++i) {
Conjunct conjunct = conjuncts[i];
if (!isVoid(conjunct, lifetimes)) {
T tmp = constru... | [
"protected",
"<",
"T",
"extends",
"SemanticType",
".",
"Atom",
">",
"T",
"construct",
"(",
"Disjunct",
"type",
",",
"LifetimeRelation",
"lifetimes",
",",
"Combinator",
"<",
"T",
">",
"kind",
")",
"{",
"T",
"result",
"=",
"null",
";",
"Conjunct",
"[",
"]"... | Construct a given target type from a given type in DisjunctiveNormalForm.
@param type
@return
@throws ResolutionError | [
"Construct",
"a",
"given",
"target",
"type",
"from",
"a",
"given",
"type",
"in",
"DisjunctiveNormalForm",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/type/util/ReadWriteTypeExtractor.java#L230-L248 | train |
Whiley/WhileyCompiler | src/main/java/wyil/type/util/ReadWriteTypeExtractor.java | ReadWriteTypeExtractor.countMatchingFields | protected static int countMatchingFields(Tuple<? extends SemanticType.Field> lhsFields,
Tuple<? extends SemanticType.Field> rhsFields) {
int count = 0;
for (int i = 0; i != lhsFields.size(); ++i) {
for (int j = 0; j != rhsFields.size(); ++j) {
SemanticType.Field lhsField = lhsFields.get(i);
SemanticTy... | java | protected static int countMatchingFields(Tuple<? extends SemanticType.Field> lhsFields,
Tuple<? extends SemanticType.Field> rhsFields) {
int count = 0;
for (int i = 0; i != lhsFields.size(); ++i) {
for (int j = 0; j != rhsFields.size(); ++j) {
SemanticType.Field lhsField = lhsFields.get(i);
SemanticTy... | [
"protected",
"static",
"int",
"countMatchingFields",
"(",
"Tuple",
"<",
"?",
"extends",
"SemanticType",
".",
"Field",
">",
"lhsFields",
",",
"Tuple",
"<",
"?",
"extends",
"SemanticType",
".",
"Field",
">",
"rhsFields",
")",
"{",
"int",
"count",
"=",
"0",
"... | Count the number of matching fields. That is, fields with the same name.
@param lhsFields
@param rhsFields
@return | [
"Count",
"the",
"number",
"of",
"matching",
"fields",
".",
"That",
"is",
"fields",
"with",
"the",
"same",
"name",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/type/util/ReadWriteTypeExtractor.java#L762-L777 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseHeadlessStatement | private Stmt parseHeadlessStatement(EnclosingScope scope) {
int start = index;
// See if it is a named block
Identifier blockName = parseOptionalIdentifier(scope);
if (blockName != null) {
if (tryAndMatch(true, Colon) != null && isAtEOL()) {
int end = index;
matchEndLine();
scope = scope.newEncl... | java | private Stmt parseHeadlessStatement(EnclosingScope scope) {
int start = index;
// See if it is a named block
Identifier blockName = parseOptionalIdentifier(scope);
if (blockName != null) {
if (tryAndMatch(true, Colon) != null && isAtEOL()) {
int end = index;
matchEndLine();
scope = scope.newEncl... | [
"private",
"Stmt",
"parseHeadlessStatement",
"(",
"EnclosingScope",
"scope",
")",
"{",
"int",
"start",
"=",
"index",
";",
"// See if it is a named block",
"Identifier",
"blockName",
"=",
"parseOptionalIdentifier",
"(",
"scope",
")",
";",
"if",
"(",
"blockName",
"!="... | A headless statement is one which has no identifying keyword. The set of
headless statements include assignments, invocations, variable
declarations and named blocks.
@param scope
The enclosing scope for this statement, which determines the
set of visible (i.e. declared) variables and also the current
indentation leve... | [
"A",
"headless",
"statement",
"is",
"one",
"which",
"has",
"no",
"identifying",
"keyword",
".",
"The",
"set",
"of",
"headless",
"statements",
"include",
"assignments",
"invocations",
"variable",
"declarations",
"and",
"named",
"blocks",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L756-L800 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseExpressions | public Tuple<Expr> parseExpressions(EnclosingScope scope, boolean terminated) {
ArrayList<Expr> returns = new ArrayList<>();
// A return statement may optionally have a return expression.
// Therefore, we first skip all whitespace on the given line.
int next = skipLineSpace(index);
// Then, we check whether o... | java | public Tuple<Expr> parseExpressions(EnclosingScope scope, boolean terminated) {
ArrayList<Expr> returns = new ArrayList<>();
// A return statement may optionally have a return expression.
// Therefore, we first skip all whitespace on the given line.
int next = skipLineSpace(index);
// Then, we check whether o... | [
"public",
"Tuple",
"<",
"Expr",
">",
"parseExpressions",
"(",
"EnclosingScope",
"scope",
",",
"boolean",
"terminated",
")",
"{",
"ArrayList",
"<",
"Expr",
">",
"returns",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"// A return statement may optionally have a re... | Parse a "multi-expression"; that is, a sequence of one or more
expressions separated by comma's
@param scope
The enclosing scope for this statement, which determines the
set of visible (i.e. declared) variables and also the current
indentation level.
@param terminated
This indicates that the expression is known to be ... | [
"Parse",
"a",
"multi",
"-",
"expression",
";",
"that",
"is",
"a",
"sequence",
"of",
"one",
"or",
"more",
"expressions",
"separated",
"by",
"comma",
"s"
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L1579-L1593 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseBitwiseOrExpression | private Expr parseBitwiseOrExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Expr lhs = parseBitwiseXorExpression(scope, terminated);
if (tryAndMatch(terminated, VerticalBar) != null) {
Expr rhs = parseExpression(scope, terminated);
return annotateSourceLocation(new Expr.BitwiseOr(T... | java | private Expr parseBitwiseOrExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Expr lhs = parseBitwiseXorExpression(scope, terminated);
if (tryAndMatch(terminated, VerticalBar) != null) {
Expr rhs = parseExpression(scope, terminated);
return annotateSourceLocation(new Expr.BitwiseOr(T... | [
"private",
"Expr",
"parseBitwiseOrExpression",
"(",
"EnclosingScope",
"scope",
",",
"boolean",
"terminated",
")",
"{",
"int",
"start",
"=",
"index",
";",
"Expr",
"lhs",
"=",
"parseBitwiseXorExpression",
"(",
"scope",
",",
"terminated",
")",
";",
"if",
"(",
"tr... | Parse an bitwise "inclusive or" expression
@param scope
The enclosing scope for this statement, which determines the
set of visible (i.e. declared) variables and also the current
indentation level.
@param terminated
This indicates that the expression is known to be terminated
(or not). An expression that's known to be... | [
"Parse",
"an",
"bitwise",
"inclusive",
"or",
"expression"
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L1757-L1767 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseBitwiseXorExpression | private Expr parseBitwiseXorExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Expr lhs = parseBitwiseAndExpression(scope, terminated);
if (tryAndMatch(terminated, Caret) != null) {
Expr rhs = parseExpression(scope, terminated);
return annotateSourceLocation(new Expr.BitwiseXor(Type.... | java | private Expr parseBitwiseXorExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Expr lhs = parseBitwiseAndExpression(scope, terminated);
if (tryAndMatch(terminated, Caret) != null) {
Expr rhs = parseExpression(scope, terminated);
return annotateSourceLocation(new Expr.BitwiseXor(Type.... | [
"private",
"Expr",
"parseBitwiseXorExpression",
"(",
"EnclosingScope",
"scope",
",",
"boolean",
"terminated",
")",
"{",
"int",
"start",
"=",
"index",
";",
"Expr",
"lhs",
"=",
"parseBitwiseAndExpression",
"(",
"scope",
",",
"terminated",
")",
";",
"if",
"(",
"t... | Parse an bitwise "exclusive or" expression
@param scope
The enclosing scope for this statement, which determines the
set of visible (i.e. declared) variables and also the current
indentation level.
@param terminated
This indicates that the expression is known to be terminated
(or not). An expression that's known to be... | [
"Parse",
"an",
"bitwise",
"exclusive",
"or",
"expression"
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L1790-L1800 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseBitwiseAndExpression | private Expr parseBitwiseAndExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Expr lhs = parseConditionExpression(scope, terminated);
if (tryAndMatch(terminated, Ampersand) != null) {
Expr rhs = parseExpression(scope, terminated);
return annotateSourceLocation(new Expr.BitwiseAnd(Ty... | java | private Expr parseBitwiseAndExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Expr lhs = parseConditionExpression(scope, terminated);
if (tryAndMatch(terminated, Ampersand) != null) {
Expr rhs = parseExpression(scope, terminated);
return annotateSourceLocation(new Expr.BitwiseAnd(Ty... | [
"private",
"Expr",
"parseBitwiseAndExpression",
"(",
"EnclosingScope",
"scope",
",",
"boolean",
"terminated",
")",
"{",
"int",
"start",
"=",
"index",
";",
"Expr",
"lhs",
"=",
"parseConditionExpression",
"(",
"scope",
",",
"terminated",
")",
";",
"if",
"(",
"tr... | Parse an bitwise "and" expression
@param scope
The enclosing scope for this statement, which determines the
set of visible (i.e. declared) variables and also the current
indentation level.
@param terminated
This indicates that the expression is known to be terminated
(or not). An expression that's known to be terminat... | [
"Parse",
"an",
"bitwise",
"and",
"expression"
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L1823-L1833 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseConditionExpression | private Expr parseConditionExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Token lookahead;
// First, attempt to parse quantifiers (e.g. some, all, no, etc)
if ((lookahead = tryAndMatch(terminated, Some, All)) != null) {
return parseQuantifierExpression(lookahead, scope, terminated... | java | private Expr parseConditionExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Token lookahead;
// First, attempt to parse quantifiers (e.g. some, all, no, etc)
if ((lookahead = tryAndMatch(terminated, Some, All)) != null) {
return parseQuantifierExpression(lookahead, scope, terminated... | [
"private",
"Expr",
"parseConditionExpression",
"(",
"EnclosingScope",
"scope",
",",
"boolean",
"terminated",
")",
"{",
"int",
"start",
"=",
"index",
";",
"Token",
"lookahead",
";",
"// First, attempt to parse quantifiers (e.g. some, all, no, etc)",
"if",
"(",
"(",
"look... | Parse a condition expression.
@param scope
The enclosing scope for this statement, which determines the
set of visible (i.e. declared) variables and also the current
indentation level.
@param terminated
This indicates that the expression is known to be terminated
(or not). An expression that's known to be terminated i... | [
"Parse",
"a",
"condition",
"expression",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L1856-L1902 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseAdditiveExpression | private Expr parseAdditiveExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Expr lhs = parseMultiplicativeExpression(scope, terminated);
Token lookahead;
while ((lookahead = tryAndMatch(terminated, Plus, Minus)) != null) {
Expr rhs = parseMultiplicativeExpression(scope, terminated);
... | java | private Expr parseAdditiveExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Expr lhs = parseMultiplicativeExpression(scope, terminated);
Token lookahead;
while ((lookahead = tryAndMatch(terminated, Plus, Minus)) != null) {
Expr rhs = parseMultiplicativeExpression(scope, terminated);
... | [
"private",
"Expr",
"parseAdditiveExpression",
"(",
"EnclosingScope",
"scope",
",",
"boolean",
"terminated",
")",
"{",
"int",
"start",
"=",
"index",
";",
"Expr",
"lhs",
"=",
"parseMultiplicativeExpression",
"(",
"scope",
",",
"terminated",
")",
";",
"Token",
"loo... | Parse an additive expression.
@param scope
The enclosing scope for this statement, which determines the
set of visible (i.e. declared) variables and also the current
indentation level.
@param terminated
This indicates that the expression is known to be terminated
(or not). An expression that's known to be terminated i... | [
"Parse",
"an",
"additive",
"expression",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L2076-L2096 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseMultiplicativeExpression | private Expr parseMultiplicativeExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Expr lhs = parseAccessExpression(scope, terminated);
Token lookahead = tryAndMatch(terminated, Star, RightSlash, Percent);
if (lookahead != null) {
Expr rhs = parseAccessExpression(scope, terminated);
... | java | private Expr parseMultiplicativeExpression(EnclosingScope scope, boolean terminated) {
int start = index;
Expr lhs = parseAccessExpression(scope, terminated);
Token lookahead = tryAndMatch(terminated, Star, RightSlash, Percent);
if (lookahead != null) {
Expr rhs = parseAccessExpression(scope, terminated);
... | [
"private",
"Expr",
"parseMultiplicativeExpression",
"(",
"EnclosingScope",
"scope",
",",
"boolean",
"terminated",
")",
"{",
"int",
"start",
"=",
"index",
";",
"Expr",
"lhs",
"=",
"parseAccessExpression",
"(",
"scope",
",",
"terminated",
")",
";",
"Token",
"looka... | Parse a multiplicative expression.
@param scope
The enclosing scope for this statement, which determines the
set of visible (i.e. declared) variables and also the current
indentation level.
@param terminated
This indicates that the expression is known to be terminated
(or not). An expression that's known to be termina... | [
"Parse",
"a",
"multiplicative",
"expression",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L2119-L2143 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseQualifiedAccess | private Expr parseQualifiedAccess(EnclosingScope scope, boolean terminated) {
int start = index;
// Parse qualified name
Name name = parseName(scope);
// Construct link to be resolved
Decl.Link link = new Decl.Link<>(name);
// Decide what we've got
int mid = index;
Expr expr;
if (skipTemplate(scope) &... | java | private Expr parseQualifiedAccess(EnclosingScope scope, boolean terminated) {
int start = index;
// Parse qualified name
Name name = parseName(scope);
// Construct link to be resolved
Decl.Link link = new Decl.Link<>(name);
// Decide what we've got
int mid = index;
Expr expr;
if (skipTemplate(scope) &... | [
"private",
"Expr",
"parseQualifiedAccess",
"(",
"EnclosingScope",
"scope",
",",
"boolean",
"terminated",
")",
"{",
"int",
"start",
"=",
"index",
";",
"// Parse qualified name",
"Name",
"name",
"=",
"parseName",
"(",
"scope",
")",
";",
"// Construct link to be resolv... | Attempt to parse a possible module identifier. This will reflect a true
module identifier only if the root variable is not in the given
environment.
@param src
@param scope
The enclosing scope for this statement, which determines the
set of visible (i.e. declared) variables and also the current
indentation level.
@ret... | [
"Attempt",
"to",
"parse",
"a",
"possible",
"module",
"identifier",
".",
"This",
"will",
"reflect",
"a",
"true",
"module",
"identifier",
"only",
"if",
"the",
"root",
"variable",
"is",
"not",
"in",
"the",
"given",
"environment",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L2271-L2298 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.skipTemplate | public boolean skipTemplate(EnclosingScope scope) {
int start = index;
if (tryAndMatch(false, LeftAngle) == null) {
return true;
} else {
boolean firstTime = true;
while (tryAndMatch(false, RightAngle) == null) {
if (!firstTime && tryAndMatch(false,Comma) == null) {
// Failed to match a comma. ... | java | public boolean skipTemplate(EnclosingScope scope) {
int start = index;
if (tryAndMatch(false, LeftAngle) == null) {
return true;
} else {
boolean firstTime = true;
while (tryAndMatch(false, RightAngle) == null) {
if (!firstTime && tryAndMatch(false,Comma) == null) {
// Failed to match a comma. ... | [
"public",
"boolean",
"skipTemplate",
"(",
"EnclosingScope",
"scope",
")",
"{",
"int",
"start",
"=",
"index",
";",
"if",
"(",
"tryAndMatch",
"(",
"false",
",",
"LeftAngle",
")",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"boolean",
... | Decide whether we have a template argument list ahead. This actually requires
infinite lookahead but, in practice, is pretty minimal work.
@param scope
@return | [
"Decide",
"whether",
"we",
"have",
"a",
"template",
"argument",
"list",
"ahead",
".",
"This",
"actually",
"requires",
"infinite",
"lookahead",
"but",
"in",
"practice",
"is",
"pretty",
"minimal",
"work",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L2442-L2462 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseLifetime | private Identifier parseLifetime(EnclosingScope scope, boolean terminated) {
Identifier id = parseOptionalLifetimeIdentifier(scope, terminated);
if (id != null) {
return id;
} else {
syntaxError("expecting lifetime identifier", tokens.get(index));
}
throw new RuntimeException("deadcode"); // dead-code
... | java | private Identifier parseLifetime(EnclosingScope scope, boolean terminated) {
Identifier id = parseOptionalLifetimeIdentifier(scope, terminated);
if (id != null) {
return id;
} else {
syntaxError("expecting lifetime identifier", tokens.get(index));
}
throw new RuntimeException("deadcode"); // dead-code
... | [
"private",
"Identifier",
"parseLifetime",
"(",
"EnclosingScope",
"scope",
",",
"boolean",
"terminated",
")",
"{",
"Identifier",
"id",
"=",
"parseOptionalLifetimeIdentifier",
"(",
"scope",
",",
"terminated",
")",
";",
"if",
"(",
"id",
"!=",
"null",
")",
"{",
"r... | Parse a currently declared lifetime.
@return the matched lifetime name | [
"Parse",
"a",
"currently",
"declared",
"lifetime",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4107-L4115 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.match | private Token match(Token.Kind kind) {
checkNotEof();
Token token = tokens.get(index++);
if (token.kind != kind) {
syntaxError("expecting \"" + kind + "\" here", token);
}
return token;
} | java | private Token match(Token.Kind kind) {
checkNotEof();
Token token = tokens.get(index++);
if (token.kind != kind) {
syntaxError("expecting \"" + kind + "\" here", token);
}
return token;
} | [
"private",
"Token",
"match",
"(",
"Token",
".",
"Kind",
"kind",
")",
"{",
"checkNotEof",
"(",
")",
";",
"Token",
"token",
"=",
"tokens",
".",
"get",
"(",
"index",
"++",
")",
";",
"if",
"(",
"token",
".",
"kind",
"!=",
"kind",
")",
"{",
"syntaxError... | Match a given token kind, whilst moving passed any whitespace encountered
inbetween. In the case that meet the end of the stream, or we don't match
the expected token, then an error is thrown.
@param kind
@return | [
"Match",
"a",
"given",
"token",
"kind",
"whilst",
"moving",
"passed",
"any",
"whitespace",
"encountered",
"inbetween",
".",
"In",
"the",
"case",
"that",
"meet",
"the",
"end",
"of",
"the",
"stream",
"or",
"we",
"don",
"t",
"match",
"the",
"expected",
"token... | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4156-L4163 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.match | private Token[] match(Token.Kind... kinds) {
Token[] result = new Token[kinds.length];
for (int i = 0; i != result.length; ++i) {
checkNotEof();
Token token = tokens.get(index++);
if (token.kind == kinds[i]) {
result[i] = token;
} else {
syntaxError("Expected \"" + kinds[i] + "\" here", token);
... | java | private Token[] match(Token.Kind... kinds) {
Token[] result = new Token[kinds.length];
for (int i = 0; i != result.length; ++i) {
checkNotEof();
Token token = tokens.get(index++);
if (token.kind == kinds[i]) {
result[i] = token;
} else {
syntaxError("Expected \"" + kinds[i] + "\" here", token);
... | [
"private",
"Token",
"[",
"]",
"match",
"(",
"Token",
".",
"Kind",
"...",
"kinds",
")",
"{",
"Token",
"[",
"]",
"result",
"=",
"new",
"Token",
"[",
"kinds",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"!=",
"result",
"."... | Match a given sequence of tokens, whilst moving passed any whitespace
encountered inbetween. In the case that meet the end of the stream, or we
don't match the expected tokens in the expected order, then an error is
thrown.
@param operator
@return | [
"Match",
"a",
"given",
"sequence",
"of",
"tokens",
"whilst",
"moving",
"passed",
"any",
"whitespace",
"encountered",
"inbetween",
".",
"In",
"the",
"case",
"that",
"meet",
"the",
"end",
"of",
"the",
"stream",
"or",
"we",
"don",
"t",
"match",
"the",
"expect... | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4174-L4186 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.lookaheadSequence | private boolean lookaheadSequence(boolean terminated, Token.Kind... kinds) {
int next = index;
for (Token.Kind k : kinds) {
next = terminated ? skipWhiteSpace(next) : skipLineSpace(next);
if (next >= tokens.size() || tokens.get(next++).kind != k) {
return false;
}
}
return true;
} | java | private boolean lookaheadSequence(boolean terminated, Token.Kind... kinds) {
int next = index;
for (Token.Kind k : kinds) {
next = terminated ? skipWhiteSpace(next) : skipLineSpace(next);
if (next >= tokens.size() || tokens.get(next++).kind != k) {
return false;
}
}
return true;
} | [
"private",
"boolean",
"lookaheadSequence",
"(",
"boolean",
"terminated",
",",
"Token",
".",
"Kind",
"...",
"kinds",
")",
"{",
"int",
"next",
"=",
"index",
";",
"for",
"(",
"Token",
".",
"Kind",
"k",
":",
"kinds",
")",
"{",
"next",
"=",
"terminated",
"?... | Attempt to match a given sequence of tokens in the given order, whilst
ignoring any whitespace in between. Note that, in any case, the index
will be unchanged!
@param terminated
Indicates whether or not this function should be concerned
with new lines. The terminated flag indicates whether or not
the current construct... | [
"Attempt",
"to",
"match",
"a",
"given",
"sequence",
"of",
"tokens",
"in",
"the",
"given",
"order",
"whilst",
"ignoring",
"any",
"whitespace",
"in",
"between",
".",
"Note",
"that",
"in",
"any",
"case",
"the",
"index",
"will",
"be",
"unchanged!"
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4295-L4304 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.isAtEOL | private boolean isAtEOL() {
int next = skipLineSpace(index);
return next >= tokens.size() || tokens.get(next).kind == NewLine;
} | java | private boolean isAtEOL() {
int next = skipLineSpace(index);
return next >= tokens.size() || tokens.get(next).kind == NewLine;
} | [
"private",
"boolean",
"isAtEOL",
"(",
")",
"{",
"int",
"next",
"=",
"skipLineSpace",
"(",
"index",
")",
";",
"return",
"next",
">=",
"tokens",
".",
"size",
"(",
")",
"||",
"tokens",
".",
"get",
"(",
"next",
")",
".",
"kind",
"==",
"NewLine",
";",
"... | Check whether the current index is, after skipping all line spaces, at
the end of a line. This method does not change the state!
@return whether index is at end of line | [
"Check",
"whether",
"the",
"current",
"index",
"is",
"after",
"skipping",
"all",
"line",
"spaces",
"at",
"the",
"end",
"of",
"a",
"line",
".",
"This",
"method",
"does",
"not",
"change",
"the",
"state!"
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4312-L4315 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.matchEndLine | private void matchEndLine() {
// First, parse all whitespace characters except for new lines
index = skipLineSpace(index);
// Second, check whether we've reached the end-of-file (as signaled by
// running out of tokens), or we've encountered some token which not a
// newline.
if (index >= tokens.size()) {
... | java | private void matchEndLine() {
// First, parse all whitespace characters except for new lines
index = skipLineSpace(index);
// Second, check whether we've reached the end-of-file (as signaled by
// running out of tokens), or we've encountered some token which not a
// newline.
if (index >= tokens.size()) {
... | [
"private",
"void",
"matchEndLine",
"(",
")",
"{",
"// First, parse all whitespace characters except for new lines",
"index",
"=",
"skipLineSpace",
"(",
"index",
")",
";",
"// Second, check whether we've reached the end-of-file (as signaled by",
"// running out of tokens), or we've enco... | Match a the end of a line. This is required to signal, for example, the
end of the current statement. | [
"Match",
"a",
"the",
"end",
"of",
"a",
"line",
".",
"This",
"is",
"required",
"to",
"signal",
"for",
"example",
"the",
"end",
"of",
"the",
"current",
"statement",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4342-L4356 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.skipWhiteSpace | private int skipWhiteSpace(int index) {
while (index < tokens.size() && isWhiteSpace(tokens.get(index))) {
index++;
}
return index;
} | java | private int skipWhiteSpace(int index) {
while (index < tokens.size() && isWhiteSpace(tokens.get(index))) {
index++;
}
return index;
} | [
"private",
"int",
"skipWhiteSpace",
"(",
"int",
"index",
")",
"{",
"while",
"(",
"index",
"<",
"tokens",
".",
"size",
"(",
")",
"&&",
"isWhiteSpace",
"(",
"tokens",
".",
"get",
"(",
"index",
")",
")",
")",
"{",
"index",
"++",
";",
"}",
"return",
"i... | Skip over any whitespace characters, starting from a given index and
returning the first index passed any whitespace encountered. | [
"Skip",
"over",
"any",
"whitespace",
"characters",
"starting",
"from",
"a",
"given",
"index",
"and",
"returning",
"the",
"first",
"index",
"passed",
"any",
"whitespace",
"encountered",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4386-L4391 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.skipEmptyLines | private void skipEmptyLines() {
int tmp = index;
do {
tmp = skipLineSpace(tmp);
if (tmp < tokens.size() && tokens.get(tmp).kind != Token.Kind.NewLine) {
return; // done
} else if (tmp >= tokens.size()) {
index = tmp;
return; // end-of-file reached
}
// otherwise, skip newline and continue... | java | private void skipEmptyLines() {
int tmp = index;
do {
tmp = skipLineSpace(tmp);
if (tmp < tokens.size() && tokens.get(tmp).kind != Token.Kind.NewLine) {
return; // done
} else if (tmp >= tokens.size()) {
index = tmp;
return; // end-of-file reached
}
// otherwise, skip newline and continue... | [
"private",
"void",
"skipEmptyLines",
"(",
")",
"{",
"int",
"tmp",
"=",
"index",
";",
"do",
"{",
"tmp",
"=",
"skipLineSpace",
"(",
"tmp",
")",
";",
"if",
"(",
"tmp",
"<",
"tokens",
".",
"size",
"(",
")",
"&&",
"tokens",
".",
"get",
"(",
"tmp",
")"... | Skip over any empty lines. That is lines which contain only whitespace
and comments. | [
"Skip",
"over",
"any",
"empty",
"lines",
".",
"That",
"is",
"lines",
"which",
"contain",
"only",
"whitespace",
"and",
"comments",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4409-L4424 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.isWhiteSpace | private boolean isWhiteSpace(Token token) {
return token.kind == Token.Kind.NewLine || isLineSpace(token);
} | java | private boolean isWhiteSpace(Token token) {
return token.kind == Token.Kind.NewLine || isLineSpace(token);
} | [
"private",
"boolean",
"isWhiteSpace",
"(",
"Token",
"token",
")",
"{",
"return",
"token",
".",
"kind",
"==",
"Token",
".",
"Kind",
".",
"NewLine",
"||",
"isLineSpace",
"(",
"token",
")",
";",
"}"
] | Define what is considered to be whitespace.
@param token
@return | [
"Define",
"what",
"is",
"considered",
"to",
"be",
"whitespace",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4432-L4434 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseCharacter | private BigInteger parseCharacter(String input) {
int pos = 1;
char c = input.charAt(pos++);
if (c == '\\') {
// escape code
switch (input.charAt(pos++)) {
case 'b':
c = '\b';
break;
case 't':
c = '\t';
break;
case 'n':
c = '\n';
break;
case 'f':
c = '\f';
break;
... | java | private BigInteger parseCharacter(String input) {
int pos = 1;
char c = input.charAt(pos++);
if (c == '\\') {
// escape code
switch (input.charAt(pos++)) {
case 'b':
c = '\b';
break;
case 't':
c = '\t';
break;
case 'n':
c = '\n';
break;
case 'f':
c = '\f';
break;
... | [
"private",
"BigInteger",
"parseCharacter",
"(",
"String",
"input",
")",
"{",
"int",
"pos",
"=",
"1",
";",
"char",
"c",
"=",
"input",
".",
"charAt",
"(",
"pos",
"++",
")",
";",
"if",
"(",
"c",
"==",
"'",
"'",
")",
"{",
"// escape code",
"switch",
"(... | Parse a character from a string of the form 'c' or '\c'.
@param input
@return | [
"Parse",
"a",
"character",
"from",
"a",
"string",
"of",
"the",
"form",
"c",
"or",
"\\",
"c",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4453-L4488 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseUnicodeString | protected byte[] parseUnicodeString(Token token) {
String v = token.text;
/*
* Parsing a string requires several steps to be taken. First, we need
* to strip quotes from the ends of the string.
*/
v = v.substring(1, v.length() - 1);
StringBuffer result = new StringBuffer();
// Second, step through t... | java | protected byte[] parseUnicodeString(Token token) {
String v = token.text;
/*
* Parsing a string requires several steps to be taken. First, we need
* to strip quotes from the ends of the string.
*/
v = v.substring(1, v.length() - 1);
StringBuffer result = new StringBuffer();
// Second, step through t... | [
"protected",
"byte",
"[",
"]",
"parseUnicodeString",
"(",
"Token",
"token",
")",
"{",
"String",
"v",
"=",
"token",
".",
"text",
";",
"/*\n\t\t * Parsing a string requires several steps to be taken. First, we need\n\t\t * to strip quotes from the ends of the string.\n\t\t */",
"v"... | Parse a string constant whilst interpreting all escape characters.
@param v
@return | [
"Parse",
"a",
"string",
"constant",
"whilst",
"interpreting",
"all",
"escape",
"characters",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4496-L4563 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseBinaryLiteral | private byte parseBinaryLiteral(Token input) {
String text = input.text;
if (text.length() > 11) {
// FIXME: this will be deprecated!
syntaxError("invalid binary literal (too long)", input);
}
int val = 0;
// Start past 0b
for (int i = 2; i != text.length(); ++i) {
char c = text.charAt(i);
// Sk... | java | private byte parseBinaryLiteral(Token input) {
String text = input.text;
if (text.length() > 11) {
// FIXME: this will be deprecated!
syntaxError("invalid binary literal (too long)", input);
}
int val = 0;
// Start past 0b
for (int i = 2; i != text.length(); ++i) {
char c = text.charAt(i);
// Sk... | [
"private",
"byte",
"parseBinaryLiteral",
"(",
"Token",
"input",
")",
"{",
"String",
"text",
"=",
"input",
".",
"text",
";",
"if",
"(",
"text",
".",
"length",
"(",
")",
">",
"11",
")",
"{",
"// FIXME: this will be deprecated!",
"syntaxError",
"(",
"\"invalid ... | Parse a token representing a binary literal, such as "0b0110", "0b1111_0101",
etc.
@param input
The token representing the byte value.
@return | [
"Parse",
"a",
"token",
"representing",
"a",
"binary",
"literal",
"such",
"as",
"0b0110",
"0b1111_0101",
"etc",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4584-L4606 | train |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseHexLiteral | private BigInteger parseHexLiteral(Token input) {
String text = input.text;
// Start past 0x
for (int i = 2; i != text.length(); ++i) {
char c = text.charAt(i);
if(c != '_' && !isHexDigit(c)) {
syntaxError("invalid hex literal (invalid characters)", input);
}
}
// Remove "0x" and "_"
text = inp... | java | private BigInteger parseHexLiteral(Token input) {
String text = input.text;
// Start past 0x
for (int i = 2; i != text.length(); ++i) {
char c = text.charAt(i);
if(c != '_' && !isHexDigit(c)) {
syntaxError("invalid hex literal (invalid characters)", input);
}
}
// Remove "0x" and "_"
text = inp... | [
"private",
"BigInteger",
"parseHexLiteral",
"(",
"Token",
"input",
")",
"{",
"String",
"text",
"=",
"input",
".",
"text",
";",
"// Start past 0x",
"for",
"(",
"int",
"i",
"=",
"2",
";",
"i",
"!=",
"text",
".",
"length",
"(",
")",
";",
"++",
"i",
")",... | Parse a token representing a hex literal, such as "0x
@param input
The token representing the byte value.
@return | [
"Parse",
"a",
"token",
"representing",
"a",
"hex",
"literal",
"such",
"as",
"0x"
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4615-L4627 | train |
Whiley/WhileyCompiler | src/main/java/wyil/check/FlowTypeUtils.java | FlowTypeUtils.declareThisWithin | public static Environment declareThisWithin(Decl.FunctionOrMethod decl, Environment environment) {
if (decl instanceof Decl.Method) {
Decl.Method method = (Decl.Method) decl;
environment = environment.declareWithin("this", method.getLifetimes());
}
return environment;
} | java | public static Environment declareThisWithin(Decl.FunctionOrMethod decl, Environment environment) {
if (decl instanceof Decl.Method) {
Decl.Method method = (Decl.Method) decl;
environment = environment.declareWithin("this", method.getLifetimes());
}
return environment;
} | [
"public",
"static",
"Environment",
"declareThisWithin",
"(",
"Decl",
".",
"FunctionOrMethod",
"decl",
",",
"Environment",
"environment",
")",
"{",
"if",
"(",
"decl",
"instanceof",
"Decl",
".",
"Method",
")",
"{",
"Decl",
".",
"Method",
"method",
"=",
"(",
"D... | Update the environment to reflect the fact that the special "this" lifetime
is contained within all declared lifetime parameters. Observe that this only
makes sense if the enclosing declaration is for a method.
@param decl
@param environment
@return | [
"Update",
"the",
"environment",
"to",
"reflect",
"the",
"fact",
"that",
"the",
"special",
"this",
"lifetime",
"is",
"contained",
"within",
"all",
"declared",
"lifetime",
"parameters",
".",
"Observe",
"that",
"this",
"only",
"makes",
"sense",
"if",
"the",
"encl... | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeUtils.java#L70-L76 | train |
Whiley/WhileyCompiler | src/main/java/wyil/check/FlowTypeUtils.java | FlowTypeUtils.determineModifiedVariables | public static Tuple<Decl.Variable> determineModifiedVariables(Stmt.Block block) {
HashSet<Decl.Variable> modified = new HashSet<>();
determineModifiedVariables(block, modified);
return new Tuple<>(modified);
} | java | public static Tuple<Decl.Variable> determineModifiedVariables(Stmt.Block block) {
HashSet<Decl.Variable> modified = new HashSet<>();
determineModifiedVariables(block, modified);
return new Tuple<>(modified);
} | [
"public",
"static",
"Tuple",
"<",
"Decl",
".",
"Variable",
">",
"determineModifiedVariables",
"(",
"Stmt",
".",
"Block",
"block",
")",
"{",
"HashSet",
"<",
"Decl",
".",
"Variable",
">",
"modified",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"determineModi... | Determine the set of modifier variables for a given statement block. A
modified variable is one which is assigned.
@param block
@param scope
@param modified | [
"Determine",
"the",
"set",
"of",
"modifier",
"variables",
"for",
"a",
"given",
"statement",
"block",
".",
"A",
"modified",
"variable",
"is",
"one",
"which",
"is",
"assigned",
"."
] | 680f8a657d3fc286f8cc422755988b6d74ab3f4c | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeUtils.java#L153-L157 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.