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 GetSingleVehicleResultResponse getOrderedTaskResult(String orderedProblemId) { InternalRequest internalRequest = createRequest(null, HttpMethodName.GET, PROBLEM_PATH + "/ordered/" + orderedProblemId); return this.invokeHttpClient(internalRequest, GetSingleVehicleResultResponse...
GetSingleVehicleResultResponse function(String orderedProblemId) { InternalRequest internalRequest = createRequest(null, HttpMethodName.GET, PROBLEM_PATH + STR + orderedProblemId); return this.invokeHttpClient(internalRequest, GetSingleVehicleResultResponse.class); }
/** * Query ordered task solution. * * @param orderedProblemId problemId from createOrderedTask response * * @return GetSingleVehicleResultResponse */
Query ordered task solution
getOrderedTaskResult
{ "repo_name": "baidubce/bce-sdk-java", "path": "src/main/java/com/baidubce/services/ros/RosClient.java", "license": "apache-2.0", "size": 10941 }
[ "com.baidubce.http.HttpMethodName", "com.baidubce.internal.InternalRequest", "com.baidubce.services.ros.model.GetSingleVehicleResultResponse" ]
import com.baidubce.http.HttpMethodName; import com.baidubce.internal.InternalRequest; import com.baidubce.services.ros.model.GetSingleVehicleResultResponse;
import com.baidubce.http.*; import com.baidubce.internal.*; import com.baidubce.services.ros.model.*;
[ "com.baidubce.http", "com.baidubce.internal", "com.baidubce.services" ]
com.baidubce.http; com.baidubce.internal; com.baidubce.services;
898,899
@PublicEvolving public DataStreamSource<String> socketTextStream(String hostname, int port, String delimiter) { return socketTextStream(hostname, port, delimiter, 0); }
DataStreamSource<String> function(String hostname, int port, String delimiter) { return socketTextStream(hostname, port, delimiter, 0); }
/** * Creates a new data stream that contains the strings received infinitely from a socket. Received strings are * decoded by the system's default character set. The reader is terminated immediately when the socket is down. * * @param hostname * The host name which a server socket binds * @param port *...
Creates a new data stream that contains the strings received infinitely from a socket. Received strings are decoded by the system's default character set. The reader is terminated immediately when the socket is down
socketTextStream
{ "repo_name": "darionyaphet/flink", "path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java", "license": "apache-2.0", "size": 93921 }
[ "org.apache.flink.streaming.api.datastream.DataStreamSource" ]
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.datastream.*;
[ "org.apache.flink" ]
org.apache.flink;
44,924
private void sortOpModeMap(HashMap<String, LinkedList<Class<OpMode>>> opModes) { Comparator<Class> firstComparator = new OpModeComparator(); for (String key : opModes.keySet()) { Collections.sort(opModes.get(key), firstComparator); } }
void function(HashMap<String, LinkedList<Class<OpMode>>> opModes) { Comparator<Class> firstComparator = new OpModeComparator(); for (String key : opModes.keySet()) { Collections.sort(opModes.get(key), firstComparator); } }
/** * This sorts the {@link LinkedList<Class>} sorting the OpModes given by a special character * * @param opModes the OpMode HashMap */
This sorts the <code>LinkedList</code> sorting the OpModes given by a special character
sortOpModeMap
{ "repo_name": "MHS-FIRSTrobotics/TeamClutch-FTC2016", "path": "OpModeAnnotations/src/main/java/org/ftccommunity/ftcxtensible/AnnotationFtcRegister.java", "license": "mit", "size": 15575 }
[ "com.qualcomm.robotcore.eventloop.opmode.OpMode", "java.util.Collections", "java.util.Comparator", "java.util.HashMap", "java.util.LinkedList" ]
import com.qualcomm.robotcore.eventloop.opmode.OpMode; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.LinkedList;
import com.qualcomm.robotcore.eventloop.opmode.*; import java.util.*;
[ "com.qualcomm.robotcore", "java.util" ]
com.qualcomm.robotcore; java.util;
1,147,581
@Basic( optional = true ) @Column( name = "full_name", length = 100 ) public String getFullName() { return this.fullName; }
@Basic( optional = true ) @Column( name = STR, length = 100 ) String function() { return this.fullName; }
/** * Return the value associated with the column: fullName. * @return A String object (this.fullName) */
Return the value associated with the column: fullName
getFullName
{ "repo_name": "rpgm/mi15", "path": "rpgm/modules/repository/src/main/java/org/yarlithub/yschool/repository/model/obj/yschool/Staff.java", "license": "apache-2.0", "size": 11076 }
[ "javax.persistence.Basic", "javax.persistence.Column" ]
import javax.persistence.Basic; import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,241,310
return new CanvasEditorTestSuite(); } public CanvasEditorTestSuite() { addTest(new TestSuite(OpenCanvasEditor.class)); addTest(new TestSuite(CloseCanvasEditor.class)); }
return new CanvasEditorTestSuite(); } public CanvasEditorTestSuite() { addTest(new TestSuite(OpenCanvasEditor.class)); addTest(new TestSuite(CloseCanvasEditor.class)); }
/** * Returns the suite. This is required to * use the JUnit Launcher. */
Returns the suite. This is required to use the JUnit Launcher
suite
{ "repo_name": "HebaKhaled/bposs", "path": "src/com.mentor.nucleus.bp.ui.canvas.test/src/com/mentor/nucleus/bp/ui/canvas/test/CanvasEditorTestSuite.java", "license": "apache-2.0", "size": 1584 }
[ "junit.framework.TestSuite" ]
import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
674,349
public static void saveFile(String data, String filename) { FileOutputStream outputStream; try { outputStream = new FileOutputStream(new File(getStorageDir(), filename),true); outputStream.write(data.getBytes()); outputStream.close(); } catch (Exception ...
static void function(String data, String filename) { FileOutputStream outputStream; try { outputStream = new FileOutputStream(new File(getStorageDir(), filename),true); outputStream.write(data.getBytes()); outputStream.close(); } catch (Exception e) { e.printStackTrace(); } }
/** * Writes the data to the filename location * * @param data * @param filename */
Writes the data to the filename location
saveFile
{ "repo_name": "Sopamo/sleepminder", "path": "app/src/main/java/de/sopamo/uni/sleepminder/storage/FileHandler.java", "license": "gpl-2.0", "size": 2254 }
[ "java.io.File", "java.io.FileOutputStream" ]
import java.io.File; import java.io.FileOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,164,887
private void replaceAbsoluteUrisWithRelative(IBaseResource theResource, FhirTerser theTerser) { BaseRuntimeElementDefinition<?> canonicalElementDefinition = myFhirContext.getElementDefinition("canonical"); if (canonicalElementDefinition != null) { Class<? extends IPrimitiveType<String>> canonicalType = (Clas...
void function(IBaseResource theResource, FhirTerser theTerser) { BaseRuntimeElementDefinition<?> canonicalElementDefinition = myFhirContext.getElementDefinition(STR); if (canonicalElementDefinition != null) { Class<? extends IPrimitiveType<String>> canonicalType = (Class<? extends IPrimitiveType<String>>) canonicalElem...
/** * Replace Canonical URI's with local references, if we find that the canonical should be treated as local. */
Replace Canonical URI's with local references, if we find that the canonical should be treated as local
replaceAbsoluteUrisWithRelative
{ "repo_name": "aemay2/hapi-fhir", "path": "hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/BaseStorageDao.java", "license": "apache-2.0", "size": 21992 }
[ "ca.uhn.fhir.context.BaseRuntimeElementDefinition", "ca.uhn.fhir.context.FhirContext", "ca.uhn.fhir.jpa.model.entity.ModelConfig", "ca.uhn.fhir.util.FhirTerser", "java.util.List", "org.hl7.fhir.instance.model.api.IBaseResource", "org.hl7.fhir.instance.model.api.IPrimitiveType" ]
import ca.uhn.fhir.context.BaseRuntimeElementDefinition; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.util.FhirTerser; import java.util.List; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IPrimitiveType;
import ca.uhn.fhir.context.*; import ca.uhn.fhir.jpa.model.entity.*; import ca.uhn.fhir.util.*; import java.util.*; import org.hl7.fhir.instance.model.api.*;
[ "ca.uhn.fhir", "java.util", "org.hl7.fhir" ]
ca.uhn.fhir; java.util; org.hl7.fhir;
1,924,815
public static void serializeString(ByteBuffer outputBuffer, String value, Charset charset) { outputBuffer.putInt(value.length()); outputBuffer.put(value.getBytes(charset)); }
static void function(ByteBuffer outputBuffer, String value, Charset charset) { outputBuffer.putInt(value.length()); outputBuffer.put(value.getBytes(charset)); }
/** * Serializes a string into byte buffer * @param outputBuffer The output buffer to serialize the value to * @param value The value to serialize * @param charset {@link Charset} to be used to encode */
Serializes a string into byte buffer
serializeString
{ "repo_name": "nsivabalan/ambry", "path": "ambry-utils/src/main/java/com.github.ambry.utils/Utils.java", "license": "apache-2.0", "size": 26612 }
[ "java.nio.ByteBuffer", "java.nio.charset.Charset" ]
import java.nio.ByteBuffer; import java.nio.charset.Charset;
import java.nio.*; import java.nio.charset.*;
[ "java.nio" ]
java.nio;
931,263
public void getData() { Table table = wFields.table; table.removeAll(); for ( int i = 0; i < input.getFieldName().length; i++ ) { TableItem ti = new TableItem( table, SWT.NONE ); ti.setText( 0, "" + ( i + 1 ) ); if ( input.getFieldName()[i] != null ) { ti.setText( 1, input.getFie...
void function() { Table table = wFields.table; table.removeAll(); for ( int i = 0; i < input.getFieldName().length; i++ ) { TableItem ti = new TableItem( table, SWT.NONE ); ti.setText( 0, STR001" ); } wStepname.selectAll(); wStepname.setFocus(); }
/** * Copy information from the meta-data input to the dialog fields. */
Copy information from the meta-data input to the dialog fields
getData
{ "repo_name": "tkafalas/pentaho-kettle", "path": "plugins/aggregate-rows/core/src/main/java/org/pentaho/di/ui/trans/steps/aggregaterows/AggregateRowsDialog.java", "license": "apache-2.0", "size": 10569 }
[ "org.eclipse.swt.widgets.Table", "org.eclipse.swt.widgets.TableItem" ]
import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,852,741
private Set<FilterCondition> getAdditionalConditions(Class<?> type, String projectName) { Set<FilterCondition> result = new HashSet<>(); // TODO consider to avoid this(if operations) if (TestItem.class.equals(type)) { result.add(getConditionForTestItem(projectName)); } else if (type.equals(Launch.class)) ...
Set<FilterCondition> function(Class<?> type, String projectName) { Set<FilterCondition> result = new HashSet<>(); if (TestItem.class.equals(type)) { result.add(getConditionForTestItem(projectName)); } else if (type.equals(Launch.class)) { result.add(new FilterCondition(Condition.EQUALS, false, projectName, Launch.PROJE...
/** * Get {@link com.epam.ta.reportportal.database.search.FilterCondition}s for * selecting data foe widget Additional conditions: * <li>data only from current project; * <li>data only from non debug launches; * * @param type * @param projectName * @return FilterCondition */
Get <code>com.epam.ta.reportportal.database.search.FilterCondition</code>s for selecting data foe widget Additional conditions: data only from current project; data only from non debug launches
getAdditionalConditions
{ "repo_name": "talisman1234/service-api", "path": "src/main/java/com/epam/ta/reportportal/core/widget/content/GeneralFilterStrategy.java", "license": "gpl-3.0", "size": 5037 }
[ "com.epam.ta.reportportal.database.entity.Launch", "com.epam.ta.reportportal.database.entity.item.TestItem", "com.epam.ta.reportportal.database.search.Condition", "com.epam.ta.reportportal.database.search.FilterCondition", "com.epam.ta.reportportal.database.search.FilterConditionUtils", "com.epam.ta.repor...
import com.epam.ta.reportportal.database.entity.Launch; import com.epam.ta.reportportal.database.entity.item.TestItem; import com.epam.ta.reportportal.database.search.Condition; import com.epam.ta.reportportal.database.search.FilterCondition; import com.epam.ta.reportportal.database.search.FilterConditionUtils; import ...
import com.epam.ta.reportportal.database.entity.*; import com.epam.ta.reportportal.database.entity.item.*; import com.epam.ta.reportportal.database.search.*; import com.epam.ta.reportportal.exception.*; import java.util.*;
[ "com.epam.ta", "java.util" ]
com.epam.ta; java.util;
603,690
default void addAssignedThumbnail(Serializable id, String thumbnail) { addThumbnail(id, thumbnail, ThumbnailType.ASSIGNED); }
default void addAssignedThumbnail(Serializable id, String thumbnail) { addThumbnail(id, thumbnail, ThumbnailType.ASSIGNED); }
/** * Adds or updates an externally fetched thumbnail, represented as base64 text, for the given instance. The thumbnail * will be added for representation for the {@link ThumbnailType#ASSIGNED} type. * * @param id an instance id to register a thumbnail for * @param thumbnail a thumbnail to register for to th...
Adds or updates an externally fetched thumbnail, represented as base64 text, for the given instance. The thumbnail will be added for representation for the <code>ThumbnailType#ASSIGNED</code> type
addAssignedThumbnail
{ "repo_name": "SirmaITT/conservation-space-1.7.0", "path": "docker/sirma-platform/content/content-thumbnail/src/main/java/com/sirma/sep/content/rendition/ThumbnailService.java", "license": "lgpl-3.0", "size": 13950 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
1,058,742
public static com.iucn.whp.dbservice.model.whp_sites_mission removeByfileId( long fileentryid) throws com.iucn.whp.dbservice.NoSuch_sites_missionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().removeByfileId(fileentryid); }
static com.iucn.whp.dbservice.model.whp_sites_mission function( long fileentryid) throws com.iucn.whp.dbservice.NoSuch_sites_missionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().removeByfileId(fileentryid); }
/** * Removes the whp_sites_mission where fileentryid = &#63; from the database. * * @param fileentryid the fileentryid * @return the whp_sites_mission that was removed * @throws SystemException if a system exception occurred */
Removes the whp_sites_mission where fileentryid = &#63; from the database
removeByfileId
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/service/com/iucn/whp/dbservice/service/persistence/whp_sites_missionUtil.java", "license": "gpl-2.0", "size": 24511 }
[ "com.liferay.portal.kernel.exception.SystemException" ]
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.exception.*;
[ "com.liferay.portal" ]
com.liferay.portal;
2,083,431
for (int i = 0; i < callbacks.length; i++) { WSPasswordCallback pc = (WSPasswordCallback)callbacks[i]; String pass = passwords.get(pc.getIdentifier()); if (pass != null) { pc.setPassword(pass); return; } } }
for (int i = 0; i < callbacks.length; i++) { WSPasswordCallback pc = (WSPasswordCallback)callbacks[i]; String pass = passwords.get(pc.getIdentifier()); if (pass != null) { pc.setPassword(pass); return; } } }
/** * Here, we attempt to get the password from the private * alias/passwords map. */
Here, we attempt to get the password from the private alias/passwords map
handle
{ "repo_name": "mulesoft-consulting/sumtotal-connector", "path": "lib/apache-cxf-2.7.5/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/UTPasswordCallback.java", "license": "apache-2.0", "size": 2103 }
[ "org.apache.ws.security.WSPasswordCallback" ]
import org.apache.ws.security.WSPasswordCallback;
import org.apache.ws.security.*;
[ "org.apache.ws" ]
org.apache.ws;
1,688,085
Index createIndexStructure(int column[], HsqlName name, boolean pk, boolean unique, boolean constraint, boolean forward) throws HsqlException { int i = createIndexStructureGetNo(column, name, pk, unique, ...
Index createIndexStructure(int column[], HsqlName name, boolean pk, boolean unique, boolean constraint, boolean forward) throws HsqlException { int i = createIndexStructureGetNo(column, name, pk, unique, constraint, forward); return indexList[i]; }
/** * Creates the internal structures for an index. */
Creates the internal structures for an index
createIndexStructure
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/hsqldb1733/src/org/hsqldb/Table.java", "license": "lgpl-3.0", "size": 99383 }
[ "org.hsqldb.HsqlNameManager" ]
import org.hsqldb.HsqlNameManager;
import org.hsqldb.*;
[ "org.hsqldb" ]
org.hsqldb;
2,065,127
@Nullable public AgreementFileProperties post(@Nonnull final AgreementFileProperties newAgreementFileProperties) throws ClientException { return send(HttpMethod.POST, newAgreementFileProperties); }
AgreementFileProperties function(@Nonnull final AgreementFileProperties newAgreementFileProperties) throws ClientException { return send(HttpMethod.POST, newAgreementFileProperties); }
/** * Creates a AgreementFileProperties with a new object * * @param newAgreementFileProperties the new object to create * @return the created AgreementFileProperties * @throws ClientException this exception occurs if the request was unable to complete for any reason */
Creates a AgreementFileProperties with a new object
post
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/AgreementFilePropertiesRequest.java", "license": "mit", "size": 7047 }
[ "com.microsoft.graph.core.ClientException", "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.AgreementFileProperties", "javax.annotation.Nonnull" ]
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.AgreementFileProperties; import javax.annotation.Nonnull;
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
1,378,669
private static void mapResultOtherEntryConditions(List<String> otherConditionsList, Collection<SECriterion> criterionList) { Optional.of(otherConditionsList).ifPresent(conditions -> { SEEntryCriterion seCriterion = EntityBuilder.build(criterion -> { criterion.setOther...
static void function(List<String> otherConditionsList, Collection<SECriterion> criterionList) { Optional.of(otherConditionsList).ifPresent(conditions -> { SEEntryCriterion seCriterion = EntityBuilder.build(criterion -> { criterion.setOtherConditions(otherConditionsList); }, SEEntryCriterion.class); repoUtil.mongoTempla...
/** * Map Other Conditions to SEPractice * * @param otherConditionsList * @param criterionList */
Map Other Conditions to SEPractice
mapResultOtherEntryConditions
{ "repo_name": "dads-software-brotherhood/sekc", "path": "src/main/java/mx/infotec/dads/sekc/admin/practice/service/util/SEEssenceMapper.java", "license": "apache-2.0", "size": 21620 }
[ "java.util.Collection", "java.util.List", "java.util.Optional", "mx.infotec.dads.essence.model.activityspaceandactivity.SECriterion", "mx.infotec.dads.essence.model.activityspaceandactivity.SEEntryCriterion", "mx.infotec.dads.sekc.util.EntityBuilder" ]
import java.util.Collection; import java.util.List; import java.util.Optional; import mx.infotec.dads.essence.model.activityspaceandactivity.SECriterion; import mx.infotec.dads.essence.model.activityspaceandactivity.SEEntryCriterion; import mx.infotec.dads.sekc.util.EntityBuilder;
import java.util.*; import mx.infotec.dads.essence.model.activityspaceandactivity.*; import mx.infotec.dads.sekc.util.*;
[ "java.util", "mx.infotec.dads" ]
java.util; mx.infotec.dads;
764,309
public static EntityDocRetrievePortType getInstance() { EntityDocRetrievePortType client = CLIENT_CACHE.getIfPresent(vlerConfig); if (client == null) { try { client = create(vlerConfig.getDocRetrieveUrl(), vlerConfig.getDocRetrieveTimeoutMs()); } catch (M...
static EntityDocRetrievePortType function() { EntityDocRetrievePortType client = CLIENT_CACHE.getIfPresent(vlerConfig); if (client == null) { try { client = create(vlerConfig.getDocRetrieveUrl(), vlerConfig.getDocRetrieveTimeoutMs()); } catch (MalformedURLException e) { logger.error(e.getMessage(), e); return null; } C...
/** * Returns a EntityDocQueryPortType client * @return the EntityDocQueryPortType client if the client could not be created from the configuration */
Returns a EntityDocQueryPortType client
getInstance
{ "repo_name": "KRMAssociatesInc/eHMP", "path": "ehmp/product/production/soap-handler/src/main/java/us/vistacore/vxsync/vler/EntityDocRetrieveConnection.java", "license": "apache-2.0", "size": 3292 }
[ "gov.hhs.fha.nhinc.entitydocretrieve.EntityDocRetrievePortType", "java.net.MalformedURLException" ]
import gov.hhs.fha.nhinc.entitydocretrieve.EntityDocRetrievePortType; import java.net.MalformedURLException;
import gov.hhs.fha.nhinc.entitydocretrieve.*; import java.net.*;
[ "gov.hhs.fha", "java.net" ]
gov.hhs.fha; java.net;
2,727,440
@Override protected void doShutdown() throws JMSException { logger.debug("Waiting for shutdown of message listener invokers"); try { synchronized (this.lifecycleMonitor) { // Waiting for AsyncMessageListenerInvokers to deactivate themselves... while (this.activeInvokerCount > 0) { if (logger.isD...
void function() throws JMSException { logger.debug(STR); try { synchronized (this.lifecycleMonitor) { while (this.activeInvokerCount > 0) { if (logger.isDebugEnabled()) { logger.debug(STR + this.activeInvokerCount + STR); } long timeout = getReceiveTimeout(); if (timeout > 0) { this.lifecycleMonitor.wait(timeout); } el...
/** * Destroy the registered JMS Sessions and associated MessageConsumers. */
Destroy the registered JMS Sessions and associated MessageConsumers
doShutdown
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/spring-jdk9/src/spring.jms/org/springframework/jms/listener/DefaultMessageListenerContainer.java", "license": "mit", "size": 47292 }
[ "javax.jms.JMSException" ]
import javax.jms.JMSException;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
937,426
public void add(HDFSBlocksDistribution otherBlocksDistribution) { Map<String,HostAndWeight> otherHostAndWeights = otherBlocksDistribution.getHostAndWeights(); for (Map.Entry<String, HostAndWeight> otherHostAndWeight: otherHostAndWeights.entrySet()) { addHostAndBlockWeight(otherHostAndWeight....
void function(HDFSBlocksDistribution otherBlocksDistribution) { Map<String,HostAndWeight> otherHostAndWeights = otherBlocksDistribution.getHostAndWeights(); for (Map.Entry<String, HostAndWeight> otherHostAndWeight: otherHostAndWeights.entrySet()) { addHostAndBlockWeight(otherHostAndWeight.getValue().host, otherHostAndW...
/** * This will add the distribution from input to this object * @param otherBlocksDistribution the other hdfs blocks distribution */
This will add the distribution from input to this object
add
{ "repo_name": "daidong/DominoHBase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/HDFSBlocksDistribution.java", "license": "apache-2.0", "size": 6715 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
217,038
List<MockFlowFile> getPenalizedFlowFiles();
List<MockFlowFile> getPenalizedFlowFiles();
/** * Returns a List of FlowFiles in the order in which they were transferred that were penalized * * @return flowfiles that were penalized */
Returns a List of FlowFiles in the order in which they were transferred that were penalized
getPenalizedFlowFiles
{ "repo_name": "speddy93/nifi", "path": "nifi-mock/src/main/java/org/apache/nifi/util/TestRunner.java", "license": "apache-2.0", "size": 37135 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,485,007
public void deleteContacts(View v) { // Delete contacts. getOps().deleteContacts(); }
void function(View v) { getOps().deleteContacts(); }
/** * This click handler method deletes contacts from the * ContactsContentProvider. */
This click handler method deletes contacts from the ContactsContentProvider
deleteContacts
{ "repo_name": "stevechlin/mobilecloud-15", "path": "ex/ContactsContentProvider/src/vandy/mooc/activities/ContactsActivity.java", "license": "apache-2.0", "size": 4652 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,088,480
@Override public void close() { val modifiedValues = new ArrayList<TransactionData>(); bufferedTxnData.entrySet().stream() .filter(entry -> !entry.getValue().isPersisted() && !entry.getValue().isPinned()) .forEach(entry -> modifiedValues.add(entry.getValue())); ...
void function() { val modifiedValues = new ArrayList<TransactionData>(); bufferedTxnData.entrySet().stream() .filter(entry -> !entry.getValue().isPersisted() && !entry.getValue().isPinned()) .forEach(entry -> modifiedValues.add(entry.getValue())); if (modifiedValues.size() > 0) { writeAll(modifiedValues); } }
/** * {@link AutoCloseable#close()} implementation. */
<code>AutoCloseable#close()</code> implementation
close
{ "repo_name": "pravega/pravega", "path": "segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/metadata/BaseMetadataStore.java", "license": "apache-2.0", "size": 43734 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,942,461
public static String serializeObjectToYamlStringAsDocuments(Object... objects) { logger.entering(new Object[] { objects }); Yaml yaml = new Yaml(); String output = yaml.dumpAll(Arrays.asList(objects).iterator()); logger.exiting(output); return output; }
static String function(Object... objects) { logger.entering(new Object[] { objects }); Yaml yaml = new Yaml(); String output = yaml.dumpAll(Arrays.asList(objects).iterator()); logger.exiting(output); return output; }
/** * Use this utility method to print and return a yaml string to help serialize the object passed in as a * LinkedHashMap. * * @param objects * One or more objects that are to be serialised. * @return a yaml string representation of the object(s) passed in */
Use this utility method to print and return a yaml string to help serialize the object passed in as a LinkedHashMap
serializeObjectToYamlStringAsDocuments
{ "repo_name": "ILikeToNguyen/SeLion", "path": "dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/DataProviderHelper.java", "license": "apache-2.0", "size": 29323 }
[ "java.util.Arrays", "org.yaml.snakeyaml.Yaml" ]
import java.util.Arrays; import org.yaml.snakeyaml.Yaml;
import java.util.*; import org.yaml.snakeyaml.*;
[ "java.util", "org.yaml.snakeyaml" ]
java.util; org.yaml.snakeyaml;
289,053
Flowable<List<Room>> getRooms();
Flowable<List<Room>> getRooms();
/** * Return list of rooms from remote api * * @return list of rooms */
Return list of rooms from remote api
getRooms
{ "repo_name": "dot-cat/creative_assistant_android", "path": "app/src/main/java/space/dotcat/assistant/repository/roomsRepository/remoteRoomsDataSource/RemoteRoomsSource.java", "license": "mit", "size": 434 }
[ "io.reactivex.Flowable", "java.util.List", "space.dotcat.assistant.content.Room" ]
import io.reactivex.Flowable; import java.util.List; import space.dotcat.assistant.content.Room;
import io.reactivex.*; import java.util.*; import space.dotcat.assistant.content.*;
[ "io.reactivex", "java.util", "space.dotcat.assistant" ]
io.reactivex; java.util; space.dotcat.assistant;
1,159,546
public byte[] execute(final String factoryClassName, final String parameters, final User user, final ConnectionContext connectionContext) throws Exception { final String cmd = cmdTemplate.replaceAll(jwtPlaceholder, user.getJwsToken()) .replaceAll(facto...
byte[] function(final String factoryClassName, final String parameters, final User user, final ConnectionContext connectionContext) throws Exception { final String cmd = cmdTemplate.replaceAll(jwtPlaceholder, user.getJwsToken()) .replaceAll(factoryClassPlaceholder, factoryClassName) .replaceAll(parametersPlaceholder, p...
/** * DOCUMENT ME! * * @param factoryClassName DOCUMENT ME! * @param parameters DOCUMENT ME! * @param user DOCUMENT ME! * @param connectionContext DOCUMENT ME! * * @return DOCUMENT ME! * * @throws Exception DOCUMENT ME! */
DOCUMENT ME
execute
{ "repo_name": "cismet/cids-custom-wuppertal-server", "path": "src/main/java/de/cismet/cids/custom/utils/ByteArrayFactoryHandler.java", "license": "lgpl-3.0", "size": 5729 }
[ "de.cismet.connectioncontext.ConnectionContext", "java.util.Base64" ]
import de.cismet.connectioncontext.ConnectionContext; import java.util.Base64;
import de.cismet.connectioncontext.*; import java.util.*;
[ "de.cismet.connectioncontext", "java.util" ]
de.cismet.connectioncontext; java.util;
1,738,813
public static List<String> missingServerCpuFlags(String clusterCpuName, String serverFlags, Version ver) { final CpuFlagsManager cpuFlagsManager = _managersDictionary.get(ver); if (cpuFlagsManager != null) { return cpuFlagsManager.missingServerCpuFlags(clusterCpuName, serverFlags); ...
static List<String> function(String clusterCpuName, String serverFlags, Version ver) { final CpuFlagsManager cpuFlagsManager = _managersDictionary.get(ver); if (cpuFlagsManager != null) { return cpuFlagsManager.missingServerCpuFlags(clusterCpuName, serverFlags); } return null; }
/** * Returns missing CPU flags if any, or null if the server match the cluster * CPU flags * * @param clusterCpuName * @param serverFlags * @param ver * @return list of missing CPU flags */
Returns missing CPU flags if any, or null if the server match the cluster CPU flags
missingServerCpuFlags
{ "repo_name": "walteryang47/ovirt-engine", "path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CpuFlagsManagerHandler.java", "license": "apache-2.0", "size": 17996 }
[ "java.util.List", "org.ovirt.engine.core.compat.Version" ]
import java.util.List; import org.ovirt.engine.core.compat.Version;
import java.util.*; import org.ovirt.engine.core.compat.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
303,299
public void createModel() { URI resourceURI = EditUIUtil.getURI(getEditorInput()); Exception exception = null; Resource resource = null; try { // Load the resource through the editing domain. // resource = editingDomain.getResourceSet().getResource(resourceURI, true); } ...
void function() { URI resourceURI = EditUIUtil.getURI(getEditorInput()); Exception exception = null; Resource resource = null; try { } catch (Exception e) { exception = e; resource = editingDomain.getResourceSet().getResource(resourceURI, false); } Diagnostic diagnostic = analyzeResourceProblems(resource, exception); i...
/** * This is the method called to load a resource into the editing domain's resource set based on the editor's input. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This is the method called to load a resource into the editing domain's resource set based on the editor's input.
createModel
{ "repo_name": "peterkir/org.eclipse.oomph", "path": "plugins/org.eclipse.oomph.targlets.editor/src/org/eclipse/oomph/targlets/presentation/TargletEditor.java", "license": "epl-1.0", "size": 54904 }
[ "org.eclipse.emf.common.util.Diagnostic", "org.eclipse.emf.ecore.resource.Resource", "org.eclipse.emf.edit.ui.util.EditUIUtil" ]
import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.edit.ui.util.EditUIUtil;
import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.edit.ui.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,658,829
public final void unregisterFunction(String functionId) { if (functionId == null) { throw new FunctionException(LocalizedStrings.FunctionService_0_PASSED_IS_NULL.toLocalizedString("functionId instance ")); } idToFunctionMap.remove(functionId); }
final void function(String functionId) { if (functionId == null) { throw new FunctionException(LocalizedStrings.FunctionService_0_PASSED_IS_NULL.toLocalizedString(STR)); } idToFunctionMap.remove(functionId); }
/** * Unregisters the given {@link Function} with the {@link FunctionService} using {@link Function#getId()}. * <p> * * @throws FunctionException * if function instance passed is null or Function.getId() returns null * @since 6.0 */
Unregisters the given <code>Function</code> with the <code>FunctionService</code> using <code>Function#getId()</code>.
unregisterFunction
{ "repo_name": "robertgeiger/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/execute/internal/FunctionServiceManager.java", "license": "apache-2.0", "size": 19067 }
[ "com.gemstone.gemfire.cache.execute.FunctionException", "com.gemstone.gemfire.cache.execute.FunctionService", "com.gemstone.gemfire.internal.i18n.LocalizedStrings" ]
import com.gemstone.gemfire.cache.execute.FunctionException; import com.gemstone.gemfire.cache.execute.FunctionService; import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.cache.execute.*; import com.gemstone.gemfire.internal.i18n.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
1,577,530
public void setSeparateWindow(boolean separateWindow) { this.separateWindow = separateWindow; } public SecurityContext getSecurityContext() { return ctx; }
void function(boolean separateWindow) { this.separateWindow = separateWindow; } public SecurityContext getSecurityContext() { return ctx; }
/** * Sets to <code>true</code> if the viewer should be opened in a separate * window, <code>false</code> otherwise. * * @param separateWindow The value to set. */
Sets to <code>true</code> if the viewer should be opened in a separate window, <code>false</code> otherwise
setSeparateWindow
{ "repo_name": "jballanc/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/events/iviewer/ViewImage.java", "license": "gpl-2.0", "size": 4966 }
[ "org.openmicroscopy.shoola.env.data.util.SecurityContext" ]
import org.openmicroscopy.shoola.env.data.util.SecurityContext;
import org.openmicroscopy.shoola.env.data.util.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
1,015,276
@ServiceMethod(returns = ReturnType.SINGLE) Mono<WhatIfOperationResultInner> whatIfAsync( String resourceGroupName, String deploymentName, DeploymentWhatIf parameters);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<WhatIfOperationResultInner> whatIfAsync( String resourceGroupName, String deploymentName, DeploymentWhatIf parameters);
/** * Returns changes that will be made by the deployment if executed at the scope of the resource group. * * @param resourceGroupName The name of the resource group the template will be deployed to. The name is case * insensitive. * @param deploymentName The name of the deployment. * ...
Returns changes that will be made by the deployment if executed at the scope of the resource group
whatIfAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentsClient.java", "license": "mit", "size": 218889 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.resources.fluent.models.WhatIfOperationResultInner", "com.azure.resourcemanager.resources.models.DeploymentWhatIf" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.resources.fluent.models.WhatIfOperationResultInner; import com.azure.resourcemanager.resources.models.DeploymentWhatIf;
import com.azure.core.annotation.*; import com.azure.resourcemanager.resources.fluent.models.*; import com.azure.resourcemanager.resources.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
217,586
private Point2D[] getPoints(final Point2D lastPoint) { int plus; boolean movin; if (lastPoint != null) { plus = 1; movin = true; } else { plus = 0; movin = false; } final Point2D[] pa = new Point2D[pFeature.getSplitPoint...
Point2D[] function(final Point2D lastPoint) { int plus; boolean movin; if (lastPoint != null) { plus = 1; movin = true; } else { plus = 0; movin = false; } final Point2D[] pa = new Point2D[pFeature.getSplitPoints().size() + plus]; for (int i = 0; i < pFeature.getSplitPoints().size(); ++i) { pa[i] = (Point2D)(pFeature.g...
/** * DOCUMENT ME! * * @param lastPoint DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getPoints
{ "repo_name": "cismet/cismap-commons", "path": "src/main/java/de/cismet/cismap/commons/gui/piccolo/eventlistener/SplitPolygonListener.java", "license": "lgpl-3.0", "size": 5749 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,465,460
public static void setHotspot(@NonNull Drawable drawable, float x, float y) { if (Build.VERSION.SDK_INT >= 21) { Api21Impl.setHotspot(drawable, x, y); } }
static void function(@NonNull Drawable drawable, float x, float y) { if (Build.VERSION.SDK_INT >= 21) { Api21Impl.setHotspot(drawable, x, y); } }
/** * Specifies the hotspot's location within the drawable. * * @param drawable The Drawable against which to invoke the method. * @param x The X coordinate of the center of the hotspot * @param y The Y coordinate of the center of the hotspot */
Specifies the hotspot's location within the drawable
setHotspot
{ "repo_name": "AndroidX/androidx", "path": "core/core/src/main/java/androidx/core/graphics/drawable/DrawableCompat.java", "license": "apache-2.0", "size": 19549 }
[ "android.graphics.drawable.Drawable", "android.os.Build", "androidx.annotation.NonNull" ]
import android.graphics.drawable.Drawable; import android.os.Build; import androidx.annotation.NonNull;
import android.graphics.drawable.*; import android.os.*; import androidx.annotation.*;
[ "android.graphics", "android.os", "androidx.annotation" ]
android.graphics; android.os; androidx.annotation;
1,986,818
@ApiModelProperty(value = "") public List<BrandingTheme> getBrandingThemes() { return brandingThemes; }
@ApiModelProperty(value = "") List<BrandingTheme> function() { return brandingThemes; }
/** * Get brandingThemes * * @return brandingThemes */
Get brandingThemes
getBrandingThemes
{ "repo_name": "SidneyAllen/Xero-Java", "path": "src/main/java/com/xero/models/accounting/BrandingThemes.java", "license": "mit", "size": 2479 }
[ "io.swagger.annotations.ApiModelProperty", "java.util.List" ]
import io.swagger.annotations.ApiModelProperty; import java.util.List;
import io.swagger.annotations.*; import java.util.*;
[ "io.swagger.annotations", "java.util" ]
io.swagger.annotations; java.util;
114,027
public void createNewTaskOverviewWindow(WindowFactory aWindowFactory) { new TaskOverviewWindow(550, 350, ButtonLayout.CANCEL_BUTTON).initAndShowWindow(); }
void function(WindowFactory aWindowFactory) { new TaskOverviewWindow(550, 350, ButtonLayout.CANCEL_BUTTON).initAndShowWindow(); }
/** * creates and shows a new TaskOverview window * * @param aWindowFactory which needs to be injected to the shortcut window */
creates and shows a new TaskOverview window
createNewTaskOverviewWindow
{ "repo_name": "MichaelKohler/CustomerSoft", "path": "src/main/java/info/michaelkohler/customersoft/gui/WindowFactory.java", "license": "gpl-3.0", "size": 3325 }
[ "info.michaelkohler.customersoft.gui.AbstractOverviewWindow" ]
import info.michaelkohler.customersoft.gui.AbstractOverviewWindow;
import info.michaelkohler.customersoft.gui.*;
[ "info.michaelkohler.customersoft" ]
info.michaelkohler.customersoft;
355,594
public void setPrice (int M_PriceList_ID) { if (getM_Product_ID() == 0) return; // log.fine(toString() + " - M_PriceList_ID=" + M_PriceList_ID); getProductPricing (M_PriceList_ID); setPriceActual (m_productPrice.getPriceStd()); setPriceList (m_productPrice.getPriceList()); setPriceLimit (m_productP...
void function (int M_PriceList_ID) { if (getM_Product_ID() == 0) return; getProductPricing (M_PriceList_ID); setPriceActual (m_productPrice.getPriceStd()); setPriceList (m_productPrice.getPriceList()); setPriceLimit (m_productPrice.getPriceLimit()); setPriceEntered(getPriceActual()); else setPriceEntered(getPriceActual...
/** * Set Price for Product and PriceList * @param M_PriceList_ID price list */
Set Price for Product and PriceList
setPrice
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/MOrderLine.java", "license": "gpl-2.0", "size": 27666 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,099,245
final Set<Entry> getEntriesInInterval(ID fromID, ID toID) { if (fromID == null || toID == null) { NullPointerException e = new NullPointerException( "Neither of the given IDs may have value null!"); Entries.logger.error("Null pointer", e); throw e; } Set<Entry> result = new HashSet<Ent...
final Set<Entry> getEntriesInInterval(ID fromID, ID toID) { if (fromID == null toID == null) { NullPointerException e = new NullPointerException( STR); Entries.logger.error(STR, e); throw e; } Set<Entry> result = new HashSet<Entry>(); synchronized (this.entries) { for (ID nextID : this.entries.keySet()) { if (nextID.is...
/** * Returns all entries in interval, excluding lower bound, but including * upper bound * * @param fromID * Lower bound of IDs; entries matching this ID are NOT included * in result. * @param toID * Upper bound of IDs; entries matching this ID ARE included in ...
Returns all entries in interval, excluding lower bound, but including upper bound
getEntriesInInterval
{ "repo_name": "yahiaelgamal/PeerBox", "path": "src/de/uniba/wiai/lspi/chord/service/impl/Entries.java", "license": "gpl-2.0", "size": 10612 }
[ "de.uniba.wiai.lspi.chord.com.Entry", "java.util.HashSet", "java.util.Set" ]
import de.uniba.wiai.lspi.chord.com.Entry; import java.util.HashSet; import java.util.Set;
import de.uniba.wiai.lspi.chord.com.*; import java.util.*;
[ "de.uniba.wiai", "java.util" ]
de.uniba.wiai; java.util;
1,510,667
protected void onChildVisibilityChanged(View child, int oldVisibility, int newVisibility) { if (mTransition != null) { if (newVisibility == VISIBLE) { mTransition.showChild(this, child, oldVisibility); } else { mTransition.hideChild(this, child, newVis...
void function(View child, int oldVisibility, int newVisibility) { if (mTransition != null) { if (newVisibility == VISIBLE) { mTransition.showChild(this, child, oldVisibility); } else { mTransition.hideChild(this, child, newVisibility); if (mTransitioningViews != null && mTransitioningViews.contains(child)) { if (mVisib...
/** * Called when a view's visibility has changed. Notify the parent to take any appropriate * action. * * @param child The view whose visibility has changed * @param oldVisibility The previous visibility value (GONE, INVISIBLE, or VISIBLE). * @param newVisibility The new visibility value ...
Called when a view's visibility has changed. Notify the parent to take any appropriate action
onChildVisibilityChanged
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "frameworks/base/core/java/android/view/ViewGroup.java", "license": "gpl-3.0", "size": 275692 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
729,360
public void sendMessagesToAllOccupants(final Room room, final JID fromJID, final Element... content) throws TigaseStringprepException { for (String nickname : room.getOccupantsNicknames()) { final Role role = room.getRole(nickname); if (!role.isReceiveMessages()) { continue; } final Collection...
void function(final Room room, final JID fromJID, final Element... content) throws TigaseStringprepException { for (String nickname : room.getOccupantsNicknames()) { final Role role = room.getRole(nickname); if (!role.isReceiveMessages()) { continue; } final Collection<JID> occupantJids = room.getOccupantsJidsByNicknam...
/** * Method description * * * @param room * @param fromJID * @param content * * @throws TigaseStringprepException */
Method description
sendMessagesToAllOccupants
{ "repo_name": "JohnWhite80/tigase-muc", "path": "src/main/java/tigase/muc/modules/GroupchatMessageModule.java", "license": "agpl-3.0", "size": 10049 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,764,798
private static String translateLegacySystemId(String systemId) { String result = systemId; for (String[] translation : LEGACY_TRANSLATIONS) { if (systemId.startsWith(translation[0])) { // replace prefix with second component if it matches the first component ...
static String function(String systemId) { String result = systemId; for (String[] translation : LEGACY_TRANSLATIONS) { if (systemId.startsWith(translation[0])) { result = translation[1] + systemId.substring(translation[0].length()); break; } } if (OpenCms.getRepositoryManager() != null) { result = OpenCms.getResourceMa...
/** * Translates a legacy system id to a new form.<p> * * @param systemId the original system id * @return the new system id */
Translates a legacy system id to a new form
translateLegacySystemId
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/xml/CmsXmlEntityResolver.java", "license": "lgpl-2.1", "size": 24180 }
[ "org.opencms.main.OpenCms" ]
import org.opencms.main.OpenCms;
import org.opencms.main.*;
[ "org.opencms.main" ]
org.opencms.main;
1,356,252
ProcessGroup createProcessGroup(String parentGroupId, ProcessGroupDTO processGroup);
ProcessGroup createProcessGroup(String parentGroupId, ProcessGroupDTO processGroup);
/** * Creates a process group reference. * * @param parentGroupId The parent process group id * @param processGroup The process group * @return The process group */
Creates a process group reference
createProcessGroup
{ "repo_name": "InspurUSA/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/ProcessGroupDAO.java", "license": "apache-2.0", "size": 6446 }
[ "org.apache.nifi.groups.ProcessGroup", "org.apache.nifi.web.api.dto.ProcessGroupDTO" ]
import org.apache.nifi.groups.ProcessGroup; import org.apache.nifi.web.api.dto.ProcessGroupDTO;
import org.apache.nifi.groups.*; import org.apache.nifi.web.api.dto.*;
[ "org.apache.nifi" ]
org.apache.nifi;
2,062,912
@Override @XmlElement(name = "parentEntity", required = true) public Collection<String> getParentEntity() { return parentEntity = nonNullCollection(parentEntity, String.class); }
@XmlElement(name = STR, required = true) Collection<String> function() { return parentEntity = nonNullCollection(parentEntity, String.class); }
/** * Name of the metadata entity(s) under which this extended metadata element may appear. * The name(s) may be standard metadata element(s) or other extended metadata element(s). * * @return name of the metadata entity(s) under which this extended metadata element may appear. */
Name of the metadata entity(s) under which this extended metadata element may appear. The name(s) may be standard metadata element(s) or other extended metadata element(s)
getParentEntity
{ "repo_name": "Geomatys/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java", "license": "apache-2.0", "size": 24016 }
[ "java.util.Collection", "javax.xml.bind.annotation.XmlElement" ]
import java.util.Collection; import javax.xml.bind.annotation.XmlElement;
import java.util.*; import javax.xml.bind.annotation.*;
[ "java.util", "javax.xml" ]
java.util; javax.xml;
1,196,245
protected void clearCopyInTableSchema(List<String> tableNames) { if (tableNames != null && !tableNames.isEmpty()) { StringBuilder deleteData = new StringBuilder("delete from "); deleteData.append(Const.TableSchema.TABLE_NAME).append(" where"); boolean needOr = false; for (String tableName : tableNames)...
void function(List<String> tableNames) { if (tableNames != null && !tableNames.isEmpty()) { StringBuilder deleteData = new StringBuilder(STR); deleteData.append(Const.TableSchema.TABLE_NAME).append(STR); boolean needOr = false; for (String tableName : tableNames) { if (needOr) { deleteData.append(STR); } needOr = true;...
/** * The values in table_schame should be synchronized with the model tables * in the database. If a model table is dropped, the corresponding data * should be removed from table_schema too. * * @param tableNames * The table names need to remove from table_schema. */
The values in table_schame should be synchronized with the model tables in the database. If a model table is dropped, the corresponding data should be removed from table_schema too
clearCopyInTableSchema
{ "repo_name": "weatherfish/LitePal", "path": "litepal/src/main/java/org/litepal/tablemanager/AssociationUpdater.java", "license": "apache-2.0", "size": 18649 }
[ "java.util.ArrayList", "java.util.List", "org.litepal.util.Const", "org.litepal.util.LogUtil" ]
import java.util.ArrayList; import java.util.List; import org.litepal.util.Const; import org.litepal.util.LogUtil;
import java.util.*; import org.litepal.util.*;
[ "java.util", "org.litepal.util" ]
java.util; org.litepal.util;
420,322
private static ValueAnimator loadAnimator(Context context, AttributeSet attrs, ValueAnimator anim) throws NotFoundException { TypedArray a = context.obtainStyledAttributes(attrs, Animator); long duration = a.getInt( Animator_duration, 0); long startDelay = a.getInt( Animator_startOffset, 0); int v...
static ValueAnimator function(Context context, AttributeSet attrs, ValueAnimator anim) throws NotFoundException { TypedArray a = context.obtainStyledAttributes(attrs, Animator); long duration = a.getInt( Animator_duration, 0); long startDelay = a.getInt( Animator_startOffset, 0); int valueType = a.getInt( Animator_valu...
/** * Creates a new animation whose parameters come from the specified context * and attributes set. * * @param context * the application environment * @param attrs * the set of attributes holding the animation parameters */
Creates a new animation whose parameters come from the specified context and attributes set
loadAnimator
{ "repo_name": "yanjiangbo06/libraryDemo", "path": "commonlibrary/src/main/java/cn/com/venvy/nineoldandroids/animation/AnimatorInflater.java", "license": "epl-1.0", "size": 11456 }
[ "android.content.Context", "android.content.res.Resources", "android.content.res.TypedArray", "android.util.AttributeSet", "android.util.TypedValue", "android.view.animation.AnimationUtils" ]
import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.util.AttributeSet; import android.util.TypedValue; import android.view.animation.AnimationUtils;
import android.content.*; import android.content.res.*; import android.util.*; import android.view.animation.*;
[ "android.content", "android.util", "android.view" ]
android.content; android.util; android.view;
2,579,580
public void setAlias(String alias) { this.alias = alias; for (Operator<? extends OperatorDesc> op : childOperators) { op.setAlias(alias); } }
void function(String alias) { this.alias = alias; for (Operator<? extends OperatorDesc> op : childOperators) { op.setAlias(alias); } }
/** * Store the alias this operator is working on behalf of. */
Store the alias this operator is working on behalf of
setAlias
{ "repo_name": "sankarh/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java", "license": "apache-2.0", "size": 48281 }
[ "org.apache.hadoop.hive.ql.plan.OperatorDesc" ]
import org.apache.hadoop.hive.ql.plan.OperatorDesc;
import org.apache.hadoop.hive.ql.plan.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,348,719
public static boolean isHCSFormat(String format) { Iterator<String> i = HCS_DOMAIN.iterator(); while (i.hasNext()) { if (format.contains(i.next())) return true; } return false; }
static boolean function(String format) { Iterator<String> i = HCS_DOMAIN.iterator(); while (i.hasNext()) { if (format.contains(i.next())) return true; } return false; }
/** * Returns <code>true</code> if the passed format is a HCS format, * <code>false</code> otherwise. * * @param format The format to handle. * @return See above. */
Returns <code>true</code> if the passed format is a HCS format, <code>false</code> otherwise
isHCSFormat
{ "repo_name": "rleigh-dundee/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/model/ImportableObject.java", "license": "gpl-2.0", "size": 18459 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,016,340
public static LockManager getInstance() { if (null == instance) { instance = new LockManager(); } return instance; } private final Map<FileObject, List<Lock>> lockMap; private LockManager() { lockMap = new HashMap<FileObject, List<Lock>>(); }
static LockManager function() { if (null == instance) { instance = new LockManager(); } return instance; } private final Map<FileObject, List<Lock>> lockMap; private LockManager() { lockMap = new HashMap<FileObject, List<Lock>>(); }
/** * Get an instance of the lock manager. * * @return the lock manager */
Get an instance of the lock manager
getInstance
{ "repo_name": "thinkberg/moxo", "path": "modules/webdav/src/main/java/com/thinkberg/webdav/lock/LockManager.java", "license": "apache-2.0", "size": 12611 }
[ "java.util.HashMap", "java.util.List", "java.util.Map", "org.apache.commons.vfs.FileObject" ]
import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.vfs.FileObject;
import java.util.*; import org.apache.commons.vfs.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,829,928
public String getXWikiPreference(String prefname, String fallbackParam, String defaultValue, XWikiContext context) { String result = getWikiConfiguration().getProperty(prefname, String.class); if (StringUtils.isEmpty(result)) { result = getConfiguration().getProperty(fallbackParam, ...
String function(String prefname, String fallbackParam, String defaultValue, XWikiContext context) { String result = getWikiConfiguration().getProperty(prefname, String.class); if (StringUtils.isEmpty(result)) { result = getConfiguration().getProperty(fallbackParam, defaultValue); } return result != null ? result : ""; ...
/** * Obtain a preference value for the wiki, looking up first in the XWiki.XWikiPreferences document, then fallbacking * on a config parameter when the first lookup gives an empty string, then returning the default value if the config * parameter returned itself an empty string. * * @param pre...
Obtain a preference value for the wiki, looking up first in the XWiki.XWikiPreferences document, then fallbacking on a config parameter when the first lookup gives an empty string, then returning the default value if the config parameter returned itself an empty string
getXWikiPreference
{ "repo_name": "xwiki/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java", "license": "lgpl-2.1", "size": 331213 }
[ "org.apache.commons.lang3.StringUtils" ]
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
809,880
public void setAnalyzer(Analyzer analyzer) { m_analyzer = analyzer; }
void function(Analyzer analyzer) { m_analyzer = analyzer; }
/** * Sets the Lucene analyzer used for this index.<p> * * @param analyzer the Lucene analyzer to set */
Sets the Lucene analyzer used for this index
setAnalyzer
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/search/CmsSearchIndex.java", "license": "lgpl-2.1", "size": 93424 }
[ "org.apache.lucene.analysis.Analyzer" ]
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.*;
[ "org.apache.lucene" ]
org.apache.lucene;
2,821,455
K8sNode updateExtGatewayMac(MacAddress macAddress);
K8sNode updateExtGatewayMac(MacAddress macAddress);
/** * Returns new kubernetes node instance with given external gateway MAC address. * * @param macAddress updated MAC address * @return updated kubernetes node */
Returns new kubernetes node instance with given external gateway MAC address
updateExtGatewayMac
{ "repo_name": "oplinkoms/onos", "path": "apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNode.java", "license": "apache-2.0", "size": 9613 }
[ "org.onlab.packet.MacAddress" ]
import org.onlab.packet.MacAddress;
import org.onlab.packet.*;
[ "org.onlab.packet" ]
org.onlab.packet;
2,185,161
public String toString() { return "[" + Geo.format(lat) + ", " + Geo.format(lon) + "]"; }
String function() { return "[" + Geo.format(lat) + STR + Geo.format(lon) + "]"; }
/** * Outputs only "[lat, lon]". This is a bit different from all the * other toString() methods but the nice thing is that then one can * just cut & paste a location into a map in order to visualize it. */
Outputs only "[lat, lon]". This is a bit different from all the other toString() methods but the nice thing is that then one can just cut & paste a location into a map in order to visualize it
toString
{ "repo_name": "edsfocci/Transitime_core", "path": "transitime/src/main/java/org/transitime/db/structs/Location.java", "license": "gpl-3.0", "size": 3741 }
[ "org.transitime.utils.Geo" ]
import org.transitime.utils.Geo;
import org.transitime.utils.*;
[ "org.transitime.utils" ]
org.transitime.utils;
2,370,429
public SamplingRate getSamplingRate() { return (SamplingRate) getObject(SamplingRate.class, KEY_SAMPLING_RATE); }
SamplingRate function() { return (SamplingRate) getObject(SamplingRate.class, KEY_SAMPLING_RATE); }
/** * Gets a samplingRate * * @return SamplingRate -a SamplingRate value */
Gets a samplingRate
getSamplingRate
{ "repo_name": "914802951/sdl_android", "path": "sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java", "license": "bsd-3-clause", "size": 9890 }
[ "com.smartdevicelink.proxy.rpc.enums.SamplingRate" ]
import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
import com.smartdevicelink.proxy.rpc.enums.*;
[ "com.smartdevicelink.proxy" ]
com.smartdevicelink.proxy;
1,291,549
private static byte[] mergeLibraryDexBuffers(byte[] outArray) throws IOException { for (byte[] libraryDex : libraryDexBuffers) { if (outArray == null) { outArray = libraryDex; continue; } Dex a = new Dex(outArray); Dex b = new ...
static byte[] function(byte[] outArray) throws IOException { for (byte[] libraryDex : libraryDexBuffers) { if (outArray == null) { outArray = libraryDex; continue; } Dex a = new Dex(outArray); Dex b = new Dex(libraryDex); Dex ab = new DexMerger(a, b, CollisionPolicy.FAIL).merge(); outArray = ab.getBytes(); } return out...
/** * Merges the dex files in library jars. If multiple dex files define the * same type, this fails with an exception. */
Merges the dex files in library jars. If multiple dex files define the same type, this fails with an exception
mergeLibraryDexBuffers
{ "repo_name": "indashnet/InDashNet.Open.UN2000", "path": "android/dalvik/dx/src/com/android/dx/command/dexer/Main.java", "license": "apache-2.0", "size": 55295 }
[ "com.android.dex.Dex", "com.android.dx.merge.CollisionPolicy", "com.android.dx.merge.DexMerger", "java.io.IOException" ]
import com.android.dex.Dex; import com.android.dx.merge.CollisionPolicy; import com.android.dx.merge.DexMerger; import java.io.IOException;
import com.android.dex.*; import com.android.dx.merge.*; import java.io.*;
[ "com.android.dex", "com.android.dx", "java.io" ]
com.android.dex; com.android.dx; java.io;
1,420,617
public boolean isPeekInitialized() { return HARegionQueue.peekedEventsContext.get() != null; } static class MapWrapper { Map map; List list; boolean keepPrevAcks = false; public MapWrapper() { super(); map = new HashMap(); list = new LinkedList(); }
boolean function() { return HARegionQueue.peekedEventsContext.get() != null; } static class MapWrapper { Map map; List list; boolean keepPrevAcks = false; public MapWrapper() { super(); map = new HashMap(); list = new LinkedList(); }
/** * A simple check to validate that the peek() method has been executed as it initializes some * structures used by other methods. * * @return true if peeking returns a non-null value */
A simple check to validate that the peek() method has been executed as it initializes some structures used by other methods
isPeekInitialized
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java", "license": "apache-2.0", "size": 142403 }
[ "java.util.HashMap", "java.util.LinkedList", "java.util.List", "java.util.Map" ]
import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
12,527
public static final int getLimitStyle(String dbName) { return SQLManager.getInstance().getDBAdapter(dbName).getLimitStyle(); }
static final int function(String dbName) { return SQLManager.getInstance().getDBAdapter(dbName).getLimitStyle(); }
/** * This method is used to check whether the database supports * limiting the size of the resultset. * * @return The limit style for the database. */
This method is used to check whether the database supports limiting the size of the resultset
getLimitStyle
{ "repo_name": "bbossgroups/bbossgroups-3.5", "path": "bboss-persistent/src/com/frameworkset/orm/adapter/DBAdapter.java", "license": "apache-2.0", "size": 10114 }
[ "com.frameworkset.common.poolman.util.SQLManager" ]
import com.frameworkset.common.poolman.util.SQLManager;
import com.frameworkset.common.poolman.util.*;
[ "com.frameworkset.common" ]
com.frameworkset.common;
1,144,753
public boolean closeEvent(UUID uuid, Timestamp closeTime) throws SQLException { stmtCloseEvent.setObject(1, closeTime); stmtCloseEvent.setObject(2, uuid); System.out.println(stmtCloseEvent); boolean ex = stmtCloseEvent.executeUpdate() > 0; return (ex); }
boolean function(UUID uuid, Timestamp closeTime) throws SQLException { stmtCloseEvent.setObject(1, closeTime); stmtCloseEvent.setObject(2, uuid); System.out.println(stmtCloseEvent); boolean ex = stmtCloseEvent.executeUpdate() > 0; return (ex); }
/** * Set a stop / end time of the validity of the event * * @param uuid * UUID of the event * @param closeTime * timestamp when t ended / was not valid anymore * @return true if time could be set * @throws SQLException * e.g. if uid is not regeistered */
Set a stop / end time of the validity of the event
closeEvent
{ "repo_name": "GIlyass/TouristScheduler", "path": "RequestHandler/src/eu/citypulse/uaso/gdiclient/CpGdiInterface.java", "license": "mit", "size": 50557 }
[ "java.sql.SQLException", "java.sql.Timestamp" ]
import java.sql.SQLException; import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,578,053
public void setLexicalHandler (LexicalHandler handler) { if (handler == null) { throw new NullPointerException("Null lexical handler"); } else { lexicalHandler = handler; } }
void function (LexicalHandler handler) { if (handler == null) { throw new NullPointerException(STR); } else { lexicalHandler = handler; } }
/** * Set the lexical handler. * * @param handler The new lexical handler. * @exception java.lang.NullPointerException If the handler * is null. */
Set the lexical handler
setLexicalHandler
{ "repo_name": "Baltasarq/Gia", "path": "src/JDom/samples/sax/XMLReaderBase.java", "license": "mit", "size": 39286 }
[ "org.xml.sax.ext.LexicalHandler" ]
import org.xml.sax.ext.LexicalHandler;
import org.xml.sax.ext.*;
[ "org.xml.sax" ]
org.xml.sax;
821,215
public void setAirplaneService(AirplaneService airplaneService) { this.airplaneService = airplaneService; }
void function(AirplaneService airplaneService) { this.airplaneService = airplaneService; }
/** * Setter airplaneService * * @param airplaneService AirplaneService */
Setter airplaneService
setAirplaneService
{ "repo_name": "raulsuarezdabo/flight", "path": "src/main/java/com/raulsuarezdabo/flight/jsf/airplane/DeleteAirplaneBean.java", "license": "mit", "size": 7018 }
[ "com.raulsuarezdabo.flight.service.AirplaneService" ]
import com.raulsuarezdabo.flight.service.AirplaneService;
import com.raulsuarezdabo.flight.service.*;
[ "com.raulsuarezdabo.flight" ]
com.raulsuarezdabo.flight;
1,850,859
public Future<List<generated.classic.reactive.dataobject.tables.pojos.Something>> findManyBySometimestampwithtz(Collection<OffsetDateTime> values, int limit) { return findManyByCondition(Something.SOMETHING.SOMETIMESTAMPWITHTZ.in(values),limit); }
Future<List<generated.classic.reactive.dataobject.tables.pojos.Something>> function(Collection<OffsetDateTime> values, int limit) { return findManyByCondition(Something.SOMETHING.SOMETIMESTAMPWITHTZ.in(values),limit); }
/** * Find records that have <code>someTimestampWithTZ IN (values)</code> * asynchronously limited by the given limit */
Find records that have <code>someTimestampWithTZ IN (values)</code> asynchronously limited by the given limit
findManyBySometimestampwithtz
{ "repo_name": "jklingsporn/vertx-jooq", "path": "vertx-jooq-generate/src/test/java/generated/classic/reactive/dataobject/tables/daos/SomethingDao.java", "license": "mit", "size": 15579 }
[ "io.vertx.core.Future", "java.time.OffsetDateTime", "java.util.Collection", "java.util.List" ]
import io.vertx.core.Future; import java.time.OffsetDateTime; import java.util.Collection; import java.util.List;
import io.vertx.core.*; import java.time.*; import java.util.*;
[ "io.vertx.core", "java.time", "java.util" ]
io.vertx.core; java.time; java.util;
1,164,577
public void clearVideoSurfaceHolder(SurfaceHolder surfaceHolder) { if (surfaceHolder != null && surfaceHolder == this.surfaceHolder) { setVideoSurfaceHolder(null); } }
void function(SurfaceHolder surfaceHolder) { if (surfaceHolder != null && surfaceHolder == this.surfaceHolder) { setVideoSurfaceHolder(null); } }
/** * Clears the {@link SurfaceHolder} that holds the {@link Surface} onto which video is being * rendered if it matches the one passed. Else does nothing. * * @param surfaceHolder The surface holder to clear. */
Clears the <code>SurfaceHolder</code> that holds the <code>Surface</code> onto which video is being rendered if it matches the one passed. Else does nothing
clearVideoSurfaceHolder
{ "repo_name": "sanjaysingh1990/radio", "path": "library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java", "license": "mit", "size": 26637 }
[ "android.view.SurfaceHolder" ]
import android.view.SurfaceHolder;
import android.view.*;
[ "android.view" ]
android.view;
154,793
public void submissionFailed(Job job) { LOG.info(" Job submission failed notify if anyone is waiting " + job); this.statistics.add(job); }
void function(Job job) { LOG.info(STR + job); this.statistics.add(job); }
/** * Add a submission failed job , such tht it can be communicated * back to serial. * TODO: Cleaner solution for this problem * @param job */
Add a submission failed job , such tht it can be communicated back to serial
submissionFailed
{ "repo_name": "pombredanne/brisk-hadoop-common", "path": "src/contrib/gridmix/src/java/org/apache/hadoop/mapred/gridmix/JobMonitor.java", "license": "apache-2.0", "size": 7817 }
[ "org.apache.hadoop.mapreduce.Job" ]
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,766,601
public int getItemID(final String name) { final RSItem item = getItem(name); return item != null ? item.getID() : -1; }
int function(final String name) { final RSItem item = getItem(name); return item != null ? item.getID() : -1; }
/** * Gets the ID of an item in the inventory with a given name. * * @param name The name of the item you wish to find. * @return The ID of the item or -1 if not in inventory. */
Gets the ID of an item in the inventory with a given name
getItemID
{ "repo_name": "Latency/UtopianBot", "path": "src/org/rsbot/script/methods/Inventory.java", "license": "lgpl-3.0", "size": 20483 }
[ "org.rsbot.script.wrappers.RSItem" ]
import org.rsbot.script.wrappers.RSItem;
import org.rsbot.script.wrappers.*;
[ "org.rsbot.script" ]
org.rsbot.script;
67,114
public List<Contributor> getContributors() { return this.contributors; }
List<Contributor> function() { return this.contributors; }
/** * Returns the list of contributors. * * @return The list of contributors. Never null. May be empty. */
Returns the list of contributors
getContributors
{ "repo_name": "kayahr/jollada", "path": "src/main/java/de/ailis/jollada/model/Asset.java", "license": "mit", "size": 10738 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,138,719
protected void analyzeEdges() { Hashtable<Radio,ArrayList<DGRMDestinationRadio>> listTable = new Hashtable<Radio,ArrayList<DGRMDestinationRadio>>(); for (Edge edge: getEdges()) { ArrayList<DGRMDestinationRadio> destRadios; if (!listTable.containsKey(edge.source)) { destRadios =...
void function() { Hashtable<Radio,ArrayList<DGRMDestinationRadio>> listTable = new Hashtable<Radio,ArrayList<DGRMDestinationRadio>>(); for (Edge edge: getEdges()) { ArrayList<DGRMDestinationRadio> destRadios; if (!listTable.containsKey(edge.source)) { destRadios = new ArrayList<DGRMDestinationRadio>(); } else { destRad...
/** * Generates hash table using current edges for efficient lookup. */
Generates hash table using current edges for efficient lookup
analyzeEdges
{ "repo_name": "OrestisEv/Zolertia", "path": "tools/cooja/java/org/contikios/cooja/radiomediums/DirectedGraphMedium.java", "license": "apache-2.0", "size": 14957 }
[ "java.util.ArrayList", "java.util.Enumeration", "java.util.Hashtable", "org.contikios.cooja.interfaces.Radio" ]
import java.util.ArrayList; import java.util.Enumeration; import java.util.Hashtable; import org.contikios.cooja.interfaces.Radio;
import java.util.*; import org.contikios.cooja.interfaces.*;
[ "java.util", "org.contikios.cooja" ]
java.util; org.contikios.cooja;
568,327
protected Set<SocketOption<?>> supportedOptions() { if (getSocket() != null) { return socketOptions; } else { return serverSocketOptions; } }
Set<SocketOption<?>> function() { if (getSocket() != null) { return socketOptions; } else { return serverSocketOptions; } }
/** * Returns a set of SocketOptions supported by this impl * and by this impl's socket (Socket or ServerSocket) * * @return a Set of SocketOptions */
Returns a set of SocketOptions supported by this impl and by this impl's socket (Socket or ServerSocket)
supportedOptions
{ "repo_name": "lostdj/Jaklin-OpenJDK-JDK", "path": "src/java.base/share/classes/java/net/SocketImpl.java", "license": "gpl-2.0", "size": 16677 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,859,615
public synchronized RemoteEditLogManifest getEditLogManifest(long fromTxId) { // Collect RemoteEditLogs available from each FileJournalManager List<RemoteEditLog> allLogs = Lists.newArrayList(); for (JournalAndStream j : journals) { if (j.getManager() instanceof FileJournalManager) { FileJou...
synchronized RemoteEditLogManifest function(long fromTxId) { List<RemoteEditLog> allLogs = Lists.newArrayList(); for (JournalAndStream j : journals) { if (j.getManager() instanceof FileJournalManager) { FileJournalManager fjm = (FileJournalManager)j.getManager(); try { allLogs.addAll(fjm.getRemoteEditLogs(fromTxId, fal...
/** * Return a manifest of what finalized edit logs are available. All available * edit logs are returned starting from the transaction id passed. If * 'fromTxId' falls in the middle of a log, that log is returned as well. * * @param fromTxId Starting transaction id to read the logs. * @return Remote...
Return a manifest of what finalized edit logs are available. All available edit logs are returned starting from the transaction id passed. If 'fromTxId' falls in the middle of a log, that log is returned as well
getEditLogManifest
{ "repo_name": "WIgor/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/JournalSet.java", "license": "apache-2.0", "size": 24484 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableListMultimap", "com.google.common.collect.Lists", "com.google.common.collect.Multimaps", "com.google.common.collect.Sets", "java.util.Collections", "java.util.List", "java.util.SortedSet", "org.apache.hadoop.hdfs.server.p...
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.Lists; import com.google.common.collect.Multimaps; import com.google.common.collect.Sets; import java.util.Collections; import java.util.List; import java.util.SortedSet; import org.a...
import com.google.common.collect.*; import java.util.*; import org.apache.hadoop.hdfs.server.protocol.*;
[ "com.google.common", "java.util", "org.apache.hadoop" ]
com.google.common; java.util; org.apache.hadoop;
2,900,825
private void findByName() { EntityManager em; String query; Query q; List<StudentKuduInt> students; int count; em = emf.createEntityManager(); query = "Select s From StudentKuduInt s where s.name = 'Kuldeep'"; q = em.createQuery(query); stu...
void function() { EntityManager em; String query; Query q; List<StudentKuduInt> students; int count; em = emf.createEntityManager(); query = STR; q = em.createQuery(query); students = q.getResultList(); Assert.assertNotNull(students); Assert.assertEquals(2, students.size()); count = 0; for (StudentKuduInt student : stu...
/** * Find by name. */
Find by name
findByName
{ "repo_name": "impetus-opensource/Kundera", "path": "src/kundera-kudu/src/test/java/com/impetus/client/kudu/crud/datatypes/StudentKuduIntTest.java", "license": "apache-2.0", "size": 15867 }
[ "com.impetus.client.kudu.crud.datatypes.entities.StudentKuduInt", "java.util.List", "javax.persistence.EntityManager", "javax.persistence.Query", "junit.framework.Assert" ]
import com.impetus.client.kudu.crud.datatypes.entities.StudentKuduInt; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.Query; import junit.framework.Assert;
import com.impetus.client.kudu.crud.datatypes.entities.*; import java.util.*; import javax.persistence.*; import junit.framework.*;
[ "com.impetus.client", "java.util", "javax.persistence", "junit.framework" ]
com.impetus.client; java.util; javax.persistence; junit.framework;
1,345,009
public void setSelectedIndex(int index) { if (index < 0) { return; } //set default index if not added options yet if (index >= getItemCount()) { defaultSelectedIndex = index; return; } selectedIndex = index; currentItemLab...
void function(int index) { if (index < 0) { return; } if (index >= getItemCount()) { defaultSelectedIndex = index; return; } selectedIndex = index; currentItemLabel.setInnerText(getItemText(index)); InputElement inputElement = getListItemElement(index); inputElement.setChecked(true); }
/** * Sets the currently selected index. * * @param index * the index of the item to be selected */
Sets the currently selected index
setSelectedIndex
{ "repo_name": "gazarenkov/che-sketch", "path": "ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/listbox/CustomListBox.java", "license": "epl-1.0", "size": 16021 }
[ "com.google.gwt.dom.client.InputElement" ]
import com.google.gwt.dom.client.InputElement;
import com.google.gwt.dom.client.*;
[ "com.google.gwt" ]
com.google.gwt;
1,612,884
public String getSavepointName() throws SQLException { return name; }
String function() throws SQLException { return name; }
/** * Retrieves the name of the savepoint that this * <code>Savepoint</code> object represents. <p> * * @return the name of this savepoint * @exception SQLException if this is an un-named * savepoint * @since 1.4 */
Retrieves the name of the savepoint that this <code>Savepoint</code> object represents.
getSavepointName
{ "repo_name": "proudh0n/emergencymasta", "path": "hsqldb/src/org/hsqldb/jdbc/jdbcSavepoint.java", "license": "gpl-2.0", "size": 3882 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,869,023
public RSComponent[] getComponents() { openTab(); return methods.interfaces.getComponent(QUESTS, QUESTS_COMPONENT).getComponents(); }
RSComponent[] function() { openTab(); return methods.interfaces.getComponent(QUESTS, QUESTS_COMPONENT).getComponents(); }
/** * Returns an array of all the individual quest components. * * @return Array of all individual quest components. */
Returns an array of all the individual quest components
getComponents
{ "repo_name": "Latency/UtopianBot", "path": "src/org/rsbot/script/methods/Quests.java", "license": "lgpl-3.0", "size": 4123 }
[ "org.rsbot.script.wrappers.RSComponent" ]
import org.rsbot.script.wrappers.RSComponent;
import org.rsbot.script.wrappers.*;
[ "org.rsbot.script" ]
org.rsbot.script;
146,138
public FileFormat findByIri(String udfrIri) throws UnrecognizedIriException, UdfrServiceException { FileFormatFilterFactory factory = fileFormatDao.createQueryModifier().getQueryFilterFactory(); FileFormat fileFormat = fileFormatDao.findFirstResultBy(factory.byUdfrIri(udfrIri)); ...
FileFormat function(String udfrIri) throws UnrecognizedIriException, UdfrServiceException { FileFormatFilterFactory factory = fileFormatDao.createQueryModifier().getQueryFilterFactory(); FileFormat fileFormat = fileFormatDao.findFirstResultBy(factory.byUdfrIri(udfrIri)); if (fileFormat != null) { return fileFormat; } S...
/** * Returns the file format entry that corresponds to the given PUID. The local dictionary is automatically updated * via a SPARQL query to UDFR if such identifier is not present. * * @param udfrIri * UDFR IRI * @return file format dictionary entry * @throws Unrecognized...
Returns the file format entry that corresponds to the given PUID. The local dictionary is automatically updated via a SPARQL query to UDFR if such identifier is not present
findByIri
{ "repo_name": "psnc-dl/darceo", "path": "wrdz/wrdz-zmkd/business/src/main/java/pl/psnc/synat/wrdz/zmkd/format/FileFormatDictionaryBean.java", "license": "gpl-3.0", "size": 5070 }
[ "pl.psnc.synat.wrdz.zmkd.dao.format.FileFormatFilterFactory", "pl.psnc.synat.wrdz.zmkd.entity.format.FileFormat" ]
import pl.psnc.synat.wrdz.zmkd.dao.format.FileFormatFilterFactory; import pl.psnc.synat.wrdz.zmkd.entity.format.FileFormat;
import pl.psnc.synat.wrdz.zmkd.dao.format.*; import pl.psnc.synat.wrdz.zmkd.entity.format.*;
[ "pl.psnc.synat" ]
pl.psnc.synat;
2,090,343
public void onCustomClicked(View view) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); prefs.edit() .putBoolean(CUSTOM_CONFIG_KEY, mCustomConfig.isChecked()) .apply(); }
void function(View view) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); prefs.edit() .putBoolean(CUSTOM_CONFIG_KEY, mCustomConfig.isChecked()) .apply(); }
/** * Saves custom app restriction to the shared preference. * <p> * This flag is used by {@code GetRestrictionsReceiver} to determine if a custom app * restriction activity should be used. */
Saves custom app restriction to the shared preference. This flag is used by GetRestrictionsReceiver to determine if a custom app restriction activity should be used
onCustomClicked
{ "repo_name": "android/enterprise-samples", "path": "AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/MainActivity.java", "license": "apache-2.0", "size": 5712 }
[ "android.content.SharedPreferences", "android.view.View", "androidx.preference.PreferenceManager" ]
import android.content.SharedPreferences; import android.view.View; import androidx.preference.PreferenceManager;
import android.content.*; import android.view.*; import androidx.preference.*;
[ "android.content", "android.view", "androidx.preference" ]
android.content; android.view; androidx.preference;
829,334
public static TranslogHeader read(final String translogUUID, final Path path, final FileChannel channel) throws IOException { // This input is intentionally not closed because closing it will close the FileChannel. final BufferedChecksumStreamInput in = new BufferedChecksumStreamInput(ne...
static TranslogHeader function(final String translogUUID, final Path path, final FileChannel channel) throws IOException { final BufferedChecksumStreamInput in = new BufferedChecksumStreamInput(new InputStreamStreamInput(java.nio.channels.Channels.newInputStream(channel), channel.size())); final int version; try { vers...
/** * Read a translog header from the given path and file channel */
Read a translog header from the given path and file channel
read
{ "repo_name": "jprante/elasticsearch-server", "path": "server/src/main/java/org/elasticsearch/index/translog/TranslogHeader.java", "license": "apache-2.0", "size": 9162 }
[ "java.io.IOException", "java.nio.channels.FileChannel", "java.nio.file.Path", "org.apache.lucene.codecs.CodecUtil", "org.apache.lucene.index.CorruptIndexException", "org.apache.lucene.index.IndexFormatTooNewException", "org.apache.lucene.index.IndexFormatTooOldException", "org.apache.lucene.store.Inpu...
import java.io.IOException; import java.nio.channels.FileChannel; import java.nio.file.Path; import org.apache.lucene.codecs.CodecUtil; import org.apache.lucene.index.CorruptIndexException; import org.apache.lucene.index.IndexFormatTooNewException; import org.apache.lucene.index.IndexFormatTooOldException; import org.a...
import java.io.*; import java.nio.channels.*; import java.nio.file.*; import org.apache.lucene.codecs.*; import org.apache.lucene.index.*; import org.apache.lucene.store.*; import org.apache.lucene.util.*; import org.elasticsearch.common.io.*; import org.elasticsearch.common.io.stream.*;
[ "java.io", "java.nio", "org.apache.lucene", "org.elasticsearch.common" ]
java.io; java.nio; org.apache.lucene; org.elasticsearch.common;
557,429
public Object getParameterValue(String parameterName, boolean ignoreMissing) { JRFillParameter param = parametersMap.get(parameterName); Object value; if (param == null) { if (!ignoreMissing) { throw new JRRuntimeException( EXCEPTION_MESSAGE_KEY_NO_SUCH_PARAMETER, new Object[]{...
Object function(String parameterName, boolean ignoreMissing) { JRFillParameter param = parametersMap.get(parameterName); Object value; if (param == null) { if (!ignoreMissing) { throw new JRRuntimeException( EXCEPTION_MESSAGE_KEY_NO_SUCH_PARAMETER, new Object[]{parameterName} ); } Map<String, Object> valuesMap = getPar...
/** * Returns the value of a parameter. * * @param parameterName the parameter name * @param ignoreMissing if set, <code>null</code> will be returned for inexisting parameters * @return the parameter value */
Returns the value of a parameter
getParameterValue
{ "repo_name": "MHTaleb/Encologim", "path": "lib/JasperReport/src/net/sf/jasperreports/engine/fill/JRFillDataset.java", "license": "gpl-3.0", "size": 50654 }
[ "java.util.Map", "net.sf.jasperreports.engine.JRRuntimeException" ]
import java.util.Map; import net.sf.jasperreports.engine.JRRuntimeException;
import java.util.*; import net.sf.jasperreports.engine.*;
[ "java.util", "net.sf.jasperreports" ]
java.util; net.sf.jasperreports;
2,421,350
private boolean isNullifiable(final String entityName, Object object) throws HibernateException { if (object==LazyPropertyInitializer.UNFETCHED_PROPERTY) return false; //this is kinda the best we can do... if ( object instanceof HibernateProxy ) { // if its an uninitialized proxy it can't be t...
boolean function(final String entityName, Object object) throws HibernateException { if (object==LazyPropertyInitializer.UNFETCHED_PROPERTY) return false; if ( object instanceof HibernateProxy ) { LazyInitializer li = ( (HibernateProxy) object ).getHibernateLazyInitializer(); if ( li.getImplementation(session) == null ...
/** * Determine if the object already exists in the database, * using a "best guess" */
Determine if the object already exists in the database, using a "best guess"
isNullifiable
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/hibernate-distribution-3.6.10.Final/project/hibernate-core/src/main/java/org/hibernate/engine/ForeignKeys.java", "license": "unlicense", "size": 8821 }
[ "org.hibernate.HibernateException", "org.hibernate.intercept.LazyPropertyInitializer", "org.hibernate.proxy.HibernateProxy", "org.hibernate.proxy.LazyInitializer" ]
import org.hibernate.HibernateException; import org.hibernate.intercept.LazyPropertyInitializer; import org.hibernate.proxy.HibernateProxy; import org.hibernate.proxy.LazyInitializer;
import org.hibernate.*; import org.hibernate.intercept.*; import org.hibernate.proxy.*;
[ "org.hibernate", "org.hibernate.intercept", "org.hibernate.proxy" ]
org.hibernate; org.hibernate.intercept; org.hibernate.proxy;
1,585,732
NewSessionTicket getNewSessionTicket() throws IOException;
NewSessionTicket getNewSessionTicket() throws IOException;
/** * RFC 5077 3.3. NewSessionTicket Handshake Message. * <p/> * This method will be called (only) if a NewSessionTicket extension was sent by the server. See * <i>RFC 5077 4. Recommended Ticket Construction</i> for recommended format and protection. * * @return The ticket. * @throws ...
RFC 5077 3.3. NewSessionTicket Handshake Message. This method will be called (only) if a NewSessionTicket extension was sent by the server. See RFC 5077 4. Recommended Ticket Construction for recommended format and protection
getNewSessionTicket
{ "repo_name": "credentials/irma_future_id", "path": "crypto/bouncycastle/src/bc/core/src/main/java/org/bouncycastle/crypto/tls/TlsServer.java", "license": "apache-2.0", "size": 2857 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
986,938
public void setStatusBarTintEnabled(boolean enabled) { mStatusBarTintEnabled = enabled; if (mStatusBarAvailable) { mStatusBarTintView.setVisibility(enabled ? View.VISIBLE : View.GONE); } }
void function(boolean enabled) { mStatusBarTintEnabled = enabled; if (mStatusBarAvailable) { mStatusBarTintView.setVisibility(enabled ? View.VISIBLE : View.GONE); } }
/** * Enable tinting of the system status bar. * * If the platform is running Jelly Bean or earlier, or translucent system * UI modes have not been enabled in either the theme or via window flags, * then this method does nothing. * * @param enabled True to enable tinting, false to dis...
Enable tinting of the system status bar. If the platform is running Jelly Bean or earlier, or translucent system UI modes have not been enabled in either the theme or via window flags, then this method does nothing
setStatusBarTintEnabled
{ "repo_name": "PeterCxy/BlackLight", "path": "libs/SystemBarTint/src/com/readystatesoftware/systembartint/SystemBarTintManager.java", "license": "gpl-3.0", "size": 19973 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
455,504
public int av_opt_set(Pointer<?> obj, Pointer<Byte> name, Pointer<Byte> val, int search_flags) { return Lib.av_opt_set(obj.getPeer(), name.getPeer(), val.getPeer(), search_flags); }
int function(Pointer<?> obj, Pointer<Byte> name, Pointer<Byte> val, int search_flags) { return Lib.av_opt_set(obj.getPeer(), name.getPeer(), val.getPeer(), search_flags); }
/** * Set the field of obj with the given name to value. * * @param obj a struct whose first element is a pointer to an AVClass * @param name the name of the field to set * @param val The value to set. In case of av_opt_set() if the field is not * of a string type, then the given string ...
Set the field of obj with the given name to value
av_opt_set
{ "repo_name": "operutka/jlibav", "path": "jlibav/src/main/java/org/libav/avutil/bridge/AVUtilLibrary.java", "license": "lgpl-3.0", "size": 31604 }
[ "org.bridj.Pointer" ]
import org.bridj.Pointer;
import org.bridj.*;
[ "org.bridj" ]
org.bridj;
2,390,654
public File getLogFile() { return new File(getRootDir(),"log"); }
File function() { return new File(getRootDir(),"log"); }
/** * Returns the log file. */
Returns the log file
getLogFile
{ "repo_name": "pantheon-systems/jenkins", "path": "core/src/main/java/hudson/model/Run.java", "license": "mit", "size": 67304 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
812,843
@Test public void testSetListDelimiter() { ListDelimiterHandler handler = EasyMock.createMock(ListDelimiterHandler.class); EasyMock.replay(handler); assertSame("Wrong result", params, params.setListDelimiterHandler(handler)); assertSame("Wrong ...
void function() { ListDelimiterHandler handler = EasyMock.createMock(ListDelimiterHandler.class); EasyMock.replay(handler); assertSame(STR, params, params.setListDelimiterHandler(handler)); assertSame(STR, handler, params.getParameters() .get(STR)); }
/** * Tests whether the list delimiter handler property can be set. */
Tests whether the list delimiter handler property can be set
testSetListDelimiter
{ "repo_name": "mohanaraosv/commons-configuration", "path": "src/test/java/org/apache/commons/configuration2/builder/TestBasicBuilderParameters.java", "license": "apache-2.0", "size": 19798 }
[ "org.apache.commons.configuration2.convert.ListDelimiterHandler", "org.easymock.EasyMock", "org.junit.Assert" ]
import org.apache.commons.configuration2.convert.ListDelimiterHandler; import org.easymock.EasyMock; import org.junit.Assert;
import org.apache.commons.configuration2.convert.*; import org.easymock.*; import org.junit.*;
[ "org.apache.commons", "org.easymock", "org.junit" ]
org.apache.commons; org.easymock; org.junit;
616,145
public List<Patch> patchMake(String text1, String text2) { if (text1 == null || text2 == null) { throw new IllegalArgumentException("Null inputs. (patch_make)"); } // No diffs provided, compute our own. LinkedList<Diff> diffs = this.diffMain(text1, text2, true); i...
List<Patch> function(String text1, String text2) { if (text1 == null text2 == null) { throw new IllegalArgumentException(STR); } LinkedList<Diff> diffs = this.diffMain(text1, text2, true); if (diffs.size() > 2) { this.diffCleanupSemantic(diffs); this.diffCleanupEfficiency(diffs); } return this.patchMake(text1, diffs); ...
/** * Compute a list of patches to turn text1 into text2. * A set of diffs will be computed. * @param text1 Old text. * @param text2 New text. * @return LinkedList of Patch objects. */
Compute a list of patches to turn text1 into text2. A set of diffs will be computed
patchMake
{ "repo_name": "ron190/jsql-injection", "path": "model/src/main/java/com/jsql/model/injection/strategy/blind/patch/DiffMatchPatch.java", "license": "gpl-2.0", "size": 99358 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,167,396
private void deteClaimConfiguration(int applicationID, Connection connection) throws SQLException { if (debugMode) { log.debug("Deleting Application Claim Mapping " + applicationID); } int tenantID = CarbonContext.getThreadLocalCarbonContext().getTenantId(); ...
void function(int applicationID, Connection connection) throws SQLException { if (debugMode) { log.debug(STR + applicationID); } int tenantID = CarbonContext.getThreadLocalCarbonContext().getTenantId(); PreparedStatement deleteCliamPrepStmt = null; try { deleteCliamPrepStmt = connection .prepareStatement(ApplicationMgt...
/** * Delete Claim Mapping of the Application * * @param applicationID * @param connection * @throws IdentityApplicationManagementException */
Delete Claim Mapping of the Application
deteClaimConfiguration
{ "repo_name": "chanukaranaba/carbon-identity", "path": "components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/dao/impl/ApplicationDAOImpl.java", "license": "apache-2.0", "size": 123235 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "org.wso2.carbon.context.CarbonContext", "org.wso2.carbon.identity.application.common.util.IdentityApplicationManagementUtil", "org.wso2.carbon.identity.application.mgt.ApplicationMgtDBQueries" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.identity.application.common.util.IdentityApplicationManagementUtil; import org.wso2.carbon.identity.application.mgt.ApplicationMgtDBQueries;
import java.sql.*; import org.wso2.carbon.context.*; import org.wso2.carbon.identity.application.common.util.*; import org.wso2.carbon.identity.application.mgt.*;
[ "java.sql", "org.wso2.carbon" ]
java.sql; org.wso2.carbon;
2,402,315
public TestContext createTestContext() { return testContextFactory.getObject(); }
TestContext function() { return testContextFactory.getObject(); }
/** * Creates a new test context. * @return the new citrus test context. */
Creates a new test context
createTestContext
{ "repo_name": "christophd/citrus", "path": "core/citrus-base/src/main/java/com/consol/citrus/CitrusContext.java", "license": "apache-2.0", "size": 16973 }
[ "com.consol.citrus.context.TestContext" ]
import com.consol.citrus.context.TestContext;
import com.consol.citrus.context.*;
[ "com.consol.citrus" ]
com.consol.citrus;
1,860,412
// [TARGET get(Key)] // [VARIABLE "my_key_name"] public Entity get(String keyName) { Datastore datastore = transaction.getDatastore(); // [START get] Key key = datastore.newKeyFactory().setKind("MyKind").newKey(keyName); Entity entity = transaction.get(key); transaction.commit(); // Do som...
Entity function(String keyName) { Datastore datastore = transaction.getDatastore(); Key key = datastore.newKeyFactory().setKind(STR).newKey(keyName); Entity entity = transaction.get(key); transaction.commit(); return entity; }
/** * Example of getting an entity for a given key. */
Example of getting an entity for a given key
get
{ "repo_name": "shinfan/gcloud-java", "path": "google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/TransactionSnippets.java", "license": "apache-2.0", "size": 14136 }
[ "com.google.cloud.datastore.Datastore", "com.google.cloud.datastore.Entity", "com.google.cloud.datastore.Key" ]
import com.google.cloud.datastore.Datastore; import com.google.cloud.datastore.Entity; import com.google.cloud.datastore.Key;
import com.google.cloud.datastore.*;
[ "com.google.cloud" ]
com.google.cloud;
1,217,698
logger.info("SleepMetrics:"); Collections.sort(metrics); for (SleepEntry entry : metrics) { logger.info(entry.toString()); } }
logger.info(STR); Collections.sort(metrics); for (SleepEntry entry : metrics) { logger.info(entry.toString()); } }
/** * Record to the logger the current sleep data report. */
Record to the logger the current sleep data report
report
{ "repo_name": "nico01f/z-pec", "path": "ZimbraSelenium/src/java/com/zimbra/qa/selenium/framework/util/SleepMetrics.java", "license": "mit", "size": 5666 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
1,444,827
public static String createSignedPutUrl(String bucketName, String objectKey, Map headersMap, AWSCredentials awsCredentials, Date expiryTime, boolean isVirtualHost) throws S3ServiceException { long secondsSinceEpoch = expiryTime.getTime() / 1000; return createSignedUrl("PUT", bu...
static String function(String bucketName, String objectKey, Map headersMap, AWSCredentials awsCredentials, Date expiryTime, boolean isVirtualHost) throws S3ServiceException { long secondsSinceEpoch = expiryTime.getTime() / 1000; return createSignedUrl("PUT", bucketName, objectKey, null, headersMap, awsCredentials, seco...
/** * Generates a signed PUT URL. * * @param bucketName * the name of the bucket to include in the URL, must be a valid bucket name. * @param objectKey * the name of the object to include in the URL, if null only the bucket name is used. * @param headersMap * headers to add to t...
Generates a signed PUT URL
createSignedPutUrl
{ "repo_name": "ridvandongelci/jets3t", "path": "src/org/jets3t/service/S3Service.java", "license": "apache-2.0", "size": 110321 }
[ "java.util.Date", "java.util.Map", "org.jets3t.service.security.AWSCredentials" ]
import java.util.Date; import java.util.Map; import org.jets3t.service.security.AWSCredentials;
import java.util.*; import org.jets3t.service.security.*;
[ "java.util", "org.jets3t.service" ]
java.util; org.jets3t.service;
2,017,531
public static double sumLog(final double[] values, final int begin, final int length) throws MathIllegalArgumentException { return SUM_OF_LOGS.evaluate(values, begin, length); }
static double function(final double[] values, final int begin, final int length) throws MathIllegalArgumentException { return SUM_OF_LOGS.evaluate(values, begin, length); }
/** * Returns the sum of the natural logs of the entries in the specified portion of * the input array, or <code>Double.NaN</code> if the designated subarray is empty. * <p> * Throws <code>IllegalArgumentException</code> if the array is null. * <p> * See {@link SumOfLogs}. * * @p...
Returns the sum of the natural logs of the entries in the specified portion of the input array, or <code>Double.NaN</code> if the designated subarray is empty. Throws <code>IllegalArgumentException</code> if the array is null. See <code>SumOfLogs</code>
sumLog
{ "repo_name": "virtualdataset/metagen-java", "path": "virtdata-lib-curves4/src/main/java/org/apache/commons/math4/stat/StatUtils.java", "license": "apache-2.0", "size": 36881 }
[ "org.apache.commons.math4.exception.MathIllegalArgumentException" ]
import org.apache.commons.math4.exception.MathIllegalArgumentException;
import org.apache.commons.math4.exception.*;
[ "org.apache.commons" ]
org.apache.commons;
114,900
@Override public String getName() { return NbBundle.getMessage(AddQueryAction.class, "CTL_AddQueryAction.name"); }
String function() { return NbBundle.getMessage(AddQueryAction.class, STR); }
/** * Gets the localized display name for this action from bundle.properties. * * @return localized action display name. */
Gets the localized display name for this action from bundle.properties
getName
{ "repo_name": "RtcNbClient/RtcNbClient", "path": "RtcNbClientWorkItems/RtcNbClientWorkItemsUI/src/main/java/pl/edu/amu/wmi/kino/rtc/client/queries/actions/AddQueryAction.java", "license": "gpl-3.0", "size": 5418 }
[ "org.openide.util.NbBundle" ]
import org.openide.util.NbBundle;
import org.openide.util.*;
[ "org.openide.util" ]
org.openide.util;
1,369,580
public void createUpAnimation(float dy) { // if this is 300 this means that we are on tablet and orientation is landscape // we do this else the animation will go off screen // so if we are on landscape we change the direction of the animation if (iconMarginLandscape == 300) ...
void function(float dy) { if (iconMarginLandscape == 300) upAnimation = new TranslateAnimation(0, 0, 0, scale * 150 + 0.5f - movieDetailsInfoScrollY - dy); else upAnimation = new TranslateAnimation(0, 0, 0, -scale * (150 + iconConstantSpecialCase) + 0.5f - movieDetailsInfoScrollY - dy); upAnimation.setDuration(500); up...
/** * Creates animation for the More Icon with up direction. */
Creates animation for the More Icon with up direction
createUpAnimation
{ "repo_name": "Bulforce/moviedb-android", "path": "app/src/main/java/de/sourcestream/movieDB/controller/MovieDetails.java", "license": "apache-2.0", "size": 82182 }
[ "android.view.animation.TranslateAnimation" ]
import android.view.animation.TranslateAnimation;
import android.view.animation.*;
[ "android.view" ]
android.view;
264,598
public int doStartTag() throws JspException { PageContextImpl pc = (PageContextImpl) pageContext; String basename = _basenameExpr.evalString(pc.getELContext()); _oldBundle = pc.getAttribute("caucho.bundle"); _oldPrefix = pc.getAttribute("caucho.bundle.prefix"); LocalizationContext bun...
int function() throws JspException { PageContextImpl pc = (PageContextImpl) pageContext; String basename = _basenameExpr.evalString(pc.getELContext()); _oldBundle = pc.getAttribute(STR); _oldPrefix = pc.getAttribute(STR); LocalizationContext bundle = pc.getBundle(basename); pc.setAttribute(STR, bundle); if (_prefixExpr...
/** * Process the tag. */
Process the tag
doStartTag
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/jstl/el/BundleTag.java", "license": "gpl-2.0", "size": 3392 }
[ "com.caucho.jsp.PageContextImpl", "javax.servlet.jsp.JspException", "javax.servlet.jsp.jstl.fmt.LocalizationContext" ]
import com.caucho.jsp.PageContextImpl; import javax.servlet.jsp.JspException; import javax.servlet.jsp.jstl.fmt.LocalizationContext;
import com.caucho.jsp.*; import javax.servlet.jsp.*; import javax.servlet.jsp.jstl.fmt.*;
[ "com.caucho.jsp", "javax.servlet" ]
com.caucho.jsp; javax.servlet;
2,707,846
public Item findByName(String name) throws ItemNotFoundException { Item result = null; for (Item item : this.items) { if (item != null && item.getName().equals(name)) { result = item; } } if (result != null) { return result; ...
Item function(String name) throws ItemNotFoundException { Item result = null; for (Item item : this.items) { if (item != null && item.getName().equals(name)) { result = item; } } if (result != null) { return result; } else { throw new ItemNotFoundException(STR); } }
/** * find item by name in array items. * * @param name String * @return Item * @throws ItemNotFoundException Exception */
find item by name in array items
findByName
{ "repo_name": "roman-sd/java-a-to-z", "path": "chapter_002/src/main/java/ru/sdroman/start/Tracker.java", "license": "apache-2.0", "size": 3753 }
[ "ru.sdroman.models.Item" ]
import ru.sdroman.models.Item;
import ru.sdroman.models.*;
[ "ru.sdroman.models" ]
ru.sdroman.models;
1,485,898
protected Page getPageFrom(final ErrorEvent event) { if (event instanceof ConnectorErrorEvent) { final Connector connector = ((ConnectorErrorEvent) event).getConnector(); if (connector instanceof UI) { final UI uiInstance = (UI) connector; return uiIns...
Page function(final ErrorEvent event) { if (event instanceof ConnectorErrorEvent) { final Connector connector = ((ConnectorErrorEvent) event).getConnector(); if (connector instanceof UI) { final UI uiInstance = (UI) connector; return uiInstance.getPage(); } } final Optional<Page> errorOriginPage = getErrorOriginPage(ev...
/** * Method to find the {@link Page} to show notification on. * * @param event * error event * @return current {@link Page} for error notification */
Method to find the <code>Page</code> to show notification on
getPageFrom
{ "repo_name": "eclipse/hawkbit", "path": "hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/error/HawkbitUIErrorHandler.java", "license": "epl-1.0", "size": 5802 }
[ "com.vaadin.server.ClientConnector", "com.vaadin.server.ErrorEvent", "com.vaadin.server.Page", "com.vaadin.shared.Connector", "java.util.Optional" ]
import com.vaadin.server.ClientConnector; import com.vaadin.server.ErrorEvent; import com.vaadin.server.Page; import com.vaadin.shared.Connector; import java.util.Optional;
import com.vaadin.server.*; import com.vaadin.shared.*; import java.util.*;
[ "com.vaadin.server", "com.vaadin.shared", "java.util" ]
com.vaadin.server; com.vaadin.shared; java.util;
122,396
public PushResult sendPush(String payloadString) throws APIConnectionException, APIRequestException { return _pushClient.sendPush(payloadString); }
PushResult function(String payloadString) throws APIConnectionException, APIRequestException { return _pushClient.sendPush(payloadString); }
/** * Send a push with JSON string. * * You can send a push JSON string directly with this method. * * Attention: globally settings cannot be affect this type of Push. * * @param payloadString payload of a push. * @return PushResult. Can be printed to a JSON. * @throws cn.jpush.api.common.AP...
Send a push with JSON string. You can send a push JSON string directly with this method. Attention: globally settings cannot be affect this type of Push
sendPush
{ "repo_name": "Casper3635/Student_Register", "path": "newStudent/src/cn/jpush/api/JPushClient.java", "license": "apache-2.0", "size": 10334 }
[ "cn.jpush.api.common.APIConnectionException", "cn.jpush.api.common.APIRequestException", "cn.jpush.api.push.PushResult" ]
import cn.jpush.api.common.APIConnectionException; import cn.jpush.api.common.APIRequestException; import cn.jpush.api.push.PushResult;
import cn.jpush.api.common.*; import cn.jpush.api.push.*;
[ "cn.jpush.api" ]
cn.jpush.api;
291,179
PartitioningHandle getPartitioningHandleForExchange(Session session, String catalogName, int partitionCount, List<Type> partitionTypes);
PartitioningHandle getPartitioningHandleForExchange(Session session, String catalogName, int partitionCount, List<Type> partitionTypes);
/** * Provides partitioning handle for exchange. */
Provides partitioning handle for exchange
getPartitioningHandleForExchange
{ "repo_name": "ptkool/presto", "path": "presto-main/src/main/java/com/facebook/presto/metadata/Metadata.java", "license": "apache-2.0", "size": 17661 }
[ "com.facebook.presto.Session", "com.facebook.presto.spi.type.Type", "com.facebook.presto.sql.planner.PartitioningHandle", "java.util.List" ]
import com.facebook.presto.Session; import com.facebook.presto.spi.type.Type; import com.facebook.presto.sql.planner.PartitioningHandle; import java.util.List;
import com.facebook.presto.*; import com.facebook.presto.spi.type.*; import com.facebook.presto.sql.planner.*; import java.util.*;
[ "com.facebook.presto", "java.util" ]
com.facebook.presto; java.util;
2,099,323
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (mSearchable == null) { return false; } // if it's an action specified by the searchable activity, launch the // entered query with the action key // TODO SearchableInfo.ActionKeyInfo action...
boolean function(int keyCode, KeyEvent event) { if (mSearchable == null) { return false; } return super.onKeyDown(keyCode, event); }
/** * Handles the key down event for dealing with action keys. * * @param keyCode This is the keycode of the typed key, and is the same value as * found in the KeyEvent parameter. * @param event The complete event record for the typed key * * @return true if the event was handl...
Handles the key down event for dealing with action keys
onKeyDown
{ "repo_name": "imaeses/k-9", "path": "plugins/ActionBarSherlock/library/src/com/actionbarsherlock/widget/SearchView.java", "license": "bsd-3-clause", "size": 71173 }
[ "android.view.KeyEvent" ]
import android.view.KeyEvent;
import android.view.*;
[ "android.view" ]
android.view;
2,051,938
public List<Sample> getLibraries(String attributeName, String attributeValue);
List<Sample> function(String attributeName, String attributeValue);
/** * Returns list of libraries that contain the attribute attributeName=attributeValue. The attribute can occur anywhere in the hierarchy, * from the library intself all the way up to the root. * * @param attributeName * Attribute Name. * @param attributeValue * ...
Returns list of libraries that contain the attribute attributeName=attributeValue. The attribute can occur anywhere in the hierarchy, from the library intself all the way up to the root
getLibraries
{ "repo_name": "joansmith/seqware", "path": "seqware-common/src/main/java/net/sourceforge/seqware/common/dao/LibraryDAO.java", "license": "gpl-3.0", "size": 1080 }
[ "java.util.List", "net.sourceforge.seqware.common.model.Sample" ]
import java.util.List; import net.sourceforge.seqware.common.model.Sample;
import java.util.*; import net.sourceforge.seqware.common.model.*;
[ "java.util", "net.sourceforge.seqware" ]
java.util; net.sourceforge.seqware;
2,604,728
protected TargetHandlerParameters parameters( String keyFile ) { TargetHandlerParameters parameters = new TargetHandlerParameters(); Map<String, String> messagingProperties = new HashMap<>(); messagingProperties.put("messaging.type", "http"); parameters.setMessagingProperties(messagingProperties); parame...
TargetHandlerParameters function( String keyFile ) { TargetHandlerParameters parameters = new TargetHandlerParameters(); Map<String, String> messagingProperties = new HashMap<>(); messagingProperties.put(STR, "http"); parameters.setMessagingProperties(messagingProperties); parameters.setDomain(STR); parameters.setAppli...
/** * Prepares the parameters for the target handler. * @param keyFile the key file * @return a non-null parameters object */
Prepares the parameters for the target handler
parameters
{ "repo_name": "vincent-zurczak/roboconf-platform", "path": "core/roboconf-target-embedded/src/test/java/net/roboconf/target/embedded/internal/ToRunByHandtoSetConfiguration.java", "license": "apache-2.0", "size": 3301 }
[ "java.util.HashMap", "java.util.Map", "net.roboconf.core.model.beans.Instance", "net.roboconf.target.api.TargetHandlerParameters" ]
import java.util.HashMap; import java.util.Map; import net.roboconf.core.model.beans.Instance; import net.roboconf.target.api.TargetHandlerParameters;
import java.util.*; import net.roboconf.core.model.beans.*; import net.roboconf.target.api.*;
[ "java.util", "net.roboconf.core", "net.roboconf.target" ]
java.util; net.roboconf.core; net.roboconf.target;
1,928,175
private void traverseLeafLeaf(Consumer consumer, Iterator<Node> leftc, Iterator<Node> rightc) { PeekingIterator<Node> li = Iterators.peekingIterator(leftc); PeekingIterator<Node> ri = Iterators.peekingIterator(rightc); while (li.hasNext() && ri.hasNext()) { Node lpeek = li.peek(...
void function(Consumer consumer, Iterator<Node> leftc, Iterator<Node> rightc) { PeekingIterator<Node> li = Iterators.peekingIterator(leftc); PeekingIterator<Node> ri = Iterators.peekingIterator(rightc); while (li.hasNext() && ri.hasNext()) { Node lpeek = li.peek(); Node rpeek = ri.peek(); int order = ORDER.compare(lpee...
/** * Traverse and compare the {@link RevTree#children() children} nodes of two leaf trees, calling * {@link #node(Consumer, Node, Node)} for each diff. */
Traverse and compare the <code>RevTree#children() children</code> nodes of two leaf trees, calling <code>#node(Consumer, Node, Node)</code> for each diff
traverseLeafLeaf
{ "repo_name": "msieger/geogig", "path": "src/core/src/main/java/org/locationtech/geogig/api/plumbing/diff/PreOrderDiffWalk.java", "license": "bsd-3-clause", "size": 29036 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.Iterators", "com.google.common.collect.PeekingIterator", "java.util.Iterator", "org.locationtech.geogig.api.Node" ]
import com.google.common.base.Preconditions; import com.google.common.collect.Iterators; import com.google.common.collect.PeekingIterator; import java.util.Iterator; import org.locationtech.geogig.api.Node;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.locationtech.geogig.api.*;
[ "com.google.common", "java.util", "org.locationtech.geogig" ]
com.google.common; java.util; org.locationtech.geogig;
891,719
@Nonnull AgentData getAgentData(boolean forceFetch) throws AgentException;
AgentData getAgentData(boolean forceFetch) throws AgentException;
/** * Return agent data * * @param forceFetch <code>true</code> - always fetch, false - use cached version * @return the agent data */
Return agent data
getAgentData
{ "repo_name": "alesharik/AlesharikWebServer", "path": "serverless/src/com/alesharik/webserver/serverless/RemoteAgent.java", "license": "gpl-3.0", "size": 2002 }
[ "com.alesharik.webserver.serverless.exception.AgentException" ]
import com.alesharik.webserver.serverless.exception.AgentException;
import com.alesharik.webserver.serverless.exception.*;
[ "com.alesharik.webserver" ]
com.alesharik.webserver;
2,805,661
@Override protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("button"); if (action == null) { action = "view"; } Properties props = (Properties) reque...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter(STR); if (action == null) { action = "view"; } Properties props = (Properties) request.getSession().getAttribute(PROPS_SESSION_KEY); if (props == null) { props = load(); re...
/** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "AsherBond/MondocosmOS", "path": "wonderland/web/front/src/java/org/jdesktop/wonderland/front/servlet/ClientSettingsServlet.java", "license": "agpl-3.0", "size": 7170 }
[ "java.io.IOException", "java.util.Properties", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import java.util.Properties; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "java.util", "javax.servlet" ]
java.io; java.util; javax.servlet;
1,272,934
@Test @DependsOnMethod("testConversion") public void testDerivative() throws FactoryException, TransformException { transform = CartesianToPolar.INSTANCE.completeTransform(PolarToCartesianTest.factory()); derivativeDeltas = new double[] {1E-6, 1E-6}; tolerance = 1E-7; verifyD...
@DependsOnMethod(STR) void function() throws FactoryException, TransformException { transform = CartesianToPolar.INSTANCE.completeTransform(PolarToCartesianTest.factory()); derivativeDeltas = new double[] {1E-6, 1E-6}; tolerance = 1E-7; verifyDerivative(30, 60); }
/** * Tests calculation of a transform derivative in the polar case. * * @throws FactoryException if the transform can not be created. * @throws TransformException if a coordinate can not be transformed. */
Tests calculation of a transform derivative in the polar case
testDerivative
{ "repo_name": "apache/sis", "path": "core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToPolarTest.java", "license": "apache-2.0", "size": 5419 }
[ "org.apache.sis.test.DependsOnMethod", "org.opengis.referencing.operation.TransformException", "org.opengis.util.FactoryException" ]
import org.apache.sis.test.DependsOnMethod; import org.opengis.referencing.operation.TransformException; import org.opengis.util.FactoryException;
import org.apache.sis.test.*; import org.opengis.referencing.operation.*; import org.opengis.util.*;
[ "org.apache.sis", "org.opengis.referencing", "org.opengis.util" ]
org.apache.sis; org.opengis.referencing; org.opengis.util;
2,150,881