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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
RefreshToken generateRefreshToken(JwtUser user);
/**
* Use and invalidate a refresh token for the given user using the default device id.
* Each refresh token may only be used once.
* Returns always {@code false} if property {@code fraho.jwt.refresh.enabled} is set to {@code false} | RefreshToken generateRefreshToken(JwtUser user); /** * Use and invalidate a refresh token for the given user using the default device id. * Each refresh token may only be used once. * Returns always {@code false} if property {@code fraho.jwt.refresh.enabled} is set to {@code false} | /**
* Generate a simple refresh token using the default device id. This token is not a "normal" JWT.
* It's just a base64-encoded string of random data.
* Returns {@code null} if the property {@code fraho.jwt.refresh.enabled} is set to {@code false}.
*
* @param user The refresh token will be is... | Generate a simple refresh token using the default device id. This token is not a "normal" JWT. It's just a base64-encoded string of random data. Returns null if the property fraho.jwt.refresh.enabled is set to false | generateRefreshToken | {
"repo_name": "bratkartoffel/security-jwt",
"path": "base/src/main/java/eu/fraho/spring/securityJwt/base/service/JwtTokenService.java",
"license": "mit",
"size": 6718
} | [
"eu.fraho.spring.securityJwt.base.dto.JwtUser",
"eu.fraho.spring.securityJwt.base.dto.RefreshToken"
] | import eu.fraho.spring.securityJwt.base.dto.JwtUser; import eu.fraho.spring.securityJwt.base.dto.RefreshToken; | import eu.fraho.spring.*; | [
"eu.fraho.spring"
] | eu.fraho.spring; | 957,735 |
public static Test suite(String serverHost, int serverPort)
{
System.out.println("*** TestPreStoppedMasterServer.suite(serverHost,serverPort)");
Test t = TestConfiguration.existingServerSuite(TestPreStoppedMasterServer.class,false,serverHost,serverPort);
System.out.println("*** Don... | static Test function(String serverHost, int serverPort) { System.out.println(STR); Test t = TestConfiguration.existingServerSuite(TestPreStoppedMasterServer.class,false,serverHost,serverPort); System.out.println(STR); return t; } | /**
* Adds this class to the *existing server* suite.
*/ | Adds this class to the *existing server* suite | suite | {
"repo_name": "kavin256/Derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/TestPreStoppedMasterServer.java",
"license": "apache-2.0",
"size": 4128
} | [
"junit.framework.Test",
"org.apache.derbyTesting.junit.TestConfiguration"
] | import junit.framework.Test; import org.apache.derbyTesting.junit.TestConfiguration; | import junit.framework.*; import org.apache.*; | [
"junit.framework",
"org.apache"
] | junit.framework; org.apache; | 2,158,249 |
public static NodesInfoRequest nodesInfoRequest(String... nodesIds) {
return new NodesInfoRequest(nodesIds);
} | static NodesInfoRequest function(String... nodesIds) { return new NodesInfoRequest(nodesIds); } | /**
* Creates a nodes info request against one or more nodes. Pass <tt>null</tt> or an empty array for all nodes.
*
* @param nodesIds The nodes ids to get the status for
* @return The nodes info request
* @see org.elasticsearch.client.ClusterAdminClient#nodesStats(org.elasticsearch.action.admin... | Creates a nodes info request against one or more nodes. Pass null or an empty array for all nodes | nodesInfoRequest | {
"repo_name": "dongaihua/highlight-elasticsearch",
"path": "src/main/java/org/elasticsearch/client/Requests.java",
"license": "apache-2.0",
"size": 19189
} | [
"org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequest"
] | import org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequest; | import org.elasticsearch.action.admin.cluster.node.info.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 563,014 |
public static final String getBriefHelp(CutAction action) {
if (!commandBriefHelpInitialized && action != null) {
try {
commandBriefHelp = ResourceUtils.getMessage(COMMAND_BRIEF_HELP_KEY);
} catch (MissingResourceException e) {
LOGGER.log(Level.SEVERE,... | static final String function(CutAction action) { if (!commandBriefHelpInitialized && action != null) { try { commandBriefHelp = ResourceUtils.getMessage(COMMAND_BRIEF_HELP_KEY); } catch (MissingResourceException e) { LOGGER.log(Level.SEVERE, STRSTR\"", e); commandBriefHelp = COMMAND_BRIEF_HELP; } commandBriefHelpInitia... | /**
* Construct the static command brief help.
*
* @param action the action reference
*
* @return the static command brief help.
*/ | Construct the static command brief help | getBriefHelp | {
"repo_name": "madmath03/JSwingShell-JssFrame",
"path": "src/jswingshell/jssframe/action/CutAction.java",
"license": "mit",
"size": 7299
} | [
"java.util.MissingResourceException",
"java.util.logging.Level"
] | import java.util.MissingResourceException; import java.util.logging.Level; | import java.util.*; import java.util.logging.*; | [
"java.util"
] | java.util; | 780,795 |
public static Scan scan(Resource subj, IRI pred, Value obj, Resource ctx) {
return scan(hashKey(subj), hashKey(pred), hashKey(obj), hashKey(ctx));
} | static Scan function(Resource subj, IRI pred, Value obj, Resource ctx) { return scan(hashKey(subj), hashKey(pred), hashKey(obj), hashKey(ctx)); } | /**
* Method constructing HBase Scan from a Statement pattern, any of the arguments can be null
* @param subj optional subject Resource
* @param pred optional predicate IRI
* @param obj optional object Value
* @param ctx optional context Resource
* @return HBase Scan instance to retrieve a... | Method constructing HBase Scan from a Statement pattern, any of the arguments can be null | scan | {
"repo_name": "Merck/Halyard",
"path": "common/src/main/java/com/msd/gin/halyard/common/HalyardTableUtils.java",
"license": "apache-2.0",
"size": 22427
} | [
"org.apache.hadoop.hbase.client.Scan",
"org.eclipse.rdf4j.model.Resource",
"org.eclipse.rdf4j.model.Value"
] | import org.apache.hadoop.hbase.client.Scan; import org.eclipse.rdf4j.model.Resource; import org.eclipse.rdf4j.model.Value; | import org.apache.hadoop.hbase.client.*; import org.eclipse.rdf4j.model.*; | [
"org.apache.hadoop",
"org.eclipse.rdf4j"
] | org.apache.hadoop; org.eclipse.rdf4j; | 74,709 |
private void readAllParameters(StringTokenizer line){
String new_line,cadena;
StringTokenizer data;
while (line.hasMoreTokens()) { //While there is more parameters...
new_line = line.nextToken();
data = new StringTokenizer(new_line, " = ");
cadena = new St... | void function(StringTokenizer line){ String new_line,cadena; StringTokenizer data; while (line.hasMoreTokens()) { new_line = line.nextToken(); data = new StringTokenizer(new_line, STR); cadena = new String(""); while (data.hasMoreTokens()){ cadena = data.nextToken(); } parameters.add(cadena); } } | /**
* We read all the possible parameters of the algorithm
* @param line StringTokenizer It contains all the parameters.
*/ | We read all the possible parameters of the algorithm | readAllParameters | {
"repo_name": "adofsauron/KEEL",
"path": "src/keel/Algorithms/Fuzzy_Rule_Learning/Genetic/Fuzzy_Ish_Hybrid/parseParameters.java",
"license": "gpl-3.0",
"size": 6680
} | [
"java.util.StringTokenizer"
] | import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 1,575,870 |
SortedMap<DataSet, Collection<DataElement>> getDataElementsInDataSetNotInForm();
// -------------------------------------------------------------------------
// Section
// ------------------------------------------------------------------------- | SortedMap<DataSet, Collection<DataElement>> getDataElementsInDataSetNotInForm(); | /**
* Returns all data elements which are member of a data set but not part of
* either the custom form or sections of the data set.
*/ | Returns all data elements which are member of a data set but not part of either the custom form or sections of the data set | getDataElementsInDataSetNotInForm | {
"repo_name": "kakada/dhis2",
"path": "dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityService.java",
"license": "bsd-3-clause",
"size": 8150
} | [
"java.util.Collection",
"java.util.SortedMap",
"org.hisp.dhis.dataelement.DataElement",
"org.hisp.dhis.dataset.DataSet"
] | import java.util.Collection; import java.util.SortedMap; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataset.DataSet; | import java.util.*; import org.hisp.dhis.dataelement.*; import org.hisp.dhis.dataset.*; | [
"java.util",
"org.hisp.dhis"
] | java.util; org.hisp.dhis; | 830,387 |
ControllerServiceReferencingComponentsEntity updateControllerServiceReferencingComponents(
Map<String, Revision> referenceRevisions, String controllerServiceId, ScheduledState scheduledState, ControllerServiceState controllerServiceState); | ControllerServiceReferencingComponentsEntity updateControllerServiceReferencingComponents( Map<String, Revision> referenceRevisions, String controllerServiceId, ScheduledState scheduledState, ControllerServiceState controllerServiceState); | /**
* Updates the referencing components for the specified controller service.
*
* @param referenceRevisions revisions
* @param controllerServiceId id
* @param scheduledState state
* @param controllerServiceState the value of state
* @return The referencing component dtos
*/ | Updates the referencing components for the specified controller service | updateControllerServiceReferencingComponents | {
"repo_name": "WilliamNouet/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java",
"license": "apache-2.0",
"size": 53848
} | [
"java.util.Map",
"org.apache.nifi.controller.ScheduledState",
"org.apache.nifi.controller.service.ControllerServiceState",
"org.apache.nifi.web.api.entity.ControllerServiceReferencingComponentsEntity"
] | import java.util.Map; import org.apache.nifi.controller.ScheduledState; import org.apache.nifi.controller.service.ControllerServiceState; import org.apache.nifi.web.api.entity.ControllerServiceReferencingComponentsEntity; | import java.util.*; import org.apache.nifi.controller.*; import org.apache.nifi.controller.service.*; import org.apache.nifi.web.api.entity.*; | [
"java.util",
"org.apache.nifi"
] | java.util; org.apache.nifi; | 125,620 |
Intent intent = new Intent(context, MoteAPIService.class);
intent.setAction(ACTION_GET_STATE);
intent.putExtra(EXTRA_MOTE, mote);
context.startService(intent);
} | Intent intent = new Intent(context, MoteAPIService.class); intent.setAction(ACTION_GET_STATE); intent.putExtra(EXTRA_MOTE, mote); context.startService(intent); } | /**
* Starts the service to call the Mote API to get the current state. If
* the service is already performing a task this action will be queued.
*/ | Starts the service to call the Mote API to get the current state. If the service is already performing a task this action will be queued | startActionGetState | {
"repo_name": "EarthstormSoftware/controllerformote-android",
"path": "app/src/main/java/com/earthstormsoftware/motecontrol/api/MoteAPIService.java",
"license": "apache-2.0",
"size": 10421
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 99,408 |
public void sendMessageAsync(@NonNull final Node node, @Nullable final byte[] payload,
@Nullable String path, @Nullable final SendResultListener<MessageApi.SendMessageResult> listener); | void function(@NonNull final Node node, @Nullable final byte[] payload, @Nullable String path, @Nullable final SendResultListener<MessageApi.SendMessageResult> listener); | /**
* send message to specified device using AsyncTask
* if you want to call from UI thread
*
* @param node
* @param payload
* @param path if you don't distinguish messages, you can use default message api path
* @param listener
*/ | send message to specified device using AsyncTask if you want to call from UI thread | sendMessageAsync | {
"repo_name": "android-gems/OkWear",
"path": "library/okwear/src/main/java/jp/android/a/akira/library/okwear/MessageApiImpl.java",
"license": "apache-2.0",
"size": 3491
} | [
"android.support.annotation.NonNull",
"android.support.annotation.Nullable",
"com.google.android.gms.wearable.MessageApi",
"com.google.android.gms.wearable.Node",
"jp.android.a.akira.library.okwear.listener.SendResultListener"
] | import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.google.android.gms.wearable.MessageApi; import com.google.android.gms.wearable.Node; import jp.android.a.akira.library.okwear.listener.SendResultListener; | import android.support.annotation.*; import com.google.android.gms.wearable.*; import jp.android.a.akira.library.okwear.listener.*; | [
"android.support",
"com.google.android",
"jp.android.a"
] | android.support; com.google.android; jp.android.a; | 2,791,835 |
private static void writeInvokeAllResult(PortableRawWriterEx writer, Map<Object, EntryProcessorResult> results) {
if (results == null) {
writer.writeInt(-1);
return;
}
writer.writeInt(results.size());
for (Map.Entry<Object, EntryProcessorResult> entry : res... | static void function(PortableRawWriterEx writer, Map<Object, EntryProcessorResult> results) { if (results == null) { writer.writeInt(-1); return; } writer.writeInt(results.size()); for (Map.Entry<Object, EntryProcessorResult> entry : results.entrySet()) { writer.writeObjectDetached(entry.getKey()); EntryProcessorResult... | /**
* Writes the result of InvokeAll cache method.
*
* @param writer Writer.
* @param results Results.
*/ | Writes the result of InvokeAll cache method | writeInvokeAllResult | {
"repo_name": "agoncharuk/ignite",
"path": "modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java",
"license": "apache-2.0",
"size": 34191
} | [
"java.util.Map",
"javax.cache.processor.EntryProcessorResult",
"org.apache.ignite.internal.portable.PortableRawWriterEx"
] | import java.util.Map; import javax.cache.processor.EntryProcessorResult; import org.apache.ignite.internal.portable.PortableRawWriterEx; | import java.util.*; import javax.cache.processor.*; import org.apache.ignite.internal.portable.*; | [
"java.util",
"javax.cache",
"org.apache.ignite"
] | java.util; javax.cache; org.apache.ignite; | 1,329,505 |
public void setExtraAttributes(final org.apache.axiom.om.OMAttribute[] param) {
this.validateExtraAttributes(param);
this.localExtraAttributes = param;
}
| void function(final org.apache.axiom.om.OMAttribute[] param) { this.validateExtraAttributes(param); this.localExtraAttributes = param; } | /**
* Auto generated setter method
*
* @param param ExtraAttributes
*/ | Auto generated setter method | setExtraAttributes | {
"repo_name": "jefperito/nfe",
"path": "src/main/java/com/fincatto/documentofiscal/cte300/webservices/inutilizacao/CteInutilizacaoStub.java",
"license": "apache-2.0",
"size": 94109
} | [
"org.apache.axiom.om.OMAttribute"
] | import org.apache.axiom.om.OMAttribute; | import org.apache.axiom.om.*; | [
"org.apache.axiom"
] | org.apache.axiom; | 2,744,535 |
public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
return EnumActionResult.PASS;
} | EnumActionResult function(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { return EnumActionResult.PASS; } | /**
* Called when a Block is right-clicked with this Item
*/ | Called when a Block is right-clicked with this Item | onItemUse | {
"repo_name": "SuperUnitato/UnLonely",
"path": "build/tmp/recompileMc/sources/net/minecraft/item/Item.java",
"license": "lgpl-2.1",
"size": 86763
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.util.EnumActionResult",
"net.minecraft.util.EnumFacing",
"net.minecraft.util.EnumHand",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import net.minecraft.entity.player.*; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.entity",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.entity; net.minecraft.util; net.minecraft.world; | 610,842 |
@Nullable
public List<Item> getItems() {
return mItems;
} | List<Item> function() { return mItems; } | /**
* Returns the current data set of this adapter.
*
* @return Data set of this adapter or {@code null} if there is no data set presented within
* this adapter.
*/ | Returns the current data set of this adapter | getItems | {
"repo_name": "android-libraries/android_ui",
"path": "library/src/widget/adapter/java/com/albedinsky/android/ui/widget/adapter/SimpleRecyclerAdapter.java",
"license": "apache-2.0",
"size": 5918
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,379,692 |
public static List<Org> lookupAllOrgs() {
Map<String, Object> params = new HashMap<String, Object>();
return singleton.listObjectsByNamedQuery(
"Org.findAll", params);
} | static List<Org> function() { Map<String, Object> params = new HashMap<String, Object>(); return singleton.listObjectsByNamedQuery( STR, params); } | /**
* Lookup all orgs on the satellite.
* @return List of orgs.
*/ | Lookup all orgs on the satellite | lookupAllOrgs | {
"repo_name": "colloquium/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/org/OrgFactory.java",
"license": "gpl-2.0",
"size": 16684
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.util.HashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,951,836 |
public static Client connectToServer( String gameName, int version,
String host, int hostPort ) throws IOException
{
return connectToServer( gameName, version, host, hostPort, hostPort );
} | static Client function( String gameName, int version, String host, int hostPort ) throws IOException { return connectToServer( gameName, version, host, hostPort, hostPort ); } | /**
* Creates a Client that communicates with the specified host and port
* using both reliable and fast transports.
*/ | Creates a Client that communicates with the specified host and port using both reliable and fast transports | connectToServer | {
"repo_name": "chototsu/MikuMikuStudio",
"path": "engine/src/networking/com/jme3/network/Network.java",
"license": "bsd-2-clause",
"size": 8448
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,931,919 |
public void restoreLastFocus() {
if (mAdapter.getItemCount() == 0) {
// Nothing to focus.
return;
}
if (mLastFocusPosition != RecyclerView.NO_POSITION) {
// The system takes care of situations when a view is no longer on screen, etc,
focusItem... | void function() { if (mAdapter.getItemCount() == 0) { return; } if (mLastFocusPosition != RecyclerView.NO_POSITION) { focusItem(mLastFocusPosition); } else { focusItem(mLayout.findFirstVisibleItemPosition()); } } | /**
* Requests focus on the item that last had focus. Scrolls to that item if necessary.
*/ | Requests focus on the item that last had focus. Scrolls to that item if necessary | restoreLastFocus | {
"repo_name": "xorware/android_frameworks_base",
"path": "packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java",
"license": "apache-2.0",
"size": 22407
} | [
"android.support.v7.widget.RecyclerView"
] | import android.support.v7.widget.RecyclerView; | import android.support.v7.widget.*; | [
"android.support"
] | android.support; | 501,432 |
private boolean _decompose() {
double h[] = QH.data;
for( int k = 0; k < N-2; k++ ) {
// find the largest value in this column
// this is used to normalize the column and mitigate overflow/underflow
double max = 0;
for( int i = k+1; i < N; i++ ) {
... | boolean function() { double h[] = QH.data; for( int k = 0; k < N-2; k++ ) { double max = 0; for( int i = k+1; i < N; i++ ) { double val = u[i] = h[i*N+k]; val = Math.abs(val); if( val > max ) max = val; } if( max > 0 ) { double tau = 0; for( int i = k+1; i < N; i++ ) { double val = u[i] /= max; tau += val*val; } tau = ... | /**
* Internal function for computing the decomposition.
*/ | Internal function for computing the decomposition | _decompose | {
"repo_name": "sizuest/EMod",
"path": "ch.ethz.inspire.emod/ejml-v0.26-src/main/core/src/org/ejml/alg/dense/decomposition/hessenberg/HessenbergSimilarDecomposition_D64.java",
"license": "gpl-3.0",
"size": 7565
} | [
"org.ejml.alg.dense.decomposition.qr.QrHelperFunctions"
] | import org.ejml.alg.dense.decomposition.qr.QrHelperFunctions; | import org.ejml.alg.dense.decomposition.qr.*; | [
"org.ejml.alg"
] | org.ejml.alg; | 1,684,356 |
public void doTestEntityExpiration() throws Exception {
IDeviceListener mockListener =
createStrictMock(IDeviceListener.class);
mockListener.deviceIPV4AddrChanged(isA(IDevice.class));
ITopologyService mockTopology = createMock(ITopologyService.class);
expect(mockTopo... | void function() throws Exception { IDeviceListener mockListener = createStrictMock(IDeviceListener.class); mockListener.deviceIPV4AddrChanged(isA(IDevice.class)); ITopologyService mockTopology = createMock(ITopologyService.class); expect(mockTopology.isAttachmentPointPort(anyLong(), anyShort())). andReturn(true).anyTim... | /**
* Note: Entity expiration does not result in device moved notification.
* @throws Exception
*/ | Note: Entity expiration does not result in device moved notification | doTestEntityExpiration | {
"repo_name": "yeasy/floodlight-lc",
"path": "src/test/java/net/floodlightcontroller/devicemanager/internal/DeviceManagerImplTest.java",
"license": "apache-2.0",
"size": 88102
} | [
"java.util.Calendar",
"java.util.Date",
"java.util.Iterator",
"net.floodlightcontroller.devicemanager.IDevice",
"net.floodlightcontroller.devicemanager.IDeviceListener",
"net.floodlightcontroller.devicemanager.SwitchPort",
"net.floodlightcontroller.topology.ITopologyService",
"org.easymock.EasyMock",
... | import java.util.Calendar; import java.util.Date; import java.util.Iterator; import net.floodlightcontroller.devicemanager.IDevice; import net.floodlightcontroller.devicemanager.IDeviceListener; import net.floodlightcontroller.devicemanager.SwitchPort; import net.floodlightcontroller.topology.ITopologyService; import o... | import java.util.*; import net.floodlightcontroller.devicemanager.*; import net.floodlightcontroller.topology.*; import org.easymock.*; import org.junit.*; | [
"java.util",
"net.floodlightcontroller.devicemanager",
"net.floodlightcontroller.topology",
"org.easymock",
"org.junit"
] | java.util; net.floodlightcontroller.devicemanager; net.floodlightcontroller.topology; org.easymock; org.junit; | 1,697,695 |
public Date getStart() {
return new Date(getFirstMillisecond());
} | Date function() { return new Date(getFirstMillisecond()); } | /**
* Returns the date/time that marks the start of the time period.
*
* @return The start date/time.
*/ | Returns the date/time that marks the start of the time period | getStart | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart0921/source/org/jfree/data/time/RegularTimePeriod.java",
"license": "lgpl-3.0",
"size": 7579
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,760,588 |
public void setIcon(Drawable icon) {
if ((icon == null && mIcon != null) || (icon != null && mIcon != icon)) {
mIcon = icon;
notifyChanged();
}
} | void function(Drawable icon) { if ((icon == null && mIcon != null) (icon != null && mIcon != icon)) { mIcon = icon; notifyChanged(); } } | /**
* Sets the icon for this Preference with a Drawable.
* This icon will be placed into the ID
* {@link android.R.id#icon} within the View created by
* {@link #onCreateView(ViewGroup)}.
*
* @param icon The optional icon for this Preference.
*/ | Sets the icon for this Preference with a Drawable. This icon will be placed into the ID <code>android.R.id#icon</code> within the View created by <code>#onCreateView(ViewGroup)</code> | setIcon | {
"repo_name": "xorware/android_frameworks_base",
"path": "core/java/android/preference/Preference.java",
"license": "apache-2.0",
"size": 67104
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 2,378,894 |
private JSONObject getDataFromResponse(JSONObject response)
throws SapiException {
try {
JSONObject data = response.getJSONObject(JSON_OBJECT_DATA);
return data;
} catch (JSONException e) {
Log.debug(TAG_LOG, "Sapi response doesn't contain data object");
... | JSONObject function(JSONObject response) throws SapiException { try { JSONObject data = response.getJSONObject(JSON_OBJECT_DATA); return data; } catch (JSONException e) { Log.debug(TAG_LOG, STR); throw SapiException.SAPI_EXCEPTION_UNKNOWN; } } | /**
* Extracts data part from a SAPI response. If data is no present, a
* {@link SapiException} is thrown
* @param response
* @return
* @throws SapiException
*/ | Extracts data part from a SAPI response. If data is no present, a <code>SapiException</code> is thrown | getDataFromResponse | {
"repo_name": "zhangdakun/funasyn",
"path": "externals/java-sdk/sapisync/src/main/java/com/funambol/sapisync/SapiSyncHandler.java",
"license": "agpl-3.0",
"size": 42409
} | [
"com.funambol.org.json.me.JSONException",
"com.funambol.org.json.me.JSONObject",
"com.funambol.util.Log"
] | import com.funambol.org.json.me.JSONException; import com.funambol.org.json.me.JSONObject; import com.funambol.util.Log; | import com.funambol.org.json.me.*; import com.funambol.util.*; | [
"com.funambol.org",
"com.funambol.util"
] | com.funambol.org; com.funambol.util; | 2,021,907 |
public static DataResult inProgressSystems(User user,
Action action,
PageControl pc) {
return getActionSystems(user, action, pc, "systems_in_progress_action");
} | static DataResult function(User user, Action action, PageControl pc) { return getActionSystems(user, action, pc, STR); } | /**
* Retrieves the systems that are in the process of completing
* a given action
* @param user The user in question.
* @param action The Action.
* @param pc The PageControl.
* @return Returns list containing the completed systems.
*/ | Retrieves the systems that are in the process of completing a given action | inProgressSystems | {
"repo_name": "ogajduse/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/action/ActionManager.java",
"license": "gpl-2.0",
"size": 71516
} | [
"com.redhat.rhn.common.db.datasource.DataResult",
"com.redhat.rhn.domain.action.Action",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.frontend.listview.PageControl"
] | import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.domain.action.Action; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.listview.PageControl; | import com.redhat.rhn.common.db.datasource.*; import com.redhat.rhn.domain.action.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.listview.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 1,822,294 |
@Override
public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
super.tightMarshal2(wireFormat, o, dataOut, bs);
} | void function(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, 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": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireObjectMessageMarshaller.java",
"license": "apache-2.0",
"size": 3575
} | [
"java.io.DataOutput",
"java.io.IOException",
"org.apache.activemq.openwire.codec.BooleanStream",
"org.apache.activemq.openwire.codec.OpenWireFormat"
] | import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat; | import java.io.*; import org.apache.activemq.openwire.codec.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 630,016 |
public void fullscreen() {
// If it is in fullscreen
if (isFullscreen) {
// Setting the size to the saved size if it isn't null, if it is
// setting the size to 1000x600
this.setSize(savedSize != null ? savedSize : new Dimension(1000,
600));
// Resizing the components using the new virtual desk... | void function() { if (isFullscreen) { this.setSize(savedSize != null ? savedSize : new Dimension(1000, 600)); this.resize(); isFullscreen = false; } else { this.savedSize = this.getSize(); this.setSize(Toolkit.getDefaultToolkit().getScreenSize()); this.resize(); isFullscreen = true; } } | /**
* Sets the virtual desktop fullscreen or not
*/ | Sets the virtual desktop fullscreen or not | fullscreen | {
"repo_name": "TheShark34/Feelcraft",
"path": "src/main/java/fr/theshark34/feelcraft/VirtualDesktop.java",
"license": "apache-2.0",
"size": 5281
} | [
"java.awt.Dimension",
"java.awt.Toolkit"
] | import java.awt.Dimension; import java.awt.Toolkit; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,264,600 |
protected static void cleanCollectionGroup(CollectionGroup collectionGroup, ViewIndex viewIndex) {
collectionGroup.setAddLineLabel(null);
if (collectionGroup.getAddLineItems() != null) {
for (Component item : collectionGroup.getAddLineItems()) {
cleanComponent(item,... | static void function(CollectionGroup collectionGroup, ViewIndex viewIndex) { collectionGroup.setAddLineLabel(null); if (collectionGroup.getAddLineItems() != null) { for (Component item : collectionGroup.getAddLineItems()) { cleanComponent(item, viewIndex); } } collectionGroup.setAddLineActions(null); collectionGroup.se... | /**
* Cleans a collection group instance removing the items and collection prototypes (note add line fields
* are keep around to support the add line action)
*
* @param collectionGroup collection group instance to clean
*/ | Cleans a collection group instance removing the items and collection prototypes (note add line fields are keep around to support the add line action) | cleanCollectionGroup | {
"repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/util/ViewCleaner.java",
"license": "apache-2.0",
"size": 12628
} | [
"org.kuali.rice.krad.uif.component.Component",
"org.kuali.rice.krad.uif.container.CollectionGroup",
"org.kuali.rice.krad.uif.layout.StackedLayoutManager",
"org.kuali.rice.krad.uif.layout.TableLayoutManager",
"org.kuali.rice.krad.uif.view.ViewIndex"
] | import org.kuali.rice.krad.uif.component.Component; import org.kuali.rice.krad.uif.container.CollectionGroup; import org.kuali.rice.krad.uif.layout.StackedLayoutManager; import org.kuali.rice.krad.uif.layout.TableLayoutManager; import org.kuali.rice.krad.uif.view.ViewIndex; | import org.kuali.rice.krad.uif.component.*; import org.kuali.rice.krad.uif.container.*; import org.kuali.rice.krad.uif.layout.*; import org.kuali.rice.krad.uif.view.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 624,336 |
List<T> getAll(); | List<T> getAll(); | /**
* Gets all {@code T} objects from store.
* @return all {@code T} objects from store.
*/ | Gets all T objects from store | getAll | {
"repo_name": "Chrams/openfleet",
"path": "src/main/java/com/markbudai/openfleet/dao/repositories/Repository.java",
"license": "apache-2.0",
"size": 792
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 204,834 |
@EventHandler(ignoreCancelled = false)
private void onEntity(PlayerInteractEntityEvent event) {
if (event.getRightClicked() instanceof org.bukkit.entity.ItemFrame) {
ItemStack item;
if (ServerUtils.hasSpecificUpdate("1_9")) { item = PlayerHandler.getPerfectHandItem(event.getPlayer(), event.getHand().name()); ... | @EventHandler(ignoreCancelled = false) void function(PlayerInteractEntityEvent event) { if (event.getRightClicked() instanceof org.bukkit.entity.ItemFrame) { ItemStack item; if (ServerUtils.hasSpecificUpdate("1_9")) { item = PlayerHandler.getPerfectHandItem(event.getPlayer(), event.getHand().name()); } else { item = Pl... | /**
* Runs the commands upon right or left clicking the custom item on an entity.
*
* @param event - PlayerInteractEntityEvent
*/ | Runs the commands upon right or left clicking the custom item on an entity | onEntity | {
"repo_name": "RockinChaos/ItemJoin",
"path": "src/me/RockinChaos/itemjoin/listeners/Commands.java",
"license": "lgpl-3.0",
"size": 22325
} | [
"org.bukkit.event.EventHandler",
"org.bukkit.event.player.PlayerInteractEntityEvent",
"org.bukkit.inventory.ItemStack"
] | import org.bukkit.event.EventHandler; import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.inventory.ItemStack; | import org.bukkit.event.*; import org.bukkit.event.player.*; import org.bukkit.inventory.*; | [
"org.bukkit.event",
"org.bukkit.inventory"
] | org.bukkit.event; org.bukkit.inventory; | 1,650,016 |
private void retrieveBundleFromControlServer(BundleDescriptor descriptor)
throws ServiceNotFoundException {
// get the name of the bundle on the controlserver
// find the file on the controlserver
GridFSDBFile dbfile = this.bundle_files.findOne(descriptor
.getDescriptor());
// check the existence
if... | void function(BundleDescriptor descriptor) throws ServiceNotFoundException { GridFSDBFile dbfile = this.bundle_files.findOne(descriptor .getDescriptor()); if (dbfile == null) { throw new ServiceNotFoundException(String.format( STR%s\STR, descriptor)); } File localBundleFile = new File(Config.getInstance() .getBundleCac... | /**
* Look a bundle up on the controlserver and transfer it into the cache.
*
* @param descriptor
* the descriptor of the bundle to load
* @throws ServiceNotFoundException
* if there is no such bundle on the controlserver
*/ | Look a bundle up on the controlserver and transfer it into the cache | retrieveBundleFromControlServer | {
"repo_name": "saep/MONET",
"path": "worker/src/main/java/com/github/monet/worker/ServiceDirectory.java",
"license": "agpl-3.0",
"size": 16457
} | [
"com.github.monet.common.BundleDescriptor",
"com.github.monet.common.Config",
"com.mongodb.gridfs.GridFSDBFile",
"java.io.File",
"java.io.IOException"
] | import com.github.monet.common.BundleDescriptor; import com.github.monet.common.Config; import com.mongodb.gridfs.GridFSDBFile; import java.io.File; import java.io.IOException; | import com.github.monet.common.*; import com.mongodb.gridfs.*; import java.io.*; | [
"com.github.monet",
"com.mongodb.gridfs",
"java.io"
] | com.github.monet; com.mongodb.gridfs; java.io; | 2,210,144 |
@Operand(symbol = "-")
public static double[][] sub(final double[][] a, final double[][] b) {
dimensionCheck(a, b);
final int n = a.length;
final double[][] c = new double[n][];
for (int i = 0; i < n; c[i] = sub(a[i], b[i]), i++) ;
return c;
} | @Operand(symbol = "-") static double[][] function(final double[][] a, final double[][] b) { dimensionCheck(a, b); final int n = a.length; final double[][] c = new double[n][]; for (int i = 0; i < n; c[i] = sub(a[i], b[i]), i++) ; return c; } | /**
* Subtraction of matrix B from matrix A.
*
* @param a double[][] the 1.st matrix
* @param b double[][] the 2.nd matrix
* @return double[][] C=A-B;
*/ | Subtraction of matrix B from matrix A | sub | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-external/src/main/java/de/lab4inf/math/lapack/LinearAlgebra.java",
"license": "gpl-3.0",
"size": 103733
} | [
"de.lab4inf.math.Operand"
] | import de.lab4inf.math.Operand; | import de.lab4inf.math.*; | [
"de.lab4inf.math"
] | de.lab4inf.math; | 23,536 |
public void setNwkPdpDeactRetryN3395Value(String nwkPdpDeactRetryN3395Value)
throws JNCException {
setNwkPdpDeactRetryN3395Value(new YangUInt8(nwkPdpDeactRetryN3395Value));
} | void function(String nwkPdpDeactRetryN3395Value) throws JNCException { setNwkPdpDeactRetryN3395Value(new YangUInt8(nwkPdpDeactRetryN3395Value)); } | /**
* Sets the value for child leaf "nwk-pdp-deact-retry-n3395",
* using a String value.
* @param nwkPdpDeactRetryN3395Value used during instantiation.
*/ | Sets the value for child leaf "nwk-pdp-deact-retry-n3395", using a String value | setNwkPdpDeactRetryN3395Value | {
"repo_name": "jnpr-shinma/yangfile",
"path": "hitel/src/hctaEpc/mmeSgsn/interface_/nas/MmeNasSgsnSm.java",
"license": "apache-2.0",
"size": 38827
} | [
"com.tailf.jnc.YangUInt8"
] | import com.tailf.jnc.YangUInt8; | import com.tailf.jnc.*; | [
"com.tailf.jnc"
] | com.tailf.jnc; | 562,138 |
public void genGSPN() throws IOException {
File targetFolder = new File(Preferences.getSavingDir() + "tmp/");
GenerateGspn gspn = new GenerateGspn(((PetriNetDoc) result.getModel().get(0)).getNets().get(0), targetFolder,
new ArrayList<EObject>());
gspn.doGenerate(new BasicMonitor());
System.out.println("G... | void function() throws IOException { File targetFolder = new File(Preferences.getSavingDir() + "tmp/"); GenerateGspn gspn = new GenerateGspn(((PetriNetDoc) result.getModel().get(0)).getNets().get(0), targetFolder, new ArrayList<EObject>()); gspn.doGenerate(new BasicMonitor()); System.out.println(STR); } | /**
* Creates GSPN model (.net and .def files) in the given directory.
*
* @throws IOException
*/ | Creates GSPN model (.net and .def files) in the given directory | genGSPN | {
"repo_name": "MarcoIeni/diceH2020-space4cloud-plugin",
"path": "bundles/D-SPACE4Cloud-plugin/src/it/polimi/diceH2020/plugin/control/DICEWrap.java",
"license": "apache-2.0",
"size": 14000
} | [
"es.unizar.disco.pnml.m2t.templates.gspn.GenerateGspn",
"fr.lip6.move.pnml.ptnet.PetriNetDoc",
"it.polimi.diceH2020.plugin.preferences.Preferences",
"java.io.File",
"java.io.IOException",
"java.util.ArrayList",
"org.eclipse.emf.common.util.BasicMonitor",
"org.eclipse.emf.ecore.EObject"
] | import es.unizar.disco.pnml.m2t.templates.gspn.GenerateGspn; import fr.lip6.move.pnml.ptnet.PetriNetDoc; import it.polimi.diceH2020.plugin.preferences.Preferences; import java.io.File; import java.io.IOException; import java.util.ArrayList; import org.eclipse.emf.common.util.BasicMonitor; import org.eclipse.emf.ecore.E... | import es.unizar.disco.pnml.m2t.templates.gspn.*; import fr.lip6.move.pnml.ptnet.*; import it.polimi.*; import java.io.*; import java.util.*; import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.*; | [
"es.unizar.disco",
"fr.lip6.move",
"it.polimi",
"java.io",
"java.util",
"org.eclipse.emf"
] | es.unizar.disco; fr.lip6.move; it.polimi; java.io; java.util; org.eclipse.emf; | 2,055,180 |
@Test
public void shouldReturnMaxAngle() throws JsonProcessingException, IOException {
ObjectMapper mapper = new ObjectMapper();
JsonNode testInput = mapper.readTree("28799");
BigDecimal expectedValue = BigDecimal.valueOf(359.9875);
BigDecimal actualValue = AngleBuilder.genericAngle(tes... | void function() throws JsonProcessingException, IOException { ObjectMapper mapper = new ObjectMapper(); JsonNode testInput = mapper.readTree("28799"); BigDecimal expectedValue = BigDecimal.valueOf(359.9875); BigDecimal actualValue = AngleBuilder.genericAngle(testInput); assertEquals(expectedValue, actualValue); } | /**
* Tests that the max input angle (28799) returns the max decimal value
* (359.9875)
*
* @throws IOException
* @throws JsonProcessingException
*/ | Tests that the max input angle (28799) returns the max decimal value (359.9875) | shouldReturnMaxAngle | {
"repo_name": "hmusavi/jpo-ode",
"path": "jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/AngleBuilderTest.java",
"license": "apache-2.0",
"size": 5270
} | [
"com.fasterxml.jackson.core.JsonProcessingException",
"com.fasterxml.jackson.databind.JsonNode",
"com.fasterxml.jackson.databind.ObjectMapper",
"java.io.IOException",
"java.math.BigDecimal",
"org.junit.Assert"
] | import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.math.BigDecimal; import org.junit.Assert; | import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import java.io.*; import java.math.*; import org.junit.*; | [
"com.fasterxml.jackson",
"java.io",
"java.math",
"org.junit"
] | com.fasterxml.jackson; java.io; java.math; org.junit; | 437,941 |
public void assertDoesNotContain(AssertionInfo info, byte[] actual, byte[] values) {
arrays.assertDoesNotContain(info, failures, actual, values);
} | void function(AssertionInfo info, byte[] actual, byte[] values) { arrays.assertDoesNotContain(info, failures, actual, values); } | /**
* Asserts that the given array does not contain the given values.
* @param info contains information about the assertion.
* @param actual the given array.
* @param values the values that are expected not to be in the given array.
* @throws NullPointerException if the array of values is {@code null}.
... | Asserts that the given array does not contain the given values | assertDoesNotContain | {
"repo_name": "mdecourci/assertj-core",
"path": "src/main/java/org/assertj/core/internal/ByteArrays.java",
"license": "apache-2.0",
"size": 13578
} | [
"org.assertj.core.api.AssertionInfo"
] | import org.assertj.core.api.AssertionInfo; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 1,003,897 |
@Test
public void testAddInputDataNormalizeSchema() throws Exception {
TestSpout t = new TestSpout(1);
t.addInputData(Utils.DEFAULT_STREAM_ID, testData);
SortedMap<String, Object> otherData = new TreeMap<>(testData);
otherData.put("col_x", "the_x_factor");
t.addInputData(... | void function() throws Exception { TestSpout t = new TestSpout(1); t.addInputData(Utils.DEFAULT_STREAM_ID, testData); SortedMap<String, Object> otherData = new TreeMap<>(testData); otherData.put("col_x", STR); t.addInputData(Utils.DEFAULT_STREAM_ID, otherData); List<SortedMap<String, Object>> placedData = t.getInputDat... | /**
* Assert that input data of varying schemae are normalized to a merged
* schema.
*
* @throws Exception Should not be thrown.
*/ | Assert that input data of varying schemae are normalized to a merged schema | testAddInputDataNormalizeSchema | {
"repo_name": "krotscheck/storm-toolkit",
"path": "storm-toolkit-test/src/test/java/net/krotscheck/stk/test/topology/TestSpoutTest.java",
"license": "apache-2.0",
"size": 17116
} | [
"java.util.List",
"java.util.SortedMap",
"java.util.TreeMap",
"org.junit.Assert"
] | import java.util.List; import java.util.SortedMap; import java.util.TreeMap; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 51,877 |
@Override
public void deviceChanged(final IDevice device, int changeMask) {
boolean expand = false;
synchronized (mDevicesToExpand) {
int index = mDevicesToExpand.indexOf(device);
if (device.hasClients() && index != -1) {
mDevicesToExpand.remove(index);
... | void function(final IDevice device, int changeMask) { boolean expand = false; synchronized (mDevicesToExpand) { int index = mDevicesToExpand.indexOf(device); if (device.hasClients() && index != -1) { mDevicesToExpand.remove(index); expand = true; } } final boolean finalExpand = expand; | /**
* Sent when a device data changed, or when clients are started/terminated on the device.
* <p/>
* This is sent from a non UI thread.
* @param device the device that was updated.
* @param changeMask the mask indicating what changed.
*
* @see IDeviceChangeListener#deviceChanged(IDev... | Sent when a device data changed, or when clients are started/terminated on the device. This is sent from a non UI thread | deviceChanged | {
"repo_name": "lrscp/ControlAndroidDeviceFromPC",
"path": "src/com/android/ddmuilib/DevicePanel.java",
"license": "apache-2.0",
"size": 31240
} | [
"com.android.ddmlib.IDevice"
] | import com.android.ddmlib.IDevice; | import com.android.ddmlib.*; | [
"com.android.ddmlib"
] | com.android.ddmlib; | 1,660,315 |
@Test(expectedExceptions = IllegalStateException.class)
public void testIndexIsSet() {
VanillaOisGenerator.builder()
.withBusinessDayConvention(BDC)
.withCalendar(CALENDAR)
.withEndOfMonth(EOM)
.withPaymentLag(PAYMENT_LAG)
.withPaymentTenor(PAYMENT_TENOR)
.withSpotLag(SPOT_LAG)
.with... | @Test(expectedExceptions = IllegalStateException.class) void function() { VanillaOisGenerator.builder() .withBusinessDayConvention(BDC) .withCalendar(CALENDAR) .withEndOfMonth(EOM) .withPaymentLag(PAYMENT_LAG) .withPaymentTenor(PAYMENT_TENOR) .withSpotLag(SPOT_LAG) .withStubType(STUB_TYPE) .build(); } | /**
* Tests that the index must be set.
*/ | Tests that the index must be set | testIndexIsSet | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/test/java/com/mcleodmoores/analytics/financial/generator/interestrate/VanillaOisGeneratorTest.java",
"license": "apache-2.0",
"size": 17799
} | [
"com.mcleodmoores.analytics.financial.generator.interestrate.VanillaOisGenerator",
"org.testng.annotations.Test"
] | import com.mcleodmoores.analytics.financial.generator.interestrate.VanillaOisGenerator; import org.testng.annotations.Test; | import com.mcleodmoores.analytics.financial.generator.interestrate.*; import org.testng.annotations.*; | [
"com.mcleodmoores.analytics",
"org.testng.annotations"
] | com.mcleodmoores.analytics; org.testng.annotations; | 1,904,562 |
private String dumpPartitionStates() {
SB sb = new SB();
for (int p = 0; p < locParts.length(); p++) {
GridDhtLocalPartition part = locParts.get(p);
if (part == null)
continue;
sb.a("Part [");
sb.a("id=" + part.id() + ", ");
... | String function() { SB sb = new SB(); for (int p = 0; p < locParts.length(); p++) { GridDhtLocalPartition part = locParts.get(p); if (part == null) continue; sb.a(STR); sb.a("id=" + part.id() + STR); sb.a(STR + part.state() + STR); sb.a(STR + part.initialUpdateCounter() + STR); sb.a(STR + part.updateCounter() + STR); s... | /**
* Collects states of local partitions.
*
* @return String representation of all local partition states.
*/ | Collects states of local partitions | dumpPartitionStates | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java",
"license": "apache-2.0",
"size": 122418
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,107,075 |
protected void streamImage(Color bg, String xml, String format,
OutputStream stream) throws ParserConfigurationException,
SAXException, IOException
{
try
{
mxGraphViewImageReader reader = new mxGraphViewImageReader(bg, 4,
true, true);
InputSource inputSource = new InputSource(new StringReader(x... | void function(Color bg, String xml, String format, OutputStream stream) throws ParserConfigurationException, SAXException, IOException { try { mxGraphViewImageReader reader = new mxGraphViewImageReader(bg, 4, true, true); InputSource inputSource = new InputSource(new StringReader(xml)); BufferedImage image = mxGraphVie... | /**
* Streams the given XML string as a PNG image into the given stream.
*
* @param xml
* @param stream
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
*/ | Streams the given XML string as a PNG image into the given stream | streamImage | {
"repo_name": "tsxuehu/jgraphlearn",
"path": "java/examples/com/mxgraph/examples/web/ServerView.java",
"license": "apache-2.0",
"size": 3925
} | [
"com.mxgraph.reader.mxGraphViewImageReader",
"java.awt.Color",
"java.awt.image.BufferedImage",
"java.io.IOException",
"java.io.OutputStream",
"java.io.StringReader",
"javax.imageio.ImageIO",
"javax.xml.parsers.ParserConfigurationException",
"org.xml.sax.InputSource",
"org.xml.sax.SAXException"
] | import com.mxgraph.reader.mxGraphViewImageReader; import java.awt.Color; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; import java.io.StringReader; import javax.imageio.ImageIO; import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.InputSource; import ... | import com.mxgraph.reader.*; import java.awt.*; import java.awt.image.*; import java.io.*; import javax.imageio.*; import javax.xml.parsers.*; import org.xml.sax.*; | [
"com.mxgraph.reader",
"java.awt",
"java.io",
"javax.imageio",
"javax.xml",
"org.xml.sax"
] | com.mxgraph.reader; java.awt; java.io; javax.imageio; javax.xml; org.xml.sax; | 396,970 |
void doReps(ObjectOutputStream oout, ObjectInputStream oin,
StreamBuffer sbuf, int nbatches, int ncycles)
throws Exception
{
for (int i = 0; i < nbatches; i++) {
sbuf.reset();
for (int j = 0; j < ncycles; j++) {
oout.writeShort(0);
... | void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, int nbatches, int ncycles) throws Exception { for (int i = 0; i < nbatches; i++) { sbuf.reset(); for (int j = 0; j < ncycles; j++) { oout.writeShort(0); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readShort(); } } } | /**
* Run benchmark for given number of batches, with given number of cycles
* for each batch.
*/ | Run benchmark for given number of batches, with given number of cycles for each batch | doReps | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/test/java/rmi/reliability/benchmark/bench/serial/Shorts.java",
"license": "gpl-2.0",
"size": 2802
} | [
"java.io.ObjectInputStream",
"java.io.ObjectOutputStream"
] | import java.io.ObjectInputStream; import java.io.ObjectOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 969,499 |
protected PageControl getNewPageControl(RequestContext rctx) {
if (rctx.isRequestedExport()) {
return null;
}
PageControl pc = new PageControl();
pc.setPageSize(rctx.getCurrentUser().getPageSize());
return pc;
} | PageControl function(RequestContext rctx) { if (rctx.isRequestedExport()) { return null; } PageControl pc = new PageControl(); pc.setPageSize(rctx.getCurrentUser().getPageSize()); return pc; } | /**
* Method to get a new instance of a page control.
* @param rctx RequestContext for this request
* @return a PageControl if one is necessary
*/ | Method to get a new instance of a page control | getNewPageControl | {
"repo_name": "dmacvicar/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/struts/BaseListAction.java",
"license": "gpl-2.0",
"size": 5079
} | [
"com.redhat.rhn.frontend.listview.PageControl"
] | import com.redhat.rhn.frontend.listview.PageControl; | import com.redhat.rhn.frontend.listview.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 1,120,193 |
@Override // DataNodeMXBean
public String getVolumeInfo() {
final Map<String, Object> info = new HashMap<String, Object>();
Collection<VolumeInfo> volumes = ((FSDataset)this.data).getVolumeInfo();
for (VolumeInfo v : volumes) {
final Map<String, Object> innerInfo = new HashMap<String, Object>();
... | @Override String function() { final Map<String, Object> info = new HashMap<String, Object>(); Collection<VolumeInfo> volumes = ((FSDataset)this.data).getVolumeInfo(); for (VolumeInfo v : volumes) { final Map<String, Object> innerInfo = new HashMap<String, Object>(); innerInfo.put(STR, v.usedSpace); innerInfo.put(STR, v... | /**
* Returned information is a JSON representation of a map with
* volume name as the key and value is a map of volume attribute
* keys to its values
*/ | Returned information is a JSON representation of a map with volume name as the key and value is a map of volume attribute keys to its values | getVolumeInfo | {
"repo_name": "YuMatsuzawa/HadoopEclipseProject",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java",
"license": "apache-2.0",
"size": 85752
} | [
"java.util.Collection",
"java.util.HashMap",
"java.util.Map",
"org.apache.hadoop.hdfs.server.datanode.FSDataset",
"org.mortbay.util.ajax.JSON"
] | import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.apache.hadoop.hdfs.server.datanode.FSDataset; import org.mortbay.util.ajax.JSON; | import java.util.*; import org.apache.hadoop.hdfs.server.datanode.*; import org.mortbay.util.ajax.*; | [
"java.util",
"org.apache.hadoop",
"org.mortbay.util"
] | java.util; org.apache.hadoop; org.mortbay.util; | 415,132 |
private static String getDateTimeStamp() {
Date dateNow = Calendar.getInstance().getTime();
return (DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Locale.ENGLISH).format(dateNow));
} | static String function() { Date dateNow = Calendar.getInstance().getTime(); return (DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Locale.ENGLISH).format(dateNow)); } | /**
* Gets a stamp containing the current date and time to write to the log.
*
* @return The stamp for the current date and time.
*/ | Gets a stamp containing the current date and time to write to the log | getDateTimeStamp | {
"repo_name": "WycliffeAssociates/translationRecorder",
"path": "translationRecorder/com.door43.tools.reporting/src/main/java/com/door43/tools/reporting/Logger.java",
"license": "mit",
"size": 13241
} | [
"java.text.DateFormat",
"java.util.Calendar",
"java.util.Date",
"java.util.Locale"
] | import java.text.DateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 966,684 |
public static boolean uint64GetChoice(final DirectBuffer buffer,
final int index,
final int bitIndex,
final ByteOrder byteOrder)
{
return 0 != (buffer.getLong(index, byteOrder) &... | static boolean function(final DirectBuffer buffer, final int index, final int bitIndex, final ByteOrder byteOrder) { return 0 != (buffer.getLong(index, byteOrder) & (1L << bitIndex)); } | /**
* Is a bit set at a given index.
*
* @param buffer to read from.
* @param index of the beginning byte
* @param bitIndex bit index to read
* @param byteOrder for the buffer encoding
* @return true if the bit is set otherwise false.
*/ | Is a bit set at a given index | uint64GetChoice | {
"repo_name": "AdaptiveConsulting/simple-binary-encoding",
"path": "main/java/uk/co/real_logic/sbe/codec/java/CodecUtil.java",
"license": "apache-2.0",
"size": 20441
} | [
"java.nio.ByteOrder"
] | import java.nio.ByteOrder; | import java.nio.*; | [
"java.nio"
] | java.nio; | 170,967 |
private PointerFactory getFactory(String cls) {
String[] components = cls.split("\\.");
List<String> c = new ArrayList<String>();
c.add("");
c.addAll(Arrays.asList(components));
return doGetFactory(c);
} | PointerFactory function(String cls) { String[] components = cls.split("\\."); List<String> c = new ArrayList<String>(); c.add(""); c.addAll(Arrays.asList(components)); return doGetFactory(c); } | /**
* Returns factory for the class
*
* @param cls
* fully qualified class name
* @return
*/ | Returns factory for the class | getFactory | {
"repo_name": "Enerccio/SimplePython",
"path": "src/me/enerccio/sp/runtime/PythonRuntime.java",
"license": "lgpl-3.0",
"size": 53410
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"me.enerccio.sp.types.pointer.PointerFactory"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import me.enerccio.sp.types.pointer.PointerFactory; | import java.util.*; import me.enerccio.sp.types.pointer.*; | [
"java.util",
"me.enerccio.sp"
] | java.util; me.enerccio.sp; | 2,330,079 |
@Override
protected void p_serializeToBuffer(ByteBuffer b) {
assert (m_sqlState.length == 5);
b.put(m_sqlState);
} | void function(ByteBuffer b) { assert (m_sqlState.length == 5); b.put(m_sqlState); } | /**
* Serialize the five character SQLState to the provided ByteBuffer
*/ | Serialize the five character SQLState to the provided ByteBuffer | p_serializeToBuffer | {
"repo_name": "simonzhangsm/voltdb",
"path": "src/frontend/org/voltdb/exceptions/SQLException.java",
"license": "agpl-3.0",
"size": 3216
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,411,792 |
public void addString(String str, int x, int y, CharacterSet charSet) {
addObject(new GraphicsCharacterString(str, x, y, charSet));
} | void function(String str, int x, int y, CharacterSet charSet) { addObject(new GraphicsCharacterString(str, x, y, charSet)); } | /**
* Adds a string
*
* @param str the string
* @param x the x coordinate
* @param y the y coordinate
* @param charSet the character set associated with the string
*/ | Adds a string | addString | {
"repo_name": "pellcorp/fop",
"path": "src/java/org/apache/fop/afp/modca/GraphicsObject.java",
"license": "apache-2.0",
"size": 13332
} | [
"org.apache.fop.afp.fonts.CharacterSet",
"org.apache.fop.afp.goca.GraphicsCharacterString"
] | import org.apache.fop.afp.fonts.CharacterSet; import org.apache.fop.afp.goca.GraphicsCharacterString; | import org.apache.fop.afp.fonts.*; import org.apache.fop.afp.goca.*; | [
"org.apache.fop"
] | org.apache.fop; | 1,045,003 |
ObservableSemanticChronology getObservableSemanticChronology(int id); | ObservableSemanticChronology getObservableSemanticChronology(int id); | /**
* Gets the observable semantic chronology.
*
* @param id a nid
* @return the ObservableSemanticChronology with the provided id
*/ | Gets the observable semantic chronology | getObservableSemanticChronology | {
"repo_name": "OSEHRA/ISAAC",
"path": "core/api/src/main/java/sh/isaac/api/observable/ObservableChronologyService.java",
"license": "apache-2.0",
"size": 3101
} | [
"sh.isaac.api.observable.semantic.ObservableSemanticChronology"
] | import sh.isaac.api.observable.semantic.ObservableSemanticChronology; | import sh.isaac.api.observable.semantic.*; | [
"sh.isaac.api"
] | sh.isaac.api; | 1,204,955 |
if (this.measures.isEmpty()) {
throw new CalculationException("no measures provided");
}
if (this.station == null) {
throw new CalculationException("no station provided");
}
this.results.clear();
for (Measure d : this.measures) {
Gisement g = ... | if (this.measures.isEmpty()) { throw new CalculationException(STR); } if (this.station == null) { throw new CalculationException(STR); } this.results.clear(); for (Measure d : this.measures) { Gisement g = new Gisement(this.station, d.getPoint(), false); double horizDir = MathUtils.modulo400(g.getGisement() - d.getUnkn... | /**
* Compute measure values from points and put it in the array of results.
*/ | Compute measure values from points and put it in the array of results | compute | {
"repo_name": "hgdev-ch/toposuite-android",
"path": "app/src/main/java/ch/hgdev/toposuite/calculation/PolarImplantation.java",
"license": "gpl-2.0",
"size": 7676
} | [
"ch.hgdev.toposuite.utils.MathUtils"
] | import ch.hgdev.toposuite.utils.MathUtils; | import ch.hgdev.toposuite.utils.*; | [
"ch.hgdev.toposuite"
] | ch.hgdev.toposuite; | 1,206,502 |
private CVTerm findOrCreateCVTerm(SBase sbase, CVTerm.Qualifier qualifier) {
if (sbase.getCVTermCount() > 0) {
for (CVTerm term : sbase.getCVTerms()) {
if (term.getQualifier().equals(qualifier)) {
return term;
}
}
}
return new CVTerm(CVTerm.Type.BIOLOGICAL_QUALIFIER, ... | CVTerm function(SBase sbase, CVTerm.Qualifier qualifier) { if (sbase.getCVTermCount() > 0) { for (CVTerm term : sbase.getCVTerms()) { if (term.getQualifier().equals(qualifier)) { return term; } } } return new CVTerm(CVTerm.Type.BIOLOGICAL_QUALIFIER, qualifier); } | /**
* Searches for the first {@link CVTerm} within the given {@link SBase} that
* has the given {@link CVTerm.Qualifier}.
*
* @param sbase
* @param qualifier
* @return the found {@link CVTerm} or a new {@link CVTerm} if non exists.
* To distinguish between both cases, test if the parent is
... | Searches for the first <code>CVTerm</code> within the given <code>SBase</code> that has the given <code>CVTerm.Qualifier</code> | findOrCreateCVTerm | {
"repo_name": "SBRG/ModelPolisher",
"path": "src/main/java/edu/ucsd/sbrg/parsers/COBRAparser.java",
"license": "mit",
"size": 34090
} | [
"org.sbml.jsbml.CVTerm",
"org.sbml.jsbml.SBase"
] | import org.sbml.jsbml.CVTerm; import org.sbml.jsbml.SBase; | import org.sbml.jsbml.*; | [
"org.sbml.jsbml"
] | org.sbml.jsbml; | 1,088,759 |
protected ByteSizeValue chunkSize() {
return null;
} | ByteSizeValue function() { return null; } | /**
* Returns data file chunk size.
* <p>
* This method should return null if no chunking is needed.
*
* @return chunk size
*/ | Returns data file chunk size. This method should return null if no chunking is needed | chunkSize | {
"repo_name": "uschindler/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java",
"license": "apache-2.0",
"size": 130930
} | [
"org.elasticsearch.common.unit.ByteSizeValue"
] | import org.elasticsearch.common.unit.ByteSizeValue; | import org.elasticsearch.common.unit.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 162,250 |
public static Object executeMethod(Object object, String method) throws Exception {
Class clazz = (Class)(object instanceof Class ? object : object.getClass());
Method m = clazz.getDeclaredMethod(method, new Class[] {});
m.setAccessible(true);
return m.invoke(object, new Object[]... | static Object function(Object object, String method) throws Exception { Class clazz = (Class)(object instanceof Class ? object : object.getClass()); Method m = clazz.getDeclaredMethod(method, new Class[] {}); m.setAccessible(true); return m.invoke(object, new Object[] {}); } | /**
* Execute a method with no arguments
* @param object
* @param method
* @return
*/ | Execute a method with no arguments | executeMethod | {
"repo_name": "archimatetool/archi",
"path": "com.archimatetool.editor/src/com/archimatetool/editor/utils/MacOSReflect.java",
"license": "mit",
"size": 5507
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,068,454 |
public String execute (Object context) throws MustacheException
{
StringWriter out = new StringWriter();
execute(context, out);
return out.toString();
}
protected Template (Segment[] segs)
{
_segs = segs;
} | String function (Object context) throws MustacheException { StringWriter out = new StringWriter(); execute(context, out); return out.toString(); } protected Template (Segment[] segs) { _segs = segs; } | /**
* Executes this template with the given context, returning the results as a string.
* @throws MustacheException if an error occurs while executing or writing the template.
*/ | Executes this template with the given context, returning the results as a string | execute | {
"repo_name": "Duc-Ngo-CSSE/Anki-Android",
"path": "AnkiDroid/src/main/java/com/samskivert/mustache/Template.java",
"license": "gpl-3.0",
"size": 6266
} | [
"java.io.StringWriter"
] | import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,320,075 |
public boolean register(DataObject file)
{
if (file == null)
throw new IllegalArgumentException("No file to register.");
if (model.getBrowserType() != FILE_SYSTEM_EXPLORER) return false;
if (!(file instanceof FileData || file instanceof ImageData))
return false;
if (file.getId() > 0) return false;
t... | boolean function(DataObject file) { if (file == null) throw new IllegalArgumentException(STR); if (model.getBrowserType() != FILE_SYSTEM_EXPLORER) return false; if (!(file instanceof FileData file instanceof ImageData)) return false; if (file.getId() > 0) return false; try { TreeImageDisplay d = model.getLastSelectedDi... | /**
* Implemented as specified by the {@link Browser} interface.
* @see Browser#register(DataObject)
*/ | Implemented as specified by the <code>Browser</code> interface | register | {
"repo_name": "tp81/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserComponent.java",
"license": "gpl-2.0",
"size": 78666
} | [
"org.openmicroscopy.shoola.agents.treeviewer.TreeViewerAgent",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay",
"org.openmicroscopy.shoola.env.data.FSAccessException"
] | import org.openmicroscopy.shoola.agents.treeviewer.TreeViewerAgent; import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay; import org.openmicroscopy.shoola.env.data.FSAccessException; | import org.openmicroscopy.shoola.agents.treeviewer.*; import org.openmicroscopy.shoola.agents.util.browser.*; import org.openmicroscopy.shoola.env.data.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 1,749,666 |
public void updateRelationTupleCount(final RelationKey relation, final long count) throws CatalogException {
Objects.requireNonNull(relation, "relation");
if (isClosed) {
throw new CatalogException("Catalog is closed.");
}
if (isDeletedRelation(relation)) {
LOGGER.warn("Relation has alrea... | void function(final RelationKey relation, final long count) throws CatalogException { Objects.requireNonNull(relation, STR); if (isClosed) { throw new CatalogException(STR); } if (isDeletedRelation(relation)) { LOGGER.warn(STR); } | /**
* Update the {@link MasterCatalog} so that the specified relation has the specified tuple count.
*
* @param relation the relation to update
* @param count the number of tuples in that relation
* @throws CatalogException if there is an error
*/ | Update the <code>MasterCatalog</code> so that the specified relation has the specified tuple count | updateRelationTupleCount | {
"repo_name": "bsalimi/myria",
"path": "src/edu/washington/escience/myria/coordinator/MasterCatalog.java",
"license": "bsd-3-clause",
"size": 68923
} | [
"edu.washington.escience.myria.RelationKey",
"java.util.Objects"
] | import edu.washington.escience.myria.RelationKey; import java.util.Objects; | import edu.washington.escience.myria.*; import java.util.*; | [
"edu.washington.escience",
"java.util"
] | edu.washington.escience; java.util; | 855,649 |
public static String getTempDir(final String dirName) {
final File dir = Files.createTempDir();
dir.deleteOnExit();
return dir.getAbsolutePath() + File.separator + dirName;
} | static String function(final String dirName) { final File dir = Files.createTempDir(); dir.deleteOnExit(); return dir.getAbsolutePath() + File.separator + dirName; } | /**
* Create a temp parent directory to store the given directory with name {@code dirName}. Does <b>NOT</b> create
* the directory itself.
*
* @param dirName
* @return Full path including temp parent directory and given directory name.
*/ | Create a temp parent directory to store the given directory with name dirName. Does NOT create the directory itself | getTempDir | {
"repo_name": "dremio/dremio-oss",
"path": "sabot/kernel/src/test/java/com/dremio/BaseTestQuery.java",
"license": "apache-2.0",
"size": 42649
} | [
"com.google.common.io.Files",
"java.io.File"
] | import com.google.common.io.Files; import java.io.File; | import com.google.common.io.*; import java.io.*; | [
"com.google.common",
"java.io"
] | com.google.common; java.io; | 1,430,071 |
public void createRecursiveNavigation(final TreeItem pitem,
final List<NavigationEntryInterface> plist, final NavigationEntryInterface pactiveEntry) {
for (final NavigationEntryInterface navEntry : plist) {
final TreeItem newItem;
if (navEntry instanceof NavigationEntryFolder) {
newItem ... | void function(final TreeItem pitem, final List<NavigationEntryInterface> plist, final NavigationEntryInterface pactiveEntry) { for (final NavigationEntryInterface navEntry : plist) { final TreeItem newItem; if (navEntry instanceof NavigationEntryFolder) { newItem = new TreeItem(navEntry.getMenuValue()); createRecursive... | /**
* create navigation in a recursive way.
*
* @param pitem the item to add new items
* @param plist the list of the navigation entries
* @param pactiveEntry the active entry
*/ | create navigation in a recursive way | createRecursiveNavigation | {
"repo_name": "ManfredTremmel/gwt-bean-validators",
"path": "gwtp-dynamic-navigation/src/main/java/de/knightsoftnet/navigation/client/ui/navigation/TreeNavigationView.java",
"license": "apache-2.0",
"size": 6401
} | [
"com.google.gwt.core.shared.GWT",
"com.google.gwt.user.client.ui.Anchor",
"com.google.gwt.user.client.ui.InlineHyperlink",
"com.google.gwt.user.client.ui.TreeItem",
"java.util.List"
] | import com.google.gwt.core.shared.GWT; import com.google.gwt.user.client.ui.Anchor; import com.google.gwt.user.client.ui.InlineHyperlink; import com.google.gwt.user.client.ui.TreeItem; import java.util.List; | import com.google.gwt.core.shared.*; import com.google.gwt.user.client.ui.*; import java.util.*; | [
"com.google.gwt",
"java.util"
] | com.google.gwt; java.util; | 1,744,538 |
public PluginResult execute(String action, JSONArray args, String callbackId)
{
PluginResult result = null;
// take a picture
if (action != null && action.equals(ACTION_TAKE_PICTURE))
{
// Parse the options specified for the take picture action.
CameraOpt... | PluginResult function(String action, JSONArray args, String callbackId) { PluginResult result = null; if (action != null && action.equals(ACTION_TAKE_PICTURE)) { CameraOptions options; try { options = CameraOptions.fromJSONArray(args); } catch (NumberFormatException e) { return new PluginResult(PluginResult.Status.JSON... | /**
* Executes the requested action and returns a PluginResult.
*
* @param action The action to execute.
* @param callbackId The callback ID to be invoked upon action completion
* @param args JSONArry of arguments for the action.
* @return A PluginResult object with a status and message.... | Executes the requested action and returns a PluginResult | execute | {
"repo_name": "deedubbu/incubator-cordova-blackberry-webworks",
"path": "framework/ext/src/org/apache/cordova/camera/Camera.java",
"license": "apache-2.0",
"size": 16706
} | [
"org.apache.cordova.api.PluginResult",
"org.apache.cordova.json4j.JSONArray",
"org.apache.cordova.json4j.JSONException"
] | import org.apache.cordova.api.PluginResult; import org.apache.cordova.json4j.JSONArray; import org.apache.cordova.json4j.JSONException; | import org.apache.cordova.api.*; import org.apache.cordova.json4j.*; | [
"org.apache.cordova"
] | org.apache.cordova; | 2,199,401 |
void receiveAccessToken(String status, String message, Token token); | void receiveAccessToken(String status, String message, Token token); | /**
* Get access token stored in the app preferences.
*
* @param status - Status code.
* @param message - Success/Error message.
* @param token - Token retrieved.
*/ | Get access token stored in the app preferences | receiveAccessToken | {
"repo_name": "ayyoob/product-iot-server",
"path": "modules/tools/mdm-android-agent-archetype/src/main/resources/archetype-resources/src/main/plugins/IDPProxy/src/main/java/org/wso2/mdm/agent/proxy/interfaces/CallBack.java",
"license": "apache-2.0",
"size": 1516
} | [
"org.wso2.mdm.agent.proxy.beans.Token"
] | import org.wso2.mdm.agent.proxy.beans.Token; | import org.wso2.mdm.agent.proxy.beans.*; | [
"org.wso2.mdm"
] | org.wso2.mdm; | 2,889,886 |
public static TimeAndFormat parseDateAndFormat(String dateString) {
String pattern = MAX_PRECISION_PATTERN;
switch (dateString.length()) {
case 28: // "yyyy-MM-dd'T'HH:mm:ss.SSSSSSS'Z'"-> [2012-01-04T23:21:59.1234567Z] length = 28
case 27: // "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"... | static TimeAndFormat function(String dateString) { String pattern = MAX_PRECISION_PATTERN; switch (dateString.length()) { case 28: case 27: case 26: case 25: case 24: dateString = dateString.substring(0, MAX_PRECISION_DATESTRING_LENGTH); break; case 23: dateString = Z_PATTERN.matcher(dateString).replaceAll("0"); break;... | /**
* Given a String representing a date in a form of the ISO8601 pattern, generates a Date representing it with up to
* millisecond precision.
*
* @param dateString the {@code String} to be interpreted as a <code>Date</code>
* @return the corresponding <code>Date</code> object
* @throws I... | Given a String representing a date in a form of the ISO8601 pattern, generates a Date representing it with up to millisecond precision | parseDateAndFormat | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java",
"license": "mit",
"size": 17776
} | [
"java.time.LocalDateTime",
"java.time.ZoneOffset",
"java.time.format.DateTimeFormatter",
"java.util.Locale"
] | import java.time.LocalDateTime; import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; import java.util.Locale; | import java.time.*; import java.time.format.*; import java.util.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 2,279,646 |
public boolean containsJar(String jarName) {
try (@SuppressWarnings("unused") Closeable lock = readLock.open()) {
return jars.containsKey(jarName);
}
} | boolean function(String jarName) { try (@SuppressWarnings(STR) Closeable lock = readLock.open()) { return jars.containsKey(jarName); } } | /**
* Checks is jar is present in {@link #jars}.
* This is read operation, so several users can perform this operation at the same time.
*
* @param jarName jar name
* @return true if jar exists, else false
*/ | Checks is jar is present in <code>#jars</code>. This is read operation, so several users can perform this operation at the same time | containsJar | {
"repo_name": "cchang738/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/registry/FunctionRegistryHolder.java",
"license": "apache-2.0",
"size": 15707
} | [
"org.apache.drill.common.AutoCloseables"
] | import org.apache.drill.common.AutoCloseables; | import org.apache.drill.common.*; | [
"org.apache.drill"
] | org.apache.drill; | 2,318,602 |
@GET
@Path("getSpecialReportSkane")
@Produces({MediaType.APPLICATION_JSON})
@Consumes({MediaType.APPLICATION_JSON})
public Response getSpecialReportSkane(@QueryParam("enhet") List<String> enhets) {
final List<SpecialSkaneRow> report = new SpecialReportSkaneCreator(warehouse.iterator(), sjukf... | @Path(STR) @Produces({MediaType.APPLICATION_JSON}) @Consumes({MediaType.APPLICATION_JSON}) Response function(@QueryParam("enhet") List<String> enhets) { final List<SpecialSkaneRow> report = new SpecialReportSkaneCreator(warehouse.iterator(), sjukfallUtil, icd10) .getReport(false, enhets); report.addAll(new SpecialRepor... | /**
* Special report for Region Skane requested in INTYGFV-12015.
*/ | Special report for Region Skane requested in INTYGFV-12015 | getSpecialReportSkane | {
"repo_name": "sklintyg/statistik",
"path": "web/src/main/java/se/inera/testsupport/RestSupportService.java",
"license": "lgpl-3.0",
"size": 30427
} | [
"java.util.List",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"se.inera.testsupport.specialrapport.regionskane.SpecialReportSkaneAgeCreator",
"se.inera.testsupport.specialrapport.regionskane.... | import java.util.List; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import se.inera.testsupport.specialrapport.regionskane.SpecialReportSkaneAgeCreator; import se.inera.testsupport.s... | import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import se.inera.testsupport.specialrapport.regionskane.*; | [
"java.util",
"javax.ws",
"se.inera.testsupport"
] | java.util; javax.ws; se.inera.testsupport; | 1,736,640 |
private Hashtable<String, String> propsFromConfig(Map<String, Object> config) {
Hashtable<String, String> props = new Hashtable<String, String>();
if (config != null) {
for (String key : config.keySet()) {
props.put(key, config.get(key).toString());
}
... | Hashtable<String, String> function(Map<String, Object> config) { Hashtable<String, String> props = new Hashtable<String, String>(); if (config != null) { for (String key : config.keySet()) { props.put(key, config.get(key).toString()); } } if (props.get(CONFIG_MAX_THREADS) == null) { props.put(CONFIG_MAX_THREADS, String... | /**
* Copy the ConfigAdminManager's config to the init parameters of the servlet.
*
* @param config the OSGi config, may be <code>null</code>
* @return properties to pass to servlet for initialization
*/ | Copy the ConfigAdminManager's config to the init parameters of the servlet | propsFromConfig | {
"repo_name": "Snickermicker/smarthome",
"path": "bundles/ui/org.eclipse.smarthome.ui/src/main/java/org/eclipse/smarthome/ui/internal/proxy/ProxyServletService.java",
"license": "epl-1.0",
"size": 15830
} | [
"java.util.Hashtable",
"java.util.Map"
] | import java.util.Hashtable; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 432,130 |
public void handleResult(Object result)
{
if (viewer.getState() == Finder.DISCARDED) return; //Async cancel.
viewer.setExistingTags((Collection) result);
} | void function(Object result) { if (viewer.getState() == Finder.DISCARDED) return; viewer.setExistingTags((Collection) result); } | /**
* Feeds the result back to the viewer.
* @see FinderLoader#handleResult(Object)
*/ | Feeds the result back to the viewer | handleResult | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/util/finder/TagsLoader.java",
"license": "gpl-2.0",
"size": 2742
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,389,499 |
@Test
public void testGenerateTripleDesKey() throws Exception
{
KeyGenerator keygen = KeyGenerator.getInstance( "DESede" );
SecretKey key = keygen.generateKey();
assertEquals( "DESede key size", 24, key.getEncoded().length );
} | void function() throws Exception { KeyGenerator keygen = KeyGenerator.getInstance( STR ); SecretKey key = keygen.generateKey(); assertEquals( STR, 24, key.getEncoded().length ); } | /**
* Tests that random Triple-DES keys can be generated.
*
* @throws Exception
*/ | Tests that random Triple-DES keys can be generated | testGenerateTripleDesKey | {
"repo_name": "lucastheisen/apache-directory-server",
"path": "kerberos-codec/src/test/java/org/apache/directory/server/kerberos/shared/crypto/encryption/RandomKeyFactoryTest.java",
"license": "apache-2.0",
"size": 6885
} | [
"javax.crypto.KeyGenerator",
"javax.crypto.SecretKey",
"org.junit.Assert"
] | import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; import org.junit.Assert; | import javax.crypto.*; import org.junit.*; | [
"javax.crypto",
"org.junit"
] | javax.crypto; org.junit; | 1,224,708 |
public void addExamplePage(String testId, ExamplePage page) {
if (!examplePages.containsKey(testId)) {
List<ExamplePage> pages = new ArrayList<ExamplePage>();
examplePages.put(testId, pages);
}
List<ExamplePage> pages = examplePages.get(testId);
pages.add(page);
}
| void function(String testId, ExamplePage page) { if (!examplePages.containsKey(testId)) { List<ExamplePage> pages = new ArrayList<ExamplePage>(); examplePages.put(testId, pages); } List<ExamplePage> pages = examplePages.get(testId); pages.add(page); } | /**
* add the given page to the example pages
*
* @param testId
* @param page
*/ | add the given page to the example pages | addExamplePage | {
"repo_name": "WolfgangFahl/Mediawiki-Japi",
"path": "src/test/java/com/bitplan/mediawiki/japi/ExampleWiki.java",
"license": "apache-2.0",
"size": 5722
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,634,022 |
public NabuccoList<Employee> getEmployeeList() {
if ((this.employeeList == null)) {
this.employeeList = new NabuccoListImpl<Employee>(NabuccoCollectionState.INITIALIZED);
}
return this.employeeList;
}
| NabuccoList<Employee> function() { if ((this.employeeList == null)) { this.employeeList = new NabuccoListImpl<Employee>(NabuccoCollectionState.INITIALIZED); } return this.employeeList; } | /**
* Missing description at method getEmployeeList.
*
* @return the NabuccoList<Employee>.
*/ | Missing description at method getEmployeeList | getEmployeeList | {
"repo_name": "NABUCCO/org.nabucco.business.person",
"path": "org.nabucco.business.person.facade.message/src/main/gen/org/nabucco/business/person/facade/message/EmployeeListMsg.java",
"license": "epl-1.0",
"size": 5904
} | [
"org.nabucco.business.person.facade.datatype.Employee",
"org.nabucco.framework.base.facade.datatype.collection.NabuccoCollectionState",
"org.nabucco.framework.base.facade.datatype.collection.NabuccoList",
"org.nabucco.framework.base.facade.datatype.collection.NabuccoListImpl"
] | import org.nabucco.business.person.facade.datatype.Employee; import org.nabucco.framework.base.facade.datatype.collection.NabuccoCollectionState; import org.nabucco.framework.base.facade.datatype.collection.NabuccoList; import org.nabucco.framework.base.facade.datatype.collection.NabuccoListImpl; | import org.nabucco.business.person.facade.datatype.*; import org.nabucco.framework.base.facade.datatype.collection.*; | [
"org.nabucco.business",
"org.nabucco.framework"
] | org.nabucco.business; org.nabucco.framework; | 1,850,964 |
public BigInteger getG() {
return g;
} | BigInteger function() { return g; } | /**
* Secret key
*
* @return g prime (with probability < 2 ** -100)
*/ | Secret key | getG | {
"repo_name": "thc202/zap-extensions",
"path": "addOns/tokengen/src/main/java/com/fasteasytrade/JRandTest/Algo/ModulusExponentPrng.java",
"license": "apache-2.0",
"size": 4694
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 2,413,418 |
@ExpectedFFDC({ "org.jose4j.jwt.consumer.InvalidJwtSignatureException" })
@Test
public void JwtConsumerApiConfigTests_sharedKeyBadXor_SigAlgHS256() throws Exception {
builder.setAudience(SecurityFatHttpUtils.getServerSecureUrlBase(consumerServer) + JwtConsumerConstants.JWT_CONSUMER_ENDPOINT);
... | @ExpectedFFDC({ STR }) void function() throws Exception { builder.setAudience(SecurityFatHttpUtils.getServerSecureUrlBase(consumerServer) + JwtConsumerConstants.JWT_CONSUMER_ENDPOINT); String jwtToken = buildToken(); Expectations expectations = consumerHelpers.buildNegativeAttributeExpectations(JwtConsumerMessageConsta... | /**
* server.xml has a config that has a bad xor'ed sharedKey.. The token will be generated using HS256
* We expect a failure as the xor'ed sharedKey is not correct. (the consumer config is using trust that is
* appropriate for the token)
*
* @throws Exception
*/ | server.xml has a config that has a bad xor'ed sharedKey.. The token will be generated using HS256 We expect a failure as the xor'ed sharedKey is not correct. (the consumer config is using trust that is appropriate for the token) | JwtConsumerApiConfigTests_sharedKeyBadXor_SigAlgHS256 | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.jwt_fat.consumer/fat/src/com/ibm/ws/security/jwt/fat/consumer/JwtConsumerApiConfigTests.java",
"license": "epl-1.0",
"size": 109831
} | [
"com.gargoylesoftware.htmlunit.Page",
"com.ibm.ws.security.fat.common.expectations.Expectations",
"com.ibm.ws.security.fat.common.utils.SecurityFatHttpUtils",
"com.ibm.ws.security.jwt.fat.consumer.utils.JwtConsumerMessageConstants"
] | import com.gargoylesoftware.htmlunit.Page; import com.ibm.ws.security.fat.common.expectations.Expectations; import com.ibm.ws.security.fat.common.utils.SecurityFatHttpUtils; import com.ibm.ws.security.jwt.fat.consumer.utils.JwtConsumerMessageConstants; | import com.gargoylesoftware.htmlunit.*; import com.ibm.ws.security.fat.common.expectations.*; import com.ibm.ws.security.fat.common.utils.*; import com.ibm.ws.security.jwt.fat.consumer.utils.*; | [
"com.gargoylesoftware.htmlunit",
"com.ibm.ws"
] | com.gargoylesoftware.htmlunit; com.ibm.ws; | 663,272 |
void setThreadState(WaveletId waveletId, String threadId, ThreadState newState);
//
// Read/unread concerns.
// | void setThreadState(WaveletId waveletId, String threadId, ThreadState newState); // | /**
* Sets a thread's state, such as collapsed or expanded.
*
* @param waveletId id of the thread's wavelet
* @param threadId id of the thread to change
* @param newState new state to change the thread to
*/ | Sets a thread's state, such as collapsed or expanded | setThreadState | {
"repo_name": "gburd/wave",
"path": "src/org/waveprotocol/wave/model/supplement/WritableSupplement.java",
"license": "apache-2.0",
"size": 5100
} | [
"org.waveprotocol.wave.model.id.WaveletId"
] | import org.waveprotocol.wave.model.id.WaveletId; | import org.waveprotocol.wave.model.id.*; | [
"org.waveprotocol.wave"
] | org.waveprotocol.wave; | 2,674,583 |
public void stop() {
synchronized (this) {
if (stopRequested) {
return;
}
stopRequested = true;
}
try {
exitActiveServices();
} catch (ServiceFailedException e) {
LOG.warn("Encountered exception while exiting state ", e);
}
stopCommonServices();
if (me... | void function() { synchronized (this) { if (stopRequested) { return; } stopRequested = true; } try { exitActiveServices(); } catch (ServiceFailedException e) { LOG.warn(STR, e); } stopCommonServices(); if (metrics != null) { metrics.shutdown(); } if (namesystem != null) { namesystem.shutdown(); } } | /**
* Stop all NameNode threads and wait for all to finish.
*/ | Stop all NameNode threads and wait for all to finish | stop | {
"repo_name": "srijeyanthan/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java",
"license": "apache-2.0",
"size": 40625
} | [
"org.apache.hadoop.ha.ServiceFailedException"
] | import org.apache.hadoop.ha.ServiceFailedException; | import org.apache.hadoop.ha.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 264,563 |
public static void i(String tag, String msg, Throwable throwable) {
if (sLevel > LEVEL_INFO) {
return;
}
Log.i(tag, msg, throwable);
} | static void function(String tag, String msg, Throwable throwable) { if (sLevel > LEVEL_INFO) { return; } Log.i(tag, msg, throwable); } | /**
* Send an INFO log message
*
* @param tag
* @param msg
*/ | Send an INFO log message | i | {
"repo_name": "ThinkmanWang/ThinkUtils",
"path": "thinkutils/src/main/java/in/srain/cube/views/ptr/util/PtrCLog.java",
"license": "gpl-3.0",
"size": 6142
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,266,031 |
void deleteNoneReceivedMail(String usercode, long folderId) throws EJBException ;
| void deleteNoneReceivedMail(String usercode, long folderId) throws EJBException ; | /**
* Delete all none received mail from the given folder identifier.
*
* @param usercode the given owner user code.
* @param folderId the given folder identifier.
* @throws EJBException when error occurs during deleting none received mail.
*/ | Delete all none received mail from the given folder identifier | deleteNoneReceivedMail | {
"repo_name": "inetcloud/iMail",
"path": "source/com.inet.mail/src/com/inet/mail/business/sr/MailHeaderSL.java",
"license": "gpl-2.0",
"size": 11476
} | [
"com.inet.base.ejb.exception.EJBException"
] | import com.inet.base.ejb.exception.EJBException; | import com.inet.base.ejb.exception.*; | [
"com.inet.base"
] | com.inet.base; | 261,638 |
public void addSelected() {
final Collection<T> items = getCollectionFromArray(allowedValuesList.getSelectedItems());
selectedValuesList.addAll(items);
allowedValuesList.removeAll(items);
fireChangeEvent();
} | void function() { final Collection<T> items = getCollectionFromArray(allowedValuesList.getSelectedItems()); selectedValuesList.addAll(items); allowedValuesList.removeAll(items); fireChangeEvent(); } | /**
* Pasa todos los elementos seleccionados en la lista derecha (disponibles) a la lista izquierda (seleccionados)
*/ | Pasa todos los elementos seleccionados en la lista derecha (disponibles) a la lista izquierda (seleccionados) | addSelected | {
"repo_name": "autentia/autentia-wuija",
"path": "autentia-wuija-ui/src/main/java/com/autentia/wuija/widget/SelectManyLists.java",
"license": "gpl-3.0",
"size": 11522
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 366,962 |
public Window getWindowForShowSmMetaData(final Long smId, final String name, final ProxyMetaData proxyMetaData) {
return getWindowForShowMetaData(new SmMetaDataWindowLayout(uiDependencies, smManagement), smId, name, proxyMetaData);
} | Window function(final Long smId, final String name, final ProxyMetaData proxyMetaData) { return getWindowForShowMetaData(new SmMetaDataWindowLayout(uiDependencies, smManagement), smId, name, proxyMetaData); } | /**
* Get software module window with proxy meta data
*
* @param smId
* software module ID
* @param name
* Selected entity name
* @param proxyMetaData
* ProxyMetaData
*
* @return software module window
*/ | Get software module window with proxy meta data | getWindowForShowSmMetaData | {
"repo_name": "bsinno/hawkbit",
"path": "hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/smtable/SmMetaDataWindowBuilder.java",
"license": "epl-1.0",
"size": 2218
} | [
"com.vaadin.ui.Window",
"org.eclipse.hawkbit.ui.common.data.proxies.ProxyMetaData"
] | import com.vaadin.ui.Window; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyMetaData; | import com.vaadin.ui.*; import org.eclipse.hawkbit.ui.common.data.proxies.*; | [
"com.vaadin.ui",
"org.eclipse.hawkbit"
] | com.vaadin.ui; org.eclipse.hawkbit; | 450,461 |
public static int drain(InputStream in) throws IOException {
Assert.notNull(in, "No InputStream specified");
byte[] buffer = new byte[BUFFER_SIZE];
int bytesRead = -1;
int byteCount = 0;
while ((bytesRead = in.read(buffer)) != -1) {
byteCount += bytesRead;
}
return byteCount;
} | static int function(InputStream in) throws IOException { Assert.notNull(in, STR); byte[] buffer = new byte[BUFFER_SIZE]; int bytesRead = -1; int byteCount = 0; while ((bytesRead = in.read(buffer)) != -1) { byteCount += bytesRead; } return byteCount; } | /**
* Drain the remaining content of the given InputStream.
* Leaves the InputStream open when done.
* @param in the InputStream to drain
* @return the number of bytes read
* @throws IOException in case of I/O errors
* @since 4.3
*/ | Drain the remaining content of the given InputStream. Leaves the InputStream open when done | drain | {
"repo_name": "lj654548718/ispring",
"path": "src/main/java/io/ispring/ori/utils/StreamUtils.java",
"license": "apache-2.0",
"size": 7998
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,192,065 |
private static void doClientWork() {
EventHubProducerAsyncClient producer = new EventHubClientBuilder()
.connectionString(CONNECTION_STRING, "<eventHub Name>")
.buildAsyncProducerClient();
Span span = TRACER.spanBuilder("user-parent-span").startSpan();
final Scope sc... | static void function() { EventHubProducerAsyncClient producer = new EventHubClientBuilder() .connectionString(CONNECTION_STRING, STR) .buildAsyncProducerClient(); Span span = TRACER.spanBuilder(STR).startSpan(); final Scope scope = span.makeCurrent(); try { String firstPartition = producer.getPartitionIds().blockFirst(... | /**
* Method that creates {@link EventHubProducerAsyncClient} to send events to Event Hubs with distributed
* telemetry enabled and using Azure Monitor exporter to export telemetry events.
*/ | Method that creates <code>EventHubProducerAsyncClient</code> to send events to Event Hubs with distributed telemetry enabled and using Azure Monitor exporter to export telemetry events | doClientWork | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/monitor/azure-monitor-opentelemetry-exporter/src/samples/java/com/azure/monitor/opentelemetry/exporter/EventHubsAzureMonitorExporterSample.java",
"license": "mit",
"size": 6223
} | [
"com.azure.messaging.eventhubs.EventData",
"com.azure.messaging.eventhubs.EventDataBatch",
"com.azure.messaging.eventhubs.EventHubClientBuilder",
"com.azure.messaging.eventhubs.EventHubProducerAsyncClient",
"com.azure.messaging.eventhubs.models.CreateBatchOptions",
"io.opentelemetry.api.trace.Span",
"io... | import com.azure.messaging.eventhubs.EventData; import com.azure.messaging.eventhubs.EventDataBatch; import com.azure.messaging.eventhubs.EventHubClientBuilder; import com.azure.messaging.eventhubs.EventHubProducerAsyncClient; import com.azure.messaging.eventhubs.models.CreateBatchOptions; import io.opentelemetry.api.t... | import com.azure.messaging.eventhubs.*; import com.azure.messaging.eventhubs.models.*; import io.opentelemetry.api.trace.*; import io.opentelemetry.context.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; | [
"com.azure.messaging",
"io.opentelemetry.api",
"io.opentelemetry.context",
"java.util"
] | com.azure.messaging; io.opentelemetry.api; io.opentelemetry.context; java.util; | 1,789,445 |
public geister.GetCognomeResponse getCognome(geister.GetCognome getCognome)
{
GetCognomeResponse resp= new GetCognomeResponse();
String idtoken=getCognome.getIdtoken();
String username=getCognome.getUsername();
try {
WSDataStub stub = new WSDataStub();
WSDataStub.GetUtenteCognome utente=new WSDataS... | geister.GetCognomeResponse function(geister.GetCognome getCognome) { GetCognomeResponse resp= new GetCognomeResponse(); String idtoken=getCognome.getIdtoken(); String username=getCognome.getUsername(); try { WSDataStub stub = new WSDataStub(); WSDataStub.GetUtenteCognome utente=new WSDataStub.GetUtenteCognome(); utente... | /** Restituisce il cognome dell'utente, richiamando il metodo dal servizio WSData
* @param GetCognome (token,username)
* @return GetCognomeResponse: cognome dell'utente (String)
*/ | Restituisce il cognome dell'utente, richiamando il metodo dal servizio WSData | getCognome | {
"repo_name": "Bishop92/Geister",
"path": "WSUtenti/skeleton/MySkeleton.java",
"license": "gpl-3.0",
"size": 28168
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 964,664 |
public JavaType getType( ) {
return type;
}
| JavaType function( ) { return type; } | /**
* The type of the parameter.
* @return the type of the parameter
*/ | The type of the parameter | getType | {
"repo_name": "Talvish/Tales",
"path": "product/services/src/com/talvish/tales/contracts/services/http/ResourceMethodParameter.java",
"license": "apache-2.0",
"size": 11023
} | [
"com.talvish.tales.parts.reflection.JavaType"
] | import com.talvish.tales.parts.reflection.JavaType; | import com.talvish.tales.parts.reflection.*; | [
"com.talvish.tales"
] | com.talvish.tales; | 2,617,524 |
public JButton getSearchButton() {
return _searchButton;
}
| JButton function() { return _searchButton; } | /**
* Returns the ACIDE - A Configurable IDE console panel search window search
* button.
*
* @return the ACIDE - A Configurable IDE console panel search window search
* button.
*/ | Returns the ACIDE - A Configurable IDE console panel search window search button | getSearchButton | {
"repo_name": "salcedonia/acide-0-8-release-2010-2011",
"path": "acide/src/acide/gui/menuBar/configurationMenu/consoleMenu/gui/AcideConsolePanelSearchWindow.java",
"license": "gpl-3.0",
"size": 23539
} | [
"javax.swing.JButton"
] | import javax.swing.JButton; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 190,442 |
public synchronized void connect(BluetoothDevice device) {
if (D)
Log.d(TAG, "connect to: " + device);
// Cancel any thread attempting to make a connection
if (mState == STATE_CONNECTING) {
if (mConnectThread != null) {
mConnectThread.cancel();
mConnectThread = null;
}
}
// Cancel any th... | synchronized void function(BluetoothDevice device) { if (D) Log.d(TAG, STR + device); if (mState == STATE_CONNECTING) { if (mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } } if (mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } mConnectThread = new ConnectThre... | /**
* Start the ConnectThread to initiate a connection to a remote device.
*
* @param device
* The BluetoothDevice to connect
*/ | Start the ConnectThread to initiate a connection to a remote device | connect | {
"repo_name": "filipe1309/Codes",
"path": "android/BluetoothChat-master/src/com/example/android/BluetoothChat/BluetoothChatService.java",
"license": "gpl-2.0",
"size": 14176
} | [
"android.bluetooth.BluetoothDevice",
"android.util.Log"
] | import android.bluetooth.BluetoothDevice; import android.util.Log; | import android.bluetooth.*; import android.util.*; | [
"android.bluetooth",
"android.util"
] | android.bluetooth; android.util; | 1,247,039 |
@Override
public void upgradeFromPreviousVersion(OpenImmoDocument<?> doc) {
doc.setDocumentVersion(OpenImmoVersion.V1_2_4);
if (doc instanceof OpenImmoTransferDocument) {
try {
this.upgradeAnzahlBalkonTerrassenElements(doc.getDocument());
} catch (Excepti... | void function(OpenImmoDocument<?> doc) { doc.setDocumentVersion(OpenImmoVersion.V1_2_4); if (doc instanceof OpenImmoTransferDocument) { try { this.upgradeAnzahlBalkonTerrassenElements(doc.getDocument()); } catch (Exception ex) { LOGGER.error(STR); LOGGER.error(STR + ex.getLocalizedMessage(), ex); } try { this.upgradeAn... | /**
* Upgrade an {@link OpenImmoDocument} from version 1.2.3 to 1.2.4.
*
* @param doc document in version 1.2.3
*/ | Upgrade an <code>OpenImmoDocument</code> from version 1.2.3 to 1.2.4 | upgradeFromPreviousVersion | {
"repo_name": "OpenEstate/OpenEstate-IO",
"path": "OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_4.java",
"license": "apache-2.0",
"size": 22636
} | [
"org.openestate.io.openimmo.OpenImmoDocument",
"org.openestate.io.openimmo.OpenImmoTransferDocument",
"org.openestate.io.openimmo.OpenImmoVersion"
] | import org.openestate.io.openimmo.OpenImmoDocument; import org.openestate.io.openimmo.OpenImmoTransferDocument; import org.openestate.io.openimmo.OpenImmoVersion; | import org.openestate.io.openimmo.*; | [
"org.openestate.io"
] | org.openestate.io; | 2,421,633 |
public Map<RotationId, Rotation> availableRotations(@SuppressWarnings("unused") RotationLock lock) {
List<RotationId> assignedRotations = applications.asList().stream()
.flatMap(application -> application.instances().values().stream())
... | Map<RotationId, Rotation> function(@SuppressWarnings(STR) RotationLock lock) { List<RotationId> assignedRotations = applications.asList().stream() .flatMap(application -> application.instances().values().stream()) .flatMap(instance -> instance.rotations().stream()) .map(AssignedRotation::rotationId) .collect(Collectors... | /**
* Returns all unassigned rotations
* @param lock Lock which must be acquired by the caller
*/ | Returns all unassigned rotations | availableRotations | {
"repo_name": "vespa-engine/vespa",
"path": "controller-server/src/main/java/com/yahoo/vespa/hosted/controller/routing/rotation/RotationRepository.java",
"license": "apache-2.0",
"size": 9745
} | [
"com.yahoo.vespa.hosted.controller.application.AssignedRotation",
"java.util.Collections",
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map",
"java.util.stream.Collectors"
] | import com.yahoo.vespa.hosted.controller.application.AssignedRotation; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; | import com.yahoo.vespa.hosted.controller.application.*; import java.util.*; import java.util.stream.*; | [
"com.yahoo.vespa",
"java.util"
] | com.yahoo.vespa; java.util; | 1,361,168 |
void exitVariableDeclaratorList(@NotNull Java8Parser.VariableDeclaratorListContext ctx); | void exitVariableDeclaratorList(@NotNull Java8Parser.VariableDeclaratorListContext ctx); | /**
* Exit a parse tree produced by {@link Java8Parser#variableDeclaratorList}.
*
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>Java8Parser#variableDeclaratorList</code> | exitVariableDeclaratorList | {
"repo_name": "BigDaddy-Germany/WHOAMI",
"path": "WHOAMI/src/de/aima13/whoami/modules/syntaxcheck/languages/antlrgen/Java8Listener.java",
"license": "mit",
"size": 97945
} | [
"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; | 100,371 |
private void handleExportToJPEG() {
FileChooser chooser = new FileChooser();
chooser.setTitle("Export to JPEG");
ExtensionFilter filter = new FileChooser.ExtensionFilter("JPEG", "jpg");
chooser.getExtensionFilters().add(filter);
File file = chooser.showSaveDialog(getScene().g... | void function() { FileChooser chooser = new FileChooser(); chooser.setTitle(STR); ExtensionFilter filter = new FileChooser.ExtensionFilter("JPEG", "jpg"); chooser.getExtensionFilters().add(filter); File file = chooser.showSaveDialog(getScene().getWindow()); if (file != null) { try { ExportUtils.writeAsJPEG(this.chart, ... | /**
* A handler for the export to JPEG option in the context menu.
*/ | A handler for the export to JPEG option in the context menu | handleExportToJPEG | {
"repo_name": "jfree/jfreechart-fse",
"path": "src/main/java/org/jfree/chart/fx/ChartViewer.java",
"license": "lgpl-2.1",
"size": 12354
} | [
"java.io.File",
"java.io.IOException",
"org.jfree.chart.util.ExportUtils"
] | import java.io.File; import java.io.IOException; import org.jfree.chart.util.ExportUtils; | import java.io.*; import org.jfree.chart.util.*; | [
"java.io",
"org.jfree.chart"
] | java.io; org.jfree.chart; | 715,882 |
public Observable<ServiceResponse<AppResourceInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, AppResourceInner appResource) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptio... | Observable<ServiceResponse<AppResourceInner>> function(String resourceGroupName, String serviceName, String appName, AppResourceInner appResource) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (serv... | /**
* Operation to update an exiting App.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
* @param appName The name of the ... | Operation to update an exiting App | beginUpdateWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/appplatform/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/appplatform/v2020_07_01/implementation/AppsInner.java",
"license": "mit",
"size": 76723
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,029,467 |
public static NabuccoPropertyDescriptor getPropertyDescriptor(String propertyName) {
return PropertyCache.getInstance().retrieve(SearchIndexExtension.class).getProperty(propertyName);
}
| static NabuccoPropertyDescriptor function(String propertyName) { return PropertyCache.getInstance().retrieve(SearchIndexExtension.class).getProperty(propertyName); } | /**
* Getter for the PropertyDescriptor.
*
* @param propertyName the String.
* @return the NabuccoPropertyDescriptor.
*/ | Getter for the PropertyDescriptor | getPropertyDescriptor | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/extension/schema/search/SearchIndexExtension.java",
"license": "epl-1.0",
"size": 10028
} | [
"org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor",
"org.nabucco.framework.base.facade.datatype.property.PropertyCache"
] | import org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor; import org.nabucco.framework.base.facade.datatype.property.PropertyCache; | import org.nabucco.framework.base.facade.datatype.property.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,661,821 |
@Test
public void testEnablingInfo() throws Throwable {
File enablingEsa = new File(esaDir, "enabling2.esa");
EsaResourceImpl autoFeatureInMassive = (EsaResourceImpl) uploadAsset(enablingEsa);
Collection<Link> links = autoFeatureInMassive.getLinks();
Collection<String> expectedEn... | void function() throws Throwable { File enablingEsa = new File(esaDir, STR); EsaResourceImpl autoFeatureInMassive = (EsaResourceImpl) uploadAsset(enablingEsa); Collection<Link> links = autoFeatureInMassive.getLinks(); Collection<String> expectedEnablesQuery = new ArrayList<String>(); expectedEnablesQuery.add(STR); Coll... | /**
* Tests enabling information is loaded. One enables, and one enabled by link
*
* @throws Throwable
*/ | Tests enabling information is loaded. One enables, and one enabled by link | testEnablingInfo | {
"repo_name": "Azquelt/tool.lars",
"path": "upload-lib/src/fat/java/com/ibm/ws/massive/esa/MassiveEsaTest.java",
"license": "apache-2.0",
"size": 71736
} | [
"com.ibm.ws.repository.resources.internal.EsaResourceImpl",
"com.ibm.ws.repository.resources.internal.Link",
"java.io.File",
"java.util.ArrayList",
"java.util.Collection",
"org.junit.Assert"
] | import com.ibm.ws.repository.resources.internal.EsaResourceImpl; import com.ibm.ws.repository.resources.internal.Link; import java.io.File; import java.util.ArrayList; import java.util.Collection; import org.junit.Assert; | import com.ibm.ws.repository.resources.internal.*; import java.io.*; import java.util.*; import org.junit.*; | [
"com.ibm.ws",
"java.io",
"java.util",
"org.junit"
] | com.ibm.ws; java.io; java.util; org.junit; | 575,237 |
public TimeRefObject getTimeRefObject() { return timeRefObject; } | public TimeRefObject getTimeRefObject() { return timeRefObject; } | /**
* Returns the bounds of the component posting the event.
* Returns <code>null</code> if not available.
*
* @return See above.
*/ | Returns the bounds of the component posting the event. Returns <code>null</code> if not available | getRequesterBounds | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/events/hiviewer/Browse.java",
"license": "gpl-2.0",
"size": 8038
} | [
"org.openmicroscopy.shoola.env.data.model.TimeRefObject"
] | import org.openmicroscopy.shoola.env.data.model.TimeRefObject; | import org.openmicroscopy.shoola.env.data.model.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 80,667 |
public synchronized GraphicsDevice[] getScreenDevices() {
GraphicsDevice[] ret = screens;
if (ret == null) {
int num = getNumScreens();
ret = new GraphicsDevice[num];
for (int i = 0; i < num; i++) {
ret[i] = makeScreenDevice(i);
}
... | synchronized GraphicsDevice[] function() { GraphicsDevice[] ret = screens; if (ret == null) { int num = getNumScreens(); ret = new GraphicsDevice[num]; for (int i = 0; i < num; i++) { ret[i] = makeScreenDevice(i); } screens = ret; } return ret; } | /**
* Returns an array of all of the screen devices.
*/ | Returns an array of all of the screen devices | getScreenDevices | {
"repo_name": "FauxFaux/jdk9-jdk",
"path": "src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java",
"license": "gpl-2.0",
"size": 14374
} | [
"java.awt.GraphicsDevice"
] | import java.awt.GraphicsDevice; | import java.awt.*; | [
"java.awt"
] | java.awt; | 660,540 |
protected ConnectionFactory createConnectionFactory(String address) throws Exception {
RabbitConnectionFactoryBean rcfb = new RabbitConnectionFactoryBean();
rcfb.setUseSSL(this.useSSL);
rcfb.setSslPropertiesLocation(this.sslPropertiesLocation);
rcfb.afterPropertiesSet();
CachingConnectionFactory ccf = new ... | ConnectionFactory function(String address) throws Exception { RabbitConnectionFactoryBean rcfb = new RabbitConnectionFactoryBean(); rcfb.setUseSSL(this.useSSL); rcfb.setSslPropertiesLocation(this.sslPropertiesLocation); rcfb.afterPropertiesSet(); CachingConnectionFactory ccf = new CachingConnectionFactory(rcfb.getObjec... | /**
* Create a dedicated connection factory for the address.
* @param address the address to which the factory should connect.
* @return the connection factory.
* @throws Exception if errors occur during creation.
*/ | Create a dedicated connection factory for the address | createConnectionFactory | {
"repo_name": "agilemobiledev/spring-cloud-stream",
"path": "spring-cloud-stream-binders/spring-cloud-stream-binder-rabbit/src/main/java/org/springframework/cloud/stream/binder/rabbit/LocalizedQueueConnectionFactory.java",
"license": "apache-2.0",
"size": 8222
} | [
"org.springframework.amqp.rabbit.connection.CachingConnectionFactory",
"org.springframework.amqp.rabbit.connection.ConnectionFactory",
"org.springframework.amqp.rabbit.connection.RabbitConnectionFactoryBean"
] | import org.springframework.amqp.rabbit.connection.CachingConnectionFactory; import org.springframework.amqp.rabbit.connection.ConnectionFactory; import org.springframework.amqp.rabbit.connection.RabbitConnectionFactoryBean; | import org.springframework.amqp.rabbit.connection.*; | [
"org.springframework.amqp"
] | org.springframework.amqp; | 949,308 |
public void testPollLast() {
ConcurrentSkipListSet q = populatedSet(SIZE);
for (int i = SIZE - 1; i >= 0; --i) {
assertEquals(i, q.pollLast());
}
assertNull(q.pollFirst());
} | void function() { ConcurrentSkipListSet q = populatedSet(SIZE); for (int i = SIZE - 1; i >= 0; --i) { assertEquals(i, q.pollLast()); } assertNull(q.pollFirst()); } | /**
* pollLast succeeds unless empty
*/ | pollLast succeeds unless empty | testPollLast | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/test/java/util/concurrent/tck/ConcurrentSkipListSetTest.java",
"license": "gpl-2.0",
"size": 31925
} | [
"java.util.concurrent.ConcurrentSkipListSet"
] | import java.util.concurrent.ConcurrentSkipListSet; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,348,892 |
protected void setFixture(QualificationPhase fixture) {
this.fixture = fixture;
}
| void function(QualificationPhase fixture) { this.fixture = fixture; } | /**
* Sets the fixture for this Qualification Phase test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Sets the fixture for this Qualification Phase test case. | setFixture | {
"repo_name": "firegold4/RCP_Training",
"path": "com.sii.gametournament.tests/src/com/sii/gametournament/tests/QualificationPhaseTest.java",
"license": "epl-1.0",
"size": 2613
} | [
"com.sii.gametournament.QualificationPhase"
] | import com.sii.gametournament.QualificationPhase; | import com.sii.gametournament.*; | [
"com.sii.gametournament"
] | com.sii.gametournament; | 991,716 |
CommandLineConfig setLoggingLevel(String loggingLevel) {
this.loggingLevel = loggingLevel;
return this;
}
private final List<String> externs = new ArrayList<>(); | CommandLineConfig setLoggingLevel(String loggingLevel) { this.loggingLevel = loggingLevel; return this; } private final List<String> externs = new ArrayList<>(); | /**
* The logging level (standard java.util.logging.Level
* values) for Compiler progress. Does not control errors or
* warnings for the JavaScript code under compilation
*/ | The logging level (standard java.util.logging.Level values) for Compiler progress. Does not control errors or warnings for the JavaScript code under compilation | setLoggingLevel | {
"repo_name": "fvigotti/closure-compiler",
"path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java",
"license": "apache-2.0",
"size": 69434
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,271,299 |
@Test
public final void testFillProduct3() {
Trade trade = new Trade();
trade.setProduct(new Swap());
Swap swap = (Swap) trade.getProduct();
FXResetOverrideImpl fxResetOverrride = new FXResetOverrideImpl();
fxResetOverrride.setHolidays(new Vector<String>());
fxResetOverrride.setResetOffset... | final void function() { Trade trade = new Trade(); trade.setProduct(new Swap()); Swap swap = (Swap) trade.getProduct(); FXResetOverrideImpl fxResetOverrride = new FXResetOverrideImpl(); fxResetOverrride.setHolidays(new Vector<String>()); fxResetOverrride.setResetOffset(2); SwapLeg swapLegPay = new SwapLeg(); swapLegPay... | /**
* Test method for {@link calypsox.tk.bo.xml.CDUFSwapBuilder#fillProduct(com.calypso.tk.marketdata.PricingEnv, com.calypso.tk.core.Trade, com.calypso.tk.upload.jaxb.Product)}.
*/ | Test method for <code>calypsox.tk.bo.xml.CDUFSwapBuilder#fillProduct(com.calypso.tk.marketdata.PricingEnv, com.calypso.tk.core.Trade, com.calypso.tk.upload.jaxb.Product)</code> | testFillProduct3 | {
"repo_name": "epalaobe/XMLGenerator",
"path": "XMLGenerator/src/test/java/calypsox/tk/bo/xml/CDUFSwapBuilderTest.java",
"license": "apache-2.0",
"size": 8046
} | [
"com.calypso.tk.core.Trade",
"com.calypso.tk.product.Swap",
"com.calypso.tk.product.SwapLeg",
"com.calypso.tk.product.util.quotableReset.FXResetPurpose",
"com.calypso.tk.refdata.FXResetOverrideImpl",
"java.util.Vector",
"org.junit.Assert"
] | import com.calypso.tk.core.Trade; import com.calypso.tk.product.Swap; import com.calypso.tk.product.SwapLeg; import com.calypso.tk.product.util.quotableReset.FXResetPurpose; import com.calypso.tk.refdata.FXResetOverrideImpl; import java.util.Vector; import org.junit.Assert; | import com.calypso.tk.core.*; import com.calypso.tk.product.*; import com.calypso.tk.product.util.*; import com.calypso.tk.refdata.*; import java.util.*; import org.junit.*; | [
"com.calypso.tk",
"java.util",
"org.junit"
] | com.calypso.tk; java.util; org.junit; | 4,101 |
public RefactoringStatus checkFinalConditions(IProgressMonitor pm, CheckConditionsContext context,
boolean fillChangeObject) throws CoreException, OperationCanceledException {
request.pushMonitor(pm);
RefactoringStatus status = new RefactoringStatus();
try {
if (proce... | RefactoringStatus function(IProgressMonitor pm, CheckConditionsContext context, boolean fillChangeObject) throws CoreException, OperationCanceledException { request.pushMonitor(pm); RefactoringStatus status = new RefactoringStatus(); try { if (process == null process.size() == 0) { request.getMonitor().beginTask(STR, 1... | /**
* Find the references and create the change object
*
* @param fillChangeObject
* determines if we should fill the change object (we'll not do
* it on tests)
*/ | Find the references and create the change object | checkFinalConditions | {
"repo_name": "smkr/pyclipse",
"path": "plugins/com.python.pydev.refactoring/src/com/python/pydev/refactoring/wizards/rename/PyRenameEntryPoint.java",
"license": "epl-1.0",
"size": 12857
} | [
"com.python.pydev.refactoring.wizards.IRefactorRenameProcess",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IProgressMonitor",
"org.eclipse.core.runtime.OperationCanceledException",
"org.eclipse.core.runtime.SubProgressMonitor",
"org.eclipse.ltk.core.refactoring.CompositeChange",
... | import com.python.pydev.refactoring.wizards.IRefactorRenameProcess; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.ltk.core.refactoring.Com... | import com.python.pydev.refactoring.wizards.*; import org.eclipse.core.runtime.*; import org.eclipse.ltk.core.refactoring.*; import org.eclipse.ltk.core.refactoring.participants.*; | [
"com.python.pydev",
"org.eclipse.core",
"org.eclipse.ltk"
] | com.python.pydev; org.eclipse.core; org.eclipse.ltk; | 2,037,535 |
void setSla(Sla value); | void setSla(Sla value); | /**
* Sets the value of the '{@link org.scaledl.overview.specification.ProvidedServiceDescriptor#getSla <em>Sla</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Sla</em>' containment reference.
* @see #getSla()
* @generated
*/ | Sets the value of the '<code>org.scaledl.overview.specification.ProvidedServiceDescriptor#getSla Sla</code>' containment reference. | setSla | {
"repo_name": "CloudScale-Project/Environment",
"path": "plugins/org.scaledl.overview/src/org/scaledl/overview/specification/ProvidedServiceDescriptor.java",
"license": "epl-1.0",
"size": 1559
} | [
"org.scaledl.overview.specification.sla.Sla"
] | import org.scaledl.overview.specification.sla.Sla; | import org.scaledl.overview.specification.sla.*; | [
"org.scaledl.overview"
] | org.scaledl.overview; | 1,951,785 |
private void registerPartitionedRegion(boolean storesData) {
// Register this ParitionedRegion. First check if the ParitionedRegion
// entry already exists globally.
PartitionRegionConfig prConfig = null;
PartitionAttributes prAttribs = getAttributes().getPartitionAttributes();
if (storesData) {
... | void function(boolean storesData) { PartitionRegionConfig prConfig = null; PartitionAttributes prAttribs = getAttributes().getPartitionAttributes(); if (storesData) { if (this.fixedPAttrs != null) { this.node.setPRType(Node.FIXED_PR_DATASTORE); } else { this.node.setPRType(Node.ACCESSOR_DATASTORE); } this.node.setPersi... | /**
* Register this PartitionedRegion by: 1) Create a PartitionRegionConfig and
* 2) Bind it into the allPartitionedRegion system wide Region.
*
* @param storesData
* which indicates whether the instance in this cache stores
* data, effecting the Nodes PRType
*
* ... | Register this PartitionedRegion by: 1) Create a PartitionRegionConfig and 2) Bind it into the allPartitionedRegion system wide Region | registerPartitionedRegion | {
"repo_name": "ameybarve15/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java",
"license": "apache-2.0",
"size": 403335
} | [
"com.gemstone.gemfire.SystemFailure",
"com.gemstone.gemfire.cache.DataPolicy",
"com.gemstone.gemfire.cache.PartitionAttributes",
"com.gemstone.gemfire.distributed.LockServiceDestroyedException",
"com.gemstone.gemfire.internal.cache.partitioned.PRSanityCheckMessage",
"com.gemstone.gemfire.internal.i18n.Loc... | import com.gemstone.gemfire.SystemFailure; import com.gemstone.gemfire.cache.DataPolicy; import com.gemstone.gemfire.cache.PartitionAttributes; import com.gemstone.gemfire.distributed.LockServiceDestroyedException; import com.gemstone.gemfire.internal.cache.partitioned.PRSanityCheckMessage; import com.gemstone.gemfire.... | import com.gemstone.gemfire.*; import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.distributed.*; import com.gemstone.gemfire.internal.cache.partitioned.*; import com.gemstone.gemfire.internal.i18n.*; import com.gemstone.gemfire.internal.logging.log4j.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 172,080 |
public int validateUser(boolean withConfirmEmail) throws XWikiException
{
return this.xwiki.validateUser(withConfirmEmail, getXWikiContext());
} | int function(boolean withConfirmEmail) throws XWikiException { return this.xwiki.validateUser(withConfirmEmail, getXWikiContext()); } | /**
* Privileged API to validate the return code given by a user in response to an email validation email The
* validation information are taken from the request object
*
* @param withConfirmEmail true to send a account confirmation email/false to not send it
* @return Success of Failure code (... | Privileged API to validate the return code given by a user in response to an email validation email The validation information are taken from the request object | validateUser | {
"repo_name": "xwiki/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java",
"license": "lgpl-2.1",
"size": 127625
} | [
"com.xpn.xwiki.XWikiException"
] | import com.xpn.xwiki.XWikiException; | import com.xpn.xwiki.*; | [
"com.xpn.xwiki"
] | com.xpn.xwiki; | 717,885 |
@Transactional
public void modifyUser(User u);
| void function(User u); | /**
* modify user
* @param u
*/ | modify user | modifyUser | {
"repo_name": "raiedsiddiqui/tapcm",
"path": "src/main/java/org/tapestry/service/UserManager.java",
"license": "agpl-3.0",
"size": 3817
} | [
"org.tapestry.objects.User"
] | import org.tapestry.objects.User; | import org.tapestry.objects.*; | [
"org.tapestry.objects"
] | org.tapestry.objects; | 717,817 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.