method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
@SideOnly(Side.CLIENT)
public boolean shouldRotateAroundWhenRendering()
{
return false;
} | @SideOnly(Side.CLIENT) boolean function() { return false; } | /**
* Returns true if this item should be rotated by 180 degrees around the Y axis when being held in an entities
* hands.
*/ | Returns true if this item should be rotated by 180 degrees around the Y axis when being held in an entities hands | shouldRotateAroundWhenRendering | {
"repo_name": "kelthalorn/ConquestCraft",
"path": "build/tmp/recompSrc/net/minecraft/item/Item.java",
"license": "lgpl-2.1",
"size": 79763
} | [
"net.minecraftforge.fml.relauncher.Side",
"net.minecraftforge.fml.relauncher.SideOnly"
] | import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; | import net.minecraftforge.fml.relauncher.*; | [
"net.minecraftforge.fml"
] | net.minecraftforge.fml; | 1,785,353 |
public PrivateLinkServicePropertiesVisibility visibility() {
return this.visibility;
} | PrivateLinkServicePropertiesVisibility function() { return this.visibility; } | /**
* Get the visibility list of the private link service.
*
* @return the visibility value
*/ | Get the visibility list of the private link service | visibility | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/PrivateLinkServiceInner.java",
"license": "mit",
"size": 8862
} | [
"com.microsoft.azure.management.network.v2020_03_01.PrivateLinkServicePropertiesVisibility"
] | import com.microsoft.azure.management.network.v2020_03_01.PrivateLinkServicePropertiesVisibility; | import com.microsoft.azure.management.network.v2020_03_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,093,140 |
protected void highlightActor() {
Component comp;
final Tree tree;
if (getFlow().getParentComponent() == null)
return;
comp = getFlow().getParentComponent();
if (!(comp instanceof FlowPanel))
return;
if (((FlowPanel) comp).isDebugTreeVisible())
tree = ((FlowPanel) comp).getDebugTree();
else
tree = ((FlowPanel) comp).getTree();
SwingUtilities.invokeLater(() -> {
String full = m_CurrentActor.getFullName();
tree.locateAndDisplay(full);
});
} | void function() { Component comp; final Tree tree; if (getFlow().getParentComponent() == null) return; comp = getFlow().getParentComponent(); if (!(comp instanceof FlowPanel)) return; if (((FlowPanel) comp).isDebugTreeVisible()) tree = ((FlowPanel) comp).getDebugTree(); else tree = ((FlowPanel) comp).getTree(); SwingUtilities.invokeLater(() -> { String full = m_CurrentActor.getFullName(); tree.locateAndDisplay(full); }); } | /**
* Highlights the actor.
*/ | Highlights the actor | highlightActor | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/flow/execution/debug/ControlPanel.java",
"license": "gpl-3.0",
"size": 30445
} | [
"java.awt.Component",
"javax.swing.SwingUtilities"
] | import java.awt.Component; import javax.swing.SwingUtilities; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 793 |
protected void onFinished(AjaxRequestTarget target) {
} | void function(AjaxRequestTarget target) { } | /**
* Override this method for custom action
* on finish of the task when progression.isDone()
*
* This could be cleaning up or hiding the ProgressBar
* for example.
*
* @param target
*/ | Override this method for custom action on finish of the task when progression.isDone() This could be cleaning up or hiding the ProgressBar for example | onFinished | {
"repo_name": "BassJel/Jouve-Project",
"path": "source/java/com/doculibre/constellio/wicket/components/progress/ProgressInfoLabel.java",
"license": "lgpl-3.0",
"size": 3142
} | [
"org.apache.wicket.ajax.AjaxRequestTarget"
] | import org.apache.wicket.ajax.AjaxRequestTarget; | import org.apache.wicket.ajax.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 1,874,782 |
@Override
public List<RepoFileMetaData> getAllRepoFilesForAllStoragePools(StorageDomainType storageDomainType,
StoragePoolStatus storagePoolStatus, StorageDomainStatus storageDomainStatus,
VDSStatus vdsStatus) {
MapSqlParameterSource parameterSource =
getCustomMapSqlParameterSource().addValue("storage_domain_type", storageDomainType.getValue());
parameterSource.addValue("storage_pool_status", storagePoolStatus.getValue());
parameterSource.addValue("vds_status", vdsStatus.getValue());
parameterSource.addValue("storage_domain_status", storageDomainStatus.getValue());
return getCallsHandler().executeReadList("GetRepo_files_in_all_storage_pools",
ThinRepoFileMetaDataMapper.instance,
parameterSource);
}
private static class ThinRepoFileMetaDataMapper implements ParameterizedRowMapper<RepoFileMetaData> {
public static final ThinRepoFileMetaDataMapper instance = new ThinRepoFileMetaDataMapper(); | List<RepoFileMetaData> function(StorageDomainType storageDomainType, StoragePoolStatus storagePoolStatus, StorageDomainStatus storageDomainStatus, VDSStatus vdsStatus) { MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue(STR, storageDomainType.getValue()); parameterSource.addValue(STR, storagePoolStatus.getValue()); parameterSource.addValue(STR, vdsStatus.getValue()); parameterSource.addValue(STR, storageDomainStatus.getValue()); return getCallsHandler().executeReadList(STR, ThinRepoFileMetaDataMapper.instance, parameterSource); } private static class ThinRepoFileMetaDataMapper implements ParameterizedRowMapper<RepoFileMetaData> { public static final ThinRepoFileMetaDataMapper instance = new ThinRepoFileMetaDataMapper(); | /**
* Returns a list of all repository files with specific file extension from all the storage pools,
* which meet the same status, type and SPM status.
*/ | Returns a list of all repository files with specific file extension from all the storage pools, which meet the same status, type and SPM status | getAllRepoFilesForAllStoragePools | {
"repo_name": "derekhiggins/ovirt-engine",
"path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/RepoFileMetaDataDAODbFacadeImpl.java",
"license": "apache-2.0",
"size": 7280
} | [
"java.util.List",
"org.ovirt.engine.core.common.businessentities.RepoFileMetaData",
"org.ovirt.engine.core.common.businessentities.StorageDomainStatus",
"org.ovirt.engine.core.common.businessentities.StorageDomainType",
"org.ovirt.engine.core.common.businessentities.StoragePoolStatus",
"org.ovirt.engine.core.common.businessentities.VDSStatus",
"org.springframework.jdbc.core.namedparam.MapSqlParameterSource",
"org.springframework.jdbc.core.simple.ParameterizedRowMapper"
] | import java.util.List; import org.ovirt.engine.core.common.businessentities.RepoFileMetaData; import org.ovirt.engine.core.common.businessentities.StorageDomainStatus; import org.ovirt.engine.core.common.businessentities.StorageDomainType; import org.ovirt.engine.core.common.businessentities.StoragePoolStatus; import org.ovirt.engine.core.common.businessentities.VDSStatus; import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.jdbc.core.simple.ParameterizedRowMapper; | import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.springframework.jdbc.core.namedparam.*; import org.springframework.jdbc.core.simple.*; | [
"java.util",
"org.ovirt.engine",
"org.springframework.jdbc"
] | java.util; org.ovirt.engine; org.springframework.jdbc; | 401,852 |
public static List<String> filterInfluentIds(final Collection<String> influentIds, final char filterClass) {
final List<String> list = new ArrayList<String>(influentIds.size());
for (String s : influentIds) {
final InfluentId influentId = fromInfluentId(s);
if (influentId.idClass == filterClass) {
list.add(influentId.influentId);
}
}
return list;
} | static List<String> function(final Collection<String> influentIds, final char filterClass) { final List<String> list = new ArrayList<String>(influentIds.size()); for (String s : influentIds) { final InfluentId influentId = fromInfluentId(s); if (influentId.idClass == filterClass) { list.add(influentId.influentId); } } return list; } | /**
* Filters a list of influent ids for the specified class and returning a new list.
*/ | Filters a list of influent ids for the specified class and returning a new list | filterInfluentIds | {
"repo_name": "MjAbuz/influent",
"path": "influent-server/src/main/java/influent/server/utilities/InfluentId.java",
"license": "mit",
"size": 8779
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collection; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,315,297 |
Reference<AbstractPage> getChildRef(final int index) {
return childRefs[index];
} | Reference<AbstractPage> getChildRef(final int index) { return childRefs[index]; } | /**
* Return the {@link Reference} for the child at that index.
*
* @param index
* The index
*
* @return The {@link Reference}.
*/ | Return the <code>Reference</code> for the child at that index | getChildRef | {
"repo_name": "blazegraph/database",
"path": "bigdata-core/bigdata/src/java/com/bigdata/htree/DirectoryPage.java",
"license": "gpl-2.0",
"size": 83451
} | [
"java.lang.ref.Reference"
] | import java.lang.ref.Reference; | import java.lang.ref.*; | [
"java.lang"
] | java.lang; | 1,075,590 |
public boolean verify(final String username) throws IOException
{
final int result;
result = vrfy(username);
return result == SMTPReply.ACTION_OK ||
result == SMTPReply.USER_NOT_LOCAL_WILL_FORWARD;
} | boolean function(final String username) throws IOException { final int result; result = vrfy(username); return result == SMTPReply.ACTION_OK result == SMTPReply.USER_NOT_LOCAL_WILL_FORWARD; } | /**
* Verify that a username or email address is valid, i.e., that mail
* can be delivered to that mailbox on the server.
* <p>
* @param username The username or email address to validate.
* @return True if the username is valid, false if not.
* @throws SMTPConnectionClosedException
* If the SMTP server prematurely closes the connection as a result
* of the client being idle or some other reason causing the server
* to send SMTP reply code 421. This exception may be caught either
* as an IOException or independently as itself.
* @throws IOException If an I/O error occurs while either sending a
* command to the server or receiving a reply from the server.
*/ | Verify that a username or email address is valid, i.e., that mail can be delivered to that mailbox on the server. | verify | {
"repo_name": "apache/commons-net",
"path": "src/main/java/org/apache/commons/net/smtp/SMTPClient.java",
"license": "apache-2.0",
"size": 26389
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,437,834 |
private boolean cleanUp(Reference<?> reference) {
Method finalizeReferentMethod = getFinalizeReferentMethod();
if (finalizeReferentMethod == null) {
return false;
}
do {
reference.clear();
if (reference == frqReference) {
return false;
}
try {
finalizeReferentMethod.invoke(reference);
} catch (Throwable t) {
logger.log(Level.SEVERE, "Error cleaning up after reference.", t);
}
} while ((reference = queue.poll()) != null);
return true;
} | boolean function(Reference<?> reference) { Method finalizeReferentMethod = getFinalizeReferentMethod(); if (finalizeReferentMethod == null) { return false; } do { reference.clear(); if (reference == frqReference) { return false; } try { finalizeReferentMethod.invoke(reference); } catch (Throwable t) { logger.log(Level.SEVERE, STR, t); } } while ((reference = queue.poll()) != null); return true; } | /**
* Cleans up a single reference. Catches and logs all throwables.
* @return true if the caller should continue, false if the associated FinalizableReferenceQueue
* is no longer referenced.
*/ | Cleans up a single reference. Catches and logs all throwables | cleanUp | {
"repo_name": "mike10004/appengine-imaging",
"path": "gaecompat-awt-imaging/src/common/com/gaecompat/repackaged/com/google/common/base/internal/Finalizer.java",
"license": "apache-2.0",
"size": 7606
} | [
"java.lang.ref.Reference",
"java.lang.reflect.Method",
"java.util.logging.Level"
] | import java.lang.ref.Reference; import java.lang.reflect.Method; import java.util.logging.Level; | import java.lang.ref.*; import java.lang.reflect.*; import java.util.logging.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,028,685 |
static boolean equalsImpl(Map<?, ?> map, Object object) {
if (map == object) {
return true;
} else if (object instanceof Map) {
Map<?, ?> o = (Map<?, ?>) object;
return map.entrySet().equals(o.entrySet());
}
return false;
}
static final MapJoiner STANDARD_JOINER =
Collections2.STANDARD_JOINER.withKeyValueSeparator("="); | static boolean equalsImpl(Map<?, ?> map, Object object) { if (map == object) { return true; } else if (object instanceof Map) { Map<?, ?> o = (Map<?, ?>) object; return map.entrySet().equals(o.entrySet()); } return false; } static final MapJoiner STANDARD_JOINER = Collections2.STANDARD_JOINER.withKeyValueSeparator("="); | /**
* An implementation of {@link Map#equals}.
*/ | An implementation of <code>Map#equals</code> | equalsImpl | {
"repo_name": "g0alshhhit/guavaHelper",
"path": "guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Maps.java",
"license": "apache-2.0",
"size": 99241
} | [
"com.google.common.base.Joiner",
"java.util.Map"
] | import com.google.common.base.Joiner; import java.util.Map; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,240,992 |
@Test
public void testGeneral() {
DefaultHeatMapDataset d = new DefaultHeatMapDataset(10, 5, 0.0, 9.0,
0.0, 5.0);
assertEquals(10, d.getXSampleCount());
assertEquals(5, d.getYSampleCount());
assertEquals(0.0, d.getMinimumXValue(), EPSILON);
assertEquals(9.0, d.getMaximumXValue(), EPSILON);
assertEquals(0.0, d.getMinimumYValue(), EPSILON);
assertEquals(5.0, d.getMaximumYValue(), EPSILON);
assertEquals(0.0, d.getZValue(0, 0), EPSILON);
d.addChangeListener(this);
d.setZValue(0, 0, 1.0, false);
assertEquals(1.0, d.getZValue(0, 0), EPSILON);
assertNull(this.lastEvent);
d.setZValue(1, 2, 2.0);
assertEquals(2.0, d.getZValue(1, 2), EPSILON);
assertNotNull(this.lastEvent);
} | void function() { DefaultHeatMapDataset d = new DefaultHeatMapDataset(10, 5, 0.0, 9.0, 0.0, 5.0); assertEquals(10, d.getXSampleCount()); assertEquals(5, d.getYSampleCount()); assertEquals(0.0, d.getMinimumXValue(), EPSILON); assertEquals(9.0, d.getMaximumXValue(), EPSILON); assertEquals(0.0, d.getMinimumYValue(), EPSILON); assertEquals(5.0, d.getMaximumYValue(), EPSILON); assertEquals(0.0, d.getZValue(0, 0), EPSILON); d.addChangeListener(this); d.setZValue(0, 0, 1.0, false); assertEquals(1.0, d.getZValue(0, 0), EPSILON); assertNull(this.lastEvent); d.setZValue(1, 2, 2.0); assertEquals(2.0, d.getZValue(1, 2), EPSILON); assertNotNull(this.lastEvent); } | /**
* Some general tests.
*/ | Some general tests | testGeneral | {
"repo_name": "simon04/jfreechart",
"path": "src/test/java/org/jfree/data/general/DefaultHeatMapDatasetTest.java",
"license": "lgpl-2.1",
"size": 6815
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,758,142 |
private SysSystemAttributeMappingDto createAttributeMapping(UUID foundMapping, UUID schemaId) {
SysSchemaAttributeFilter filter = new SysSchemaAttributeFilter();
filter.setObjectClassId(schemaId);
List<SysSchemaAttributeDto> schemaAttributes = schemaAttributeService.find(filter, null).getContent();
UUID idOfSchemaAttributeName = null;
for (SysSchemaAttributeDto attribute : schemaAttributes) {
if (attribute.getName().equals(Name.NAME)) {
idOfSchemaAttributeName = attribute.getId();
break;
}
}
//
SysSystemAttributeMappingDto attributeMapping = systemAttributeMappingService
.findBySystemMappingAndName(foundMapping, IDM_ATTRIBUTE_NAME);
//
if (attributeMapping == null) {
attributeMapping = new SysSystemAttributeMappingDto();
attributeMapping.setEntityAttribute(true);
Assert.notNull(idOfSchemaAttributeName, "Attribute uid name not found!");
attributeMapping.setSchemaAttribute(idOfSchemaAttributeName);
attributeMapping.setIdmPropertyName(IDM_ATTRIBUTE_NAME);
attributeMapping.setSystemMapping(foundMapping);
attributeMapping.setName(IDM_ATTRIBUTE_NAME);
attributeMapping.setUid(true);
attributeMapping = systemAttributeMappingService.save(attributeMapping);
} else if (!attributeMapping.isUid()) {
throw new CoreException("Attribute mapping with name was already set and is not IDENTIFIER!");
}
return attributeMapping;
} | SysSystemAttributeMappingDto function(UUID foundMapping, UUID schemaId) { SysSchemaAttributeFilter filter = new SysSchemaAttributeFilter(); filter.setObjectClassId(schemaId); List<SysSchemaAttributeDto> schemaAttributes = schemaAttributeService.find(filter, null).getContent(); UUID idOfSchemaAttributeName = null; for (SysSchemaAttributeDto attribute : schemaAttributes) { if (attribute.getName().equals(Name.NAME)) { idOfSchemaAttributeName = attribute.getId(); break; } } .findBySystemMappingAndName(foundMapping, IDM_ATTRIBUTE_NAME); attributeMapping = new SysSystemAttributeMappingDto(); attributeMapping.setEntityAttribute(true); Assert.notNull(idOfSchemaAttributeName, STR); attributeMapping.setSchemaAttribute(idOfSchemaAttributeName); attributeMapping.setIdmPropertyName(IDM_ATTRIBUTE_NAME); attributeMapping.setSystemMapping(foundMapping); attributeMapping.setName(IDM_ATTRIBUTE_NAME); attributeMapping.setUid(true); attributeMapping = systemAttributeMappingService.save(attributeMapping); } else if (!attributeMapping.isUid()) { throw new CoreException(STR); } return attributeMapping; } | /**
* Creates attribute mapping for synchronization mapping
*
* @author Marek Klement
*
* @param foundMapping
* created mapping for sync
* @param schemaId
* uuid of schema
* @return new attribute mapping
*/ | Creates attribute mapping for synchronization mapping | createAttributeMapping | {
"repo_name": "bcvsolutions/CzechIdMng",
"path": "Realization/backend/vs/src/main/java/eu/bcvsolutions/idm/vs/service/impl/DefaultVsSystemService.java",
"license": "mit",
"size": 33635
} | [
"eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto",
"eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto",
"eu.bcvsolutions.idm.acc.dto.filter.SysSchemaAttributeFilter",
"eu.bcvsolutions.idm.core.api.exception.CoreException",
"java.util.List",
"org.identityconnectors.framework.common.objects.Name",
"org.springframework.util.Assert"
] | import eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto; import eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto; import eu.bcvsolutions.idm.acc.dto.filter.SysSchemaAttributeFilter; import eu.bcvsolutions.idm.core.api.exception.CoreException; import java.util.List; import org.identityconnectors.framework.common.objects.Name; import org.springframework.util.Assert; | import eu.bcvsolutions.idm.acc.dto.*; import eu.bcvsolutions.idm.acc.dto.filter.*; import eu.bcvsolutions.idm.core.api.exception.*; import java.util.*; import org.identityconnectors.framework.common.objects.*; import org.springframework.util.*; | [
"eu.bcvsolutions.idm",
"java.util",
"org.identityconnectors.framework",
"org.springframework.util"
] | eu.bcvsolutions.idm; java.util; org.identityconnectors.framework; org.springframework.util; | 768,139 |
@Nullable
QualifiedName asQualifiedName(); | QualifiedName asQualifiedName(); | /**
* Returns the qualified name for the expression if all the qualifiers are qualified expressions.
*/ | Returns the qualified name for the expression if all the qualifiers are qualified expressions | asQualifiedName | {
"repo_name": "consulo/consulo-python",
"path": "python-psi-api/src/main/java/com/jetbrains/python/psi/PyQualifiedExpression.java",
"license": "apache-2.0",
"size": 1599
} | [
"com.intellij.psi.util.QualifiedName"
] | import com.intellij.psi.util.QualifiedName; | import com.intellij.psi.util.*; | [
"com.intellij.psi"
] | com.intellij.psi; | 657,036 |
double getEnergyValue(ItemStack itemStack); | double getEnergyValue(ItemStack itemStack); | /**
* Determine the energy value for a single item in the supplied stack. The
* value is used by most machines in the discharge slot.
*
* This only applies to basic single use items, others are to be queried
* through e.g. ElectricItem.manager.getCharge().
*
* @param itemStack
* ItemStack containing the item to evaluate.
* @return energy in EU
*/ | Determine the energy value for a single item in the supplied stack. The value is used by most machines in the discharge slot. This only applies to basic single use items, others are to be queried through e.g. ElectricItem.manager.getCharge() | getEnergyValue | {
"repo_name": "4Space/4Space-5",
"path": "src/main/java/ic2/api/info/IEnergyValueProvider.java",
"license": "gpl-3.0",
"size": 531
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 2,175,920 |
void paramDouble(String scenario, double value) throws ErrorException, IOException, IllegalArgumentException; | void paramDouble(String scenario, double value) throws ErrorException, IOException, IllegalArgumentException; | /**
* Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0.
*
* @param scenario Send a post request with header values "scenario": "positive" or "negative"
* @param value Send a post request with header values 7e120 or -3.0
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
*/ | Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0 | paramDouble | {
"repo_name": "tbombach/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/header/Headers.java",
"license": "mit",
"size": 62060
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,232,779 |
public List<String> getParameterAsList(final String name, final PluginInfoRule ... infoRules ) {
return Arrays.asList(getParameterNotNull(name,infoRules).split(","));
} | List<String> function(final String name, final PluginInfoRule ... infoRules ) { return Arrays.asList(getParameterNotNull(name,infoRules).split(",")); } | /**
* Return parameter split by comma
*
* @param name the name of the parameter
* @return the value of the parameter as a list of strings
*/ | Return parameter split by comma | getParameterAsList | {
"repo_name": "TheRealAgentK/CFLint",
"path": "src/main/java/com/cflint/plugins/CFLintScannerAdapter.java",
"license": "bsd-3-clause",
"size": 6235
} | [
"com.cflint.config.CFLintPluginInfo",
"java.util.Arrays",
"java.util.List"
] | import com.cflint.config.CFLintPluginInfo; import java.util.Arrays; import java.util.List; | import com.cflint.config.*; import java.util.*; | [
"com.cflint.config",
"java.util"
] | com.cflint.config; java.util; | 191,553 |
public Label getLabel() {
if (value == null) {
value = new Label();
}
return value;
} | Label function() { if (value == null) { value = new Label(); } return value; } | /**
* Returns the label encapsulated by this node. A new label is created and associated with this
* node if it was created without an encapsulated label.
*
* @return the label encapsulated by this node.
*/ | Returns the label encapsulated by this node. A new label is created and associated with this node if it was created without an encapsulated label | getLabel | {
"repo_name": "benjholla/JReFrameworker",
"path": "plugin/org.objectweb.asm/src/org/objectweb/asm/tree/LabelNode.java",
"license": "mit",
"size": 2746
} | [
"org.objectweb.asm.Label"
] | import org.objectweb.asm.Label; | import org.objectweb.asm.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 1,418,765 |
void onPluginCrashed(CefBrowser browser,
String pluginPath); | void onPluginCrashed(CefBrowser browser, String pluginPath); | /**
* Called on the browser process UI thread when a plugin has crashed.
* @param browser The corresponding browser.
* @param pluginPath the path of the plugin that crashed.
*/ | Called on the browser process UI thread when a plugin has crashed | onPluginCrashed | {
"repo_name": "apicloudcom/APICloud-Studio",
"path": "org.cef/src/org/cef/handler/CefRequestHandler.java",
"license": "gpl-3.0",
"size": 7500
} | [
"org.cef.browser.CefBrowser"
] | import org.cef.browser.CefBrowser; | import org.cef.browser.*; | [
"org.cef.browser"
] | org.cef.browser; | 39,588 |
public InputStream getBody() {
return this.getBody(null);
} | InputStream function() { return this.getBody(null); } | /**
* Gets an InputStream for reading this response's body.
* @return an InputStream for reading the response's body.
*/ | Gets an InputStream for reading this response's body | getBody | {
"repo_name": "itsmanishagarwal/box-java-sdk",
"path": "src/main/java/com/box/sdk/BoxAPIResponse.java",
"license": "apache-2.0",
"size": 11621
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 915,429 |
EClass getArcGraphics(); | EClass getArcGraphics(); | /**
* Returns the meta object for class '{@link fr.lip6.move.pnml.ptnet.ArcGraphics <em>Arc Graphics</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Arc Graphics</em>'.
* @see fr.lip6.move.pnml.ptnet.ArcGraphics
* @generated
*/ | Returns the meta object for class '<code>fr.lip6.move.pnml.ptnet.ArcGraphics Arc Graphics</code>'. | getArcGraphics | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PTNet/src/fr/lip6/move/pnml/ptnet/PtnetPackage.java",
"license": "epl-1.0",
"size": 146931
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,556,530 |
public void onStopAnimation(View view) {
if (!checkReady()) {
return;
}
mMap.stopAnimation();
} | void function(View view) { if (!checkReady()) { return; } mMap.stopAnimation(); } | /**
* Called when the stop button is clicked.
*/ | Called when the stop button is clicked | onStopAnimation | {
"repo_name": "miikkajs/Greminder",
"path": "externals/google_play_services/samples/maps/src/com/example/mapdemo/CameraDemoActivity.java",
"license": "gpl-3.0",
"size": 7612
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 451,683 |
public boolean hasAccess(Type type, UserGroupInformation ugi) {
boolean access = acls.get(type).isUserAllowed(ugi);
if (LOG.isDebugEnabled()) {
LOG.debug("Checking user [{}] for: {} {} ", ugi.getShortUserName(),
type.toString(), acls.get(type).getAclString());
}
if (access) {
AccessControlList blacklist = blacklistedAcls.get(type);
access = (blacklist == null) || !blacklist.isUserInList(ugi);
if (LOG.isDebugEnabled()) {
if (blacklist == null) {
LOG.debug("No blacklist for {}", type.toString());
} else if (access) {
LOG.debug("user is not in {}" , blacklist.getAclString());
} else {
LOG.debug("user is in {}" , blacklist.getAclString());
}
}
}
if (LOG.isDebugEnabled()) {
LOG.debug("User: [{}], Type: {} Result: {}", ugi.getShortUserName(),
type.toString(), access);
}
return access;
} | boolean function(Type type, UserGroupInformation ugi) { boolean access = acls.get(type).isUserAllowed(ugi); if (LOG.isDebugEnabled()) { LOG.debug(STR, ugi.getShortUserName(), type.toString(), acls.get(type).getAclString()); } if (access) { AccessControlList blacklist = blacklistedAcls.get(type); access = (blacklist == null) !blacklist.isUserInList(ugi); if (LOG.isDebugEnabled()) { if (blacklist == null) { LOG.debug(STR, type.toString()); } else if (access) { LOG.debug(STR , blacklist.getAclString()); } else { LOG.debug(STR , blacklist.getAclString()); } } } if (LOG.isDebugEnabled()) { LOG.debug(STR, ugi.getShortUserName(), type.toString(), access); } return access; } | /**
* First Check if user is in ACL for the KMS operation, if yes, then
* return true if user is not present in any configured blacklist for
* the operation
* @param type KMS Operation
* @param ugi UserGroupInformation of user
* @return true is user has access
*/ | First Check if user is in ACL for the KMS operation, if yes, then return true if user is not present in any configured blacklist for the operation | hasAccess | {
"repo_name": "xiao-chen/hadoop",
"path": "hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSACLs.java",
"license": "apache-2.0",
"size": 12142
} | [
"org.apache.hadoop.security.UserGroupInformation",
"org.apache.hadoop.security.authorize.AccessControlList"
] | import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.authorize.AccessControlList; | import org.apache.hadoop.security.*; import org.apache.hadoop.security.authorize.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,098,367 |
@Override
public Restlet createInboundRoot() {
Router baseRouter = new Router(context);
baseRouter.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
for (RestletRoutable rr : restlets) {
baseRouter.attach(rr.basePath(), rr.getRestlet(context));
} | Restlet function() { Router baseRouter = new Router(context); baseRouter.setDefaultMatchingMode(Template.MODE_STARTS_WITH); for (RestletRoutable rr : restlets) { baseRouter.attach(rr.basePath(), rr.getRestlet(context)); } | /**
* Sets up the Restlet for the APIs under test using a Router. Also, a
* filter is installed to deal with double slashes in URLs.
* This code is adapted from
* net.floodlightcontroller.restserver.RestApiServer
*
* @return Router object for the APIs under test.
*/ | Sets up the Restlet for the APIs under test using a Router. Also, a filter is installed to deal with double slashes in URLs. This code is adapted from net.floodlightcontroller.restserver.RestApiServer | createInboundRoot | {
"repo_name": "opennetworkinglab/spring-open",
"path": "src/test/java/net/onrc/onos/api/rest/TestRestApiServer.java",
"license": "apache-2.0",
"size": 6076
} | [
"net.floodlightcontroller.restserver.RestletRoutable",
"org.restlet.Restlet",
"org.restlet.routing.Router",
"org.restlet.routing.Template"
] | import net.floodlightcontroller.restserver.RestletRoutable; import org.restlet.Restlet; import org.restlet.routing.Router; import org.restlet.routing.Template; | import net.floodlightcontroller.restserver.*; import org.restlet.*; import org.restlet.routing.*; | [
"net.floodlightcontroller.restserver",
"org.restlet",
"org.restlet.routing"
] | net.floodlightcontroller.restserver; org.restlet; org.restlet.routing; | 917,855 |
public static boolean isEffectivelyFinal(Element element) {
Symbol sym = (Symbol) element;
if (sym.getEnclosingElement().getKind() == ElementKind.METHOD &&
(sym.getEnclosingElement().flags() & ABSTRACT) != 0) {
return true;
}
return (sym.flags() & (FINAL | EFFECTIVELY_FINAL)) != 0;
} | static boolean function(Element element) { Symbol sym = (Symbol) element; if (sym.getEnclosingElement().getKind() == ElementKind.METHOD && (sym.getEnclosingElement().flags() & ABSTRACT) != 0) { return true; } return (sym.flags() & (FINAL EFFECTIVELY_FINAL)) != 0; } | /**
* Returns true if the element is a effectively final element.
*
* @return true if the element is effectively final
*/ | Returns true if the element is a effectively final element | isEffectivelyFinal | {
"repo_name": "mikelikespie/bazel",
"path": "third_party/checker_framework_javacutil/java/org/checkerframework/javacutil/ElementUtils.java",
"license": "apache-2.0",
"size": 15453
} | [
"com.sun.tools.javac.code.Symbol",
"javax.lang.model.element.Element",
"javax.lang.model.element.ElementKind"
] | import com.sun.tools.javac.code.Symbol; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; | import com.sun.tools.javac.code.*; import javax.lang.model.element.*; | [
"com.sun.tools",
"javax.lang"
] | com.sun.tools; javax.lang; | 2,105,420 |
public Vector3i getPos1() {
return this.pos1;
} | Vector3i function() { return this.pos1; } | /***
* Get the Vector3i of the position set with the left hand
* @return a Vector3i position
*/ | Get the Vector3i of the position set with the left hand | getPos1 | {
"repo_name": "DevOnTheRocks/StickyChunk",
"path": "src/main/java/rocks/devonthe/stickychunk/listener/RegionAreaListener.java",
"license": "gpl-3.0",
"size": 5329
} | [
"com.flowpowered.math.vector.Vector3i"
] | import com.flowpowered.math.vector.Vector3i; | import com.flowpowered.math.vector.*; | [
"com.flowpowered.math"
] | com.flowpowered.math; | 359,856 |
interface ImplementationInfo {
Object create(MutableModelNode modelNode); | interface ImplementationInfo { Object create(MutableModelNode modelNode); | /**
* Creates an instance of the delegate for the given node.
*/ | Creates an instance of the delegate for the given node | create | {
"repo_name": "HenryHarper/Acquire-Reboot",
"path": "gradle/src/model-core/org/gradle/model/internal/typeregistration/InstanceFactory.java",
"license": "mit",
"size": 1856
} | [
"org.gradle.model.internal.core.MutableModelNode"
] | import org.gradle.model.internal.core.MutableModelNode; | import org.gradle.model.internal.core.*; | [
"org.gradle.model"
] | org.gradle.model; | 2,815,274 |
public static <T extends Comparable<?>> ComparableExpression<T> asComparable(Expression<T> expr) {
Expression<T> underlyingMixin = ExpressionUtils.extract(expr);
if (underlyingMixin instanceof PathImpl) {
return new ComparablePath<T>((PathImpl<T>) underlyingMixin);
} else if (underlyingMixin instanceof OperationImpl) {
return new ComparableOperation<T>((OperationImpl<T>) underlyingMixin);
} else if (underlyingMixin instanceof TemplateExpressionImpl) {
return new ComparableTemplate<T>((TemplateExpressionImpl<T>) underlyingMixin);
} else {
return new ComparableExpression<T>(underlyingMixin) {
private static final long serialVersionUID = 389920618099394430L; | static <T extends Comparable<?>> ComparableExpression<T> function(Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new ComparablePath<T>((PathImpl<T>) underlyingMixin); } else if (underlyingMixin instanceof OperationImpl) { return new ComparableOperation<T>((OperationImpl<T>) underlyingMixin); } else if (underlyingMixin instanceof TemplateExpressionImpl) { return new ComparableTemplate<T>((TemplateExpressionImpl<T>) underlyingMixin); } else { return new ComparableExpression<T>(underlyingMixin) { private static final long serialVersionUID = 389920618099394430L; | /**
* Create a new ComparableExpression
*
* @param expr Expression of type Comparable
* @return new ComparableExpression
*/ | Create a new ComparableExpression | asComparable | {
"repo_name": "johnktims/querydsl",
"path": "querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java",
"license": "apache-2.0",
"size": 74346
} | [
"com.querydsl.core.types.Expression",
"com.querydsl.core.types.ExpressionUtils",
"com.querydsl.core.types.OperationImpl",
"com.querydsl.core.types.PathImpl",
"com.querydsl.core.types.TemplateExpressionImpl"
] | import com.querydsl.core.types.Expression; import com.querydsl.core.types.ExpressionUtils; import com.querydsl.core.types.OperationImpl; import com.querydsl.core.types.PathImpl; import com.querydsl.core.types.TemplateExpressionImpl; | import com.querydsl.core.types.*; | [
"com.querydsl.core"
] | com.querydsl.core; | 164,427 |
public BigDecimal getBalance()
{
BigDecimal retValue = Env.ZERO;
return retValue;
} // getBalance
| BigDecimal function() { BigDecimal retValue = Env.ZERO; return retValue; } | /**
* Get Balance
* @return Zero (always balanced)
*/ | Get Balance | getBalance | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiereLibero/extension/eevolution/libero/src/main/java/org/compiere/acct/Doc_DDOrder.java",
"license": "gpl-2.0",
"size": 2757
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 1,764,415 |
public List<User> findAllUser(User user); | List<User> function(User user); | /**
* Get all users from user role
* @return
*/ | Get all users from user role | findAllUser | {
"repo_name": "Feolive/EmploymentWebsite",
"path": "src/main/java/com/charmyin/cmstudio/basic/authorize/service/UserService.java",
"license": "mit",
"size": 1784
} | [
"com.charmyin.cmstudio.basic.authorize.vo.User",
"java.util.List"
] | import com.charmyin.cmstudio.basic.authorize.vo.User; import java.util.List; | import com.charmyin.cmstudio.basic.authorize.vo.*; import java.util.*; | [
"com.charmyin.cmstudio",
"java.util"
] | com.charmyin.cmstudio; java.util; | 2,339,840 |
protected void doSend(boolean inOut, String destinationName, Destination destination,
MessageCreator messageCreator, MessageSentCallback callback) {
CamelJmsTemplate template = (CamelJmsTemplate) (inOut ? getInOutTemplate() : getInOnlyTemplate());
if (LOG.isTraceEnabled()) {
LOG.trace("Using {} jms template", inOut ? "inOut" : "inOnly");
}
// destination should be preferred
if (destination != null) {
if (inOut) {
if (template != null) {
template.send(destination, messageCreator, callback);
}
} else {
if (template != null) {
template.send(destination, messageCreator, callback);
}
}
} else if (destinationName != null) {
if (inOut) {
if (template != null) {
template.send(destinationName, messageCreator, callback);
}
} else {
if (template != null) {
template.send(destinationName, messageCreator, callback);
}
}
} else {
throw new IllegalArgumentException("Neither destination nor destinationName is specified on this endpoint: " + endpoint);
}
} | void function(boolean inOut, String destinationName, Destination destination, MessageCreator messageCreator, MessageSentCallback callback) { CamelJmsTemplate template = (CamelJmsTemplate) (inOut ? getInOutTemplate() : getInOnlyTemplate()); if (LOG.isTraceEnabled()) { LOG.trace(STR, inOut ? "inOut" : STR); } if (destination != null) { if (inOut) { if (template != null) { template.send(destination, messageCreator, callback); } } else { if (template != null) { template.send(destination, messageCreator, callback); } } } else if (destinationName != null) { if (inOut) { if (template != null) { template.send(destinationName, messageCreator, callback); } } else { if (template != null) { template.send(destinationName, messageCreator, callback); } } } else { throw new IllegalArgumentException(STR + endpoint); } } | /**
* Sends the message using the JmsTemplate.
*
* @param inOut use inOut or inOnly template
* @param destinationName the destination name
* @param destination the destination (if no name provided)
* @param messageCreator the creator to create the {@link Message} to send
* @param callback optional callback to invoke when message has been sent
*/ | Sends the message using the JmsTemplate | doSend | {
"repo_name": "yuruki/camel",
"path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java",
"license": "apache-2.0",
"size": 27907
} | [
"javax.jms.Destination",
"org.apache.camel.component.jms.JmsConfiguration",
"org.springframework.jms.core.MessageCreator"
] | import javax.jms.Destination; import org.apache.camel.component.jms.JmsConfiguration; import org.springframework.jms.core.MessageCreator; | import javax.jms.*; import org.apache.camel.component.jms.*; import org.springframework.jms.core.*; | [
"javax.jms",
"org.apache.camel",
"org.springframework.jms"
] | javax.jms; org.apache.camel; org.springframework.jms; | 1,118,905 |
protected ClassLoader createClassLoader(List<File> paths, ClassLoader parent, Attributes atts) throws IOException {
boolean usePluginFirstClassLoader =
atts != null && Boolean.parseBoolean(atts.getValue("PluginFirstClassLoader"));
if (useAntClassLoader) {
AntClassLoader classLoader;
if (usePluginFirstClassLoader) {
classLoader = new PluginFirstClassLoader();
classLoader.setParentFirst(false);
classLoader.setParent(parent);
} else {
classLoader = new AntClassLoader(parent, true);
}
classLoader.addPathFiles(paths);
return classLoader;
} else {
List<URL> urls = new ArrayList<>();
for (File path : paths) {
urls.add(path.toURI().toURL());
}
URLClassLoader2 classLoader;
if (usePluginFirstClassLoader) {
classLoader = new PluginFirstClassLoader2(urls.toArray(new URL[0]), parent);
} else {
classLoader = new URLClassLoader2(urls.toArray(new URL[0]), parent);
}
return classLoader;
}
} | ClassLoader function(List<File> paths, ClassLoader parent, Attributes atts) throws IOException { boolean usePluginFirstClassLoader = atts != null && Boolean.parseBoolean(atts.getValue(STR)); if (useAntClassLoader) { AntClassLoader classLoader; if (usePluginFirstClassLoader) { classLoader = new PluginFirstClassLoader(); classLoader.setParentFirst(false); classLoader.setParent(parent); } else { classLoader = new AntClassLoader(parent, true); } classLoader.addPathFiles(paths); return classLoader; } else { List<URL> urls = new ArrayList<>(); for (File path : paths) { urls.add(path.toURI().toURL()); } URLClassLoader2 classLoader; if (usePluginFirstClassLoader) { classLoader = new PluginFirstClassLoader2(urls.toArray(new URL[0]), parent); } else { classLoader = new URLClassLoader2(urls.toArray(new URL[0]), parent); } return classLoader; } } | /**
* Creates the classloader that can load all the specified jar files and delegate to the given parent.
*/ | Creates the classloader that can load all the specified jar files and delegate to the given parent | createClassLoader | {
"repo_name": "v1v/jenkins",
"path": "core/src/main/java/hudson/ClassicPluginStrategy.java",
"license": "mit",
"size": 29812
} | [
"java.io.File",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.jar.Attributes"
] | import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.jar.Attributes; | import java.io.*; import java.util.*; import java.util.jar.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,628,134 |
public boolean unlock(Character character) {
return lock.open(character);
} | boolean function(Character character) { return lock.open(character); } | /**
* Opens lock
*
* @param character Game character opening lock
* @return True if lock was successfully opened, false otherwise
*/ | Opens lock | unlock | {
"repo_name": "Isangeles/Senlin",
"path": "src/main/java/pl/isangeles/senlin/core/Inventory.java",
"license": "gpl-2.0",
"size": 16244
} | [
"pl.isangeles.senlin.core.character.Character"
] | import pl.isangeles.senlin.core.character.Character; | import pl.isangeles.senlin.core.character.*; | [
"pl.isangeles.senlin"
] | pl.isangeles.senlin; | 1,301,665 |
public void setTimeUnit(TimeUnit timeUnit) {
this.timeUnit = timeUnit;
} | void function(TimeUnit timeUnit) { this.timeUnit = timeUnit; } | /**
* Sets the time unit used for keep alive time
*
* @param timeUnit the time unit
*/ | Sets the time unit used for keep alive time | setTimeUnit | {
"repo_name": "exodev/social",
"path": "component/common/src/main/java/org/exoplatform/social/common/service/thread/ThreadPoolConfig.java",
"license": "lgpl-3.0",
"size": 5899
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 670,929 |
public List<String> targetFqdns() {
return this.targetFqdns;
} | List<String> function() { return this.targetFqdns; } | /**
* Get list of FQDNs for this rule.
*
* @return the targetFqdns value
*/ | Get list of FQDNs for this rule | targetFqdns | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/AzureFirewallApplicationRule.java",
"license": "mit",
"size": 5070
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,884,960 |
private void createSearchTextBar() {
this.searchTextField = new JTextField("Search graph");
searchTextField.addFocusListener(new FocusListener() {
| void function() { this.searchTextField = new JTextField(STR); searchTextField.addFocusListener(new FocusListener() { | /**
* Creates JTextFiled, focus and action listeners for the graph search functionality.
* @author Shashank B S
*/ | Creates JTextFiled, focus and action listeners for the graph search functionality | createSearchTextBar | {
"repo_name": "VisuFlow/visuflow-plugin",
"path": "src/de/unipaderborn/visuflow/ui/graph/GraphManager.java",
"license": "apache-2.0",
"size": 55248
} | [
"java.awt.event.FocusListener",
"javax.swing.JTextField"
] | import java.awt.event.FocusListener; import javax.swing.JTextField; | import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 443,922 |
public void testCopyNodesConstraintViolationException() throws RepositoryException {
// if parent node is nt:base then no sub nodes can be created
Node subNodesNotAllowedNode = testRootNodeW2.addNode(nodeName3, ntBase);
testRootNodeW2.save();
try {
String dstAbsPath = subNodesNotAllowedNode.getPath() + "/" + node2.getName();
workspaceW2.copy(workspace.getName(), node2.getPath(), dstAbsPath);
fail("Copying a node below a node which can not have any sub nodes should throw a ConstraintViolationException.");
} catch (ConstraintViolationException e) {
// successful
}
} | void function() throws RepositoryException { Node subNodesNotAllowedNode = testRootNodeW2.addNode(nodeName3, ntBase); testRootNodeW2.save(); try { String dstAbsPath = subNodesNotAllowedNode.getPath() + "/" + node2.getName(); workspaceW2.copy(workspace.getName(), node2.getPath(), dstAbsPath); fail(STR); } catch (ConstraintViolationException e) { } } | /**
* A ConstraintViolationException is thrown if the operation would violate a
* node-type or other implementation-specific constraint.
*/ | A ConstraintViolationException is thrown if the operation would violate a node-type or other implementation-specific constraint | testCopyNodesConstraintViolationException | {
"repo_name": "jalkanen/Priha",
"path": "tests/tck/org/apache/jackrabbit/test/api/WorkspaceCopyBetweenWorkspacesTest.java",
"license": "apache-2.0",
"size": 7744
} | [
"javax.jcr.Node",
"javax.jcr.RepositoryException",
"javax.jcr.nodetype.ConstraintViolationException"
] | import javax.jcr.Node; import javax.jcr.RepositoryException; import javax.jcr.nodetype.ConstraintViolationException; | import javax.jcr.*; import javax.jcr.nodetype.*; | [
"javax.jcr"
] | javax.jcr; | 1,833,086 |
public static final XMLInfo parseXML(URI uri, boolean peek) throws XMLToolsException {
try (InputStream is = uri.toURL().openStream()) {
InputSource source = new InputSource(is);
source.setSystemId(uri.toASCIIString());
return parseXML(source, peek);
} catch (IOException e) {
throw new XMLToolsException(e);
}
} | static final XMLInfo function(URI uri, boolean peek) throws XMLToolsException { try (InputStream is = uri.toURL().openStream()) { InputSource source = new InputSource(is); source.setSystemId(uri.toASCIIString()); return parseXML(source, peek); } catch (IOException e) { throw new XMLToolsException(e); } } | /**
* Returns some root node information and optionally asserts that the contents at the
* specified URI is well formed.
* @param uri the URI
* @param peek true if the parsing should stop after reading the root element. If true,
* the contents at the specified URI may or may not be well formed beyond the first start tag.
* @return returns the root node, or null if file is not well formed
* @throws XMLToolsException if a parser cannot be configured or if parsing fails
*/ | Returns some root node information and optionally asserts that the contents at the specified URI is well formed | parseXML | {
"repo_name": "daisy/pipeline-issues",
"path": "libs/dotify/dotify.common/src/org/daisy/dotify/common/xml/XMLTools.java",
"license": "apache-2.0",
"size": 25289
} | [
"java.io.IOException",
"java.io.InputStream",
"org.xml.sax.InputSource"
] | import java.io.IOException; import java.io.InputStream; import org.xml.sax.InputSource; | import java.io.*; import org.xml.sax.*; | [
"java.io",
"org.xml.sax"
] | java.io; org.xml.sax; | 1,300,318 |
public int avio_rl16(Pointer<AVIOContext > s) {
return avio_rl16(Pointer.getPeer(s));
} | int function(Pointer<AVIOContext > s) { return avio_rl16(Pointer.getPeer(s)); } | /**
* Original signature : <code>int avio_rl16(AVIOContext*)</code><br>
* <i>native declaration : ffmpeg_build/include/libavformat/avio.h:307</i>
*/ | Original signature : <code>int avio_rl16(AVIOContext*)</code> native declaration : ffmpeg_build/include/libavformat/avio.h:307 | avio_rl16 | {
"repo_name": "mutars/java_libav",
"path": "wrapper/src/main/java/com/mutar/libav/bridge/avformat/AvformatLibrary.java",
"license": "gpl-2.0",
"size": 136321
} | [
"org.bridj.Pointer"
] | import org.bridj.Pointer; | import org.bridj.*; | [
"org.bridj"
] | org.bridj; | 1,917,256 |
private ImmutableMap<String, BuildTarget> createAliasToBuildTargetMap(
ImmutableMap<String, String> rawAliasMap) {
// We use a LinkedHashMap rather than an ImmutableMap.Builder because we want both (1) order to
// be preserved, and (2) the ability to inspect the Map while building it up.
LinkedHashMap<String, BuildTarget> aliasToBuildTarget = Maps.newLinkedHashMap();
for (Map.Entry<String, String> aliasEntry : rawAliasMap.entrySet()) {
String alias = aliasEntry.getKey();
validateAliasName(alias);
// Determine whether the mapping is to a build target or to an alias.
String value = aliasEntry.getValue();
BuildTarget buildTarget;
if (isValidAliasName(value)) {
buildTarget = aliasToBuildTarget.get(value);
if (buildTarget == null) {
throw new HumanReadableException("No alias for: %s.", value);
}
} else {
// Here we parse the alias values with a BuildTargetParser to be strict. We could be looser
// and just grab everything between "//" and ":" and assume it's a valid base path.
buildTarget = BuildTargetParser.INSTANCE.parse(
value,
BuildTargetPatternParser.fullyQualified(),
getCellRoots());
}
aliasToBuildTarget.put(alias, buildTarget);
}
return ImmutableMap.copyOf(aliasToBuildTarget);
} | ImmutableMap<String, BuildTarget> function( ImmutableMap<String, String> rawAliasMap) { LinkedHashMap<String, BuildTarget> aliasToBuildTarget = Maps.newLinkedHashMap(); for (Map.Entry<String, String> aliasEntry : rawAliasMap.entrySet()) { String alias = aliasEntry.getKey(); validateAliasName(alias); String value = aliasEntry.getValue(); BuildTarget buildTarget; if (isValidAliasName(value)) { buildTarget = aliasToBuildTarget.get(value); if (buildTarget == null) { throw new HumanReadableException(STR, value); } } else { buildTarget = BuildTargetParser.INSTANCE.parse( value, BuildTargetPatternParser.fullyQualified(), getCellRoots()); } aliasToBuildTarget.put(alias, buildTarget); } return ImmutableMap.copyOf(aliasToBuildTarget); } | /**
* In a {@link BuckConfig}, an alias can either refer to a fully-qualified build target, or an
* alias defined earlier in the {@code alias} section. The mapping produced by this method
* reflects the result of resolving all aliases as values in the {@code alias} section.
*/ | In a <code>BuckConfig</code>, an alias can either refer to a fully-qualified build target, or an alias defined earlier in the alias section. The mapping produced by this method reflects the result of resolving all aliases as values in the alias section | createAliasToBuildTargetMap | {
"repo_name": "Distrotech/buck",
"path": "src/com/facebook/buck/cli/BuckConfig.java",
"license": "apache-2.0",
"size": 26746
} | [
"com.facebook.buck.model.BuildTarget",
"com.facebook.buck.parser.BuildTargetParser",
"com.facebook.buck.parser.BuildTargetPatternParser",
"com.facebook.buck.util.HumanReadableException",
"com.google.common.collect.ImmutableMap",
"com.google.common.collect.Maps",
"java.util.LinkedHashMap",
"java.util.Map"
] | import com.facebook.buck.model.BuildTarget; import com.facebook.buck.parser.BuildTargetParser; import com.facebook.buck.parser.BuildTargetPatternParser; import com.facebook.buck.util.HumanReadableException; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import java.util.LinkedHashMap; import java.util.Map; | import com.facebook.buck.model.*; import com.facebook.buck.parser.*; import com.facebook.buck.util.*; import com.google.common.collect.*; import java.util.*; | [
"com.facebook.buck",
"com.google.common",
"java.util"
] | com.facebook.buck; com.google.common; java.util; | 932,911 |
public QName getQName() {
if (qnameAsString != null) {
return QName.valueOf(qnameAsString);
} else {
return null;
}
} | QName function() { if (qnameAsString != null) { return QName.valueOf(qnameAsString); } else { return null; } } | /**
* Get the QName
*
* @return the QName based on the qnameAsString value
*/ | Get the QName | getQName | {
"repo_name": "wso2/wso2-axis2",
"path": "modules/kernel/src/org/apache/axis2/util/MetaDataEntry.java",
"license": "apache-2.0",
"size": 8690
} | [
"javax.xml.namespace.QName"
] | import javax.xml.namespace.QName; | import javax.xml.namespace.*; | [
"javax.xml"
] | javax.xml; | 966,585 |
public void header(String key, String value) {
if (headers == null) {
headers = new HashMap<String, String>();
}
headers.put(key, value);
} | void function(String key, String value) { if (headers == null) { headers = new HashMap<String, String>(); } headers.put(key, value); } | /**
* Adds the specified header
*
* @param key
* The header key
* @param value
* The header value
*/ | Adds the specified header | header | {
"repo_name": "Comcast/flume2storm",
"path": "core/src/main/java/com/comcast/viper/flume2storm/event/F2SEventBuilder.java",
"license": "apache-2.0",
"size": 2022
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 762,314 |
private void parseVersionType(String group, String value, VCardImpl vcard) throws VCardBuildException {
try {
VersionFeature versionFeature = new VersionType();
if(value.compareTo(VCardVersion.V3_0.getVersion()) == 0) {
versionFeature.setVersion(VCardVersion.V3_0);
}
else if(value.compareTo(VCardVersion.V2_1.getVersion()) == 0) {
versionFeature.setVersion(VCardVersion.V2_1);
}
else {
throw new VCardException("Invalid value for \"VERSION\" type. Must be [3.0, 2.1]");
}
if(group != null) {
versionFeature.setGroup(group);
}
vcard.setVersion(versionFeature);
}
catch(Exception ex) {
throw new VCardBuildException("VersionType ("+VCardType.VERSION.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
}
}
| void function(String group, String value, VCardImpl vcard) throws VCardBuildException { try { VersionFeature versionFeature = new VersionType(); if(value.compareTo(VCardVersion.V3_0.getVersion()) == 0) { versionFeature.setVersion(VCardVersion.V3_0); } else if(value.compareTo(VCardVersion.V2_1.getVersion()) == 0) { versionFeature.setVersion(VCardVersion.V2_1); } else { throw new VCardException(STRVERSION\STR); } if(group != null) { versionFeature.setGroup(group); } vcard.setVersion(versionFeature); } catch(Exception ex) { throw new VCardBuildException(STR+VCardType.VERSION.getType()+STR+ex.getClass().getName()+STR+ex.getMessage(), ex); } } | /**
* <p>Parses the VERSION type.</p>
*
* @param group
* @param value
* @param vcard
* @throws VCardBuildException
*/ | Parses the VERSION type | parseVersionType | {
"repo_name": "FullMetal210/milton2",
"path": "external/cardme/src/main/java/info/ineighborhood/cardme/engine/VCardEngine.java",
"license": "agpl-3.0",
"size": 85305
} | [
"info.ineighborhood.cardme.vcard.VCardImpl",
"info.ineighborhood.cardme.vcard.VCardType",
"info.ineighborhood.cardme.vcard.VCardVersion",
"info.ineighborhood.cardme.vcard.errors.VCardBuildException",
"info.ineighborhood.cardme.vcard.errors.VCardException",
"info.ineighborhood.cardme.vcard.features.VersionFeature",
"info.ineighborhood.cardme.vcard.types.VersionType"
] | import info.ineighborhood.cardme.vcard.VCardImpl; import info.ineighborhood.cardme.vcard.VCardType; import info.ineighborhood.cardme.vcard.VCardVersion; import info.ineighborhood.cardme.vcard.errors.VCardBuildException; import info.ineighborhood.cardme.vcard.errors.VCardException; import info.ineighborhood.cardme.vcard.features.VersionFeature; import info.ineighborhood.cardme.vcard.types.VersionType; | import info.ineighborhood.cardme.vcard.*; import info.ineighborhood.cardme.vcard.errors.*; import info.ineighborhood.cardme.vcard.features.*; import info.ineighborhood.cardme.vcard.types.*; | [
"info.ineighborhood.cardme"
] | info.ineighborhood.cardme; | 654,351 |
void visit(TernaryExpression node);
| void visit(TernaryExpression node); | /**
* Visits an AST node of type TernaryExpression.
*
* @param node
* The AST node to visit
*/ | Visits an AST node of type TernaryExpression | visit | {
"repo_name": "team-worthwhile/worthwhile",
"path": "implementierung/src/worthwhile.model/src/edu/kit/iti/formal/pse/worthwhile/model/ast/visitor/IASTNodeVisitor.java",
"license": "bsd-3-clause",
"size": 13590
} | [
"edu.kit.iti.formal.pse.worthwhile.model.ast.TernaryExpression"
] | import edu.kit.iti.formal.pse.worthwhile.model.ast.TernaryExpression; | import edu.kit.iti.formal.pse.worthwhile.model.ast.*; | [
"edu.kit.iti"
] | edu.kit.iti; | 494,760 |
public Map<Double, Integer>[] valuesByFrequency() {
return valuesByFreq;
} | Map<Double, Integer>[] function() { return valuesByFreq; } | /**
* Gets the array of maps of frequencies by value in partition for each feature in the dataset.
*
* @return The frequencies.
*/ | Gets the array of maps of frequencies by value in partition for each feature in the dataset | valuesByFrequency | {
"repo_name": "voipp/ignite",
"path": "modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/imputer/ImputerPartitionData.java",
"license": "apache-2.0",
"size": 3100
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 332,192 |
@Override public T visitAssignment(@NotNull GikiParser.AssignmentContext ctx) { return visitChildren(ctx); } | @Override public T visitAssignment(@NotNull GikiParser.AssignmentContext ctx) { return visitChildren(ctx); } | /**
* {@inheritDoc}
* <p/>
* The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.
*/ | The default implementation returns the result of calling <code>#visitChildren</code> on ctx | visitDecision | {
"repo_name": "jakobehmsen/giki-lang",
"path": "eclipse/src/giki/antlr4/GikiBaseVisitor.java",
"license": "mit",
"size": 11148
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,897,637 |
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
if (!this.worldObj.isRemote)
{
int i = par1MovingObjectPosition.blockX;
int j = par1MovingObjectPosition.blockY;
int k = par1MovingObjectPosition.blockZ;
switch (par1MovingObjectPosition.sideHit)
{
case 0:
--j;
break;
case 1:
++j;
break;
case 2:
--k;
break;
case 3:
++k;
break;
case 4:
--i;
break;
case 5:
++i;
}
if (this.worldObj.isAirBlock(i, j, k))
{
this.worldObj.setBlock(i, j, k, Block.waterMoving.blockID);
}
}
this.setDead();
} | void function(MovingObjectPosition par1MovingObjectPosition) { if (!this.worldObj.isRemote) { int i = par1MovingObjectPosition.blockX; int j = par1MovingObjectPosition.blockY; int k = par1MovingObjectPosition.blockZ; switch (par1MovingObjectPosition.sideHit) { case 0: --j; break; case 1: ++j; break; case 2: --k; break; case 3: ++k; break; case 4: --i; break; case 5: ++i; } if (this.worldObj.isAirBlock(i, j, k)) { this.worldObj.setBlock(i, j, k, Block.waterMoving.blockID); } } this.setDead(); } | /**
* Called when this EntityThrowable hits a block or entity.
*/ | Called when this EntityThrowable hits a block or entity | onImpact | {
"repo_name": "MinecraftModArchive/Runes-And-Silver",
"path": "src/main/java/Runes/Entites/EntityWaterTalisman.java",
"license": "lgpl-3.0",
"size": 2837
} | [
"net.minecraft.block.Block",
"net.minecraft.util.MovingObjectPosition"
] | import net.minecraft.block.Block; import net.minecraft.util.MovingObjectPosition; | import net.minecraft.block.*; import net.minecraft.util.*; | [
"net.minecraft.block",
"net.minecraft.util"
] | net.minecraft.block; net.minecraft.util; | 1,087,095 |
private void loadServerParameters() {
serverParser.addArgument("-p", "--port").required(true)
.help("Port to be assigned to the server.\n");
serverParser.addArgument("-m", "--model").required(true)
.help("It is required to provide a model to perform POS tagging.");
this.serverParser.addArgument("-lm", "--lemmatizerModel")
.required(true)
.help("It is required to provide a lemmatizer model.");
serverParser.addArgument("-l", "--language")
.choices("de", "en", "es", "eu", "fr", "gl", "it", "nl")
.required(true)
.help("Choose a language to perform annotation with ixa-pipe-pos.");
serverParser.addArgument("--beamSize").required(false)
.setDefault(DEFAULT_BEAM_SIZE)
.help("Choose beam size for decoding, it defaults to 3.");
serverParser.addArgument("-o", "--outputFormat").required(false)
.choices("naf", "conll")
.setDefault(Flags.DEFAULT_OUTPUT_FORMAT)
.help("Choose output format; it defaults to NAF.\n");
serverParser.addArgument("-mw", "--multiwords")
.action(Arguments.storeTrue())
.help("Use to detect and process multiwords.\n");
serverParser.addArgument("-d", "--dictag")
.action(Arguments.storeTrue())
.help("Post process POS tagger output with a monosemic dictionary.\n");
serverParser.addArgument("-a","--allMorphology")
.action(Arguments.storeTrue())
.help("Print all the POS tags and lemmas before disambiguation.\n");
} | void function() { serverParser.addArgument("-p", STR).required(true) .help(STR); serverParser.addArgument("-m", STR).required(true) .help(STR); this.serverParser.addArgument("-lm", STR) .required(true) .help(STR); serverParser.addArgument("-l", STR) .choices("de", "en", "es", "eu", "fr", "gl", "it", "nl") .required(true) .help(STR); serverParser.addArgument(STR).required(false) .setDefault(DEFAULT_BEAM_SIZE) .help(STR); serverParser.addArgument("-o", STR).required(false) .choices("naf", "conll") .setDefault(Flags.DEFAULT_OUTPUT_FORMAT) .help(STR); serverParser.addArgument("-mw", STR) .action(Arguments.storeTrue()) .help(STR); serverParser.addArgument("-d", STR) .action(Arguments.storeTrue()) .help(STR); serverParser.addArgument("-a",STR) .action(Arguments.storeTrue()) .help(STR); } | /**
* Create the available parameters for POS tagging.
*/ | Create the available parameters for POS tagging | loadServerParameters | {
"repo_name": "ixa-ehu/ixa-pipe-pos",
"path": "src/main/java/eus/ixa/ixa/pipe/pos/CLI.java",
"license": "apache-2.0",
"size": 21145
} | [
"eus.ixa.ixa.pipe.pos.train.Flags",
"net.sourceforge.argparse4j.impl.Arguments"
] | import eus.ixa.ixa.pipe.pos.train.Flags; import net.sourceforge.argparse4j.impl.Arguments; | import eus.ixa.ixa.pipe.pos.train.*; import net.sourceforge.argparse4j.impl.*; | [
"eus.ixa.ixa",
"net.sourceforge.argparse4j"
] | eus.ixa.ixa; net.sourceforge.argparse4j; | 807,989 |
public synchronized BlockingRowSet openWriterSocket() throws IOException {
// Create an output row set: to be added to BaseStep.outputRowSets
//
final BlockingRowSet rowSet = new BlockingRowSet( baseStep.getTransMeta().getSizeRowset() );
// Set the details for the source and target step as well as the target slave server.
// This will help us determine the pre-calculated partition nr later in the game. (putRow())
//
rowSet.setThreadNameFromToCopy( sourceStep, sourceStepCopyNr, targetStep, targetStepCopyNr );
rowSet.setRemoteSlaveServerName( targetSlaveServerName );
// Start a thread that will read out the output row set and send the data over the wire...
// This will make everything else transparent, copying, distributing, including partitioning, etc.
//
Runnable runnable = new Runnable() {
| synchronized BlockingRowSet function() throws IOException { final BlockingRowSet rowSet = new BlockingRowSet( baseStep.getTransMeta().getSizeRowset() ); rowSet.setThreadNameFromToCopy( sourceStep, sourceStepCopyNr, targetStep, targetStepCopyNr ); rowSet.setRemoteSlaveServerName( targetSlaveServerName ); Runnable runnable = new Runnable() { | /**
* Open a socket for writing.
*
* @return the RowSet created that will accept the rows for the remote step
* @throws IOException
*/ | Open a socket for writing | openWriterSocket | {
"repo_name": "kurtwalker/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/step/RemoteStep.java",
"license": "apache-2.0",
"size": 32741
} | [
"java.io.IOException",
"org.pentaho.di.core.BlockingRowSet"
] | import java.io.IOException; import org.pentaho.di.core.BlockingRowSet; | import java.io.*; import org.pentaho.di.core.*; | [
"java.io",
"org.pentaho.di"
] | java.io; org.pentaho.di; | 2,308,106 |
@Deprecated
TTRR06Vastus findIsikRelvaloadRelvad(BigInteger isikId,
String isikukood, String kood) throws XRoadServiceConsumptionException; | TTRR06Vastus findIsikRelvaloadRelvad(BigInteger isikId, String isikukood, String kood) throws XRoadServiceConsumptionException; | /**
* <code>trelvaregister.isik_relvaload_relvad.v1</code> service.
*/ | <code>trelvaregister.isik_relvaload_relvad.v1</code> service | findIsikRelvaloadRelvad | {
"repo_name": "raulpiiber/j-road",
"path": "client-service/trelvaregister/src/main/java/com/nortal/jroad/client/trelvaregister/TrelvaregisterXTeeService.java",
"license": "apache-2.0",
"size": 2361
} | [
"com.nortal.jroad.client.exception.XRoadServiceConsumptionException",
"com.nortal.jroad.client.trelvaregister.types.ee.riik.xtee.trelvaregister.producers.producer.trelvaregister.TTRR06Vastus",
"java.math.BigInteger"
] | import com.nortal.jroad.client.exception.XRoadServiceConsumptionException; import com.nortal.jroad.client.trelvaregister.types.ee.riik.xtee.trelvaregister.producers.producer.trelvaregister.TTRR06Vastus; import java.math.BigInteger; | import com.nortal.jroad.client.exception.*; import com.nortal.jroad.client.trelvaregister.types.ee.riik.xtee.trelvaregister.producers.producer.trelvaregister.*; import java.math.*; | [
"com.nortal.jroad",
"java.math"
] | com.nortal.jroad; java.math; | 73,333 |
public void write(final Consumer<T> writeFn) {
try (final ManagedLock<ReadWriteLock> writeLock = ManagedLock.acquire(lock, LockMode.WRITE_LOCK)) {
writeFn.accept(value);
}
} | void function(final Consumer<T> writeFn) { try (final ManagedLock<ReadWriteLock> writeLock = ManagedLock.acquire(lock, LockMode.WRITE_LOCK)) { writeFn.accept(value); } } | /**
* Write to the value.
*
* @param writeFn A function which writes to the value.
*/ | Write to the value | write | {
"repo_name": "windauer/exist",
"path": "exist-core/src/main/java/org/exist/util/ConcurrentValueWrapper.java",
"license": "lgpl-2.1",
"size": 4255
} | [
"java.util.concurrent.locks.ReadWriteLock",
"java.util.function.Consumer",
"org.exist.storage.lock.Lock",
"org.exist.storage.lock.ManagedLock"
] | import java.util.concurrent.locks.ReadWriteLock; import java.util.function.Consumer; import org.exist.storage.lock.Lock; import org.exist.storage.lock.ManagedLock; | import java.util.concurrent.locks.*; import java.util.function.*; import org.exist.storage.lock.*; | [
"java.util",
"org.exist.storage"
] | java.util; org.exist.storage; | 1,726,957 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ServerSecurityAlertPolicyInner>> listByServerNextSinglePageAsync(
String nextLink, Context context) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
} | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<ServerSecurityAlertPolicyInner>> function( String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR; context = this.client.mergeContext(context); return service .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } | /**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of the server's security alert policies.
*/ | Get the next page of items | listByServerNextSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPoliciesClientImpl.java",
"license": "mit",
"size": 43102
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context",
"com.azure.resourcemanager.mariadb.fluent.models.ServerSecurityAlertPolicyInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.mariadb.fluent.models.ServerSecurityAlertPolicyInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.mariadb.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,896,178 |
private static String getXmlProlog(InputStream is, String guessedEnc)
throws IOException {
String encoding = null;
if (guessedEnc != null) {
byte[] bytes = new byte[BUFFER_SIZE];
is.mark(BUFFER_SIZE);
int offset = 0;
int max = BUFFER_SIZE;
int c = is.read(bytes, offset, max);
int firstGT = -1;
String xmlProlog = null;
while (c != -1 && firstGT == -1 && offset < BUFFER_SIZE) {
offset += c;
max -= c;
c = is.read(bytes, offset, max);
xmlProlog = new String(bytes, 0, offset, guessedEnc);
firstGT = xmlProlog.indexOf('>');
}
if (firstGT == -1) {
if (c == -1) {
throw new IOException("Unexpected end of XML stream");
} else {
throw new IOException(
"XML prolog or ROOT element not found on first "
+ offset + " bytes");
}
}
int bytesRead = offset;
if (bytesRead > 0) {
is.reset();
BufferedReader bReader = new BufferedReader(new StringReader(
xmlProlog.substring(0, firstGT + 1)));
StringBuffer prolog = new StringBuffer();
String line = bReader.readLine();
while (line != null) {
prolog.append(line);
line = bReader.readLine();
}
Matcher m = ENCODING_PATTERN.matcher(prolog);
if (m.find()) {
encoding = m.group(1).toUpperCase();
encoding = encoding.substring(1, encoding.length() - 1);
}
}
}
return encoding;
} | static String function(InputStream is, String guessedEnc) throws IOException { String encoding = null; if (guessedEnc != null) { byte[] bytes = new byte[BUFFER_SIZE]; is.mark(BUFFER_SIZE); int offset = 0; int max = BUFFER_SIZE; int c = is.read(bytes, offset, max); int firstGT = -1; String xmlProlog = null; while (c != -1 && firstGT == -1 && offset < BUFFER_SIZE) { offset += c; max -= c; c = is.read(bytes, offset, max); xmlProlog = new String(bytes, 0, offset, guessedEnc); firstGT = xmlProlog.indexOf('>'); } if (firstGT == -1) { if (c == -1) { throw new IOException(STR); } else { throw new IOException( STR + offset + STR); } } int bytesRead = offset; if (bytesRead > 0) { is.reset(); BufferedReader bReader = new BufferedReader(new StringReader( xmlProlog.substring(0, firstGT + 1))); StringBuffer prolog = new StringBuffer(); String line = bReader.readLine(); while (line != null) { prolog.append(line); line = bReader.readLine(); } Matcher m = ENCODING_PATTERN.matcher(prolog); if (m.find()) { encoding = m.group(1).toUpperCase(); encoding = encoding.substring(1, encoding.length() - 1); } } } return encoding; } | /**
* Returns the encoding declared in the <?xml encoding=...?>, NULL if none.
*
* @param is InputStream to create the reader from.
* @param guessedEnc guessed encoding
* @return the encoding declared in the <?xml encoding=...?>
* @throws IOException thrown if there is a problem reading the stream.
*/ | Returns the encoding declared in the , NULL if none | getXmlProlog | {
"repo_name": "DanielRuf/Plain-of-JARs",
"path": "sources/epub2xls/nl/siegmann/epublib/util/commons/io/XmlStreamReader.java",
"license": "gpl-3.0",
"size": 29755
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStream",
"java.io.StringReader",
"java.util.regex.Matcher"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.StringReader; import java.util.regex.Matcher; | import java.io.*; import java.util.regex.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,847,165 |
interface WithSourceVirtualMachine {
WithCreate withSourceVirtualMachine(SubResource sourceVirtualMachine);
} | interface WithSourceVirtualMachine { WithCreate withSourceVirtualMachine(SubResource sourceVirtualMachine); } | /**
* Specifies sourceVirtualMachine.
*/ | Specifies sourceVirtualMachine | withSourceVirtualMachine | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/Image.java",
"license": "mit",
"size": 4278
} | [
"com.microsoft.azure.SubResource"
] | import com.microsoft.azure.SubResource; | import com.microsoft.azure.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,135,864 |
public void setOwner(Owner owner) {
this.owner = owner;
}
| void function(Owner owner) { this.owner = owner; } | /**
* Owner of the Attribute.
*
* @param owner the Owner.
*/ | Owner of the Attribute | setOwner | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/ExtendedAttribute.java",
"license": "epl-1.0",
"size": 11269
} | [
"org.nabucco.framework.base.facade.datatype.Owner"
] | import org.nabucco.framework.base.facade.datatype.Owner; | import org.nabucco.framework.base.facade.datatype.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 1,343,693 |
public void rebuildDisplay() {
final RadioGroup radioGroup = (RadioGroup) findViewById(getServerListGroupId());
radioGroup.removeAllViews();
setupRadioButtons();
final SalesforceServerRadioButton rb = (SalesforceServerRadioButton) radioGroup.getChildAt(0);
if (rb != null) {
rb.setChecked(true);
}
} | void function() { final RadioGroup radioGroup = (RadioGroup) findViewById(getServerListGroupId()); radioGroup.removeAllViews(); setupRadioButtons(); final SalesforceServerRadioButton rb = (SalesforceServerRadioButton) radioGroup.getChildAt(0); if (rb != null) { rb.setChecked(true); } } | /**
* Rebuilds the display.
*/ | Rebuilds the display | rebuildDisplay | {
"repo_name": "huminzhi/SalesforceMobileSDK-Android",
"path": "libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/ServerPickerActivity.java",
"license": "apache-2.0",
"size": 8364
} | [
"android.widget.RadioGroup"
] | import android.widget.RadioGroup; | import android.widget.*; | [
"android.widget"
] | android.widget; | 2,257,363 |
public void setCh(FileChannel ch) {
this.ch = ch;
}
| void function(FileChannel ch) { this.ch = ch; } | /**
* Sets the ch.
*
* @param ch the ch to set
*/ | Sets the ch | setCh | {
"repo_name": "sizhaoliu/MemoryManagementBenchmark",
"path": "org.talend.dataprofiler.benchmark.MappedByteBuffer/src/main/java/org/talend/dataprofiler/benchmark/MappedByteBuffer/nio/ColumnSetRow.java",
"license": "apache-2.0",
"size": 7852
} | [
"java.nio.channels.FileChannel"
] | import java.nio.channels.FileChannel; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 2,266,271 |
@Override
public synchronized void actionPerformed(ActionEvent e) {
if (e.getSource() == pauseTimer) {
if (selected != null) {
Rectangle2D rect = selected.getRectangle();
GamePanel.repaintPanel((int) (GamePanel.getDx() + rect.getX() * GamePanel.getTile()), (int) (GamePanel.getDy() + rect.getY() * GamePanel.getTile()), (int) (GamePanel.getTile() * rect.getWidth()), (int) (GamePanel.getTile() * rect.getHeight()));
}
} else {
saved = false;
t0 = System.nanoTime();
processEntities();
t1 = System.nanoTime();
processProjectiles();
t2 = System.nanoTime();
GamePanel.repaintPanel();
BuyPanel.updateButtons();
}
}
| synchronized void function(ActionEvent e) { if (e.getSource() == pauseTimer) { if (selected != null) { Rectangle2D rect = selected.getRectangle(); GamePanel.repaintPanel((int) (GamePanel.getDx() + rect.getX() * GamePanel.getTile()), (int) (GamePanel.getDy() + rect.getY() * GamePanel.getTile()), (int) (GamePanel.getTile() * rect.getWidth()), (int) (GamePanel.getTile() * rect.getHeight())); } } else { saved = false; t0 = System.nanoTime(); processEntities(); t1 = System.nanoTime(); processProjectiles(); t2 = System.nanoTime(); GamePanel.repaintPanel(); BuyPanel.updateButtons(); } } | /**
* Runs a single frame
*/ | Runs a single frame | actionPerformed | {
"repo_name": "ricky3350/Terrain-TD",
"path": "src/terraintd/GameLogic.java",
"license": "mit",
"size": 37112
} | [
"java.awt.event.ActionEvent",
"java.awt.geom.Rectangle2D"
] | import java.awt.event.ActionEvent; import java.awt.geom.Rectangle2D; | import java.awt.event.*; import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 1,733,720 |
public static void cancelTask( HttpServletRequest request, String taskid )
throws Exception
{
if ( taskid == null )
return;
// get task map
HttpSession session = request.getSession( );
if ( session == null )
return;
Map map = (Map) session.getAttribute( IBirtConstants.TASK_MAP );
if ( map != null && map.containsKey( taskid ) )
{
BaseTaskBean bean = (BaseTaskBean) map.get( taskid );
if ( bean == null )
return;
// cancel task
IEngineTask task = bean.getTask( );
if ( task != null )
{
task.cancel( );
}
// remove task from task map
synchronized ( map )
{
map.remove( taskid );
}
}
} | static void function( HttpServletRequest request, String taskid ) throws Exception { if ( taskid == null ) return; HttpSession session = request.getSession( ); if ( session == null ) return; Map map = (Map) session.getAttribute( IBirtConstants.TASK_MAP ); if ( map != null && map.containsKey( taskid ) ) { BaseTaskBean bean = (BaseTaskBean) map.get( taskid ); if ( bean == null ) return; IEngineTask task = bean.getTask( ); if ( task != null ) { task.cancel( ); } synchronized ( map ) { map.remove( taskid ); } } } | /**
* Cancel the current engine task by task id
*
* @param request
* @param taskid
* @throws Exception
*/ | Cancel the current engine task by task id | cancelTask | {
"repo_name": "rrimmana/birt-1",
"path": "viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/BirtUtility.java",
"license": "epl-1.0",
"size": 39804
} | [
"java.util.Map",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpSession",
"org.eclipse.birt.report.IBirtConstants",
"org.eclipse.birt.report.context.BaseTaskBean",
"org.eclipse.birt.report.engine.api.IEngineTask"
] | import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.eclipse.birt.report.IBirtConstants; import org.eclipse.birt.report.context.BaseTaskBean; import org.eclipse.birt.report.engine.api.IEngineTask; | import java.util.*; import javax.servlet.http.*; import org.eclipse.birt.report.*; import org.eclipse.birt.report.context.*; import org.eclipse.birt.report.engine.api.*; | [
"java.util",
"javax.servlet",
"org.eclipse.birt"
] | java.util; javax.servlet; org.eclipse.birt; | 2,784,500 |
void setEntry(int row, int column, T value) throws OutOfRangeException; | void setEntry(int row, int column, T value) throws OutOfRangeException; | /**
* Set the entry in the specified row and column.
*
* @param row row location of entry to be set
* @param column column location of entry to be set
* @param value matrix entry to be set in row,column
* @throws OutOfRangeException if the row or column index is not valid.
* @since 2.0
*/ | Set the entry in the specified row and column | setEntry | {
"repo_name": "venkateshamurthy/java-quantiles",
"path": "src/main/java/org/apache/commons/math3/linear/FieldMatrix.java",
"license": "apache-2.0",
"size": 36936
} | [
"org.apache.commons.math3.exception.OutOfRangeException"
] | import org.apache.commons.math3.exception.OutOfRangeException; | import org.apache.commons.math3.exception.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,153,695 |
public static int compare(Object o1, ObjectInspector oi1, Object o2,
ObjectInspector oi2, MapEqualComparer mapEqualComparer, NullValueOption nullValueOpt) {
if (oi1.getCategory() != oi2.getCategory()) {
return oi1.getCategory().compareTo(oi2.getCategory());
}
int nullCmpRtn = -1;
switch (nullValueOpt) {
case MAXVALUE:
nullCmpRtn = 1;
break;
case MINVALUE:
nullCmpRtn = -1;
break;
}
if (o1 == null) {
return o2 == null ? 0 : nullCmpRtn;
} else if (o2 == null) {
return -nullCmpRtn;
}
switch (oi1.getCategory()) {
case PRIMITIVE: {
PrimitiveObjectInspector poi1 = ((PrimitiveObjectInspector) oi1);
PrimitiveObjectInspector poi2 = ((PrimitiveObjectInspector) oi2);
if (poi1.getPrimitiveCategory() != poi2.getPrimitiveCategory()) {
return poi1.getPrimitiveCategory().compareTo(
poi2.getPrimitiveCategory());
}
switch (poi1.getPrimitiveCategory()) {
case VOID:
return 0;
case BOOLEAN: {
int v1 = ((BooleanObjectInspector) poi1).get(o1) ? 1 : 0;
int v2 = ((BooleanObjectInspector) poi2).get(o2) ? 1 : 0;
return v1 - v2;
}
case BYTE: {
int v1 = ((ByteObjectInspector) poi1).get(o1);
int v2 = ((ByteObjectInspector) poi2).get(o2);
return v1 - v2;
}
case SHORT: {
int v1 = ((ShortObjectInspector) poi1).get(o1);
int v2 = ((ShortObjectInspector) poi2).get(o2);
return v1 - v2;
}
case INT: {
int v1 = ((IntObjectInspector) poi1).get(o1);
int v2 = ((IntObjectInspector) poi2).get(o2);
return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0);
}
case LONG: {
long v1 = ((LongObjectInspector) poi1).get(o1);
long v2 = ((LongObjectInspector) poi2).get(o2);
return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0);
}
case FLOAT: {
float v1 = ((FloatObjectInspector) poi1).get(o1);
float v2 = ((FloatObjectInspector) poi2).get(o2);
// The IEEE 754 floating point spec specifies that signed -0.0 and 0.0 should be treated as equal.
if (v1 == 0.0f && v2 == 0.0f) {
return 0;
} else {
// Float.compare() treats -0.0 and 0.0 as different
return Float.compare(v1, v2);
}
}
case DOUBLE: {
double v1 = ((DoubleObjectInspector) poi1).get(o1);
double v2 = ((DoubleObjectInspector) poi2).get(o2);
// The IEEE 754 floating point spec specifies that signed -0.0 and 0.0 should be treated as equal.
if (v1 == 0.0d && v2 == 0.0d) {
return 0;
} else {
// Double.compare() treats -0.0 and 0.0 as different
return Double.compare(v1, v2);
}
}
case STRING: {
if (poi1.preferWritable() || poi2.preferWritable()) {
Text t1 = (Text) poi1.getPrimitiveWritableObject(o1);
Text t2 = (Text) poi2.getPrimitiveWritableObject(o2);
return t1 == null ? (t2 == null ? 0 : -1) : (t2 == null ? 1
: t1.compareTo(t2));
} else {
String s1 = (String) poi1.getPrimitiveJavaObject(o1);
String s2 = (String) poi2.getPrimitiveJavaObject(o2);
return s1 == null ? (s2 == null ? 0 : -1) : (s2 == null ? 1 : s1
.compareTo(s2));
}
}
case CHAR: {
HiveCharWritable t1 = ((HiveCharObjectInspector)poi1).getPrimitiveWritableObject(o1);
HiveCharWritable t2 = ((HiveCharObjectInspector)poi2).getPrimitiveWritableObject(o2);
return t1.compareTo(t2);
}
case VARCHAR: {
HiveVarcharWritable t1 = ((HiveVarcharObjectInspector)poi1).getPrimitiveWritableObject(o1);
HiveVarcharWritable t2 = ((HiveVarcharObjectInspector)poi2).getPrimitiveWritableObject(o2);
return t1.compareTo(t2);
}
case BINARY: {
BytesWritable bw1 = ((BinaryObjectInspector) poi1).getPrimitiveWritableObject(o1);
BytesWritable bw2 = ((BinaryObjectInspector) poi2).getPrimitiveWritableObject(o2);
return bw1.compareTo(bw2);
}
case DATE: {
DateWritableV2 d1 = ((DateObjectInspector) poi1)
.getPrimitiveWritableObject(o1);
DateWritableV2 d2 = ((DateObjectInspector) poi2)
.getPrimitiveWritableObject(o2);
return d1.compareTo(d2);
}
case TIMESTAMP: {
TimestampWritableV2 t1 = ((TimestampObjectInspector) poi1)
.getPrimitiveWritableObject(o1);
TimestampWritableV2 t2 = ((TimestampObjectInspector) poi2)
.getPrimitiveWritableObject(o2);
return t1.compareTo(t2);
}
case TIMESTAMPLOCALTZ: {
TimestampLocalTZWritable tstz1 = ((TimestampLocalTZObjectInspector) poi1).
getPrimitiveWritableObject(o1);
TimestampLocalTZWritable tstz2 = ((TimestampLocalTZObjectInspector) poi2).
getPrimitiveWritableObject(o2);
return tstz1.compareTo(tstz2);
}
case INTERVAL_YEAR_MONTH: {
HiveIntervalYearMonthWritable i1 = ((HiveIntervalYearMonthObjectInspector) poi1)
.getPrimitiveWritableObject(o1);
HiveIntervalYearMonthWritable i2 = ((HiveIntervalYearMonthObjectInspector) poi2)
.getPrimitiveWritableObject(o2);
return i1.compareTo(i2);
}
case INTERVAL_DAY_TIME: {
HiveIntervalDayTimeWritable i1 = ((HiveIntervalDayTimeObjectInspector) poi1)
.getPrimitiveWritableObject(o1);
HiveIntervalDayTimeWritable i2 = ((HiveIntervalDayTimeObjectInspector) poi2)
.getPrimitiveWritableObject(o2);
return i1.compareTo(i2);
}
case DECIMAL: {
HiveDecimalWritable t1 = ((HiveDecimalObjectInspector) poi1)
.getPrimitiveWritableObject(o1);
HiveDecimalWritable t2 = ((HiveDecimalObjectInspector) poi2)
.getPrimitiveWritableObject(o2);
return t1.compareTo(t2);
}
default: {
throw new RuntimeException("Unknown type: "
+ poi1.getPrimitiveCategory());
}
}
}
case STRUCT: {
StructObjectInspector soi1 = (StructObjectInspector) oi1;
StructObjectInspector soi2 = (StructObjectInspector) oi2;
List<? extends StructField> fields1 = soi1.getAllStructFieldRefs();
List<? extends StructField> fields2 = soi2.getAllStructFieldRefs();
int minimum = Math.min(fields1.size(), fields2.size());
for (int i = 0; i < minimum; i++) {
int r = compare(soi1.getStructFieldData(o1, fields1.get(i)), fields1
.get(i).getFieldObjectInspector(), soi2.getStructFieldData(o2,
fields2.get(i)), fields2.get(i).getFieldObjectInspector(),
mapEqualComparer, nullValueOpt);
if (r != 0) {
return r;
}
}
return fields1.size() - fields2.size();
}
case LIST: {
ListObjectInspector loi1 = (ListObjectInspector) oi1;
ListObjectInspector loi2 = (ListObjectInspector) oi2;
int minimum = Math.min(loi1.getListLength(o1), loi2.getListLength(o2));
for (int i = 0; i < minimum; i++) {
int r = compare(loi1.getListElement(o1, i), loi1
.getListElementObjectInspector(), loi2.getListElement(o2, i), loi2
.getListElementObjectInspector(),
mapEqualComparer, nullValueOpt);
if (r != 0) {
return r;
}
}
return loi1.getListLength(o1) - loi2.getListLength(o2);
}
case MAP: {
if (mapEqualComparer == null) {
throw new RuntimeException("Compare on map type not supported!");
} else {
return mapEqualComparer.compare(o1, (MapObjectInspector)oi1, o2, (MapObjectInspector)oi2);
}
}
case UNION: {
UnionObjectInspector uoi1 = (UnionObjectInspector) oi1;
UnionObjectInspector uoi2 = (UnionObjectInspector) oi2;
byte tag1 = uoi1.getTag(o1);
byte tag2 = uoi2.getTag(o2);
if (tag1 != tag2) {
return tag1 - tag2;
}
return compare(uoi1.getField(o1),
uoi1.getObjectInspectors().get(tag1),
uoi2.getField(o2), uoi2.getObjectInspectors().get(tag2),
mapEqualComparer, nullValueOpt);
}
default:
throw new RuntimeException("Compare on unknown type: "
+ oi1.getCategory());
}
} | static int function(Object o1, ObjectInspector oi1, Object o2, ObjectInspector oi2, MapEqualComparer mapEqualComparer, NullValueOption nullValueOpt) { if (oi1.getCategory() != oi2.getCategory()) { return oi1.getCategory().compareTo(oi2.getCategory()); } int nullCmpRtn = -1; switch (nullValueOpt) { case MAXVALUE: nullCmpRtn = 1; break; case MINVALUE: nullCmpRtn = -1; break; } if (o1 == null) { return o2 == null ? 0 : nullCmpRtn; } else if (o2 == null) { return -nullCmpRtn; } switch (oi1.getCategory()) { case PRIMITIVE: { PrimitiveObjectInspector poi1 = ((PrimitiveObjectInspector) oi1); PrimitiveObjectInspector poi2 = ((PrimitiveObjectInspector) oi2); if (poi1.getPrimitiveCategory() != poi2.getPrimitiveCategory()) { return poi1.getPrimitiveCategory().compareTo( poi2.getPrimitiveCategory()); } switch (poi1.getPrimitiveCategory()) { case VOID: return 0; case BOOLEAN: { int v1 = ((BooleanObjectInspector) poi1).get(o1) ? 1 : 0; int v2 = ((BooleanObjectInspector) poi2).get(o2) ? 1 : 0; return v1 - v2; } case BYTE: { int v1 = ((ByteObjectInspector) poi1).get(o1); int v2 = ((ByteObjectInspector) poi2).get(o2); return v1 - v2; } case SHORT: { int v1 = ((ShortObjectInspector) poi1).get(o1); int v2 = ((ShortObjectInspector) poi2).get(o2); return v1 - v2; } case INT: { int v1 = ((IntObjectInspector) poi1).get(o1); int v2 = ((IntObjectInspector) poi2).get(o2); return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0); } case LONG: { long v1 = ((LongObjectInspector) poi1).get(o1); long v2 = ((LongObjectInspector) poi2).get(o2); return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0); } case FLOAT: { float v1 = ((FloatObjectInspector) poi1).get(o1); float v2 = ((FloatObjectInspector) poi2).get(o2); if (v1 == 0.0f && v2 == 0.0f) { return 0; } else { return Float.compare(v1, v2); } } case DOUBLE: { double v1 = ((DoubleObjectInspector) poi1).get(o1); double v2 = ((DoubleObjectInspector) poi2).get(o2); if (v1 == 0.0d && v2 == 0.0d) { return 0; } else { return Double.compare(v1, v2); } } case STRING: { if (poi1.preferWritable() poi2.preferWritable()) { Text t1 = (Text) poi1.getPrimitiveWritableObject(o1); Text t2 = (Text) poi2.getPrimitiveWritableObject(o2); return t1 == null ? (t2 == null ? 0 : -1) : (t2 == null ? 1 : t1.compareTo(t2)); } else { String s1 = (String) poi1.getPrimitiveJavaObject(o1); String s2 = (String) poi2.getPrimitiveJavaObject(o2); return s1 == null ? (s2 == null ? 0 : -1) : (s2 == null ? 1 : s1 .compareTo(s2)); } } case CHAR: { HiveCharWritable t1 = ((HiveCharObjectInspector)poi1).getPrimitiveWritableObject(o1); HiveCharWritable t2 = ((HiveCharObjectInspector)poi2).getPrimitiveWritableObject(o2); return t1.compareTo(t2); } case VARCHAR: { HiveVarcharWritable t1 = ((HiveVarcharObjectInspector)poi1).getPrimitiveWritableObject(o1); HiveVarcharWritable t2 = ((HiveVarcharObjectInspector)poi2).getPrimitiveWritableObject(o2); return t1.compareTo(t2); } case BINARY: { BytesWritable bw1 = ((BinaryObjectInspector) poi1).getPrimitiveWritableObject(o1); BytesWritable bw2 = ((BinaryObjectInspector) poi2).getPrimitiveWritableObject(o2); return bw1.compareTo(bw2); } case DATE: { DateWritableV2 d1 = ((DateObjectInspector) poi1) .getPrimitiveWritableObject(o1); DateWritableV2 d2 = ((DateObjectInspector) poi2) .getPrimitiveWritableObject(o2); return d1.compareTo(d2); } case TIMESTAMP: { TimestampWritableV2 t1 = ((TimestampObjectInspector) poi1) .getPrimitiveWritableObject(o1); TimestampWritableV2 t2 = ((TimestampObjectInspector) poi2) .getPrimitiveWritableObject(o2); return t1.compareTo(t2); } case TIMESTAMPLOCALTZ: { TimestampLocalTZWritable tstz1 = ((TimestampLocalTZObjectInspector) poi1). getPrimitiveWritableObject(o1); TimestampLocalTZWritable tstz2 = ((TimestampLocalTZObjectInspector) poi2). getPrimitiveWritableObject(o2); return tstz1.compareTo(tstz2); } case INTERVAL_YEAR_MONTH: { HiveIntervalYearMonthWritable i1 = ((HiveIntervalYearMonthObjectInspector) poi1) .getPrimitiveWritableObject(o1); HiveIntervalYearMonthWritable i2 = ((HiveIntervalYearMonthObjectInspector) poi2) .getPrimitiveWritableObject(o2); return i1.compareTo(i2); } case INTERVAL_DAY_TIME: { HiveIntervalDayTimeWritable i1 = ((HiveIntervalDayTimeObjectInspector) poi1) .getPrimitiveWritableObject(o1); HiveIntervalDayTimeWritable i2 = ((HiveIntervalDayTimeObjectInspector) poi2) .getPrimitiveWritableObject(o2); return i1.compareTo(i2); } case DECIMAL: { HiveDecimalWritable t1 = ((HiveDecimalObjectInspector) poi1) .getPrimitiveWritableObject(o1); HiveDecimalWritable t2 = ((HiveDecimalObjectInspector) poi2) .getPrimitiveWritableObject(o2); return t1.compareTo(t2); } default: { throw new RuntimeException(STR + poi1.getPrimitiveCategory()); } } } case STRUCT: { StructObjectInspector soi1 = (StructObjectInspector) oi1; StructObjectInspector soi2 = (StructObjectInspector) oi2; List<? extends StructField> fields1 = soi1.getAllStructFieldRefs(); List<? extends StructField> fields2 = soi2.getAllStructFieldRefs(); int minimum = Math.min(fields1.size(), fields2.size()); for (int i = 0; i < minimum; i++) { int r = compare(soi1.getStructFieldData(o1, fields1.get(i)), fields1 .get(i).getFieldObjectInspector(), soi2.getStructFieldData(o2, fields2.get(i)), fields2.get(i).getFieldObjectInspector(), mapEqualComparer, nullValueOpt); if (r != 0) { return r; } } return fields1.size() - fields2.size(); } case LIST: { ListObjectInspector loi1 = (ListObjectInspector) oi1; ListObjectInspector loi2 = (ListObjectInspector) oi2; int minimum = Math.min(loi1.getListLength(o1), loi2.getListLength(o2)); for (int i = 0; i < minimum; i++) { int r = compare(loi1.getListElement(o1, i), loi1 .getListElementObjectInspector(), loi2.getListElement(o2, i), loi2 .getListElementObjectInspector(), mapEqualComparer, nullValueOpt); if (r != 0) { return r; } } return loi1.getListLength(o1) - loi2.getListLength(o2); } case MAP: { if (mapEqualComparer == null) { throw new RuntimeException(STR); } else { return mapEqualComparer.compare(o1, (MapObjectInspector)oi1, o2, (MapObjectInspector)oi2); } } case UNION: { UnionObjectInspector uoi1 = (UnionObjectInspector) oi1; UnionObjectInspector uoi2 = (UnionObjectInspector) oi2; byte tag1 = uoi1.getTag(o1); byte tag2 = uoi2.getTag(o2); if (tag1 != tag2) { return tag1 - tag2; } return compare(uoi1.getField(o1), uoi1.getObjectInspectors().get(tag1), uoi2.getField(o2), uoi2.getObjectInspectors().get(tag2), mapEqualComparer, nullValueOpt); } default: throw new RuntimeException(STR + oi1.getCategory()); } } | /**
* Compare two objects with their respective ObjectInspectors.
* if nullValueOpt is MAXVALUE, treat null as maximum value.
* if nullValueOpt is MINVALUE, treat null as minimum value.
*/ | Compare two objects with their respective ObjectInspectors. if nullValueOpt is MAXVALUE, treat null as maximum value. if nullValueOpt is MINVALUE, treat null as minimum value | compare | {
"repo_name": "alanfgates/hive",
"path": "serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java",
"license": "apache-2.0",
"size": 63032
} | [
"java.util.List",
"org.apache.hadoop.hive.serde2.io.DateWritableV2",
"org.apache.hadoop.hive.serde2.io.HiveCharWritable",
"org.apache.hadoop.hive.serde2.io.HiveDecimalWritable",
"org.apache.hadoop.hive.serde2.io.HiveIntervalDayTimeWritable",
"org.apache.hadoop.hive.serde2.io.HiveIntervalYearMonthWritable",
"org.apache.hadoop.hive.serde2.io.HiveVarcharWritable",
"org.apache.hadoop.hive.serde2.io.TimestampLocalTZWritable",
"org.apache.hadoop.hive.serde2.io.TimestampWritableV2",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.BinaryObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.ByteObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.DateObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.FloatObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveCharObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveDecimalObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveIntervalDayTimeObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveIntervalYearMonthObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveVarcharObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.IntObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.LongObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.ShortObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.TimestampLocalTZObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.TimestampObjectInspector",
"org.apache.hadoop.io.BytesWritable",
"org.apache.hadoop.io.Text"
] | import java.util.List; import org.apache.hadoop.hive.serde2.io.DateWritableV2; import org.apache.hadoop.hive.serde2.io.HiveCharWritable; import org.apache.hadoop.hive.serde2.io.HiveDecimalWritable; import org.apache.hadoop.hive.serde2.io.HiveIntervalDayTimeWritable; import org.apache.hadoop.hive.serde2.io.HiveIntervalYearMonthWritable; import org.apache.hadoop.hive.serde2.io.HiveVarcharWritable; import org.apache.hadoop.hive.serde2.io.TimestampLocalTZWritable; import org.apache.hadoop.hive.serde2.io.TimestampWritableV2; import org.apache.hadoop.hive.serde2.objectinspector.primitive.BinaryObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.ByteObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.DateObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.FloatObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveCharObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveDecimalObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveIntervalDayTimeObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveIntervalYearMonthObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveVarcharObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.IntObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.LongObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.ShortObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.TimestampLocalTZObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.TimestampObjectInspector; import org.apache.hadoop.io.BytesWritable; import org.apache.hadoop.io.Text; | import java.util.*; import org.apache.hadoop.hive.serde2.io.*; import org.apache.hadoop.hive.serde2.objectinspector.primitive.*; import org.apache.hadoop.io.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,567,181 |
public Map<String, String> getVariables() {
HashMap<String, String> map = new HashMap<String, String>(mtp.varTabCnt);
for (int varNo = 0; varNo < mtp.varTabCnt; varNo++)
map.put(mtp.varTab[varNo], varValuesTab[varNo]);
return map; } | Map<String, String> function() { HashMap<String, String> map = new HashMap<String, String>(mtp.varTabCnt); for (int varNo = 0; varNo < mtp.varTabCnt; varNo++) map.put(mtp.varTab[varNo], varValuesTab[varNo]); return map; } | /**
* Returns a map with the names and current values of the template variables.
*/ | Returns a map with the names and current values of the template variables | getVariables | {
"repo_name": "Nuvolect/SecureSuite-Android",
"path": "SecureSuite/src/main/java/com/nuvolect/securesuite/webserver/MiniTemplator.java",
"license": "gpl-3.0",
"size": 32164
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,390,508 |
@Nullable
NodeDistanceEvaluator getNodeDistanceEvaluator(@NonNull String profileName); | NodeDistanceEvaluator getNodeDistanceEvaluator(@NonNull String profileName); | /**
* This is the node distance evaluator from {@link
* SessionBuilder#withNodeDistanceEvaluator(String, NodeDistanceEvaluator)}. If the evaluator for
* this profile was specified through the configuration instead, this method will return {@code
* null}.
*/ | This is the node distance evaluator from <code>SessionBuilder#withNodeDistanceEvaluator(String, NodeDistanceEvaluator)</code>. If the evaluator for this profile was specified through the configuration instead, this method will return null | getNodeDistanceEvaluator | {
"repo_name": "datastax/java-driver",
"path": "core/src/main/java/com/datastax/oss/driver/internal/core/context/InternalDriverContext.java",
"license": "apache-2.0",
"size": 7629
} | [
"com.datastax.oss.driver.api.core.loadbalancing.NodeDistanceEvaluator",
"edu.umd.cs.findbugs.annotations.NonNull"
] | import com.datastax.oss.driver.api.core.loadbalancing.NodeDistanceEvaluator; import edu.umd.cs.findbugs.annotations.NonNull; | import com.datastax.oss.driver.api.core.loadbalancing.*; import edu.umd.cs.findbugs.annotations.*; | [
"com.datastax.oss",
"edu.umd.cs"
] | com.datastax.oss; edu.umd.cs; | 958,462 |
public List<String> listAuthorizations() {
final List<String> authorities = new ArrayList<>();
for (Field field : this.getClass().getDeclaredFields()) {
field.setAccessible(true);
// verifica se a permissao tem grupo de permisao
if (field.isAnnotationPresent(AuthorizationGroup.class)) {
// adiciona as permissoes especificas
try {
authorities.add((String) field.get(Authorization.this));
} catch (IllegalAccessException ex) { }
}
}
return authorities;
} | List<String> function() { final List<String> authorities = new ArrayList<>(); for (Field field : this.getClass().getDeclaredFields()) { field.setAccessible(true); if (field.isAnnotationPresent(AuthorizationGroup.class)) { try { authorities.add((String) field.get(Authorization.this)); } catch (IllegalAccessException ex) { } } } return authorities; } | /**
* Lista todas as authorities disponiveis para uso, este metodo e utilzado
* para criar o admin no bootstrap da aplicacao
*
* @return um set com todas as authorities disponiveis
*/ | Lista todas as authorities disponiveis para uso, este metodo e utilzado para criar o admin no bootstrap da aplicacao | listAuthorizations | {
"repo_name": "brunofarina/web-budget",
"path": "webBudget/src/main/java/br/com/webbudget/domain/security/Authorization.java",
"license": "gpl-3.0",
"size": 9829
} | [
"java.lang.reflect.Field",
"java.util.ArrayList",
"java.util.List"
] | import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,858,744 |
NodeIdFactory getNodeIdFactory(); | NodeIdFactory getNodeIdFactory(); | /**
* Gets the node id factory
*
* @return the node id factory
*/ | Gets the node id factory | getNodeIdFactory | {
"repo_name": "curso007/camel",
"path": "camel-core/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 79052
} | [
"org.apache.camel.spi.NodeIdFactory"
] | import org.apache.camel.spi.NodeIdFactory; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 686,575 |
List<K> toList(); | List<K> toList(); | /**
* Returns an unmodifiable list of the keys in this inde
* @return an unmodifiable list of keys
*/ | Returns an unmodifiable list of the keys in this inde | toList | {
"repo_name": "zavtech/morpheus-core",
"path": "src/main/java/com/zavtech/morpheus/index/Index.java",
"license": "apache-2.0",
"size": 13422
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 62,797 |
public DocumentType createDocumentType(String qualifiedName,
String publicID,
String systemID)
throws DOMException {
return new DocumentTypeImpl(this, qualifiedName, publicID, systemID);
} // createDocumentType(String):DocumentType | DocumentType function(String qualifiedName, String publicID, String systemID) throws DOMException { return new DocumentTypeImpl(this, qualifiedName, publicID, systemID); } | /**
* NON-DOM
* Factory method; creates a DocumentType having this Document
* as its OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building
* DTD information unspecified.)
*
* @param qualifiedName
* @param publicID
* @param systemID
*
* @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where
* DTDs are not permitted. (HTML not yet implemented.)
*/ | NON-DOM Factory method; creates a DocumentType having this Document as its OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building DTD information unspecified.) | createDocumentType | {
"repo_name": "jimma/xerces",
"path": "src/org/apache/xerces/dom/CoreDocumentImpl.java",
"license": "apache-2.0",
"size": 99456
} | [
"org.w3c.dom.DOMException",
"org.w3c.dom.DocumentType"
] | import org.w3c.dom.DOMException; import org.w3c.dom.DocumentType; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 522,130 |
protected boolean getNextToken( StreamTokenizer tokenizer ) throws Exception
{
try
{
if ( tokenizer.nextToken() == StreamTokenizer.TT_EOF )
return false;
else
{
tokenizer.pushBack();
while ( tokenizer.nextToken() != StreamTokenizer.TT_EOL );
while ( tokenizer.nextToken() == StreamTokenizer.TT_EOL );
if ( tokenizer.sval == null )
return false;
else
return true;
}
}
catch( Exception e )
{
System.err.println( e.getMessage() );
return false;
}
}
| boolean function( StreamTokenizer tokenizer ) throws Exception { try { if ( tokenizer.nextToken() == StreamTokenizer.TT_EOF ) return false; else { tokenizer.pushBack(); while ( tokenizer.nextToken() != StreamTokenizer.TT_EOL ); while ( tokenizer.nextToken() == StreamTokenizer.TT_EOL ); if ( tokenizer.sval == null ) return false; else return true; } } catch( Exception e ) { System.err.println( e.getMessage() ); return false; } } | /** Puts the tokenizer in the first token of the next line.
*
* @param tokenizer The tokenizer which reads this function.
*
* @return True if reaches the end of file. False otherwise.
*
* @throws Exception If cannot read the tokenizer.
*/ | Puts the tokenizer in the first token of the next line | getNextToken | {
"repo_name": "TheMurderer/keel",
"path": "src/keel/Algorithms/Rule_Learning/C45RulesSA/Algorithm.java",
"license": "gpl-3.0",
"size": 4925
} | [
"java.io.StreamTokenizer"
] | import java.io.StreamTokenizer; | import java.io.*; | [
"java.io"
] | java.io; | 1,386,787 |
public static boolean join(@Nullable GridWorker w, @Nullable IgniteLogger log) {
if (w != null)
try {
w.join();
}
catch (InterruptedException ignore) {
warn(log, "Got interrupted while waiting for completion of runnable: " + w);
Thread.currentThread().interrupt();
return false;
}
return true;
} | static boolean function(@Nullable GridWorker w, @Nullable IgniteLogger log) { if (w != null) try { w.join(); } catch (InterruptedException ignore) { warn(log, STR + w); Thread.currentThread().interrupt(); return false; } return true; } | /**
* Joins runnable.
*
* @param w Worker to join.
* @param log The logger to possible exception.
* @return {@code true} if worker has not been interrupted, {@code false} if it was interrupted.
*/ | Joins runnable | join | {
"repo_name": "murador/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 294985
} | [
"org.apache.ignite.IgniteLogger",
"org.apache.ignite.internal.util.worker.GridWorker",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.util.worker.GridWorker; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.*; import org.apache.ignite.internal.util.worker.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 1,945,099 |
public static void validate(final String s, final Type t, final boolean template) {
final int i = _valid(s, t, template);
if (i > -1) {
throw new IllegalArgumentException(LocalizationMessages.URI_COMPONENT_INVALID_CHARACTER(s, t, s.charAt(i), i));
}
} | static void function(final String s, final Type t, final boolean template) { final int i = _valid(s, t, template); if (i > -1) { throw new IllegalArgumentException(LocalizationMessages.URI_COMPONENT_INVALID_CHARACTER(s, t, s.charAt(i), i)); } } | /**
* Validates the legal characters of a percent-encoded string that
* represents a URI component type.
*
* @param s the encoded string.
* @param t the URI component type identifying the legal characters.
* @param template true if the encoded string contains URI template variables
* @throws IllegalArgumentException if the encoded string contains illegal
* characters.
*/ | Validates the legal characters of a percent-encoded string that represents a URI component type | validate | {
"repo_name": "agentlab/org.glassfish.jersey",
"path": "plugins/org.glassfish.jersey.common/src/main/java/org/glassfish/jersey/uri/UriComponent.java",
"license": "epl-1.0",
"size": 32611
} | [
"org.glassfish.jersey.internal.LocalizationMessages"
] | import org.glassfish.jersey.internal.LocalizationMessages; | import org.glassfish.jersey.internal.*; | [
"org.glassfish.jersey"
] | org.glassfish.jersey; | 887,777 |
protected void getSession()
throws ManifoldCFException, ServiceInterruption {
if (connection == null) {
if (jdbcProvider == null || jdbcProvider.length() == 0) {
throw new ManifoldCFException("Missing parameter '" + JDBCConstants.providerParameter + "'");
}
if ((host == null || host.length() == 0) && (rawDriverString == null || rawDriverString.length() == 0))
throw new ManifoldCFException("Missing parameter '"+JDBCConstants.hostParameter+"' or '"+JDBCConstants.driverStringParameter+"'");
connection = new JDBCConnection(jdbcProvider,(accessMethod==null || accessMethod.equals("name")),host,databaseName,rawDriverString,userName,password);
}
} | void function() throws ManifoldCFException, ServiceInterruption { if (connection == null) { if (jdbcProvider == null jdbcProvider.length() == 0) { throw new ManifoldCFException(STR + JDBCConstants.providerParameter + "'"); } if ((host == null host.length() == 0) && (rawDriverString == null rawDriverString.length() == 0)) throw new ManifoldCFException(STR+JDBCConstants.hostParameter+STR+JDBCConstants.driverStringParameter+"'"); connection = new JDBCConnection(jdbcProvider,(accessMethod==null accessMethod.equals("name")),host,databaseName,rawDriverString,userName,password); } } | /**
* Set up a session
*/ | Set up a session | getSession | {
"repo_name": "buddhikaDilhan/GSoC_buddhika",
"path": "connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jdbc/JDBCAuthority.java",
"license": "apache-2.0",
"size": 35558
} | [
"org.apache.manifoldcf.agents.interfaces.ServiceInterruption",
"org.apache.manifoldcf.core.interfaces.ManifoldCFException",
"org.apache.manifoldcf.jdbc.JDBCConnection",
"org.apache.manifoldcf.jdbc.JDBCConstants"
] | import org.apache.manifoldcf.agents.interfaces.ServiceInterruption; import org.apache.manifoldcf.core.interfaces.ManifoldCFException; import org.apache.manifoldcf.jdbc.JDBCConnection; import org.apache.manifoldcf.jdbc.JDBCConstants; | import org.apache.manifoldcf.agents.interfaces.*; import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.jdbc.*; | [
"org.apache.manifoldcf"
] | org.apache.manifoldcf; | 572,580 |
public ScienceAppOutputPortsPersistence getScienceAppOutputPortsPersistence() {
return scienceAppOutputPortsPersistence;
} | ScienceAppOutputPortsPersistence function() { return scienceAppOutputPortsPersistence; } | /**
* Returns the science app output ports persistence.
*
* @return the science app output ports persistence
*/ | Returns the science app output ports persistence | getScienceAppOutputPortsPersistence | {
"repo_name": "queza85/edison",
"path": "edison-portal-framework/edison-board-2016-portlet/ScienceApp-portlet/docroot/WEB-INF/src/com/kisti/science/platform/app/service/base/PortTypeServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 35743
} | [
"com.kisti.science.platform.app.service.persistence.ScienceAppOutputPortsPersistence"
] | import com.kisti.science.platform.app.service.persistence.ScienceAppOutputPortsPersistence; | import com.kisti.science.platform.app.service.persistence.*; | [
"com.kisti.science"
] | com.kisti.science; | 2,149,685 |
int advisorPriority = PacketProcessor.advisor(3);
assertThat(advisorPriority, lessThan(PacketProcessor.ADVISOR_MAX));
assertThat(advisorPriority, greaterThanOrEqualTo(0));
} | int advisorPriority = PacketProcessor.advisor(3); assertThat(advisorPriority, lessThan(PacketProcessor.ADVISOR_MAX)); assertThat(advisorPriority, greaterThanOrEqualTo(0)); } | /**
* Tests a priority in the advisor range.
*/ | Tests a priority in the advisor range | testAdvisorPriorities | {
"repo_name": "Shashikanth-Huawei/bmp",
"path": "core/api/src/test/java/org/onosproject/net/packet/PacketProcessorTest.java",
"license": "apache-2.0",
"size": 1962
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 1,060,121 |
public SSLFactory getSSL()
{
return _sslFactory;
} | SSLFactory function() { return _sslFactory; } | /**
* Gets the SSL factory.
*/ | Gets the SSL factory | getSSL | {
"repo_name": "mdaniel/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/network/listen/TcpPort.java",
"license": "gpl-2.0",
"size": 43907
} | [
"com.caucho.vfs.SSLFactory"
] | import com.caucho.vfs.SSLFactory; | import com.caucho.vfs.*; | [
"com.caucho.vfs"
] | com.caucho.vfs; | 2,618,947 |
public String describeOptions(Map<String, String> categoryDescriptions,
HelpVerbosity helpVerbosity) {
StringBuilder desc = new StringBuilder();
if (!impl.getOptionsClasses().isEmpty()) {
List<Field> allFields = Lists.newArrayList();
for (Class<? extends OptionsBase> optionsClass : impl.getOptionsClasses()) {
allFields.addAll(impl.getAnnotatedFieldsFor(optionsClass));
}
Collections.sort(allFields, OptionsUsage.BY_CATEGORY);
String prevCategory = null;
for (Field optionField : allFields) {
String category = optionField.getAnnotation(Option.class).category();
if (!category.equals(prevCategory)) {
prevCategory = category;
String description = categoryDescriptions.get(category);
if (description == null) {
description = "Options category '" + category + "'";
}
if (documentationLevel(category) == DocumentationLevel.DOCUMENTED) {
desc.append("\n").append(description).append(":\n");
}
}
if (documentationLevel(prevCategory) == DocumentationLevel.DOCUMENTED) {
OptionsUsage.getUsage(optionField, desc, helpVerbosity);
}
}
}
return desc.toString().trim();
} | String function(Map<String, String> categoryDescriptions, HelpVerbosity helpVerbosity) { StringBuilder desc = new StringBuilder(); if (!impl.getOptionsClasses().isEmpty()) { List<Field> allFields = Lists.newArrayList(); for (Class<? extends OptionsBase> optionsClass : impl.getOptionsClasses()) { allFields.addAll(impl.getAnnotatedFieldsFor(optionsClass)); } Collections.sort(allFields, OptionsUsage.BY_CATEGORY); String prevCategory = null; for (Field optionField : allFields) { String category = optionField.getAnnotation(Option.class).category(); if (!category.equals(prevCategory)) { prevCategory = category; String description = categoryDescriptions.get(category); if (description == null) { description = STR + category + "'"; } if (documentationLevel(category) == DocumentationLevel.DOCUMENTED) { desc.append("\n").append(description).append(":\n"); } } if (documentationLevel(prevCategory) == DocumentationLevel.DOCUMENTED) { OptionsUsage.getUsage(optionField, desc, helpVerbosity); } } } return desc.toString().trim(); } | /**
* Returns a description of all the options this parser can digest.
* In addition to {@link Option} annotations, this method also
* interprets {@link OptionsUsage} annotations which give an intuitive short
* description for the options.
*
* @param categoryDescriptions a mapping from category names to category
* descriptions. Options of the same category (see {@link
* Option#category}) will be grouped together, preceded by the description
* of the category.
* @param helpVerbosity if {@code long}, the options will be described
* verbosely, including their types, defaults and descriptions. If {@code
* medium}, the descriptions are omitted, and if {@code short}, the options
* are just enumerated.
*/ | Returns a description of all the options this parser can digest. In addition to <code>Option</code> annotations, this method also interprets <code>OptionsUsage</code> annotations which give an intuitive short description for the options | describeOptions | {
"repo_name": "iamthearm/bazel",
"path": "src/main/java/com/google/devtools/common/options/OptionsParser.java",
"license": "apache-2.0",
"size": 23926
} | [
"com.google.common.collect.Lists",
"java.lang.reflect.Field",
"java.util.Collections",
"java.util.List",
"java.util.Map"
] | import com.google.common.collect.Lists; import java.lang.reflect.Field; import java.util.Collections; import java.util.List; import java.util.Map; | import com.google.common.collect.*; import java.lang.reflect.*; import java.util.*; | [
"com.google.common",
"java.lang",
"java.util"
] | com.google.common; java.lang; java.util; | 735,125 |
public ArrayList parse(ArrayList ls) throws IOException {
if (ls == null)
ls = new ArrayList();
else
ls.clear();
PdfObject ob = null;
while ((ob = readPRObject()) != null) {
ls.add(ob);
if (ob.type() == COMMAND_TYPE)
break;
}
return ls;
} | ArrayList function(ArrayList ls) throws IOException { if (ls == null) ls = new ArrayList(); else ls.clear(); PdfObject ob = null; while ((ob = readPRObject()) != null) { ls.add(ob); if (ob.type() == COMMAND_TYPE) break; } return ls; } | /**
* Parses a single command from the content. Each command is output as an array of arguments
* having the command itself as the last element. The returned array will be empty if the
* end of content was reached.
* @param ls an <CODE>ArrayList</CODE> to use. It will be cleared before using. If it's
* <CODE>null</CODE> will create a new <CODE>ArrayList</CODE>
* @return the same <CODE>ArrayList</CODE> given as argument or a new one
* @throws IOException on error
*/ | Parses a single command from the content. Each command is output as an array of arguments having the command itself as the last element. The returned array will be empty if the end of content was reached | parse | {
"repo_name": "bullda/DroidText",
"path": "src/core/com/lowagie/text/pdf/PdfContentParser.java",
"license": "lgpl-3.0",
"size": 7727
} | [
"java.io.IOException",
"java.util.ArrayList"
] | import java.io.IOException; import java.util.ArrayList; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 80,077 |
private void populatePurposeOfUseAttribute(final Attribute attribute, final AssertionType target) {
log.debug("Executing Saml2AssertionExtractor.populatePurposeOfUseAttribute...");
CeType purposeOfUse = new CeType();
XMLObject purposeOfUseAttribute = attribute.getAttributeValues().get(0);
XMLObject purposeOfUseElement = purposeOfUseAttribute.getOrderedChildren().get(0);
populateCeType((XSAny) purposeOfUseElement, purposeOfUse);
target.setPurposeOfDisclosureCoded(purposeOfUse);
log.debug("end populatePurposeOfUseAttribute()");
} | void function(final Attribute attribute, final AssertionType target) { log.debug(STR); CeType purposeOfUse = new CeType(); XMLObject purposeOfUseAttribute = attribute.getAttributeValues().get(0); XMLObject purposeOfUseElement = purposeOfUseAttribute.getOrderedChildren().get(0); populateCeType((XSAny) purposeOfUseElement, purposeOfUse); target.setPurposeOfDisclosureCoded(purposeOfUse); log.debug(STR); } | /**
* This method is used to construct HL7 PurposeOfUse Attribute, and adds it to the Assertion.
*
* @param attribute attribute
* @param target target assertion
*/ | This method is used to construct HL7 PurposeOfUse Attribute, and adds it to the Assertion | populatePurposeOfUseAttribute | {
"repo_name": "alameluchidambaram/CONNECT",
"path": "Product/Production/Common/CONNECTCoreLib/src/main/java/gov/hhs/fha/nhinc/openSAML/extraction/OpenSAMLAssertionExtractorImpl.java",
"license": "bsd-3-clause",
"size": 25082
} | [
"gov.hhs.fha.nhinc.common.nhinccommon.AssertionType",
"gov.hhs.fha.nhinc.common.nhinccommon.CeType",
"org.opensaml.saml2.core.Attribute",
"org.opensaml.xml.XMLObject",
"org.opensaml.xml.schema.XSAny"
] | import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType; import gov.hhs.fha.nhinc.common.nhinccommon.CeType; import org.opensaml.saml2.core.Attribute; import org.opensaml.xml.XMLObject; import org.opensaml.xml.schema.XSAny; | import gov.hhs.fha.nhinc.common.nhinccommon.*; import org.opensaml.saml2.core.*; import org.opensaml.xml.*; import org.opensaml.xml.schema.*; | [
"gov.hhs.fha",
"org.opensaml.saml2",
"org.opensaml.xml"
] | gov.hhs.fha; org.opensaml.saml2; org.opensaml.xml; | 457,327 |
@Override
public synchronized long assignNewId(RepositoryModel repository) {
long newId = 0L;
Repository db = repositoryManager.getRepository(repository.name);
try {
if (!lastAssignedId.containsKey(repository.name)) {
lastAssignedId.put(repository.name, new AtomicLong(0));
}
AtomicLong lastId = lastAssignedId.get(repository.name);
if (lastId.get() <= 0) {
Set<Long> ids = getIds(repository);
for (long id : ids) {
if (id > lastId.get()) {
lastId.set(id);
}
}
}
// assign the id and touch an empty journal to hold it's place
newId = lastId.incrementAndGet();
String journalPath = toTicketPath(newId) + "/" + JOURNAL;
File journal = new File(db.getDirectory(), journalPath);
journal.getParentFile().mkdirs();
journal.createNewFile();
} catch (IOException e) {
log.error("failed to assign ticket id", e);
return 0L;
} finally {
db.close();
}
return newId;
} | synchronized long function(RepositoryModel repository) { long newId = 0L; Repository db = repositoryManager.getRepository(repository.name); try { if (!lastAssignedId.containsKey(repository.name)) { lastAssignedId.put(repository.name, new AtomicLong(0)); } AtomicLong lastId = lastAssignedId.get(repository.name); if (lastId.get() <= 0) { Set<Long> ids = getIds(repository); for (long id : ids) { if (id > lastId.get()) { lastId.set(id); } } } newId = lastId.incrementAndGet(); String journalPath = toTicketPath(newId) + "/" + JOURNAL; File journal = new File(db.getDirectory(), journalPath); journal.getParentFile().mkdirs(); journal.createNewFile(); } catch (IOException e) { log.error(STR, e); return 0L; } finally { db.close(); } return newId; } | /**
* Assigns a new ticket id.
*
* @param repository
* @return a new long id
*/ | Assigns a new ticket id | assignNewId | {
"repo_name": "cesarmarinhorj/gitblit",
"path": "src/main/java/com/gitblit/tickets/FileTicketService.java",
"license": "apache-2.0",
"size": 14029
} | [
"com.gitblit.models.RepositoryModel",
"java.io.File",
"java.io.IOException",
"java.util.Set",
"java.util.concurrent.atomic.AtomicLong",
"org.eclipse.jgit.lib.Repository"
] | import com.gitblit.models.RepositoryModel; import java.io.File; import java.io.IOException; import java.util.Set; import java.util.concurrent.atomic.AtomicLong; import org.eclipse.jgit.lib.Repository; | import com.gitblit.models.*; import java.io.*; import java.util.*; import java.util.concurrent.atomic.*; import org.eclipse.jgit.lib.*; | [
"com.gitblit.models",
"java.io",
"java.util",
"org.eclipse.jgit"
] | com.gitblit.models; java.io; java.util; org.eclipse.jgit; | 1,537,214 |
public Connection openConnection() throws HibernateException;
public void closeConnection(Connection conn) throws HibernateException;
| Connection openConnection() throws HibernateException; public void function(Connection conn) throws HibernateException; | /**
* Dispose of the JDBC connection
*
* @deprecated Obtain connections from {@link ConnectionProvider} instead
*/ | Dispose of the JDBC connection | closeConnection | {
"repo_name": "ControlSystemStudio/cs-studio",
"path": "thirdparty/plugins/org.csstudio.platform.libs.hibernate/project/core/src/main/java/org/hibernate/jdbc/Batcher.java",
"license": "epl-1.0",
"size": 7073
} | [
"java.sql.Connection",
"org.hibernate.HibernateException"
] | import java.sql.Connection; import org.hibernate.HibernateException; | import java.sql.*; import org.hibernate.*; | [
"java.sql",
"org.hibernate"
] | java.sql; org.hibernate; | 769,506 |
public boolean beginElementAt(float offset) throws DOMException {
timedElement.beginElement(offset);
// XXX Not right, but who knows if it is possible to begin
// at some arbitrary point in the future.
return true;
} | boolean function(float offset) throws DOMException { timedElement.beginElement(offset); return true; } | /**
* <b>DOM</b>: Implements {@link
* org.w3c.dom.smil.ElementTimeControl#beginElementAt(float)}.
*/ | DOM: Implements <code>org.w3c.dom.smil.ElementTimeControl#beginElementAt(float)</code> | beginElementAt | {
"repo_name": "apache/batik",
"path": "batik-bridge/src/main/java/org/apache/batik/bridge/SVGAnimationElementBridge.java",
"license": "apache-2.0",
"size": 21896
} | [
"org.w3c.dom.DOMException"
] | import org.w3c.dom.DOMException; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,959,378 |
protected Element createContent(WebSession s)
{
return super.createStagedContent(s);
}
| Element function(WebSession s) { return super.createStagedContent(s); } | /**
* Creates Staged WebContent
*
* @param s
*/ | Creates Staged WebContent | createContent | {
"repo_name": "paulnguyen/cmpe279",
"path": "eclipse/Webgoat/src/org/owasp/webgoat/lessons/MultiLevelLogin1.java",
"license": "apache-2.0",
"size": 21528
} | [
"org.apache.ecs.Element",
"org.owasp.webgoat.session.WebSession"
] | import org.apache.ecs.Element; import org.owasp.webgoat.session.WebSession; | import org.apache.ecs.*; import org.owasp.webgoat.session.*; | [
"org.apache.ecs",
"org.owasp.webgoat"
] | org.apache.ecs; org.owasp.webgoat; | 732,506 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<ExpressRouteGatewayListInner> listBySubscriptionWithResponse(Context context) {
return listBySubscriptionWithResponseAsync(context).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) Response<ExpressRouteGatewayListInner> function(Context context) { return listBySubscriptionWithResponseAsync(context).block(); } | /**
* Lists ExpressRoute gateways under a given subscription.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return list of ExpressRoute gateways.
*/ | Lists ExpressRoute gateways under a given subscription | listBySubscriptionWithResponse | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteGatewaysClientImpl.java",
"license": "mit",
"size": 52917
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.network.fluent.models.ExpressRouteGatewayListInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.ExpressRouteGatewayListInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,759,112 |
public Builder dst(ConnectPoint dst) {
this.dst = dst;
return this;
} | Builder function(ConnectPoint dst) { this.dst = dst; return this; } | /**
* Sets the destination for the intent that will be built.
*
* @param dst dest to use for built intent
* @return this builder
*/ | Sets the destination for the intent that will be built | dst | {
"repo_name": "oplinkoms/onos",
"path": "core/api/src/main/java/org/onosproject/net/intent/OpticalCircuitIntent.java",
"license": "apache-2.0",
"size": 6701
} | [
"org.onosproject.net.ConnectPoint"
] | import org.onosproject.net.ConnectPoint; | import org.onosproject.net.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 2,362,588 |
private static void writeToCsv(PrintWriter writer, List<Tuple2<String, Double[]>> list) {
for (Tuple2<String, Double[]> t : list) {
writer.print(t._1);
for (Double f: t._2) {
writer.print(",");
writer.print(f);
}
writer.println();
}
writer.flush();
} | static void function(PrintWriter writer, List<Tuple2<String, Double[]>> list) { for (Tuple2<String, Double[]> t : list) { writer.print(t._1); for (Double f: t._2) { writer.print(","); writer.print(f); } writer.println(); } writer.flush(); } | /**
* Writes pairs of chain ids and calculated similarity score to a csv file
* @param writer
* @param list
*/ | Writes pairs of chain ids and calculated similarity score to a csv file | writeToCsv | {
"repo_name": "roaderj/QuickStructureSearch",
"path": "src/main/java/org/rcsb/project1/RandomAfpCreator.java",
"license": "lgpl-2.1",
"size": 5151
} | [
"java.io.PrintWriter",
"java.util.List"
] | import java.io.PrintWriter; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 254,917 |
@Override
protected ToolBarManager createToolBarManager(int style) {
ToolBarManager toolBarManager = new ToolBarManager(style);
return toolBarManager;
} | ToolBarManager function(int style) { ToolBarManager toolBarManager = new ToolBarManager(style); return toolBarManager; } | /**
* Create the toolbar manager.
*
* @return the toolbar manager
*/ | Create the toolbar manager | createToolBarManager | {
"repo_name": "wvrossem/FIPS-Tool",
"path": "src/ips/tool/IpsTool.java",
"license": "gpl-3.0",
"size": 47256
} | [
"org.eclipse.jface.action.ToolBarManager"
] | import org.eclipse.jface.action.ToolBarManager; | import org.eclipse.jface.action.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,707,978 |
@Override
public void bind(String name, Object obj)
throws NamingException {
dirContext.bind(parseName(name), obj);
cacheUnload(name);
} | void function(String name, Object obj) throws NamingException { dirContext.bind(parseName(name), obj); cacheUnload(name); } | /**
* Binds a name to an object.
*
* @param name the name to bind; may not be empty
* @param obj the object to bind; possibly null
* @exception javax.naming.NameAlreadyBoundException if name is already
* bound
* @exception javax.naming.directory.InvalidAttributesException if object
* did not supply all mandatory attributes
* @exception NamingException if a naming exception is encountered
*/ | Binds a name to an object | bind | {
"repo_name": "GazeboHub/ghub-portal-doc",
"path": "doc/modelio/GHub Portal/mda/JavaDesigner/res/java/tomcat/java/org/apache/naming/resources/ProxyDirContext.java",
"license": "epl-1.0",
"size": 62986
} | [
"javax.naming.NamingException"
] | import javax.naming.NamingException; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 2,333,858 |
private void loadSources()
{
ArrayList<MReportSource> list = new ArrayList<MReportSource>();
String sql = "SELECT * FROM PA_ReportSource WHERE PA_ReportLine_ID=? AND IsActive='Y'";
PreparedStatement pstmt = null;
try
{
pstmt = DB.prepareStatement(sql, get_TrxName());
pstmt.setInt(1, getPA_ReportLine_ID());
ResultSet rs = pstmt.executeQuery();
while (rs.next())
list.add(new MReportSource (getCtx(), rs, null));
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.log(Level.SEVERE, null, e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
//
m_sources = new MReportSource[list.size()];
list.toArray(m_sources);
log.finest("ID=" + getPA_ReportLine_ID()
+ " - Size=" + list.size());
} // loadSources
| void function() { ArrayList<MReportSource> list = new ArrayList<MReportSource>(); String sql = STR; PreparedStatement pstmt = null; try { pstmt = DB.prepareStatement(sql, get_TrxName()); pstmt.setInt(1, getPA_ReportLine_ID()); ResultSet rs = pstmt.executeQuery(); while (rs.next()) list.add(new MReportSource (getCtx(), rs, null)); rs.close(); pstmt.close(); pstmt = null; } catch (Exception e) { log.log(Level.SEVERE, null, e); } finally { try { if (pstmt != null) pstmt.close (); } catch (Exception e) {} pstmt = null; } m_sources = new MReportSource[list.size()]; list.toArray(m_sources); log.finest("ID=" + getPA_ReportLine_ID() + STR + list.size()); } | /**
* Load contained Sources
*/ | Load contained Sources | loadSources | {
"repo_name": "braully/adempiere",
"path": "base/src/org/compiere/report/MReportLine.java",
"license": "gpl-2.0",
"size": 11825
} | [
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.util.ArrayList",
"java.util.logging.Level",
"org.compiere.util.DB"
] | import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.logging.Level; import org.compiere.util.DB; | import java.sql.*; import java.util.*; import java.util.logging.*; import org.compiere.util.*; | [
"java.sql",
"java.util",
"org.compiere.util"
] | java.sql; java.util; org.compiere.util; | 1,826,759 |
public AssessmentFacade createImportedAssessment(String documentPath, int qtiVersion, String siteId)
{
try {
return createImportedAssessment(XmlUtil.readDocument(documentPath, true),
qtiVersion, null, null, siteId);
} catch (Exception e) {
throw new QTIServiceException(e);
}
} | AssessmentFacade function(String documentPath, int qtiVersion, String siteId) { try { return createImportedAssessment(XmlUtil.readDocument(documentPath, true), qtiVersion, null, null, siteId); } catch (Exception e) { throw new QTIServiceException(e); } } | /**
* Import an assessment XML document in QTI format, extract & persist the data.
* @param documentPath the pathname to a file with the assessment XML document in QTI format
* @param qtiVersion either 1=QTI VERSION 1.2 or 2=QTI Version 2.0
* @param siteId the site the assessment will be associated with
* @return a persisted assessment
*/ | Import an assessment XML document in QTI format, extract & persist the data | createImportedAssessment | {
"repo_name": "ouit0408/sakai",
"path": "samigo/samigo-qti/src/java/org/sakaiproject/tool/assessment/services/qti/QTIService.java",
"license": "apache-2.0",
"size": 9023
} | [
"org.sakaiproject.tool.assessment.facade.AssessmentFacade",
"org.sakaiproject.tool.assessment.qti.util.XmlUtil"
] | import org.sakaiproject.tool.assessment.facade.AssessmentFacade; import org.sakaiproject.tool.assessment.qti.util.XmlUtil; | import org.sakaiproject.tool.assessment.facade.*; import org.sakaiproject.tool.assessment.qti.util.*; | [
"org.sakaiproject.tool"
] | org.sakaiproject.tool; | 149,760 |
public Document getLuceneDocument() {
return DocumentBuilder.toDocument(getSolrInputDocument(), req.getSchema());
} | Document function() { return DocumentBuilder.toDocument(getSolrInputDocument(), req.getSchema()); } | /** Creates and returns a lucene Document to index. Any changes made to the returned Document
* will not be reflected in the SolrInputDocument, or future calls to this method.
*/ | Creates and returns a lucene Document to index. Any changes made to the returned Document will not be reflected in the SolrInputDocument, or future calls to this method | getLuceneDocument | {
"repo_name": "yintaoxue/read-open-source-code",
"path": "solr-4.10.4/src/org/apache/solr/update/AddUpdateCommand.java",
"license": "apache-2.0",
"size": 7129
} | [
"org.apache.lucene.document.Document"
] | import org.apache.lucene.document.Document; | import org.apache.lucene.document.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 815,473 |
if (subject == null) {
LOG.error("User not initialized yet");
return;
}
// check if initialization is required
if (isInitialized) {
LOG.debug("Already initialized");
return;
}
DBBroker broker = null;
DocumentImpl document = null;
try {
broker = brokerPool.get(subject);
// If it is not a collection, check if it is a document
document = broker.getXMLResource(xmldbUri, Lock.READ_LOCK);
if (document.getResourceType() == DocumentImpl.XML_FILE) {
isXmlDocument = true;
}
// Get meta data
creationTime = document.getMetadata().getCreated();
lastModified = document.getMetadata().getLastModified();
mimeType = document.getMetadata().getMimeType();
// Retrieve perssions
permissions = document.getPermissions();
readAllowed = permissions.validate(subject, Permission.READ);
writeAllowed = permissions.validate(subject, Permission.WRITE);
executeAllowed = permissions.validate(subject, Permission.EXECUTE);
ownerUser = permissions.getOwner().getUsername();
ownerGroup = permissions.getGroup().getName();
// Get (estimated) file size
contentLength = document.getContentLength();
} catch (EXistException | PermissionDeniedException e) {
LOG.error(e);
} finally {
// Cleanup resources
if (document != null) {
document.getUpdateLock().release(Lock.READ_LOCK);
}
if(broker != null) {
brokerPool.release(broker);
}
isInitialized = true;
}
}
private String mimeType; | if (subject == null) { LOG.error(STR); return; } if (isInitialized) { LOG.debug(STR); return; } DBBroker broker = null; DocumentImpl document = null; try { broker = brokerPool.get(subject); document = broker.getXMLResource(xmldbUri, Lock.READ_LOCK); if (document.getResourceType() == DocumentImpl.XML_FILE) { isXmlDocument = true; } creationTime = document.getMetadata().getCreated(); lastModified = document.getMetadata().getLastModified(); mimeType = document.getMetadata().getMimeType(); permissions = document.getPermissions(); readAllowed = permissions.validate(subject, Permission.READ); writeAllowed = permissions.validate(subject, Permission.WRITE); executeAllowed = permissions.validate(subject, Permission.EXECUTE); ownerUser = permissions.getOwner().getUsername(); ownerGroup = permissions.getGroup().getName(); contentLength = document.getContentLength(); } catch (EXistException PermissionDeniedException e) { LOG.error(e); } finally { if (document != null) { document.getUpdateLock().release(Lock.READ_LOCK); } if(broker != null) { brokerPool.release(broker); } isInitialized = true; } } private String mimeType; | /**
* Initialize Collection, authenticate() is required first
*/ | Initialize Collection, authenticate() is required first | initMetadata | {
"repo_name": "shabanovd/exist",
"path": "extensions/webdav/src/org/exist/webdav/ExistDocument.java",
"license": "lgpl-2.1",
"size": 24532
} | [
"org.exist.EXistException",
"org.exist.dom.DocumentImpl",
"org.exist.security.Permission",
"org.exist.security.PermissionDeniedException",
"org.exist.storage.DBBroker",
"org.exist.storage.lock.Lock"
] | import org.exist.EXistException; import org.exist.dom.DocumentImpl; import org.exist.security.Permission; import org.exist.security.PermissionDeniedException; import org.exist.storage.DBBroker; import org.exist.storage.lock.Lock; | import org.exist.*; import org.exist.dom.*; import org.exist.security.*; import org.exist.storage.*; import org.exist.storage.lock.*; | [
"org.exist",
"org.exist.dom",
"org.exist.security",
"org.exist.storage"
] | org.exist; org.exist.dom; org.exist.security; org.exist.storage; | 2,504,173 |
@Generated
@Selector("beginFindString:withOptions:")
public native void beginFindStringWithOptions(String string, @NUInt long options); | @Selector(STR) native void function(String string, @NUInt long options); | /**
* Begins a find, searching the document for string. Search results are handled via a
* PDFDocumentDidFindMatchNotification or if the delegate implements -[didMatchString:]. Supported options are:
* NSCaseInsensitiveSearch, NSLiteralSearch, and NSBackwardsSearch.
*/ | Begins a find, searching the document for string. Search results are handled via a PDFDocumentDidFindMatchNotification or if the delegate implements -[didMatchString:]. Supported options are: NSCaseInsensitiveSearch, NSLiteralSearch, and NSBackwardsSearch | beginFindStringWithOptions | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/pdfkit/PDFDocument.java",
"license": "apache-2.0",
"size": 19433
} | [
"org.moe.natj.general.ann.NUInt",
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.general.ann.NUInt; import org.moe.natj.objc.ann.Selector; | import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 122,039 |
public static boolean isGtkLookAndFeel() {
String lafName = UIManager.getLookAndFeel().getClass().getName();
return ("com.sun.java.swing.plaf.gtk.GTKLookAndFeel".equals(lafName));
} | static boolean function() { String lafName = UIManager.getLookAndFeel().getClass().getName(); return (STR.equals(lafName)); } | /**
* Returns whether the current applied look and feel is
* an instance of GTK look and feel.
*
* @return true | false
*/ | Returns whether the current applied look and feel is an instance of GTK look and feel | isGtkLookAndFeel | {
"repo_name": "toxeh/ExecuteQuery",
"path": "java/src/org/underworldlabs/swing/plaf/UIUtils.java",
"license": "gpl-3.0",
"size": 12471
} | [
"javax.swing.UIManager"
] | import javax.swing.UIManager; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,061,575 |
public TreeSet getRefs()
{
return refs;
}
| TreeSet function() { return refs; } | /**
* This method gets the list of cells that reference this one.
* This method should be used after the cell's value has been changed
* to find out which cells need to be updated.
*
* @return all cells that reference this cell
*/ | This method gets the list of cells that reference this one. This method should be used after the cell's value has been changed to find out which cells need to be updated | getRefs | {
"repo_name": "rforge/biocep",
"path": "src_server_common/org/kchine/r/server/spreadsheet/Cell.java",
"license": "gpl-3.0",
"size": 10244
} | [
"java.util.TreeSet"
] | import java.util.TreeSet; | import java.util.*; | [
"java.util"
] | java.util; | 491,867 |
protected void processBatchFetch(ForeignReferenceMapping mapping) {
if (m_batchFetch != null) {
m_batchFetch.process(mapping);
}
} | void function(ForeignReferenceMapping mapping) { if (m_batchFetch != null) { m_batchFetch.process(mapping); } } | /**
* INTERNAL:
* Set the batch fetch type on the foreign reference mapping.
*/ | Set the batch fetch type on the foreign reference mapping | processBatchFetch | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/RelationshipAccessor.java",
"license": "epl-1.0",
"size": 36963
} | [
"org.eclipse.persistence.mappings.ForeignReferenceMapping"
] | import org.eclipse.persistence.mappings.ForeignReferenceMapping; | import org.eclipse.persistence.mappings.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 686,429 |
private Set<Component> sortComponents(final Map<String, Component> componentMap) {
Set<Component> sortedComponents =
new TreeSet<>((o1, o2) -> {
int connections1 = 0;
int connections2 = 0;
for (String childId : Sets.union(o1.getChildren(), o1.getParents())) {
connections1 +=
(componentMap.get(childId).getExecs().size() * o1.getExecs().size());
}
for (String childId : Sets.union(o2.getChildren(), o2.getParents())) {
connections2 +=
(componentMap.get(childId).getExecs().size() * o2.getExecs().size());
}
if (connections1 > connections2) {
return -1;
} else if (connections1 < connections2) {
return 1;
} else {
return o1.getId().compareTo(o2.getId());
}
});
sortedComponents.addAll(componentMap.values());
return sortedComponents;
} | Set<Component> function(final Map<String, Component> componentMap) { Set<Component> sortedComponents = new TreeSet<>((o1, o2) -> { int connections1 = 0; int connections2 = 0; for (String childId : Sets.union(o1.getChildren(), o1.getParents())) { connections1 += (componentMap.get(childId).getExecs().size() * o1.getExecs().size()); } for (String childId : Sets.union(o2.getChildren(), o2.getParents())) { connections2 += (componentMap.get(childId).getExecs().size() * o2.getExecs().size()); } if (connections1 > connections2) { return -1; } else if (connections1 < connections2) { return 1; } else { return o1.getId().compareTo(o2.getId()); } }); sortedComponents.addAll(componentMap.values()); return sortedComponents; } | /**
* sort components by the number of in and out connections that need to be made, in descending order.
*
* @param componentMap The components that need to be sorted
* @return a sorted set of components
*/ | sort components by the number of in and out connections that need to be made, in descending order | sortComponents | {
"repo_name": "erikdw/storm",
"path": "storm-server/src/main/java/org/apache/storm/scheduler/resource/strategies/scheduling/BaseResourceAwareStrategy.java",
"license": "apache-2.0",
"size": 29126
} | [
"java.util.Map",
"java.util.Set",
"java.util.TreeSet",
"org.apache.storm.scheduler.Component",
"org.apache.storm.shade.com.google.common.collect.Sets"
] | import java.util.Map; import java.util.Set; import java.util.TreeSet; import org.apache.storm.scheduler.Component; import org.apache.storm.shade.com.google.common.collect.Sets; | import java.util.*; import org.apache.storm.scheduler.*; import org.apache.storm.shade.com.google.common.collect.*; | [
"java.util",
"org.apache.storm"
] | java.util; org.apache.storm; | 2,455,610 |
public void addIssuerSerial(String X509IssuerName, int X509SerialNumber) {
this.add(new XMLX509IssuerSerial(getDocument(), X509IssuerName, X509SerialNumber));
} | void function(String X509IssuerName, int X509SerialNumber) { this.add(new XMLX509IssuerSerial(getDocument(), X509IssuerName, X509SerialNumber)); } | /**
* Method addIssuerSerial
*
* @param X509IssuerName
* @param X509SerialNumber
*/ | Method addIssuerSerial | addIssuerSerial | {
"repo_name": "apache/santuario-java",
"path": "src/main/java/org/apache/xml/security/keys/content/X509Data.java",
"license": "apache-2.0",
"size": 13758
} | [
"org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial"
] | import org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial; | import org.apache.xml.security.keys.content.x509.*; | [
"org.apache.xml"
] | org.apache.xml; | 1,385,057 |
protected void sequence_ElseBlock(ISerializationContext context, ElseBlock semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(ISerializationContext context, ElseBlock semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Contexts:
* ElseBlock returns ElseBlock
*
* Constraint:
* statements+=Statement*
*/ | Contexts: ElseBlock returns ElseBlock Constraint: statements+=Statement | sequence_ElseBlock | {
"repo_name": "perojonsson/bridgepoint",
"path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/src-gen/org/xtuml/bp/xtext/masl/serializer/MASLSemanticSequencer.java",
"license": "apache-2.0",
"size": 376780
} | [
"org.eclipse.xtext.serializer.ISerializationContext",
"org.xtuml.bp.xtext.masl.masl.behavior.ElseBlock"
] | import org.eclipse.xtext.serializer.ISerializationContext; import org.xtuml.bp.xtext.masl.masl.behavior.ElseBlock; | import org.eclipse.xtext.serializer.*; import org.xtuml.bp.xtext.masl.masl.behavior.*; | [
"org.eclipse.xtext",
"org.xtuml.bp"
] | org.eclipse.xtext; org.xtuml.bp; | 1,452,161 |
public final boolean canDetectAll(final FormatEnum[] formatsEnum) {
if (formatsEnum == null) {
throw new IllegalArgumentException(
"Parameter formatEnums is null");
}
boolean result = true;
for (int i = 0; (i < formatsEnum.length) && result; i++) {
final FormatEnum formatEnum = formatsEnum[i];
result &= this.enabledFormats.contains(formatEnum);
}
return result;
}
/**
* {@inheritDoc} | final boolean function(final FormatEnum[] formatsEnum) { if (formatsEnum == null) { throw new IllegalArgumentException( STR); } boolean result = true; for (int i = 0; (i < formatsEnum.length) && result; i++) { final FormatEnum formatEnum = formatsEnum[i]; result &= this.enabledFormats.contains(formatEnum); } return result; } /** * {@inheritDoc} | /**
* Return <code>true</code> if this stream can detect the all the formats
* passed as argument.
*
* @param formatsEnum
* the formats to check if it can be detected.
* @return <code>true</code> if this stream can detect all the formats
* passed as argument.
*/ | Return <code>true</code> if this stream can detect the all the formats passed as argument | canDetectAll | {
"repo_name": "helderfpires/io-tools",
"path": "wazformat/src/main/java/com/gc/iotools/fmt/GuessInputStream.java",
"license": "bsd-3-clause",
"size": 14248
} | [
"com.gc.iotools.fmt.base.FormatEnum"
] | import com.gc.iotools.fmt.base.FormatEnum; | import com.gc.iotools.fmt.base.*; | [
"com.gc.iotools"
] | com.gc.iotools; | 602,230 |
@Override
public ServerQueueStatus handshakeWithSubscriptionFeed(Socket sock, boolean isPrimary)
throws IOException, AuthenticationRequiredException, AuthenticationFailedException,
ServerRefusedConnectionException, ClassNotFoundException {
try {
final DataOutputStream dos = new DataOutputStream(sock.getOutputStream());
final InputStream in = sock.getInputStream();
final DataInputStream dis = new DataInputStream(in);
final DistributedMember member = getIDForSocket(sock);
if (!multiuserSecureMode) {
credentials = getCredentials(member);
}
final CommunicationMode mode = isPrimary ? CommunicationMode.PrimaryServerToClient
: CommunicationMode.SecondaryServerToClient;
write(dos, dis, mode, REPLY_OK, 0, new ArrayList<>(), credentials, member, true);
// Wait here for a reply before continuing. This ensures that the client
// updater is registered with the server before continuing.
final byte acceptanceCode = dis.readByte();
if (acceptanceCode == (byte) 21 && !(sock instanceof SSLSocket)) {
// This is likely the case of server setup with SSL and client not using
// SSL
throw new AuthenticationRequiredException(
"Server expecting SSL connection");
}
final byte endpointType = dis.readByte();
final int queueSize = dis.readInt();
// Read the message (if any)
readMessage(dis, dos, acceptanceCode, member);
final Map<Integer, List<String>> instantiatorMap = DataSerializer.readHashMap(dis);
for (final Map.Entry<Integer, List<String>> entry : instantiatorMap.entrySet()) {
final Integer id = entry.getKey();
final List<String> instantiatorArguments = entry.getValue();
InternalInstantiator.register(instantiatorArguments.get(0), instantiatorArguments.get(1),
id, false);
}
final Map<Integer, String> dataSerializersMap = DataSerializer.readHashMap(dis);
for (final Map.Entry<Integer, String> entry : dataSerializersMap.entrySet()) {
InternalDataSerializer.register(entry.getValue(), false, null, null, entry.getKey());
}
final Map<Integer, List<String>> dsToSupportedClassNames = DataSerializer.readHashMap(dis);
InternalDataSerializer.updateSupportedClassesMap(dsToSupportedClassNames);
// the server's ping interval is only sent to subscription feeds so we can't read it as
// part of a "standard" server response along with the other status data.
final int pingInterval = dis.readInt();
return new ServerQueueStatus(endpointType, queueSize, member, pingInterval);
} catch (IOException | ClassNotFoundException ex) {
CancelCriterion stopper = system.getCancelCriterion();
stopper.checkCancelInProgress(null);
throw ex;
}
} | ServerQueueStatus function(Socket sock, boolean isPrimary) throws IOException, AuthenticationRequiredException, AuthenticationFailedException, ServerRefusedConnectionException, ClassNotFoundException { try { final DataOutputStream dos = new DataOutputStream(sock.getOutputStream()); final InputStream in = sock.getInputStream(); final DataInputStream dis = new DataInputStream(in); final DistributedMember member = getIDForSocket(sock); if (!multiuserSecureMode) { credentials = getCredentials(member); } final CommunicationMode mode = isPrimary ? CommunicationMode.PrimaryServerToClient : CommunicationMode.SecondaryServerToClient; write(dos, dis, mode, REPLY_OK, 0, new ArrayList<>(), credentials, member, true); final byte acceptanceCode = dis.readByte(); if (acceptanceCode == (byte) 21 && !(sock instanceof SSLSocket)) { throw new AuthenticationRequiredException( STR); } final byte endpointType = dis.readByte(); final int queueSize = dis.readInt(); readMessage(dis, dos, acceptanceCode, member); final Map<Integer, List<String>> instantiatorMap = DataSerializer.readHashMap(dis); for (final Map.Entry<Integer, List<String>> entry : instantiatorMap.entrySet()) { final Integer id = entry.getKey(); final List<String> instantiatorArguments = entry.getValue(); InternalInstantiator.register(instantiatorArguments.get(0), instantiatorArguments.get(1), id, false); } final Map<Integer, String> dataSerializersMap = DataSerializer.readHashMap(dis); for (final Map.Entry<Integer, String> entry : dataSerializersMap.entrySet()) { InternalDataSerializer.register(entry.getValue(), false, null, null, entry.getKey()); } final Map<Integer, List<String>> dsToSupportedClassNames = DataSerializer.readHashMap(dis); InternalDataSerializer.updateSupportedClassesMap(dsToSupportedClassNames); final int pingInterval = dis.readInt(); return new ServerQueueStatus(endpointType, queueSize, member, pingInterval); } catch (IOException ClassNotFoundException ex) { CancelCriterion stopper = system.getCancelCriterion(); stopper.checkCancelInProgress(null); throw ex; } } | /**
* Used by client-side CacheClientUpdater to handshake with a server in order to receive messages
* generated by subscriptions (register-interest, continuous query)
*/ | Used by client-side CacheClientUpdater to handshake with a server in order to receive messages generated by subscriptions (register-interest, continuous query) | handshakeWithSubscriptionFeed | {
"repo_name": "smgoller/geode",
"path": "geode-core/src/main/java/org/apache/geode/cache/client/internal/ClientSideHandshakeImpl.java",
"license": "apache-2.0",
"size": 17694
} | [
"java.io.DataInputStream",
"java.io.DataOutputStream",
"java.io.IOException",
"java.io.InputStream",
"java.net.Socket",
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"javax.net.ssl.SSLSocket",
"org.apache.geode.CancelCriterion",
"org.apache.geode.DataSerializer",
"org.apache.geode.cache.client.ServerRefusedConnectionException",
"org.apache.geode.distributed.DistributedMember",
"org.apache.geode.internal.InternalDataSerializer",
"org.apache.geode.internal.InternalInstantiator",
"org.apache.geode.internal.cache.tier.CommunicationMode",
"org.apache.geode.internal.cache.tier.sockets.ServerQueueStatus",
"org.apache.geode.security.AuthenticationFailedException",
"org.apache.geode.security.AuthenticationRequiredException"
] | import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.Socket; import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.net.ssl.SSLSocket; import org.apache.geode.CancelCriterion; import org.apache.geode.DataSerializer; import org.apache.geode.cache.client.ServerRefusedConnectionException; import org.apache.geode.distributed.DistributedMember; import org.apache.geode.internal.InternalDataSerializer; import org.apache.geode.internal.InternalInstantiator; import org.apache.geode.internal.cache.tier.CommunicationMode; import org.apache.geode.internal.cache.tier.sockets.ServerQueueStatus; import org.apache.geode.security.AuthenticationFailedException; import org.apache.geode.security.AuthenticationRequiredException; | import java.io.*; import java.net.*; import java.util.*; import javax.net.ssl.*; import org.apache.geode.*; import org.apache.geode.cache.client.*; import org.apache.geode.distributed.*; import org.apache.geode.internal.*; import org.apache.geode.internal.cache.tier.*; import org.apache.geode.internal.cache.tier.sockets.*; import org.apache.geode.security.*; | [
"java.io",
"java.net",
"java.util",
"javax.net",
"org.apache.geode"
] | java.io; java.net; java.util; javax.net; org.apache.geode; | 1,031,769 |
public Principal authenticate(String username); | Principal function(String username); | /**
* Try to authenticate with the specified username.
*
* @param username Username of the Principal to look up
* @return the associated principal, or <code>null</code> if none is
* associated.
*/ | Try to authenticate with the specified username | authenticate | {
"repo_name": "Nickname0806/Test_Q4",
"path": "java/org/apache/catalina/Realm.java",
"license": "apache-2.0",
"size": 8404
} | [
"java.security.Principal"
] | import java.security.Principal; | import java.security.*; | [
"java.security"
] | java.security; | 1,940,790 |
public static RegisteredService getRegisteredService(final RequestContext context) {
return Optional.ofNullable(context)
.map(requestContext -> (RegisteredService) requestContext.getFlowScope().get(PARAMETER_REGISTERED_SERVICE)).orElse(null);
} | static RegisteredService function(final RequestContext context) { return Optional.ofNullable(context) .map(requestContext -> (RegisteredService) requestContext.getFlowScope().get(PARAMETER_REGISTERED_SERVICE)).orElse(null); } | /**
* Gets the registered service from the flow scope.
*
* @param context the context
* @return the service
*/ | Gets the registered service from the flow scope | getRegisteredService | {
"repo_name": "fogbeam/cas_mirror",
"path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java",
"license": "apache-2.0",
"size": 67337
} | [
"java.util.Optional",
"org.apereo.cas.services.RegisteredService",
"org.springframework.webflow.execution.RequestContext"
] | import java.util.Optional; import org.apereo.cas.services.RegisteredService; import org.springframework.webflow.execution.RequestContext; | import java.util.*; import org.apereo.cas.services.*; import org.springframework.webflow.execution.*; | [
"java.util",
"org.apereo.cas",
"org.springframework.webflow"
] | java.util; org.apereo.cas; org.springframework.webflow; | 825,791 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.