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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
public String getGraphiteKey() {
if (graphiteOnly) {
return keyUnits.get(GRAPHITE_KEY);
}
String tagName = "";
if (keyUnits.get(TASK_NAME_KEY) != null) {
tagName = keyUnits.get(TASK_NAME_KEY);
} else if (keyUnits.get(PIPELINE_NAME_KEY) != null) {
tagName = keyUnits.get(PIPELINE_NAME_KEY);
}
J... | String function() { if (graphiteOnly) { return keyUnits.get(GRAPHITE_KEY); } String tagName = ""; if (keyUnits.get(TASK_NAME_KEY) != null) { tagName = keyUnits.get(TASK_NAME_KEY); } else if (keyUnits.get(PIPELINE_NAME_KEY) != null) { tagName = keyUnits.get(PIPELINE_NAME_KEY); } Joiner joiner = Joiner.on('.'); return jo... | /**
* Utility class to generate keys for different monitoring dashboard
*
*/ | Utility class to generate keys for different monitoring dashboard | getGraphiteKey | {
"repo_name": "turn/sorcerer",
"path": "src/main/java/com/turn/sorcerer/metrics/MetricUnit.java",
"license": "bsd-3-clause",
"size": 3563
} | [
"com.google.common.base.Joiner"
] | import com.google.common.base.Joiner; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,468,666 |
private int convertFlagsToInt(Realm r) {
int flags = 0;
flags+=(r.isInvalid() ? 1 : 0);
flags+=(r.isOffline() ? 2 : 0);
flags+=(r.isShowversion() ? 4 : 0);
// flags+=(0*8); // Unknown flag
// flags+=(0*16); // Unknown flag
flags+=(r.isNewplayers() ? 32 : 0);
... | int function(Realm r) { int flags = 0; flags+=(r.isInvalid() ? 1 : 0); flags+=(r.isOffline() ? 2 : 0); flags+=(r.isShowversion() ? 4 : 0); flags+=(r.isNewplayers() ? 32 : 0); flags+=(r.isRecommended() ? 64 : 0); return flags; } | /**
* This method is converting the realm flags into a single integer.
* @param r The realm for which the flags needs to be converted.
* @return The integer value corresponding to the flags.
*/ | This method is converting the realm flags into a single integer | convertFlagsToInt | {
"repo_name": "Warkdev/JaNGOSAuth",
"path": "src/main/java/eu/jangos/auth/network/packet/server/SAuthRealmList.java",
"license": "apache-2.0",
"size": 8733
} | [
"eu.jangos.auth.model.Realm"
] | import eu.jangos.auth.model.Realm; | import eu.jangos.auth.model.*; | [
"eu.jangos.auth"
] | eu.jangos.auth; | 1,682,447 |
public Collection<T> getLazyItemsIds(int startIndex, int numberOfIds) throws LocalizedException;
| Collection<T> function(int startIndex, int numberOfIds) throws LocalizedException; | /**
* Get items to view on the page using the same model of the container.
*/ | Get items to view on the page using the same model of the container | getLazyItemsIds | {
"repo_name": "rranz/meccano4j_vaadin",
"path": "javalego/javalego_ui_vaadin/src/main/java/com/javalego/ui/vaadin/view/editor/beans/list/lazy/LazyQuery.java",
"license": "gpl-3.0",
"size": 999
} | [
"com.javalego.exception.LocalizedException",
"java.util.Collection"
] | import com.javalego.exception.LocalizedException; import java.util.Collection; | import com.javalego.exception.*; import java.util.*; | [
"com.javalego.exception",
"java.util"
] | com.javalego.exception; java.util; | 2,859,621 |
private void onTintColorChanged(Object colorName)
{
// Fetch and store the new tint color value.
if (colorName == null) {
this.tintColor = RefreshControlProxy.DEFAULT_TINT_COLOR;
} else if (colorName instanceof String) {
this.tintColor = TiColorHelper.parseColor((String) colorName);
} else {
Log.e(... | void function(Object colorName) { if (colorName == null) { this.tintColor = RefreshControlProxy.DEFAULT_TINT_COLOR; } else if (colorName instanceof String) { this.tintColor = TiColorHelper.parseColor((String) colorName); } else { Log.e(TAG, STR + TiC.PROPERTY_TINT_COLOR + STR); return; } if (this.swipeRefreshLayout == ... | /**
* Stores the given tint color value to be applied to the refresh progress indicator.
* @param colorName
* The color value to be applied. Expected to be a string such as "red", "blue", "#00FF00", etc.
* Can be null, in which case, the progress indicator will revert back to its default color.
*/ | Stores the given tint color value to be applied to the refresh progress indicator | onTintColorChanged | {
"repo_name": "mano-mykingdom/titanium_mobile",
"path": "android/modules/ui/src/java/ti/modules/titanium/ui/RefreshControlProxy.java",
"license": "apache-2.0",
"size": 8721
} | [
"org.appcelerator.kroll.common.Log",
"org.appcelerator.titanium.TiC",
"org.appcelerator.titanium.util.TiColorHelper"
] | import org.appcelerator.kroll.common.Log; import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.util.TiColorHelper; | import org.appcelerator.kroll.common.*; import org.appcelerator.titanium.*; import org.appcelerator.titanium.util.*; | [
"org.appcelerator.kroll",
"org.appcelerator.titanium"
] | org.appcelerator.kroll; org.appcelerator.titanium; | 1,138,340 |
public Iterable<RenderableBlock> getTopLevelBlocks() {
return blockCanvas.getTopLevelBlocks();
}
| Iterable<RenderableBlock> function() { return blockCanvas.getTopLevelBlocks(); } | /**
* Returns the top level blocks in the Workspace (blocks that are
* parents of stacks)
* @return the top level blocks in the Workspace
*/ | Returns the top level blocks in the Workspace (blocks that are parents of stacks) | getTopLevelBlocks | {
"repo_name": "laurentschall/openblocks",
"path": "src/main/java/edu/mit/blocks/workspace/Workspace.java",
"license": "lgpl-3.0",
"size": 36613
} | [
"edu.mit.blocks.renderable.RenderableBlock"
] | import edu.mit.blocks.renderable.RenderableBlock; | import edu.mit.blocks.renderable.*; | [
"edu.mit.blocks"
] | edu.mit.blocks; | 903,226 |
@EventHandler(uei=EventConstants.NODE_LOST_SERVICE_EVENT_UEI)
public void handleNodeLostService(Event event) throws InsufficientInformationException {
EventUtils.checkNodeId(event);
EventUtils.checkService(event);
if (event.getService().equals("SNMP"))
m_linkd.suspendNodeColle... | @EventHandler(uei=EventConstants.NODE_LOST_SERVICE_EVENT_UEI) void function(Event event) throws InsufficientInformationException { EventUtils.checkNodeId(event); EventUtils.checkService(event); if (event.getService().equals("SNMP")) m_linkd.suspendNodeCollection(event.getNodeid().intValue()); } | /**
* Handle a Node Lost Service Event when service lost is SNMP
*
* @param event
*/ | Handle a Node Lost Service Event when service lost is SNMP | handleNodeLostService | {
"repo_name": "aihua/opennms",
"path": "opennms-services/src/main/java/org/opennms/netmgt/enlinkd/EventProcessor.java",
"license": "agpl-3.0",
"size": 4441
} | [
"org.opennms.netmgt.events.api.EventConstants",
"org.opennms.netmgt.events.api.annotations.EventHandler",
"org.opennms.netmgt.xml.event.Event"
] | import org.opennms.netmgt.events.api.EventConstants; import org.opennms.netmgt.events.api.annotations.EventHandler; import org.opennms.netmgt.xml.event.Event; | import org.opennms.netmgt.events.api.*; import org.opennms.netmgt.events.api.annotations.*; import org.opennms.netmgt.xml.event.*; | [
"org.opennms.netmgt"
] | org.opennms.netmgt; | 2,437,044 |
public String getProtoType() {
Deque<String> scopes = Lists.newLinkedList();
for (Descriptor message = descriptor; message != null; message = message.getContainingType()) {
scopes.push(message.getName());
}
scopes.push(descriptor.getFile().getOptions().getJavaOuterClassname());
scopes.push(g... | String function() { Deque<String> scopes = Lists.newLinkedList(); for (Descriptor message = descriptor; message != null; message = message.getContainingType()) { scopes.push(message.getName()); } scopes.push(descriptor.getFile().getOptions().getJavaOuterClassname()); scopes.push(getPackageBase()); return Joiner.on('.')... | /**
* Returns the qualified type of the protobuf message, for example:
* <ul>
* <li>org.waveprotocol.pst.examples.Example1.Person =
* "org.waveprotocol.pst.examples.Example1.Person"</li>
* </ul>
*
* @return the full type of the protocol buffer message
*/ | Returns the qualified type of the protobuf message, for example: org.waveprotocol.pst.examples.Example1.Person = "org.waveprotocol.pst.examples.Example1.Person" | getProtoType | {
"repo_name": "vega113/incubator-wave",
"path": "pst/src/main/java/org/apache/wave/pst/model/Message.java",
"license": "apache-2.0",
"size": 10963
} | [
"com.google.common.base.Joiner",
"com.google.common.collect.Lists",
"com.google.protobuf.Descriptors",
"java.util.Deque"
] | import com.google.common.base.Joiner; import com.google.common.collect.Lists; import com.google.protobuf.Descriptors; import java.util.Deque; | import com.google.common.base.*; import com.google.common.collect.*; import com.google.protobuf.*; import java.util.*; | [
"com.google.common",
"com.google.protobuf",
"java.util"
] | com.google.common; com.google.protobuf; java.util; | 169,637 |
public String[] readAttribute(String dn, String attribute) throws LDAPException {
String[] attrArray = { attribute };
this.ldapAccess.checkConnection();
LDAPEntry ldapEntry = this.ldapAccess.ldapConnection.read(dn, attrArray);
LDAPAttributeSet ldapAttributeSet = ldapEntry.getAttributeSet();
if... | String[] function(String dn, String attribute) throws LDAPException { String[] attrArray = { attribute }; this.ldapAccess.checkConnection(); LDAPEntry ldapEntry = this.ldapAccess.ldapConnection.read(dn, attrArray); LDAPAttributeSet ldapAttributeSet = ldapEntry.getAttributeSet(); if (ldapAttributeSet.isEmpty()) { return... | /**
* Returns the value(s) of an attribute of a specific entry.
*
* @param dn
* Distinctive Name (DN) of the entry
* @param attribute
* Name of the attribute
* @return String array with the attribute values or null if the attribute
* does not exist
* @throws LDAPExceptio... | Returns the value(s) of an attribute of a specific entry | readAttribute | {
"repo_name": "ebner/collaborilla",
"path": "src/se/kth/nada/kmr/collaborilla/ldap/LDAPObject.java",
"license": "lgpl-2.1",
"size": 26630
} | [
"com.novell.ldap.LDAPAttribute",
"com.novell.ldap.LDAPAttributeSet",
"com.novell.ldap.LDAPEntry",
"com.novell.ldap.LDAPException"
] | import com.novell.ldap.LDAPAttribute; import com.novell.ldap.LDAPAttributeSet; import com.novell.ldap.LDAPEntry; import com.novell.ldap.LDAPException; | import com.novell.ldap.*; | [
"com.novell.ldap"
] | com.novell.ldap; | 2,210,194 |
private void initializeGuiObjects(){
menuBar = new JMenuBar();
menuBar.setFont(new Font("Dialog", Font.PLAIN, 12));
menuBar.setBackground(new Color(240, 230, 140));
setJMenuBar(menuBar);
menuFile = new JMenu("Datei");
menuFile.setFont(new Font("Dialog", Font.PLAIN, 12));
menuBar.add(menuFile);
| void function(){ menuBar = new JMenuBar(); menuBar.setFont(new Font(STR, Font.PLAIN, 12)); menuBar.setBackground(new Color(240, 230, 140)); setJMenuBar(menuBar); menuFile = new JMenu("Datei"); menuFile.setFont(new Font(STR, Font.PLAIN, 12)); menuBar.add(menuFile); | /**
* Initializes the GUI elements
*/ | Initializes the GUI elements | initializeGuiObjects | {
"repo_name": "Linuxmaker/FeeCalculator",
"path": "src/com/linuxmaker/calculator/gui/views/AllinFeeFrame.java",
"license": "gpl-3.0",
"size": 25877
} | [
"java.awt.Color",
"java.awt.Font",
"javax.swing.JMenu",
"javax.swing.JMenuBar"
] | import java.awt.Color; import java.awt.Font; import javax.swing.JMenu; import javax.swing.JMenuBar; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,322,592 |
@Test
public void testGoodOverrideFromOtherJ5Compat() throws Exception
{
DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
checkConfig.addAttribute("javaFiveCompatibility", "true");
final String[] expected = {
};
verify(check... | void function() throws Exception { DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class); checkConfig.addAttribute(STR, "true"); final String[] expected = { }; verify(checkConfig, getPath(STR + File.separator + STR), expected); } | /**
* This tests classes that are extending things explicitly will NOT be flagged while in
* Java 5 compatibility mode.
* @throws Exception
*/ | This tests classes that are extending things explicitly will NOT be flagged while in Java 5 compatibility mode | testGoodOverrideFromOtherJ5Compat | {
"repo_name": "maikelsteneker/checkstyle-throwsIndent",
"path": "src/tests/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheckTest.java",
"license": "lgpl-2.1",
"size": 11010
} | [
"com.puppycrawl.tools.checkstyle.DefaultConfiguration",
"java.io.File"
] | import com.puppycrawl.tools.checkstyle.DefaultConfiguration; import java.io.File; | import com.puppycrawl.tools.checkstyle.*; import java.io.*; | [
"com.puppycrawl.tools",
"java.io"
] | com.puppycrawl.tools; java.io; | 2,738,134 |
//-----------------------------------------------------------------------
public Builder marketDataId(MarketDataId marketDataId) {
JodaBeanUtils.notNull(marketDataId, "marketDataId");
this._marketDataId = marketDataId;
return this;
} | Builder function(MarketDataId marketDataId) { JodaBeanUtils.notNull(marketDataId, STR); this._marketDataId = marketDataId; return this; } | /**
* Sets the {@code marketDataId} property in the builder.
* @param marketDataId the new value, not null
* @return this, for chaining, not null
*/ | Sets the marketDataId property in the builder | marketDataId | {
"repo_name": "ChinaQuants/OG-Platform",
"path": "sesame/sesame-engine/src/main/java/com/opengamma/sesame/marketdata/SingleValueRequirement.java",
"license": "apache-2.0",
"size": 13146
} | [
"org.joda.beans.JodaBeanUtils"
] | import org.joda.beans.JodaBeanUtils; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 56,606 |
public Collection<PersonName> getPersonNames() {
return personNames;
}
| Collection<PersonName> function() { return personNames; } | /**
* List of persons for display.
*
* @return
*/ | List of persons for display | getPersonNames | {
"repo_name": "nate-rcl/irplus",
"path": "ir_web/src/edu/ur/ir/web/action/person/ManagePersonNames.java",
"license": "apache-2.0",
"size": 16059
} | [
"edu.ur.ir.person.PersonName",
"java.util.Collection"
] | import edu.ur.ir.person.PersonName; import java.util.Collection; | import edu.ur.ir.person.*; import java.util.*; | [
"edu.ur.ir",
"java.util"
] | edu.ur.ir; java.util; | 2,872,588 |
private JComponent buildPreferences() {
JPanel form = new JPanel();
form.setLayout(new GridLayout(0, 1));
form.add(Labels.create().text(Messages.get().message("password")));
form.add(buildPassword());
form.add(Labels.create().text(Messages.get().message("institution")));
... | JComponent function() { JPanel form = new JPanel(); form.setLayout(new GridLayout(0, 1)); form.add(Labels.create().text(Messages.get().message(STR))); form.add(buildPassword()); form.add(Labels.create().text(Messages.get().message(STR))); form.add(buildInstitution()); JPanel container = new JPanel(); container.setLayou... | /**
* Builds the preferences panel
*
* @return JComponent
*/ | Builds the preferences panel | buildPreferences | {
"repo_name": "VISNode/VISNode",
"path": "src/main/java/visnode/user/UpdateUserPanel.java",
"license": "apache-2.0",
"size": 5056
} | [
"com.github.rxsling.Labels",
"java.awt.BorderLayout",
"java.awt.GridLayout",
"javax.swing.JComponent",
"javax.swing.JPanel"
] | import com.github.rxsling.Labels; import java.awt.BorderLayout; import java.awt.GridLayout; import javax.swing.JComponent; import javax.swing.JPanel; | import com.github.rxsling.*; import java.awt.*; import javax.swing.*; | [
"com.github.rxsling",
"java.awt",
"javax.swing"
] | com.github.rxsling; java.awt; javax.swing; | 1,085,023 |
@Test (timeout=300000)
public void testOnlineSnapshotAppendIndependent() throws Exception {
runTestSnapshotAppendIndependent(true);
} | @Test (timeout=300000) void function() throws Exception { runTestSnapshotAppendIndependent(true); } | /**
* Verify that adding data to the cloned table will not affect the original, and vice-versa when
* it is taken as an online snapshot.
*/ | Verify that adding data to the cloned table will not affect the original, and vice-versa when it is taken as an online snapshot | testOnlineSnapshotAppendIndependent | {
"repo_name": "juwi/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMobSnapshotCloneIndependence.java",
"license": "apache-2.0",
"size": 17790
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,051,647 |
public static ExtensionDescription getDefaultDescription(boolean required,
boolean repeatable) {
ExtensionDescription desc =
ExtensionDescription.getDefaultDescription(Changestamp.class);
desc.setRequired(required);
desc.setRepeatable(repeatable);
return desc;
} | static ExtensionDescription function(boolean required, boolean repeatable) { ExtensionDescription desc = ExtensionDescription.getDefaultDescription(Changestamp.class); desc.setRequired(required); desc.setRepeatable(repeatable); return desc; } | /**
* Returns the extension description, specifying whether it is required, and
* whether it is repeatable.
*
* @param required whether it is required
* @param repeatable whether it is repeatable
* @return extension description
*/ | Returns the extension description, specifying whether it is required, and whether it is repeatable | getDefaultDescription | {
"repo_name": "simonrrr/gdata-java-client",
"path": "java/src/com/google/gdata/data/docs/Changestamp.java",
"license": "apache-2.0",
"size": 3409
} | [
"com.google.gdata.data.ExtensionDescription"
] | import com.google.gdata.data.ExtensionDescription; | import com.google.gdata.data.*; | [
"com.google.gdata"
] | com.google.gdata; | 1,978,009 |
public Map<URI, Config> getConfigsFromStrings(Collection<String> configKeyStrs)
throws ConfigStoreFactoryDoesNotExistsException, ConfigStoreCreationException, VersionDoesNotExistException,
URISyntaxException {
if (configKeyStrs == null || configKeyStrs.size() == 0)
return Collections.emptyMap();... | Map<URI, Config> function(Collection<String> configKeyStrs) throws ConfigStoreFactoryDoesNotExistsException, ConfigStoreCreationException, VersionDoesNotExistException, URISyntaxException { if (configKeyStrs == null configKeyStrs.size() == 0) return Collections.emptyMap(); Collection<URI> configKeyUris = new ArrayList<... | /**
* batch process for {@link #getConfig(String)} method
* @param configKeyStrs
* @return
* @throws ConfigStoreFactoryDoesNotExistsException
* @throws ConfigStoreCreationException
* @throws VersionDoesNotExistException
* @throws URISyntaxException
*/ | batch process for <code>#getConfig(String)</code> method | getConfigsFromStrings | {
"repo_name": "yukuai518/gobblin",
"path": "gobblin-config-management/gobblin-config-client/src/main/java/gobblin/config/client/ConfigClient.java",
"license": "apache-2.0",
"size": 16135
} | [
"com.typesafe.config.Config",
"java.net.URISyntaxException",
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections",
"java.util.Map"
] | import com.typesafe.config.Config; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Map; | import com.typesafe.config.*; import java.net.*; import java.util.*; | [
"com.typesafe.config",
"java.net",
"java.util"
] | com.typesafe.config; java.net; java.util; | 2,844,025 |
ServiceCall<Void> stringNullAsync(final ServiceCallback<Void> serviceCallback); | ServiceCall<Void> stringNullAsync(final ServiceCallback<Void> serviceCallback); | /**
* Get null (no query parameter in url).
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceCall} object
*/ | Get null (no query parameter in url) | stringNullAsync | {
"repo_name": "yugangw-msft/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/url/Queries.java",
"license": "mit",
"size": 53223
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,955,321 |
public List<NetworkIntentPolicyConfiguration> networkIntentPolicyConfigurations() {
return this.networkIntentPolicyConfigurations;
} | List<NetworkIntentPolicyConfiguration> function() { return this.networkIntentPolicyConfigurations; } | /**
* Get a list of NetworkIntentPolicyConfiguration.
*
* @return the networkIntentPolicyConfigurations value
*/ | Get a list of NetworkIntentPolicyConfiguration | networkIntentPolicyConfigurations | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/PrepareNetworkPoliciesRequest.java",
"license": "mit",
"size": 2221
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 306,246 |
void onUnsupportedTrack(int trackType);
}
private static final String USER_AGENT = "ExoCastDemoPlayer";
private static final DefaultHttpDataSourceFactory DATA_SOURCE_FACTORY =
new DefaultHttpDataSourceFactory(USER_AGENT);
private final PlayerView localPlayerView;
private final PlayerControlView ca... | void onUnsupportedTrack(int trackType); } private static final String USER_AGENT = STR; private static final DefaultHttpDataSourceFactory DATA_SOURCE_FACTORY = new DefaultHttpDataSourceFactory(USER_AGENT); private final PlayerView localPlayerView; private final PlayerControlView castControlView; private final DefaultTr... | /**
* Called when a track of type {@code trackType} is not supported by the player.
*
* @param trackType One of the {@link C}{@code .TRACK_TYPE_*} constants.
*/ | Called when a track of type trackType is not supported by the player | onUnsupportedTrack | {
"repo_name": "superbderrick/ExoPlayer",
"path": "demos/cast/src/main/java/com/google/android/exoplayer2/castdemo/PlayerManager.java",
"license": "apache-2.0",
"size": 16876
} | [
"android.content.Context",
"com.google.android.exoplayer2.Player",
"com.google.android.exoplayer2.SimpleExoPlayer",
"com.google.android.exoplayer2.ext.cast.CastPlayer",
"com.google.android.exoplayer2.ext.cast.DefaultMediaItemConverter",
"com.google.android.exoplayer2.ext.cast.MediaItem",
"com.google.and... | import android.content.Context; import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.SimpleExoPlayer; import com.google.android.exoplayer2.ext.cast.CastPlayer; import com.google.android.exoplayer2.ext.cast.DefaultMediaItemConverter; import com.google.android.exoplayer2.ext.cast.MediaItem; i... | import android.content.*; import com.google.android.exoplayer2.*; import com.google.android.exoplayer2.ext.cast.*; import com.google.android.exoplayer2.source.*; import com.google.android.exoplayer2.trackselection.*; import com.google.android.exoplayer2.ui.*; import com.google.android.exoplayer2.upstream.*; import com.... | [
"android.content",
"com.google.android",
"java.util"
] | android.content; com.google.android; java.util; | 774,262 |
void deletePipelineExecution(final String executionId) throws BusinessException; | void deletePipelineExecution(final String executionId) throws BusinessException; | /**
* Deletes a pipeline execution
* @param executionId A pipeline execution id to delete. The pipeline execution id is typically returned by
* the runPipeline method.
* @throws BusinessException
*/ | Deletes a pipeline execution | deletePipelineExecution | {
"repo_name": "romartin/kie-wb-common",
"path": "kie-wb-common-ala/kie-wb-common-ala-services-api/src/main/java/org/guvnor/ala/services/api/backend/PipelineServiceBackend.java",
"license": "apache-2.0",
"size": 4693
} | [
"org.guvnor.ala.services.exceptions.BusinessException"
] | import org.guvnor.ala.services.exceptions.BusinessException; | import org.guvnor.ala.services.exceptions.*; | [
"org.guvnor.ala"
] | org.guvnor.ala; | 2,663,590 |
public void setBBox(Envelope bbox) {
this.bbox = bbox;
} | void function(Envelope bbox) { this.bbox = bbox; } | /**
* Sets bounding box.
* @param bbox bounding box
*/ | Sets bounding box | setBBox | {
"repo_name": "GeoinformationSystems/GeoprocessingAppstore",
"path": "src/com/esri/gpt/catalog/arcims/ExtendedQueryRequest.java",
"license": "apache-2.0",
"size": 7510
} | [
"com.esri.gpt.framework.geometry.Envelope"
] | import com.esri.gpt.framework.geometry.Envelope; | import com.esri.gpt.framework.geometry.*; | [
"com.esri.gpt"
] | com.esri.gpt; | 2,445,330 |
public XPGWifiDevice getDevice(int position) {
return currentDevices.get(position);
} | XPGWifiDevice function(int position) { return currentDevices.get(position); } | /**
* Gets the device.
*
* @param position
* the position
* @return the device
*/ | Gets the device | getDevice | {
"repo_name": "itYangJie/-",
"path": "src/com/yj/smarthome/framework/adapter/SearchListAdapter.java",
"license": "mit",
"size": 5024
} | [
"com.xtremeprog.xpgconnect.XPGWifiDevice"
] | import com.xtremeprog.xpgconnect.XPGWifiDevice; | import com.xtremeprog.xpgconnect.*; | [
"com.xtremeprog.xpgconnect"
] | com.xtremeprog.xpgconnect; | 1,152,654 |
void enterOrderByListElement(@NotNull EsperEPL2GrammarParser.OrderByListElementContext ctx);
void exitOrderByListElement(@NotNull EsperEPL2GrammarParser.OrderByListElementContext ctx); | void enterOrderByListElement(@NotNull EsperEPL2GrammarParser.OrderByListElementContext ctx); void exitOrderByListElement(@NotNull EsperEPL2GrammarParser.OrderByListElementContext ctx); | /**
* Exit a parse tree produced by {@link EsperEPL2GrammarParser#orderByListElement}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>EsperEPL2GrammarParser#orderByListElement</code> | exitOrderByListElement | {
"repo_name": "georgenicoll/esper",
"path": "esper/src/main/java/com/espertech/esper/epl/generated/EsperEPL2GrammarListener.java",
"license": "gpl-2.0",
"size": 114105
} | [
"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,637,142 |
public static String jsFunction_decode(Context cx, Scriptable thisObj, Object[] args,
Function funObj)
throws Exception {
int argLength = args.length;
if (argLength != 1 || !(args[0] instanceof String)) {
throw new ScriptException("I... | static String function(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws Exception { int argLength = args.length; if (argLength != 1 !(args[0] instanceof String)) { throw new ScriptException(STR); } return Util.decode((String) args[0]); } | /**
* Decoding and deflating the encoded AuthReq
*
* @param cx
* @param thisObj
* @param args -args[0]-String to be decoded
* @param funObj
* @return
* @throws Exception
*/ | Decoding and deflating the encoded AuthReq | jsFunction_decode | {
"repo_name": "johannnallathamby/carbon-commons",
"path": "components/hostobjects/org.wso2.carbon.hostobjects.sso/src/main/java/org/wso2/carbon/hostobjects/sso/SAMLSSORelyingPartyObject.java",
"license": "apache-2.0",
"size": 28229
} | [
"javax.script.ScriptException",
"org.mozilla.javascript.Context",
"org.mozilla.javascript.Function",
"org.mozilla.javascript.Scriptable",
"org.wso2.carbon.hostobjects.sso.internal.util.Util"
] | import javax.script.ScriptException; import org.mozilla.javascript.Context; import org.mozilla.javascript.Function; import org.mozilla.javascript.Scriptable; import org.wso2.carbon.hostobjects.sso.internal.util.Util; | import javax.script.*; import org.mozilla.javascript.*; import org.wso2.carbon.hostobjects.sso.internal.util.*; | [
"javax.script",
"org.mozilla.javascript",
"org.wso2.carbon"
] | javax.script; org.mozilla.javascript; org.wso2.carbon; | 194,684 |
private static final String generateInputIdForHardware(
ComponentName name, TvInputHardwareInfo hardwareInfo) {
return name.flattenToShortString() + String.format("%s%s%d",
DELIMITER_INFO_IN_ID, PREFIX_HARDWARE_DEVICE, hardwareInfo.getDeviceId());
} | static final String function( ComponentName name, TvInputHardwareInfo hardwareInfo) { return name.flattenToShortString() + String.format(STR, DELIMITER_INFO_IN_ID, PREFIX_HARDWARE_DEVICE, hardwareInfo.getDeviceId()); } | /**
* Used to generate an input id from a ComponentName and TvInputHardwareInfo
*
* @param name the component name for generating an input id.
* @param hardwareInfo TvInputHardwareInfo describing this TV input.
* @return the generated input id for the given {@code name} and {@code hardwareInfo}... | Used to generate an input id from a ComponentName and TvInputHardwareInfo | generateInputIdForHardware | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/media/java/android/media/tv/TvInputInfo.java",
"license": "gpl-3.0",
"size": 27691
} | [
"android.content.ComponentName"
] | import android.content.ComponentName; | import android.content.*; | [
"android.content"
] | android.content; | 2,670,754 |
private void appendIndexes(Node tableNode, Table table) {
boolean showId = table.getId() != null;
Set<TableIndex> indexes = table.getIndexes();
if (indexes != null && !indexes.isEmpty()) {
indexes = new TreeSet<TableIndex>(indexes); // sort primary keys first
Document... | void function(Node tableNode, Table table) { boolean showId = table.getId() != null; Set<TableIndex> indexes = table.getIndexes(); if (indexes != null && !indexes.isEmpty()) { indexes = new TreeSet<TableIndex>(indexes); Document document = tableNode.getOwnerDocument(); for (TableIndex index : indexes) { Node indexNode ... | /**
* Append index details to the XML node
*
* @param tableNode
* @param table
*/ | Append index details to the XML node | appendIndexes | {
"repo_name": "Riggs333/schemaspy",
"path": "src/main/java/org/schemaspy/output/xml/dom/XmlTableFormatter.java",
"license": "mit",
"size": 11841
} | [
"java.util.Set",
"java.util.TreeSet",
"org.schemaspy.model.Table",
"org.schemaspy.model.TableColumn",
"org.schemaspy.model.TableIndex",
"org.w3c.dom.Document",
"org.w3c.dom.Node"
] | import java.util.Set; import java.util.TreeSet; import org.schemaspy.model.Table; import org.schemaspy.model.TableColumn; import org.schemaspy.model.TableIndex; import org.w3c.dom.Document; import org.w3c.dom.Node; | import java.util.*; import org.schemaspy.model.*; import org.w3c.dom.*; | [
"java.util",
"org.schemaspy.model",
"org.w3c.dom"
] | java.util; org.schemaspy.model; org.w3c.dom; | 527,204 |
EAttribute getTransformerWinding_RatedU(); | EAttribute getTransformerWinding_RatedU(); | /**
* Returns the meta object for the attribute '{@link gluemodel.CIM.IEC61970.Wires.TransformerWinding#getRatedU <em>Rated U</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Rated U</em>'.
* @see gluemodel.CIM.IEC61970.Wires.TransformerWinding#getRate... | Returns the meta object for the attribute '<code>gluemodel.CIM.IEC61970.Wires.TransformerWinding#getRatedU Rated U</code>'. | getTransformerWinding_RatedU | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Wires/WiresPackage.java",
"license": "mit",
"size": 669840
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 533,661 |
public void setDescriptorStringText(final StringText stringText) {
descriptor.setStringText(stringText.toString());
} | void function(final StringText stringText) { descriptor.setStringText(stringText.toString()); } | /**
* Sets descriptor string text.
*
* @param stringText -- the string text to set.
*/ | Sets descriptor string text | setDescriptorStringText | {
"repo_name": "atcult/mod-cataloging",
"path": "src/main/java/org/folio/marccat/dao/persistence/ControlNumberAccessPoint.java",
"license": "apache-2.0",
"size": 5579
} | [
"org.folio.marccat.util.StringText"
] | import org.folio.marccat.util.StringText; | import org.folio.marccat.util.*; | [
"org.folio.marccat"
] | org.folio.marccat; | 386,824 |
public Map<Integer, AndesMessagePart> getRetainedContentParts(long messageID) throws AndesException; | Map<Integer, AndesMessagePart> function(long messageID) throws AndesException; | /**
* Get all content parts for the given message ID. The message ID should belong to a
* existing retained message.
* @see org.wso2.andes.kernel.AndesMessageMetadata#retain
*
* @param messageID Message ID of the message
* @return List of content parts
* @throws AndesException
*/ | Get all content parts for the given message ID. The message ID should belong to a existing retained message | getRetainedContentParts | {
"repo_name": "AnujaLK/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/MessageStore.java",
"license": "apache-2.0",
"size": 12696
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,487,605 |
private HiveJdbcConnector withHiveConnectionFromUrlUserPassword(String hiveServerUrl, String hiveServerUser,
String hiveServerPassword) throws SQLException {
this.conn = DriverManager.getConnection(hiveServerUrl, hiveServerUser, hiveServerPassword);
this.stmt = this.conn.createStatement();
return th... | HiveJdbcConnector function(String hiveServerUrl, String hiveServerUser, String hiveServerPassword) throws SQLException { this.conn = DriverManager.getConnection(hiveServerUrl, hiveServerUser, hiveServerPassword); this.stmt = this.conn.createStatement(); return this; } /** * Set the {@link HiveJdbcConnector#conn} based ... | /**
* Set the {@link HiveJdbcConnector#conn} based on the URL, user, and password given to the method
* @param hiveServerUrl is the URL to connect to
* @param hiveServerUser is the username to connect with
* @param hiveServerPassword is the password to authenticate with when connecting to the URL
* @thro... | Set the <code>HiveJdbcConnector#conn</code> based on the URL, user, and password given to the method | withHiveConnectionFromUrlUserPassword | {
"repo_name": "jenniferzheng/gobblin",
"path": "gobblin-utility/src/main/java/org/apache/gobblin/util/HiveJdbcConnector.java",
"license": "apache-2.0",
"size": 11123
} | [
"java.sql.DriverManager",
"java.sql.SQLException"
] | import java.sql.DriverManager; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 161,963 |
public final void removeFromInodeMap(List<? extends INode> inodes) {
if (inodes != null) {
for (INode inode : inodes) {
if (inode != null && inode instanceof INodeWithAdditionalFields) {
inodeMap.remove(inode);
}
}
}
} | final void function(List<? extends INode> inodes) { if (inodes != null) { for (INode inode : inodes) { if (inode != null && inode instanceof INodeWithAdditionalFields) { inodeMap.remove(inode); } } } } | /**
* This method is always called with writeLock of FSDirectory held.
*/ | This method is always called with writeLock of FSDirectory held | removeFromInodeMap | {
"repo_name": "sungsoo/hadoop-2.3.0",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java",
"license": "apache-2.0",
"size": 103356
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 62,622 |
@Test
public void testFilePageStoreInterruptThreads() throws Exception {
failure.set(false);
FileIOFactory factory = new RandomAccessFileIOFactory();
File file = new File(U.defaultWorkDirectory(), "file.bin");
file.deleteOnExit();
DataStorageConfiguration dbCfg = getD... | void function() throws Exception { failure.set(false); FileIOFactory factory = new RandomAccessFileIOFactory(); File file = new File(U.defaultWorkDirectory(), STR); file.deleteOnExit(); DataStorageConfiguration dbCfg = getDataStorageConfiguration(); FilePageStore pageStore = new FilePageStore(PageMemory.FLAG_DATA, () -... | /**
* Test FilePageStore with multiple interrupted threads.
*/ | Test FilePageStore with multiple interrupted threads | testFilePageStoreInterruptThreads | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java",
"license": "apache-2.0",
"size": 11912
} | [
"java.io.File",
"java.nio.ByteBuffer",
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.atomic.AtomicBoolean",
"org.apache.ignite.configuration.DataStorageConfiguration",
"org.apache.ignite.internal.pagemem.PageIdUtils",
"org.apache.ignite.internal.pagemem.PageMemory",
"org.apache.igni... | import java.io.File; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.internal.pagemem.PageIdUtils; import org.apache.ignite.internal.pagemem.PageMemo... | import java.io.*; import java.nio.*; import java.util.*; import java.util.concurrent.atomic.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.pagemem.*; import org.apache.ignite.internal.processors.cache.persistence.file.*; import org.apache.ignite.internal.processors.cache.persistence.tree... | [
"java.io",
"java.nio",
"java.util",
"org.apache.ignite"
] | java.io; java.nio; java.util; org.apache.ignite; | 1,102,203 |
public void setDateUpdated(LocalDateTime dateUpdated) {
this.dateUpdated = dateUpdated;
} | void function(LocalDateTime dateUpdated) { this.dateUpdated = dateUpdated; } | /**
* <p>
* Setter for the field <code>dateUpdated</code>.
* </p>
*
* @param dateUpdated the dateUpdated to set
*/ | Setter for the field <code>dateUpdated</code>. | setDateUpdated | {
"repo_name": "intranda/goobi-viewer-core",
"path": "goobi-viewer-core/src/main/java/io/goobi/viewer/model/crowdsourcing/DisplayUserGeneratedContent.java",
"license": "gpl-2.0",
"size": 26041
} | [
"java.time.LocalDateTime"
] | import java.time.LocalDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 1,355,977 |
public DataNode setRun_control(IDataset run_control); | DataNode function(IDataset run_control); | /**
* Is data collection controlled or synchronised to this quantity:
* 1=no, 0=to "value", 1=to "value_deriv1", etc.
* <p>
* <b>Type:</b> NX_BOOLEAN
* </p>
*
* @param run_control the run_control
*/ | Is data collection controlled or synchronised to this quantity: 1=no, 0=to "value", 1=to "value_deriv1", etc. Type: NX_BOOLEAN | setRun_control | {
"repo_name": "xen-0/dawnsci",
"path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXsensor.java",
"license": "epl-1.0",
"size": 17164
} | [
"org.eclipse.dawnsci.analysis.api.tree.DataNode",
"org.eclipse.january.dataset.IDataset"
] | import org.eclipse.dawnsci.analysis.api.tree.DataNode; import org.eclipse.january.dataset.IDataset; | import org.eclipse.dawnsci.analysis.api.tree.*; import org.eclipse.january.dataset.*; | [
"org.eclipse.dawnsci",
"org.eclipse.january"
] | org.eclipse.dawnsci; org.eclipse.january; | 804,465 |
private void check(CryptoMode cryptoMode) {
if (cryptoMode == CryptoMode.AuthenticatedEncryption
|| cryptoMode == CryptoMode.StrictAuthenticatedEncryption) {
if (!CryptoRuntime.isBouncyCastleAvailable()) {
CryptoRuntime.enableBouncyCastle();
if (!C... | void function(CryptoMode cryptoMode) { if (cryptoMode == CryptoMode.AuthenticatedEncryption cryptoMode == CryptoMode.StrictAuthenticatedEncryption) { if (!CryptoRuntime.isBouncyCastleAvailable()) { CryptoRuntime.enableBouncyCastle(); if (!CryptoRuntime.isBouncyCastleAvailable()) { throw new UnsupportedOperationExceptio... | /**
* Checks if the crypto mode is supported by the runtime.
*
* @throws UnsupportedOperationException
* if the necessary security provider cannot be found or the
* necessary cryptographic operations are not supported for the
* specified crypto mode.
... | Checks if the crypto mode is supported by the runtime | check | {
"repo_name": "mahaliachante/aws-sdk-java",
"path": "aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/CryptoConfiguration.java",
"license": "apache-2.0",
"size": 13651
} | [
"com.amazonaws.services.s3.internal.crypto.CryptoRuntime"
] | import com.amazonaws.services.s3.internal.crypto.CryptoRuntime; | import com.amazonaws.services.s3.internal.crypto.*; | [
"com.amazonaws.services"
] | com.amazonaws.services; | 2,121,959 |
if (isClosed) {
throw new IOException("closed");
}
} | if (isClosed) { throw new IOException(STR); } } | /**
* Throws an <code>IOException</code> if the stream has been closed.
* Subclasses may call this method from any of their methods that
* require the stream not to be closed.
*
* @exception IOException if the stream is closed.
*/ | Throws an <code>IOException</code> if the stream has been closed. Subclasses may call this method from any of their methods that require the stream not to be closed | checkClosed | {
"repo_name": "andreagenso/java2scala",
"path": "test/J2s/java/openjdk-6-src-b27/jdk/src/share/classes/javax/imageio/stream/ImageInputStreamImpl.java",
"license": "apache-2.0",
"size": 28356
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,480,725 |
public ZoneOffset getOffsetAfter() {
return offsetAfter;
} | ZoneOffset function() { return offsetAfter; } | /**
* Gets the offset after the transition.
*
* @return the offset after, not null
*/ | Gets the offset after the transition | getOffsetAfter | {
"repo_name": "frohoff/jdk8u-jdk",
"path": "src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java",
"license": "gpl-2.0",
"size": 26368
} | [
"java.time.ZoneOffset"
] | import java.time.ZoneOffset; | import java.time.*; | [
"java.time"
] | java.time; | 501,978 |
void renameColumn(Session session, TableHandle tableHandle, ColumnHandle source, String target); | void renameColumn(Session session, TableHandle tableHandle, ColumnHandle source, String target); | /**
* Rename the specified column.
*/ | Rename the specified column | renameColumn | {
"repo_name": "EvilMcJerkface/presto",
"path": "presto-main/src/main/java/com/facebook/presto/metadata/Metadata.java",
"license": "apache-2.0",
"size": 18462
} | [
"com.facebook.presto.Session",
"com.facebook.presto.spi.ColumnHandle",
"com.facebook.presto.spi.TableHandle"
] | import com.facebook.presto.Session; import com.facebook.presto.spi.ColumnHandle; import com.facebook.presto.spi.TableHandle; | import com.facebook.presto.*; import com.facebook.presto.spi.*; | [
"com.facebook.presto"
] | com.facebook.presto; | 202,467 |
@Test
public void testSpaceCommands() throws Exception {
final Configuration conf = new HdfsConfiguration();
// set a smaller block size so that we can test with smaller
// diskspace quotas
conf.set(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, "512");
// Make it relinquish locks. When run serially, the re... | void function() throws Exception { final Configuration conf = new HdfsConfiguration(); conf.set(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, "512"); conf.setInt(DFSConfigKeys.DFS_CONTENT_SUMMARY_LIMIT_KEY, 2); final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build(); final FileSystem fs = cluster.ge... | /**
* Test HDFS operations that change disk space consumed by a directory tree.
* namely create, rename, delete, append, and setReplication.
*
* This is based on testNamespaceCommands() above.
*/ | Test HDFS operations that change disk space consumed by a directory tree. namely create, rename, delete, append, and setReplication. This is based on testNamespaceCommands() above | testSpaceCommands | {
"repo_name": "Microsoft-CISL/hadoop-prototype",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java",
"license": "apache-2.0",
"size": 41008
} | [
"java.io.OutputStream",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.ContentSummary",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.protocol.DSQuotaExceededException",
"org.apache.hadoop.hdfs.protocol.HdfsConstants",
"org.apache.hadoop.io.IOUt... | import java.io.OutputStream; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.ContentSummary; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import or... | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.io.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 1,906,733 |
public void setClientConnectionManager(HttpClientConnectionManager clientConnectionManager) {
this.clientConnectionManager = clientConnectionManager;
} | void function(HttpClientConnectionManager clientConnectionManager) { this.clientConnectionManager = clientConnectionManager; } | /**
* To use a custom and shared HttpClientConnectionManager to manage connections.
* If this has been configured then this is always used for all endpoints created by this component.
*/ | To use a custom and shared HttpClientConnectionManager to manage connections. If this has been configured then this is always used for all endpoints created by this component | setClientConnectionManager | {
"repo_name": "driseley/camel",
"path": "components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java",
"license": "apache-2.0",
"size": 25185
} | [
"org.apache.http.conn.HttpClientConnectionManager"
] | import org.apache.http.conn.HttpClientConnectionManager; | import org.apache.http.conn.*; | [
"org.apache.http"
] | org.apache.http; | 1,045,018 |
@RequestMapping(value = "/studies/{facilityId}/results", method = RequestMethod.GET)
public ModelAndView studyResults(@PathVariable(value = "facilityId") String facilityId)
{
ModelAndView mav = makeNotFoundError();
Screen s = genericEntityDao.findEntityByProperty(Screen.class, "facilityId", facilityId, t... | @RequestMapping(value = STR, method = RequestMethod.GET) ModelAndView function(@PathVariable(value = STR) String facilityId) { ModelAndView mav = makeNotFoundError(); Screen s = genericEntityDao.findEntityByProperty(Screen.class, STR, facilityId, true, Screen.reagents.to(Reagent.well)); if (s != null && s.getAnnotation... | /**
* Get the whole study at once
*/ | Get the whole study at once | studyResults | {
"repo_name": "hmsiccbl/screensaver",
"path": "web/src/main/java/edu/harvard/med/screensaver/rest/DataController.java",
"license": "gpl-2.0",
"size": 27304
} | [
"edu.harvard.med.screensaver.model.libraries.Reagent",
"edu.harvard.med.screensaver.model.screens.Screen",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod",
"org.springframework.web.ser... | import edu.harvard.med.screensaver.model.libraries.Reagent; import edu.harvard.med.screensaver.model.screens.Screen; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.spring... | import edu.harvard.med.screensaver.model.libraries.*; import edu.harvard.med.screensaver.model.screens.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*; | [
"edu.harvard.med",
"org.springframework.web"
] | edu.harvard.med; org.springframework.web; | 761,613 |
protected void adjustContextHeight() {
int tabIndex = m_tabbedPanel.getSelectedIndex();
FlowPanel tab = m_tabbedPanel.getWidget(tabIndex);
int height = CmsPositionBean.getInnerDimensions(tab.getElement()).getHeight();
m_context.getElement().getStyle().setHei... | void function() { int tabIndex = m_tabbedPanel.getSelectedIndex(); FlowPanel tab = m_tabbedPanel.getWidget(tabIndex); int height = CmsPositionBean.getInnerDimensions(tab.getElement()).getHeight(); m_context.getElement().getStyle().setHeight(50 + height, Unit.PX); } | /**
* Adjusts the tabbed panel height to the height of the current tab content.<p>
*/ | Adjusts the tabbed panel height to the height of the current tab content | adjustContextHeight | {
"repo_name": "victos/opencms-core",
"path": "src-gwt/org/opencms/acacia/client/CmsRenderer.java",
"license": "lgpl-2.1",
"size": 41321
} | [
"com.google.gwt.dom.client.Style",
"com.google.gwt.user.client.ui.FlowPanel",
"org.opencms.gwt.client.util.CmsPositionBean"
] | import com.google.gwt.dom.client.Style; import com.google.gwt.user.client.ui.FlowPanel; import org.opencms.gwt.client.util.CmsPositionBean; | import com.google.gwt.dom.client.*; import com.google.gwt.user.client.ui.*; import org.opencms.gwt.client.util.*; | [
"com.google.gwt",
"org.opencms.gwt"
] | com.google.gwt; org.opencms.gwt; | 1,997,780 |
public ThreadFactoryBuilder withBackingThreadFactory(final ThreadFactory backingThreadFactory) {
this.backingThreadFactory = Objects.requireNonNull(backingThreadFactory);
return this;
} | ThreadFactoryBuilder function(final ThreadFactory backingThreadFactory) { this.backingThreadFactory = Objects.requireNonNull(backingThreadFactory); return this; } | /**
* Sets the backing {@code ThreadFactory} for new threads. Threads
* will be created by invoking {@code newThread(Runnable} on this backing factory.
*/ | Sets the backing ThreadFactory for new threads. Threads will be created by invoking newThread(Runnable on this backing factory | withBackingThreadFactory | {
"repo_name": "sixshot626/h2o",
"path": "h2o-common/src/main/java/h2o/jodd/util/ThreadFactoryBuilder.java",
"license": "bsd-2-clause",
"size": 4558
} | [
"java.util.Objects",
"java.util.concurrent.ThreadFactory"
] | import java.util.Objects; import java.util.concurrent.ThreadFactory; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 941,034 |
static @NonNull String parse(@NonNull Object...args) {
// The params available, we need to know if they where taken or not
boolean[] argsUsed = new boolean[args.length];
// The first argument is the format and is always used
String format = (String) args[0];
argsUsed[0] = true;
int nextArgInde... | static @NonNull String parse(@NonNull Object...args) { boolean[] argsUsed = new boolean[args.length]; String format = (String) args[0]; argsUsed[0] = true; int nextArgIndex = 1; final char[] chars = format.toCharArray(); StringBuilder buffer = new StringBuilder(); ArrayCharSequence sequence = new ArrayCharSequence(char... | /**
* Takes the arguments that console.log() would use, parses them and returns the
* final string to output.
*
* @param args format and arguments
* @return a string with the message to output
*/ | Takes the arguments that console.log() would use, parses them and returns the final string to output | parse | {
"repo_name": "rickbrew/stetho",
"path": "stetho-js-rhino/src/main/java/com/facebook/stetho/rhino/JsFormat.java",
"license": "bsd-3-clause",
"size": 8160
} | [
"android.support.annotation.NonNull",
"java.util.regex.Matcher"
] | import android.support.annotation.NonNull; import java.util.regex.Matcher; | import android.support.annotation.*; import java.util.regex.*; | [
"android.support",
"java.util"
] | android.support; java.util; | 52,705 |
@Override
public void setBirthdate(java.util.Date birthdate) {
_citizen.setBirthdate(birthdate);
} | void function(java.util.Date birthdate) { _citizen.setBirthdate(birthdate); } | /**
* Sets the birthdate of this citizen.
*
* @param birthdate the birthdate of this citizen
*/ | Sets the birthdate of this citizen | setBirthdate | {
"repo_name": "hltn/opencps",
"path": "portlets/opencps-portlet/docroot/WEB-INF/service/org/opencps/accountmgt/model/CitizenWrapper.java",
"license": "agpl-3.0",
"size": 16729
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,596,261 |
public List getQueuedFilterProfileMsgs(InternalDistributedMember member) {
synchronized (this.filterProfileMsgQueue) {
if (this.filterProfileMsgQueue.containsKey(member)) {
return new LinkedList(this.filterProfileMsgQueue.get(member));
}
}
return Collections.emptyList();
} | List function(InternalDistributedMember member) { synchronized (this.filterProfileMsgQueue) { if (this.filterProfileMsgQueue.containsKey(member)) { return new LinkedList(this.filterProfileMsgQueue.get(member)); } } return Collections.emptyList(); } | /**
* Returns the filter profile messages received while members cache profile exchange was in
* progress.
*
* @param member whose messages are returned.
* @return filter profile messages that are queued for the member.
*/ | Returns the filter profile messages received while members cache profile exchange was in progress | getQueuedFilterProfileMsgs | {
"repo_name": "masaki-yamakawa/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/FilterProfile.java",
"license": "apache-2.0",
"size": 79296
} | [
"java.util.Collections",
"java.util.LinkedList",
"java.util.List",
"org.apache.geode.distributed.internal.membership.InternalDistributedMember"
] | import java.util.Collections; import java.util.LinkedList; import java.util.List; import org.apache.geode.distributed.internal.membership.InternalDistributedMember; | import java.util.*; import org.apache.geode.distributed.internal.membership.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 749,984 |
void setParser(PduParser parser); | void setParser(PduParser parser); | /**
* Incoming PDU packets parser.
*
* @param parser parser instance
*/ | Incoming PDU packets parser | setParser | {
"repo_name": "fchienvuhoang/smppclient",
"path": "src/main/java/org/bulatnig/smpp/net/Connection.java",
"license": "bsd-3-clause",
"size": 1233
} | [
"org.bulatnig.smpp.pdu.PduParser"
] | import org.bulatnig.smpp.pdu.PduParser; | import org.bulatnig.smpp.pdu.*; | [
"org.bulatnig.smpp"
] | org.bulatnig.smpp; | 1,550,952 |
public static Object newGroup(String className, Object[][] params, String nodeName)
throws ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException,
NodeException {
Node[] nodeList = new Node[1];
nodeList[0] = NodeFactory.getNode(nodeName);
re... | static Object function(String className, Object[][] params, String nodeName) throws ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException { Node[] nodeList = new Node[1]; nodeList[0] = NodeFactory.getNode(nodeName); return PAGroup.newGroup(className, params, nodeList); } | /**
* Creates an object representing a group (a typed group) and creates all members with params on the node.
* @param className the name of the (upper) class of the group's members.
* @param params the array that contain the parameters used to build the group's members.
* @param nodeName the name (... | Creates an object representing a group (a typed group) and creates all members with params on the node | newGroup | {
"repo_name": "lpellegr/programming",
"path": "programming-core/src/main/java/org/objectweb/proactive/api/PAGroup.java",
"license": "agpl-3.0",
"size": 79338
} | [
"org.objectweb.proactive.ActiveObjectCreationException",
"org.objectweb.proactive.core.mop.ClassNotReifiableException",
"org.objectweb.proactive.core.node.Node",
"org.objectweb.proactive.core.node.NodeException",
"org.objectweb.proactive.core.node.NodeFactory"
] | import org.objectweb.proactive.ActiveObjectCreationException; import org.objectweb.proactive.core.mop.ClassNotReifiableException; import org.objectweb.proactive.core.node.Node; import org.objectweb.proactive.core.node.NodeException; import org.objectweb.proactive.core.node.NodeFactory; | import org.objectweb.proactive.*; import org.objectweb.proactive.core.mop.*; import org.objectweb.proactive.core.node.*; | [
"org.objectweb.proactive"
] | org.objectweb.proactive; | 1,769,602 |
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<AttestationInner> listAsync(Integer top, String filter) {
return new PagedFlux<>(
() -> listSinglePageAsync(top, filter), nextLink -> listForSubscriptionNextSinglePageAsync(nextLink));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<AttestationInner> function(Integer top, String filter) { return new PagedFlux<>( () -> listSinglePageAsync(top, filter), nextLink -> listForSubscriptionNextSinglePageAsync(nextLink)); } | /**
* Gets all attestations for the subscription.
*
* @param top Maximum number of records to return.
* @param filter OData filter expression.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by ser... | Gets all attestations for the subscription | listAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationsClientImpl.java",
"license": "mit",
"size": 124635
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.policyinsights.fluent.models.AttestationInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.policyinsights.fluent.models.AttestationInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.policyinsights.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 82,789 |
serverSocket = new ServerSocket(port);
clientSocket = serverSocket.accept();
return clientSocket;
} | serverSocket = new ServerSocket(port); clientSocket = serverSocket.accept(); return clientSocket; } | /**
* Start a TCP connection to a client.
* @param port Rhe port to listen on locahost
* @return The Socket that represent the established connection
* @throws IOException
*/ | Start a TCP connection to a client | acceptConnection | {
"repo_name": "etrange02/Perftest",
"path": "PerfTestSharedClasses/src/shared/tcp/AbstractTCPServer.java",
"license": "apache-2.0",
"size": 1500
} | [
"java.net.ServerSocket"
] | import java.net.ServerSocket; | import java.net.*; | [
"java.net"
] | java.net; | 583,414 |
//>example<
@Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "'arg'=45 cannot be greater or equal 40")
public void test2() throws Exception {
//fails
throwIf(arg45, arg -> arg >= 40, IllegalArgumentException::new, "'arg'=%s cannot be greater or ... | @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = STR) void function() throws Exception { throwIf(arg45, arg -> arg >= 40, IllegalArgumentException::new, STR, arg45, 40); } | /**
* Now lets include the value of the argument to the message.
*/ | Now lets include the value of the argument to the message | test2 | {
"repo_name": "lunisolar/magma",
"path": "magma-test/src/test/java/eu/lunisolar/magma/examples/Example_Validations_Simple_Test.java",
"license": "apache-2.0",
"size": 6422
} | [
"eu.lunisolar.magma.func.predicate.LBiIntPredicate",
"eu.lunisolar.magma.func.predicate.LIntPredicate",
"org.testng.annotations.Test"
] | import eu.lunisolar.magma.func.predicate.LBiIntPredicate; import eu.lunisolar.magma.func.predicate.LIntPredicate; import org.testng.annotations.Test; | import eu.lunisolar.magma.func.predicate.*; import org.testng.annotations.*; | [
"eu.lunisolar.magma",
"org.testng.annotations"
] | eu.lunisolar.magma; org.testng.annotations; | 557,512 |
public static void putProtected(final JSONObject object, final String key, final String value, final XSSFilter xss)
throws JSONException {
final String xssValue = xss.filter(ProtectionContext.PLAIN_HTML_CONTENT, value);
object.put(key, xssValue);
}
/**
* Puts a value into a... | static void function(final JSONObject object, final String key, final String value, final XSSFilter xss) throws JSONException { final String xssValue = xss.filter(ProtectionContext.PLAIN_HTML_CONTENT, value); object.put(key, xssValue); } /** * Puts a value into a JSON object * In addition, the xss protected value is pu... | /**
* Puts a xss protected value into a JSON object.
* The value is put under the provided key.
*
* @param object JSON object
* @param key Key to write
* @param value Value to write
* @param xss XSS protection filter
* @throws JSONException If value could not be put... | Puts a xss protected value into a JSON object. The value is put under the provided key | putProtected | {
"repo_name": "dulvac/sling",
"path": "bundles/extensions/xss/src/main/java/org/apache/sling/xss/JSONUtil.java",
"license": "apache-2.0",
"size": 6197
} | [
"org.apache.sling.commons.json.JSONException",
"org.apache.sling.commons.json.JSONObject"
] | import org.apache.sling.commons.json.JSONException; import org.apache.sling.commons.json.JSONObject; | import org.apache.sling.commons.json.*; | [
"org.apache.sling"
] | org.apache.sling; | 2,604,188 |
protected void setArrow(Stack stack, Stack.ArrowDirection direction) {
hasArrow = true;
stack.setArrow(direction);
} | void function(Stack stack, Stack.ArrowDirection direction) { hasArrow = true; stack.setArrow(direction); } | /**
* Sets the background of a stack to an arrow (left handed mode will reverse the direction)
*
* @param stack The stack to apply
* @param direction The default direction of the arrow LEFT or RIGHT
*/ | Sets the background of a stack to an arrow (left handed mode will reverse the direction) | setArrow | {
"repo_name": "NicolasNolmans/Simple-Solitaire-master",
"path": "app/src/main/java/be/kuleuven/drsolitaire/games/Game.java",
"license": "gpl-3.0",
"size": 34064
} | [
"be.kuleuven.drsolitaire.classes.Stack"
] | import be.kuleuven.drsolitaire.classes.Stack; | import be.kuleuven.drsolitaire.classes.*; | [
"be.kuleuven.drsolitaire"
] | be.kuleuven.drsolitaire; | 861,795 |
public void testGetElements012() {
dtd = new DTDGetter("TestContentModelSemantic");
Element el = dtd.defineElement("1", 0, true, true, null, null,
null, null);
cm = new ContentModel(el);
Vector v = new Vector();
cm.getElements(v);
assertEquals("... | void function() { dtd = new DTDGetter(STR); Element el = dtd.defineElement("1", 0, true, true, null, null, null, null); cm = new ContentModel(el); Vector v = new Vector(); cm.getElements(v); assertEquals("[1]", v.toString()); } | /**
* Test method for
* 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
* ContentModel("1",0,true,true,null,null,null,null).getElements(new
* Vector()) Expected: "1"
*/ | Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)' ContentModel("1",0,true,true,null,null,null,null).getElements(new Vector()) Expected: "1" | testGetElements012 | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/swing/src/test/api/java.injected/org/apache/harmony/swing/tests/javax/swing/text/parser/ContentModelCompatilityTest.java",
"license": "gpl-2.0",
"size": 153261
} | [
"java.util.Vector",
"javax.swing.text.html.parser.ContentModel",
"javax.swing.text.html.parser.Element",
"javax.swing.text.parser.utils.DTDGetter"
] | import java.util.Vector; import javax.swing.text.html.parser.ContentModel; import javax.swing.text.html.parser.Element; import javax.swing.text.parser.utils.DTDGetter; | import java.util.*; import javax.swing.text.html.parser.*; import javax.swing.text.parser.utils.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 2,387,157 |
@Test
public void testGetContextsJSON() throws URISyntaxException {
StringBuffer uri = new StringBuffer();
uri.append(RestUtils.getServerURI());
WebResource webResource = client.resource(uri.toString());
ClientResponse response = webResource.accept(MediaType.APPLICATION_JSON... | void function() throws URISyntaxException { StringBuffer uri = new StringBuffer(); uri.append(RestUtils.getServerURI()); WebResource webResource = client.resource(uri.toString()); ClientResponse response = webResource.accept(MediaType.APPLICATION_JSON_TYPE).get(ClientResponse.class); Status status = response.getClientR... | /**
* Test get contexts json.
*
* @throws URISyntaxException the uRI syntax exception
*/ | Test get contexts json | testGetContextsJSON | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "jpa/eclipselink.jpars.test/src/org/eclipse/persistence/jpars/test/server/ServerCrudTest.java",
"license": "epl-1.0",
"size": 59374
} | [
"com.sun.jersey.api.client.ClientResponse",
"com.sun.jersey.api.client.WebResource",
"java.net.URISyntaxException",
"javax.ws.rs.core.MediaType",
"org.eclipse.persistence.jpars.test.util.RestUtils",
"org.junit.Assert"
] | import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.WebResource; import java.net.URISyntaxException; import javax.ws.rs.core.MediaType; import org.eclipse.persistence.jpars.test.util.RestUtils; import org.junit.Assert; | import com.sun.jersey.api.client.*; import java.net.*; import javax.ws.rs.core.*; import org.eclipse.persistence.jpars.test.util.*; import org.junit.*; | [
"com.sun.jersey",
"java.net",
"javax.ws",
"org.eclipse.persistence",
"org.junit"
] | com.sun.jersey; java.net; javax.ws; org.eclipse.persistence; org.junit; | 372,129 |
public CollectionOfAppRoleAssignment0 withAdditionalProperties(Map<String, Object> additionalProperties) {
this.additionalProperties = additionalProperties;
return this;
} | CollectionOfAppRoleAssignment0 function(Map<String, Object> additionalProperties) { this.additionalProperties = additionalProperties; return this; } | /**
* Set the additionalProperties property: Collection of appRoleAssignment.
*
* @param additionalProperties the additionalProperties value to set.
* @return the CollectionOfAppRoleAssignment0 object itself.
*/ | Set the additionalProperties property: Collection of appRoleAssignment | withAdditionalProperties | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/models/CollectionOfAppRoleAssignment0.java",
"license": "mit",
"size": 3539
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,575,521 |
@Override
public CloseableIterator<ZooHandleImpl> oidIterator(ZooClassProxy clsPx, boolean subClasses) {
SchemaIndexEntry se = schemaIndex.getSchema(clsPx.getSchemaId());
if (se == null) {
throw new IllegalStateException("Schema not found for class: " + clsPx);
}
Zoo... | CloseableIterator<ZooHandleImpl> function(ZooClassProxy clsPx, boolean subClasses) { SchemaIndexEntry se = schemaIndex.getSchema(clsPx.getSchemaId()); if (se == null) { throw new IllegalStateException(STR + clsPx); } ZooHandleIteratorAdapter it = new ZooHandleIteratorAdapter( se.getObjectIndexIterator(), objectReader, ... | /**
* Read objects.
* This should never be necessary. -> add warning?
* -> Only required for queries without index, which is worth a warning anyway.
*/ | Read objects. This should never be necessary. -> add warning? -> Only required for queries without index, which is worth a warning anyway | oidIterator | {
"repo_name": "NickCharsley/zoodb",
"path": "src/org/zoodb/internal/server/DiskAccessOneFile.java",
"license": "gpl-3.0",
"size": 28414
} | [
"org.zoodb.internal.ZooClassProxy",
"org.zoodb.internal.ZooHandleImpl",
"org.zoodb.internal.server.index.SchemaIndex",
"org.zoodb.internal.server.index.ZooHandleIteratorAdapter",
"org.zoodb.internal.util.CloseableIterator"
] | import org.zoodb.internal.ZooClassProxy; import org.zoodb.internal.ZooHandleImpl; import org.zoodb.internal.server.index.SchemaIndex; import org.zoodb.internal.server.index.ZooHandleIteratorAdapter; import org.zoodb.internal.util.CloseableIterator; | import org.zoodb.internal.*; import org.zoodb.internal.server.index.*; import org.zoodb.internal.util.*; | [
"org.zoodb.internal"
] | org.zoodb.internal; | 2,871,830 |
public static <T> void sort(List<T> list, Comparator<T> cmp)
{
int size = list.size();
if (size < 2)
{
return;
}
quicksort(list, cmp, 0, size - 1);
}
| static <T> void function(List<T> list, Comparator<T> cmp) { int size = list.size(); if (size < 2) { return; } quicksort(list, cmp, 0, size - 1); } | /**
* Sorts the given list using the given comparator.
*
* @param list list to be sorted
* @param cmp comparator used to compare the object swithin the list
*/ | Sorts the given list using the given comparator | sort | {
"repo_name": "mdamt/PdfBox-Android",
"path": "library/src/main/java/org/apache/pdfbox/util/QuickSort.java",
"license": "apache-2.0",
"size": 2386
} | [
"java.util.Comparator",
"java.util.List"
] | import java.util.Comparator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,991,142 |
public static final void putValues(final ContentResolver resolver,
final Uri uri, final ContentValues values, final long now) {
values.put(TIMESTAMP_FIELD, now);
resolver.insert(uri, values);
} | static final void function(final ContentResolver resolver, final Uri uri, final ContentValues values, final long now) { values.put(TIMESTAMP_FIELD, now); resolver.insert(uri, values); } | /**
* Stores the values to the content provider using this given content
* resolver. Fills in the timestamp and expiration before storing.
*
* @param resolver
* the resolver to store with
* @param values
* the values to store
* @param now
* the timestamp
* @param ur... | Stores the values to the content provider using this given content resolver. Fills in the timestamp and expiration before storing | putValues | {
"repo_name": "interdroid/interdroid-swan",
"path": "src/interdroid/swan/sensors/AbstractVdbSensor.java",
"license": "bsd-3-clause",
"size": 8246
} | [
"android.content.ContentResolver",
"android.content.ContentValues",
"android.net.Uri"
] | import android.content.ContentResolver; import android.content.ContentValues; import android.net.Uri; | import android.content.*; import android.net.*; | [
"android.content",
"android.net"
] | android.content; android.net; | 1,035,931 |
List<CounterSample> getIncrementCounterSamples(String key); | List<CounterSample> getIncrementCounterSamples(String key); | /**
* Increment sample all Counters.
*
* @param key name of an incremental sample
* @return one Sample for each Counter
* @see #getIncrementCounterSample(String, String)
*/ | Increment sample all Counters | getIncrementCounterSamples | {
"repo_name": "virgo47/javasimon",
"path": "core/src/main/java/org/javasimon/jmx/SimonManagerMXBean.java",
"license": "bsd-3-clause",
"size": 7042
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,997,495 |
public static boolean isBadgeCounterSupported(Context context) {
// Checking outside synchronized block to avoid synchronization in the common case (flag
// already set), and improve perf.
if (sIsBadgeCounterSupported == null) {
synchronized (sCounterSupportedLock) {
... | static boolean function(Context context) { if (sIsBadgeCounterSupported == null) { synchronized (sCounterSupportedLock) { if (sIsBadgeCounterSupported == null) { String lastErrorMessage = null; for (int i = 0; i < SUPPORTED_CHECK_ATTEMPTS; i++) { try { Log.i(LOG_TAG, STR + String.format(STR, i + 1, SUPPORTED_CHECK_ATTE... | /**
* Whether this platform launcher supports shortcut badges. Doing this check causes the side
* effect of resetting the counter if it's supported, so this method should be followed by
* a call that actually sets the counter to the desired value, if the counter is supported.
*/ | Whether this platform launcher supports shortcut badges. Doing this check causes the side effect of resetting the counter if it's supported, so this method should be followed by a call that actually sets the counter to the desired value, if the counter is supported | isBadgeCounterSupported | {
"repo_name": "freshplanet/ANE-Push-Notification",
"path": "android/lib/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java",
"license": "apache-2.0",
"size": 9660
} | [
"android.content.Context",
"android.util.Log"
] | import android.content.Context; import android.util.Log; | import android.content.*; import android.util.*; | [
"android.content",
"android.util"
] | android.content; android.util; | 1,043,325 |
public IDataset getThreshold_energy(); | IDataset function(); | /**
* Single photon counter detectors can be adjusted for a certain energy range in which they
* work optimally. This is the energy setting for this.
* <p>
* <b>Type:</b> NX_FLOAT
* <b>Units:</b> NX_ENERGY
* </p>
*
* @return the value.
*/ | Single photon counter detectors can be adjusted for a certain energy range in which they work optimally. This is the energy setting for this. Type: NX_FLOAT Units: NX_ENERGY | getThreshold_energy | {
"repo_name": "Anthchirp/dawnsci",
"path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXdetector.java",
"license": "epl-1.0",
"size": 22203
} | [
"org.eclipse.dawnsci.analysis.api.dataset.IDataset"
] | import org.eclipse.dawnsci.analysis.api.dataset.IDataset; | import org.eclipse.dawnsci.analysis.api.dataset.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 2,242,625 |
public long storageSizeBytes() {
return DataSize.toBytes(_storage);
} | long function() { return DataSize.toBytes(_storage); } | /**
* Get the storage quota configured value in bytes
* @return configured size in bytes or -1 if the value is missing or
* unparseable
*/ | Get the storage quota configured value in bytes | storageSizeBytes | {
"repo_name": "apucher/pinot",
"path": "pinot-common/src/main/java/com/linkedin/pinot/common/config/QuotaConfig.java",
"license": "apache-2.0",
"size": 4347
} | [
"com.linkedin.pinot.common.utils.DataSize"
] | import com.linkedin.pinot.common.utils.DataSize; | import com.linkedin.pinot.common.utils.*; | [
"com.linkedin.pinot"
] | com.linkedin.pinot; | 2,601,610 |
@InputPort(name = INPUT_PORT_NAME_EXECUTION_TRACE, description = "Execution traces", eventTypes = ExecutionTrace.class)
public void newExecutionTrace(final ExecutionTrace et) {
try {
if (this.equivalenceMode == TraceEquivalenceClassModes.DISABLED) {
super.deliver(OUTPUT_PORT_NAME_EXECUTION_TRACE_REPRESENTA... | @InputPort(name = INPUT_PORT_NAME_EXECUTION_TRACE, description = STR, eventTypes = ExecutionTrace.class) void function(final ExecutionTrace et) { try { if (this.equivalenceMode == TraceEquivalenceClassModes.DISABLED) { super.deliver(OUTPUT_PORT_NAME_EXECUTION_TRACE_REPRESENTATIVES, et); super.deliver(OUTPUT_PORT_NAME_M... | /**
* This method represents the input port of this filter, processing incoming execution traces.
*
* @param et
* The next execution trace.
*/ | This method represents the input port of this filter, processing incoming execution traces | newExecutionTrace | {
"repo_name": "kieker-monitoring/kieker",
"path": "kieker-tools/src/kieker/tools/trace/analysis/filter/traceFilter/TraceEquivalenceClassFilter.java",
"license": "apache-2.0",
"size": 8183
} | [
"java.util.concurrent.atomic.AtomicInteger"
] | import java.util.concurrent.atomic.AtomicInteger; | import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 2,625,732 |
public BrokerDestinationView getTopicDestinationView(String destinationName) throws Exception{
return getDestinationView(destinationName,ActiveMQDestination.TOPIC_TYPE);
} | BrokerDestinationView function(String destinationName) throws Exception{ return getDestinationView(destinationName,ActiveMQDestination.TOPIC_TYPE); } | /**
* Get the BrokerDestinationView associated with the topic
* @param destinationName
* @return BrokerDestinationView
* @throws Exception
*/ | Get the BrokerDestinationView associated with the topic | getTopicDestinationView | {
"repo_name": "Mark-Booth/daq-eclipse",
"path": "uk.ac.diamond.org.apache.activemq/org/apache/activemq/broker/view/MessageBrokerView.java",
"license": "epl-1.0",
"size": 9611
} | [
"org.apache.activemq.command.ActiveMQDestination"
] | import org.apache.activemq.command.ActiveMQDestination; | import org.apache.activemq.command.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 2,047,739 |
protected void init() throws IOException {
if (initialized) {
return;
}
if (targetEncoding == null) {
// DETECT MODE
byte bom[] = new byte[MAX_BOM_SIZE];
int n = internalInputStream.read(bom, 0, bom.length);
int unread;
if ((bom[0] == BOM_UTF32_BE[0]) && (bom[1] == BOM_UTF32_... | void function() throws IOException { if (initialized) { return; } if (targetEncoding == null) { byte bom[] = new byte[MAX_BOM_SIZE]; int n = internalInputStream.read(bom, 0, bom.length); int unread; if ((bom[0] == BOM_UTF32_BE[0]) && (bom[1] == BOM_UTF32_BE[1]) && (bom[2] == BOM_UTF32_BE[2]) && (bom[3] == BOM_UTF32_BE[... | /**
* Detects and decodes encoding from BOM character.
* Reads ahead four bytes and check for BOM marks.
* Extra bytes are unread back to the stream, so only
* BOM bytes are skipped.
*/ | Detects and decodes encoding from BOM character. Reads ahead four bytes and check for BOM marks. Extra bytes are unread back to the stream, so only BOM bytes are skipped | init | {
"repo_name": "Artemish/jodd",
"path": "jodd-core/src/main/java/jodd/io/UnicodeInputStream.java",
"license": "bsd-3-clause",
"size": 5121
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,812,001 |
@RequestMapping(value = "/{entityName}", method = PUT)
public synchronized void updateEntities(@PathVariable("entityName") String entityName,
@RequestBody @Valid EntityCollectionBatchRequestV2 request, HttpServletResponse response) throws Exception
{
final EntityMetaData meta = dataService.getEntityMetaData(e... | @RequestMapping(value = STR, method = PUT) synchronized void function(@PathVariable(STR) String entityName, @RequestBody @Valid EntityCollectionBatchRequestV2 request, HttpServletResponse response) throws Exception { final EntityMetaData meta = dataService.getEntityMetaData(entityName); if (meta == null) { throw create... | /**
* Try to update multiple entities in one transaction. If one fails all fails.
*
* @param entityName
* name of the entity where the entities are going to be added.
* @param request
* EntityCollectionCreateRequestV2
* @param response
* HttpServletResponse
* @throws ... | Try to update multiple entities in one transaction. If one fails all fails | updateEntities | {
"repo_name": "erwinwinder/molgenis",
"path": "molgenis-data-rest/src/main/java/org/molgenis/data/rest/v2/RestControllerV2.java",
"license": "lgpl-3.0",
"size": 28328
} | [
"java.util.stream.Stream",
"javax.servlet.http.HttpServletResponse",
"javax.validation.Valid",
"org.molgenis.data.Entity",
"org.molgenis.data.EntityMetaData",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestBody",
"org.springframework.web.bind.an... | import java.util.stream.Stream; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import org.molgenis.data.Entity; import org.molgenis.data.EntityMetaData; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.spri... | import java.util.stream.*; import javax.servlet.http.*; import javax.validation.*; import org.molgenis.data.*; import org.springframework.web.bind.annotation.*; | [
"java.util",
"javax.servlet",
"javax.validation",
"org.molgenis.data",
"org.springframework.web"
] | java.util; javax.servlet; javax.validation; org.molgenis.data; org.springframework.web; | 1,821,155 |
private void constructLopsCtable() throws HopsException, LopsException {
if ( _op != OpOp3.CTABLE )
throw new HopsException("Unexpected operation: " + _op + ", expecting " + OpOp3.CTABLE );
// identify the particular case
// F=ctable(A,B,W)
DataType dt1 = getInput().get(0).getDataType();
... | void function() throws HopsException, LopsException { if ( _op != OpOp3.CTABLE ) throw new HopsException(STR + _op + STR + OpOp3.CTABLE ); DataType dt1 = getInput().get(0).getDataType(); DataType dt2 = getInput().get(1).getDataType(); DataType dt3 = getInput().get(2).getDataType(); Ternary.OperationTypes tertiaryOpOrig... | /**
* Method to construct LOPs when op = CTABLE.
*
* @throws HopsException
* @throws LopsException
*/ | Method to construct LOPs when op = CTABLE | constructLopsCtable | {
"repo_name": "Myasuka/systemml",
"path": "src/main/java/org/apache/sysml/hops/TernaryOp.java",
"license": "apache-2.0",
"size": 33913
} | [
"org.apache.sysml.lops.Aggregate",
"org.apache.sysml.lops.CombineBinary",
"org.apache.sysml.lops.Group",
"org.apache.sysml.lops.Lop",
"org.apache.sysml.lops.LopProperties",
"org.apache.sysml.lops.LopsException",
"org.apache.sysml.lops.PartialAggregate",
"org.apache.sysml.lops.Ternary",
"org.apache.s... | import org.apache.sysml.lops.Aggregate; import org.apache.sysml.lops.CombineBinary; import org.apache.sysml.lops.Group; import org.apache.sysml.lops.Lop; import org.apache.sysml.lops.LopProperties; import org.apache.sysml.lops.LopsException; import org.apache.sysml.lops.PartialAggregate; import org.apache.sysml.lops.Te... | import org.apache.sysml.lops.*; import org.apache.sysml.parser.*; | [
"org.apache.sysml"
] | org.apache.sysml; | 115,076 |
private static Iterable<TransitiveInfoCollection> getConstraintCheckedDependencies(
RuleContext ruleContext) {
Set<TransitiveInfoCollection> depsToCheck = new LinkedHashSet<>();
AttributeMap attributes = ruleContext.attributes();
for (String attr : attributes.getAttributeNames()) {
Attribute ... | static Iterable<TransitiveInfoCollection> function( RuleContext ruleContext) { Set<TransitiveInfoCollection> depsToCheck = new LinkedHashSet<>(); AttributeMap attributes = ruleContext.attributes(); for (String attr : attributes.getAttributeNames()) { Attribute attrDef = attributes.getAttributeDefinition(attr); Type<?> ... | /**
* Returns all dependencies that should be constraint-checked against the current rule.
*/ | Returns all dependencies that should be constraint-checked against the current rule | getConstraintCheckedDependencies | {
"repo_name": "vt09/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/constraints/ConstraintSemantics.java",
"license": "apache-2.0",
"size": 26096
} | [
"com.google.devtools.build.lib.analysis.OutputFileConfiguredTarget",
"com.google.devtools.build.lib.analysis.RuleConfiguredTarget",
"com.google.devtools.build.lib.analysis.RuleContext",
"com.google.devtools.build.lib.analysis.TransitiveInfoCollection",
"com.google.devtools.build.lib.packages.Attribute",
"... | import com.google.devtools.build.lib.analysis.OutputFileConfiguredTarget; import com.google.devtools.build.lib.analysis.RuleConfiguredTarget; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; import com.google.devtools.build.lib.packages.A... | import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.syntax.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 224,596 |
@ServiceMethod(returns = ReturnType.SINGLE)
public GenericResourceInner update(
String resourceGroupName,
String resourceProviderNamespace,
String parentResourcePath,
String resourceType,
String resourceName,
String apiVersion,
GenericResourceInner paramet... | @ServiceMethod(returns = ReturnType.SINGLE) GenericResourceInner function( String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters) { return updateAsync( resourceGroupName, resourceProviderNamespa... | /**
* Updates a resource.
*
* @param resourceGroupName The name of the resource group for the resource. The name is case insensitive.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param parentResourcePath The parent resource identity.
* @param resourceType T... | Updates a resource | update | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java",
"license": "mit",
"size": 230225
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.resources.fluent.models.GenericResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.resources.fluent.models.GenericResourceInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.resources.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 573,584 |
public Observable<ServiceResponse<Void>> postRequiredWithServiceResponseAsync(ParameterGroupingPostRequiredParameters parameterGroupingPostRequiredParameters) {
if (parameterGroupingPostRequiredParameters == null) {
throw new IllegalArgumentException("Parameter parameterGroupingPostRequiredParam... | Observable<ServiceResponse<Void>> function(ParameterGroupingPostRequiredParameters parameterGroupingPostRequiredParameters) { if (parameterGroupingPostRequiredParameters == null) { throw new IllegalArgumentException(STR); } | /**
* Post a bunch of required parameters grouped.
*
* @param parameterGroupingPostRequiredParameters Additional parameters for the operation
* @return the {@link ServiceResponse} object if successful.
*/ | Post a bunch of required parameters grouped | postRequiredWithServiceResponseAsync | {
"repo_name": "garimakhulbe/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/azureparametergrouping/implementation/ParameterGroupingsImpl.java",
"license": "mit",
"size": 26518
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,114,471 |
@Kroll.getProperty @Kroll.method
public boolean getLocationServicesEnabled()
{
return tiLocation.getLocationServicesEnabled();
} | @Kroll.getProperty @Kroll.method boolean function() { return tiLocation.getLocationServicesEnabled(); } | /**
* Checks if the device has a valid location service present. The passive location service
* is not counted.
*
* @return <code>true</code> if a valid location service is available on the device,
* <code>false</code> if not
*/ | Checks if the device has a valid location service present. The passive location service is not counted | getLocationServicesEnabled | {
"repo_name": "hieupham007/Titanium_Mobile",
"path": "android/modules/geolocation/src/java/ti/modules/titanium/geolocation/GeolocationModule.java",
"license": "apache-2.0",
"size": 34798
} | [
"org.appcelerator.kroll.annotations.Kroll"
] | import org.appcelerator.kroll.annotations.Kroll; | import org.appcelerator.kroll.annotations.*; | [
"org.appcelerator.kroll"
] | org.appcelerator.kroll; | 2,877,076 |
public static Expression tokenizePairExpression(String startToken, String endToken, boolean includeTokens) {
return new TokenPairExpressionIterator(startToken, endToken, includeTokens);
} | static Expression function(String startToken, String endToken, boolean includeTokens) { return new TokenPairExpressionIterator(startToken, endToken, includeTokens); } | /**
* Returns an {@link TokenPairExpressionIterator} expression
*/ | Returns an <code>TokenPairExpressionIterator</code> expression | tokenizePairExpression | {
"repo_name": "atoulme/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java",
"license": "apache-2.0",
"size": 76427
} | [
"org.apache.camel.Expression",
"org.apache.camel.support.TokenPairExpressionIterator"
] | import org.apache.camel.Expression; import org.apache.camel.support.TokenPairExpressionIterator; | import org.apache.camel.*; import org.apache.camel.support.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,184,179 |
private void displayView(int position) {
Fragment fragment = null;
switch (position) {
case 0:
fragment = new HomeFragment();
break;
case 1:
fragment = new AboutFragment();
break;
case 2:
fragment = new SettingsFragment();
break;
case 3:
quit();
break;
default:
break;
}
... | void function(int position) { Fragment fragment = null; switch (position) { case 0: fragment = new HomeFragment(); break; case 1: fragment = new AboutFragment(); break; case 2: fragment = new SettingsFragment(); break; case 3: quit(); break; default: break; } if (fragment != null) { FragmentManager fragmentManager = ge... | /**
* Display fragment view for selected Navigation Drawer list item
* */ | Display fragment view for selected Navigation Drawer list item | displayView | {
"repo_name": "f3r10/AR",
"path": "ar-android-new/UnityTest/src/com/fis/ra/MainActivity.java",
"license": "mit",
"size": 7387
} | [
"android.app.Fragment",
"android.app.FragmentManager",
"android.util.Log"
] | import android.app.Fragment; import android.app.FragmentManager; import android.util.Log; | import android.app.*; import android.util.*; | [
"android.app",
"android.util"
] | android.app; android.util; | 101,537 |
public Map<String, Double> getMeasurements() {
return this.measurements;
} | Map<String, Double> function() { return this.measurements; } | /**
* Get the measurements property: Collection of custom measurements.
*
* @return the measurements value.
*/ | Get the measurements property: Collection of custom measurements | getMeasurements | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/monitor/opentelemetry-exporters-azuremonitor/src/main/java/com/azure/opentelemetry/exporters/azuremonitor/implementation/models/PageViewData.java",
"license": "mit",
"size": 6082
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 48,248 |
CardRegistration create(String idempotencyKey, CardRegistration cardRegistration) throws Exception; | CardRegistration create(String idempotencyKey, CardRegistration cardRegistration) throws Exception; | /**
* Creates new card registration.
* @param idempotencyKey idempotency key for this request.
* @param cardRegistration Card registration object to create.
* @return Card registration instance returned from API.
* @throws Exception
*/ | Creates new card registration | create | {
"repo_name": "Mangopay/mangopay2-java-sdk",
"path": "src/main/java/com/mangopay/core/APIs/CardRegistrationApi.java",
"license": "mit",
"size": 1386
} | [
"com.mangopay.entities.CardRegistration"
] | import com.mangopay.entities.CardRegistration; | import com.mangopay.entities.*; | [
"com.mangopay.entities"
] | com.mangopay.entities; | 1,431,325 |
@RequiresApi(17)
public static void focusSurface(
EGLDisplay eglDisplay, EGLContext eglContext, EGLSurface surface, int width, int height) {
Api17.focusSurface(eglDisplay, eglContext, surface, width, height);
} | @RequiresApi(17) static void function( EGLDisplay eglDisplay, EGLContext eglContext, EGLSurface surface, int width, int height) { Api17.focusSurface(eglDisplay, eglContext, surface, width, height); } | /**
* Makes the specified {@code surface} the render target, using a viewport of {@code width} by
* {@code height} pixels.
*/ | Makes the specified surface the render target, using a viewport of width by height pixels | focusSurface | {
"repo_name": "google/ExoPlayer",
"path": "library/common/src/main/java/com/google/android/exoplayer2/util/GlUtil.java",
"license": "apache-2.0",
"size": 29375
} | [
"android.opengl.EGLContext",
"android.opengl.EGLDisplay",
"android.opengl.EGLSurface",
"androidx.annotation.RequiresApi"
] | import android.opengl.EGLContext; import android.opengl.EGLDisplay; import android.opengl.EGLSurface; import androidx.annotation.RequiresApi; | import android.opengl.*; import androidx.annotation.*; | [
"android.opengl",
"androidx.annotation"
] | android.opengl; androidx.annotation; | 323,058 |
public void testSearchReturnsTokenCount() throws IOException {
init();
assertSearchReturns(searchById("single"), "single");
assertSearchReturns(searchById("bulk1"), "bulk1");
assertSearchReturns(searchById("bulk2"), "bulk2");
assertSearchReturns(searchById("multi"), "multi")... | void function() throws IOException { init(); assertSearchReturns(searchById(STR), STR); assertSearchReturns(searchById("bulk1"), "bulk1"); assertSearchReturns(searchById("bulk2"), "bulk2"); assertSearchReturns(searchById("multi"), "multi"); assertSearchReturns(searchById(STR), STR); assertSearchReturns(searchById(STR),... | /**
* It is possible to get the token count in a search response.
*/ | It is possible to get the token count in a search response | testSearchReturnsTokenCount | {
"repo_name": "HonzaKral/elasticsearch",
"path": "modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/TokenCountFieldMapperIntegrationIT.java",
"license": "apache-2.0",
"size": 11368
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,539,884 |
protected static final short getNamesValue(String value) {
if (value.equals("lower")) {
return NAMES_LOWERCASE;
}
if (value.equals("upper")) {
return NAMES_UPPERCASE;
}
return NAMES_NO_CHANGE;
} // getNamesValue(String):short
//
// Classes... | static final short function(String value) { if (value.equals("lower")) { return NAMES_LOWERCASE; } if (value.equals("upper")) { return NAMES_UPPERCASE; } return NAMES_NO_CHANGE; } public static class Info { public HTMLElements.Element element; public QName qname; public XMLAttributes attributes; public Info(HTMLElement... | /**
* Converts HTML names string value to constant value.
*
* @see #NAMES_NO_CHANGE
* @see #NAMES_LOWERCASE
* @see #NAMES_UPPERCASE
*/ | Converts HTML names string value to constant value | getNamesValue | {
"repo_name": "xuse/ef-others",
"path": "common-misc/src/main/java/org/cyberneko/html/HTMLTagBalancer.java",
"license": "apache-2.0",
"size": 42566
} | [
"org.apache.xerces.util.XMLAttributesImpl",
"org.apache.xerces.xni.QName",
"org.apache.xerces.xni.XMLAttributes"
] | import org.apache.xerces.util.XMLAttributesImpl; import org.apache.xerces.xni.QName; import org.apache.xerces.xni.XMLAttributes; | import org.apache.xerces.util.*; import org.apache.xerces.xni.*; | [
"org.apache.xerces"
] | org.apache.xerces; | 387,051 |
@SuppressWarnings("ExternalizableWithoutPublicNoArgConstructor")
public static IgniteInternalFuture<Long> runMultiThreadedAsync(Callable<?> call, int threadNum, final String threadName) {
final List<Callable<?>> calls = Collections.<Callable<?>>nCopies(threadNum, call);
final GridTestSafeThreadF... | @SuppressWarnings(STR) static IgniteInternalFuture<Long> function(Callable<?> call, int threadNum, final String threadName) { final List<Callable<?>> calls = Collections.<Callable<?>>nCopies(threadNum, call); final GridTestSafeThreadFactory threadFactory = new GridTestSafeThreadFactory(threadName); IgniteInternalFuture... | /**
* Runs callable object in specified number of threads.
*
* @param call Callable.
* @param threadNum Number of threads.
* @param threadName Thread names.
* @return Future for the run. Future returns execution time in milliseconds.
*/ | Runs callable object in specified number of threads | runMultiThreadedAsync | {
"repo_name": "amirakhmedov/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java",
"license": "apache-2.0",
"size": 65476
} | [
"java.util.Collections",
"java.util.List",
"java.util.concurrent.Callable",
"org.apache.ignite.internal.IgniteInternalFuture"
] | import java.util.Collections; import java.util.List; import java.util.concurrent.Callable; import org.apache.ignite.internal.IgniteInternalFuture; | import java.util.*; import java.util.concurrent.*; import org.apache.ignite.internal.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,168,314 |
private void buildTargets() {
Log.d(LOG_TAG, "Building targets");
// invalidate clicked position
mPosition = ListView.INVALID_POSITION;
int steelCount = numTargetsPrefs(ScoreContract.TargetEntry.TARGET_TYPE_STEEL);
int paperCount = numTargetsPrefs(ScoreContract.TargetEntry.T... | void function() { Log.d(LOG_TAG, STR); mPosition = ListView.INVALID_POSITION; int steelCount = numTargetsPrefs(ScoreContract.TargetEntry.TARGET_TYPE_STEEL); int paperCount = numTargetsPrefs(ScoreContract.TargetEntry.TARGET_TYPE_PAPER); rebuildTargets(steelCount, paperCount); } | /**
* Builds targets in the database taking the numbers from the settings. Uses rebuildTargets
* for doing the work.
*/ | Builds targets in the database taking the numbers from the settings. Uses rebuildTargets for doing the work | buildTargets | {
"repo_name": "kherb64/IPSCScorer",
"path": "app/src/main/java/kherb64/android/ipscscorer/MainActivity.java",
"license": "mit",
"size": 14291
} | [
"android.util.Log",
"android.widget.ListView"
] | import android.util.Log; import android.widget.ListView; | import android.util.*; import android.widget.*; | [
"android.util",
"android.widget"
] | android.util; android.widget; | 679,517 |
public boolean preloadingPermitted(KeyCacheObject key, GridCacheVersion ver) {
assert key != null;
assert ver != null;
assert lock.isHeldByCurrentThread(); // Only one thread can enter this method at a time.
if (state() != MOVING)
return false;
Map<KeyCacheObjec... | boolean function(KeyCacheObject key, GridCacheVersion ver) { assert key != null; assert ver != null; assert lock.isHeldByCurrentThread(); if (state() != MOVING) return false; Map<KeyCacheObject, GridCacheVersion> evictHist0 = evictHist; if (evictHist0 != null) { GridCacheVersion ver0 = evictHist0.get(key); return ver0 ... | /**
* Cache preloader should call this method within partition lock.
*
* @param key Key.
* @param ver Version.
* @return {@code True} if preloading is permitted.
*/ | Cache preloader should call this method within partition lock | preloadingPermitted | {
"repo_name": "a1vanov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java",
"license": "apache-2.0",
"size": 39694
} | [
"java.util.Map",
"org.apache.ignite.internal.processors.cache.KeyCacheObject",
"org.apache.ignite.internal.processors.cache.version.GridCacheVersion"
] | import java.util.Map; import org.apache.ignite.internal.processors.cache.KeyCacheObject; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; | import java.util.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.version.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,990,338 |
public void addSingleConnection( NeatConfiguration config, List neuronList, SortedMap conns,
Set allelesToAdd ) {
HashSet rejectedConnIds = new HashSet();
boolean isAdded = false;
int maxConnections = ( neuronList.size() * neuronList.size() ) - conns.size();
while ( !isAdded && ( rejectedConnIds.size() < maxConne... | void function( NeatConfiguration config, List neuronList, SortedMap conns, Set allelesToAdd ) { HashSet rejectedConnIds = new HashSet(); boolean isAdded = false; int maxConnections = ( neuronList.size() * neuronList.size() ) - conns.size(); while ( !isAdded && ( rejectedConnIds.size() < maxConnections ) ) { ConnectionA... | /**
* Given the collections of neurons and connections, returns the new connection that should be
* added.
*
* @param config
* @param neuronList <code>List</code> contains <code>NeuronAllele</code> objects
* @param conns <code>SortedMap</code> contains <code>ConnectionAllele</code> objects;
* contains new conne... | Given the collections of neurons and connections, returns the new connection that should be added | addSingleConnection | {
"repo_name": "RaeveSpam/ANJIProject",
"path": "src/com/anji/neat/AddConnectionMutationOperator.java",
"license": "gpl-2.0",
"size": 9470
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"java.util.SortedMap"
] | import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.SortedMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,034,294 |
public static List<Package> lookupByNevra(Org org, String name, String version,
String release, String epoch, PackageArch arch) {
List<Package> packages = HibernateFactory.getSession().getNamedQuery(
"Package.lookupByNevra").setEntity("org", org).setString("name", name)
... | static List<Package> function(Org org, String name, String version, String release, String epoch, PackageArch arch) { List<Package> packages = HibernateFactory.getSession().getNamedQuery( STR).setEntity("org", org).setString("name", name) .setString(STR, version).setString(STR, release).setEntity( "arch", arch).list();... | /**
* Find a package based off of the NEVRA
* @param org the org that owns the package
* @param name the name to search for
* @param version the version to search for
* @param release the release to search for
* @param epoch if epoch is null, the best match for epoch will be used.
* @... | Find a package based off of the NEVRA | lookupByNevra | {
"repo_name": "mcalmer/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/rhnpackage/PackageFactory.java",
"license": "gpl-2.0",
"size": 21271
} | [
"com.redhat.rhn.common.hibernate.HibernateFactory",
"com.redhat.rhn.domain.org.Org",
"java.util.List"
] | import com.redhat.rhn.common.hibernate.HibernateFactory; import com.redhat.rhn.domain.org.Org; import java.util.List; | import com.redhat.rhn.common.hibernate.*; import com.redhat.rhn.domain.org.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 2,759,020 |
private Object getInstance(Class<?> clazz) {
return Environment.my(clazz);
} | Object function(Class<?> clazz) { return Environment.my(clazz); } | /**
* Gets the single instance of EventBusCollector.
*
* @param clazz the clazz
* @return single instance of EventBusCollector
*/ | Gets the single instance of EventBusCollector | getInstance | {
"repo_name": "jspare-projects/vertx-jspare",
"path": "vertx-jspare/src/main/java/org/jspare/vertx/builder/EventBusCollector.java",
"license": "apache-2.0",
"size": 2153
} | [
"org.jspare.core.Environment"
] | import org.jspare.core.Environment; | import org.jspare.core.*; | [
"org.jspare.core"
] | org.jspare.core; | 2,012,725 |
private boolean functionThresholdsExceeded(List fileList) {
boolean failed = false;
//check thresholds
if (!((jvdcPerFuncMax == Integer.MAX_VALUE) &&
(jvdcPerFuncMin == -1) &&
(ccnPerFuncMax == Integer.MAX_VALUE) &&
(ccnPerFuncMin == -1) &&
... | boolean function(List fileList) { boolean failed = false; if (!((jvdcPerFuncMax == Integer.MAX_VALUE) && (jvdcPerFuncMin == -1) && (ccnPerFuncMax == Integer.MAX_VALUE) && (ccnPerFuncMin == -1) && (ncssPerFuncMax == Integer.MAX_VALUE) && (ncssPerFuncMin == -1))) { List funcMetrics = getJavaNcss(fileList).getFunctionMetr... | /**
* Checks thresholds for all functions.
* @param fileList the files to be analysed.
* @return true if a threshold has been exceeded; false otherwise.
*/ | Checks thresholds for all functions | functionThresholdsExceeded | {
"repo_name": "kauffmj/razza",
"path": "tools/javancss-32.53/src/main/java/javancss/JavancssAntTask.java",
"license": "gpl-2.0",
"size": 29488
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 180,188 |
public void process(Event event) {
if (recordStoreEventConsumer != null) {
NativeEvent nativeEvent = (NativeEvent) event;
if (event.getType() == EventTypes.RECORD_STORE_CHANGE_EVENT) {
int suiteId = nativeEvent.intParam1;
int changeType = nativeEvent.i... | void function(Event event) { if (recordStoreEventConsumer != null) { NativeEvent nativeEvent = (NativeEvent) event; if (event.getType() == EventTypes.RECORD_STORE_CHANGE_EVENT) { int suiteId = nativeEvent.intParam1; int changeType = nativeEvent.intParam2; int recordId = nativeEvent.intParam3; int requiresAcknowledgment... | /**
* Processes asynchronous record store change event calling
* registered event consumer with event paramters
* @param event async record store change event
*/ | Processes asynchronous record store change event calling registered event consumer with event paramters | process | {
"repo_name": "brendandahl/j2me.js",
"path": "java/midp/com/sun/midp/rms/RecordStoreEventListener.java",
"license": "gpl-2.0",
"size": 4630
} | [
"com.sun.midp.events.Event",
"com.sun.midp.events.EventTypes",
"com.sun.midp.events.NativeEvent",
"com.sun.midp.log.LogChannels",
"com.sun.midp.log.Logging"
] | import com.sun.midp.events.Event; import com.sun.midp.events.EventTypes; import com.sun.midp.events.NativeEvent; import com.sun.midp.log.LogChannels; import com.sun.midp.log.Logging; | import com.sun.midp.events.*; import com.sun.midp.log.*; | [
"com.sun.midp"
] | com.sun.midp; | 1,939,140 |
static <T, F extends Future<T>> Supplier<F> decorateFuture(
RateLimiter rateLimiter,
Supplier<? extends F> supplier
) {
return decorateFuture(rateLimiter, 1, supplier);
} | static <T, F extends Future<T>> Supplier<F> decorateFuture( RateLimiter rateLimiter, Supplier<? extends F> supplier ) { return decorateFuture(rateLimiter, 1, supplier); } | /**
* Returns a Supplier which is decorated by a RateLimiter.
* @param rateLimiter the rate limiter
* @param supplier the original supplier
* @param <T> the type of the returned Future's result
* @param <F> the return type of the original Supplier (extends Future<T>)
... | Returns a Supplier which is decorated by a RateLimiter | decorateFuture | {
"repo_name": "drmaas/resilience4j",
"path": "resilience4j-ratelimiter/src/main/java/io/github/resilience4j/ratelimiter/RateLimiter.java",
"license": "apache-2.0",
"size": 33535
} | [
"java.util.concurrent.Future",
"java.util.function.Supplier"
] | import java.util.concurrent.Future; import java.util.function.Supplier; | import java.util.concurrent.*; import java.util.function.*; | [
"java.util"
] | java.util; | 2,770,039 |
@SuppressWarnings("unchecked")
public void putAll(Map t) {
// don't delegate to putAll since we want case handling from put
for (Entry next : (Set<Entry>) t.entrySet()) {
put(next.getKey(), next.getValue());
}
} | @SuppressWarnings(STR) void function(Map t) { for (Entry next : (Set<Entry>) t.entrySet()) { put(next.getKey(), next.getValue()); } } | /**
* Copies all of the mappings from the specified map to this result.
* If the map contains different case versions of the same (case-insensitive) key
* only the last (according to the natural ordering of the supplied map) will remain
* after the {@code putAll} method has returned.
*
* @... | Copies all of the mappings from the specified map to this result. If the map contains different case versions of the same (case-insensitive) key only the last (according to the natural ordering of the supplied map) will remain after the putAll method has returned | putAll | {
"repo_name": "jwagenleitner/groovy",
"path": "subprojects/groovy-sql/src/main/java/groovy/sql/GroovyRowResult.java",
"license": "apache-2.0",
"size": 6583
} | [
"java.util.Map",
"java.util.Set"
] | import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 515,227 |
public static int appendStringToFileNIO(final String text, final String fileName,
final Charset charset) {
checkFileName(fileName);
final File file = new File(fileName);
if (!file.isFile()) { // does not exist
try {
file.createNewFile();
} catch (final Exception e) {
thro... | static int function(final String text, final String fileName, final Charset charset) { checkFileName(fileName); final File file = new File(fileName); if (!file.isFile()) { try { file.createNewFile(); } catch (final Exception e) { throw new RuntimeException(STR + fileName + LS + e); } } int bytes = 0; try (FileChannel f... | /**
* Appends a String to a file using NIO and a Charset. If fileName does not
* exist, this creates a new empty file of that name. This closes the file
* after appending.
*
* @param text is the source String.
* @param fileName the given fileName
* @param charset The Charset to use when converting ... | Appends a String to a file using NIO and a Charset. If fileName does not exist, this creates a new empty file of that name. This closes the file after appending | appendStringToFileNIO | {
"repo_name": "DataSketches/DataSketches.github.io",
"path": "src/main/java/org/apache/datasketches/Files.java",
"license": "apache-2.0",
"size": 37488
} | [
"java.io.File",
"java.io.IOException",
"java.nio.channels.FileChannel",
"java.nio.charset.Charset"
] | import java.io.File; import java.io.IOException; import java.nio.channels.FileChannel; import java.nio.charset.Charset; | import java.io.*; import java.nio.channels.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,832,582 |
public void creatureKilledPlayer(Entity killer, ItemStack weapon) {
getNormalData(killer.getType(), weapon).addPlayerDeaths();
PVEEntry detailedEntry = new PVEEntry(killer.getType(), killer.getLocation());
if (Module.DetailedPVEDeaths.isEnabled()) {
detailedData.add(detailedEntry... | void function(Entity killer, ItemStack weapon) { getNormalData(killer.getType(), weapon).addPlayerDeaths(); PVEEntry detailedEntry = new PVEEntry(killer.getType(), killer.getLocation()); if (Module.DetailedPVEDeaths.isEnabled()) { detailedData.add(detailedEntry); } Bukkit.getServer().getPluginManager().callEvent(new Tr... | /**
* Registers the player death in the data store
*
* @param killer Creature that killed the player
* @param weapon Weapon used by killer
*/ | Registers the player death in the data store | creatureKilledPlayer | {
"repo_name": "pavog/Statistics-Bukkit-Plugin",
"path": "src/main/java/com/wolvencraft/yasp/db/data/pve/PVEData.java",
"license": "lgpl-3.0",
"size": 3503
} | [
"com.wolvencraft.yasp.db.data.pve.DetailedPVEStats",
"com.wolvencraft.yasp.events.player.TrackedPVEEvent",
"com.wolvencraft.yasp.settings.Module",
"org.bukkit.Bukkit",
"org.bukkit.entity.Entity",
"org.bukkit.inventory.ItemStack"
] | import com.wolvencraft.yasp.db.data.pve.DetailedPVEStats; import com.wolvencraft.yasp.events.player.TrackedPVEEvent; import com.wolvencraft.yasp.settings.Module; import org.bukkit.Bukkit; import org.bukkit.entity.Entity; import org.bukkit.inventory.ItemStack; | import com.wolvencraft.yasp.db.data.pve.*; import com.wolvencraft.yasp.events.player.*; import com.wolvencraft.yasp.settings.*; import org.bukkit.*; import org.bukkit.entity.*; import org.bukkit.inventory.*; | [
"com.wolvencraft.yasp",
"org.bukkit",
"org.bukkit.entity",
"org.bukkit.inventory"
] | com.wolvencraft.yasp; org.bukkit; org.bukkit.entity; org.bukkit.inventory; | 2,419,303 |
public void disconnect() throws SQLException {
this.closeColumnReplacements();
this.closeConnection();
this.closeAdminConnection();
} | void function() throws SQLException { this.closeColumnReplacements(); this.closeConnection(); this.closeAdminConnection(); } | /**
* Close all connections to the database.
*
* @throws java.sql.SQLException if any.
*/ | Close all connections to the database | disconnect | {
"repo_name": "bugcy013/opennms-tmp-tools",
"path": "core/db-install/src/main/java/org/opennms/core/db/install/InstallerDb.java",
"license": "gpl-2.0",
"size": 103528
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 234,091 |
public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataByteArrayOutputStream dataOut, BooleanStream bs) throws IOException {
super.tightMarshal2(wireFormat, o, dataOut, bs);
RemoveInfo info = (RemoveInfo)o;
tightMarshalCachedObject2(wireFormat, (DataStructure)info.getObjectId(),... | void function(OpenWireFormat wireFormat, Object o, DataByteArrayOutputStream dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); RemoveInfo info = (RemoveInfo)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getObjectId(), dataOut, bs); } | /**
* Write a object instance to data output stream
*
* @param o the instance to be marshaled
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/ | Write a object instance to data output stream | tightMarshal2 | {
"repo_name": "jonathanchristison/fabric8",
"path": "gateway/gateway-core/src/main/java/io/fabric8/gateway/handlers/detecting/protocol/openwire/codec/v1/RemoveInfoMarshaller.java",
"license": "apache-2.0",
"size": 4297
} | [
"io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.BooleanStream",
"io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.OpenWireFormat",
"io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DataStructure",
"io.fabric8.gateway.handlers.detecting.protocol.openwire.command.Remov... | import io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.BooleanStream; import io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.OpenWireFormat; import io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DataStructure; import io.fabric8.gateway.handlers.detecting.protocol.openwire.co... | import io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.*; import io.fabric8.gateway.handlers.detecting.protocol.openwire.command.*; import java.io.*; import org.fusesource.hawtbuf.*; | [
"io.fabric8.gateway",
"java.io",
"org.fusesource.hawtbuf"
] | io.fabric8.gateway; java.io; org.fusesource.hawtbuf; | 1,462,160 |
protected String paramString() {
String defaultCloseOperationString;
if (defaultCloseOperation == HIDE_ON_CLOSE) {
defaultCloseOperationString = "HIDE_ON_CLOSE";
} else if (defaultCloseOperation == DISPOSE_ON_CLOSE) {
defaultCloseOperationString = "DISPOSE_ON_CLOSE";
... | String function() { String defaultCloseOperationString; if (defaultCloseOperation == HIDE_ON_CLOSE) { defaultCloseOperationString = STR; } else if (defaultCloseOperation == DISPOSE_ON_CLOSE) { defaultCloseOperationString = STR; } else if (defaultCloseOperation == DO_NOTHING_ON_CLOSE) { defaultCloseOperationString = STR... | /**
* Returns a string representation of this <code>JFrame</code>.
* This method
* is intended to be used only for debugging purposes, and the
* content and format of the returned string may vary between
* implementations. The returned string may be empty but may not
* be <code>null</code>... | Returns a string representation of this <code>JFrame</code>. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be <code>null</code> | paramString | {
"repo_name": "md-5/jdk10",
"path": "src/java.desktop/share/classes/javax/swing/JFrame.java",
"license": "gpl-2.0",
"size": 34281
} | [
"javax.accessibility.AccessibleContext"
] | import javax.accessibility.AccessibleContext; | import javax.accessibility.*; | [
"javax.accessibility"
] | javax.accessibility; | 2,153,207 |
IpAddress routerId(); | IpAddress routerId(); | /**
* Obtains an IpAddress version of the ID for this router.
*
* @return raw IP address of the device identifier
*/ | Obtains an IpAddress version of the ID for this router | routerId | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/lisp/api/src/main/java/org/onosproject/lisp/ctl/LispRouter.java",
"license": "apache-2.0",
"size": 3290
} | [
"org.onlab.packet.IpAddress"
] | import org.onlab.packet.IpAddress; | import org.onlab.packet.*; | [
"org.onlab.packet"
] | org.onlab.packet; | 2,170,451 |
public Collection getFrequencyUsingReportCodeAndClass(String reportCode, String reportClass) throws Exception ;
public String getFrequencyBaseForAjaxCall(String frequencyCode) throws Exception;
public Collection getFrequencyBaseUsingFrequencyCode(String frequencyCode) throws Exception ; | Collection getFrequencyUsingReportCodeAndClass(String reportCode, String reportClass) throws Exception ; public String getFrequencyBaseForAjaxCall(String frequencyCode) throws Exception; public Collection function(String frequencyCode) throws Exception ; | /**
*
* This method is to get the frequency bases based on the frequencyCode
* @param frequencyCode
* @return
* @throws Exception
*/ | This method is to get the frequency bases based on the frequencyCode | getFrequencyBaseUsingFrequencyCode | {
"repo_name": "jwillia/kc-old1",
"path": "coeus-impl/src/main/java/org/kuali/kra/award/service/AwardTemplateReportTermService.java",
"license": "agpl-3.0",
"size": 2765
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,402,398 |
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
projectPopupMenu = new javax.swing.JPopupMenu();
rootServerPopupMenu = new javax.swing.JPopupMenu();
serverPopupMenu = new javax.swing.JPopupMenu();
di... | void function() { projectPopupMenu = new javax.swing.JPopupMenu(); rootServerPopupMenu = new javax.swing.JPopupMenu(); serverPopupMenu = new javax.swing.JPopupMenu(); directoryPopupMenu = new javax.swing.JPopupMenu(); branchPopupMenu = new javax.swing.JPopupMenu(); scrollPane = new javax.swing.JScrollPane(); projectTre... | /**
* This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated
* by the FormEditor.
*/ | by the FormEditor | initComponents | {
"repo_name": "jimv39/qvcsos",
"path": "qvcse-gui/src/main/java/com/qumasoft/guitools/qwin/ProjectTreeControl.java",
"license": "apache-2.0",
"size": 54129
} | [
"java.awt.Font",
"javax.swing.JPopupMenu",
"javax.swing.JTree"
] | import java.awt.Font; import javax.swing.JPopupMenu; import javax.swing.JTree; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,724,692 |
public List<RoutableDestination<T>> getDestinations(String path) {
String cleanPath = (path.endsWith(PATH_SLASH) && path.length() > 0)
? path.substring(0, path.length() - 1) : path;
List<RoutableDestination<T>> result = Lists.newArrayList();
for (ImmutablePair<Pattern, Rou... | List<RoutableDestination<T>> function(String path) { String cleanPath = (path.endsWith(PATH_SLASH) && path.length() > 0) ? path.substring(0, path.length() - 1) : path; List<RoutableDestination<T>> result = Lists.newArrayList(); for (ImmutablePair<Pattern, RouteDestinationWithGroups> patternRoute : patternRouteList) { I... | /**
* Get a list of destinations and the values matching templated parameter for the given path.
* Returns an empty list when there are no destinations that are matched.
*
* @param path path to be routed.
* @return List of Destinations matching the given route.
*/ | Get a list of destinations and the values matching templated parameter for the given path. Returns an empty list when there are no destinations that are matched | getDestinations | {
"repo_name": "sameera-jayasoma/product-mss",
"path": "core/src/main/java/org/wso2/msf4j/internal/router/PatternPathRouter.java",
"license": "apache-2.0",
"size": 6687
} | [
"com.google.common.collect.ImmutableMap",
"com.google.common.collect.Lists",
"java.util.List",
"java.util.Map",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; | import com.google.common.collect.*; import java.util.*; import java.util.regex.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 155,816 |
public Mask getSourceMask() {
return getContext().getSourceMask();
} | Mask function() { return getContext().getSourceMask(); } | /**
* Get the filter.
*
* @return the filter
*/ | Get the filter | getSourceMask | {
"repo_name": "DarkFort/FastAsyncWorldedit-rus-by-DarkFort",
"path": "core/src/main/java/com/sk89q/worldedit/command/tool/BrushTool.java",
"license": "gpl-3.0",
"size": 20974
} | [
"com.sk89q.worldedit.function.mask.Mask"
] | import com.sk89q.worldedit.function.mask.Mask; | import com.sk89q.worldedit.function.mask.*; | [
"com.sk89q.worldedit"
] | com.sk89q.worldedit; | 1,292,713 |
private static void writeSingleByte(FileSystem fs, Path testFile, int toWrite)
throws Exception {
OutputStream outputStream = fs.create(testFile);
outputStream.write(toWrite);
outputStream.close();
} | static void function(FileSystem fs, Path testFile, int toWrite) throws Exception { OutputStream outputStream = fs.create(testFile); outputStream.write(toWrite); outputStream.close(); } | /**
* Creates a file and writes a single byte with the given value in it.
*/ | Creates a file and writes a single byte with the given value in it | writeSingleByte | {
"repo_name": "JingchengDu/hadoop",
"path": "hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/ITestWasbUriAndConfiguration.java",
"license": "apache-2.0",
"size": 25086
} | [
"java.io.OutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import java.io.OutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,728,765 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.