repo stringlengths 7 59 | path stringlengths 3 222 | func_name stringlengths 3 127 | original_string stringlengths 0 466k | language stringclasses 1
value | code stringlengths 0 466k | code_tokens listlengths 0 68.3k | docstring stringlengths 0 21.3k | docstring_tokens listlengths 0 1.93k | sha stringlengths 0 40 | url stringlengths 0 339 | partition stringclasses 3
values | summary stringlengths 0 250 | instruction stringlengths 38 3.13k | input stringclasses 1
value | output stringlengths 146 466k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cdk/cdk | tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94ParametersCall.java | MMFF94ParametersCall.getAngleData | public List getAngleData(String angleType, String id1, String id2, String id3) throws Exception {
String akey = "";
if (pSet.containsKey(("angle" + angleType + ";" + id1 + ";" + id2 + ";" + id3))) {
akey = "angle" + angleType + ";" + id1 + ";" + id2 + ";" + id3;
} else if (pSet.conta... | java | public List getAngleData(String angleType, String id1, String id2, String id3) throws Exception {
String akey = "";
if (pSet.containsKey(("angle" + angleType + ";" + id1 + ";" + id2 + ";" + id3))) {
akey = "angle" + angleType + ";" + id1 + ";" + id2 + ";" + id3;
} else if (pSet.conta... | [
"public",
"List",
"getAngleData",
"(",
"String",
"angleType",
",",
"String",
"id1",
",",
"String",
"id2",
",",
"String",
"id3",
")",
"throws",
"Exception",
"{",
"String",
"akey",
"=",
"\"\"",
";",
"if",
"(",
"pSet",
".",
"containsKey",
"(",
"(",
"\"angle... | Gets the angle parameter set.
@param id1 ID from Atom 1.
@param id2 ID from Atom 2.
@param id3 ID from Atom 3.
@return The angle data from the force field parameter set
@exception Exception Description of the Exception | [
"Gets",
"the",
"angle",
"parameter",
"set",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94ParametersCall.java#L65-L80 | train | Get the angle data. | Create a Java method that does the following: "Get the angle data.". | Of course, here is the Java code you requested:
```java
public List getAngleData(String angleType, String id1, String id2, String id3) throws Exception {
String akey = "";
if (pSet.containsKey(("angle" + angleType + ";" + id1 + ";" + id2 + ";" + id3))) {
akey = "angle" + angleType + ";" + i... | |
mozilla/rhino | src/org/mozilla/javascript/Context.java | Context.getCurrentContext | public static Context getCurrentContext()
{
Object helper = VMBridge.instance.getThreadContextHelper();
return VMBridge.instance.getContext(helper);
} | java | public static Context getCurrentContext()
{
Object helper = VMBridge.instance.getThreadContextHelper();
return VMBridge.instance.getContext(helper);
} | [
"public",
"static",
"Context",
"getCurrentContext",
"(",
")",
"{",
"Object",
"helper",
"=",
"VMBridge",
".",
"instance",
".",
"getThreadContextHelper",
"(",
")",
";",
"return",
"VMBridge",
".",
"instance",
".",
"getContext",
"(",
"helper",
")",
";",
"}"
] | Get the current Context.
The current Context is per-thread; this method looks up
the Context associated with the current thread. <p>
@return the Context associated with the current thread, or
null if no context is associated with the current
thread.
@see ContextFactory#enterContext()
@see ContextFactory#call(ContextA... | [
"Get",
"the",
"current",
"Context",
"."
] | fa8a86df11d37623f5faa8d445a5876612bc47b0 | https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/Context.java#L409-L413 | train | Get the current context. | Create a Java method that does the following: "Get the current context.". | Of course, here is the Java code you requested:
```java
public static Context getCurrentContext()
{
Object helper = VMBridge.instance.getThreadContextHelper();
return VMBridge.instance.getContext(helper);
}
```
Hope this helps! | |
Waikato/moa | moa/src/main/java/weka/classifiers/meta/MOA.java | MOA.getOptions | public String[] getOptions() {
Vector<String> result;
String[] options;
int i;
result = new Vector<String>();
result.add("-B");
result.add(MOAUtils.toCommandLine(m_ActualClassifier));
options = super.getOptions();
for (i = 0; i < options.length; i++)
result.add(... | java | public String[] getOptions() {
Vector<String> result;
String[] options;
int i;
result = new Vector<String>();
result.add("-B");
result.add(MOAUtils.toCommandLine(m_ActualClassifier));
options = super.getOptions();
for (i = 0; i < options.length; i++)
result.add(... | [
"public",
"String",
"[",
"]",
"getOptions",
"(",
")",
"{",
"Vector",
"<",
"String",
">",
"result",
";",
"String",
"[",
"]",
"options",
";",
"int",
"i",
";",
"result",
"=",
"new",
"Vector",
"<",
"String",
">",
"(",
")",
";",
"result",
".",
"add",
... | Gets the current settings of the Classifier.
@return an array of strings suitable for passing to setOptions | [
"Gets",
"the",
"current",
"settings",
"of",
"the",
"Classifier",
"."
] | 395982e5100bfe75a3a4d26115462ce2cc74cbb0 | https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/weka/classifiers/meta/MOA.java#L159-L328 | train | Get the options for the command line. | Create a Java method that does the following: "Get the options for the command line.". | Of course, here is the Java code you requested:
```java
public String[] getOptions() {
Vector<String> result;
String[] options;
int i;
result = new Vector<String>();
result.add("-B");
result.add(MOAUtils.toCommandLine(m_ActualClassifier));
options = super.getOptions();
... | |
opensourceBIM/BIMserver | PluginBase/generated/org/bimserver/models/ifc4/impl/Ifc4PackageImpl.java | Ifc4PackageImpl.getIfcOffsetCurve3D | @Override
public EClass getIfcOffsetCurve3D() {
if (ifcOffsetCurve3DEClass == null) {
ifcOffsetCurve3DEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(395);
}
return ifcOffsetCurve3DEClass;
} | java | @Override
public EClass getIfcOffsetCurve3D() {
if (ifcOffsetCurve3DEClass == null) {
ifcOffsetCurve3DEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(395);
}
return ifcOffsetCurve3DEClass;
} | [
"@",
"Override",
"public",
"EClass",
"getIfcOffsetCurve3D",
"(",
")",
"{",
"if",
"(",
"ifcOffsetCurve3DEClass",
"==",
"null",
")",
"{",
"ifcOffsetCurve3DEClass",
"=",
"(",
"EClass",
")",
"EPackage",
".",
"Registry",
".",
"INSTANCE",
".",
"getEPackage",
"(",
"I... | <!-- begin-user-doc -->
<!-- end-user-doc -->
@generated | [
"<!",
"--",
"begin",
"-",
"user",
"-",
"doc",
"--",
">",
"<!",
"--",
"end",
"-",
"user",
"-",
"doc",
"--",
">"
] | 116803c3047d1b32217366757cee1bb3880fda63 | https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/generated/org/bimserver/models/ifc4/impl/Ifc4PackageImpl.java#L23360-L23367 | train | Create a subtype of the IfcOffsetCurve3D class. | Create a Java method that does the following: "Create a subtype of the IfcOffsetCurve3D class.". | Of course, here is the Java code you requested:
```java
@Override
public EClass getIfcOffsetCurve3D() {
if (ifcOffsetCurve3DEClass == null) {
ifcOffsetCurve3DEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(395);
}
return ifcOffsetCurve3DEClass;
... | |
j-a-w-r/jawr-main-repo | jawr/jawr-core/src/main/java/net/jawr/web/resource/watcher/ResourceWatcher.java | ResourceWatcher.register | private void register(PathMapping pathMapping) throws IOException {
GeneratorRegistry generatorRegistry = bundlesHandler.getConfig().getGeneratorRegistry();
List<PathMapping> mappings = new ArrayList<>();
if (generatorRegistry.isPathGenerated(pathMapping.getPath())) {
List<PathMapping> genPathMappings = gener... | java | private void register(PathMapping pathMapping) throws IOException {
GeneratorRegistry generatorRegistry = bundlesHandler.getConfig().getGeneratorRegistry();
List<PathMapping> mappings = new ArrayList<>();
if (generatorRegistry.isPathGenerated(pathMapping.getPath())) {
List<PathMapping> genPathMappings = gener... | [
"private",
"void",
"register",
"(",
"PathMapping",
"pathMapping",
")",
"throws",
"IOException",
"{",
"GeneratorRegistry",
"generatorRegistry",
"=",
"bundlesHandler",
".",
"getConfig",
"(",
")",
".",
"getGeneratorRegistry",
"(",
")",
";",
"List",
"<",
"PathMapping",
... | Register a path mapping
@param pathMapping
the path mapping to register
@throws IOException
if an IOException occurs | [
"Register",
"a",
"path",
"mapping"
] | 5381f6acf461cd2502593c67a77bd6ef9eab848d | https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/watcher/ResourceWatcher.java#L188-L208 | train | Registers a path mapping. | Create a Java method that does the following: "Registers a path mapping.". | Of course, here is the Java code you requested:
```java
private void register(PathMapping pathMapping) throws IOException {
GeneratorRegistry generatorRegistry = bundlesHandler.getConfig().getGeneratorRegistry();
List<PathMapping> mappings = new ArrayList<>();
if (generatorRegistry.isPathGenerated(pathMapping.g... | |
alkacon/opencms-core | src/org/opencms/file/history/CmsHistoryProject.java | CmsHistoryProject.getOwnerName | public String getOwnerName(CmsObject cms) {
try {
return CmsPrincipal.readPrincipalIncludingHistory(cms, getOwnerId()).getName();
} catch (CmsException e) {
return getOwnerId().toString();
}
} | java | public String getOwnerName(CmsObject cms) {
try {
return CmsPrincipal.readPrincipalIncludingHistory(cms, getOwnerId()).getName();
} catch (CmsException e) {
return getOwnerId().toString();
}
} | [
"public",
"String",
"getOwnerName",
"(",
"CmsObject",
"cms",
")",
"{",
"try",
"{",
"return",
"CmsPrincipal",
".",
"readPrincipalIncludingHistory",
"(",
"cms",
",",
"getOwnerId",
"(",
")",
")",
".",
"getName",
"(",
")",
";",
"}",
"catch",
"(",
"CmsException",... | Returns the owner name.<p>
@param cms the current cms context
@return the owner name | [
"Returns",
"the",
"owner",
"name",
".",
"<p",
">"
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/history/CmsHistoryProject.java#L170-L177 | train | Returns the name of the user that owns this resource. | Create a Java method that does the following: "Returns the name of the user that owns this resource.". | Of course, here is the Java code you requested:
```java
public String getOwnerName(CmsObject cms) {
try {
return CmsPrincipal.readPrincipalIncludingHistory(cms, getOwnerId()).getName();
} catch (CmsException e) {
return getOwnerId().toString();
}
}
```
Hope this he... | |
ThreeTen/threetenbp | src/main/java/org/threeten/bp/format/DateTimeParseContext.java | DateTimeParseContext.setParsed | void setParsed(Chronology chrono) {
Jdk8Methods.requireNonNull(chrono, "chrono");
Parsed currentParsed = currentParsed();
currentParsed.chrono = chrono;
if (currentParsed.callbacks != null) {
List<Object[]> callbacks = new ArrayList<Object[]>(currentParsed.callbacks);
... | java | void setParsed(Chronology chrono) {
Jdk8Methods.requireNonNull(chrono, "chrono");
Parsed currentParsed = currentParsed();
currentParsed.chrono = chrono;
if (currentParsed.callbacks != null) {
List<Object[]> callbacks = new ArrayList<Object[]>(currentParsed.callbacks);
... | [
"void",
"setParsed",
"(",
"Chronology",
"chrono",
")",
"{",
"Jdk8Methods",
".",
"requireNonNull",
"(",
"chrono",
",",
"\"chrono\"",
")",
";",
"Parsed",
"currentParsed",
"=",
"currentParsed",
"(",
")",
";",
"currentParsed",
".",
"chrono",
"=",
"chrono",
";",
... | Stores the parsed chronology.
<p>
This stores the chronology that has been parsed.
No validation is performed other than ensuring it is not null.
@param chrono the parsed chronology, not null | [
"Stores",
"the",
"parsed",
"chronology",
".",
"<p",
">",
"This",
"stores",
"the",
"chronology",
"that",
"has",
"been",
"parsed",
".",
"No",
"validation",
"is",
"performed",
"other",
"than",
"ensuring",
"it",
"is",
"not",
"null",
"."
] | 5f05b649f89f205aabd96b2f83c36796ec616fe6 | https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/format/DateTimeParseContext.java#L357-L369 | train | Sets the parsed field of the class. | Create a Java method that does the following: "Sets the parsed field of the class.". | Of course, here is the Java code you requested:
```java
void setParsed(Chronology chrono) {
Jdk8Methods.requireNonNull(chrono, "chrono");
Parsed currentParsed = currentParsed();
currentParsed.chrono = chrono;
if (currentParsed.callbacks != null) {
List<Object[]> callbacks = ... | |
maestrano/maestrano-java | src/main/java/com/maestrano/net/ConnecClient.java | ConnecClient.retrieve | public Map<String, Object> retrieve(String entityName, String groupId, String entityId, MnoHttpClient httpClient) throws AuthenticationException, ApiException, InvalidRequestException {
String jsonBody = httpClient.get(getInstanceUrl(entityName, groupId, entityId));
Type typeOfHashMap = HashMap.class;
return GSON... | java | public Map<String, Object> retrieve(String entityName, String groupId, String entityId, MnoHttpClient httpClient) throws AuthenticationException, ApiException, InvalidRequestException {
String jsonBody = httpClient.get(getInstanceUrl(entityName, groupId, entityId));
Type typeOfHashMap = HashMap.class;
return GSON... | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"retrieve",
"(",
"String",
"entityName",
",",
"String",
"groupId",
",",
"String",
"entityId",
",",
"MnoHttpClient",
"httpClient",
")",
"throws",
"AuthenticationException",
",",
"ApiException",
",",
"InvalidReques... | Fetch an entity by id
@param entity
name
@param groupId
customer group id
@param entityId
id of the entity to retrieve
@param httpClient
@return entity
@throws AuthenticationException
@throws ApiException
@throws InvalidRequestException | [
"Fetch",
"an",
"entity",
"by",
"id"
] | e71c6d3172d7645529d678d1cb3ea9e0a59de314 | https://github.com/maestrano/maestrano-java/blob/e71c6d3172d7645529d678d1cb3ea9e0a59de314/src/main/java/com/maestrano/net/ConnecClient.java#L311-L315 | train | Retrieve a single entity from the Mno Server. | Create a Java method that does the following: "Retrieve a single entity from the Mno Server.". | Of course, here is the Java code you requested:
```java
public Map<String, Object> retrieve(String entityName, String groupId, String entityId, MnoHttpClient httpClient) throws AuthenticationException, ApiException, InvalidRequestException {
String jsonBody = httpClient.get(getInstanceUrl(entityName, groupId, entity... | |
Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java | UpdatePreferencesServlet.moveElement | @RequestMapping(method = RequestMethod.POST, params = "action=moveElement")
public ModelAndView moveElement(
HttpServletRequest request,
HttpServletResponse response,
@RequestParam(value = "sourceID") String sourceId,
@RequestParam String method,
@RequestP... | java | @RequestMapping(method = RequestMethod.POST, params = "action=moveElement")
public ModelAndView moveElement(
HttpServletRequest request,
HttpServletResponse response,
@RequestParam(value = "sourceID") String sourceId,
@RequestParam String method,
@RequestP... | [
"@",
"RequestMapping",
"(",
"method",
"=",
"RequestMethod",
".",
"POST",
",",
"params",
"=",
"\"action=moveElement\"",
")",
"public",
"ModelAndView",
"moveElement",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
",",
"@",
"RequestParam",... | Move an element to another location on the tab.
<p>Used by Respondr UI when moving portlets around in content area. Will be made more generic
to support ngPortal UI which supports arbitrary nesting of folders. When that code is merged
in, the behavior of this method will need to change slightly (make sure movePortlet ... | [
"Move",
"an",
"element",
"to",
"another",
"location",
"on",
"the",
"tab",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L371-L396 | train | Move an element from one source to another. | Create a Java method that does the following: "Move an element from one source to another.". | Of course, here is the Java code you requested:
```java
@RequestMapping(method = RequestMethod.POST, params = "action=moveElement")
public ModelAndView moveElement(
HttpServletRequest request,
HttpServletResponse response,
@RequestParam(value = "sourceID") String sourceId,
... | |
OrienteerBAP/wicket-orientdb | wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/security/OSecurityHelper.java | OSecurityHelper.isAllowed | public static boolean isAllowed(ORule.ResourceGeneric resource, String specific, OrientPermission... permissions)
{
return OrientDbWebSession.get().getEffectiveUser()
.checkIfAllowed(resource, specific, OrientPermission.combinedPermission(permissions))!=null;
} | java | public static boolean isAllowed(ORule.ResourceGeneric resource, String specific, OrientPermission... permissions)
{
return OrientDbWebSession.get().getEffectiveUser()
.checkIfAllowed(resource, specific, OrientPermission.combinedPermission(permissions))!=null;
} | [
"public",
"static",
"boolean",
"isAllowed",
"(",
"ORule",
".",
"ResourceGeneric",
"resource",
",",
"String",
"specific",
",",
"OrientPermission",
"...",
"permissions",
")",
"{",
"return",
"OrientDbWebSession",
".",
"get",
"(",
")",
".",
"getEffectiveUser",
"(",
... | Check that all required permissions present for specified resource and specific
@param resource specific resource to secure
@param specific specific resource to secure
@param permissions {@link OrientPermission}s to check
@return true of require resource if allowed for current user | [
"Check",
"that",
"all",
"required",
"permissions",
"present",
"for",
"specified",
"resource",
"and",
"specific"
] | eb1d94f00a6bff9e266c5c032baa6043afc1db92 | https://github.com/OrienteerBAP/wicket-orientdb/blob/eb1d94f00a6bff9e266c5c032baa6043afc1db92/wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/security/OSecurityHelper.java#L213-L217 | train | Check if the user is allowed to access the specified resource. | Create a Java method that does the following: "Check if the user is allowed to access the specified resource.". | Of course, here is the Java code you requested:
```java
public static boolean isAllowed(ORule.ResourceGeneric resource, String specific, OrientPermission... permissions)
{
return OrientDbWebSession.get().getEffectiveUser()
.checkIfAllowed(resource, specific, OrientPermission.combinedPermission(permissions))!=n... | |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java | LinkedWorkspaceStorageCacheImpl.remove | public void remove(String identifier, ItemData item)
{
writeLock.lock();
try
{
ItemData data= getItem(identifier);
if (data != null && data.equals(item))
{
cache.remove(new CacheId(identifier));
}
}
catch (Exception e)
{
LOG... | java | public void remove(String identifier, ItemData item)
{
writeLock.lock();
try
{
ItemData data= getItem(identifier);
if (data != null && data.equals(item))
{
cache.remove(new CacheId(identifier));
}
}
catch (Exception e)
{
LOG... | [
"public",
"void",
"remove",
"(",
"String",
"identifier",
",",
"ItemData",
"item",
")",
"{",
"writeLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"ItemData",
"data",
"=",
"getItem",
"(",
"identifier",
")",
";",
"if",
"(",
"data",
"!=",
"null",
"&&",
"... | {@inheritDoc} | [
"{"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java#L1339-L1358 | train | Removes the item from the cache. | Create a Java method that does the following: "Removes the item from the cache.". | Of course, here is the Java code you requested:
```java
public void remove(String identifier, ItemData item)
{
writeLock.lock();
try
{
ItemData data= getItem(identifier);
if (data != null && data.equals(item))
{
cache.remove(new CacheId(identifier));
... | |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PutCommand.java | PutCommand.createVersion | private void createVersion(Node fileNode, InputStream inputStream, String autoVersion, List<String> mixins) throws RepositoryException
{
if (!fileNode.isNodeType(VersionHistoryUtils.MIX_VERSIONABLE))
{
if (fileNode.canAddMixin(VersionHistoryUtils.MIX_VERSIONABLE))
{
fi... | java | private void createVersion(Node fileNode, InputStream inputStream, String autoVersion, List<String> mixins) throws RepositoryException
{
if (!fileNode.isNodeType(VersionHistoryUtils.MIX_VERSIONABLE))
{
if (fileNode.canAddMixin(VersionHistoryUtils.MIX_VERSIONABLE))
{
fi... | [
"private",
"void",
"createVersion",
"(",
"Node",
"fileNode",
",",
"InputStream",
"inputStream",
",",
"String",
"autoVersion",
",",
"List",
"<",
"String",
">",
"mixins",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"!",
"fileNode",
".",
"isNodeType",
"... | Creates the new version of file.
@param fileNode file node
@param inputStream input stream that contains the content of file
@param autoVersion auto-version value
@param mixins list of mixins
@throws RepositoryException {@link RepositoryException} | [
"Creates",
"the",
"new",
"version",
"of",
"file",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PutCommand.java#L323-L350 | train | Create a version of the file. | Create a Java method that does the following: "Create a version of the file.". | Of course, here is the Java code you requested:
```java
private void createVersion(Node fileNode, InputStream inputStream, String autoVersion, List<String> mixins) throws RepositoryException
{
if (!fileNode.isNodeType(VersionHistoryUtils.MIX_VERSIONABLE))
{
if (fileNode.canAddMixin(VersionH... | |
opensourceBIM/BIMserver | PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1PackageImpl.java | Ifc2x3tc1PackageImpl.getIfcTwoDirectionRepeatFactor | public EClass getIfcTwoDirectionRepeatFactor() {
if (ifcTwoDirectionRepeatFactorEClass == null) {
ifcTwoDirectionRepeatFactorEClass = (EClass) EPackage.Registry.INSTANCE
.getEPackage(Ifc2x3tc1Package.eNS_URI).getEClassifiers().get(625);
}
return ifcTwoDirectionRepeatFactorEClass;
} | java | public EClass getIfcTwoDirectionRepeatFactor() {
if (ifcTwoDirectionRepeatFactorEClass == null) {
ifcTwoDirectionRepeatFactorEClass = (EClass) EPackage.Registry.INSTANCE
.getEPackage(Ifc2x3tc1Package.eNS_URI).getEClassifiers().get(625);
}
return ifcTwoDirectionRepeatFactorEClass;
} | [
"public",
"EClass",
"getIfcTwoDirectionRepeatFactor",
"(",
")",
"{",
"if",
"(",
"ifcTwoDirectionRepeatFactorEClass",
"==",
"null",
")",
"{",
"ifcTwoDirectionRepeatFactorEClass",
"=",
"(",
"EClass",
")",
"EPackage",
".",
"Registry",
".",
"INSTANCE",
".",
"getEPackage",... | <!-- begin-user-doc -->
<!-- end-user-doc -->
@generated | [
"<!",
"--",
"begin",
"-",
"user",
"-",
"doc",
"--",
">",
"<!",
"--",
"end",
"-",
"user",
"-",
"doc",
"--",
">"
] | 116803c3047d1b32217366757cee1bb3880fda63 | https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1PackageImpl.java#L31038-L31044 | train | Get the Ifc2x3tc1 2. 0 repeat factorEClass | Create a Java method that does the following: "Get the Ifc2x3tc1 2. 0 repeat factorEClass". | Of course, here is the Java code you requested:
```java
public EClass getIfcTwoDirectionRepeatFactor() {
if (ifcTwoDirectionRepeatFactorEClass == null) {
ifcTwoDirectionRepeatFactorEClass = (EClass) EPackage.Registry.INSTANCE
.getEPackage(Ifc2x3tc1Package.eNS_URI).getEClassifiers().get(625);
}
retur... | |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/StringUtils.java | StringUtils.checkRequiredProperties | public static String checkRequiredProperties(Properties props,
String ... requiredProps) {
for (String required : requiredProps) {
if (props.getProperty(required) == null) {
return required;
}
}
return null;
} | java | public static String checkRequiredProperties(Properties props,
String ... requiredProps) {
for (String required : requiredProps) {
if (props.getProperty(required) == null) {
return required;
}
}
return null;
} | [
"public",
"static",
"String",
"checkRequiredProperties",
"(",
"Properties",
"props",
",",
"String",
"...",
"requiredProps",
")",
"{",
"for",
"(",
"String",
"required",
":",
"requiredProps",
")",
"{",
"if",
"(",
"props",
".",
"getProperty",
"(",
"required",
")"... | If any of the given list of properties are not found, returns the
name of that property. Otherwise, returns null. | [
"If",
"any",
"of",
"the",
"given",
"list",
"of",
"properties",
"are",
"not",
"found",
"returns",
"the",
"name",
"of",
"that",
"property",
".",
"Otherwise",
"returns",
"null",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/StringUtils.java#L861-L869 | train | Check if the required properties are present in the properties. | Create a Java method that does the following: "Check if the required properties are present in the properties.". | Of course, here is the Java code you requested:
```java
public static String checkRequiredProperties(Properties props,
String ... requiredProps) {
for (String required : requiredProps) {
if (props.getProperty(required) == null) {
return required;
... | |
probedock/probedock-java | src/main/java/io/probedock/client/core/filters/FilterTargetData.java | FilterTargetData.mergeTags | private static String mergeTags(ProbeTest mAnnotation, ProbeTestClass cAnnotation) {
List<String> tags = new ArrayList<>();
if (mAnnotation != null) {
tags.addAll(Arrays.asList(mAnnotation.tags()));
}
if (cAnnotation != null) {
tags.addAll(Arrays.asList(cAnnotat... | java | private static String mergeTags(ProbeTest mAnnotation, ProbeTestClass cAnnotation) {
List<String> tags = new ArrayList<>();
if (mAnnotation != null) {
tags.addAll(Arrays.asList(mAnnotation.tags()));
}
if (cAnnotation != null) {
tags.addAll(Arrays.asList(cAnnotat... | [
"private",
"static",
"String",
"mergeTags",
"(",
"ProbeTest",
"mAnnotation",
",",
"ProbeTestClass",
"cAnnotation",
")",
"{",
"List",
"<",
"String",
">",
"tags",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"mAnnotation",
"!=",
"null",
")",
"{",... | Create a string containing all the tags from method and class annotations
@param mAnnotation Method annotation
@param cAnnotation Class annotation
@return The string of tags | [
"Create",
"a",
"string",
"containing",
"all",
"the",
"tags",
"from",
"method",
"and",
"class",
"annotations"
] | 92ee6634ba4fe3fdffeb4e202f5372ef947a67c3 | https://github.com/probedock/probedock-java/blob/92ee6634ba4fe3fdffeb4e202f5372ef947a67c3/src/main/java/io/probedock/client/core/filters/FilterTargetData.java#L167-L179 | train | Merge the tags of the two ProbeTest and ProbeTestClass annotations into a single String. | Create a Java method that does the following: "Merge the tags of the two ProbeTest and ProbeTestClass annotations into a single String.". | Of course, here is the Java code you requested:
```java
private static String mergeTags(ProbeTest mAnnotation, ProbeTestClass cAnnotation) {
List<String> tags = new ArrayList<>();
if (mAnnotation != null) {
tags.addAll(Arrays.asList(mAnnotation.tags()));
}
if (cAnnotation ... | |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java | BigtableTableAdminClient.dropRowRangeAsync | @SuppressWarnings("WeakerAccess")
public ApiFuture<Void> dropRowRangeAsync(String tableId, ByteString rowKeyPrefix) {
DropRowRangeRequest request =
DropRowRangeRequest.newBuilder()
.setName(getTableName(tableId))
.setRowKeyPrefix(rowKeyPrefix)
.build();
return tran... | java | @SuppressWarnings("WeakerAccess")
public ApiFuture<Void> dropRowRangeAsync(String tableId, ByteString rowKeyPrefix) {
DropRowRangeRequest request =
DropRowRangeRequest.newBuilder()
.setName(getTableName(tableId))
.setRowKeyPrefix(rowKeyPrefix)
.build();
return tran... | [
"@",
"SuppressWarnings",
"(",
"\"WeakerAccess\"",
")",
"public",
"ApiFuture",
"<",
"Void",
">",
"dropRowRangeAsync",
"(",
"String",
"tableId",
",",
"ByteString",
"rowKeyPrefix",
")",
"{",
"DropRowRangeRequest",
"request",
"=",
"DropRowRangeRequest",
".",
"newBuilder",... | Drops rows by the specified key prefix and tableId asynchronously
<p>Please note that this method is considered part of the admin API and is rate limited.
<p>Sample code:
<pre>{@code
ApiFuture<Void> dropFuture = client.dropRowRangeAsync("my-table", ByteString.copyFromUtf8("prefix"));
ApiFutures.addCallback(
dropFut... | [
"Drops",
"rows",
"by",
"the",
"specified",
"key",
"prefix",
"and",
"tableId",
"asynchronously"
] | d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L690-L699 | train | Asynchronously drop a row range from a table. | Create a Java method that does the following: "Asynchronously drop a row range from a table.". | Of course, here is the Java code you requested:
```java
@SuppressWarnings("WeakerAccess")
public ApiFuture<Void> dropRowRangeAsync(String tableId, ByteString rowKeyPrefix) {
DropRowRangeRequest request =
DropRowRangeRequest.newBuilder()
.setName(getTableName(tableId))
.setRowKeyPr... | |
osglworks/java-tool | src/main/java/org/osgl/util/Str.java | Str.getChars | public void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin) {
s.getChars(srcBegin, srcEnd, dst, dstBegin);
} | java | public void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin) {
s.getChars(srcBegin, srcEnd, dst, dstBegin);
} | [
"public",
"void",
"getChars",
"(",
"int",
"srcBegin",
",",
"int",
"srcEnd",
",",
"char",
"dst",
"[",
"]",
",",
"int",
"dstBegin",
")",
"{",
"s",
".",
"getChars",
"(",
"srcBegin",
",",
"srcEnd",
",",
"dst",
",",
"dstBegin",
")",
";",
"}"
] | --- String utilities --- | [
"---",
"String",
"utilities",
"---"
] | 8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b | https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/Str.java#L376-L378 | train | Get chars from the source. | Create a Java method that does the following: "Get chars from the source.". | Of course, here is the Java code you requested:
```java
public void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin) {
s.getChars(srcBegin, srcEnd, dst, dstBegin);
}
```
Hope this helps! | |
FitLayout/tools | src/main/java/org/fit/layout/process/BaseProcessor.java | BaseProcessor.renderPage | public Page renderPage(BoxTreeProvider provider, Map<String, Object> params)
{
ServiceManager.setServiceParams(provider, params);
page = provider.getPage();
atree = null; //destroy the old area tree if any
return page;
} | java | public Page renderPage(BoxTreeProvider provider, Map<String, Object> params)
{
ServiceManager.setServiceParams(provider, params);
page = provider.getPage();
atree = null; //destroy the old area tree if any
return page;
} | [
"public",
"Page",
"renderPage",
"(",
"BoxTreeProvider",
"provider",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
")",
"{",
"ServiceManager",
".",
"setServiceParams",
"(",
"provider",
",",
"params",
")",
";",
"page",
"=",
"provider",
".",
"getPage... | ====================================================================================================== | [
"======================================================================================================"
] | 43a8e3f4ddf21a031d3ab7247b8d37310bda4856 | https://github.com/FitLayout/tools/blob/43a8e3f4ddf21a031d3ab7247b8d37310bda4856/src/main/java/org/fit/layout/process/BaseProcessor.java#L113-L119 | train | Render a page from a box tree provider. | Create a Java method that does the following: "Render a page from a box tree provider.". | Of course, here is the Java code you requested:
```java
public Page renderPage(BoxTreeProvider provider, Map<String, Object> params)
{
ServiceManager.setServiceParams(provider, params);
page = provider.getPage();
atree = null; //destroy the old area tree if any
return page;
}
``... | |
HiddenStage/divide | Client/android-client/src/main/java/com/google/android/gcm/GCMRegistrar.java | GCMRegistrar.checkDevice | public static void checkDevice(Context context) {
int version = Build.VERSION.SDK_INT;
if (version < 8) {
throw new UnsupportedOperationException("Device must be at least " +
"API Level 8 (instead of " + version + ")");
}
PackageManager packageManager = co... | java | public static void checkDevice(Context context) {
int version = Build.VERSION.SDK_INT;
if (version < 8) {
throw new UnsupportedOperationException("Device must be at least " +
"API Level 8 (instead of " + version + ")");
}
PackageManager packageManager = co... | [
"public",
"static",
"void",
"checkDevice",
"(",
"Context",
"context",
")",
"{",
"int",
"version",
"=",
"Build",
".",
"VERSION",
".",
"SDK_INT",
";",
"if",
"(",
"version",
"<",
"8",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Device mus... | Checks if the device has the proper dependencies installed.
<p>
This method should be called when the application starts to verify that
the device supports GCM.
@param context application context.
@throws UnsupportedOperationException if the device does not support GCM. | [
"Checks",
"if",
"the",
"device",
"has",
"the",
"proper",
"dependencies",
"installed",
".",
"<p",
">",
"This",
"method",
"should",
"be",
"called",
"when",
"the",
"application",
"starts",
"to",
"verify",
"that",
"the",
"device",
"supports",
"GCM",
"."
] | 14e36598c50d92b4393e6649915e32b86141c598 | https://github.com/HiddenStage/divide/blob/14e36598c50d92b4393e6649915e32b86141c598/Client/android-client/src/main/java/com/google/android/gcm/GCMRegistrar.java#L84-L97 | train | Check if device is API Level 8 | Create a Java method that does the following: "Check if device is API Level 8". | Of course, here is the Java code you requested:
```java
public static void checkDevice(Context context) {
int version = Build.VERSION.SDK_INT;
if (version < 8) {
throw new UnsupportedOperationException("Device must be at least " +
"API Level 8 (instead of " + version + "... | |
languagetool-org/languagetool | languagetool-core/src/main/java/org/languagetool/rules/spelling/suggestions/SuggestionsOrdererFeatureExtractor.java | SuggestionsOrdererFeatureExtractor.computeFeatures | public Pair<List<SuggestedReplacement>, SortedMap<String, Float>> computeFeatures(List<String> suggestions, String word, AnalyzedSentence sentence, int startPos) {
if (suggestions.isEmpty()) {
return Pair.of(Collections.emptyList(), Collections.emptySortedMap());
}
if (topN <= 0) {
topN = sugges... | java | public Pair<List<SuggestedReplacement>, SortedMap<String, Float>> computeFeatures(List<String> suggestions, String word, AnalyzedSentence sentence, int startPos) {
if (suggestions.isEmpty()) {
return Pair.of(Collections.emptyList(), Collections.emptySortedMap());
}
if (topN <= 0) {
topN = sugges... | [
"public",
"Pair",
"<",
"List",
"<",
"SuggestedReplacement",
">",
",",
"SortedMap",
"<",
"String",
",",
"Float",
">",
">",
"computeFeatures",
"(",
"List",
"<",
"String",
">",
"suggestions",
",",
"String",
"word",
",",
"AnalyzedSentence",
"sentence",
",",
"int... | compute features for training or prediction of a ranking model for suggestions
@param suggestions
@param word
@param sentence
@param startPos
@return correction candidates, features for the match in general, features specific to candidates | [
"compute",
"features",
"for",
"training",
"or",
"prediction",
"of",
"a",
"ranking",
"model",
"for",
"suggestions"
] | b7a3d63883d242fb2525877c6382681c57a0a142 | https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/rules/spelling/suggestions/SuggestionsOrdererFeatureExtractor.java#L92-L133 | train | Compute features for a sentence. | Create a Java method that does the following: "Compute features for a sentence.". | Of course, here is the Java code you requested:
```java
public Pair<List<SuggestedReplacement>, SortedMap<String, Float>> computeFeatures(List<String> suggestions, String word, AnalyzedSentence sentence, int startPos) {
if (suggestions.isEmpty()) {
return Pair.of(Collections.emptyList(), Collections.emptySor... | |
robolectric/robolectric | shadows/framework/src/main/java/org/robolectric/shadows/ShadowPackageManager.java | ShadowPackageManager.removeService | @Nullable
public ServiceInfo removeService(ComponentName componentName) {
return removeComponent(
componentName, serviceFilters, p -> p.services, (p, a) -> p.services = a);
} | java | @Nullable
public ServiceInfo removeService(ComponentName componentName) {
return removeComponent(
componentName, serviceFilters, p -> p.services, (p, a) -> p.services = a);
} | [
"@",
"Nullable",
"public",
"ServiceInfo",
"removeService",
"(",
"ComponentName",
"componentName",
")",
"{",
"return",
"removeComponent",
"(",
"componentName",
",",
"serviceFilters",
",",
"p",
"->",
"p",
".",
"services",
",",
"(",
"p",
",",
"a",
")",
"->",
"p... | Removes service from the package manager.
@return the removed component or {@code null} if no such component existed. | [
"Removes",
"service",
"from",
"the",
"package",
"manager",
"."
] | 4fa79a2c72f8abbf742ab920419653c207b41d62 | https://github.com/robolectric/robolectric/blob/4fa79a2c72f8abbf742ab920419653c207b41d62/shadows/framework/src/main/java/org/robolectric/shadows/ShadowPackageManager.java#L316-L320 | valid | Remove a service from the service list. | Create a Java method that does the following: "Remove a service from the service list.". | Of course, here is the Java code you requested:
```java
@Nullable
public ServiceInfo removeService(ComponentName componentName) {
return removeComponent(
componentName, serviceFilters, p -> p.services, (p, a) -> p.services = a);
}
```
Hope this helps! | |
michael-rapp/AndroidMaterialViews | library/src/main/java/de/mrapp/android/view/FloatingActionButton.java | FloatingActionButton.createStateListBackgroundDrawable | private Drawable createStateListBackgroundDrawable() {
StateListDrawable drawable = new StateListDrawable();
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
drawable.addState(new int[]{android.R.attr.state_enabled, android.R.attr.state_pressed},
createPressed... | java | private Drawable createStateListBackgroundDrawable() {
StateListDrawable drawable = new StateListDrawable();
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
drawable.addState(new int[]{android.R.attr.state_enabled, android.R.attr.state_pressed},
createPressed... | [
"private",
"Drawable",
"createStateListBackgroundDrawable",
"(",
")",
"{",
"StateListDrawable",
"drawable",
"=",
"new",
"StateListDrawable",
"(",
")",
";",
"if",
"(",
"Build",
".",
"VERSION",
".",
"SDK_INT",
"<",
"Build",
".",
"VERSION_CODES",
".",
"LOLLIPOP",
"... | Creates and returns a state list drawable, which can be used as the floating action button
background and adapts the background color depending on the button's current state.
@return The drawable, which has been created, as an instance of the class {@link Drawable} | [
"Creates",
"and",
"returns",
"a",
"state",
"list",
"drawable",
"which",
"can",
"be",
"used",
"as",
"the",
"floating",
"action",
"button",
"background",
"and",
"adapts",
"the",
"background",
"color",
"depending",
"on",
"the",
"button",
"s",
"current",
"state",
... | 398421be462fe5793c7e3a9212949e06236a7c2f | https://github.com/michael-rapp/AndroidMaterialViews/blob/398421be462fe5793c7e3a9212949e06236a7c2f/library/src/main/java/de/mrapp/android/view/FloatingActionButton.java#L361-L375 | valid | Create a StateListDrawable | Create a Java method that does the following: "Create a StateListDrawable". | Of course, here is the Java code you requested:
```java
private Drawable createStateListBackgroundDrawable() {
StateListDrawable drawable = new StateListDrawable();
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
drawable.addState(new int[]{android.R.attr.state_enabled, android... | |
dbracewell/hermes | hermes-wordnet/src/main/java/com/davidbracewell/hermes/wordnet/WordNet.java | WordNet.getInstance | public static WordNet getInstance() {
if (INSTANCE == null) {
synchronized (WordNet.class) {
if (INSTANCE == null) {
INSTANCE = new WordNet();
}
}
}
return INSTANCE;
} | java | public static WordNet getInstance() {
if (INSTANCE == null) {
synchronized (WordNet.class) {
if (INSTANCE == null) {
INSTANCE = new WordNet();
}
}
}
return INSTANCE;
} | [
"public",
"static",
"WordNet",
"getInstance",
"(",
")",
"{",
"if",
"(",
"INSTANCE",
"==",
"null",
")",
"{",
"synchronized",
"(",
"WordNet",
".",
"class",
")",
"{",
"if",
"(",
"INSTANCE",
"==",
"null",
")",
"{",
"INSTANCE",
"=",
"new",
"WordNet",
"(",
... | Gets instance.
@return the instance | [
"Gets",
"instance",
"."
] | 9ebefe7ad5dea1b731ae6931a30771eb75325ea3 | https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-wordnet/src/main/java/com/davidbracewell/hermes/wordnet/WordNet.java#L96-L105 | train | Get the instance of the WordNet class. | Create a Java method that does the following: "Get the instance of the WordNet class.". | Of course, here is the Java code you requested:
```java
public static WordNet getInstance() {
if (INSTANCE == null) {
synchronized (WordNet.class) {
if (INSTANCE == null) {
INSTANCE = new WordNet();
}
}
}
return INSTANC... | |
ibm-bluemix-mobile-services/bms-clientsdk-android-core | lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/core/internal/ResponseImpl.java | ResponseImpl.getResponseJSON | public JSONObject getResponseJSON() {
String responseText = getResponseText();
if(responseText == null || responseText.length() == 0){
return null;
}
try {
return new JSONObject(responseText);
} catch (JSONException e) {
logger.warn("Failed t... | java | public JSONObject getResponseJSON() {
String responseText = getResponseText();
if(responseText == null || responseText.length() == 0){
return null;
}
try {
return new JSONObject(responseText);
} catch (JSONException e) {
logger.warn("Failed t... | [
"public",
"JSONObject",
"getResponseJSON",
"(",
")",
"{",
"String",
"responseText",
"=",
"getResponseText",
"(",
")",
";",
"if",
"(",
"responseText",
"==",
"null",
"||",
"responseText",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"null",
";",
... | This method parses the response body as a JSONObject.
If this method is called, then subsequent calls to {@link #getResponseByteStream()} or {@link #getResponseBytes()}
will return null unless the {@link Request} was made using a <code>download()</code> method.
@return The body of the response as a JSONObject. | [
"This",
"method",
"parses",
"the",
"response",
"body",
"as",
"a",
"JSONObject",
".",
"If",
"this",
"method",
"is",
"called",
"then",
"subsequent",
"calls",
"to",
"{",
"@link",
"#getResponseByteStream",
"()",
"}",
"or",
"{",
"@link",
"#getResponseBytes",
"()",
... | 8db4f00d0d564792397bfc0e5bd57d52a238b858 | https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/core/internal/ResponseImpl.java#L136-L149 | train | Gets the response text as a JSONObject. | Create a Java method that does the following: "Gets the response text as a JSONObject.". | Of course, here is the Java code you requested:
```java
public JSONObject getResponseJSON() {
String responseText = getResponseText();
if(responseText == null || responseText.length() == 0){
return null;
}
try {
return new JSONObject(responseText);
} ca... | |
BorderTech/wcomponents | wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/HttpServletHelper.java | HttpServletHelper.createEnvironment | @Override
protected Environment createEnvironment() {
HttpServletRequest request = getBackingRequest();
String postPath = getResponseUrl(request);
String baseUrl = getBaseUrl(request);
String userAgent = request.getHeader("user-agent");
/**
* Careful - this won't be serializable
*/
HttpServletEnviro... | java | @Override
protected Environment createEnvironment() {
HttpServletRequest request = getBackingRequest();
String postPath = getResponseUrl(request);
String baseUrl = getBaseUrl(request);
String userAgent = request.getHeader("user-agent");
/**
* Careful - this won't be serializable
*/
HttpServletEnviro... | [
"@",
"Override",
"protected",
"Environment",
"createEnvironment",
"(",
")",
"{",
"HttpServletRequest",
"request",
"=",
"getBackingRequest",
"(",
")",
";",
"String",
"postPath",
"=",
"getResponseUrl",
"(",
"request",
")",
";",
"String",
"baseUrl",
"=",
"getBaseUrl"... | {@inheritDoc} | [
"{"
] | d1a2b2243270067db030feb36ca74255aaa94436 | https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/HttpServletHelper.java#L211-L227 | train | Create an environment object. | Create a Java method that does the following: "Create an environment object.". | Of course, here is the Java code you requested:
```java
@Override
protected Environment createEnvironment() {
HttpServletRequest request = getBackingRequest();
String postPath = getResponseUrl(request);
String baseUrl = getBaseUrl(request);
String userAgent = request.getHeader("user-agent");
/**
* Caref... | |
aws/aws-sdk-java | aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/AWSIotClient.java | AWSIotClient.describeIndex | @Override
public DescribeIndexResult describeIndex(DescribeIndexRequest request) {
request = beforeClientExecution(request);
return executeDescribeIndex(request);
} | java | @Override
public DescribeIndexResult describeIndex(DescribeIndexRequest request) {
request = beforeClientExecution(request);
return executeDescribeIndex(request);
} | [
"@",
"Override",
"public",
"DescribeIndexResult",
"describeIndex",
"(",
"DescribeIndexRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeIndex",
"(",
"request",
")",
";",
"}"
] | <p>
Describes a search index.
</p>
@param describeIndexRequest
@return Result of the DescribeIndex operation returned by the service.
@throws InvalidRequestException
The request is not valid.
@throws ThrottlingException
The rate exceeds the limit.
@throws UnauthorizedException
You are not authorized to perform this op... | [
"<p",
">",
"Describes",
"a",
"search",
"index",
".",
"<",
"/",
"p",
">"
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/AWSIotClient.java#L4349-L4353 | train | Retrieves the description of an index. | Create a Java method that does the following: "Retrieves the description of an index.". | Of course, here is the Java code you requested:
```java
@Override
public DescribeIndexResult describeIndex(DescribeIndexRequest request) {
request = beforeClientExecution(request);
return executeDescribeIndex(request);
}
```
Hope this helps! | |
orbisgis/poly2tri.java | poly2tri-core/src/main/java/org/poly2tri/triangulation/delaunay/DelaunayTriangle.java | DelaunayTriangle.markConstrainedEdge | public void markConstrainedEdge( TriangulationPoint p, TriangulationPoint q )
{
if( ( q == points[0] && p == points[1] ) || ( q == points[1] && p == points[0] ) )
{
cEdge[2] = true;
}
else if( ( q == points[0] && p == points[2] ) || ( q == points[2] && p == points[0] ) )
... | java | public void markConstrainedEdge( TriangulationPoint p, TriangulationPoint q )
{
if( ( q == points[0] && p == points[1] ) || ( q == points[1] && p == points[0] ) )
{
cEdge[2] = true;
}
else if( ( q == points[0] && p == points[2] ) || ( q == points[2] && p == points[0] ) )
... | [
"public",
"void",
"markConstrainedEdge",
"(",
"TriangulationPoint",
"p",
",",
"TriangulationPoint",
"q",
")",
"{",
"if",
"(",
"(",
"q",
"==",
"points",
"[",
"0",
"]",
"&&",
"p",
"==",
"points",
"[",
"1",
"]",
")",
"||",
"(",
"q",
"==",
"points",
"[",... | Mark edge as constrained | [
"Mark",
"edge",
"as",
"constrained"
] | 8b312c8d5fc23c52ffbacb3a7b66afae328fa827 | https://github.com/orbisgis/poly2tri.java/blob/8b312c8d5fc23c52ffbacb3a7b66afae328fa827/poly2tri-core/src/main/java/org/poly2tri/triangulation/delaunay/DelaunayTriangle.java#L448-L462 | train | Mark a edge of a TriangulationPoint as constrained. | Create a Java method that does the following: "Mark a edge of a TriangulationPoint as constrained.". | Of course, here is the Java code you requested:
```java
public void markConstrainedEdge( TriangulationPoint p, TriangulationPoint q )
{
if( ( q == points[0] && p == points[1] ) || ( q == points[1] && p == points[0] ) )
{
cEdge[2] = true;
}
else if( ( q == points[0] && p ... | |
m-m-m/util | contenttype/src/main/java/net/sf/mmm/util/contenttype/base/format/Segment.java | Segment.validate | public final void validate(StringBuilder source) {
int length = source.length();
source.append('/');
source.append(getSourceIdentifier());
doValidate(source);
// reset source for recursive invocation...
source.setLength(length);
} | java | public final void validate(StringBuilder source) {
int length = source.length();
source.append('/');
source.append(getSourceIdentifier());
doValidate(source);
// reset source for recursive invocation...
source.setLength(length);
} | [
"public",
"final",
"void",
"validate",
"(",
"StringBuilder",
"source",
")",
"{",
"int",
"length",
"=",
"source",
".",
"length",
"(",
")",
";",
"source",
".",
"append",
"(",
"'",
"'",
")",
";",
"source",
".",
"append",
"(",
"getSourceIdentifier",
"(",
"... | This method validates this segment recursively to ensure the correctness of the configured format.
@param source describes the source of the validation. | [
"This",
"method",
"validates",
"this",
"segment",
"recursively",
"to",
"ensure",
"the",
"correctness",
"of",
"the",
"configured",
"format",
"."
] | f0e4e084448f8dfc83ca682a9e1618034a094ce6 | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/contenttype/src/main/java/net/sf/mmm/util/contenttype/base/format/Segment.java#L99-L107 | train | Validate the sequence of tokens. | Create a Java method that does the following: "Validate the sequence of tokens.". | Of course, here is the Java code you requested:
```java
public final void validate(StringBuilder source) {
int length = source.length();
source.append('/');
source.append(getSourceIdentifier());
doValidate(source);
// reset source for recursive invocation...
source.setLength(length);
}
```
... | |
google/closure-templates | java/src/com/google/template/soy/passes/htmlmatcher/HtmlTagMatchingPass.java | HtmlTagMatchingPass.run | public void run(HtmlMatcherGraph htmlMatcherGraph) {
if (!htmlMatcherGraph.getRootNode().isPresent()) {
// Empty graph.
return;
}
visit(htmlMatcherGraph.getRootNode().get());
for (HtmlTagNode tag : annotationMap.keySet()) {
if (tag instanceof HtmlOpenTagNode) {
HtmlOpenTagNode ... | java | public void run(HtmlMatcherGraph htmlMatcherGraph) {
if (!htmlMatcherGraph.getRootNode().isPresent()) {
// Empty graph.
return;
}
visit(htmlMatcherGraph.getRootNode().get());
for (HtmlTagNode tag : annotationMap.keySet()) {
if (tag instanceof HtmlOpenTagNode) {
HtmlOpenTagNode ... | [
"public",
"void",
"run",
"(",
"HtmlMatcherGraph",
"htmlMatcherGraph",
")",
"{",
"if",
"(",
"!",
"htmlMatcherGraph",
".",
"getRootNode",
"(",
")",
".",
"isPresent",
"(",
")",
")",
"{",
"// Empty graph.",
"return",
";",
"}",
"visit",
"(",
"htmlMatcherGraph",
"... | Runs the HtmlTagMatchingPass.
<p>The pass does the following:
<ol>
<li>Traverse the HTML matcher graph and create a set of open -> close tag matches
<li>Rebalance the code paths, injecting synthetic close tags to balance optional open tags.
Optional open tags are defined here: <a
href="https://www.w3.org/TR/html5/syn... | [
"Runs",
"the",
"HtmlTagMatchingPass",
"."
] | cc61e1dff70ae97f24f417a57410081bc498bd56 | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/passes/htmlmatcher/HtmlTagMatchingPass.java#L177-L211 | train | Run the algorithm. | Create a Java method that does the following: "Run the algorithm.". | Of course, here is the Java code you requested:
```java
public void run(HtmlMatcherGraph htmlMatcherGraph) {
if (!htmlMatcherGraph.getRootNode().isPresent()) {
// Empty graph.
return;
}
visit(htmlMatcherGraph.getRootNode().get());
for (HtmlTagNode tag : annotationMap.keySet()) {
if (t... | |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/SchemaStore.java | SchemaStore.loadSchemas | static void loadSchemas(MessageStore msgStore, long[] schemaIds) throws MessageRestoreFailedException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "loadSchemas");
try {
// Get the SchemaStore reference, creating a new one if necessary
SchemaStoreItemStream schem... | java | static void loadSchemas(MessageStore msgStore, long[] schemaIds) throws MessageRestoreFailedException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "loadSchemas");
try {
// Get the SchemaStore reference, creating a new one if necessary
SchemaStoreItemStream schem... | [
"static",
"void",
"loadSchemas",
"(",
"MessageStore",
"msgStore",
",",
"long",
"[",
"]",
"schemaIds",
")",
"throws",
"MessageRestoreFailedException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
... | decode the message that are not already in the JMF registry must be reloaded | [
"decode",
"the",
"message",
"that",
"are",
"not",
"already",
"in",
"the",
"JMF",
"registry",
"must",
"be",
"reloaded"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/SchemaStore.java#L75-L96 | train | Load the schemas from the message store. | Create a Java method that does the following: "Load the schemas from the message store.". | Of course, here is the Java code you requested:
```java
static void loadSchemas(MessageStore msgStore, long[] schemaIds) throws MessageRestoreFailedException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "loadSchemas");
try {
// Get the SchemaStore reference, creating... | |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/tool/PatchOperationTarget.java | PatchOperationTarget.createHost | public static final PatchOperationTarget createHost(final String hostName, final ModelControllerClient client) {
final PathElement host = PathElement.pathElement(HOST, hostName);
final PathAddress address = PathAddress.EMPTY_ADDRESS.append(host, CORE_SERVICES);
return new RemotePatchOperationTar... | java | public static final PatchOperationTarget createHost(final String hostName, final ModelControllerClient client) {
final PathElement host = PathElement.pathElement(HOST, hostName);
final PathAddress address = PathAddress.EMPTY_ADDRESS.append(host, CORE_SERVICES);
return new RemotePatchOperationTar... | [
"public",
"static",
"final",
"PatchOperationTarget",
"createHost",
"(",
"final",
"String",
"hostName",
",",
"final",
"ModelControllerClient",
"client",
")",
"{",
"final",
"PathElement",
"host",
"=",
"PathElement",
".",
"pathElement",
"(",
"HOST",
",",
"hostName",
... | Create a host target.
@param hostName the host name
@param client the connected controller client to the master host.
@return the remote target | [
"Create",
"a",
"host",
"target",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/tool/PatchOperationTarget.java#L99-L103 | train | Create a host patch target. | Create a Java method that does the following: "Create a host patch target.". | Of course, here is the Java code you requested:
```java
public static final PatchOperationTarget createHost(final String hostName, final ModelControllerClient client) {
final PathElement host = PathElement.pathElement(HOST, hostName);
final PathAddress address = PathAddress.EMPTY_ADDRESS.append(host, C... | |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/locking/LockHelper.java | LockHelper.getIsolationLevelFor | public static int getIsolationLevelFor(String isoLevel)
{
if(isoLevel == null || StringUtils.isEmpty(isoLevel))
{
LoggerFactory.getDefaultLogger().debug(
"[LockHelper] Specified isolation level string is 'null', using the default isolation level");
r... | java | public static int getIsolationLevelFor(String isoLevel)
{
if(isoLevel == null || StringUtils.isEmpty(isoLevel))
{
LoggerFactory.getDefaultLogger().debug(
"[LockHelper] Specified isolation level string is 'null', using the default isolation level");
r... | [
"public",
"static",
"int",
"getIsolationLevelFor",
"(",
"String",
"isoLevel",
")",
"{",
"if",
"(",
"isoLevel",
"==",
"null",
"||",
"StringUtils",
".",
"isEmpty",
"(",
"isoLevel",
")",
")",
"{",
"LoggerFactory",
".",
"getDefaultLogger",
"(",
")",
".",
"debug"... | maps IsolationLevel literals to the corresponding id
@param isoLevel
@return the id | [
"maps",
"IsolationLevel",
"literals",
"to",
"the",
"corresponding",
"id"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/locking/LockHelper.java#L36-L70 | train | Gets the isolation level for the specified ISO Level. | Create a Java method that does the following: "Gets the isolation level for the specified ISO Level.". | Of course, here is the Java code you requested:
```java
public static int getIsolationLevelFor(String isoLevel)
{
if(isoLevel == null || StringUtils.isEmpty(isoLevel))
{
LoggerFactory.getDefaultLogger().debug(
"[LockHelper] Specified isolation level string is 'n... | |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedCollator.java | RuleBasedCollator.getUCAVersion | @Override
public VersionInfo getUCAVersion() {
VersionInfo v = getVersion();
// Note: This is tied to how the current implementation encodes the UCA version
// in the overall getVersion().
// Alternatively, we could load the root collator and get at lower-level data from there.
... | java | @Override
public VersionInfo getUCAVersion() {
VersionInfo v = getVersion();
// Note: This is tied to how the current implementation encodes the UCA version
// in the overall getVersion().
// Alternatively, we could load the root collator and get at lower-level data from there.
... | [
"@",
"Override",
"public",
"VersionInfo",
"getUCAVersion",
"(",
")",
"{",
"VersionInfo",
"v",
"=",
"getVersion",
"(",
")",
";",
"// Note: This is tied to how the current implementation encodes the UCA version",
"// in the overall getVersion().",
"// Alternatively, we could load the... | Get the UCA version of this collator object.
@return the version object associated with this collator | [
"Get",
"the",
"UCA",
"version",
"of",
"this",
"collator",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedCollator.java#L1769-L1780 | train | Get the UCA version information. | Create a Java method that does the following: "Get the UCA version information.". | Of course, here is the Java code you requested:
```java
@Override
public VersionInfo getUCAVersion() {
VersionInfo v = getVersion();
// Note: This is tied to how the current implementation encodes the UCA version
// in the overall getVersion().
// Alternatively, we could load the ro... | |
Deep-Symmetry/beat-link | src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java | MetadataFinder.deliverCacheUpdate | private void deliverCacheUpdate(SlotReference slot, MetadataCache cache) {
for (final MetadataCacheListener listener : getCacheListeners()) {
try {
if (cache == null) {
listener.cacheDetached(slot);
} else {
listener.cacheAttach... | java | private void deliverCacheUpdate(SlotReference slot, MetadataCache cache) {
for (final MetadataCacheListener listener : getCacheListeners()) {
try {
if (cache == null) {
listener.cacheDetached(slot);
} else {
listener.cacheAttach... | [
"private",
"void",
"deliverCacheUpdate",
"(",
"SlotReference",
"slot",
",",
"MetadataCache",
"cache",
")",
"{",
"for",
"(",
"final",
"MetadataCacheListener",
"listener",
":",
"getCacheListeners",
"(",
")",
")",
"{",
"try",
"{",
"if",
"(",
"cache",
"==",
"null"... | Send a metadata cache update announcement to all registered listeners.
@param slot the media slot whose cache status has changed
@param cache the cache which has been attached, or, if {@code null}, the previous cache has been detached | [
"Send",
"a",
"metadata",
"cache",
"update",
"announcement",
"to",
"all",
"registered",
"listeners",
"."
] | f958a2a70e8a87a31a75326d7b4db77c2f0b4212 | https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java#L952-L964 | train | Send a cache update to all registered listeners. | Create a Java method that does the following: "Send a cache update to all registered listeners.". | Of course, here is the Java code you requested:
```java
private void deliverCacheUpdate(SlotReference slot, MetadataCache cache) {
for (final MetadataCacheListener listener : getCacheListeners()) {
try {
if (cache == null) {
listener.cacheDetached(slot);
... | |
ibm-bluemix-mobile-services/bms-clientsdk-android-analytics | lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/logger/api/LogPersister.java | LogPersister.isUnCaughtExceptionDetected | static public boolean isUnCaughtExceptionDetected () {
if (context == null) {
if (!context_null_msg_already_printed) {
Log.w(LOG_TAG_NAME, CONTEXT_NULL_MSG);
context_null_msg_already_printed = true;
}
return false;
}
return cont... | java | static public boolean isUnCaughtExceptionDetected () {
if (context == null) {
if (!context_null_msg_already_printed) {
Log.w(LOG_TAG_NAME, CONTEXT_NULL_MSG);
context_null_msg_already_printed = true;
}
return false;
}
return cont... | [
"static",
"public",
"boolean",
"isUnCaughtExceptionDetected",
"(",
")",
"{",
"if",
"(",
"context",
"==",
"null",
")",
"{",
"if",
"(",
"!",
"context_null_msg_already_printed",
")",
"{",
"Log",
".",
"w",
"(",
"LOG_TAG_NAME",
",",
"CONTEXT_NULL_MSG",
")",
";",
... | Ask the Logger if an uncaught exception, which often appears to the user as a crashed app, is present in the persistent capture buffer.
This method should not be called after calling {@link com.ibm.mobilefirstplatform.clientsdk.android.core.api.BMSClient#initialize(Context, String, String, String)}. If it is called to... | [
"Ask",
"the",
"Logger",
"if",
"an",
"uncaught",
"exception",
"which",
"often",
"appears",
"to",
"the",
"user",
"as",
"a",
"crashed",
"app",
"is",
"present",
"in",
"the",
"persistent",
"capture",
"buffer",
".",
"This",
"method",
"should",
"not",
"be",
"call... | 40f1256e3c970fd008dd69c316493f609b89ec24 | https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-analytics/blob/40f1256e3c970fd008dd69c316493f609b89ec24/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/logger/api/LogPersister.java#L585-L594 | test | isUnCaughtExceptionDetected This method returns true if an exception has been detected. | Create a Java method that does the following: "isUnCaughtExceptionDetected This method returns true if an exception has been detected.". | Of course, here is the Java code you requested:
```java
static public boolean isUnCaughtExceptionDetected () {
if (context == null) {
if (!context_null_msg_already_printed) {
Log.w(LOG_TAG_NAME, CONTEXT_NULL_MSG);
context_null_msg_already_printed = true;
... | |
Red5/red5-io | src/main/java/org/red5/cache/impl/EhCacheImpl.java | EhCacheImpl.destroy | @Override
public void destroy() {
// Shut down the cache manager
try {
CacheManager.getInstance().shutdown();
} catch (Exception e) {
log.warn("Error on cache shutdown", e);
}
} | java | @Override
public void destroy() {
// Shut down the cache manager
try {
CacheManager.getInstance().shutdown();
} catch (Exception e) {
log.warn("Error on cache shutdown", e);
}
} | [
"@",
"Override",
"public",
"void",
"destroy",
"(",
")",
"{",
"// Shut down the cache manager",
"try",
"{",
"CacheManager",
".",
"getInstance",
"(",
")",
".",
"shutdown",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"log",
".",
"warn",
"(... | {@inheritDoc} | [
"{"
] | 9bbbc506423c5a8f18169d46d400df56c0072a33 | https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/cache/impl/EhCacheImpl.java#L317-L325 | train | Destroy the cache. | Create a Java method that does the following: "Destroy the cache.". | Of course, here is the Java code you requested:
```java
@Override
public void destroy() {
// Shut down the cache manager
try {
CacheManager.getInstance().shutdown();
} catch (Exception e) {
log.warn("Error on cache shutdown", e);
}
}
```
Hope this helps! | |
JRebirth/JRebirth | org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/editor/EditorModel.java | EditorModel.doStop | public void doStop(final Wave wave) {
for (int i = this.timeFrame; i >= 0; i--) {
hideCurrent(this.eventList.get(this.timeFrame));
}
} | java | public void doStop(final Wave wave) {
for (int i = this.timeFrame; i >= 0; i--) {
hideCurrent(this.eventList.get(this.timeFrame));
}
} | [
"public",
"void",
"doStop",
"(",
"final",
"Wave",
"wave",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"this",
".",
"timeFrame",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"hideCurrent",
"(",
"this",
".",
"eventList",
".",
"get",
"(",
"this",
".",
... | Call when event stop button is pressed.
@param wave the wave received | [
"Call",
"when",
"event",
"stop",
"button",
"is",
"pressed",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/editor/EditorModel.java#L170-L174 | train | Stop the calendar. | Create a Java method that does the following: "Stop the calendar.". | Of course, here is the Java code you requested:
```java
public void doStop(final Wave wave) {
for (int i = this.timeFrame; i >= 0; i--) {
hideCurrent(this.eventList.get(this.timeFrame));
}
}
```
Hope this helps! | |
lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/beans/AbstractMemberPropertyAccessor.java | AbstractMemberPropertyAccessor.getPropertyName | protected String getPropertyName(String methodName, int prefixLength) {
return Character.toLowerCase(methodName.charAt(prefixLength)) + methodName.substring(prefixLength + 1);
} | java | protected String getPropertyName(String methodName, int prefixLength) {
return Character.toLowerCase(methodName.charAt(prefixLength)) + methodName.substring(prefixLength + 1);
} | [
"protected",
"String",
"getPropertyName",
"(",
"String",
"methodName",
",",
"int",
"prefixLength",
")",
"{",
"return",
"Character",
".",
"toLowerCase",
"(",
"methodName",
".",
"charAt",
"(",
"prefixLength",
")",
")",
"+",
"methodName",
".",
"substring",
"(",
"... | Returns the propertyName based on the methodName. Cuts of the prefix and
removes first capital.
@param methodName name of method to convert.
@param prefixLength length of prefix to cut of.
@return property name. | [
"Returns",
"the",
"propertyName",
"based",
"on",
"the",
"methodName",
".",
"Cuts",
"of",
"the",
"prefix",
"and",
"removes",
"first",
"capital",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/beans/AbstractMemberPropertyAccessor.java#L370-L372 | train | Get property name from method name. | Create a Java method that does the following: "Get property name from method name.". | Of course, here is the Java code you requested:
```java
protected String getPropertyName(String methodName, int prefixLength) {
return Character.toLowerCase(methodName.charAt(prefixLength)) + methodName.substring(prefixLength + 1);
}
```
Hope this helps! | |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-data/deeplearning4j-utility-iterators/src/main/java/org/deeplearning4j/datasets/iterator/MultiDataSetIteratorSplitter.java | MultiDataSetIteratorSplitter.getTrainIterator | public MultiDataSetIterator getTrainIterator() {
return new MultiDataSetIterator() {
@Override
public MultiDataSet next(int num) {
throw new UnsupportedOperationException("To be implemented yet");
}
@Override
public void setPreProcesso... | java | public MultiDataSetIterator getTrainIterator() {
return new MultiDataSetIterator() {
@Override
public MultiDataSet next(int num) {
throw new UnsupportedOperationException("To be implemented yet");
}
@Override
public void setPreProcesso... | [
"public",
"MultiDataSetIterator",
"getTrainIterator",
"(",
")",
"{",
"return",
"new",
"MultiDataSetIterator",
"(",
")",
"{",
"@",
"Override",
"public",
"MultiDataSet",
"next",
"(",
"int",
"num",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"To... | This method returns train iterator instance
@return | [
"This",
"method",
"returns",
"train",
"iterator",
"instance"
] | effce52f2afd7eeb53c5bcca699fcd90bd06822f | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-data/deeplearning4j-utility-iterators/src/main/java/org/deeplearning4j/datasets/iterator/MultiDataSetIteratorSplitter.java#L83-L158 | train | Returns an iterator that iterates over the training data set. | Create a Java method that does the following: "Returns an iterator that iterates over the training data set.". | Of course, here is the Java code you requested:
```java
public MultiDataSetIterator getTrainIterator() {
return new MultiDataSetIterator() {
@Override
public MultiDataSet next(int num) {
throw new UnsupportedOperationException("To be implemented yet");
}
... | |
apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/publisher/BaseDataPublisher.java | BaseDataPublisher.publishMetadata | @Override
public void publishMetadata(Collection<? extends WorkUnitState> states)
throws IOException {
Set<String> partitions = new HashSet<>();
// There should be one merged metadata file per branch; first merge all of the pieces together
mergeMetadataAndCollectPartitionNames(states, partitions);
... | java | @Override
public void publishMetadata(Collection<? extends WorkUnitState> states)
throws IOException {
Set<String> partitions = new HashSet<>();
// There should be one merged metadata file per branch; first merge all of the pieces together
mergeMetadataAndCollectPartitionNames(states, partitions);
... | [
"@",
"Override",
"public",
"void",
"publishMetadata",
"(",
"Collection",
"<",
"?",
"extends",
"WorkUnitState",
">",
"states",
")",
"throws",
"IOException",
"{",
"Set",
"<",
"String",
">",
"partitions",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"// There sh... | Merge all of the metadata output from each work-unit and publish the merged record.
@param states States from all tasks
@throws IOException If there is an error publishing the file | [
"Merge",
"all",
"of",
"the",
"metadata",
"output",
"from",
"each",
"work",
"-",
"unit",
"and",
"publish",
"the",
"merged",
"record",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/publisher/BaseDataPublisher.java#L539-L576 | train | Publish metadata for a collection of work units. | Create a Java method that does the following: "Publish metadata for a collection of work units.". | Of course, here is the Java code you requested:
```java
@Override
public void publishMetadata(Collection<? extends WorkUnitState> states)
throws IOException {
Set<String> partitions = new HashSet<>();
// There should be one merged metadata file per branch; first merge all of the pieces together
mer... | |
mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/sort/quadratic/Selection.java | Selection.sort | public static void sort(double[] doubleArray) {
int index = 0;
double value = 0.0;
for(int i = 1; i < doubleArray.length; i++) {
index = i;
value = doubleArray[index];
while(index > 0 && value < doubleArray[index - 1]) {
d... | java | public static void sort(double[] doubleArray) {
int index = 0;
double value = 0.0;
for(int i = 1; i < doubleArray.length; i++) {
index = i;
value = doubleArray[index];
while(index > 0 && value < doubleArray[index - 1]) {
d... | [
"public",
"static",
"void",
"sort",
"(",
"double",
"[",
"]",
"doubleArray",
")",
"{",
"int",
"index",
"=",
"0",
";",
"double",
"value",
"=",
"0.0",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"doubleArray",
".",
"length",
";",
"i",
"++"... | Sort the double array in ascending order using this algorithm.
@param doubleArray the array of double that we want to sort | [
"Sort",
"the",
"double",
"array",
"in",
"ascending",
"order",
"using",
"this",
"algorithm",
"."
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/sort/quadratic/Selection.java#L151-L167 | train | Sort the double array. | Create a Java method that does the following: "Sort the double array.". | Of course, here is the Java code you requested:
```java
public static void sort(double[] doubleArray) {
int index = 0;
double value = 0.0;
for(int i = 1; i < doubleArray.length; i++) {
index = i;
value = doubleArray[index];
while(index >... | |
davidmarquis/fluent-interface-proxy | src/main/java/com/fluentinterface/utils/GenericsUtils.java | GenericsUtils.getDeclaredGenericType | public static Class<?> getDeclaredGenericType(Class<?> clazz, Class<?> genericInterface) {
Type[] genericInterfaces = clazz.getGenericInterfaces();
for (Type genericType : genericInterfaces) {
if (genericType instanceof ParameterizedType) {
ParameterizedType paramType = (Para... | java | public static Class<?> getDeclaredGenericType(Class<?> clazz, Class<?> genericInterface) {
Type[] genericInterfaces = clazz.getGenericInterfaces();
for (Type genericType : genericInterfaces) {
if (genericType instanceof ParameterizedType) {
ParameterizedType paramType = (Para... | [
"public",
"static",
"Class",
"<",
"?",
">",
"getDeclaredGenericType",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"Class",
"<",
"?",
">",
"genericInterface",
")",
"{",
"Type",
"[",
"]",
"genericInterfaces",
"=",
"clazz",
".",
"getGenericInterfaces",
"(",
")... | Finds the generic type declared on a single interface implemented by the provided class.
If the generic type is itself a generic type (ex: <pre>{@code SomeType<SomeOtherType<T>>}</pre>,
the actual raw type will be returned (in the previous example, `SomeOtherType` would be returned).
@param clazz the class ... | [
"Finds",
"the",
"generic",
"type",
"declared",
"on",
"a",
"single",
"interface",
"implemented",
"by",
"the",
"provided",
"class",
".",
"If",
"the",
"generic",
"type",
"is",
"itself",
"a",
"generic",
"type",
"(",
"ex",
":",
"<pre",
">",
"{",
"@code",
"Som... | 8e72fff6cd1f496c76a01773269caead994fea65 | https://github.com/davidmarquis/fluent-interface-proxy/blob/8e72fff6cd1f496c76a01773269caead994fea65/src/main/java/com/fluentinterface/utils/GenericsUtils.java#L17-L29 | train | Gets the declared generic type. | Create a Java method that does the following: "Gets the declared generic type.". | Of course, here is the Java code you requested:
```java
public static Class<?> getDeclaredGenericType(Class<?> clazz, Class<?> genericInterface) {
Type[] genericInterfaces = clazz.getGenericInterfaces();
for (Type genericType : genericInterfaces) {
if (genericType instanceof ParameterizedTy... | |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/util/MultipleAlignmentDisplay.java | MultipleAlignmentDisplay.getRotatedAtoms | public static List<Atom[]> getRotatedAtoms(MultipleAlignment multAln)
throws StructureException {
int size = multAln.size();
List<Atom[]> atomArrays = multAln.getAtomArrays();
for (int i = 0; i < size; i++) {
if (atomArrays.get(i).length < 1)
throw new StructureException(
"Length of atoms arrays... | java | public static List<Atom[]> getRotatedAtoms(MultipleAlignment multAln)
throws StructureException {
int size = multAln.size();
List<Atom[]> atomArrays = multAln.getAtomArrays();
for (int i = 0; i < size; i++) {
if (atomArrays.get(i).length < 1)
throw new StructureException(
"Length of atoms arrays... | [
"public",
"static",
"List",
"<",
"Atom",
"[",
"]",
">",
"getRotatedAtoms",
"(",
"MultipleAlignment",
"multAln",
")",
"throws",
"StructureException",
"{",
"int",
"size",
"=",
"multAln",
".",
"size",
"(",
")",
";",
"List",
"<",
"Atom",
"[",
"]",
">",
"atom... | New structures are downloaded if they were not cached in the alignment
and they are entirely transformed here with the superposition information
in the Multiple Alignment.
@param multAln
@return list of transformed AtomArrays
@throws StructureException | [
"New",
"structures",
"are",
"downloaded",
"if",
"they",
"were",
"not",
"cached",
"in",
"the",
"alignment",
"and",
"they",
"are",
"entirely",
"transformed",
"here",
"with",
"the",
"superposition",
"information",
"in",
"the",
"Multiple",
"Alignment",
"."
] | a1c71a8e3d40cc32104b1d387a3d3b560b43356e | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/util/MultipleAlignmentDisplay.java#L59-L115 | train | Get the rotated atoms of the MultipleAlignment | Create a Java method that does the following: "Get the rotated atoms of the MultipleAlignment". | Of course, here is the Java code you requested:
```java
public static List<Atom[]> getRotatedAtoms(MultipleAlignment multAln)
throws StructureException {
int size = multAln.size();
List<Atom[]> atomArrays = multAln.getAtomArrays();
for (int i = 0; i < size; i++) {
if (atomArrays.get(i).length < 1)
th... | |
fang-yan-peng/eagle | eagle-core/src/main/java/eagle/jfaster/org/logging/StringUtil.java | StringUtil.split | public static String[] split(String value, char delim) {
final int end = value.length();
final List<String> res = new ArrayList<String>();
int start = 0;
for (int i = 0; i < end; i++) {
if (value.charAt(i) == delim) {
if (start == i) {
res... | java | public static String[] split(String value, char delim) {
final int end = value.length();
final List<String> res = new ArrayList<String>();
int start = 0;
for (int i = 0; i < end; i++) {
if (value.charAt(i) == delim) {
if (start == i) {
res... | [
"public",
"static",
"String",
"[",
"]",
"split",
"(",
"String",
"value",
",",
"char",
"delim",
")",
"{",
"final",
"int",
"end",
"=",
"value",
".",
"length",
"(",
")",
";",
"final",
"List",
"<",
"String",
">",
"res",
"=",
"new",
"ArrayList",
"<",
"S... | Splits the specified {@link String} with the specified delimiter. This operation is a simplified and optimized
version of {@link String#split(String)}. | [
"Splits",
"the",
"specified",
"{"
] | f19f42194f7918ac01c576689f61736c1efb4483 | https://github.com/fang-yan-peng/eagle/blob/f19f42194f7918ac01c576689f61736c1efb4483/eagle-core/src/main/java/eagle/jfaster/org/logging/StringUtil.java#L53-L88 | valid | Split the string value into an array of strings. | Create a Java method that does the following: "Split the string value into an array of strings.". | Of course, here is the Java code you requested:
```java
public static String[] split(String value, char delim) {
final int end = value.length();
final List<String> res = new ArrayList<String>();
int start = 0;
for (int i = 0; i < end; i++) {
if (value.charAt(i) == delim) {
... | |
looly/hutool | hutool-crypto/src/main/java/cn/hutool/crypto/symmetric/RC4.java | RC4.swap | private void swap(int i, int j, int[] sbox) {
int temp = sbox[i];
sbox[i] = sbox[j];
sbox[j] = temp;
} | java | private void swap(int i, int j, int[] sbox) {
int temp = sbox[i];
sbox[i] = sbox[j];
sbox[j] = temp;
} | [
"private",
"void",
"swap",
"(",
"int",
"i",
",",
"int",
"j",
",",
"int",
"[",
"]",
"sbox",
")",
"{",
"int",
"temp",
"=",
"sbox",
"[",
"i",
"]",
";",
"sbox",
"[",
"i",
"]",
"=",
"sbox",
"[",
"j",
"]",
";",
"sbox",
"[",
"j",
"]",
"=",
"temp... | 交换指定两个位置的值
@param i 位置1
@param j 位置2
@param sbox 数组 | [
"交换指定两个位置的值"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/symmetric/RC4.java#L166-L170 | train | Swaps the elements of the given box. | Create a Java method that does the following: "Swaps the elements of the given box.". | Of course, here is the Java code you requested:
```java
private void swap(int i, int j, int[] sbox) {
int temp = sbox[i];
sbox[i] = sbox[j];
sbox[j] = temp;
}
```
Hope this helps! | |
ManfredTremmel/gwt-bean-validators | gwt-mt-widgets/src/main/java/de/knightsoftnet/mtwidgets/client/ui/widget/helper/PercentDoubleRenderer.java | PercentDoubleRenderer.instance | public static final Renderer<Double> instance() { // NOPMD it's thread save!
if (PercentDoubleRenderer.instanceRenderer == null) {
synchronized (PercentDoubleRenderer.class) {
if (PercentDoubleRenderer.instanceRenderer == null) {
PercentDoubleRenderer.instanceRenderer = new PercentDoubleRend... | java | public static final Renderer<Double> instance() { // NOPMD it's thread save!
if (PercentDoubleRenderer.instanceRenderer == null) {
synchronized (PercentDoubleRenderer.class) {
if (PercentDoubleRenderer.instanceRenderer == null) {
PercentDoubleRenderer.instanceRenderer = new PercentDoubleRend... | [
"public",
"static",
"final",
"Renderer",
"<",
"Double",
">",
"instance",
"(",
")",
"{",
"// NOPMD it's thread save!",
"if",
"(",
"PercentDoubleRenderer",
".",
"instanceRenderer",
"==",
"null",
")",
"{",
"synchronized",
"(",
"PercentDoubleRenderer",
".",
"class",
"... | returns the instance.
@return CurrencyDoubleRenderer | [
"returns",
"the",
"instance",
"."
] | cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c | https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwt-mt-widgets/src/main/java/de/knightsoftnet/mtwidgets/client/ui/widget/helper/PercentDoubleRenderer.java#L38-L47 | train | Get the instance of the Renderer class. | Create a Java method that does the following: "Get the instance of the Renderer class.". | Of course, here is the Java code you requested:
```java
public static final Renderer<Double> instance() { // NOPMD it's thread save!
if (PercentDoubleRenderer.instanceRenderer == null) {
synchronized (PercentDoubleRenderer.class) {
if (PercentDoubleRenderer.instanceRenderer == null) {
Perce... | |
hankcs/HanLP | src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronClassifier.java | PerceptronClassifier.trainAveragedPerceptron | private static LinearModel trainAveragedPerceptron(Instance[] instanceList, FeatureMap featureMap, int maxIteration)
{
float[] parameter = new float[featureMap.size()];
double[] sum = new double[featureMap.size()];
int[] time = new int[featureMap.size()];
AveragedPerceptron model = ... | java | private static LinearModel trainAveragedPerceptron(Instance[] instanceList, FeatureMap featureMap, int maxIteration)
{
float[] parameter = new float[featureMap.size()];
double[] sum = new double[featureMap.size()];
int[] time = new int[featureMap.size()];
AveragedPerceptron model = ... | [
"private",
"static",
"LinearModel",
"trainAveragedPerceptron",
"(",
"Instance",
"[",
"]",
"instanceList",
",",
"FeatureMap",
"featureMap",
",",
"int",
"maxIteration",
")",
"{",
"float",
"[",
"]",
"parameter",
"=",
"new",
"float",
"[",
"featureMap",
".",
"size",
... | 平均感知机训练算法
@param instanceList 训练实例
@param featureMap 特征函数
@param maxIteration 训练迭代次数 | [
"平均感知机训练算法"
] | a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronClassifier.java#L79-L100 | train | Train Averaged Perceptron model. | Create a Java method that does the following: "Train Averaged Perceptron model.". | Of course, here is the Java code you requested:
```java
private static LinearModel trainAveragedPerceptron(Instance[] instanceList, FeatureMap featureMap, int maxIteration)
{
float[] parameter = new float[featureMap.size()];
double[] sum = new double[featureMap.size()];
int[] time = new int... | |
ksclarke/freelib-utils | src/main/java/info/freelibrary/util/StringUtils.java | StringUtils.parseIntRange | public static int[] parseIntRange(final String aIntRange) {
final String[] range = aIntRange.split(RANGE_DELIMETER);
final int[] ints;
if (range.length == 1) {
ints = new int[range.length];
ints[0] = Integer.parseInt(aIntRange);
} else {
final int sta... | java | public static int[] parseIntRange(final String aIntRange) {
final String[] range = aIntRange.split(RANGE_DELIMETER);
final int[] ints;
if (range.length == 1) {
ints = new int[range.length];
ints[0] = Integer.parseInt(aIntRange);
} else {
final int sta... | [
"public",
"static",
"int",
"[",
"]",
"parseIntRange",
"(",
"final",
"String",
"aIntRange",
")",
"{",
"final",
"String",
"[",
"]",
"range",
"=",
"aIntRange",
".",
"split",
"(",
"RANGE_DELIMETER",
")",
";",
"final",
"int",
"[",
"]",
"ints",
";",
"if",
"(... | Parses strings with an integer range (e.g., 2-5) and returns an expanded integer array {2, 3, 4, 5} with those
values.
@param aIntRange A string representation of a range of integers
@return An int array with the expanded values of the string representation | [
"Parses",
"strings",
"with",
"an",
"integer",
"range",
"(",
"e",
".",
"g",
".",
"2",
"-",
"5",
")",
"and",
"returns",
"an",
"expanded",
"integer",
"array",
"{",
"2",
"3",
"4",
"5",
"}",
"with",
"those",
"values",
"."
] | 54e822ae4c11b3d74793fd82a1a535ffafffaf45 | https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/StringUtils.java#L502-L527 | train | Parse a range of integers. | Create a Java method that does the following: "Parse a range of integers.". | Of course, here is the Java code you requested:
```java
public static int[] parseIntRange(final String aIntRange) {
final String[] range = aIntRange.split(RANGE_DELIMETER);
final int[] ints;
if (range.length == 1) {
ints = new int[range.length];
ints[0] = Integer.parseI... | |
klinker24/Android-3DTouch-PeekView | library/src/main/java/com/klinker/android/peekview/builder/Peek.java | Peek.applyTo | public void applyTo(final PeekViewActivity activity, final View base) {
final GestureDetectorCompat detector =
new GestureDetectorCompat(activity, new GestureListener(activity, base, this));
base.setOnTouchListener(new View.OnTouchListener() {
@Override
public bo... | java | public void applyTo(final PeekViewActivity activity, final View base) {
final GestureDetectorCompat detector =
new GestureDetectorCompat(activity, new GestureListener(activity, base, this));
base.setOnTouchListener(new View.OnTouchListener() {
@Override
public bo... | [
"public",
"void",
"applyTo",
"(",
"final",
"PeekViewActivity",
"activity",
",",
"final",
"View",
"base",
")",
"{",
"final",
"GestureDetectorCompat",
"detector",
"=",
"new",
"GestureDetectorCompat",
"(",
"activity",
",",
"new",
"GestureListener",
"(",
"activity",
"... | Finish the builder by selecting the base view that you want to show the PeekView from.
@param activity the PeekViewActivity that you are on.
@param base the view that you want to touch to apply the peek to. | [
"Finish",
"the",
"builder",
"by",
"selecting",
"the",
"base",
"view",
"that",
"you",
"want",
"to",
"show",
"the",
"PeekView",
"from",
"."
] | 8329c44f31c3752da43bab5f261a28ca02254613 | https://github.com/klinker24/Android-3DTouch-PeekView/blob/8329c44f31c3752da43bab5f261a28ca02254613/library/src/main/java/com/klinker/android/peekview/builder/Peek.java#L91-L108 | train | Apply the base view to the PeekViewActivity. | Create a Java method that does the following: "Apply the base view to the PeekViewActivity.". | Of course, here is the Java code you requested:
```java
public void applyTo(final PeekViewActivity activity, final View base) {
final GestureDetectorCompat detector =
new GestureDetectorCompat(activity, new GestureListener(activity, base, this));
base.setOnTouchListener(new View.OnTouc... | |
Evol-Instruct | N/A | N/A | java | [] | [] | train | Write a Java program to find the kth smallest element in an unsorted array of integers, where k is a positive integer less than or equal to the length of the array. Additionally, your program should have a time complexity of O(n log k), where n is the length of the array. | Here's a Java program that finds the kth smallest element in an unsorted array of integers, with a time complexity of O(n log k):
```java
import java.util.PriorityQueue;
public class KthSmallestElement {
public static int findKthSmallest(int[] nums, int k) {
// Create a max heap using PriorityQueue
... | |||||||
square/javapoet | src/main/java/com/squareup/javapoet/CodeWriter.java | CodeWriter.emitAndIndent | CodeWriter emitAndIndent(String s) throws IOException {
boolean first = true;
for (String line : s.split("\n", -1)) {
// Emit a newline character. Make sure blank lines in Javadoc & comments look good.
if (!first) {
if ((javadoc || comment) && trailingNewline) {
emitIndentation();
... | java | CodeWriter emitAndIndent(String s) throws IOException {
boolean first = true;
for (String line : s.split("\n", -1)) {
// Emit a newline character. Make sure blank lines in Javadoc & comments look good.
if (!first) {
if ((javadoc || comment) && trailingNewline) {
emitIndentation();
... | [
"CodeWriter",
"emitAndIndent",
"(",
"String",
"s",
")",
"throws",
"IOException",
"{",
"boolean",
"first",
"=",
"true",
";",
"for",
"(",
"String",
"line",
":",
"s",
".",
"split",
"(",
"\"\\n\"",
",",
"-",
"1",
")",
")",
"{",
"// Emit a newline character. Ma... | Emits {@code s} with indentation as required. It's important that all code that writes to
{@link #out} does it through here, since we emit indentation lazily in order to avoid
unnecessary trailing whitespace. | [
"Emits",
"{"
] | 0f93da9a3d9a1da8d29fc993409fcf83d40452bc | https://github.com/square/javapoet/blob/0f93da9a3d9a1da8d29fc993409fcf83d40452bc/src/main/java/com/squareup/javapoet/CodeWriter.java#L455-L491 | train | Emit a string and indent the output. | Create a Java method that does the following: "Emit a string and indent the output.". | Of course, here is the Java code you requested:
```java
CodeWriter emitAndIndent(String s) throws IOException {
boolean first = true;
for (String line : s.split("\n", -1)) {
// Emit a newline character. Make sure blank lines in Javadoc & comments look good.
if (!first) {
if ((javadoc || com... | |
yan74/afplib | org.afplib/src/main/java/org/afplib/afplib/impl/MIOImpl.java | MIOImpl.eSet | @SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AfplibPackage.MIO__RG:
getRG().clear();
getRG().addAll((Collection<? extends MIORG>)newValue);
return;
}
super.eSet(featureID, newValue);
} | java | @SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AfplibPackage.MIO__RG:
getRG().clear();
getRG().addAll((Collection<? extends MIORG>)newValue);
return;
}
super.eSet(featureID, newValue);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Override",
"public",
"void",
"eSet",
"(",
"int",
"featureID",
",",
"Object",
"newValue",
")",
"{",
"switch",
"(",
"featureID",
")",
"{",
"case",
"AfplibPackage",
".",
"MIO__RG",
":",
"getRG",
"(",
"... | <!-- begin-user-doc -->
<!-- end-user-doc -->
@generated | [
"<!",
"--",
"begin",
"-",
"user",
"-",
"doc",
"--",
">",
"<!",
"--",
"end",
"-",
"user",
"-",
"doc",
"--",
">"
] | 9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f | https://github.com/yan74/afplib/blob/9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f/org.afplib/src/main/java/org/afplib/afplib/impl/MIOImpl.java#L111-L121 | train | Override the eSet method to clear the contents of the Collection of the MIORG objects. | Create a Java method that does the following: "Override the eSet method to clear the contents of the Collection of the MIORG objects.". | Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AfplibPackage.MIO__RG:
getRG().clear();
getRG().addAll((Collection<? extends MIORG>)newValue);
return;
}
super.eSet(featur... | |
Azure/azure-sdk-for-java | applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ExportConfigurationsInner.java | ExportConfigurationsInner.create | public List<ApplicationInsightsComponentExportConfigurationInner> create(String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) {
return createWithServiceResponseAsync(resourceGroupName, resourceName, exportProperties).toBlocking().single().body();
} | java | public List<ApplicationInsightsComponentExportConfigurationInner> create(String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) {
return createWithServiceResponseAsync(resourceGroupName, resourceName, exportProperties).toBlocking().single().body();
} | [
"public",
"List",
"<",
"ApplicationInsightsComponentExportConfigurationInner",
">",
"create",
"(",
"String",
"resourceGroupName",
",",
"String",
"resourceName",
",",
"ApplicationInsightsComponentExportRequest",
"exportProperties",
")",
"{",
"return",
"createWithServiceResponseAsy... | Create a Continuous Export configuration of an Application Insights component.
@param resourceGroupName The name of the resource group.
@param resourceName The name of the Application Insights component resource.
@param exportProperties Properties that need to be specified to create a Continuous Export configuration o... | [
"Create",
"a",
"Continuous",
"Export",
"configuration",
"of",
"an",
"Application",
"Insights",
"component",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ExportConfigurationsInner.java#L180-L182 | train | Creates an Application Insights component export configuration. | Create a Java method that does the following: "Creates an Application Insights component export configuration.". | Of course, here is the Java code you requested:
```java
public List<ApplicationInsightsComponentExportConfigurationInner> create(String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) {
return createWithServiceResponseAsync(resourceGroupName, resourceName, ex... | |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/CORBA_Utils.java | CORBA_Utils.write_value | static void write_value(GeneratorAdapter mg,
String className,
Set<String> classConstantFieldNames,
Method method,
Class<?> valueClass,
int rmicCompatible)
thro... | java | static void write_value(GeneratorAdapter mg,
String className,
Set<String> classConstantFieldNames,
Method method,
Class<?> valueClass,
int rmicCompatible)
thro... | [
"static",
"void",
"write_value",
"(",
"GeneratorAdapter",
"mg",
",",
"String",
"className",
",",
"Set",
"<",
"String",
">",
"classConstantFieldNames",
",",
"Method",
"method",
",",
"Class",
"<",
"?",
">",
"valueClass",
",",
"int",
"rmicCompatible",
")",
"throw... | Adds the code to write the specified type to a CORBA OutputStream. <p>
When generating Stubs and Ties, every parameter (Stubs) and return value
(Ties) must be written using the correct type specific write method on the
CORBA OutputStream. For example, a boolean must be written with write_boolean.
This method will add ... | [
"Adds",
"the",
"code",
"to",
"write",
"the",
"specified",
"type",
"to",
"a",
"CORBA",
"OutputStream",
".",
"<p",
">"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/CORBA_Utils.java#L434-L546 | train | Write value to CORBA output stream. | Create a Java method that does the following: "Write value to CORBA output stream.". | Of course, here is the Java code you requested:
```java
static void write_value(GeneratorAdapter mg,
String className,
Set<String> classConstantFieldNames,
Method method,
Class<?> valueClass,
... | |
aoindustries/aocode-public | src/main/java/com/aoindustries/version/Version.java | Version.valueOf | public static Version valueOf(String version) throws IllegalArgumentException {
NullArgumentException.checkNotNull(version, "version");
int dot1Pos = version.indexOf('.');
if(dot1Pos==-1) throw new IllegalArgumentException(version);
int dot2Pos = version.indexOf('.', dot1Pos+1);
if(dot2Pos==-1) throw new Ille... | java | public static Version valueOf(String version) throws IllegalArgumentException {
NullArgumentException.checkNotNull(version, "version");
int dot1Pos = version.indexOf('.');
if(dot1Pos==-1) throw new IllegalArgumentException(version);
int dot2Pos = version.indexOf('.', dot1Pos+1);
if(dot2Pos==-1) throw new Ille... | [
"public",
"static",
"Version",
"valueOf",
"(",
"String",
"version",
")",
"throws",
"IllegalArgumentException",
"{",
"NullArgumentException",
".",
"checkNotNull",
"(",
"version",
",",
"\"version\"",
")",
";",
"int",
"dot1Pos",
"=",
"version",
".",
"indexOf",
"(",
... | Parses a version number from its string representation.
@see #toString() | [
"Parses",
"a",
"version",
"number",
"from",
"its",
"string",
"representation",
"."
] | c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3 | https://github.com/aoindustries/aocode-public/blob/c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3/src/main/java/com/aoindustries/version/Version.java#L51-L65 | train | Returns a Version object from a string version. | Create a Java method that does the following: "Returns a Version object from a string version.". | Of course, here is the Java code you requested:
```java
public static Version valueOf(String version) throws IllegalArgumentException {
NullArgumentException.checkNotNull(version, "version");
int dot1Pos = version.indexOf('.');
if(dot1Pos==-1) throw new IllegalArgumentException(version);
int dot2Pos = version.... | |
ronmamo/reflections | src/main/java/org/reflections/Reflections.java | Reflections.expandSuperTypes | public void expandSuperTypes() {
if (store.keySet().contains(index(SubTypesScanner.class))) {
Multimap<String, String> mmap = store.get(index(SubTypesScanner.class));
Sets.SetView<String> keys = Sets.difference(mmap.keySet(), Sets.newHashSet(mmap.values()));
Multimap<String, ... | java | public void expandSuperTypes() {
if (store.keySet().contains(index(SubTypesScanner.class))) {
Multimap<String, String> mmap = store.get(index(SubTypesScanner.class));
Sets.SetView<String> keys = Sets.difference(mmap.keySet(), Sets.newHashSet(mmap.values()));
Multimap<String, ... | [
"public",
"void",
"expandSuperTypes",
"(",
")",
"{",
"if",
"(",
"store",
".",
"keySet",
"(",
")",
".",
"contains",
"(",
"index",
"(",
"SubTypesScanner",
".",
"class",
")",
")",
")",
"{",
"Multimap",
"<",
"String",
",",
"String",
">",
"mmap",
"=",
"st... | expand super types after scanning, for super types that were not scanned.
this is helpful in finding the transitive closure without scanning all 3rd party dependencies.
it uses {@link ReflectionUtils#getSuperTypes(Class)}.
<p>
for example, for classes A,B,C where A supertype of B, B supertype of C:
<ul>
<li>if scanning... | [
"expand",
"super",
"types",
"after",
"scanning",
"for",
"super",
"types",
"that",
"were",
"not",
"scanned",
".",
"this",
"is",
"helpful",
"in",
"finding",
"the",
"transitive",
"closure",
"without",
"scanning",
"all",
"3rd",
"party",
"dependencies",
".",
"it",
... | 084cf4a759a06d88e88753ac00397478c2e0ed52 | https://github.com/ronmamo/reflections/blob/084cf4a759a06d88e88753ac00397478c2e0ed52/src/main/java/org/reflections/Reflections.java#L381-L394 | train | Expand supertypes. | Create a Java method that does the following: "Expand supertypes.". | Of course, here is the Java code you requested:
```java
public void expandSuperTypes() {
if (store.keySet().contains(index(SubTypesScanner.class))) {
Multimap<String, String> mmap = store.get(index(SubTypesScanner.class));
Sets.SetView<String> keys = Sets.difference(mmap.keySet(), Sets.... | |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java | lbroute6.get | public static lbroute6[] get(nitro_service service, String network[]) throws Exception{
if (network !=null && network.length>0) {
lbroute6 response[] = new lbroute6[network.length];
lbroute6 obj[] = new lbroute6[network.length];
for (int i=0;i<network.length;i++) {
obj[i] = new lbroute6();
obj[i].set... | java | public static lbroute6[] get(nitro_service service, String network[]) throws Exception{
if (network !=null && network.length>0) {
lbroute6 response[] = new lbroute6[network.length];
lbroute6 obj[] = new lbroute6[network.length];
for (int i=0;i<network.length;i++) {
obj[i] = new lbroute6();
obj[i].set... | [
"public",
"static",
"lbroute6",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"network",
"[",
"]",
")",
"throws",
"Exception",
"{",
"if",
"(",
"network",
"!=",
"null",
"&&",
"network",
".",
"length",
">",
"0",
")",
"{",
"lbroute6",
"... | Use this API to fetch lbroute6 resources of given names . | [
"Use",
"this",
"API",
"to",
"fetch",
"lbroute6",
"resources",
"of",
"given",
"names",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java#L228-L240 | train | Use this API to fetch lbroute6 resources of given names. | Create a Java method that does the following: "Use this API to fetch lbroute6 resources of given names.". | Of course, here is the Java code you requested:
```java
public static lbroute6[] get(nitro_service service, String network[]) throws Exception{
if (network !=null && network.length>0) {
lbroute6 response[] = new lbroute6[network.length];
lbroute6 obj[] = new lbroute6[network.length];
for (int i=0;i<network.... | |
carewebframework/carewebframework-core | org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/action/ActionUtil.java | ActionUtil.getListener | public static ActionListener getListener(BaseComponent component, String eventName) {
return (ActionListener) component.getAttribute(ActionListener.getAttrName(eventName));
} | java | public static ActionListener getListener(BaseComponent component, String eventName) {
return (ActionListener) component.getAttribute(ActionListener.getAttrName(eventName));
} | [
"public",
"static",
"ActionListener",
"getListener",
"(",
"BaseComponent",
"component",
",",
"String",
"eventName",
")",
"{",
"return",
"(",
"ActionListener",
")",
"component",
".",
"getAttribute",
"(",
"ActionListener",
".",
"getAttrName",
"(",
"eventName",
")",
... | Returns the listener associated with the given component and event.
@param component The component.
@param eventName The event name.
@return A DeferredEventListener, or null if not found. | [
"Returns",
"the",
"listener",
"associated",
"with",
"the",
"given",
"component",
"and",
"event",
"."
] | fa3252d4f7541dbe151b92c3d4f6f91433cd1673 | https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/action/ActionUtil.java#L216-L218 | train | Get the ActionListener object for the given component and event name. | Create a Java method that does the following: "Get the ActionListener object for the given component and event name.". | Of course, here is the Java code you requested:
```java
public static ActionListener getListener(BaseComponent component, String eventName) {
return (ActionListener) component.getAttribute(ActionListener.getAttrName(eventName));
}
```
Hope this helps! | |
netscaler/sdx_nitro | src/main/java/com/citrix/sdx/nitro/resource/config/br/br_enable.java | br_enable.enable | public static br_enable[] enable(nitro_service client, br_enable[] resources) throws Exception
{
if(resources == null)
throw new Exception("Null resource array");
if(resources.length == 1)
return ((br_enable[]) resources[0].perform_operation(client, "enable"));
return ((br_enable[]) perfo... | java | public static br_enable[] enable(nitro_service client, br_enable[] resources) throws Exception
{
if(resources == null)
throw new Exception("Null resource array");
if(resources.length == 1)
return ((br_enable[]) resources[0].perform_operation(client, "enable"));
return ((br_enable[]) perfo... | [
"public",
"static",
"br_enable",
"[",
"]",
"enable",
"(",
"nitro_service",
"client",
",",
"br_enable",
"[",
"]",
"resources",
")",
"throws",
"Exception",
"{",
"if",
"(",
"resources",
"==",
"null",
")",
"throw",
"new",
"Exception",
"(",
"\"Null resource array\"... | <pre>
Use this operation to enable Repeater Instances in bulk.
</pre> | [
"<pre",
">",
"Use",
"this",
"operation",
"to",
"enable",
"Repeater",
"Instances",
"in",
"bulk",
".",
"<",
"/",
"pre",
">"
] | c840919f1a8f7c0a5634c0f23d34fa14d1765ff1 | https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br/br_enable.java#L94-L104 | train | Use this API to enable br_enable resources. | Create a Java method that does the following: "Use this API to enable br_enable resources.". | Of course, here is the Java code you requested:
```java
public static br_enable[] enable(nitro_service client, br_enable[] resources) throws Exception
{
if(resources == null)
throw new Exception("Null resource array");
if(resources.length == 1)
return ((br_enable[]) resources[0].perform_operati... | |
aws/aws-sdk-java | aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AmazonSNSClient.java | AmazonSNSClient.getTopicAttributes | @Override
public GetTopicAttributesResult getTopicAttributes(GetTopicAttributesRequest request) {
request = beforeClientExecution(request);
return executeGetTopicAttributes(request);
} | java | @Override
public GetTopicAttributesResult getTopicAttributes(GetTopicAttributesRequest request) {
request = beforeClientExecution(request);
return executeGetTopicAttributes(request);
} | [
"@",
"Override",
"public",
"GetTopicAttributesResult",
"getTopicAttributes",
"(",
"GetTopicAttributesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetTopicAttributes",
"(",
"request",
")",
";",
"}"
] | <p>
Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of
the user.
</p>
@param getTopicAttributesRequest
Input for GetTopicAttributes action.
@return Result of the GetTopicAttributes operation returned by the service.
@throws InvalidParameterException
Indicates... | [
"<p",
">",
"Returns",
"all",
"of",
"the",
"properties",
"of",
"a",
"topic",
".",
"Topic",
"properties",
"returned",
"might",
"differ",
"based",
"on",
"the",
"authorization",
"of",
"the",
"user",
".",
"<",
"/",
"p",
">"
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AmazonSNSClient.java#L1245-L1249 | train | Retrieves the attributes of a topic. | Create a Java method that does the following: "Retrieves the attributes of a topic.". | Of course, here is the Java code you requested:
```java
@Override
public GetTopicAttributesResult getTopicAttributes(GetTopicAttributesRequest request) {
request = beforeClientExecution(request);
return executeGetTopicAttributes(request);
}
```
Hope this helps! | |
audit4j/audit4j-core | src/main/java/org/audit4j/core/XMLConfigProvider.java | XMLConfigProvider.readConfig | @SuppressWarnings("unchecked")
@Override
public T readConfig(InputStream fileAsStream) throws ConfigurationException {
XStream xstream = new XStream(new StaxDriver());
xstream.alias("configuration", clazz);
return (T) xstream.fromXML(fileAsStream);
} | java | @SuppressWarnings("unchecked")
@Override
public T readConfig(InputStream fileAsStream) throws ConfigurationException {
XStream xstream = new XStream(new StaxDriver());
xstream.alias("configuration", clazz);
return (T) xstream.fromXML(fileAsStream);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Override",
"public",
"T",
"readConfig",
"(",
"InputStream",
"fileAsStream",
")",
"throws",
"ConfigurationException",
"{",
"XStream",
"xstream",
"=",
"new",
"XStream",
"(",
"new",
"StaxDriver",
"(",
")",
"... | {@inheritDoc}
@see org.audit4j.core.ConfigProvider#readConfig(java.io.InputStream) | [
"{",
"@inheritDoc",
"}"
] | dc8569108851e64cb0ecc7a39048db0ad070fba2 | https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/XMLConfigProvider.java#L57-L63 | train | Read a configuration from an input stream. | Create a Java method that does the following: "Read a configuration from an input stream.". | Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
@Override
public T readConfig(InputStream fileAsStream) throws ConfigurationException {
XStream xstream = new XStream(new StaxDriver());
xstream.alias("configuration", clazz);
return (T) xstream.fromX... | |
Red5/red5-server-common | src/main/java/org/red5/server/net/rtmp/RTMPHandshake.java | RTMPHandshake.verifyDigest | public boolean verifyDigest(int digestPos, byte[] handshakeMessage, byte[] key, int keyLen) {
if (log.isTraceEnabled()) {
log.trace("verifyDigest - digestPos: {} keyLen: {} handshake size: {} ", digestPos, keyLen, handshakeMessage.length);
}
byte[] calcDigest = new byte[DIGEST_LE... | java | public boolean verifyDigest(int digestPos, byte[] handshakeMessage, byte[] key, int keyLen) {
if (log.isTraceEnabled()) {
log.trace("verifyDigest - digestPos: {} keyLen: {} handshake size: {} ", digestPos, keyLen, handshakeMessage.length);
}
byte[] calcDigest = new byte[DIGEST_LE... | [
"public",
"boolean",
"verifyDigest",
"(",
"int",
"digestPos",
",",
"byte",
"[",
"]",
"handshakeMessage",
",",
"byte",
"[",
"]",
"key",
",",
"int",
"keyLen",
")",
"{",
"if",
"(",
"log",
".",
"isTraceEnabled",
"(",
")",
")",
"{",
"log",
".",
"trace",
"... | Verifies the digest.
@param digestPos digest position
@param handshakeMessage handshake message
@param key contains the key
@param keyLen the length of the key
@return true if valid and false otherwise | [
"Verifies",
"the",
"digest",
"."
] | 39ae73710c25bda86d70b13ef37ae707962217b9 | https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPHandshake.java#L346-L356 | train | Verifies the digest of a single tag. | Create a Java method that does the following: "Verifies the digest of a single tag.". | Of course, here is the Java code you requested:
```java
public boolean verifyDigest(int digestPos, byte[] handshakeMessage, byte[] key, int keyLen) {
if (log.isTraceEnabled()) {
log.trace("verifyDigest - digestPos: {} keyLen: {} handshake size: {} ", digestPos, keyLen, handshakeMessage.length);
... | |
linkhub-sdk/popbill.sdk.java | src/main/java/com/popbill/api/message/MessageServiceImp.java | MessageServiceImp.sendMMS | @Override
public String sendMMS(String CorpNum, String sender, String receiver,
String receiverName, String subject, String content, File file,
Date reserveDT, String UserID) throws PopbillException {
Message message = new Message();
message.setS... | java | @Override
public String sendMMS(String CorpNum, String sender, String receiver,
String receiverName, String subject, String content, File file,
Date reserveDT, String UserID) throws PopbillException {
Message message = new Message();
message.setS... | [
"@",
"Override",
"public",
"String",
"sendMMS",
"(",
"String",
"CorpNum",
",",
"String",
"sender",
",",
"String",
"receiver",
",",
"String",
"receiverName",
",",
"String",
"subject",
",",
"String",
"content",
",",
"File",
"file",
",",
"Date",
"reserveDT",
",... | /*
(non-Javadoc)
@see com.popbill.api.MessageService#sendMMS(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.io.File, java.util.Date, java.lang.String) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | 63a341fefe96d60a368776638f3d4c81888238b7 | https://github.com/linkhub-sdk/popbill.sdk.java/blob/63a341fefe96d60a368776638f3d4c81888238b7/src/main/java/com/popbill/api/message/MessageServiceImp.java#L717-L731 | train | Sends a MMS message to the AZ - 2A service. | Create a Java method that does the following: "Sends a MMS message to the AZ - 2A service.". | Of course, here is the Java code you requested:
```java
@Override
public String sendMMS(String CorpNum, String sender, String receiver,
String receiverName, String subject, String content, File file,
Date reserveDT, String UserID) throws PopbillException {
... | |
aws/aws-sdk-java | aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/transform/H265QvbrSettingsMarshaller.java | H265QvbrSettingsMarshaller.marshall | public void marshall(H265QvbrSettings h265QvbrSettings, ProtocolMarshaller protocolMarshaller) {
if (h265QvbrSettings == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(h265QvbrSettings.getMaxAverageB... | java | public void marshall(H265QvbrSettings h265QvbrSettings, ProtocolMarshaller protocolMarshaller) {
if (h265QvbrSettings == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(h265QvbrSettings.getMaxAverageB... | [
"public",
"void",
"marshall",
"(",
"H265QvbrSettings",
"h265QvbrSettings",
",",
"ProtocolMarshaller",
"protocolMarshaller",
")",
"{",
"if",
"(",
"h265QvbrSettings",
"==",
"null",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"\"Invalid argument passed to marshall(.... | Marshall the given parameter object. | [
"Marshall",
"the",
"given",
"parameter",
"object",
"."
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/transform/H265QvbrSettingsMarshaller.java#L44-L56 | train | marshalls the given H265QvbrSettings object to the JSON object. | Create a Java method that does the following: "marshalls the given H265QvbrSettings object to the JSON object.". | Of course, here is the Java code you requested:
```java
public void marshall(H265QvbrSettings h265QvbrSettings, ProtocolMarshaller protocolMarshaller) {
if (h265QvbrSettings == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
pr... | |
aws/aws-sdk-java | aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/DescribeDhcpOptionsResult.java | DescribeDhcpOptionsResult.withDhcpOptions | public DescribeDhcpOptionsResult withDhcpOptions(DhcpOptions... dhcpOptions) {
if (this.dhcpOptions == null) {
setDhcpOptions(new com.amazonaws.internal.SdkInternalList<DhcpOptions>(dhcpOptions.length));
}
for (DhcpOptions ele : dhcpOptions) {
this.dhcpOptions.add(ele);
... | java | public DescribeDhcpOptionsResult withDhcpOptions(DhcpOptions... dhcpOptions) {
if (this.dhcpOptions == null) {
setDhcpOptions(new com.amazonaws.internal.SdkInternalList<DhcpOptions>(dhcpOptions.length));
}
for (DhcpOptions ele : dhcpOptions) {
this.dhcpOptions.add(ele);
... | [
"public",
"DescribeDhcpOptionsResult",
"withDhcpOptions",
"(",
"DhcpOptions",
"...",
"dhcpOptions",
")",
"{",
"if",
"(",
"this",
".",
"dhcpOptions",
"==",
"null",
")",
"{",
"setDhcpOptions",
"(",
"new",
"com",
".",
"amazonaws",
".",
"internal",
".",
"SdkInternal... | <p>
Information about one or more DHCP options sets.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setDhcpOptions(java.util.Collection)} or {@link #withDhcpOptions(java.util.Collection)} if you want to
override the existing values.
</p>
@param dhcpOptions
Information a... | [
"<p",
">",
"Information",
"about",
"one",
"or",
"more",
"DHCP",
"options",
"sets",
".",
"<",
"/",
"p",
">",
"<p",
">",
"<b",
">",
"NOTE",
":",
"<",
"/",
"b",
">",
"This",
"method",
"appends",
"the",
"values",
"to",
"the",
"existing",
"list",
"(",
... | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/DescribeDhcpOptionsResult.java#L81-L89 | train | Adds the DHCPOptions to the response. | Create a Java method that does the following: "Adds the DHCPOptions to the response.". | Of course, here is the Java code you requested:
```java
public DescribeDhcpOptionsResult withDhcpOptions(DhcpOptions... dhcpOptions) {
if (this.dhcpOptions == null) {
setDhcpOptions(new com.amazonaws.internal.SdkInternalList<DhcpOptions>(dhcpOptions.length));
}
for (DhcpOptions ele ... | |
jaxio/javaee-lab | javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java | GenericRepository.findPropertyCount | @Transactional
public int findPropertyCount(E entity, SearchParameters sp, Attribute<?, ?>... attributes) {
return findPropertyCount(entity, sp, newArrayList(attributes));
} | java | @Transactional
public int findPropertyCount(E entity, SearchParameters sp, Attribute<?, ?>... attributes) {
return findPropertyCount(entity, sp, newArrayList(attributes));
} | [
"@",
"Transactional",
"public",
"int",
"findPropertyCount",
"(",
"E",
"entity",
",",
"SearchParameters",
"sp",
",",
"Attribute",
"<",
"?",
",",
"?",
">",
"...",
"attributes",
")",
"{",
"return",
"findPropertyCount",
"(",
"entity",
",",
"sp",
",",
"newArrayLi... | Count the number of E instances.
@param entity a sample entity whose non-null properties may be used as search hint
@param sp carries additional search information
@param attributes the list of attributes to the property
@return the number of entities matching the search. | [
"Count",
"the",
"number",
"of",
"E",
"instances",
"."
] | 61238b967952446d81cc68424a4e809093a77fcf | https://github.com/jaxio/javaee-lab/blob/61238b967952446d81cc68424a4e809093a77fcf/javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java#L392-L395 | train | Find the number of properties in the entity that match the search parameters. | Create a Java method that does the following: "Find the number of properties in the entity that match the search parameters.". | Of course, here is the Java code you requested:
```java
@Transactional
public int findPropertyCount(E entity, SearchParameters sp, Attribute<?, ?>... attributes) {
return findPropertyCount(entity, sp, newArrayList(attributes));
}
```
Hope this helps! | |
DDTH/ddth-commons | ddth-commons-core/src/main/java/com/github/ddth/commons/utils/IdGenerator.java | IdGenerator.extractTimestamp64Ascii | public static long extractTimestamp64Ascii(String id64ascii) throws NumberFormatException {
return extractTimestamp64(Long.parseLong(id64ascii, Character.MAX_RADIX));
} | java | public static long extractTimestamp64Ascii(String id64ascii) throws NumberFormatException {
return extractTimestamp64(Long.parseLong(id64ascii, Character.MAX_RADIX));
} | [
"public",
"static",
"long",
"extractTimestamp64Ascii",
"(",
"String",
"id64ascii",
")",
"throws",
"NumberFormatException",
"{",
"return",
"extractTimestamp64",
"(",
"Long",
".",
"parseLong",
"(",
"id64ascii",
",",
"Character",
".",
"MAX_RADIX",
")",
")",
";",
"}"
... | Extracts the (UNIX) timestamp from a 64-bit ASCII id (radix
{@link Character#MAX_RADIX}).
@param id64ascii
@return the UNIX timestamp (milliseconds)
@throws NumberFormatException | [
"Extracts",
"the",
"(",
"UNIX",
")",
"timestamp",
"from",
"a",
"64",
"-",
"bit",
"ASCII",
"id",
"(",
"radix",
"{",
"@link",
"Character#MAX_RADIX",
"}",
")",
"."
] | 734f0e77321d41eeca78a557be9884df9874e46e | https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/IdGenerator.java#L530-L532 | train | Extract the timestamp from a base64 encoded string. | Create a Java method that does the following: "Extract the timestamp from a base64 encoded string.". | Of course, here is the Java code you requested:
```java
public static long extractTimestamp64Ascii(String id64ascii) throws NumberFormatException {
return extractTimestamp64(Long.parseLong(id64ascii, Character.MAX_RADIX));
}
```
Hope this helps! | |
tvesalainen/util | util/src/main/java/org/vesalainen/nio/FilterByteBuffer.java | FilterByteBuffer.put | public FilterByteBuffer put(byte[] src, int offset, int length) throws IOException
{
checkOut();
out.write(src, offset, length);
position += length;
return this;
} | java | public FilterByteBuffer put(byte[] src, int offset, int length) throws IOException
{
checkOut();
out.write(src, offset, length);
position += length;
return this;
} | [
"public",
"FilterByteBuffer",
"put",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"offset",
",",
"int",
"length",
")",
"throws",
"IOException",
"{",
"checkOut",
"(",
")",
";",
"out",
".",
"write",
"(",
"src",
",",
"offset",
",",
"length",
")",
";",
"pos... | Puts length bytes.
@param src
@param offset
@param length
@return
@throws IOException
@throws BufferOverflowException If not enough room in ByteBuffer. | [
"Puts",
"length",
"bytes",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/FilterByteBuffer.java#L316-L322 | train | Puts a sequence of bytes into the buffer. | Create a Java method that does the following: "Puts a sequence of bytes into the buffer.". | Of course, here is the Java code you requested:
```java
public FilterByteBuffer put(byte[] src, int offset, int length) throws IOException
{
checkOut();
out.write(src, offset, length);
position += length;
return this;
}
```
Hope this helps! | |
wmixvideo/nfe | src/main/java/com/fincatto/documentofiscal/mdfe3/webservices/retornorecepcao/MDFeRetRecepcaoCallbackHandler.java | MDFeRetRecepcaoCallbackHandler.receiveResultmdfeRetRecepcao | public void receiveResultmdfeRetRecepcao(
com.fincatto.documentofiscal.mdfe3.webservices.retornorecepcao.MDFeRetRecepcaoStub.MdfeRetRecepcaoResult result
) {
} | java | public void receiveResultmdfeRetRecepcao(
com.fincatto.documentofiscal.mdfe3.webservices.retornorecepcao.MDFeRetRecepcaoStub.MdfeRetRecepcaoResult result
) {
} | [
"public",
"void",
"receiveResultmdfeRetRecepcao",
"(",
"com",
".",
"fincatto",
".",
"documentofiscal",
".",
"mdfe3",
".",
"webservices",
".",
"retornorecepcao",
".",
"MDFeRetRecepcaoStub",
".",
"MdfeRetRecepcaoResult",
"result",
")",
"{",
"}"
] | auto generated Axis2 call back method for mdfeRetRecepcao method
override this method for handling normal response from mdfeRetRecepcao operation | [
"auto",
"generated",
"Axis2",
"call",
"back",
"method",
"for",
"mdfeRetRecepcao",
"method",
"override",
"this",
"method",
"for",
"handling",
"normal",
"response",
"from",
"mdfeRetRecepcao",
"operation"
] | 75c4545321d40527be8e0797faf7a5b40f43c951 | https://github.com/wmixvideo/nfe/blob/75c4545321d40527be8e0797faf7a5b40f43c951/src/main/java/com/fincatto/documentofiscal/mdfe3/webservices/retornorecepcao/MDFeRetRecepcaoCallbackHandler.java#L48-L51 | valid | Method called to receive a result MDFE RetRecepcao result from a CADAPTER. | Create a Java method that does the following: "Method called to receive a result MDFE RetRecepcao result from a CADAPTER.". | Of course, here is the Java code you requested:
```java
public void receiveResultmdfeRetRecepcao(
com.fincatto.documentofiscal.mdfe3.webservices.retornorecepcao.MDFeRetRecepcaoStub.MdfeRetRecepcaoResult result
) {
}
```
Hope this helps! | |
apache/reef | lang/java/reef-examples/src/main/java/org/apache/reef/examples/suspend/Launch.java | Launch.main | public static void main(final String[] args) {
try {
final Configuration config = getClientConfiguration(args);
LOG.log(Level.INFO, "Configuration:\n--\n{0}--", Configurations.toString(config, true));
final Injector injector = Tang.Factory.getTang().newInjector(config);
final SuspendClient... | java | public static void main(final String[] args) {
try {
final Configuration config = getClientConfiguration(args);
LOG.log(Level.INFO, "Configuration:\n--\n{0}--", Configurations.toString(config, true));
final Injector injector = Tang.Factory.getTang().newInjector(config);
final SuspendClient... | [
"public",
"static",
"void",
"main",
"(",
"final",
"String",
"[",
"]",
"args",
")",
"{",
"try",
"{",
"final",
"Configuration",
"config",
"=",
"getClientConfiguration",
"(",
"args",
")",
";",
"LOG",
".",
"log",
"(",
"Level",
".",
"INFO",
",",
"\"Configurat... | Main method that runs the example.
@param args command line parameters. | [
"Main",
"method",
"that",
"runs",
"the",
"example",
"."
] | e2c47121cde21108a602c560cf76565a40d0e916 | https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-examples/src/main/java/org/apache/reef/examples/suspend/Launch.java#L125-L143 | train | Main method for the CSI client. | Create a Java method that does the following: "Main method for the CSI client.". | Of course, here is the Java code you requested:
```java
public static void main(final String[] args) {
try {
final Configuration config = getClientConfiguration(args);
LOG.log(Level.INFO, "Configuration:\n--\n{0}--", Configurations.toString(config, true));
final Injector injector = Tang.Factory... | |
ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/PropClient.java | PropClient.readLine | private String[] readLine(BufferedReader r) throws IOException
{
System.out.print("> ");
final String line = r.readLine();
return line != null ? split(line) : null;
} | java | private String[] readLine(BufferedReader r) throws IOException
{
System.out.print("> ");
final String line = r.readLine();
return line != null ? split(line) : null;
} | [
"private",
"String",
"[",
"]",
"readLine",
"(",
"BufferedReader",
"r",
")",
"throws",
"IOException",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"> \"",
")",
";",
"final",
"String",
"line",
"=",
"r",
".",
"readLine",
"(",
")",
";",
"return",
"line"... | Writes command prompt and waits for command request from user.
<p>
@param r input reader
@return array with command and command arguments
@throws IOException on I/O error | [
"Writes",
"command",
"prompt",
"and",
"waits",
"for",
"command",
"request",
"from",
"user",
".",
"<p",
">"
] | 4e9318eadbdeb945e529789f573b45386e619bed | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/PropClient.java#L329-L334 | train | Read a line from the specified reader. | Create a Java method that does the following: "Read a line from the specified reader.". | Of course, here is the Java code you requested:
```java
private String[] readLine(BufferedReader r) throws IOException
{
System.out.print("> ");
final String line = r.readLine();
return line != null ? split(line) : null;
}
```
Hope this helps! | |
square/phrase | src/main/java/com/squareup/phrase/Phrase.java | Phrase.fromPlural | public static Phrase fromPlural(Resources r, @PluralsRes int patternResourceId, int quantity) {
return from(r.getQuantityText(patternResourceId, quantity));
} | java | public static Phrase fromPlural(Resources r, @PluralsRes int patternResourceId, int quantity) {
return from(r.getQuantityText(patternResourceId, quantity));
} | [
"public",
"static",
"Phrase",
"fromPlural",
"(",
"Resources",
"r",
",",
"@",
"PluralsRes",
"int",
"patternResourceId",
",",
"int",
"quantity",
")",
"{",
"return",
"from",
"(",
"r",
".",
"getQuantityText",
"(",
"patternResourceId",
",",
"quantity",
")",
")",
... | Entry point into this API.
@throws IllegalArgumentException if pattern contains any syntax errors. | [
"Entry",
"point",
"into",
"this",
"API",
"."
] | d91f18e80790832db11b811c462f8e5cd492d97e | https://github.com/square/phrase/blob/d91f18e80790832db11b811c462f8e5cd492d97e/src/main/java/com/squareup/phrase/Phrase.java#L132-L134 | train | Create a phrase from a plural pattern resource. | Create a Java method that does the following: "Create a phrase from a plural pattern resource.". | Of course, here is the Java code you requested:
```java
public static Phrase fromPlural(Resources r, @PluralsRes int patternResourceId, int quantity) {
return from(r.getQuantityText(patternResourceId, quantity));
}
```
Hope this helps! | |
GwtMaterialDesign/gwt-material-addins | src/main/java/gwt/material/design/addins/client/richeditor/MaterialRichEditor.java | MaterialRichEditor.insertText | protected void insertText(Element e, String text) {
$(e).materialnote("insertText", SafeHtmlUtils.fromString(text).asString());
} | java | protected void insertText(Element e, String text) {
$(e).materialnote("insertText", SafeHtmlUtils.fromString(text).asString());
} | [
"protected",
"void",
"insertText",
"(",
"Element",
"e",
",",
"String",
"text",
")",
"{",
"$",
"(",
"e",
")",
".",
"materialnote",
"(",
"\"insertText\"",
",",
"SafeHtmlUtils",
".",
"fromString",
"(",
"text",
")",
".",
"asString",
"(",
")",
")",
";",
"}"... | Insert custom text inside the note zone. | [
"Insert",
"custom",
"text",
"inside",
"the",
"note",
"zone",
"."
] | 11aec9d92918225f70f936285d0ae94f2178c36e | https://github.com/GwtMaterialDesign/gwt-material-addins/blob/11aec9d92918225f70f936285d0ae94f2178c36e/src/main/java/gwt/material/design/addins/client/richeditor/MaterialRichEditor.java#L285-L287 | train | Insert text into a element. | Create a Java method that does the following: "Insert text into a element.". | Of course, here is the Java code you requested:
```java
protected void insertText(Element e, String text) {
$(e).materialnote("insertText", SafeHtmlUtils.fromString(text).asString());
}
```
Hope this helps! | |
jbossas/jboss-vfs | src/main/java/org/jboss/vfs/VFSUtils.java | VFSUtils.writeFile | public static void writeFile(VirtualFile virtualFile, InputStream is) throws IOException {
final File file = virtualFile.getPhysicalFile();
file.getParentFile().mkdirs();
final FileOutputStream fos = new FileOutputStream(file);
copyStreamAndClose(is, fos);
} | java | public static void writeFile(VirtualFile virtualFile, InputStream is) throws IOException {
final File file = virtualFile.getPhysicalFile();
file.getParentFile().mkdirs();
final FileOutputStream fos = new FileOutputStream(file);
copyStreamAndClose(is, fos);
} | [
"public",
"static",
"void",
"writeFile",
"(",
"VirtualFile",
"virtualFile",
",",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"final",
"File",
"file",
"=",
"virtualFile",
".",
"getPhysicalFile",
"(",
")",
";",
"file",
".",
"getParentFile",
"(",
")",... | Write the content from the given {@link InputStream} to the given virtual file, replacing its current contents (if any) or creating a new file if
one does not exist.
@param virtualFile the virtual file to write
@param is the input stream
@throws IOException if an error occurs | [
"Write",
"the",
"content",
"from",
"the",
"given",
"{",
"@link",
"InputStream",
"}",
"to",
"the",
"given",
"virtual",
"file",
"replacing",
"its",
"current",
"contents",
"(",
"if",
"any",
")",
"or",
"creating",
"a",
"new",
"file",
"if",
"one",
"does",
"no... | 420f4b896d6178ee5f6758f3421e9f350d2b8ab5 | https://github.com/jbossas/jboss-vfs/blob/420f4b896d6178ee5f6758f3421e9f350d2b8ab5/src/main/java/org/jboss/vfs/VFSUtils.java#L471-L476 | train | Write a file from an input stream to a file. | Create a Java method that does the following: "Write a file from an input stream to a file.". | Of course, here is the Java code you requested:
```java
public static void writeFile(VirtualFile virtualFile, InputStream is) throws IOException {
final File file = virtualFile.getPhysicalFile();
file.getParentFile().mkdirs();
final FileOutputStream fos = new FileOutputStream(file);
cop... | |
overturetool/overture | ide/ui/src/main/java/org/overture/ide/ui/commands/ToggleComment.java | ToggleComment.getFirstCompleteLineOfRegion | private int getFirstCompleteLineOfRegion(IRegion region, IDocument document) {
try {
int startLine= document.getLineOfOffset(region.getOffset());
int offset= document.getLineOffset(startLine);
if (offset >= region.getOffset())
return startLine;
offset= document.getLineOffset(startLine + 1);
ret... | java | private int getFirstCompleteLineOfRegion(IRegion region, IDocument document) {
try {
int startLine= document.getLineOfOffset(region.getOffset());
int offset= document.getLineOffset(startLine);
if (offset >= region.getOffset())
return startLine;
offset= document.getLineOffset(startLine + 1);
ret... | [
"private",
"int",
"getFirstCompleteLineOfRegion",
"(",
"IRegion",
"region",
",",
"IDocument",
"document",
")",
"{",
"try",
"{",
"int",
"startLine",
"=",
"document",
".",
"getLineOfOffset",
"(",
"region",
".",
"getOffset",
"(",
")",
")",
";",
"int",
"offset",
... | Returns the index of the first line whose start offset is in the given text range.
@param region the text range in characters where to find the line
@param document The document
@return the first line whose start index is in the given range, -1 if there is no such line | [
"Returns",
"the",
"index",
"of",
"the",
"first",
"line",
"whose",
"start",
"offset",
"is",
"in",
"the",
"given",
"text",
"range",
"."
] | 83175dc6c24fa171cde4fcf61ecb648eba3bdbc1 | https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/commands/ToggleComment.java#L221-L240 | train | Gets the first complete line of the region. | Create a Java method that does the following: "Gets the first complete line of the region.". | Of course, here is the Java code you requested:
```java
private int getFirstCompleteLineOfRegion(IRegion region, IDocument document) {
try {
int startLine= document.getLineOfOffset(region.getOffset());
int offset= document.getLineOffset(startLine);
if (offset >= region.getOffset())
return startLine;
... | |
jbundle/jbundle | base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java | JdbcDatabase.rollback | public void rollback() throws DBException
{
super.rollback(); // Will throw an error if something is not set up right.
try {
if (m_JDBCConnection != null)
m_JDBCConnection.rollback();
} catch (SQLException ex) {
throw this.convertError(ex);
}... | java | public void rollback() throws DBException
{
super.rollback(); // Will throw an error if something is not set up right.
try {
if (m_JDBCConnection != null)
m_JDBCConnection.rollback();
} catch (SQLException ex) {
throw this.convertError(ex);
}... | [
"public",
"void",
"rollback",
"(",
")",
"throws",
"DBException",
"{",
"super",
".",
"rollback",
"(",
")",
";",
"// Will throw an error if something is not set up right.",
"try",
"{",
"if",
"(",
"m_JDBCConnection",
"!=",
"null",
")",
"m_JDBCConnection",
".",
"rollbac... | Rollback the transactions since the last commit.
Override this for SQL implementations.
@exception DBException An exception. | [
"Rollback",
"the",
"transactions",
"since",
"the",
"last",
"commit",
".",
"Override",
"this",
"for",
"SQL",
"implementations",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java#L689-L698 | train | Rollback the transaction. | Create a Java method that does the following: "Rollback the transaction.". | Of course, here is the Java code you requested:
```java
public void rollback() throws DBException
{
super.rollback(); // Will throw an error if something is not set up right.
try {
if (m_JDBCConnection != null)
m_JDBCConnection.rollback();
} catch (SQLException... | |
nominanuda/zen-project | zen-store/src/main/java/com/nominanuda/dataview/DataView.java | DataView.render | public Obj render(T obj) {
Check.illegalargument.assertTrue(pReader.accepts(obj));
return compileObject(obj, viewDef);
} | java | public Obj render(T obj) {
Check.illegalargument.assertTrue(pReader.accepts(obj));
return compileObject(obj, viewDef);
} | [
"public",
"Obj",
"render",
"(",
"T",
"obj",
")",
"{",
"Check",
".",
"illegalargument",
".",
"assertTrue",
"(",
"pReader",
".",
"accepts",
"(",
"obj",
")",
")",
";",
"return",
"compileObject",
"(",
"obj",
",",
"viewDef",
")",
";",
"}"
] | = (PropertyReader<T>)new MapPropertyReader<T>(); | [
"=",
"(",
"PropertyReader<T",
">",
")",
"new",
"MapPropertyReader<T",
">",
"()",
";"
] | fe48ae8da198eb7066c2b56bf2ffafe4cdfc451d | https://github.com/nominanuda/zen-project/blob/fe48ae8da198eb7066c2b56bf2ffafe4cdfc451d/zen-store/src/main/java/com/nominanuda/dataview/DataView.java#L31-L34 | train | Renders the given object using the current view definition. | Create a Java method that does the following: "Renders the given object using the current view definition.". | Of course, here is the Java code you requested:
```java
public Obj render(T obj) {
Check.illegalargument.assertTrue(pReader.accepts(obj));
return compileObject(obj, viewDef);
}
```
Hope this helps! | |
GojaFramework/goja | goja-rapid/src/main/java/goja/rapid/qrcode/QRCode.java | QRCode.create | public static QRCode create(final String content, QRCodeFormat format) {
QRCode qrcode = new QRCode();
qrcode.format = format;
qrcode.qrcodeImage = toQRCode(content, format);
return qrcode;
} | java | public static QRCode create(final String content, QRCodeFormat format) {
QRCode qrcode = new QRCode();
qrcode.format = format;
qrcode.qrcodeImage = toQRCode(content, format);
return qrcode;
} | [
"public",
"static",
"QRCode",
"create",
"(",
"final",
"String",
"content",
",",
"QRCodeFormat",
"format",
")",
"{",
"QRCode",
"qrcode",
"=",
"new",
"QRCode",
"(",
")",
";",
"qrcode",
".",
"format",
"=",
"format",
";",
"qrcode",
".",
"qrcodeImage",
"=",
"... | 使用指定的「QRCode 生成器格式」来创建一个 QRCode 处理器。
@param content 所要生成 QRCode 的内容
@param format QRCode 生成器格式
@return QRCode 处理器 | [
"使用指定的「QRCode",
"生成器格式」来创建一个",
"QRCode",
"处理器。"
] | 77179b495f668fc1fa20accc912991df6bb2d917 | https://github.com/GojaFramework/goja/blob/77179b495f668fc1fa20accc912991df6bb2d917/goja-rapid/src/main/java/goja/rapid/qrcode/QRCode.java#L74-L79 | test | Create a QRCode object from a string. | Create a Java method that does the following: "Create a QRCode object from a string.". | Of course, here is the Java code you requested:
```java
public static QRCode create(final String content, QRCodeFormat format) {
QRCode qrcode = new QRCode();
qrcode.format = format;
qrcode.qrcodeImage = toQRCode(content, format);
return qrcode;
}
```
Hope this helps! | |
ReactiveX/RxJava | src/main/java/io/reactivex/Flowable.java | Flowable.forEachWhile | @CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.NONE)
@SchedulerSupport(SchedulerSupport.NONE)
public final Disposable forEachWhile(final Predicate<? super T> onNext, final Consumer<? super Throwable> onError,
final Action onComplete) {
ObjectHelper.requireNonNull(on... | java | @CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.NONE)
@SchedulerSupport(SchedulerSupport.NONE)
public final Disposable forEachWhile(final Predicate<? super T> onNext, final Consumer<? super Throwable> onError,
final Action onComplete) {
ObjectHelper.requireNonNull(on... | [
"@",
"CheckReturnValue",
"@",
"NonNull",
"@",
"BackpressureSupport",
"(",
"BackpressureKind",
".",
"NONE",
")",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"final",
"Disposable",
"forEachWhile",
"(",
"final",
"Predicate",
"<",
"?"... | Subscribes to the {@link Publisher} and receives notifications for each element and the terminal events until the
onNext Predicate returns false.
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator consumes the source {@code Publisher} in an unbounded manner (i.e., no
backpressure is applied to it).</dd>
<dt><b>Schedul... | [
"Subscribes",
"to",
"the",
"{",
"@link",
"Publisher",
"}",
"and",
"receives",
"notifications",
"for",
"each",
"element",
"and",
"the",
"terminal",
"events",
"until",
"the",
"onNext",
"Predicate",
"returns",
"false",
".",
"<dl",
">",
"<dt",
">",
"<b",
">",
... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Flowable.java#L10479-L10492 | test | Iterates over the source elements in the source sequence until one of them is true. | Create a Java method that does the following: "Iterates over the source elements in the source sequence until one of them is true.". | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.NONE)
@SchedulerSupport(SchedulerSupport.NONE)
public final Disposable forEachWhile(final Predicate<? super T> onNext, final Consumer<? super Throwable> onError,
final Ac... | |
dkpro/dkpro-jwpl | de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java | Wikipedia.getTitle | public Title getTitle(int pageId) throws WikiApiException {
Session session = this.__getHibernateSession();
session.beginTransaction();
Object returnValue = session.createNativeQuery(
"select p.name from PageMapLine as p where p.pageId= :pId").setParameter("pId", pageId, IntegerType.INS... | java | public Title getTitle(int pageId) throws WikiApiException {
Session session = this.__getHibernateSession();
session.beginTransaction();
Object returnValue = session.createNativeQuery(
"select p.name from PageMapLine as p where p.pageId= :pId").setParameter("pId", pageId, IntegerType.INS... | [
"public",
"Title",
"getTitle",
"(",
"int",
"pageId",
")",
"throws",
"WikiApiException",
"{",
"Session",
"session",
"=",
"this",
".",
"__getHibernateSession",
"(",
")",
";",
"session",
".",
"beginTransaction",
"(",
")",
";",
"Object",
"returnValue",
"=",
"sessi... | Gets the title for a given pageId.
@param pageId The id of the page.
@return The title for the given pageId.
@throws WikiApiException Thrown if errors occurred. | [
"Gets",
"the",
"title",
"for",
"a",
"given",
"pageId",
"."
] | 0a0304b6a0aa13acc18838957994e06dd4613a58 | https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L174-L186 | train | Returns the title for the given page. | Create a Java method that does the following: "Returns the title for the given page.". | Of course, here is the Java code you requested:
```java
public Title getTitle(int pageId) throws WikiApiException {
Session session = this.__getHibernateSession();
session.beginTransaction();
Object returnValue = session.createNativeQuery(
"select p.name from PageMapLine as p where p.p... | |
h2oai/h2o-3 | h2o-algos/src/main/java/hex/deepwater/DeepWaterModelInfo.java | DeepWaterModelInfo.createSummaryTable | TwoDimTable createSummaryTable() {
TwoDimTable table = new TwoDimTable(
"Status of Deep Learning Model",
(get_params()._network == null ? ("MLP: " + Arrays.toString(get_params()._hidden)) : get_params()._network.toString()) + ", " + PrettyPrint.bytes(size()) + ", "
+ (!get_params()._autoenco... | java | TwoDimTable createSummaryTable() {
TwoDimTable table = new TwoDimTable(
"Status of Deep Learning Model",
(get_params()._network == null ? ("MLP: " + Arrays.toString(get_params()._hidden)) : get_params()._network.toString()) + ", " + PrettyPrint.bytes(size()) + ", "
+ (!get_params()._autoenco... | [
"TwoDimTable",
"createSummaryTable",
"(",
")",
"{",
"TwoDimTable",
"table",
"=",
"new",
"TwoDimTable",
"(",
"\"Status of Deep Learning Model\"",
",",
"(",
"get_params",
"(",
")",
".",
"_network",
"==",
"null",
"?",
"(",
"\"MLP: \"",
"+",
"Arrays",
".",
"toString... | Create a summary table
@return TwoDimTable with the summary of the model | [
"Create",
"a",
"summary",
"table"
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/deepwater/DeepWaterModelInfo.java#L399-L419 | train | Creates a TwoDimTable with the summary information. | Create a Java method that does the following: "Creates a TwoDimTable with the summary information.". | Of course, here is the Java code you requested:
```java
TwoDimTable createSummaryTable() {
TwoDimTable table = new TwoDimTable(
"Status of Deep Learning Model",
(get_params()._network == null ? ("MLP: " + Arrays.toString(get_params()._hidden)) : get_params()._network.toString()) + ", " + PrettyPrin... | |
udevbe/wayland-java-bindings | stubs-server/src/main/java/org/freedesktop/wayland/server/ShmBuffer.java | ShmBuffer.getData | public ByteBuffer getData() {
return JNI.wrap(WaylandServerCore.INSTANCE()
.wl_shm_buffer_get_data(this.pointer),
getHeight() * getStride());
} | java | public ByteBuffer getData() {
return JNI.wrap(WaylandServerCore.INSTANCE()
.wl_shm_buffer_get_data(this.pointer),
getHeight() * getStride());
} | [
"public",
"ByteBuffer",
"getData",
"(",
")",
"{",
"return",
"JNI",
".",
"wrap",
"(",
"WaylandServerCore",
".",
"INSTANCE",
"(",
")",
".",
"wl_shm_buffer_get_data",
"(",
"this",
".",
"pointer",
")",
",",
"getHeight",
"(",
")",
"*",
"getStride",
"(",
")",
... | /** Get a pointer to the memory for the SHM buffer
<p/>
Returns a pointer which can be used to read the data contained in
the given SHM buffer.
<p
As this buffer is memory-mapped, reading it from may generate
SIGBUS signals. This can happen if the client claims that the
buffer is larger than it is or if something trunc... | [
"/",
"**",
"Get",
"a",
"pointer",
"to",
"the",
"memory",
"for",
"the",
"SHM",
"buffer",
"<p",
"/",
">",
"Returns",
"a",
"pointer",
"which",
"can",
"be",
"used",
"to",
"read",
"the",
"data",
"contained",
"in",
"the",
"given",
"SHM",
"buffer",
".",
"<p... | c0551e74cd0597f3e81e2f976b255ee492160e5e | https://github.com/udevbe/wayland-java-bindings/blob/c0551e74cd0597f3e81e2f976b255ee492160e5e/stubs-server/src/main/java/org/freedesktop/wayland/server/ShmBuffer.java#L138-L142 | train | Get the data of the buffer. | Create a Java method that does the following: "Get the data of the buffer.". | Of course, here is the Java code you requested:
```java
public ByteBuffer getData() {
return JNI.wrap(WaylandServerCore.INSTANCE()
.wl_shm_buffer_get_data(this.pointer),
getHeight() * getStride());
}
```
Hope this helps! | |
stephanenicolas/robospice | robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/SpiceManager.java | SpiceManager.removeListenersOfPendingCachedRequest | private void removeListenersOfPendingCachedRequest(final SpiceRequest<?> request) throws InterruptedException {
synchronized (mapPendingRequestToRequestListener) {
for (final CachedSpiceRequest<?> cachedSpiceRequest : mapPendingRequestToRequestListener.keySet()) {
if (match(cachedSpi... | java | private void removeListenersOfPendingCachedRequest(final SpiceRequest<?> request) throws InterruptedException {
synchronized (mapPendingRequestToRequestListener) {
for (final CachedSpiceRequest<?> cachedSpiceRequest : mapPendingRequestToRequestListener.keySet()) {
if (match(cachedSpi... | [
"private",
"void",
"removeListenersOfPendingCachedRequest",
"(",
"final",
"SpiceRequest",
"<",
"?",
">",
"request",
")",
"throws",
"InterruptedException",
"{",
"synchronized",
"(",
"mapPendingRequestToRequestListener",
")",
"{",
"for",
"(",
"final",
"CachedSpiceRequest",
... | Remove all listeners of a request that may have already been passed to
the {@link SpiceService}. If the request has already been passed to the
{@link SpiceService}, the method will bind to the service and ask it to
remove listeners.
@param request
the request for which listeners must be unregistered. | [
"Remove",
"all",
"listeners",
"of",
"a",
"request",
"that",
"may",
"have",
"already",
"been",
"passed",
"to",
"the",
"{"
] | 8bffde88b3534a961a13cab72a8f07a755f0a0fe | https://github.com/stephanenicolas/robospice/blob/8bffde88b3534a961a13cab72a8f07a755f0a0fe/robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/SpiceManager.java#L713-L728 | train | Remove listeners of pending request. | Create a Java method that does the following: "Remove listeners of pending request.". | Of course, here is the Java code you requested:
```java
private void removeListenersOfPendingCachedRequest(final SpiceRequest<?> request) throws InterruptedException {
synchronized (mapPendingRequestToRequestListener) {
for (final CachedSpiceRequest<?> cachedSpiceRequest : mapPendingRequestToReques... | |
aws/aws-sdk-java | aws-java-sdk-health/src/main/java/com/amazonaws/services/health/model/DescribeEventDetailsResult.java | DescribeEventDetailsResult.setSuccessfulSet | public void setSuccessfulSet(java.util.Collection<EventDetails> successfulSet) {
if (successfulSet == null) {
this.successfulSet = null;
return;
}
this.successfulSet = new java.util.ArrayList<EventDetails>(successfulSet);
} | java | public void setSuccessfulSet(java.util.Collection<EventDetails> successfulSet) {
if (successfulSet == null) {
this.successfulSet = null;
return;
}
this.successfulSet = new java.util.ArrayList<EventDetails>(successfulSet);
} | [
"public",
"void",
"setSuccessfulSet",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"EventDetails",
">",
"successfulSet",
")",
"{",
"if",
"(",
"successfulSet",
"==",
"null",
")",
"{",
"this",
".",
"successfulSet",
"=",
"null",
";",
"return",
";",
"}",
... | <p>
Information about the events that could be retrieved.
</p>
@param successfulSet
Information about the events that could be retrieved. | [
"<p",
">",
"Information",
"about",
"the",
"events",
"that",
"could",
"be",
"retrieved",
".",
"<",
"/",
"p",
">"
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-health/src/main/java/com/amazonaws/services/health/model/DescribeEventDetailsResult.java#L60-L67 | train | Sets the value of the successfulSet property. | Create a Java method that does the following: "Sets the value of the successfulSet property.". | Of course, here is the Java code you requested:
```java
public void setSuccessfulSet(java.util.Collection<EventDetails> successfulSet) {
if (successfulSet == null) {
this.successfulSet = null;
return;
}
this.successfulSet = new java.util.ArrayList<EventDetails>(successf... | |
dickschoeller/gedbrowser | gedbrowser-datamodel/src/main/java/org/schoellerfamily/gedbrowser/datamodel/util/FamilyBuilderImpl.java | FamilyBuilderImpl.createFamily | public Family createFamily(final String idString) {
if (idString == null) {
return new Family();
}
final Family family = new Family(getRoot(), new ObjectId(idString));
getRoot().insert(family);
return family;
} | java | public Family createFamily(final String idString) {
if (idString == null) {
return new Family();
}
final Family family = new Family(getRoot(), new ObjectId(idString));
getRoot().insert(family);
return family;
} | [
"public",
"Family",
"createFamily",
"(",
"final",
"String",
"idString",
")",
"{",
"if",
"(",
"idString",
"==",
"null",
")",
"{",
"return",
"new",
"Family",
"(",
")",
";",
"}",
"final",
"Family",
"family",
"=",
"new",
"Family",
"(",
"getRoot",
"(",
")",... | Encapsulate creating family with the given ID.
@param idString the id string for the family
@return the family | [
"Encapsulate",
"creating",
"family",
"with",
"the",
"given",
"ID",
"."
] | e3e10b1ff3a34ebde9b7edcbfafcd5fe6fb3b3e1 | https://github.com/dickschoeller/gedbrowser/blob/e3e10b1ff3a34ebde9b7edcbfafcd5fe6fb3b3e1/gedbrowser-datamodel/src/main/java/org/schoellerfamily/gedbrowser/datamodel/util/FamilyBuilderImpl.java#L54-L61 | train | Create a Family object. | Create a Java method that does the following: "Create a Family object.". | Of course, here is the Java code you requested:
```java
public Family createFamily(final String idString) {
if (idString == null) {
return new Family();
}
final Family family = new Family(getRoot(), new ObjectId(idString));
getRoot().insert(family);
return family;
... | |
VoltDB/voltdb | src/frontend/org/voltdb/utils/VoltTableUtil.java | VoltTableUtil.stream | public static Stream<VoltTableRow> stream(VoltTable table) {
return StreamSupport.stream(new VoltTableSpliterator(table, 0, table.getRowCount()), false);
} | java | public static Stream<VoltTableRow> stream(VoltTable table) {
return StreamSupport.stream(new VoltTableSpliterator(table, 0, table.getRowCount()), false);
} | [
"public",
"static",
"Stream",
"<",
"VoltTableRow",
">",
"stream",
"(",
"VoltTable",
"table",
")",
"{",
"return",
"StreamSupport",
".",
"stream",
"(",
"new",
"VoltTableSpliterator",
"(",
"table",
",",
"0",
",",
"table",
".",
"getRowCount",
"(",
")",
")",
",... | Not yet public API for VoltTable and Java 8 streams | [
"Not",
"yet",
"public",
"API",
"for",
"VoltTable",
"and",
"Java",
"8",
"streams"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTableUtil.java#L315-L317 | train | Get a stream of VoltTable rows. | Create a Java method that does the following: "Get a stream of VoltTable rows.". | Of course, here is the Java code you requested:
```java
public static Stream<VoltTableRow> stream(VoltTable table) {
return StreamSupport.stream(new VoltTableSpliterator(table, 0, table.getRowCount()), false);
}
```
Hope this helps! | |
aws/aws-sdk-java | aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/AWSGlueClient.java | AWSGlueClient.listCrawlers | @Override
public ListCrawlersResult listCrawlers(ListCrawlersRequest request) {
request = beforeClientExecution(request);
return executeListCrawlers(request);
} | java | @Override
public ListCrawlersResult listCrawlers(ListCrawlersRequest request) {
request = beforeClientExecution(request);
return executeListCrawlers(request);
} | [
"@",
"Override",
"public",
"ListCrawlersResult",
"listCrawlers",
"(",
"ListCrawlersRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListCrawlers",
"(",
"request",
")",
";",
"}"
] | <p>
Retrieves the names of all crawler resources in this AWS account, or the resources with the specified tag. This
operation allows you to see which resources are available in your account, and their names.
</p>
<p>
This operation takes the optional <code>Tags</code> field which you can use as a filter on the response... | [
"<p",
">",
"Retrieves",
"the",
"names",
"of",
"all",
"crawler",
"resources",
"in",
"this",
"AWS",
"account",
"or",
"the",
"resources",
"with",
"the",
"specified",
"tag",
".",
"This",
"operation",
"allows",
"you",
"to",
"see",
"which",
"resources",
"are",
"... | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/AWSGlueClient.java#L4561-L4565 | train | Returns a list of raws for a specific CA. | Create a Java method that does the following: "Returns a list of raws for a specific CA.". | Of course, here is the Java code you requested:
```java
@Override
public ListCrawlersResult listCrawlers(ListCrawlersRequest request) {
request = beforeClientExecution(request);
return executeListCrawlers(request);
}
```
Hope this helps! | |
aws/aws-sdk-java | aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/BatchStopJobRunRequest.java | BatchStopJobRunRequest.setJobRunIds | public void setJobRunIds(java.util.Collection<String> jobRunIds) {
if (jobRunIds == null) {
this.jobRunIds = null;
return;
}
this.jobRunIds = new java.util.ArrayList<String>(jobRunIds);
} | java | public void setJobRunIds(java.util.Collection<String> jobRunIds) {
if (jobRunIds == null) {
this.jobRunIds = null;
return;
}
this.jobRunIds = new java.util.ArrayList<String>(jobRunIds);
} | [
"public",
"void",
"setJobRunIds",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"String",
">",
"jobRunIds",
")",
"{",
"if",
"(",
"jobRunIds",
"==",
"null",
")",
"{",
"this",
".",
"jobRunIds",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"jo... | <p>
A list of the JobRunIds that should be stopped for that job definition.
</p>
@param jobRunIds
A list of the JobRunIds that should be stopped for that job definition. | [
"<p",
">",
"A",
"list",
"of",
"the",
"JobRunIds",
"that",
"should",
"be",
"stopped",
"for",
"that",
"job",
"definition",
".",
"<",
"/",
"p",
">"
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/BatchStopJobRunRequest.java#L102-L109 | train | Sets the value of the jobRunIds property. | Create a Java method that does the following: "Sets the value of the jobRunIds property.". | Of course, here is the Java code you requested:
```java
public void setJobRunIds(java.util.Collection<String> jobRunIds) {
if (jobRunIds == null) {
this.jobRunIds = null;
return;
}
this.jobRunIds = new java.util.ArrayList<String>(jobRunIds);
}
```
Hope this helps! | |
jhunters/jprotobuf | src/main/java/com/baidu/bjf/remoting/protobuf/utils/ClassHelper.java | ClassHelper.getClassName | public static String getClassName(Class<?> cls) {
if (cls.isMemberClass()) {
String name = cls.getName();
name = StringUtils.substringAfterLast(name, PACKAGE_SEPARATOR);
return name;
}
return cls.getSimpleName();
} | java | public static String getClassName(Class<?> cls) {
if (cls.isMemberClass()) {
String name = cls.getName();
name = StringUtils.substringAfterLast(name, PACKAGE_SEPARATOR);
return name;
}
return cls.getSimpleName();
} | [
"public",
"static",
"String",
"getClassName",
"(",
"Class",
"<",
"?",
">",
"cls",
")",
"{",
"if",
"(",
"cls",
".",
"isMemberClass",
"(",
")",
")",
"{",
"String",
"name",
"=",
"cls",
".",
"getName",
"(",
")",
";",
"name",
"=",
"StringUtils",
".",
"s... | get class simple name from {@link Class} instance. <br>
Here we should take case member class is a little different from common class.
@param cls target class
@return simple class name | [
"get",
"class",
"simple",
"name",
"from",
"{",
"@link",
"Class",
"}",
"instance",
".",
"<br",
">",
"Here",
"we",
"should",
"take",
"case",
"member",
"class",
"is",
"a",
"little",
"different",
"from",
"common",
"class",
"."
] | 55832c9b4792afb128e5b35139d8a3891561d8a3 | https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/utils/ClassHelper.java#L279-L287 | train | Gets the class name. | Create a Java method that does the following: "Gets the class name.". | Of course, here is the Java code you requested:
```java
public static String getClassName(Class<?> cls) {
if (cls.isMemberClass()) {
String name = cls.getName();
name = StringUtils.substringAfterLast(name, PACKAGE_SEPARATOR);
return name;
}
return cls.getSim... | |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_fieldformat_binding.java | appfwprofile_fieldformat_binding.get | public static appfwprofile_fieldformat_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_fieldformat_binding obj = new appfwprofile_fieldformat_binding();
obj.set_name(name);
appfwprofile_fieldformat_binding response[] = (appfwprofile_fieldformat_binding[]) obj.get_resources(service... | java | public static appfwprofile_fieldformat_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_fieldformat_binding obj = new appfwprofile_fieldformat_binding();
obj.set_name(name);
appfwprofile_fieldformat_binding response[] = (appfwprofile_fieldformat_binding[]) obj.get_resources(service... | [
"public",
"static",
"appfwprofile_fieldformat_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"appfwprofile_fieldformat_binding",
"obj",
"=",
"new",
"appfwprofile_fieldformat_binding",
"(",
")",
";",
... | Use this API to fetch appfwprofile_fieldformat_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"appfwprofile_fieldformat_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_fieldformat_binding.java#L321-L326 | train | Use this API to fetch appfwprofile_fieldformat_binding resources of given name. | Create a Java method that does the following: "Use this API to fetch appfwprofile_fieldformat_binding resources of given name.". | Of course, here is the Java code you requested:
```java
public static appfwprofile_fieldformat_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_fieldformat_binding obj = new appfwprofile_fieldformat_binding();
obj.set_name(name);
appfwprofile_fieldformat_binding response[] = (appf... | |
stratosphere/stratosphere | stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/ClusterManager.java | ClusterManager.updateInstaceTypeDescriptionMap | private void updateInstaceTypeDescriptionMap() {
// this.registeredHosts.values().iterator()
this.instanceTypeDescriptionMap.clear();
final List<InstanceTypeDescription> instanceTypeDescriptionList = new ArrayList<InstanceTypeDescription>();
// initialize array which stores the availability counter for each ... | java | private void updateInstaceTypeDescriptionMap() {
// this.registeredHosts.values().iterator()
this.instanceTypeDescriptionMap.clear();
final List<InstanceTypeDescription> instanceTypeDescriptionList = new ArrayList<InstanceTypeDescription>();
// initialize array which stores the availability counter for each ... | [
"private",
"void",
"updateInstaceTypeDescriptionMap",
"(",
")",
"{",
"// this.registeredHosts.values().iterator()",
"this",
".",
"instanceTypeDescriptionMap",
".",
"clear",
"(",
")",
";",
"final",
"List",
"<",
"InstanceTypeDescription",
">",
"instanceTypeDescriptionList",
"... | Updates the list of instance type descriptions based on the currently registered hosts. | [
"Updates",
"the",
"list",
"of",
"instance",
"type",
"descriptions",
"based",
"on",
"the",
"currently",
"registered",
"hosts",
"."
] | c543a08f9676c5b2b0a7088123bd6e795a8ae0c8 | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/ClusterManager.java#L757-L849 | train | Update the instance type description map. | Create a Java method that does the following: "Update the instance type description map.". | Of course, here is the Java code you requested:
```java
private void updateInstaceTypeDescriptionMap() {
// this.registeredHosts.values().iterator()
this.instanceTypeDescriptionMap.clear();
final List<InstanceTypeDescription> instanceTypeDescriptionList = new ArrayList<InstanceTypeDescription>();
// initial... | |
ltearno/hexa.tools | hexa.core/src/main/java/fr/lteconsulting/hexa/client/datatable/TableCollectionManager.java | TableCollectionManager.getRecordForRow | public T getRecordForRow( Row row )
{
Integer recordId = rowToRecordIds.get( row );
if( recordId == null )
return null;
return getRecordForId( recordId );
} | java | public T getRecordForRow( Row row )
{
Integer recordId = rowToRecordIds.get( row );
if( recordId == null )
return null;
return getRecordForId( recordId );
} | [
"public",
"T",
"getRecordForRow",
"(",
"Row",
"row",
")",
"{",
"Integer",
"recordId",
"=",
"rowToRecordIds",
".",
"get",
"(",
"row",
")",
";",
"if",
"(",
"recordId",
"==",
"null",
")",
"return",
"null",
";",
"return",
"getRecordForId",
"(",
"recordId",
"... | Gets the record associated with a specific Row
@param row The row
@return The associated record, or null. | [
"Gets",
"the",
"record",
"associated",
"with",
"a",
"specific",
"Row"
] | 604c804901b1bb13fe10b3823cc4a639f8993363 | https://github.com/ltearno/hexa.tools/blob/604c804901b1bb13fe10b3823cc4a639f8993363/hexa.core/src/main/java/fr/lteconsulting/hexa/client/datatable/TableCollectionManager.java#L297-L304 | train | Get the record for the given row. | Create a Java method that does the following: "Get the record for the given row.". | Of course, here is the Java code you requested:
```java
public T getRecordForRow( Row row )
{
Integer recordId = rowToRecordIds.get( row );
if( recordId == null )
return null;
return getRecordForId( recordId );
}
```
Hope this helps! | |
nominanuda/zen-project | zen-core/src/main/java/com/nominanuda/zen/time/CronExpression.java | CronExpression.buildExpression | protected void buildExpression(String expression) throws ParseException {
expressionParsed = true;
try {
if (seconds == null) {
seconds = new TreeSet<Integer>();
}
if (minutes == null) {
minutes = new TreeSet<Integer>();
}... | java | protected void buildExpression(String expression) throws ParseException {
expressionParsed = true;
try {
if (seconds == null) {
seconds = new TreeSet<Integer>();
}
if (minutes == null) {
minutes = new TreeSet<Integer>();
}... | [
"protected",
"void",
"buildExpression",
"(",
"String",
"expression",
")",
"throws",
"ParseException",
"{",
"expressionParsed",
"=",
"true",
";",
"try",
"{",
"if",
"(",
"seconds",
"==",
"null",
")",
"{",
"seconds",
"=",
"new",
"TreeSet",
"<",
"Integer",
">",
... | ////////////////////////////////////////////////////////////////////////// | [
"//////////////////////////////////////////////////////////////////////////"
] | fe48ae8da198eb7066c2b56bf2ffafe4cdfc451d | https://github.com/nominanuda/zen-project/blob/fe48ae8da198eb7066c2b56bf2ffafe4cdfc451d/zen-core/src/main/java/com/nominanuda/zen/time/CronExpression.java#L414-L500 | train | Build the expression. | Create a Java method that does the following: "Build the expression.". | Of course, here is the Java code you requested:
```java
protected void buildExpression(String expression) throws ParseException {
expressionParsed = true;
try {
if (seconds == null) {
seconds = new TreeSet<Integer>();
}
if (minutes == null) {
... | |
wcm-io/wcm-io-wcm | ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/AbstractPageTreeProvider.java | AbstractPageTreeProvider.getPage | @SuppressWarnings("null")
protected final JSONObject getPage(Page page) throws JSONException {
Resource resource = page.adaptTo(Resource.class);
JSONObject pageObject = new JSONObject();
// node name
pageObject.put("name", page.getName());
// node title text
String title = page.getTitle();
... | java | @SuppressWarnings("null")
protected final JSONObject getPage(Page page) throws JSONException {
Resource resource = page.adaptTo(Resource.class);
JSONObject pageObject = new JSONObject();
// node name
pageObject.put("name", page.getName());
// node title text
String title = page.getTitle();
... | [
"@",
"SuppressWarnings",
"(",
"\"null\"",
")",
"protected",
"final",
"JSONObject",
"getPage",
"(",
"Page",
"page",
")",
"throws",
"JSONException",
"{",
"Resource",
"resource",
"=",
"page",
".",
"adaptTo",
"(",
"Resource",
".",
"class",
")",
";",
"JSONObject",
... | Generate JSON object for page
@param page Page
@return JSON object
@throws JSONException JSON exception | [
"Generate",
"JSON",
"object",
"for",
"page"
] | 8eff9434f2f4b6462fdb718f8769ad793c55b8d7 | https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/AbstractPageTreeProvider.java#L101-L130 | train | Get the page object. | Create a Java method that does the following: "Get the page object.". | Of course, here is the Java code you requested:
```java
@SuppressWarnings("null")
protected final JSONObject getPage(Page page) throws JSONException {
Resource resource = page.adaptTo(Resource.class);
JSONObject pageObject = new JSONObject();
// node name
pageObject.put("name", page.getName());
... | |
subchen/jetbrick-all-1x | jetbrick-commons/src/main/java/jetbrick/lang/WildcharPathUtils.java | WildcharPathUtils.matchPathOne | public static int matchPathOne(String path, String[] patterns) {
for (int i = 0; i < patterns.length; i++) {
if (matchPath(path, patterns[i]) == true) {
return i;
}
}
return -1;
} | java | public static int matchPathOne(String path, String[] patterns) {
for (int i = 0; i < patterns.length; i++) {
if (matchPath(path, patterns[i]) == true) {
return i;
}
}
return -1;
} | [
"public",
"static",
"int",
"matchPathOne",
"(",
"String",
"path",
",",
"String",
"[",
"]",
"patterns",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"patterns",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"matchPath",
"(",
"p... | Matches path to at least one pattern.
Returns index of matched pattern or <code>-1</code> otherwise.
@see #matchPath(String, String) | [
"Matches",
"path",
"to",
"at",
"least",
"one",
"pattern",
".",
"Returns",
"index",
"of",
"matched",
"pattern",
"or",
"<code",
">",
"-",
"1<",
"/",
"code",
">",
"otherwise",
"."
] | abe54629a508592287afe5ca4ffc93bf8bf4940c | https://github.com/subchen/jetbrick-all-1x/blob/abe54629a508592287afe5ca4ffc93bf8bf4940c/jetbrick-commons/src/main/java/jetbrick/lang/WildcharPathUtils.java#L50-L57 | test | matchPathOne returns the index of the first match in the path array | Create a Java method that does the following: "matchPathOne returns the index of the first match in the path array". | Of course, here is the Java code you requested:
```java
public static int matchPathOne(String path, String[] patterns) {
for (int i = 0; i < patterns.length; i++) {
if (matchPath(path, patterns[i]) == true) {
return i;
}
}
return -1;
}
```
Hope this ... | |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/detect/CheckTypeQualifiers.java | CheckTypeQualifiers.visitClass | @Override
public void visitClass(ClassDescriptor classDescriptor) throws CheckedAnalysisException {
if (!checked) {
checked = true;
Collection<TypeQualifierValue<?>> allKnownTypeQualifiers = TypeQualifierValue.getAllKnownTypeQualifiers();
int size = allKnownTypeQualifier... | java | @Override
public void visitClass(ClassDescriptor classDescriptor) throws CheckedAnalysisException {
if (!checked) {
checked = true;
Collection<TypeQualifierValue<?>> allKnownTypeQualifiers = TypeQualifierValue.getAllKnownTypeQualifiers();
int size = allKnownTypeQualifier... | [
"@",
"Override",
"public",
"void",
"visitClass",
"(",
"ClassDescriptor",
"classDescriptor",
")",
"throws",
"CheckedAnalysisException",
"{",
"if",
"(",
"!",
"checked",
")",
"{",
"checked",
"=",
"true",
";",
"Collection",
"<",
"TypeQualifierValue",
"<",
"?",
">",
... | /*
(non-Javadoc)
@see
edu.umd.cs.findbugs.bcel.CFGDetector#visitClass(edu.umd.cs.findbugs.classfile
.ClassDescriptor) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | f6365c6eea6515035bded38efa4a7c8b46ccf28c | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/CheckTypeQualifiers.java#L118-L139 | train | Visit a class. | Create a Java method that does the following: "Visit a class.". | Of course, here is the Java code you requested:
```java
@Override
public void visitClass(ClassDescriptor classDescriptor) throws CheckedAnalysisException {
if (!checked) {
checked = true;
Collection<TypeQualifierValue<?>> allKnownTypeQualifiers = TypeQualifierValue.getAllKnownTypeQ... | |
yegor256/takes | src/main/java/org/takes/facets/fork/MediaType.java | MediaType.matches | public boolean matches(final MediaType type) {
final String star = "*";
return (this.high.equals(star)
|| type.high.equals(star)
|| this.high.equals(type.high))
&& (this.low.equals(star)
|| type.low.equals(star)
|| this.low.equals(type.low));
... | java | public boolean matches(final MediaType type) {
final String star = "*";
return (this.high.equals(star)
|| type.high.equals(star)
|| this.high.equals(type.high))
&& (this.low.equals(star)
|| type.low.equals(star)
|| this.low.equals(type.low));
... | [
"public",
"boolean",
"matches",
"(",
"final",
"MediaType",
"type",
")",
"{",
"final",
"String",
"star",
"=",
"\"*\"",
";",
"return",
"(",
"this",
".",
"high",
".",
"equals",
"(",
"star",
")",
"||",
"type",
".",
"high",
".",
"equals",
"(",
"star",
")"... | Matches.
@param type Another type
@return TRUE if matches
@checkstyle BooleanExpressionComplexityCheck (10 lines) | [
"Matches",
"."
] | a4f4d939c8f8e0af190025716ad7f22b7de40e70 | https://github.com/yegor256/takes/blob/a4f4d939c8f8e0af190025716ad7f22b7de40e70/src/main/java/org/takes/facets/fork/MediaType.java#L91-L99 | train | Checks if the given media type matches this media type. | Create a Java method that does the following: "Checks if the given media type matches this media type.". | Of course, here is the Java code you requested:
```java
public boolean matches(final MediaType type) {
final String star = "*";
return (this.high.equals(star)
|| type.high.equals(star)
|| this.high.equals(type.high))
&& (this.low.equals(star)
|| type.low.... | |
apache/flink | flink-optimizer/src/main/java/org/apache/flink/optimizer/costs/Costs.java | Costs.subtractCosts | public void subtractCosts(Costs other) {
if (this.networkCost != UNKNOWN && other.networkCost != UNKNOWN) {
this.networkCost -= other.networkCost;
if (this.networkCost < 0) {
throw new IllegalArgumentException("Cannot subtract more cost then there is.");
}
}
if (this.diskCost != UNKNOWN && other.disk... | java | public void subtractCosts(Costs other) {
if (this.networkCost != UNKNOWN && other.networkCost != UNKNOWN) {
this.networkCost -= other.networkCost;
if (this.networkCost < 0) {
throw new IllegalArgumentException("Cannot subtract more cost then there is.");
}
}
if (this.diskCost != UNKNOWN && other.disk... | [
"public",
"void",
"subtractCosts",
"(",
"Costs",
"other",
")",
"{",
"if",
"(",
"this",
".",
"networkCost",
"!=",
"UNKNOWN",
"&&",
"other",
".",
"networkCost",
"!=",
"UNKNOWN",
")",
"{",
"this",
".",
"networkCost",
"-=",
"other",
".",
"networkCost",
";",
... | Subtracts the given costs from these costs. If the given costs are unknown, then these costs are remain unchanged.
@param other The costs to subtract. | [
"Subtracts",
"the",
"given",
"costs",
"from",
"these",
"costs",
".",
"If",
"the",
"given",
"costs",
"are",
"unknown",
"then",
"these",
"costs",
"are",
"remain",
"unchanged",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/costs/Costs.java#L343-L377 | train | Subtracts the given costs from this costs. | Create a Java method that does the following: "Subtracts the given costs from this costs.". | Of course, here is the Java code you requested:
```java
public void subtractCosts(Costs other) {
if (this.networkCost != UNKNOWN && other.networkCost != UNKNOWN) {
this.networkCost -= other.networkCost;
if (this.networkCost < 0) {
throw new IllegalArgumentException("Cannot subtract more cost then there is.... | |
logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.initialize | private void initialize() {
this.level = 0;
this.next = 0;
this.empty = null;
this.scoreIncrement = 1;
this.ignore = null;
this.vars = new LNGVector<>();
this.vals = new LNGByteVector();
this.phases = new LNGByteVector();
this.decisions = new LNGDo... | java | private void initialize() {
this.level = 0;
this.next = 0;
this.empty = null;
this.scoreIncrement = 1;
this.ignore = null;
this.vars = new LNGVector<>();
this.vals = new LNGByteVector();
this.phases = new LNGByteVector();
this.decisions = new LNGDo... | [
"private",
"void",
"initialize",
"(",
")",
"{",
"this",
".",
"level",
"=",
"0",
";",
"this",
".",
"next",
"=",
"0",
";",
"this",
".",
"empty",
"=",
"null",
";",
"this",
".",
"scoreIncrement",
"=",
"1",
";",
"this",
".",
"ignore",
"=",
"null",
";"... | Initializes the internal solver state. | [
"Initializes",
"the",
"internal",
"solver",
"state",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L141-L161 | train | Initializes the internal data structures. | Create a Java method that does the following: "Initializes the internal data structures.". | Of course, here is the Java code you requested:
```java
private void initialize() {
this.level = 0;
this.next = 0;
this.empty = null;
this.scoreIncrement = 1;
this.ignore = null;
this.vars = new LNGVector<>();
this.vals = new LNGByteVector();
this.phases ... | |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/StringUtils.java | StringUtils.unicodeFriendlySet | public static ImmutableSet<UnicodeFriendlyString> unicodeFriendlySet(Iterable<String> strings) {
final ImmutableSet.Builder<UnicodeFriendlyString> ret = ImmutableSet.builder();
for (final String s : strings) {
ret.add(unicodeFriendly(s));
}
return ret.build();
} | java | public static ImmutableSet<UnicodeFriendlyString> unicodeFriendlySet(Iterable<String> strings) {
final ImmutableSet.Builder<UnicodeFriendlyString> ret = ImmutableSet.builder();
for (final String s : strings) {
ret.add(unicodeFriendly(s));
}
return ret.build();
} | [
"public",
"static",
"ImmutableSet",
"<",
"UnicodeFriendlyString",
">",
"unicodeFriendlySet",
"(",
"Iterable",
"<",
"String",
">",
"strings",
")",
"{",
"final",
"ImmutableSet",
".",
"Builder",
"<",
"UnicodeFriendlyString",
">",
"ret",
"=",
"ImmutableSet",
".",
"bui... | Applies {@link #unicodeFriendly(String)} to the contents of a set. | [
"Applies",
"{"
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/StringUtils.java#L70-L78 | train | Returns an immutable set of unicode friendly strings from the given iterable of strings. | Create a Java method that does the following: "Returns an immutable set of unicode friendly strings from the given iterable of strings.". | Of course, here is the Java code you requested:
```java
public static ImmutableSet<UnicodeFriendlyString> unicodeFriendlySet(Iterable<String> strings) {
final ImmutableSet.Builder<UnicodeFriendlyString> ret = ImmutableSet.builder();
for (final String s : strings) {
ret.add(unicodeFriendly(s));
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.