method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static java.util.List extractInvitedHCPList(ims.domain.ILightweightDomainFactory domainFactory, ims.oncology.vo.InvitedHCPVoCollection voCollection) { return extractInvitedHCPList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.oncology.vo.InvitedHCPVoCollection voCollection) { return extractInvitedHCPList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.oncology.domain.objects.InvitedHCP list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.oncology.domain.objects.InvitedHCP list from the value object collection
extractInvitedHCPList
{ "repo_name": "IMS-MAXIMS/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/oncology/vo/domain/InvitedHCPVoAssembler.java", "license": "agpl-3.0", "size": 15974 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,321,309
boolean removeFailureListener(FailureListener listener);
boolean removeFailureListener(FailureListener listener);
/** * remove the failure listener * * @param listener the lister to remove * @return true if removed */
remove the failure listener
removeFailureListener
{ "repo_name": "gaohoward/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.java", "license": "apache-2.0", "size": 7056 }
[ "org.apache.activemq.artemis.core.remoting.FailureListener" ]
import org.apache.activemq.artemis.core.remoting.FailureListener;
import org.apache.activemq.artemis.core.remoting.*;
[ "org.apache.activemq" ]
org.apache.activemq;
2,237,340
Response<List<IntelligencePack>> listWithResponse(String resourceGroupName, String workspaceName, Context context);
Response<List<IntelligencePack>> listWithResponse(String resourceGroupName, String workspaceName, Context context);
/** * Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param context The context to associate ...
Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace
listWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IntelligencePacks.java", "license": "mit", "size": 5067 }
[ "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "java.util.List" ]
import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import java.util.List;
import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.util.*;
[ "com.azure.core", "java.util" ]
com.azure.core; java.util;
1,469,826
protected Handler getShortCutKeysHandler() { return new TableShortCutHandler(); }
Handler function() { return new TableShortCutHandler(); }
/** * Get the action handler for the short cut keys. * * @return reference of {@link Handler} to handler the short cut keys. * Default is null. */
Get the action handler for the short cut keys
getShortCutKeysHandler
{ "repo_name": "StBurcher/hawkbit", "path": "hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/table/AbstractTableLayout.java", "license": "epl-1.0", "size": 4523 }
[ "com.vaadin.event.Action" ]
import com.vaadin.event.Action;
import com.vaadin.event.*;
[ "com.vaadin.event" ]
com.vaadin.event;
1,947,060
public static <E> Set<E> compose(Set<E> set, Callback callback) { return new CallbackSet<E>(set, callback); }
static <E> Set<E> function(Set<E> set, Callback callback) { return new CallbackSet<E>(set, callback); }
/** * Returns the composition of the given set and callback. * <p> * Note: Any changes to the original set will cause the returned * set to change and vice versa. But direct changes on the source * will not be propagated with the callback. * </p> * * @param <E> the generic...
Returns the composition of the given set and callback. Note: Any changes to the original set will cause the returned set to change and vice versa. But direct changes on the source will not be propagated with the callback.
compose
{ "repo_name": "cosmocode/cosmocode-commons", "path": "src/main/java/de/cosmocode/collections/callback/Callbacks.java", "license": "apache-2.0", "size": 5183 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,860,295
public static MozuClient<com.mozu.api.contracts.productadmin.Attribute> updateAttributeClient(com.mozu.api.contracts.productadmin.Attribute attribute, String attributeFQN, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.attributedefinition.AttributeUrl.updateAttrib...
static MozuClient<com.mozu.api.contracts.productadmin.Attribute> function(com.mozu.api.contracts.productadmin.Attribute attribute, String attributeFQN, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.attributedefinition.AttributeUrl.updateAttributeUrl(attributeFQN, respo...
/** * Updates an existing attribute with attribute properties to set. * <p><pre><code> * MozuClient<com.mozu.api.contracts.productadmin.Attribute> mozuClient=UpdateAttributeClient( attribute, attributeFQN, responseFields); * client.setBaseAddress(url); * client.executeRequest(); * Attribute attribute = cl...
Updates an existing attribute with attribute properties to set. <code><code> MozuClient mozuClient=UpdateAttributeClient( attribute, attributeFQN, responseFields); client.setBaseAddress(url); client.executeRequest(); Attribute attribute = client.Result(); </code></code>
updateAttributeClient
{ "repo_name": "eileenzhuang1/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/attributedefinition/AttributeClient.java", "license": "mit", "size": 12013 }
[ "com.mozu.api.MozuClient", "com.mozu.api.MozuUrl" ]
import com.mozu.api.MozuClient; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
2,723,934
private BlockingBackChannel initBackChannel() throws Exception { int backChannelMemoryPages = getMemoryManager().computeNumberOfPages(this.config.getRelativeBackChannelMemory()); List<MemorySegment> segments = new ArrayList<MemorySegment>(); int segmentSize = getMemoryManager().getPageSize(); getMemo...
BlockingBackChannel function() throws Exception { int backChannelMemoryPages = getMemoryManager().computeNumberOfPages(this.config.getRelativeBackChannelMemory()); List<MemorySegment> segments = new ArrayList<MemorySegment>(); int segmentSize = getMemoryManager().getPageSize(); getMemoryManager().allocatePages(this, se...
/** * The iteration head prepares the backchannel: it allocates memory, instantiates a {@link BlockingBackChannel} and * hands it to the iteration tail via a {@link Broker} singleton. **/
The iteration head prepares the backchannel: it allocates memory, instantiates a <code>BlockingBackChannel</code> and hands it to the iteration tail via a <code>Broker</code> singleton
initBackChannel
{ "repo_name": "haohui/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/iterative/task/IterationHeadTask.java", "license": "apache-2.0", "size": 18214 }
[ "java.util.ArrayList", "java.util.List", "org.apache.flink.core.memory.MemorySegment", "org.apache.flink.runtime.iterative.concurrent.BlockingBackChannel", "org.apache.flink.runtime.iterative.concurrent.BlockingBackChannelBroker", "org.apache.flink.runtime.iterative.concurrent.Broker", "org.apache.flink...
import java.util.ArrayList; import java.util.List; import org.apache.flink.core.memory.MemorySegment; import org.apache.flink.runtime.iterative.concurrent.BlockingBackChannel; import org.apache.flink.runtime.iterative.concurrent.BlockingBackChannelBroker; import org.apache.flink.runtime.iterative.concurrent.Broker; imp...
import java.util.*; import org.apache.flink.core.memory.*; import org.apache.flink.runtime.iterative.concurrent.*; import org.apache.flink.runtime.iterative.io.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
2,828,499
@UiThreadTest @MediumTest @Feature({"Browser", "Main"}) public void testVeryShortWarningHTTPSUrl() { Spannable url = new SpannableStringBuilder("https://www.dodgysite.com"); OmniboxUrlEmphasizer.emphasizeUrl(url, mResources, mProfile, ToolbarModelSecurityLevel.SECURITY_WA...
@Feature({STR, "Main"}) void function() { Spannable url = new SpannableStringBuilder(STRUnexpected number of spans:STRhttpsSTR: mResources.getColor(R.color.url_emphasis_non_emphasized_text)); spans[2].assertIsColoredSpan(STR, 8, mResources.getColor(R.color.url_emphasis_domain_and_registry)); }
/** * Verify that a very short, warning HTTPS URL is colored correctly by * OmniboxUrlEmphasizer.emphasizeUrl(). */
Verify that a very short, warning HTTPS URL is colored correctly by OmniboxUrlEmphasizer.emphasizeUrl()
testVeryShortWarningHTTPSUrl
{ "repo_name": "mohamed--abdel-maksoud/chromium.src", "path": "chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizerTest.java", "license": "bsd-3-clause", "size": 17558 }
[ "android.text.Spannable", "android.text.SpannableStringBuilder", "org.chromium.base.test.util.Feature" ]
import android.text.Spannable; import android.text.SpannableStringBuilder; import org.chromium.base.test.util.Feature;
import android.text.*; import org.chromium.base.test.util.*;
[ "android.text", "org.chromium.base" ]
android.text; org.chromium.base;
929,706
public void setJobMetaVariables( JobMeta jobMeta ) { for ( int i = 0; i < variables.size(); i++ ) { try { String name = variables.getValueMeta( i ).getName(); String value = variables.getString( i, "" ); jobMeta.setVariable( name, Const.NVL( value, "" ) ); } catch ( Exception ...
void function( JobMeta jobMeta ) { for ( int i = 0; i < variables.size(); i++ ) { try { String name = variables.getValueMeta( i ).getName(); String value = variables.getString( i, STR" ) ); } catch ( Exception e ) { } } }
/** * Set previously defined variables (set variables dialog) on the specified job * * @param jobMeta job's meta */
Set previously defined variables (set variables dialog) on the specified job
setJobMetaVariables
{ "repo_name": "gretchiemoran/pentaho-kettle", "path": "ui/src/org/pentaho/di/ui/spoon/Spoon.java", "license": "apache-2.0", "size": 337886 }
[ "org.pentaho.di.job.JobMeta" ]
import org.pentaho.di.job.JobMeta;
import org.pentaho.di.job.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,365,525
EList<CS> getRealmCodes();
EList<CS> getRealmCodes();
/** * Returns the value of the '<em><b>Realm Code</b></em>' containment reference list. * The list contents are of type {@link org.openhealthtools.mdht.uml.hl7.datatypes.CS}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Realm Code</em>' containment reference list isn't clear, * there r...
Returns the value of the 'Realm Code' containment reference list. The list contents are of type <code>org.openhealthtools.mdht.uml.hl7.datatypes.CS</code>. If the meaning of the 'Realm Code' containment reference list isn't clear, there really should be more of a description here...
getRealmCodes
{ "repo_name": "mdht/mdht", "path": "cda/plugins/org.openhealthtools.mdht.uml.cda/src/org/openhealthtools/mdht/uml/cda/RelatedEntity.java", "license": "epl-1.0", "size": 15317 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
558,240
String getUploaderName() throws ParsingException;
String getUploaderName() throws ParsingException;
/** * Get the uploader name * @return the uploader name * @throws ParsingException if parsing fails */
Get the uploader name
getUploaderName
{ "repo_name": "ram-on/extractor", "path": "src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItemExtractor.java", "license": "gpl-3.0", "size": 2421 }
[ "org.schabi.newpipe.extractor.exceptions.ParsingException" ]
import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.exceptions.*;
[ "org.schabi.newpipe" ]
org.schabi.newpipe;
39,571
public CollectionArtifact createCollection(final boolean containsOnlyArtifacts, final Package pckg) throws WorkspaceExpiredException;
CollectionArtifact function(final boolean containsOnlyArtifacts, final Package pckg) throws WorkspaceExpiredException;
/** * Returns a newly created {@link CollectionArtifact}. * * @param containsOnlyArtifacts * if the {@link CollectionAddedElement} should <tt>only</tt> contain objects of type {@link Artifact}. * @return the newly created {@link CollectionArtifact}. * @throws WorkspaceExpiredException * ...
Returns a newly created <code>CollectionArtifact</code>
createCollection
{ "repo_name": "OnurKirkizoglu/master_thesis", "path": "at.jku.sea.cloud/src/main/java/at/jku/sea/cloud/Workspace.java", "license": "apache-2.0", "size": 30042 }
[ "at.jku.sea.cloud.exceptions.WorkspaceExpiredException" ]
import at.jku.sea.cloud.exceptions.WorkspaceExpiredException;
import at.jku.sea.cloud.exceptions.*;
[ "at.jku.sea" ]
at.jku.sea;
2,274,557
public static void assertPeriodDurations(Timeline timeline, long... durationsUs) { int periodCount = timeline.getPeriodCount(); assertThat(periodCount).isEqualTo(durationsUs.length); Period period = new Period(); for (int i = 0; i < periodCount; i++) { assertThat(timeline.getPeriod(i, period).du...
static void function(Timeline timeline, long... durationsUs) { int periodCount = timeline.getPeriodCount(); assertThat(periodCount).isEqualTo(durationsUs.length); Period period = new Period(); for (int i = 0; i < periodCount; i++) { assertThat(timeline.getPeriod(i, period).durationUs).isEqualTo(durationsUs[i]); } }
/** * Asserts that the durations of the periods in the {@link Timeline} and the durations in the * given sequence are equal. */
Asserts that the durations of the periods in the <code>Timeline</code> and the durations in the given sequence are equal
assertPeriodDurations
{ "repo_name": "androidx/media", "path": "libraries/test_utils/src/main/java/androidx/media3/test/utils/TimelineAsserts.java", "license": "apache-2.0", "size": 11233 }
[ "androidx.media3.common.Timeline", "com.google.common.truth.Truth" ]
import androidx.media3.common.Timeline; import com.google.common.truth.Truth;
import androidx.media3.common.*; import com.google.common.truth.*;
[ "androidx.media3", "com.google.common" ]
androidx.media3; com.google.common;
2,266,852
public MethodNotPublicMatch newMatch(final OpaqueBehavior pMe) { return MethodNotPublicMatch.newMatch(pMe); }
MethodNotPublicMatch function(final OpaqueBehavior pMe) { return MethodNotPublicMatch.newMatch(pMe); }
/** * Returns a new (partial) match. * This can be used e.g. to call the matcher with a partial match. * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. * @param pMe the fixed value of pattern parameter me, or null if not bound. * @return the (...
Returns a new (partial) match. This can be used e.g. to call the matcher with a partial match. The returned match will be immutable. Use <code>#newEmptyMatch()</code> to obtain a mutable match object
newMatch
{ "repo_name": "ELTE-Soft/xUML-RT-Executor", "path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/MethodNotPublicMatcher.java", "license": "epl-1.0", "size": 10247 }
[ "hu.eltesoft.modelexecution.validation.MethodNotPublicMatch", "org.eclipse.uml2.uml.OpaqueBehavior" ]
import hu.eltesoft.modelexecution.validation.MethodNotPublicMatch; import org.eclipse.uml2.uml.OpaqueBehavior;
import hu.eltesoft.modelexecution.validation.*; import org.eclipse.uml2.uml.*;
[ "hu.eltesoft.modelexecution", "org.eclipse.uml2" ]
hu.eltesoft.modelexecution; org.eclipse.uml2;
1,939,516
public void setShadowWidth(float width) { mShadowWidth = Utils.convertDpToPixel(width); }
void function(float width) { mShadowWidth = Utils.convertDpToPixel(width); }
/** * Sets the width of the candle-shadow-line in pixels. Default 3f. * * @param width */
Sets the width of the candle-shadow-line in pixels. Default 3f
setShadowWidth
{ "repo_name": "PeoceWang/WeatherAPP", "path": "app/src/main/java/com/github/mikephil/chartLibrary/data/CandleDataSet.java", "license": "apache-2.0", "size": 2648 }
[ "com.github.mikephil.chartLibrary.utils.Utils" ]
import com.github.mikephil.chartLibrary.utils.Utils;
import com.github.mikephil.*;
[ "com.github.mikephil" ]
com.github.mikephil;
1,648,740
//----------------------------------------------------------------------- public static Date addMinutes(final Date date, final int amount) { return add(date, Calendar.MINUTE, amount); }
static Date function(final Date date, final int amount) { return add(date, Calendar.MINUTE, amount); }
/** * Adds a number of minutes to a date returning a new object. * The original {@code Date} is unchanged. * * @param date the date, not null * @param amount the amount to add, may be negative * @return the new {@code Date} with the amount added * @throws IllegalArgumentException if...
Adds a number of minutes to a date returning a new object. The original Date is unchanged
addMinutes
{ "repo_name": "tdopires/cJUnit-mc626", "path": "toStringBuilder/src/main/java/org/apache/commons/lang3/time/DateUtils.java", "license": "apache-2.0", "size": 81435 }
[ "java.util.Calendar", "java.util.Date" ]
import java.util.Calendar; import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,260,134
static LabelNode[] clone(final List<?> labels, final Map<?, ?> map) { LabelNode[] clones = new LabelNode[labels.size()]; for (int i = 0; i < clones.length; ++i) { clones[i] = (LabelNode) map.get(labels.get(i)); } return clones; }
static LabelNode[] clone(final List<?> labels, final Map<?, ?> map) { LabelNode[] clones = new LabelNode[labels.size()]; for (int i = 0; i < clones.length; ++i) { clones[i] = (LabelNode) map.get(labels.get(i)); } return clones; }
/** * Returns the clones of the given labels. * * @param labels a list of labels. * @param map a map from LabelNodes to cloned LabelNodes. * @return the clones of the given labels. */
Returns the clones of the given labels
clone
{ "repo_name": "mlaux/mcmod", "path": "src/org/objectweb/asm/tree/AbstractInsnNode.java", "license": "mit", "size": 6397 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,925,961
EList<MeterAssetMMXUPair> getMeterAssetToMXXU();
EList<MeterAssetMMXUPair> getMeterAssetToMXXU();
/** * Returns the value of the '<em><b>Meter Asset To MXXU</b></em>' containment reference list. * The list contents are of type {@link gluemodel.MeterAssetMMXUPair}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Meter Asset To MXXU</em>' containment reference list isn't clear, * there really...
Returns the value of the 'Meter Asset To MXXU' containment reference list. The list contents are of type <code>gluemodel.MeterAssetMMXUPair</code>. If the meaning of the 'Meter Asset To MXXU' containment reference list isn't clear, there really should be more of a description here...
getMeterAssetToMXXU
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/Root.java", "license": "mit", "size": 6126 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,166,190
@SuppressFBWarnings(value = "DMI_COLLECTION_OF_URLS", justification = "Only local URLs involved") private Map<ConfigurationKey, Object> readFileProperties(Set<URL> files) { Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); for (URL file : files)...
@SuppressFBWarnings(value = STR, justification = STR) Map<ConfigurationKey, Object> function(Set<URL> files) { Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); for (URL file : files) { ConfigurationLogger.LOG.readingPropertiesFile(file); Properties fileProperties = lo...
/** * Read the set of property files. Keys and Values are automatically validated and converted. * * @param resourceLoader * @return all the properties from the weld.properties file */
Read the set of property files. Keys and Values are automatically validated and converted
readFileProperties
{ "repo_name": "weld/core", "path": "impl/src/main/java/org/jboss/weld/config/WeldConfiguration.java", "license": "apache-2.0", "size": 20464 }
[ "edu.umd.cs.findbugs.annotations.SuppressFBWarnings", "java.util.EnumMap", "java.util.Map", "java.util.Properties", "java.util.Set", "org.jboss.weld.logging.ConfigurationLogger" ]
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.EnumMap; import java.util.Map; import java.util.Properties; import java.util.Set; import org.jboss.weld.logging.ConfigurationLogger;
import edu.umd.cs.findbugs.annotations.*; import java.util.*; import org.jboss.weld.logging.*;
[ "edu.umd.cs", "java.util", "org.jboss.weld" ]
edu.umd.cs; java.util; org.jboss.weld;
1,103,258
private void saveDownloadedFile() { OCFile file = mStorageManager.getFileById(mCurrentDownload.getFile().getFileId()); long syncDate = System.currentTimeMillis(); file.setLastSyncDateForProperties(syncDate); file.setLastSyncDateForData(syncDate); file.setUpdateThumbnailNeeded...
void function() { OCFile file = mStorageManager.getFileById(mCurrentDownload.getFile().getFileId()); long syncDate = System.currentTimeMillis(); file.setLastSyncDateForProperties(syncDate); file.setLastSyncDateForData(syncDate); file.setUpdateThumbnailNeeded(true); file.setModificationTimestamp(mCurrentDownload.getModi...
/** * Updates the OC File after a successful download. * * TODO move to DownloadFileOperation */
Updates the OC File after a successful download. TODO move to DownloadFileOperation
saveDownloadedFile
{ "repo_name": "SpryServers/sprycloud-android", "path": "src/main/java/com/owncloud/android/files/services/FileDownloader.java", "license": "gpl-2.0", "size": 29994 }
[ "com.owncloud.android.datamodel.FileDataStorageManager", "com.owncloud.android.datamodel.OCFile", "com.owncloud.android.utils.MimeTypeUtil", "java.io.File" ]
import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.utils.MimeTypeUtil; import java.io.File;
import com.owncloud.android.datamodel.*; import com.owncloud.android.utils.*; import java.io.*;
[ "com.owncloud.android", "java.io" ]
com.owncloud.android; java.io;
861,595
private void handleChannelSavedEvent(ChannelSavedEvent evt) { List<ChannelData> channels = evt.getChannels(); Iterator<Long> i = evt.getImageIds().iterator(); MetadataViewer viewer; while (i.hasNext()) { viewer = MetadataViewerFactory.getViewerFromId( ImageData.class.getName(),...
void function(ChannelSavedEvent evt) { List<ChannelData> channels = evt.getChannels(); Iterator<Long> i = evt.getImageIds().iterator(); MetadataViewer viewer; while (i.hasNext()) { viewer = MetadataViewerFactory.getViewerFromId( ImageData.class.getName(), i.next()); if (viewer != null) { viewer.onUpdatedChannels(channe...
/** * Updates the view when the channels have been updated. * * @param evt The event to handle. */
Updates the view when the channels have been updated
handleChannelSavedEvent
{ "repo_name": "MontpellierRessourcesImagerie/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/MetadataViewerAgent.java", "license": "gpl-2.0", "size": 15082 }
[ "java.util.Iterator", "java.util.List", "org.openmicroscopy.shoola.agents.events.metadata.ChannelSavedEvent", "org.openmicroscopy.shoola.agents.metadata.view.MetadataViewer", "org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerFactory" ]
import java.util.Iterator; import java.util.List; import org.openmicroscopy.shoola.agents.events.metadata.ChannelSavedEvent; import org.openmicroscopy.shoola.agents.metadata.view.MetadataViewer; import org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerFactory;
import java.util.*; import org.openmicroscopy.shoola.agents.events.metadata.*; import org.openmicroscopy.shoola.agents.metadata.view.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
1,569,429
public void writeTextWithPrefixMatchingSupport(FieldDefinition def, String text) { Validator.notNull(def); writeTextWithPrefixMatchingSupport(def.getSimpleFieldName(), text); }
void function(FieldDefinition def, String text) { Validator.notNull(def); writeTextWithPrefixMatchingSupport(def.getSimpleFieldName(), text); }
/** * Utility method, equivalent to writeTextWithPrefixMatchingSupport(def.getSimpleFieldName(), text) * * USE THIS FIELD TYPE SPARINGLY, IT IS VERY EXPENSIVE. * * @param def The name of the field to write * @param text The text to write */
Utility method, equivalent to writeTextWithPrefixMatchingSupport(def.getSimpleFieldName(), text) USE THIS FIELD TYPE SPARINGLY, IT IS VERY EXPENSIVE
writeTextWithPrefixMatchingSupport
{ "repo_name": "jimmutable/core", "path": "archived/gcloud/src/main/java/org/jimmutable/gcloud/search/DocumentWriter.java", "license": "bsd-3-clause", "size": 5831 }
[ "org.jimmutable.core.serialization.FieldDefinition", "org.jimmutable.core.utils.Validator" ]
import org.jimmutable.core.serialization.FieldDefinition; import org.jimmutable.core.utils.Validator;
import org.jimmutable.core.serialization.*; import org.jimmutable.core.utils.*;
[ "org.jimmutable.core" ]
org.jimmutable.core;
2,206,337
public static void stop(Context _context) { _context.stopService(new Intent(_context, CallService.class)); }
static void function(Context _context) { _context.stopService(new Intent(_context, CallService.class)); }
/** * Gracefully stop service * * @param _context * application context */
Gracefully stop service
stop
{ "repo_name": "IvanPosohov/customize-vibrancy", "path": "src/ru/ivanp/vibro/telephony/CallService.java", "license": "apache-2.0", "size": 7426 }
[ "android.content.Context", "android.content.Intent" ]
import android.content.Context; import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
1,432,488
protected final String createBadReqRes(String badReq, ParseException pe) { StringBuffer buf = new StringBuffer(512); buf.append("SIP/2.0 400 Bad Request (" + pe.getLocalizedMessage() + ')'); // We need the following headers: all Vias, CSeq, Call-ID, From, To if (!copyViaHeaders(bad...
final String function(String badReq, ParseException pe) { StringBuffer buf = new StringBuffer(512); buf.append(STR + pe.getLocalizedMessage() + ')'); if (!copyViaHeaders(badReq, buf)) return null; if (!copyHeader(CSeqHeader.NAME, badReq, buf)) return null; if (!copyHeader(CallIdHeader.NAME, badReq, buf)) return null; i...
/** * Creates a response to a bad request (ie one that causes a ParseException) * * @param badReq * @return message bytes, null if unable to formulate response */
Creates a response to a bad request (ie one that causes a ParseException)
createBadReqRes
{ "repo_name": "rex-xxx/mt6572_x201", "path": "external/nist-sip/java/gov/nist/javax/sip/stack/MessageChannel.java", "license": "gpl-2.0", "size": 16919 }
[ "gov.nist.javax.sip.header.ContentLength", "gov.nist.javax.sip.header.ContentType", "gov.nist.javax.sip.message.MessageFactoryImpl", "java.text.ParseException", "javax.sip.header.CSeqHeader", "javax.sip.header.CallIdHeader", "javax.sip.header.ContentLengthHeader", "javax.sip.header.ContentTypeHeader",...
import gov.nist.javax.sip.header.ContentLength; import gov.nist.javax.sip.header.ContentType; import gov.nist.javax.sip.message.MessageFactoryImpl; import java.text.ParseException; import javax.sip.header.CSeqHeader; import javax.sip.header.CallIdHeader; import javax.sip.header.ContentLengthHeader; import javax.sip.hea...
import gov.nist.javax.sip.header.*; import gov.nist.javax.sip.message.*; import java.text.*; import javax.sip.header.*;
[ "gov.nist.javax", "java.text", "javax.sip" ]
gov.nist.javax; java.text; javax.sip;
2,687,424
@Override public void setCoordenadas(Point2D p1, Point2D p2) { lineTo(p2.getX(), p2.getY()); }
void function(Point2D p1, Point2D p2) { lineTo(p2.getX(), p2.getY()); }
/** * Establece las coordenadas de la figura. * * @param p1 Punto de origen de la figura. * @param p2 Punto final de la figura. */
Establece las coordenadas de la figura
setCoordenadas
{ "repo_name": "germaaan/trabajos_universidad", "path": "3GII/SM/src/formas/GTrazoLibre.java", "license": "gpl-2.0", "size": 3723 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
2,261,286
public void init(Object arg1) throws StandardException { if (arg1 instanceof TypeId) { super.init(arg1, Boolean.TRUE, DataTypeDescriptor.MAXIMUM_WIDTH_UNKNOWN); } else { Integer maxWidth = null; TypeId typeId =...
void function(Object arg1) throws StandardException { if (arg1 instanceof TypeId) { super.init(arg1, Boolean.TRUE, DataTypeDescriptor.MAXIMUM_WIDTH_UNKNOWN); } else { Integer maxWidth = null; TypeId typeId = null; if (arg1 instanceof Date) { maxWidth = TypeId.DATE_MAXWIDTH; typeId = TypeId.getBuiltInTypeId(Types.DATE);...
/** * Initializer for a typed null node * or a date, time, or timestamp value. Parameters may be: * * <ul> * <li>arg1 The TypeId for the type of the node</li> * </ul> * * <p> * - OR - * </p> * * <ul> * <li>arg1 the date, time, or timestamp value</li> ...
Initializer for a typed null node or a date, time, or timestamp value. Parameters may be: arg1 The TypeId for the type of the node - OR - arg1 the date, time, or timestamp value
init
{ "repo_name": "youngor/openclouddb", "path": "src/main/java/com/akiban/sql/parser/UserTypeConstantNode.java", "license": "apache-2.0", "size": 5728 }
[ "com.akiban.sql.StandardException", "com.akiban.sql.types.DataTypeDescriptor", "com.akiban.sql.types.TypeId", "java.sql.Date", "java.sql.Time", "java.sql.Timestamp", "java.sql.Types" ]
import com.akiban.sql.StandardException; import com.akiban.sql.types.DataTypeDescriptor; import com.akiban.sql.types.TypeId; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.sql.Types;
import com.akiban.sql.*; import com.akiban.sql.types.*; import java.sql.*;
[ "com.akiban.sql", "java.sql" ]
com.akiban.sql; java.sql;
728,385
public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { return getElementsByTagName(localName); }
NodeList function(String namespaceURI, String localName) { return getElementsByTagName(localName); }
/** * Equivalent to <code>getElementsByTagName(localName)</code>. */
Equivalent to <code>getElementsByTagName(localName)</code>
getElementsByTagNameNS
{ "repo_name": "lostdj/Jaklin-OpenJDK-JDK", "path": "src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataNode.java", "license": "gpl-2.0", "size": 33401 }
[ "org.w3c.dom.NodeList" ]
import org.w3c.dom.NodeList;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,484,939
public void showFAQ(Activity activity, Tag origin) { if (origin == null) { origin = Tag.ORIGIN_UNKNOWN; } // track origin and helpshift screen in analytics Map<String, Object> properties = new HashMap<String, Object>(); properties.put(HELPSHIFT_SCREEN_KEY, "faq");...
void function(Activity activity, Tag origin) { if (origin == null) { origin = Tag.ORIGIN_UNKNOWN; } Map<String, Object> properties = new HashMap<String, Object>(); properties.put(HELPSHIFT_SCREEN_KEY, "faq"); properties.put(HELPSHIFT_ORIGIN_KEY, origin.toString()); AnalyticsTracker.track(Stat.SUPPORT_OPENED_HELPSHIFT_S...
/** * Show FAQ activity * Automatically add default metadata to this conversation (users can start a conversation from FAQ screen). */
Show FAQ activity Automatically add default metadata to this conversation (users can start a conversation from FAQ screen)
showFAQ
{ "repo_name": "karambir252/WordPress-Android", "path": "WordPress/src/main/java/org/wordpress/android/util/HelpshiftHelper.java", "license": "gpl-2.0", "size": 8053 }
[ "android.app.Activity", "com.helpshift.support.Support", "java.util.HashMap", "java.util.Map", "org.wordpress.android.analytics.AnalyticsTracker" ]
import android.app.Activity; import com.helpshift.support.Support; import java.util.HashMap; import java.util.Map; import org.wordpress.android.analytics.AnalyticsTracker;
import android.app.*; import com.helpshift.support.*; import java.util.*; import org.wordpress.android.analytics.*;
[ "android.app", "com.helpshift.support", "java.util", "org.wordpress.android" ]
android.app; com.helpshift.support; java.util; org.wordpress.android;
710,858
public int getMetaFromState(IBlockState state) { return ((Integer)state.getValue(AGE)).intValue(); }
int function(IBlockState state) { return ((Integer)state.getValue(AGE)).intValue(); }
/** * Convert the BlockState into the correct metadata value */
Convert the BlockState into the correct metadata value
getMetaFromState
{ "repo_name": "Im-Jrotica/forge_latest", "path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockStem.java", "license": "lgpl-2.1", "size": 7467 }
[ "net.minecraft.block.state.IBlockState" ]
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.state.*;
[ "net.minecraft.block" ]
net.minecraft.block;
2,463,322
public static Resource newResource(URL url, boolean useCaches) { if (url==null) return null; String url_string=url.toExternalForm(); if( url_string.startsWith( "file:")) { try { FileResource fileResource= new FileResource(...
static Resource function(URL url, boolean useCaches) { if (url==null) return null; String url_string=url.toExternalForm(); if( url_string.startsWith( "file:")) { try { FileResource fileResource= new FileResource(url); return fileResource; } catch(Exception e) { Log.debug(Log.EXCEPTION,e); return new BadResource(url,e.t...
/** * Construct a resource from a url. * @param url the url for which to make the resource * @param useCaches true enables URLConnection caching if applicable to the type of resource * @return */
Construct a resource from a url
newResource
{ "repo_name": "napcs/qedserver", "path": "jetty/modules/jetty/src/main/java/org/mortbay/resource/Resource.java", "license": "mit", "size": 18071 }
[ "org.mortbay.log.Log" ]
import org.mortbay.log.Log;
import org.mortbay.log.*;
[ "org.mortbay.log" ]
org.mortbay.log;
1,699,825
@Test public void testJavaVersionCompareTo() { JavaVersion version = new JavaVersion(1, 4); // Differs on major numbers. assertEquals( 1, version.comapreTo(new JavaVersion(0, 4))); assertEquals(-1, version.comapreTo(new JavaVersion(2, 4))); // Differs on minor numbers. ...
void function() { JavaVersion version = new JavaVersion(1, 4); assertEquals( 1, version.comapreTo(new JavaVersion(0, 4))); assertEquals(-1, version.comapreTo(new JavaVersion(2, 4))); assertEquals( 1, version.comapreTo(new JavaVersion(1, 3))); assertEquals(-1, version.comapreTo(new JavaVersion(1, 5))); assertEquals( 0, ...
/** * Test <code>JavaVersion.comapreTo</code> functionality. */
Test <code>JavaVersion.comapreTo</code> functionality
testJavaVersionCompareTo
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/helper/JavaUtilTest.java", "license": "epl-1.0", "size": 7666 }
[ "org.eclipse.persistence.internal.helper.JavaVersion" ]
import org.eclipse.persistence.internal.helper.JavaVersion;
import org.eclipse.persistence.internal.helper.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
1,563,814
protected void updateAttributes() { if (!isAttributesVisible()) { return; } FigAttributesCompartment attributesCompartment = getAttributesFig(); attributesCompartment.populate(); Rectangle rect = getBounds(); // ouch ugly but that's for a next refactorin...
void function() { if (!isAttributesVisible()) { return; } FigAttributesCompartment attributesCompartment = getAttributesFig(); attributesCompartment.populate(); Rectangle rect = getBounds(); setBounds(rect.x, rect.y, rect.width, rect.height); }
/** * Updates the attributes in the fig. Called from modelchanged if there is * a modelevent effecting the attributes and from renderingChanged in all * cases. */
Updates the attributes in the fig. Called from modelchanged if there is a modelevent effecting the attributes and from renderingChanged in all cases
updateAttributes
{ "repo_name": "carvalhomb/tsmells", "path": "sample/argouml/argouml/org/argouml/uml/diagram/static_structure/ui/FigClass.java", "license": "gpl-2.0", "size": 39546 }
[ "java.awt.Rectangle", "org.argouml.uml.diagram.ui.FigAttributesCompartment" ]
import java.awt.Rectangle; import org.argouml.uml.diagram.ui.FigAttributesCompartment;
import java.awt.*; import org.argouml.uml.diagram.ui.*;
[ "java.awt", "org.argouml.uml" ]
java.awt; org.argouml.uml;
5,535
@Authorized( { PrivilegeConstants.DELETE_PROBLEMS }) public void voidProblem(Problem problem, String reason) throws APIException;
@Authorized( { PrivilegeConstants.DELETE_PROBLEMS }) void function(Problem problem, String reason) throws APIException;
/** * Used only in cases where the Problem was entered by error * * @param problem * @param reason * @throws APIException */
Used only in cases where the Problem was entered by error
voidProblem
{ "repo_name": "milankarunarathne/openmrs-core", "path": "api/src/main/java/org/openmrs/api/PatientService.java", "license": "mpl-2.0", "size": 44475 }
[ "org.openmrs.activelist.Problem", "org.openmrs.annotation.Authorized", "org.openmrs.util.PrivilegeConstants" ]
import org.openmrs.activelist.Problem; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants;
import org.openmrs.activelist.*; import org.openmrs.annotation.*; import org.openmrs.util.*;
[ "org.openmrs.activelist", "org.openmrs.annotation", "org.openmrs.util" ]
org.openmrs.activelist; org.openmrs.annotation; org.openmrs.util;
2,633,010
public static Action scheduleErrataUpdate(User user, Server server, List<Integer> errataIds, Date earliest, ActionChain actionChain) { Set<Long> serverIds = new HashSet<Long>(); serverIds.add(server.getId()); Set<Action> actions = scheduleErrataUpdates(user, serverIds, errataIds,...
static Action function(User user, Server server, List<Integer> errataIds, Date earliest, ActionChain actionChain) { Set<Long> serverIds = new HashSet<Long>(); serverIds.add(server.getId()); Set<Action> actions = scheduleErrataUpdates(user, serverIds, errataIds, earliest, actionChain); return actions.iterator().next(); ...
/** * Schedules an Errata update on a server. * @param user the user scheduling actions * @param server the affected server * @param errataIds a list of erratas IDs * @param earliest the earliest execution date * @param actionChain the action chain or null * @return scheduled actions ...
Schedules an Errata update on a server
scheduleErrataUpdate
{ "repo_name": "mcalmer/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/action/ActionChainManager.java", "license": "gpl-2.0", "size": 23405 }
[ "com.redhat.rhn.domain.action.Action", "com.redhat.rhn.domain.action.ActionChain", "com.redhat.rhn.domain.server.Server", "com.redhat.rhn.domain.user.User", "java.util.Date", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import com.redhat.rhn.domain.action.Action; import com.redhat.rhn.domain.action.ActionChain; import com.redhat.rhn.domain.server.Server; import com.redhat.rhn.domain.user.User; import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Set;
import com.redhat.rhn.domain.action.*; import com.redhat.rhn.domain.server.*; import com.redhat.rhn.domain.user.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
1,617,512
Set<Classroom> getClassrooms();
Set<Classroom> getClassrooms();
/** * Return the value associated with the column: classroom. * @return A Set&lt;Classroom&gt; object (this.classroom) */
Return the value associated with the column: classroom
getClassrooms
{ "repo_name": "rpgm/mi15", "path": "rpgm/modules/repository/src/main/java/org/yarlithub/yschool/repository/model/obj/yschool/iface/IDivision.java", "license": "apache-2.0", "size": 1411 }
[ "java.util.Set", "org.yarlithub.yschool.repository.model.obj.yschool.Classroom" ]
import java.util.Set; import org.yarlithub.yschool.repository.model.obj.yschool.Classroom;
import java.util.*; import org.yarlithub.yschool.repository.model.obj.yschool.*;
[ "java.util", "org.yarlithub.yschool" ]
java.util; org.yarlithub.yschool;
1,468,112
return ((salt, bytes) -> SCrypt.generate(bytes, salt, SCRYPT_ITERATIONS, R, P, DKLEN)); // bytes before salt here }
return ((salt, bytes) -> SCrypt.generate(bytes, salt, SCRYPT_ITERATIONS, R, P, DKLEN)); }
/** * Returns a SCrypt generator that uses 2^20 iterations, r=8, p=1 and dkLen = 32 * * @return an instance of HashAlgorithm that supports strong SCrypt hashing */
Returns a SCrypt generator that uses 2^20 iterations, r=8, p=1 and dkLen = 32
getMaxSCryptAlgo
{ "repo_name": "wolpert/shash", "path": "src/main/java/com/codeheadsystems/shash/SupportedHashAlgorithm.java", "license": "bsd-3-clause", "size": 2212 }
[ "org.bouncycastle.crypto.generators.SCrypt" ]
import org.bouncycastle.crypto.generators.SCrypt;
import org.bouncycastle.crypto.generators.*;
[ "org.bouncycastle.crypto" ]
org.bouncycastle.crypto;
380,495
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<String> listRefTransitiveMemberOf(String servicePrincipalId);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<String> listRefTransitiveMemberOf(String servicePrincipalId);
/** * Get ref of transitiveMemberOf from servicePrincipals. * * @param servicePrincipalId key: id of servicePrincipal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.authorization.fluent.models.OdataErrorMainException thrown if t...
Get ref of transitiveMemberOf from servicePrincipals
listRefTransitiveMemberOf
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ServicePrincipalsClient.java", "license": "mit", "size": 228379 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*;
[ "com.azure.core" ]
com.azure.core;
107,310
public static File getDownloadFolder() { File root = getApplicationFolder(); if (root != null) { File folder = new File(root, DOWNLOAD_FOLDER); if (!folder.exists()) { folder.mkdir(); } return folder; } else { r...
static File function() { File root = getApplicationFolder(); if (root != null) { File folder = new File(root, DOWNLOAD_FOLDER); if (!folder.exists()) { folder.mkdir(); } return folder; } else { return null; } }
/** * Get the application download folder on the SD Card. Create it if not present. * * @return The application download folder. */
Get the application download folder on the SD Card. Create it if not present
getDownloadFolder
{ "repo_name": "piscesQ/zirco-browser", "path": "src/org/zirco/utils/IOUtils.java", "license": "gpl-3.0", "size": 3719 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,207,706
public ObjectKey getPrimaryKey() { return SimpleKey.keyFor(getId()); }
ObjectKey function() { return SimpleKey.keyFor(getId()); }
/** * returns an id that differentiates this object from others * of its class. */
returns an id that differentiates this object from others of its class
getPrimaryKey
{ "repo_name": "Esleelkartea/serteca", "path": "fuentes/src/net/idtoki/serteca/model/BaseTrabajador.java", "license": "gpl-2.0", "size": 33132 }
[ "org.apache.torque.om.ObjectKey", "org.apache.torque.om.SimpleKey" ]
import org.apache.torque.om.ObjectKey; import org.apache.torque.om.SimpleKey;
import org.apache.torque.om.*;
[ "org.apache.torque" ]
org.apache.torque;
1,058,279
return toDrill(context, Lists.newArrayList(input), expr); }
return toDrill(context, Lists.newArrayList(input), expr); }
/** * Converts a tree of {@link RexNode} operators into a scalar expression in Drill syntax using one input. * * @param context parse context which contains planner settings * @param input data input * @param expr expression to be converted * @return converted expression */
Converts a tree of <code>RexNode</code> operators into a scalar expression in Drill syntax using one input
toDrill
{ "repo_name": "sudheeshkatkam/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillOptiq.java", "license": "apache-2.0", "size": 25622 }
[ "com.google.common.collect.Lists" ]
import com.google.common.collect.Lists;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
922,385
Set<String> customCapabilities();
Set<String> customCapabilities();
/** * Returns additional capabilities, that this repository type implements. * @return A list of custom capabilities. */
Returns additional capabilities, that this repository type implements
customCapabilities
{ "repo_name": "apache/archiva", "path": "archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryCapabilities.java", "license": "apache-2.0", "size": 3169 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,905,199
@Nullable public static Bitmap readDownsampledImage(@NonNull final String filePath, final int maxX, final int maxY) { int orientation = ExifInterface.ORIENTATION_NORMAL; try { final ExifInterface exif = new ExifInterface(filePath); orientation = exif.getAttributeInt(ExifI...
static Bitmap function(@NonNull final String filePath, final int maxX, final int maxY) { int orientation = ExifInterface.ORIENTATION_NORMAL; try { final ExifInterface exif = new ExifInterface(filePath); orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); } catch (final I...
/** * Reads and scales an image file with downsampling in one step to prevent memory consumption. * * @param filePath * The file to read * @param maxX * The desired width * @param maxY * The desired height * @return Bitmap the image or null i...
Reads and scales an image file with downsampling in one step to prevent memory consumption
readDownsampledImage
{ "repo_name": "Bananeweizen/cgeo", "path": "main/src/cgeo/geocaching/utils/ImageUtils.java", "license": "apache-2.0", "size": 20484 }
[ "android.graphics.Bitmap", "android.graphics.BitmapFactory", "android.graphics.Matrix", "android.media.ExifInterface", "android.support.annotation.NonNull", "java.io.IOException" ]
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.media.ExifInterface; import android.support.annotation.NonNull; import java.io.IOException;
import android.graphics.*; import android.media.*; import android.support.annotation.*; import java.io.*;
[ "android.graphics", "android.media", "android.support", "java.io" ]
android.graphics; android.media; android.support; java.io;
1,167,992
public void configureMessage(GenericFile<T> file, Message message) { message.setBody(file); if (flatten) { // when flatten the file name should not contain any paths message.setHeader(Exchange.FILE_NAME, file.getFileNameOnly()); } else { // compute name t...
void function(GenericFile<T> file, Message message) { message.setBody(file); if (flatten) { message.setHeader(Exchange.FILE_NAME, file.getFileNameOnly()); } else { String name = file.isAbsolute() ? file.getAbsoluteFilePath() : file.getRelativeFilePath(); String endpointPath = getConfiguration().getDirectory() + getFile...
/** * Configures the given message with the file which sets the body to the * file object. */
Configures the given message with the file which sets the body to the file object
configureMessage
{ "repo_name": "oalles/camel", "path": "camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java", "license": "apache-2.0", "size": 58494 }
[ "org.apache.camel.Exchange", "org.apache.camel.Message", "org.apache.camel.util.FileUtil", "org.apache.camel.util.ObjectHelper" ]
import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.util.FileUtil; import org.apache.camel.util.ObjectHelper;
import org.apache.camel.*; import org.apache.camel.util.*;
[ "org.apache.camel" ]
org.apache.camel;
1,991,261
@Test() public void testSearchWithoutConnection() throws Exception { final InMemoryDirectoryServer ds = getTestDS(true, true); assertEquals(ds.countEntries(), 3); // Test a basic search that returns everything. SearchResult searchResult = ds.search("dc=example,dc=com", SearchSc...
@Test() void function() throws Exception { final InMemoryDirectoryServer ds = getTestDS(true, true); assertEquals(ds.countEntries(), 3); SearchResult searchResult = ds.search(STR, SearchScope.SUB, STR); List<SearchResultEntry> entryList = searchResult.getSearchEntries(); assertEquals(entryList.size(), 3); assertEquals(...
/** * Provides a number of tests for search processing in the directory server * class. * * @throws Exception If an unexpected problem occurs. */
Provides a number of tests for search processing in the directory server class
testSearchWithoutConnection
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/listener/InMemoryDirectoryServerTestCase.java", "license": "gpl-2.0", "size": 211674 }
[ "com.unboundid.ldap.sdk.LDAPException", "com.unboundid.ldap.sdk.ResultCode", "com.unboundid.ldap.sdk.SearchResult", "com.unboundid.ldap.sdk.SearchResultEntry", "com.unboundid.ldap.sdk.SearchScope", "java.util.List", "org.testng.annotations.Test" ]
import com.unboundid.ldap.sdk.LDAPException; import com.unboundid.ldap.sdk.ResultCode; import com.unboundid.ldap.sdk.SearchResult; import com.unboundid.ldap.sdk.SearchResultEntry; import com.unboundid.ldap.sdk.SearchScope; import java.util.List; import org.testng.annotations.Test;
import com.unboundid.ldap.sdk.*; import java.util.*; import org.testng.annotations.*;
[ "com.unboundid.ldap", "java.util", "org.testng.annotations" ]
com.unboundid.ldap; java.util; org.testng.annotations;
2,003,448
public static File getTestDirectoryFile() { if (baseDir == null) { final String baseDirProp = getTestDirectory(); // the directory maybe expressed as URI in certain environments if (baseDirProp.startsWith("file://")) { try { baseDir = g...
static File function() { if (baseDir == null) { final String baseDirProp = getTestDirectory(); if (baseDirProp.startsWith("file: try { baseDir = getCanonicalFile(new File(new URI(baseDirProp))); } catch (final URISyntaxException e) { baseDir = getCanonicalFile(new File(baseDirProp)); } } else { baseDir = getCanonicalFi...
/** * Locates the base directory for this test. */
Locates the base directory for this test
getTestDirectoryFile
{ "repo_name": "apache/commons-vfs", "path": "commons-vfs2/src/test/java/org/apache/commons/vfs2/VfsTestUtils.java", "license": "apache-2.0", "size": 6267 }
[ "java.io.File", "java.net.URISyntaxException" ]
import java.io.File; import java.net.URISyntaxException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
1,890,280
public void setCustomDomain(final CustomDomain customDomainValue) { this.customDomain = customDomainValue; } private Calendar lastGeoFailoverTime;
void function(final CustomDomain customDomainValue) { this.customDomain = customDomainValue; } private Calendar lastGeoFailoverTime;
/** * Optional. Gets the user assigned custom domain assigned to this storage * account. * @param customDomainValue The CustomDomain value. */
Optional. Gets the user assigned custom domain assigned to this storage account
setCustomDomain
{ "repo_name": "flydream2046/azure-sdk-for-java", "path": "resource-management/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/models/StorageAccount.java", "license": "apache-2.0", "size": 9368 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
920,962
@Override public String toString() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE); }
String function() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE); }
/** * Generates a String representation of the contents of this type. * This is an extension method, produced by the 'ts' xjc plugin * */
Generates a String representation of the contents of this type. This is an extension method, produced by the 'ts' xjc plugin
toString
{ "repo_name": "fpompermaier/onvif", "path": "onvif-ws-client/src/main/java/org/onvif/ver10/advancedsecurity/wsdl/CreatePKCS10CSRResponse.java", "license": "apache-2.0", "size": 1970 }
[ "org.apache.commons.lang3.builder.ToStringBuilder", "org.apache.cxf.xjc.runtime.JAXBToStringStyle" ]
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.cxf.xjc.runtime.JAXBToStringStyle;
import org.apache.commons.lang3.builder.*; import org.apache.cxf.xjc.runtime.*;
[ "org.apache.commons", "org.apache.cxf" ]
org.apache.commons; org.apache.cxf;
463,937
private void waitForThread() { if ((this.thread != null) && this.thread.isAlive()) { try { this.thread.join(); } catch (final InterruptedException e) { this.plugin.getLogger().log(Level.SEVERE, null, e); } } }
void function() { if ((this.thread != null) && this.thread.isAlive()) { try { this.thread.join(); } catch (final InterruptedException e) { this.plugin.getLogger().log(Level.SEVERE, null, e); } } }
/** * As the result of Updater output depends on the thread's completion, it is necessary to wait for the thread to finish * before allowing anyone to check the result. */
As the result of Updater output depends on the thread's completion, it is necessary to wait for the thread to finish before allowing anyone to check the result
waitForThread
{ "repo_name": "Netdex/CircuitDetector", "path": "src/net/gravitydevelopment/updater/Updater.java", "license": "mit", "size": 29874 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,630,851
@Override public Number getValue(Comparable row, Comparable column) { List l = (List) this.data.getObject(row, column); double average = 0.0d; int count = 0; if (l != null && l.size() > 0) { for (int i = 0; i < l.size(); i++) { Number n = (Numbe...
Number function(Comparable row, Comparable column) { List l = (List) this.data.getObject(row, column); double average = 0.0d; int count = 0; if (l != null && l.size() > 0) { for (int i = 0; i < l.size(); i++) { Number n = (Number) l.get(i); average += n.doubleValue(); count += 1; } if (count > 0) { average = average / ...
/** * Returns the average value for the specified item. * * @param row the row key. * @param column the column key. * * @return The average value. */
Returns the average value for the specified item
getValue
{ "repo_name": "ciaracdb/LOG6302", "path": "examples/jfreechart/source/org/jfree/data/statistics/DefaultMultiValueCategoryDataset.java", "license": "apache-2.0", "size": 12618 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
518,885
public boolean put(String domain, byte[] secureHash, long save) { if (domain != null && domain.length() != 0) { if (secureHash != null && secureHash.length != 0) { mCacheMap.put( new Integer(mBigScrew ^ domain.hashCode()), new CacheEntry(do...
boolean function(String domain, byte[] secureHash, long save) { if (domain != null && domain.length() != 0) { if (secureHash != null && secureHash.length != 0) { mCacheMap.put( new Integer(mBigScrew ^ domain.hashCode()), new CacheEntry(domain, secureHash, save)); return true; } } return false; } private class CacheEntr...
/** * Adds the (domain, secureHash) tuple to the cache * @param domain The domain to be added to the cache * @param secureHash The secure hash to be added to the cache * @return True iff succeeds */
Adds the (domain, secureHash) tuple to the cache
put
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/net/http/CertificateValidatorCache.java", "license": "gpl-3.0", "size": 8168 }
[ "android.os.SystemClock" ]
import android.os.SystemClock;
import android.os.*;
[ "android.os" ]
android.os;
1,665,064
public static GUIColor getRequestedColor(String color, GUIColor defaultColor) throws GUIParserException { if (color == null || color.length() == 0) { return defaultColor; } else{ return new GUIColor(color); } }
static GUIColor function(String color, GUIColor defaultColor) throws GUIParserException { if (color == null color.length() == 0) { return defaultColor; } else{ return new GUIColor(color); } }
/** * Get color * @param color * @param default color * @return value */
Get color
getRequestedColor
{ "repo_name": "andreasdr/tdme", "path": "src/net/drewke/tdme/gui/nodes/GUINode.java", "license": "mit", "size": 35207 }
[ "net.drewke.tdme.gui.GUIParserException" ]
import net.drewke.tdme.gui.GUIParserException;
import net.drewke.tdme.gui.*;
[ "net.drewke.tdme" ]
net.drewke.tdme;
378,915
// Params are the arguments // The number of argument must correspond with the problem constructor params String base = "jmetal.problems."; if (name.equals("TSP") || name.equals("OneMax")) base += "singleObjective." ; else if (name.equals("mQAP")) base += "mqap." ; else if (name.substri...
String base = STR; if (name.equals("TSP") name.equals(STR)) base += STR ; else if (name.equals("mQAP")) base += "mqap." ; else if (name.substring(0,name.length()-1).equalsIgnoreCase("DTLZ")) base += "DTLZ."; else if (name.substring(0,name.length()-1).equalsIgnoreCase("WFG")) base += "WFG."; else if (name.substring(0,na...
/** * Creates an object representing a problem * @param name Name of the problem * @param params Parameters characterizing the problem * @return The object representing the problem * @throws JMException */
Creates an object representing a problem
getProblem
{ "repo_name": "dkatsios/JSOptimizer", "path": "JSOptimizer/JMETALHOME/jmetal/problems/ProblemFactory.java", "license": "gpl-3.0", "size": 3424 }
[ "java.lang.reflect.Constructor" ]
import java.lang.reflect.Constructor;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,559,314
public static String toString(InetSocketAddress value) { Preconditions.checkNotNull(value); return value.getHostName() + ":" + value.getPort(); }
static String function(InetSocketAddress value) { Preconditions.checkNotNull(value); return value.getHostName() + ":" + value.getPort(); }
/** * Attempts to return a usable String given an InetSocketAddress. * * @param value the InetSocketAddress. * @return the String representation of the InetSocketAddress. */
Attempts to return a usable String given an InetSocketAddress
toString
{ "repo_name": "shahankhatch/aurora", "path": "commons/src/main/java/org/apache/aurora/common/net/InetSocketAddressHelper.java", "license": "apache-2.0", "size": 4520 }
[ "com.google.common.base.Preconditions", "java.net.InetSocketAddress" ]
import com.google.common.base.Preconditions; import java.net.InetSocketAddress;
import com.google.common.base.*; import java.net.*;
[ "com.google.common", "java.net" ]
com.google.common; java.net;
2,669,934
private int deleteSyncFolderWithId(long id) { return mContentResolver.delete( ProviderMeta.ProviderTableMeta.CONTENT_URI_SYNCED_FOLDERS, ProviderMeta.ProviderTableMeta._ID + " = ?", new String[]{String.valueOf(id)} ); }
int function(long id) { return mContentResolver.delete( ProviderMeta.ProviderTableMeta.CONTENT_URI_SYNCED_FOLDERS, ProviderMeta.ProviderTableMeta._ID + STR, new String[]{String.valueOf(id)} ); }
/** * Delete a synced folder from the db * * @param id for the synced folder. */
Delete a synced folder from the db
deleteSyncFolderWithId
{ "repo_name": "jsargent7089/android", "path": "src/main/java/com/owncloud/android/datamodel/SyncedFolderProvider.java", "license": "gpl-2.0", "size": 16351 }
[ "com.owncloud.android.db.ProviderMeta" ]
import com.owncloud.android.db.ProviderMeta;
import com.owncloud.android.db.*;
[ "com.owncloud.android" ]
com.owncloud.android;
2,310,727
@SuppressWarnings("unchecked") private static Path<Object> getPropertyPath(Root<?> root, Object propertyId, boolean join) { String[] propertyIdParts = ((String) propertyId).split("\\."); Path<?> path = null; Join<?, ?> curJoin = null; for (int i = 0; i < propertyIdParts.length; i++) { String part = prop...
@SuppressWarnings(STR) static Path<Object> function(Root<?> root, Object propertyId, boolean join) { String[] propertyIdParts = ((String) propertyId).split("\\."); Path<?> path = null; Join<?, ?> curJoin = null; for (int i = 0; i < propertyIdParts.length; i++) { String part = propertyIdParts[i]; if (path == null) { pat...
/** * Gets property path. * * @param root the root where path starts form * @param propertyId the property ID * @param join set to true if you want implicit joins to be created for * ALL collections * @return the path to property */
Gets property path
getPropertyPath
{ "repo_name": "opencirclesolutions/dynamo", "path": "dynamo-impl/src/main/java/com/ocs/dynamo/dao/impl/JpaQueryBuilder.java", "license": "apache-2.0", "size": 26582 }
[ "java.util.Collection", "java.util.Set", "javax.persistence.criteria.Join", "javax.persistence.criteria.Path", "javax.persistence.criteria.Root" ]
import java.util.Collection; import java.util.Set; import javax.persistence.criteria.Join; import javax.persistence.criteria.Path; import javax.persistence.criteria.Root;
import java.util.*; import javax.persistence.criteria.*;
[ "java.util", "javax.persistence" ]
java.util; javax.persistence;
2,715,821
public List<RegistryCredentials> registries() { return this.registries; }
List<RegistryCredentials> function() { return this.registries; }
/** * Get the registries property: Collection of private container registry credentials for containers used by the * Container app. * * @return the registries value. */
Get the registries property: Collection of private container registry credentials for containers used by the Container app
registries
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/Configuration.java", "license": "mit", "size": 5067 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,635,221
public JSONResponse setContent(ByteBuf channelBuffer) { if(channelOutputStream!=null) { throw new RuntimeException("Cannot set content. OutputStream already set"); } content = channelBuffer; //channelOutputStream = new ByteBufOutputStream(channelBuffer); return this; }
JSONResponse function(ByteBuf channelBuffer) { if(channelOutputStream!=null) { throw new RuntimeException(STR); } content = channelBuffer; return this; }
/** * Sets the payload content from the passed buffer * @param channelBuffer The buffer to set the content to * @return this json response */
Sets the payload content from the passed buffer
setContent
{ "repo_name": "nickman/HeliosStreams", "path": "web-rpc/src/main/java/com/heliosapm/webrpc/jsonservice/JSONResponse.java", "license": "apache-2.0", "size": 14340 }
[ "io.netty.buffer.ByteBuf" ]
import io.netty.buffer.ByteBuf;
import io.netty.buffer.*;
[ "io.netty.buffer" ]
io.netty.buffer;
1,602,513
public ScriptGroup[] searchGroupsInZone(String shortNameFilter, String zone, int maxItems, int skipCount) { return searchGroupsInZone(shortNameFilter, zone, new ScriptPagingDetails(maxItems, skipCount), null); }
ScriptGroup[] function(String shortNameFilter, String zone, int maxItems, int skipCount) { return searchGroupsInZone(shortNameFilter, zone, new ScriptPagingDetails(maxItems, skipCount), null); }
/** * Search for groups in a specific zone * Includes paging parameters to limit size of results returned. * * @param shortNameFilter partial match on shortName (* and ?) work. If empty then matches everything. * @param zone zone to search in. * @param maxItems Maximum number of it...
Search for groups in a specific zone Includes paging parameters to limit size of results returned
searchGroupsInZone
{ "repo_name": "daniel-he/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/security/authority/script/ScriptAuthorityService.java", "license": "lgpl-3.0", "size": 22539 }
[ "org.alfresco.util.ScriptPagingDetails" ]
import org.alfresco.util.ScriptPagingDetails;
import org.alfresco.util.*;
[ "org.alfresco.util" ]
org.alfresco.util;
837,014
@Test public void testFileContextDoesntDnsResolveLogicalURI() throws Exception { FileSystem fs = HATestUtil.configureFailoverFs(cluster, conf); NameService spyNS = spyOnNameService(); String logicalHost = fs.getUri().getHost(); Configuration haClientConf = fs.getConf(); FileContext fc = Fil...
void function() throws Exception { FileSystem fs = HATestUtil.configureFailoverFs(cluster, conf); NameService spyNS = spyOnNameService(); String logicalHost = fs.getUri().getHost(); Configuration haClientConf = fs.getConf(); FileContext fc = FileContext.getFileContext(haClientConf); Path root = new Path("/"); fc.listSt...
/** * Same test as above, but for FileContext. */
Same test as above, but for FileContext
testFileContextDoesntDnsResolveLogicalURI
{ "repo_name": "ronny-macmaster/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientFailover.java", "license": "apache-2.0", "size": 14350 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileContext", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.server.namenode.ha.HATestUtil", "org.mockito.Mockito" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileContext; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.server.namenode.ha.HATestUtil; import org.mockito.Mockito;
import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.server.namenode.ha.*; import org.mockito.*;
[ "org.apache.hadoop", "org.mockito" ]
org.apache.hadoop; org.mockito;
2,177,308
public void setTWorkItemKey(ObjectKey key) throws TorqueException { setWorkItem(new Integer(((NumberKey) key).intValue())); } private TPerson aTPerson;
void function(ObjectKey key) throws TorqueException { setWorkItem(new Integer(((NumberKey) key).intValue())); } private TPerson aTPerson;
/** * Provides convenient way to set a relationship based on a * ObjectKey, for example * <code>bar.setFooKey(foo.getPrimaryKey())</code> * */
Provides convenient way to set a relationship based on a ObjectKey, for example <code>bar.setFooKey(foo.getPrimaryKey())</code>
setTWorkItemKey
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTPersonBasket.java", "license": "gpl-3.0", "size": 36701 }
[ "com.aurel.track.persist.TPerson", "org.apache.torque.TorqueException", "org.apache.torque.om.NumberKey", "org.apache.torque.om.ObjectKey" ]
import com.aurel.track.persist.TPerson; import org.apache.torque.TorqueException; import org.apache.torque.om.NumberKey; import org.apache.torque.om.ObjectKey;
import com.aurel.track.persist.*; import org.apache.torque.*; import org.apache.torque.om.*;
[ "com.aurel.track", "org.apache.torque" ]
com.aurel.track; org.apache.torque;
1,794,169
@Override public boolean ownDeletesAreVisible(int type) throws SQLException { return false; }
boolean function(int type) throws SQLException { return false; }
/** * <p> * <h1>Implementation Details:</h1><br> * Returns false * </p> */
Implementation Details: Returns false
ownDeletesAreVisible
{ "repo_name": "jonathanswenson/starschema-bigquery-jdbc", "path": "src/main/java/net/starschema/clouddb/jdbc/BQDatabaseMetadata.java", "license": "bsd-2-clause", "size": 92438 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,012,217
@SuppressWarnings("deprecation") @Override public Boolean call() throws Exception { Table table = null; try { // this may have been queued, but there was an abort/stop so we try to early exit ...
@SuppressWarnings(STR) Boolean function() throws Exception { Table table = null; try { throwFailureIfDone(); if (allowLocalUpdates && env != null && tableReference.getTableName().equals( env.getRegion().getTableDescriptor().getTableName().getNameAsString())) { try { throwFailureIfDone(); IndexUtil.writeLocalUpdates(env...
/** * Do the actual write to the primary table. */
Do the actual write to the primary table
call
{ "repo_name": "growingio/phoenix", "path": "phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/TrackingParallelWriterIndexCommitter.java", "license": "apache-2.0", "size": 13646 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Table", "org.apache.phoenix.coprocessor.MetaDataProtocol", "org.apache.phoenix.hbase.index.table.HTableFactory", "org.apache.phoenix.util.IndexUtil" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Table; import org.apache.phoenix.coprocessor.MetaDataProtocol; import org.apache.phoenix.hbase.index.table.HTableFactory; import org.apache.phoenix.util.IndexUtil;
import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.phoenix.coprocessor.*; import org.apache.phoenix.hbase.index.table.*; import org.apache.phoenix.util.*;
[ "java.io", "org.apache.hadoop", "org.apache.phoenix" ]
java.io; org.apache.hadoop; org.apache.phoenix;
1,985,830
@ApiModelProperty(example = "null", required = true, value = "head_id integer") public Integer getHeadId() { return headId; }
@ApiModelProperty(example = "null", required = true, value = STR) Integer function() { return headId; }
/** * head_id integer * minimum: 0 * maximum: 9 * @return headId **/
head_id integer minimum: 0 maximum: 9
getHeadId
{ "repo_name": "Tmin10/EVE-Security-Service", "path": "server-api/src/main/java/ru/tmin10/EVESecurityService/serverApi/model/GetCharactersCharacterIdPlanetsPlanetIdHead.java", "license": "gpl-3.0", "size": 3630 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
195,096
List<UserCard> getPossibleFriends(Long id);
List<UserCard> getPossibleFriends(Long id);
/** * Retrieves list of users which can be invited to friends list by the user * with provided Id. * * @param id * the unique identifier of the user * @return */
Retrieves list of users which can be invited to friends list by the user with provided Id
getPossibleFriends
{ "repo_name": "gladorange/meraee", "path": "prokofiev/6_7/user-card/src/main/java/com/seprokof/usercard/service/UserService.java", "license": "apache-2.0", "size": 1320 }
[ "com.seprokof.usercard.dao.UserCard", "java.util.List" ]
import com.seprokof.usercard.dao.UserCard; import java.util.List;
import com.seprokof.usercard.dao.*; import java.util.*;
[ "com.seprokof.usercard", "java.util" ]
com.seprokof.usercard; java.util;
729,497
public void setLocale(Locale locale) { Locale old = getLocale(); this.locale = locale; firePropertyChange(PROPERTY_NAME_LOCALE, old, getLocale()); }
void function(Locale locale) { Locale old = getLocale(); this.locale = locale; firePropertyChange(PROPERTY_NAME_LOCALE, old, getLocale()); }
/** * Sets current locale. * <p> * The locale is used to construct internal {@link Calendar} instances and * affects visual representation of the control. * * @param locale * the locale to set */
Sets current locale. The locale is used to construct internal <code>Calendar</code> instances and affects visual representation of the control
setLocale
{ "repo_name": "ezegarra/microbrowser", "path": "microba/com/michaelbaranov/microba/calendar/CalendarPane.java", "license": "bsd-3-clause", "size": 20248 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
624,787
public interface Reference { void addSiteContextAuthzGroup(Collection<String> rv);
interface Reference { void function(Collection<String> rv);
/** * Add the AuthzGroup(s) for context as a site. * * @param rv * The list of references. */
Add the AuthzGroup(s) for context as a site
addSiteContextAuthzGroup
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "kernel/api/src/main/java/org/sakaiproject/entity/api/Reference.java", "license": "apache-2.0", "size": 4915 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
764,652
public boolean cancelAllNotifications() { Log.d(PLUGIN_NAME, "cancelAllNotifications: cancelling all events for this application"); final SharedPreferences alarmSettings = cordova.getActivity().getSharedPreferences(PLUGIN_NAME, Context.MODE_PRIVATE); final boolean result = alarm.cancelAll(alarmSettings); ret...
boolean function() { Log.d(PLUGIN_NAME, STR); final SharedPreferences alarmSettings = cordova.getActivity().getSharedPreferences(PLUGIN_NAME, Context.MODE_PRIVATE); final boolean result = alarm.cancelAll(alarmSettings); return result; }
/** * Cancel all notifications that were created by this plugin. */
Cancel all notifications that were created by this plugin
cancelAllNotifications
{ "repo_name": "jojo080889/LocalNotification", "path": "LocalNotification.java", "license": "mit", "size": 6135 }
[ "android.content.Context", "android.content.SharedPreferences", "android.util.Log" ]
import android.content.Context; import android.content.SharedPreferences; import android.util.Log;
import android.content.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
1,206,314
public void setImage (Image image) { this.image = image; loadImage(image); }
void function (Image image) { this.image = image; loadImage(image); }
/** * Sets the image displayed by this icon. * * @param image * the image */
Sets the image displayed by this icon
setImage
{ "repo_name": "juju790/FTNTLauncher_1.7Fix", "path": "src/main/java/net/ftb/gui/ImageAndTextIcon.java", "license": "apache-2.0", "size": 15213 }
[ "java.awt.Image" ]
import java.awt.Image;
import java.awt.*;
[ "java.awt" ]
java.awt;
91,482
public List<AssociationDS> convertToAssociationDS(String assoc) { List<AssociationDS> lAssoc = new ArrayList<AssociationDS>(); String[] tmpstring = assoc.split(DIV); for (String s : tmpstring) { lAssoc.add((AssociationDS) xmlfactory.convertStringToXml(s, AssociationDS.class)); } return lAssoc; }
List<AssociationDS> function(String assoc) { List<AssociationDS> lAssoc = new ArrayList<AssociationDS>(); String[] tmpstring = assoc.split(DIV); for (String s : tmpstring) { lAssoc.add((AssociationDS) xmlfactory.convertStringToXml(s, AssociationDS.class)); } return lAssoc; }
/** * * Converts a list of associations represented by a String into a * {@link List} of association objects. * * @param assoc * @return */
Converts a list of associations represented by a String into a <code>List</code> of association objects
convertToAssociationDS
{ "repo_name": "loretrisolini/Aeron", "path": "eu.neclab.iotplatform.iotbroker.core/src/main/java/eu/neclab/iotplatform/iotbroker/core/subscription/AssociationsUtil.java", "license": "bsd-3-clause", "size": 22841 }
[ "eu.neclab.iotplatform.ngsi.association.datamodel.AssociationDS", "java.util.ArrayList", "java.util.List" ]
import eu.neclab.iotplatform.ngsi.association.datamodel.AssociationDS; import java.util.ArrayList; import java.util.List;
import eu.neclab.iotplatform.ngsi.association.datamodel.*; import java.util.*;
[ "eu.neclab.iotplatform", "java.util" ]
eu.neclab.iotplatform; java.util;
1,014,611
public final boolean isStrictfp() { return (this.modifiers & ClassFileConstants.AccStrictfp) != 0; }
final boolean function() { return (this.modifiers & ClassFileConstants.AccStrictfp) != 0; }
/** * Answer true if all float operations must adher to IEEE 754 float/double rules */
Answer true if all float operations must adher to IEEE 754 float/double rules
isStrictfp
{ "repo_name": "trylimits/Eclipse-Postfix-Code-Completion", "path": "luna/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java", "license": "epl-1.0", "size": 77009 }
[ "org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants" ]
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.classfmt.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
25,657
public ConcurrentMap<String, Double> getMetrics() { return data.getMeasurements(); }
ConcurrentMap<String, Double> function() { return data.getMeasurements(); }
/** * Gets a dictionary of custom defined metrics. * @return Custom defined metrics. */
Gets a dictionary of custom defined metrics
getMetrics
{ "repo_name": "normalian/ApplicationInsights-Java", "path": "core/src/main/java/com/microsoft/applicationinsights/telemetry/PageViewTelemetry.java", "license": "mit", "size": 3874 }
[ "java.util.concurrent.ConcurrentMap" ]
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,594,504
public XMPPConnection getConnection() { return connection; }
XMPPConnection function() { return connection; }
/** * [used by spring] * * @return a valid connection to the IM server for the admin user */
[used by spring]
getConnection
{ "repo_name": "huihoo/olat", "path": "olat7.8/src/main/java/org/olat/connectors/instantmessaging/AdminUserConnection.java", "license": "apache-2.0", "size": 6885 }
[ "org.jivesoftware.smack.XMPPConnection" ]
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
2,437,956
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>POST</code> method. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>POST</code> method
doPost
{ "repo_name": "bripkens/opendecisionrepository", "path": "sources/web-interface/src/main/java/nl/rug/search/odr/servlet/TeXExportServlet.java", "license": "gpl-3.0", "size": 3907 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,174,179
public static BufferedImage makeCompatible(BufferedImage image, GraphicsConfiguration gc) { if (gc == null) gc = getDefaultConfiguration(); int w = image.getWidth(), h = image.getHeight(); int trans = image.getColorModel().getTransparency(); BufferedImage result = gc.createCompatibleImage(w, h, ...
static BufferedImage function(BufferedImage image, GraphicsConfiguration gc) { if (gc == null) gc = getDefaultConfiguration(); int w = image.getWidth(), h = image.getHeight(); int trans = image.getColorModel().getTransparency(); BufferedImage result = gc.createCompatibleImage(w, h, trans); Graphics2D g2 = result.create...
/** * Creates a buffered image compatible with the given graphics * configuration, using the given buffered image as a source. * If gc is null, the default graphics configuration is used. */
Creates a buffered image compatible with the given graphics configuration, using the given buffered image as a source. If gc is null, the default graphics configuration is used
makeCompatible
{ "repo_name": "hflynn/bioformats", "path": "components/formats-bsd/src/loci/formats/gui/AWTImageTools.java", "license": "gpl-2.0", "size": 71756 }
[ "java.awt.Graphics2D", "java.awt.GraphicsConfiguration", "java.awt.image.BufferedImage" ]
import java.awt.Graphics2D; import java.awt.GraphicsConfiguration; import java.awt.image.BufferedImage;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
894,097
public void bulkInit(File sourceFile) throws IOException { AbstractMetadataAdapter source = buildReader(sourceFile); MetadataHeader hdr = source.getMetaData(); String encoding = hdr.getEncoding(); InputStream in = source.buildInputStream(); BufferedReader reader = null; try { reader = new BufferedR...
void function(File sourceFile) throws IOException { AbstractMetadataAdapter source = buildReader(sourceFile); MetadataHeader hdr = source.getMetaData(); String encoding = hdr.getEncoding(); InputStream in = source.buildInputStream(); BufferedReader reader = null; try { reader = new BufferedReader(encoding == null ? new...
/** * Copy the content to the destination adapter. * <BR>The destination adapter is not closed - further data can be happened */
Copy the content to the destination adapter. The destination adapter is not closed - further data can be happened
bulkInit
{ "repo_name": "wintonBy/areca-backup-release-mirror", "path": "src/com/application/areca/metadata/AbstractMetadataAdapter.java", "license": "gpl-2.0", "size": 9021 }
[ "java.io.BufferedReader", "java.io.File", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader" ]
import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader;
import java.io.*;
[ "java.io" ]
java.io;
78,817
protected void LocationPath() throws javax.xml.transform.TransformerException { int opPos = m_ops.getOp(OpMap.MAPINDEX_LENGTH); // int locationPathOpPos = opPos; appendOp(2, OpCodes.OP_LOCATIONPATH); boolean seenSlash = tokenIs('/'); if (seenSlash) { appendOp(4, OpCodes.FROM_ROOT);...
void function() throws javax.xml.transform.TransformerException { int opPos = m_ops.getOp(OpMap.MAPINDEX_LENGTH); appendOp(2, OpCodes.OP_LOCATIONPATH); boolean seenSlash = tokenIs('/'); if (seenSlash) { appendOp(4, OpCodes.FROM_ROOT); m_ops.setOp(m_ops.getOp(OpMap.MAPINDEX_LENGTH) - 2, 4); m_ops.setOp(m_ops.getOp(OpMap...
/** * * LocationPath ::= RelativeLocationPath * | AbsoluteLocationPath * * * @throws javax.xml.transform.TransformerException */
LocationPath ::= RelativeLocationPath | AbsoluteLocationPath
LocationPath
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xpath/internal/compiler/XPathParser.java", "license": "mit", "size": 63899 }
[ "com.sun.org.apache.xpath.internal.res.XPATHErrorResources", "javax.xml.transform.TransformerException" ]
import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; import javax.xml.transform.TransformerException;
import com.sun.org.apache.xpath.internal.res.*; import javax.xml.transform.*;
[ "com.sun.org", "javax.xml" ]
com.sun.org; javax.xml;
1,544,359
public static void copy(InputStream input, Writer output, int byteCount) throws IOException { copy(input, output, JoddCore.encoding, byteCount); }
static void function(InputStream input, Writer output, int byteCount) throws IOException { copy(input, output, JoddCore.encoding, byteCount); }
/** * Copies specified number of bytes from input stream to writer using buffer. */
Copies specified number of bytes from input stream to writer using buffer
copy
{ "repo_name": "007slm/jodd", "path": "jodd-core/src/main/java/jodd/io/StreamUtil.java", "license": "bsd-3-clause", "size": 11181 }
[ "java.io.IOException", "java.io.InputStream", "java.io.Writer" ]
import java.io.IOException; import java.io.InputStream; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
493,146
private RelNode createProjectWithAdditionalExprs( RelNode input, List<Pair<RexNode, String>> additionalExprs) { final List<RelDataTypeField> fieldList = input.getRowType().getFieldList(); List<Pair<RexNode, String>> projects = new ArrayList<>(); for (Ord<RelDataTypeField> field : Ord.z...
RelNode function( RelNode input, List<Pair<RexNode, String>> additionalExprs) { final List<RelDataTypeField> fieldList = input.getRowType().getFieldList(); List<Pair<RexNode, String>> projects = new ArrayList<>(); for (Ord<RelDataTypeField> field : Ord.zip(fieldList)) { projects.add( Pair.of( (RexNode) relBuilder.getRe...
/** * Projects all {@code input} output fields plus the additional expressions. * * @param input Input relational expression * @param additionalExprs Additional expressions and names * @return the new Project */
Projects all input output fields plus the additional expressions
createProjectWithAdditionalExprs
{ "repo_name": "fhueske/flink", "path": "flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java", "license": "apache-2.0", "size": 101624 }
[ "java.util.ArrayList", "java.util.List", "org.apache.calcite.linq4j.Ord", "org.apache.calcite.rel.RelNode", "org.apache.calcite.rel.type.RelDataTypeField", "org.apache.calcite.rex.RexNode", "org.apache.calcite.util.Pair" ]
import java.util.ArrayList; import java.util.List; import org.apache.calcite.linq4j.Ord; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.type.RelDataTypeField; import org.apache.calcite.rex.RexNode; import org.apache.calcite.util.Pair;
import java.util.*; import org.apache.calcite.linq4j.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*; import org.apache.calcite.util.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
106,179
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); ...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>GET</code> method
doGet
{ "repo_name": "ftomassetti/JavaIncrementalParser", "path": "src/test/resources/javaee7-samples/servlet/event-listeners/src/main/java/org/javaee7/servlet/event/listeners/TestServlet.java", "license": "apache-2.0", "size": 5829 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
749,216
public ArrayList<String> getTypes(Card c) { ArrayList<String> returnList = new ArrayList<String>(); if (types.containsKey(c)) { returnList.addAll(types.get(c)); } return returnList; }
ArrayList<String> function(Card c) { ArrayList<String> returnList = new ArrayList<String>(); if (types.containsKey(c)) { returnList.addAll(types.get(c)); } return returnList; }
/** * <p>Getter for the field <code>types</code>.</p> * * @param c a {@link forge.Card} object. * @return a {@link java.util.ArrayList} object. */
Getter for the field <code>types</code>
getTypes
{ "repo_name": "xitongzou/cardforge", "path": "src/forge/StaticEffect.java", "license": "gpl-3.0", "size": 15888 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
276,467
public static File fileForURI(final URI uri, final String sourcePath, final String destinationPath, final File baseDir, final String extension) { String path = uri.getPath(); if (sourcePath != null && destinationPath != null) { path = path.replaceFirst(destinationPath, source...
static File function(final URI uri, final String sourcePath, final String destinationPath, final File baseDir, final String extension) { String path = uri.getPath(); if (sourcePath != null && destinationPath != null) { path = path.replaceFirst(destinationPath, sourcePath); } if (extension != null && path.endsWith("/"))...
/** * Gets the file where a resource at the given URL with the given extension * would be stored in the export package. * @param uri the URI for the resource * @param sourcePath the base path the resource was exported from * @param destinationPath the base path the resource is importing to ...
Gets the file where a resource at the given URL with the given extension would be stored in the export package
fileForURI
{ "repo_name": "fcrepo4-labs/fcrepo-import-export", "path": "src/main/java/org/fcrepo/importexport/common/TransferProcess.java", "license": "apache-2.0", "size": 9153 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,070,719
public Rule<JDefinedClass, JDefinedClass> getAdditionalPropertiesRule() { return new AdditionalPropertiesRule(this); }
Rule<JDefinedClass, JDefinedClass> function() { return new AdditionalPropertiesRule(this); }
/** * Provides a rule instance that should be applied when an * "additionalProperties" declaration is found in the schema. * * @return a schema rule that can handle the "additionalProperties" * declaration. */
Provides a rule instance that should be applied when an "additionalProperties" declaration is found in the schema
getAdditionalPropertiesRule
{ "repo_name": "fge/jsonschema2pojo", "path": "jsonschema2pojo-core/src/main/java/com/googlecode/jsonschema2pojo/rules/RuleFactory.java", "license": "apache-2.0", "size": 10265 }
[ "com.sun.codemodel.JDefinedClass" ]
import com.sun.codemodel.JDefinedClass;
import com.sun.codemodel.*;
[ "com.sun.codemodel" ]
com.sun.codemodel;
2,865,683
public void testGetSurroundingItems() { TimeSeries series = new TimeSeries("Series 1", Day.class); TimeSeriesCollection collection = new TimeSeriesCollection(series); collection.setXPosition(TimePeriodAnchor.MIDDLE); // for a series with no data, we expect {-1, -1}....
void function() { TimeSeries series = new TimeSeries(STR, Day.class); TimeSeriesCollection collection = new TimeSeriesCollection(series); collection.setXPosition(TimePeriodAnchor.MIDDLE); int[] result = collection.getSurroundingItems(0, 1000L); assertTrue(result[0] == -1); assertTrue(result[1] == -1); Day today = new D...
/** * Test the getSurroundingItems() method to ensure it is returning the * values we expect. */
Test the getSurroundingItems() method to ensure it is returning the values we expect
testGetSurroundingItems
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/data/time/junit/TimeSeriesCollectionTests.java", "license": "lgpl-2.1", "size": 9030 }
[ "org.jfree.data.time.Day", "org.jfree.data.time.TimePeriodAnchor", "org.jfree.data.time.TimeSeries", "org.jfree.data.time.TimeSeriesCollection" ]
import org.jfree.data.time.Day; import org.jfree.data.time.TimePeriodAnchor; import org.jfree.data.time.TimeSeries; import org.jfree.data.time.TimeSeriesCollection;
import org.jfree.data.time.*;
[ "org.jfree.data" ]
org.jfree.data;
390,693
public void updatePceccTunnelInfoInStore(DeviceId srcDeviceId, DeviceId dstDeviceId, LabelResourceId labelId, PortNumber dstPort, Tunnel tunnel, boolean isLastLabelToPush) { // First try to retrieve device from store and update its label id if it is exists, ...
void function(DeviceId srcDeviceId, DeviceId dstDeviceId, LabelResourceId labelId, PortNumber dstPort, Tunnel tunnel, boolean isLastLabelToPush) { boolean dstDeviceUpdated = false; boolean srcDeviceUpdated = false; PceccTunnelInfo pceccTunnelInfo = pceStore.getTunnelInfo(tunnel.tunnelId()); List<LspLocalLabelInfo> lspL...
/** * Updates list of local labels of PCECC tunnel info in pce store. * * @param srcDeviceId source device in a link * @param dstDeviceId destination device in a link * @param labelId label id of a link * @param dstPort destination device port number of a link * @param tunnel tunnel ...
Updates list of local labels of PCECC tunnel info in pce store
updatePceccTunnelInfoInStore
{ "repo_name": "VinodKumarS-Huawei/ietf96yang", "path": "apps/pce/app/src/main/java/org/onosproject/pce/pceservice/BasicPceccHandler.java", "license": "apache-2.0", "size": 17236 }
[ "java.util.LinkedList", "java.util.List", "org.onosproject.incubator.net.resource.label.LabelResourceId", "org.onosproject.incubator.net.tunnel.Tunnel", "org.onosproject.net.DeviceId", "org.onosproject.net.PortNumber", "org.onosproject.pce.pcestore.DefaultLspLocalLabelInfo", "org.onosproject.pce.pcest...
import java.util.LinkedList; import java.util.List; import org.onosproject.incubator.net.resource.label.LabelResourceId; import org.onosproject.incubator.net.tunnel.Tunnel; import org.onosproject.net.DeviceId; import org.onosproject.net.PortNumber; import org.onosproject.pce.pcestore.DefaultLspLocalLabelInfo; import or...
import java.util.*; import org.onosproject.incubator.net.resource.label.*; import org.onosproject.incubator.net.tunnel.*; import org.onosproject.net.*; import org.onosproject.pce.pcestore.*; import org.onosproject.pce.pcestore.api.*;
[ "java.util", "org.onosproject.incubator", "org.onosproject.net", "org.onosproject.pce" ]
java.util; org.onosproject.incubator; org.onosproject.net; org.onosproject.pce;
1,484,987
static boolean mayEffectMutableState(Node n) { return mayEffectMutableState(n, null); }
static boolean mayEffectMutableState(Node n) { return mayEffectMutableState(n, null); }
/** * Returns true if the node may create new mutable state, or change existing * state. * * @see <a href="http://www.xkcd.org/326/">XKCD Cartoon</a> */
Returns true if the node may create new mutable state, or change existing state
mayEffectMutableState
{ "repo_name": "maio/closure-compiler", "path": "src/com/google/javascript/jscomp/NodeUtil.java", "license": "apache-2.0", "size": 116745 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
205,355
public void setNeedsToBeExpanded(boolean needsToBeExpanded) { this.needsToBeExpanded = needsToBeExpanded; } public XMLSignatureInput(byte[] inputOctets) { // NO defensive copy //this._inputOctetStreamProxy = new ByteArrayInputStream(inputOctets); this.bytes=inputOcte...
void function(boolean needsToBeExpanded) { this.needsToBeExpanded = needsToBeExpanded; } public XMLSignatureInput(byte[] inputOctets) { this.bytes=inputOctets; } public XMLSignatureInput(InputStream inputOctetStream) { this._inputOctetStreamProxy=inputOctetStream; } public XMLSignatureInput(String inputStr) { this(inpu...
/** * Set if the structured is needed to be circumbented. * @param needsToBeExpanded true if so. */
Set if the structured is needed to be circumbented
setNeedsToBeExpanded
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.java", "license": "mit", "size": 19531 }
[ "java.io.InputStream", "java.io.UnsupportedEncodingException", "java.util.Set", "org.w3c.dom.Node" ]
import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.util.Set; import org.w3c.dom.Node;
import java.io.*; import java.util.*; import org.w3c.dom.*;
[ "java.io", "java.util", "org.w3c.dom" ]
java.io; java.util; org.w3c.dom;
1,195,169
public void setParameterList(List<String> parameterList) { this.parameterList = parameterList; }
void function(List<String> parameterList) { this.parameterList = parameterList; }
/** * Sets the parameter list. * * @param parameterList * the new parameter list */
Sets the parameter list
setParameterList
{ "repo_name": "8090boy/gomall.la", "path": "legendshop/src/java/com/legendshop/business/process/event/MailPropertiesUpdatedProcessor.java", "license": "apache-2.0", "size": 1634 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
6,442
public PacmanInteraction controlling(IController controller) { controllers.add(controller); return this; }
PacmanInteraction function(IController controller) { controllers.add(controller); return this; }
/** * Add an external controller, which should be stopped/started * via the ui. * @param controller The controller to be added. * @return Itself, for fluency. */
Add an external controller, which should be stopped/started via the ui
controlling
{ "repo_name": "09zwcbupt/jpacman-framework", "path": "src/main/java/org/jpacman/framework/ui/PacmanInteraction.java", "license": "apache-2.0", "size": 5424 }
[ "org.jpacman.framework.controller.IController" ]
import org.jpacman.framework.controller.IController;
import org.jpacman.framework.controller.*;
[ "org.jpacman.framework" ]
org.jpacman.framework;
125,222
public void addRealms(List<Realm> listRealms) { for (Realm r : listRealms) { addRealm(r); } }
void function(List<Realm> listRealms) { for (Realm r : listRealms) { addRealm(r); } }
/** * Add a collection of realms to this packet. * * @param listRealms The list of realms to be added. */
Add a collection of realms to this packet
addRealms
{ "repo_name": "Warkdev/JaNGOSAuth", "path": "src/main/java/eu/jangos/auth/network/packet/server/SAuthRealmList.java", "license": "apache-2.0", "size": 8733 }
[ "eu.jangos.auth.model.Realm", "java.util.List" ]
import eu.jangos.auth.model.Realm; import java.util.List;
import eu.jangos.auth.model.*; import java.util.*;
[ "eu.jangos.auth", "java.util" ]
eu.jangos.auth; java.util;
1,682,443
public JSONObject getTask(int imp, int task) throws Exception { JSON json = HTTPUtils.getAsJSON(String.format(buildUrl()+"/%d/tasks/%d?expand=all", imp, task), gsuser , gspass); return ((JSONObject)json).getJSONObject("task"); }
JSONObject function(int imp, int task) throws Exception { JSON json = HTTPUtils.getAsJSON(String.format(buildUrl()+STR, imp, task), gsuser , gspass); return ((JSONObject)json).getJSONObject("task"); }
/** * Retrieves the Import Task JSON Object given its identifier and task number * * @param imp int: Import context number ID * @param task int: Task number */
Retrieves the Import Task JSON Object given its identifier and task number
getTask
{ "repo_name": "wumpz/geoserver-manager", "path": "src/main/java/it/geosolutions/geoserver/rest/manager/GeoServerRESTImporterManager.java", "license": "mit", "size": 11213 }
[ "it.geosolutions.geoserver.rest.HTTPUtils", "net.sf.json.JSONObject" ]
import it.geosolutions.geoserver.rest.HTTPUtils; import net.sf.json.JSONObject;
import it.geosolutions.geoserver.rest.*; import net.sf.json.*;
[ "it.geosolutions.geoserver", "net.sf.json" ]
it.geosolutions.geoserver; net.sf.json;
811,082
@NonNull public RangeBuilder setContentDescription(@NonNull CharSequence description) { mContentDescription = description; return this; }
RangeBuilder function(@NonNull CharSequence description) { mContentDescription = description; return this; }
/** * Sets the content description. */
Sets the content description
setContentDescription
{ "repo_name": "AndroidX/androidx", "path": "slice/slice-builders/src/main/java/androidx/slice/builders/ListBuilder.java", "license": "apache-2.0", "size": 74588 }
[ "androidx.annotation.NonNull" ]
import androidx.annotation.NonNull;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
1,530,954
@Override protected String typeFromResultSet(final ResultSet resultSet) throws SQLException { int precision = intFromResultSet(resultSet, COLUMN_SIZE); int scale = intFromResultSet(resultSet, DECIMAL_DIGITS); // According to http://forums.oracle.com/forums/thread.jspa?threadID=658646 ...
String function(final ResultSet resultSet) throws SQLException { int precision = intFromResultSet(resultSet, COLUMN_SIZE); int scale = intFromResultSet(resultSet, DECIMAL_DIGITS); if ( scale < 0 && resultSet.getInt(DATA_TYPE) == java.sql.Types.DECIMAL ) { precision = -1; } final String type = resultSet.getString(TYPE_N...
/** * Oracle needs this override to reconstruct NUMBER which is different * from NUMBER(x) or NUMBER(x,y). */
Oracle needs this override to reconstruct NUMBER which is different from NUMBER(x) or NUMBER(x,y)
typeFromResultSet
{ "repo_name": "keeguon/activerecord-jdbc-adapter", "path": "src/java/arjdbc/oracle/OracleRubyJdbcConnection.java", "license": "bsd-2-clause", "size": 20380 }
[ "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Types" ]
import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types;
import java.sql.*;
[ "java.sql" ]
java.sql;
855,290
@Test public void testReadOnlyWithPendingTransaction() { grid(0).cluster().state(ACTIVE); for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) changeStateWithPendingTransacti...
void function() { grid(0).cluster().state(ACTIVE); for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) changeStateWithPendingTransaction(ACTIVE_READ_ONLY, concurrency, isolation, FAILED_READ_ONLY_MSG); } }
/** * Tests that change cluster mode from {@link ClusterState#ACTIVE} to {@link ClusterState#ACTIVE_READ_ONLY} is prohibited * if transaction is active in current thread. */
Tests that change cluster mode from <code>ClusterState#ACTIVE</code> to <code>ClusterState#ACTIVE_READ_ONLY</code> is prohibited if transaction is active in current thread
testReadOnlyWithPendingTransaction
{ "repo_name": "andrey-kuznetsov/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateServerAbstractTest.java", "license": "apache-2.0", "size": 7733 }
[ "org.apache.ignite.transactions.TransactionConcurrency", "org.apache.ignite.transactions.TransactionIsolation" ]
import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation;
import org.apache.ignite.transactions.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,221,959
public Map<Integer, ClientAffinityStats> getAffinityStats() { Map<Integer, ClientAffinityStats> retval = new TreeMap<Integer, ClientAffinityStats>(); for (Entry<Integer, ClientAffinityStats> e : m_currentAffinity.entrySet()) { if (m_baselineAffinity.containsKey(e.getKey())) { ...
Map<Integer, ClientAffinityStats> function() { Map<Integer, ClientAffinityStats> retval = new TreeMap<Integer, ClientAffinityStats>(); for (Entry<Integer, ClientAffinityStats> e : m_currentAffinity.entrySet()) { if (m_baselineAffinity.containsKey(e.getKey())) { retval.put(e.getKey(), ClientAffinityStats.diff(e.getValue...
/** * Get the client affinity stats. Will only be populated if client affinity is enabled. * * @return A map from an internal partition id to a {@link ClientAffinityStats} instance. */
Get the client affinity stats. Will only be populated if client affinity is enabled
getAffinityStats
{ "repo_name": "wolffcm/voltdb", "path": "src/frontend/org/voltdb/client/ClientStatsContext.java", "license": "agpl-3.0", "size": 12976 }
[ "java.util.Map", "java.util.TreeMap" ]
import java.util.Map; import java.util.TreeMap;
import java.util.*;
[ "java.util" ]
java.util;
1,265,844
LOG.info("Fox web service starting ..."); final FoxServer server = new FoxServer(); if (FoxCfg.loadFile(FoxCfg.CFG_FILE)) { try { server.start(); } catch (final Exception e) { LOG.error(e.getLocalizedMessage(), e); } } LOG.info("Fox web service ready."); }
LOG.info(STR); final FoxServer server = new FoxServer(); if (FoxCfg.loadFile(FoxCfg.CFG_FILE)) { try { server.start(); } catch (final Exception e) { LOG.error(e.getLocalizedMessage(), e); } } LOG.info(STR); }
/** * Starts FOX web service. * * @throws PortInUseException */
Starts FOX web service
main
{ "repo_name": "renespeck/FOX", "path": "src/main/java/org/aksw/fox/ui/FoxRESTful.java", "license": "gpl-2.0", "size": 894 }
[ "org.aksw.fox.utils.FoxCfg", "org.aksw.fox.webservice.FoxServer" ]
import org.aksw.fox.utils.FoxCfg; import org.aksw.fox.webservice.FoxServer;
import org.aksw.fox.utils.*; import org.aksw.fox.webservice.*;
[ "org.aksw.fox" ]
org.aksw.fox;
1,169,570
public static void cleanupParameters(Collection paramValues) { if (paramValues != null) { for (Iterator it = paramValues.iterator(); it.hasNext();) { Object inValue = it.next(); if (inValue instanceof DisposableSqlTypeValue) { ((DisposableSqlTypeValue) inValue).cleanup(); } } } }
static void function(Collection paramValues) { if (paramValues != null) { for (Iterator it = paramValues.iterator(); it.hasNext();) { Object inValue = it.next(); if (inValue instanceof DisposableSqlTypeValue) { ((DisposableSqlTypeValue) inValue).cleanup(); } } } }
/** * Clean up all resources held by parameter values which were passed to an * execute method. This is for example important for closing LOB values. * @param paramValues parameter values supplied. May be <code>null</code>. * @see DisposableSqlTypeValue#cleanup() * @see org.springframework.jdbc.core.support.S...
Clean up all resources held by parameter values which were passed to an execute method. This is for example important for closing LOB values
cleanupParameters
{ "repo_name": "mattxia/spring-2.5-analysis", "path": "src/org/springframework/jdbc/core/StatementCreatorUtils.java", "license": "apache-2.0", "size": 10939 }
[ "java.util.Collection", "java.util.Iterator" ]
import java.util.Collection; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
65,571
public TileShape[] split_to_convex() { if (this.precalculated_convex_pieces == null) // not yet precalculated { // use a fixed seed to get reproducable result random_generator.setSeed(seed); Collection<PolygonShape> convex_pieces = split_to_convex...
TileShape[] function() { if (this.precalculated_convex_pieces == null) { random_generator.setSeed(seed); Collection<PolygonShape> convex_pieces = split_to_convex_recu(); if(convex_pieces == null) { return null; } precalculated_convex_pieces = new TileShape[convex_pieces.size()]; Iterator<PolygonShape> it = convex_piece...
/** * Splits this polygon shape into convex pieces. * The result is not exact, because rounded intersections of lines are * used in the result pieces. It can be made exact, if Polylines are returned * instead of Polygons, so that no intersection points are needed in the result. */
Splits this polygon shape into convex pieces. The result is not exact, because rounded intersections of lines are used in the result pieces. It can be made exact, if Polylines are returned instead of Polygons, so that no intersection points are needed in the result
split_to_convex
{ "repo_name": "andrasfuchs/BioBalanceDetector", "path": "Tools/KiCad_FreeRouting/FreeRouting-miho-master/freerouting-master/src/main/java/eu/mihosoft/freerouting/geometry/planar/PolygonShape.java", "license": "gpl-3.0", "size": 30484 }
[ "java.util.Collection", "java.util.Iterator" ]
import java.util.Collection; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
704,018
private DependencyNodeFilter createDependencyNodeFilter() { List<DependencyNodeFilter> filters = new ArrayList<DependencyNodeFilter>(); // filter includes if ( includes != null ) { List<String> patterns = Arrays.asList( includes.split( "," ) ); getLog()....
DependencyNodeFilter function() { List<DependencyNodeFilter> filters = new ArrayList<DependencyNodeFilter>(); if ( includes != null ) { List<String> patterns = Arrays.asList( includes.split( "," ) ); getLog().debug( STR + patterns ); ArtifactFilter artifactFilter = new StrictPatternIncludesArtifactFilter( patterns ); f...
/** * Gets the dependency node filter to use when serializing the dependency graph. * * @return the dependency node filter, or <code>null</code> if none required */
Gets the dependency node filter to use when serializing the dependency graph
createDependencyNodeFilter
{ "repo_name": "kidaa/maven-plugins", "path": "maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/tree/TreeMojo.java", "license": "apache-2.0", "size": 16992 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List", "org.apache.maven.artifact.resolver.filter.ArtifactFilter", "org.apache.maven.shared.artifact.filter.StrictPatternExcludesArtifactFilter", "org.apache.maven.shared.artifact.filter.StrictPatternIncludesArtifactFilter", "org.apache.maven.shared....
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.shared.artifact.filter.StrictPatternExcludesArtifactFilter; import org.apache.maven.shared.artifact.filter.StrictPatternIncludesArtifactFilter; import org....
import java.util.*; import org.apache.maven.artifact.resolver.filter.*; import org.apache.maven.shared.artifact.filter.*; import org.apache.maven.shared.dependency.graph.filter.*;
[ "java.util", "org.apache.maven" ]
java.util; org.apache.maven;
2,745,517
@Override public void shutdown(DeployService2Impl<I> deploy, ShutdownModeAmp mode, Result<Boolean> result) { deploy.shutdownImpl(mode, result); }
void function(DeployService2Impl<I> deploy, ShutdownModeAmp mode, Result<Boolean> result) { deploy.shutdownImpl(mode, result); }
/** * Stops the instance from an admin command. * * @param deploy the owning controller */
Stops the instance from an admin command
shutdown
{ "repo_name": "baratine/baratine", "path": "web/src/main/java/com/caucho/v5/deploy2/Strategy2Base.java", "license": "gpl-2.0", "size": 2625 }
[ "com.caucho.v5.amp.spi.ShutdownModeAmp", "io.baratine.service.Result" ]
import com.caucho.v5.amp.spi.ShutdownModeAmp; import io.baratine.service.Result;
import com.caucho.v5.amp.spi.*; import io.baratine.service.*;
[ "com.caucho.v5", "io.baratine.service" ]
com.caucho.v5; io.baratine.service;
1,008,748
@Test public void testUnifiedSourceFile() { Path pathToNonGenFile = Paths.get("java/package/src/SourceFile1.java"); BuildTarget javaLibraryTarget = BuildTargetFactory.newInstance("//foo:bar"); TargetNode<JavaLibraryDescriptionArg> javaLibraryNode = JavaLibraryBuilder.createBuilder(javaLibraryTa...
void function() { Path pathToNonGenFile = Paths.get(STR); BuildTarget javaLibraryTarget = BuildTargetFactory.newInstance(STRAll non-generated source files are under one source tmp.STRjava/"), result); }
/** * If the source paths specified are from the new unified source tmp then we should return the * correct source tmp corresponding to the unified source path. */
If the source paths specified are from the new unified source tmp then we should return the correct source tmp corresponding to the unified source path
testUnifiedSourceFile
{ "repo_name": "facebook/buck", "path": "test/com/facebook/buck/cli/TestRunningTest.java", "license": "apache-2.0", "size": 32105 }
[ "com.facebook.buck.core.model.BuildTarget", "com.facebook.buck.core.model.BuildTargetFactory", "java.nio.file.Path", "java.nio.file.Paths" ]
import com.facebook.buck.core.model.BuildTarget; import com.facebook.buck.core.model.BuildTargetFactory; import java.nio.file.Path; import java.nio.file.Paths;
import com.facebook.buck.core.model.*; import java.nio.file.*;
[ "com.facebook.buck", "java.nio" ]
com.facebook.buck; java.nio;
641,464